@beyondwords/player 0.0.0-beta39 → 0.0.0-beta40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es.js +241 -230
- package/dist/es.js.map +1 -1
- package/dist/umd.js +14 -14
- package/dist/umd.js.map +1 -1
- package/package.json +4 -4
package/dist/umd.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
(function(oe,gt){typeof exports=="object"&&typeof module!="undefined"?module.exports=gt():typeof define=="function"&&define.amd?define(gt):(oe=typeof globalThis!="undefined"?globalThis:oe||self,oe.BeyondWords=gt())})(this,function(){var da,pu,vo,fh,fa,mo,hh,po,gh,ha,_o,vh,yo,mh,ga,bo,ph,So,_h,ko,yh,To,bh,Eo,Sh,va,_u,Ao,kh,xo,Th,Br,Pn,vn,cs,lr,Ir,wo,Eh,ns,Ta,mn,ds,Po,Ah,ma,yu,Zr,qn,pa,bu,pn,fs,Li,ir,_n,hs,Jr,Xn,Co,xh,Lo,wh,ss,Ea,_a,Su,Io,Ph,Ro,Ch,Do,Lh,Oo,Ih,Vn,_f;"use strict";var vE=Object.defineProperty,mE=Object.defineProperties;var pE=Object.getOwnPropertyDescriptors;var Ho=Object.getOwnPropertySymbols;var uh=Object.prototype.hasOwnProperty,ch=Object.prototype.propertyIsEnumerable;var lh=(oe,gt,kt)=>gt in oe?vE(oe,gt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):oe[gt]=kt,de=(oe,gt)=>{for(var kt in gt||(gt={}))uh.call(gt,kt)&&lh(oe,kt,gt[kt]);if(Ho)for(var kt of Ho(gt))ch.call(gt,kt)&&lh(oe,kt,gt[kt]);return oe},ni=(oe,gt)=>mE(oe,pE(gt));var vu=(oe,gt)=>{var kt={};for(var Bi in oe)uh.call(oe,Bi)&>.indexOf(Bi)<0&&(kt[Bi]=oe[Bi]);if(oe!=null&&Ho)for(var Bi of Ho(oe))gt.indexOf(Bi)<0&&ch.call(oe,Bi)&&(kt[Bi]=oe[Bi]);return kt};var mu=(oe,gt,kt)=>{if(!gt.has(oe))throw TypeError("Cannot "+kt)};var jr=(oe,gt,kt)=>(mu(oe,gt,"read from private field"),kt?kt.call(oe):gt.get(oe)),ht=(oe,gt,kt)=>{if(gt.has(oe))throw TypeError("Cannot add the same private member more than once");gt instanceof WeakSet?gt.add(oe):gt.set(oe,kt)},dh=(oe,gt,kt,Bi)=>(mu(oe,gt,"write to private field"),Bi?Bi.call(oe,kt):gt.set(oe,kt),kt);var ce=(oe,gt,kt)=>(mu(oe,gt,"access private method"),kt);var an=(oe,gt,kt)=>new Promise((Bi,zs)=>{var Mt=Er=>{try{Ye(kt.next(Er))}catch(Rr){zs(Rr)}},Cn=Er=>{try{Ye(kt.throw(Er))}catch(Rr){zs(Rr)}},Ye=Er=>Er.done?Bi(Er.value):Promise.resolve(Er.value).then(Mt,Cn);Ye((kt=kt.apply(oe,gt)).next())});function oe(){}const gt=t=>t;function kt(t,e){for(const i in e)t[i]=e[i];return t}function Bi(t){return t()}function zs(){return Object.create(null)}function Mt(t){t.forEach(Bi)}function Cn(t){return typeof t=="function"}function Ye(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Er;function Rr(t,e){return Er||(Er=document.createElement("a")),Er.href=e,t===Er.href}function Rh(t){return Object.keys(t).length===0}function gs(t,e,i,n){if(t){const a=ku(t,e,i,n);return t[0](a)}}function ku(t,e,i,n){return t[1]&&n?kt(i.ctx.slice(),t[1](n(e))):i.ctx}function vs(t,e,i,n){if(t[2]&&n){const a=t[2](n(i));if(e.dirty===void 0)return a;if(typeof a=="object"){const l=[],g=Math.max(e.dirty.length,a.length);for(let p=0;p<g;p+=1)l[p]=e.dirty[p]|a[p];return l}return e.dirty|a}return e.dirty}function ms(t,e,i,n,a,l){if(a){const g=ku(e,i,n,l);t.p(g,a)}}function ps(t){if(t.ctx.length>32){const e=[],i=t.ctx.length/32;for(let n=0;n<i;n++)e[n]=-1;return e}return-1}function Tu(t){return t==null?"":t}function Eu(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}const Au=typeof window!="undefined";let Dh=Au?()=>window.performance.now():()=>Date.now(),Aa=Au?t=>requestAnimationFrame(t):oe;const _s=new Set;function xu(t){_s.forEach(e=>{e.c(t)||(_s.delete(e),e.f())}),_s.size!==0&&Aa(xu)}function Oh(t){let e;return _s.size===0&&Aa(xu),{promise:new Promise(i=>{_s.add(e={c:t,f:i})}),abort(){_s.delete(e)}}}const Bh=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;function I(t,e){t.appendChild(e)}function wu(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Mh(t){const e=F("style");return Nh(wu(t),e),e.sheet}function Nh(t,e){return I(t.head||t,e),e.sheet}function se(t,e,i){t.insertBefore(e,i||null)}function te(t){t.parentNode&&t.parentNode.removeChild(t)}function Ln(t,e){for(let i=0;i<t.length;i+=1)t[i]&&t[i].d(e)}function F(t){return document.createElement(t)}function $e(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Le(t){return document.createTextNode(t)}function Ce(){return Le(" ")}function Zn(){return Le("")}function ge(t,e,i,n){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)}function rt(t,e,i){i==null?t.removeAttribute(e):t.getAttribute(e)!==i&&t.setAttribute(e,i)}function Fh(t){return Array.from(t.childNodes)}function gr(t,e){e=""+e,t.data!==e&&(t.data=e)}function Tt(t,e){t.value=e==null?"":e}function Mi(t,e,i,n){i==null?t.style.removeProperty(e):t.style.setProperty(e,i,n?"important":"")}function lt(t,e,i){for(let n=0;n<t.options.length;n+=1){const a=t.options[n];if(a.__value===e){a.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function gi(t){const e=t.querySelector(":checked");return e&&e.__value}let xa;function Uh(){if(xa===void 0){xa=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(t){xa=!0}}return xa}function Vh(t,e){getComputedStyle(t).position==="static"&&(t.style.position="relative");const n=F("iframe");n.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),n.setAttribute("aria-hidden","true"),n.tabIndex=-1;const a=Uh();let l;return a?(n.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",l=ge(window,"message",g=>{g.source===n.contentWindow&&e()})):(n.src="about:blank",n.onload=()=>{l=ge(n.contentWindow,"resize",e),e()}),I(t,n),()=>{(a||l&&n.contentWindow)&&l(),te(n)}}function je(t,e,i){t.classList[i?"add":"remove"](e)}function Wh(t,e,{bubbles:i=!1,cancelable:n=!1}={}){const a=document.createEvent("CustomEvent");return a.initCustomEvent(t,i,n,e),a}const wa=new Map;let Pa=0;function jh(t){let e=5381,i=t.length;for(;i--;)e=(e<<5)-e^t.charCodeAt(i);return e>>>0}function Gh(t,e){const i={stylesheet:Mh(e),rules:{}};return wa.set(t,i),i}function Pu(t,e,i,n,a,l,g,p=0){const _=16.666/n;let k=`{
|
|
3
3
|
`;for(let W=0;W<=1;W+=_){const ue=e+(i-e)*l(W);k+=W*100+`%{${g(ue,1-ue)}}
|
|
4
4
|
`}const T=k+`100% {${g(i,1-i)}}
|
|
5
|
-
}`,C=`__svelte_${jh(T)}_${p}`,U=wu(t),{stylesheet:V,rules:N}=wa.get(U)||Gh(U,t);N[C]||(N[C]=!0,V.insertRule(`@keyframes ${C} ${T}`,V.cssRules.length));const Q=t.style.animation||"";return t.style.animation=`${Q?`${Q}, `:""}${C} ${n}ms linear ${a}ms 1 both`,Pa+=1,C}function zh(t,e){const i=(t.style.animation||"").split(", "),n=i.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),a=i.length-n.length;a&&(t.style.animation=n.join(", "),Pa-=a,Pa||Hh())}function Hh(){Aa(()=>{Pa||(wa.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&te(e)}),wa.clear())})}let Hs;function Ks(t){Hs=t}function Cu(){if(!Hs)throw new Error("Function called outside component initialization");return Hs}function Ko(t){Cu().$$.on_mount.push(t)}function Kh(t){Cu().$$.on_destroy.push(t)}const ys=[],Ne=[];let bs=[];const Yo=[],Lu=Promise.resolve();let qo=!1;function Iu(){qo||(qo=!0,Lu.then(w))}function Ru(){return Iu(),Lu}function Wt(t){bs.push(t)}function Xe(t){Yo.push(t)}const Xo=new Set;let Ss=0;function w(){if(Ss!==0)return;const t=Hs;do{try{for(;Ss<ys.length;){const e=ys[Ss];Ss++,Ks(e),Yh(e.$$)}}catch(e){throw ys.length=0,Ss=0,e}for(Ks(null),ys.length=0,Ss=0;Ne.length;)Ne.pop()();for(let e=0;e<bs.length;e+=1){const i=bs[e];Xo.has(i)||(Xo.add(i),i())}bs.length=0}while(ys.length);for(;Yo.length;)Yo.pop()();qo=!1,Xo.clear(),Ks(t)}function Yh(t){if(t.fragment!==null){t.update(),Mt(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Wt)}}function qh(t){const e=[],i=[];bs.forEach(n=>t.indexOf(n)===-1?e.push(n):i.push(n)),i.forEach(n=>n()),bs=e}let Ys;function Xh(){return Ys||(Ys=Promise.resolve(),Ys.then(()=>{Ys=null})),Ys}function Zo(t,e,i){t.dispatchEvent(Wh(`${e?"intro":"outro"}${i}`))}const Ca=new Set;let on;function Lt(){on={r:0,c:[],p:on}}function It(){on.r||Mt(on.c),on=on.p}function J(t,e){t&&t.i&&(Ca.delete(t),t.i(e))}function ae(t,e,i,n){if(t&&t.o){if(Ca.has(t))return;Ca.add(t),on.c.push(()=>{Ca.delete(t),n&&(i&&t.d(1),n())}),t.o(e)}else n&&n()}const Zh={duration:0};function Du(t,e,i,n){const a={direction:"both"};let l=e(t,i,a),g=n?0:1,p=null,_=null,k=null;function T(){k&&zh(t,k)}function C(V,N){const Q=V.b-g;return N*=Math.abs(Q),{a:g,b:V.b,d:Q,duration:N,start:V.start,end:V.start+N,group:V.group}}function U(V){const{delay:N=0,duration:Q=300,easing:W=gt,tick:ue=oe,css:ie}=l||Zh,be={start:Dh()+N,b:V};V||(be.group=on,on.r+=1),p||_?_=be:(ie&&(T(),k=Pu(t,g,V,Q,N,W,ie)),V&&ue(0,1),p=C(be,Q),Wt(()=>Zo(t,V,"start")),Oh(Se=>{if(_&&Se>_.start&&(p=C(_,Q),_=null,Zo(t,p.b,"start"),ie&&(T(),k=Pu(t,g,p.b,p.duration,0,W,l.css))),p){if(Se>=p.end)ue(g=p.b,1-g),Zo(t,p.b,"end"),_||(p.b?T():--p.group.r||Mt(p.group.c)),p=null;else if(Se>=p.start){const fe=Se-p.start;g=p.a+p.d*W(fe/p.duration),ue(g,1-g)}}return!!(p||_)}))}return{run(V){Cn(l)?Xh().then(()=>{l=l(a),U(V)}):U(V)},end(){T(),p=_=null}}}function Jh(t,e){ae(t,1,1,()=>{e.delete(t.key)})}function Qh(t,e,i,n,a,l,g,p,_,k,T,C){let U=t.length,V=l.length,N=U;const Q={};for(;N--;)Q[t[N].key]=N;const W=[],ue=new Map,ie=new Map,be=[];for(N=V;N--;){const Z=C(a,l,N),L=i(Z);let le=g.get(L);le?n&&be.push(()=>le.p(Z,e)):(le=k(L,Z),le.c()),ue.set(L,W[N]=le),L in Q&&ie.set(L,Math.abs(N-Q[L]))}const Se=new Set,fe=new Set;function pe(Z){J(Z,1),Z.m(p,T),g.set(Z.key,Z),T=Z.first,V--}for(;U&&V;){const Z=W[V-1],L=t[U-1],le=Z.key,z=L.key;Z===L?(T=Z.first,U--,V--):ue.has(z)?!g.has(le)||Se.has(le)?pe(Z):fe.has(z)?U--:ie.get(le)>ie.get(z)?(fe.add(le),pe(Z)):(Se.add(z),U--):(_(L,g),U--)}for(;U--;){const Z=t[U];ue.has(Z.key)||_(Z,g)}for(;V;)pe(W[V-1]);return Mt(be),W}function Ze(t,e,i){const n=t.$$.props[e];n!==void 0&&(t.$$.bound[n]=i,i(t.$$.ctx[n]))}function He(t){t&&t.c()}function Ge(t,e,i,n){const{fragment:a,after_update:l}=t.$$;a&&a.m(e,i),n||Wt(()=>{const g=t.$$.on_mount.map(Bi).filter(Cn);t.$$.on_destroy?t.$$.on_destroy.push(...g):Mt(g),t.$$.on_mount=[]}),l.forEach(Wt)}function ze(t,e){const i=t.$$;i.fragment!==null&&(qh(i.after_update),Mt(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function $h(t,e){t.$$.dirty[0]===-1&&(ys.push(t),Iu(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function et(t,e,i,n,a,l,g,p=[-1]){const _=Hs;Ks(t);const k=t.$$={fragment:null,ctx:[],props:l,update:oe,not_equal:a,bound:zs(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(_?_.$$.context:[])),callbacks:zs(),dirty:p,skip_bound:!1,root:e.target||_.$$.root};g&&g(k.root);let T=!1;if(k.ctx=i?i(t,e.props||{},(C,U,...V)=>{const N=V.length?V[0]:U;return k.ctx&&a(k.ctx[C],k.ctx[C]=N)&&(!k.skip_bound&&k.bound[C]&&k.bound[C](N),T&&$h(t,C)),U}):[],k.update(),T=!0,Mt(k.before_update),k.fragment=n?n(k.ctx):!1,e.target){if(e.hydrate){const C=Fh(e.target);k.fragment&&k.fragment.l(C),C.forEach(te)}else k.fragment&&k.fragment.c();e.intro&&J(t.$$.fragment),Ge(t,e.target,e.anchor,e.customElement),w()}Ks(_)}class tt{$destroy(){ze(this,1),this.$destroy=oe}$on(e,i){if(!Cn(i))return oe;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(i),()=>{const a=n.indexOf(i);a!==-1&&n.splice(a,1)}}$set(e){this.$$set&&!Rh(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const eg="@beyondwords/player",Jo="0.0.0-
|
|
5
|
+
}`,C=`__svelte_${jh(T)}_${p}`,U=wu(t),{stylesheet:V,rules:N}=wa.get(U)||Gh(U,t);N[C]||(N[C]=!0,V.insertRule(`@keyframes ${C} ${T}`,V.cssRules.length));const Q=t.style.animation||"";return t.style.animation=`${Q?`${Q}, `:""}${C} ${n}ms linear ${a}ms 1 both`,Pa+=1,C}function zh(t,e){const i=(t.style.animation||"").split(", "),n=i.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),a=i.length-n.length;a&&(t.style.animation=n.join(", "),Pa-=a,Pa||Hh())}function Hh(){Aa(()=>{Pa||(wa.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&te(e)}),wa.clear())})}let Hs;function Ks(t){Hs=t}function Cu(){if(!Hs)throw new Error("Function called outside component initialization");return Hs}function Ko(t){Cu().$$.on_mount.push(t)}function Kh(t){Cu().$$.on_destroy.push(t)}const ys=[],Ne=[];let bs=[];const Yo=[],Lu=Promise.resolve();let qo=!1;function Iu(){qo||(qo=!0,Lu.then(w))}function Ru(){return Iu(),Lu}function Wt(t){bs.push(t)}function Xe(t){Yo.push(t)}const Xo=new Set;let Ss=0;function w(){if(Ss!==0)return;const t=Hs;do{try{for(;Ss<ys.length;){const e=ys[Ss];Ss++,Ks(e),Yh(e.$$)}}catch(e){throw ys.length=0,Ss=0,e}for(Ks(null),ys.length=0,Ss=0;Ne.length;)Ne.pop()();for(let e=0;e<bs.length;e+=1){const i=bs[e];Xo.has(i)||(Xo.add(i),i())}bs.length=0}while(ys.length);for(;Yo.length;)Yo.pop()();qo=!1,Xo.clear(),Ks(t)}function Yh(t){if(t.fragment!==null){t.update(),Mt(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Wt)}}function qh(t){const e=[],i=[];bs.forEach(n=>t.indexOf(n)===-1?e.push(n):i.push(n)),i.forEach(n=>n()),bs=e}let Ys;function Xh(){return Ys||(Ys=Promise.resolve(),Ys.then(()=>{Ys=null})),Ys}function Zo(t,e,i){t.dispatchEvent(Wh(`${e?"intro":"outro"}${i}`))}const Ca=new Set;let on;function Lt(){on={r:0,c:[],p:on}}function It(){on.r||Mt(on.c),on=on.p}function J(t,e){t&&t.i&&(Ca.delete(t),t.i(e))}function ae(t,e,i,n){if(t&&t.o){if(Ca.has(t))return;Ca.add(t),on.c.push(()=>{Ca.delete(t),n&&(i&&t.d(1),n())}),t.o(e)}else n&&n()}const Zh={duration:0};function Du(t,e,i,n){const a={direction:"both"};let l=e(t,i,a),g=n?0:1,p=null,_=null,k=null;function T(){k&&zh(t,k)}function C(V,N){const Q=V.b-g;return N*=Math.abs(Q),{a:g,b:V.b,d:Q,duration:N,start:V.start,end:V.start+N,group:V.group}}function U(V){const{delay:N=0,duration:Q=300,easing:W=gt,tick:ue=oe,css:ie}=l||Zh,be={start:Dh()+N,b:V};V||(be.group=on,on.r+=1),p||_?_=be:(ie&&(T(),k=Pu(t,g,V,Q,N,W,ie)),V&&ue(0,1),p=C(be,Q),Wt(()=>Zo(t,V,"start")),Oh(Se=>{if(_&&Se>_.start&&(p=C(_,Q),_=null,Zo(t,p.b,"start"),ie&&(T(),k=Pu(t,g,p.b,p.duration,0,W,l.css))),p){if(Se>=p.end)ue(g=p.b,1-g),Zo(t,p.b,"end"),_||(p.b?T():--p.group.r||Mt(p.group.c)),p=null;else if(Se>=p.start){const fe=Se-p.start;g=p.a+p.d*W(fe/p.duration),ue(g,1-g)}}return!!(p||_)}))}return{run(V){Cn(l)?Xh().then(()=>{l=l(a),U(V)}):U(V)},end(){T(),p=_=null}}}function Jh(t,e){ae(t,1,1,()=>{e.delete(t.key)})}function Qh(t,e,i,n,a,l,g,p,_,k,T,C){let U=t.length,V=l.length,N=U;const Q={};for(;N--;)Q[t[N].key]=N;const W=[],ue=new Map,ie=new Map,be=[];for(N=V;N--;){const Z=C(a,l,N),L=i(Z);let le=g.get(L);le?n&&be.push(()=>le.p(Z,e)):(le=k(L,Z),le.c()),ue.set(L,W[N]=le),L in Q&&ie.set(L,Math.abs(N-Q[L]))}const Se=new Set,fe=new Set;function pe(Z){J(Z,1),Z.m(p,T),g.set(Z.key,Z),T=Z.first,V--}for(;U&&V;){const Z=W[V-1],L=t[U-1],le=Z.key,z=L.key;Z===L?(T=Z.first,U--,V--):ue.has(z)?!g.has(le)||Se.has(le)?pe(Z):fe.has(z)?U--:ie.get(le)>ie.get(z)?(fe.add(le),pe(Z)):(Se.add(z),U--):(_(L,g),U--)}for(;U--;){const Z=t[U];ue.has(Z.key)||_(Z,g)}for(;V;)pe(W[V-1]);return Mt(be),W}function Ze(t,e,i){const n=t.$$.props[e];n!==void 0&&(t.$$.bound[n]=i,i(t.$$.ctx[n]))}function He(t){t&&t.c()}function Ge(t,e,i,n){const{fragment:a,after_update:l}=t.$$;a&&a.m(e,i),n||Wt(()=>{const g=t.$$.on_mount.map(Bi).filter(Cn);t.$$.on_destroy?t.$$.on_destroy.push(...g):Mt(g),t.$$.on_mount=[]}),l.forEach(Wt)}function ze(t,e){const i=t.$$;i.fragment!==null&&(qh(i.after_update),Mt(i.on_destroy),i.fragment&&i.fragment.d(e),i.on_destroy=i.fragment=null,i.ctx=[])}function $h(t,e){t.$$.dirty[0]===-1&&(ys.push(t),Iu(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function et(t,e,i,n,a,l,g,p=[-1]){const _=Hs;Ks(t);const k=t.$$={fragment:null,ctx:[],props:l,update:oe,not_equal:a,bound:zs(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(_?_.$$.context:[])),callbacks:zs(),dirty:p,skip_bound:!1,root:e.target||_.$$.root};g&&g(k.root);let T=!1;if(k.ctx=i?i(t,e.props||{},(C,U,...V)=>{const N=V.length?V[0]:U;return k.ctx&&a(k.ctx[C],k.ctx[C]=N)&&(!k.skip_bound&&k.bound[C]&&k.bound[C](N),T&&$h(t,C)),U}):[],k.update(),T=!0,Mt(k.before_update),k.fragment=n?n(k.ctx):!1,e.target){if(e.hydrate){const C=Fh(e.target);k.fragment&&k.fragment.l(C),C.forEach(te)}else k.fragment&&k.fragment.c();e.intro&&J(t.$$.fragment),Ge(t,e.target,e.anchor,e.customElement),w()}Ks(_)}class tt{$destroy(){ze(this,1),this.$destroy=oe}$on(e,i){if(!Cn(i))return oe;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(i),()=>{const a=n.indexOf(i);a!==-1&&n.splice(a,1)}}$set(e){this.$$set&&!Rh(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const eg="@beyondwords/player",Jo="0.0.0-beta40",rr=(t,e)=>{t=[t].flat().join(`
|
|
6
6
|
`);let i=`${eg}:
|
|
7
7
|
|
|
8
8
|
${t}`;if(e){i+=`
|
|
@@ -10,22 +10,22 @@ This context may be helpful:
|
|
|
10
10
|
|
|
11
11
|
`;for(const[n,a]of Object.entries(e))i+=` - ${n}: ${JSON.stringify(a)}
|
|
12
12
|
`}else i+=`
|
|
13
|
-
`;throw new Error(i)};let La;const tg=new Uint8Array(16);function ig(){if(!La&&(La=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!La))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return La(tg)}const rg=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function qs(t){return typeof t=="string"&&rg.test(t)}const Ni=[];for(let t=0;t<256;++t)Ni.push((t+256).toString(16).slice(1));function ng(t,e=0){return(Ni[t[e+0]]+Ni[t[e+1]]+Ni[t[e+2]]+Ni[t[e+3]]+"-"+Ni[t[e+4]]+Ni[t[e+5]]+"-"+Ni[t[e+6]]+Ni[t[e+7]]+"-"+Ni[t[e+8]]+Ni[t[e+9]]+"-"+Ni[t[e+10]]+Ni[t[e+11]]+Ni[t[e+12]]+Ni[t[e+13]]+Ni[t[e+14]]+Ni[t[e+15]]).toLowerCase()}const Ou={randomUUID:typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ia(t,e,i){if(Ou.randomUUID&&!e&&!t)return Ou.randomUUID();t=t||{};const n=t.random||(t.rng||ig)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){i=i||0;for(let a=0;a<16;++a)e[i+a]=n[a];return e}return ng(n)}const Qo=["user","media","browser","media-session-api","google-ima-sdk","websocket"],Bu=["inline-player","bottom-widget","segment","segment-widget"],sg=["handled","ignored-due-to-advert","ignored-due-to-scrubbing"],ag=["load","play","play_progress","ad_link_click"],og=["phone","tablet","desktop"],lg=["content","ad"],ug=t=>{vt(t,"type",e=>$o(e)),vt(t,"description",e=>e.length>0),vt(t,"initiatedBy",e=>Qo.includes(e))},cg=t=>{vt(t,"type",e=>$o(e)),vt(t,"description",e=>e.length>0),vt(t,"initiatedBy",e=>Qo.includes(e)),vt(t,"emittedFrom",e=>Bu.includes(e)),vt(t,"id",e=>qs(e)),vt(t,"createdAt",e=>el(e)),vt(t,"status",e=>e==="pending")},dg=t=>{vt(t,"type",e=>$o(e)),vt(t,"description",e=>e.length>0),vt(t,"initiatedBy",e=>Qo.includes(e)),vt(t,"emittedFrom",e=>Bu.includes(e)),vt(t,"id",e=>qs(e)),vt(t,"createdAt",e=>el(e)),vt(t,"status",e=>sg.includes(e)),vt(t,"changedProps",e=>typeof e=="object"),vt(t,"processedAt",e=>el(e))},fg=t=>{vt(t,"event_type",e=>ag.includes(e)),vt(t,"device_type",e=>og.includes(e)),vt(t,"media_type",e=>lg.includes(e)),vt(t,"content_id",e=>!e||qs(e)),vt(t,"project_id",e=>!e||e>0),vt(t,"analytics_id",e=>!e||e>0),vt(t,"ad_id",e=>!e||e>0),vt(t,"media_id",e=>!e||e>0),vt(t,"local_storage_id",e=>!e||qs(e)),vt(t,"listen_session_id",e=>!e||qs(e)),vt(t,"session_created_at",e=>e>=0),vt(t,"duration",e=>e>=0),vt(t,"listen_length_percent",e=>e>=0&&e<=100),vt(t,"listen_length_seconds",e=>e>=0),vt(t,"speed",e=>e>=0),vt(t,"location",e=>e.length>0),vt(t,"referrer",e=>typeof e=="string"),vt(t,"player_version",e=>e.length>0),vt(t,"player_npm_version",e=>e.length>0)},$o=t=>{t=t||"<invalid>";const e=t[0]===t[0].toUpperCase(),i=t.match(/[^a-zA-Z]/);return e&&!i},el=t=>{try{return new Date(Date.parse(t)).toISOString()===t}catch(e){return!1}},vt=(t,e,i)=>{Object.prototype.hasOwnProperty.call(t,e)||rr(`Invalid event: missing a '${e}' property`,t),i(t[e])||rr(`Invalid event: '${e}: ${t[e]}' is invalid`,t)},qe=t=>{ug(t);const e=Ia(),i=new Date().toISOString();return de({id:e,createdAt:i,status:"pending"},t)},hg=(t,e={})=>{let i;try{i=new URL(t)}catch(a){return t}const n=new URLSearchParams(i.search);for(const[a,l]of Object.entries(e))n.set(a,l);return i.search=n.toString(),i.toString()},gg=(t,e)=>{const i=window.location.hostname==="localhost",n={};return n.vad_type="linear",n.npa=t!=="personalized"?1:0,n.tfua=t==="under-the-age-of-consent"?1:0,n.ad_type=e?"audio_video":"audio",i&&(n.url||(n.url="https://googleads.github.io")),i&&(n.description_url||(n.description_url="https://googleads.github.io")),i||(n.description_url=window.location.href),n},Mu=t=>{if(!t)return!1;const e=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth,{top:n,bottom:a,left:l,right:g}=t.getBoundingClientRect();return n<e&&a>0&&l<i&&g>0},Nu=(t,e,i)=>rt(t,e,e==="style"?mg(i):i),vg=/;(?!([^()]*\([^()]*\))*[^()]*\))/,mg=t=>t.split(vg).map(e=>e+" !important").join(";"),{document:pg}=Bh;function _g(t){let e,i,n,a,l,g;return{c(){e=F("script"),n=Ce(),a=F("div"),Rr(e.src,i="https://imasdk.googleapis.com/js/sdkloader/ima3.js")||Nu(e,"src",i),Nu(a,"class","vast-container")},m(p,_){I(pg.head,e),se(p,n,_),se(p,a,_),t[12](a),l||(g=[ge(e,"load",t[1]),ge(e,"error",t[2])],l=!0)},p:oe,i:oe,o:oe,d(p){te(e),p&&te(n),p&&te(a),t[12](null),l=!1,Mt(g)}}}function yg(t,e,i){let n,a,{vastUrl:l}=e,{advertConsent:g}=e,{video:p}=e,{playbackState:_}=e,{duration:k}=e,{currentTime:T}=e,{onEvent:C=()=>{}}=e,U,V,N,Q,W,ue,ie;const be=()=>{V=new google.ima.AdDisplayContainer(U,p),N=new google.ima.AdsLoader(V),N.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,Se,!1),N.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,z,!1),Q=new google.ima.AdsRequest,Q.adTagUrl=a,Q.linearAdSlotWidth=p.clientWidth,Q.linearAdSlotHeight=p.clientHeight,N.requestAds(Q)},Se=X=>{i(10,W=X.getAdsManager(p)),W.addEventListener(google.ima.AdEvent.Type.AD_PROGRESS,pe),W.addEventListener(google.ima.AdEvent.Type.CLICK,Z),W.addEventListener(google.ima.AdEvent.Type.PAUSED,L),W.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,le),W.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,z)},fe=()=>{if(!ue){ue=!0,p.pause(),p.load(),V.initialize();try{W.init(p.clientWidth,p.clientHeight,google.ima.ViewMode.NORMAL),W.start(),Ie(),Ee()}catch(X){z(null,X)}}},pe=X=>{ie=X.getAdData(),ie.updatedAt=Date.now(),C(qe({type:"CurrentTimeUpdated",description:"The media's current time was updated.",initiatedBy:"media"})),k!==ie.duration&&(i(4,k=ie.duration),C(qe({type:"DurationUpdated",description:"The media's duration was updated.",initiatedBy:"google-ima-sdk"})))},Z=()=>{C(qe({type:"PressedAdvertVideo",description:"The video background was pressed to open the advert in a new tab.",initiatedBy:"user"}))},L=()=>{_!=="paused"&&(i(3,_="paused"),C(qe({type:"PlaybackPaused",description:"The media became paused at its current playback time.",initiatedBy:"google-ima-sdk"})))},le=()=>{C(qe({type:"PlaybackEnded",description:"The media finished playing because it reached the end.",initiatedBy:"google-ima-sdk"}))},z=(X,B)=>{B=B||X.getError(),W==null||W.destroy(),C(qe({type:"PlaybackErrored",description:"The media failed to play.",initiatedBy:"google-ima-sdk",mediaType:"VAST",mediaUrl:a,errorMessage:`${B.getMessage()} (code=${B.getErrorCode()})`}))},Ke=()=>{C(qe({type:"PlaybackErrored",description:"The media failed to play.",initiatedBy:"browser",mediaType:"VAST",mediaUrl:a,errorMessage:"The ima3.js script was blocked."}))},Ie=()=>{const X=document.createTreeWalker(U);let B;for(;B=X.nextNode();){const Ue=/;(?!([^()]*\([^()]*\))*[^()]*\))/,q=B.style.cssText.split(Ue).filter(ve=>ve).map(ve=>ve.includes("!important")?ve:`${ve} !important`);B.style.cssText=q.join(";")}},Ee=()=>{U&&(i(5,T=ke()),W.resize(p.clientWidth,p.clientHeight,google.ima.ViewMode.NORMAL),requestAnimationFrame(Ee))},ke=()=>{if(!ie)return 0;if(_==="playing"){const X=(Date.now()-ie.updatedAt)/1e3;return ie.currentTime+X}else return ie.updatedAt=Date.now(),T};function G(X){Ne[X?"unshift":"push"](()=>{U=X,i(0,U)})}return t.$$set=X=>{"vastUrl"in X&&i(6,l=X.vastUrl),"advertConsent"in X&&i(7,g=X.advertConsent),"video"in X&&i(8,p=X.video),"playbackState"in X&&i(3,_=X.playbackState),"duration"in X&&i(4,k=X.duration),"currentTime"in X&&i(5,T=X.currentTime),"onEvent"in X&&i(9,C=X.onEvent)},t.$$.update=()=>{t.$$.dirty&384&&i(11,n=gg(g,Mu(p))),t.$$.dirty&2112&&(a=hg(l,n)),t.$$.dirty&1032&&W&&_==="playing"&&fe(),t.$$.dirty&1032&&(_==="playing"?W==null||W.resume():W==null||W.pause())},[U,be,Ke,_,k,T,l,g,p,C,W,n,G]}class bg extends tt{constructor(e){super(),et(this,e,yg,_g,Ye,{vastUrl:6,advertConsent:7,video:8,playbackState:3,duration:4,currentTime:5,onEvent:9})}get vastUrl(){return this.$$.ctx[6]}set vastUrl(e){this.$$set({vastUrl:e}),w()}get advertConsent(){return this.$$.ctx[7]}set advertConsent(e){this.$$set({advertConsent:e}),w()}get video(){return this.$$.ctx[8]}set video(e){this.$$set({video:e}),w()}get playbackState(){return this.$$.ctx[3]}set playbackState(e){this.$$set({playbackState:e}),w()}get duration(){return this.$$.ctx[4]}set duration(e){this.$$set({duration:e}),w()}get currentTime(){return this.$$.ctx[5]}set currentTime(e){this.$$set({currentTime:e}),w()}get onEvent(){return this.$$.ctx[9]}set onEvent(e){this.$$set({onEvent:e}),w()}}const Sg=(t,e)=>{if(!t)return[];const i=t.audio||[],n=t.video||[];return Mu(e)?[...n,...i]:[...i,...n]};function kg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fu={exports:{}};(function(t,e){(function i(n){(function(a,l){t.exports=l()})(this,function(){function a(d,c){var u=Object.keys(d);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(d);c&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(d,s).enumerable})),u.push.apply(u,r)}return u}function l(d){for(var c=1;c<arguments.length;c++){var u=arguments[c]!=null?arguments[c]:{};c%2?a(Object(u),!0).forEach(function(r){_(d,r,u[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(u)):a(Object(u)).forEach(function(r){Object.defineProperty(d,r,Object.getOwnPropertyDescriptor(u,r))})}return d}function g(d,c){for(var u=0;u<c.length;u++){var r=c[u];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(d,be(r.key),r)}}function p(d,c,u){return c&&g(d.prototype,c),u&&g(d,u),Object.defineProperty(d,"prototype",{writable:!1}),d}function _(d,c,u){return c=be(c),c in d?Object.defineProperty(d,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):d[c]=u,d}function k(){return k=Object.assign?Object.assign.bind():function(d){for(var c=1;c<arguments.length;c++){var u=arguments[c];for(var r in u)Object.prototype.hasOwnProperty.call(u,r)&&(d[r]=u[r])}return d},k.apply(this,arguments)}function T(d,c){d.prototype=Object.create(c.prototype),d.prototype.constructor=d,U(d,c)}function C(d){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(u){return u.__proto__||Object.getPrototypeOf(u)},C(d)}function U(d,c){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},U(d,c)}function V(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(d){return!1}}function N(d,c,u){return V()?N=Reflect.construct.bind():N=function(s,o,f){var h=[null];h.push.apply(h,o);var v=Function.bind.apply(s,h),m=new v;return f&&U(m,f.prototype),m},N.apply(null,arguments)}function Q(d){return Function.toString.call(d).indexOf("[native code]")!==-1}function W(d){var c=typeof Map=="function"?new Map:void 0;return W=function(r){if(r===null||!Q(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof c!="undefined"){if(c.has(r))return c.get(r);c.set(r,s)}function s(){return N(r,arguments,C(this).constructor)}return s.prototype=Object.create(r.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),U(s,r)},W(d)}function ue(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function ie(d,c){if(typeof d!="object"||d===null)return d;var u=d[Symbol.toPrimitive];if(u!==void 0){var r=u.call(d,c||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(d)}function be(d){var c=ie(d,"string");return typeof c=="symbol"?c:String(c)}function Se(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}var fe={exports:{}};(function(d,c){(function(u){var r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,s=/^(?=([^\/?#]*))\1([^]*)$/,o=/(?:\/|^)\.(?=\/)/g,f=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,h={buildAbsoluteURL:function(v,m,y){if(y=y||{},v=v.trim(),m=m.trim(),!m){if(!y.alwaysNormalize)return v;var b=h.parseURL(v);if(!b)throw new Error("Error trying to parse base URL.");return b.path=h.normalizePath(b.path),h.buildURLFromParts(b)}var S=h.parseURL(m);if(!S)throw new Error("Error trying to parse relative URL.");if(S.scheme)return y.alwaysNormalize?(S.path=h.normalizePath(S.path),h.buildURLFromParts(S)):m;var E=h.parseURL(v);if(!E)throw new Error("Error trying to parse base URL.");if(!E.netLoc&&E.path&&E.path[0]!=="/"){var A=s.exec(E.path);E.netLoc=A[1],E.path=A[2]}E.netLoc&&!E.path&&(E.path="/");var x={scheme:E.scheme,netLoc:S.netLoc,path:null,params:S.params,query:S.query,fragment:S.fragment};if(!S.netLoc&&(x.netLoc=E.netLoc,S.path[0]!=="/"))if(!S.path)x.path=E.path,S.params||(x.params=E.params,S.query||(x.query=E.query));else{var P=E.path,O=P.substring(0,P.lastIndexOf("/")+1)+S.path;x.path=h.normalizePath(O)}return x.path===null&&(x.path=y.alwaysNormalize?h.normalizePath(S.path):S.path),h.buildURLFromParts(x)},parseURL:function(v){var m=r.exec(v);return m?{scheme:m[1]||"",netLoc:m[2]||"",path:m[3]||"",params:m[4]||"",query:m[5]||"",fragment:m[6]||""}:null},normalizePath:function(v){for(v=v.split("").reverse().join("").replace(o,"");v.length!==(v=v.replace(f,"")).length;);return v.split("").reverse().join("")},buildURLFromParts:function(v){return v.scheme+v.netLoc+v.path+v.params+v.query+v.fragment}};d.exports=h})()})(fe);var pe=fe.exports,Z=Number.isFinite||function(d){return typeof d=="number"&&isFinite(d)},L=function(d){return d.MEDIA_ATTACHING="hlsMediaAttaching",d.MEDIA_ATTACHED="hlsMediaAttached",d.MEDIA_DETACHING="hlsMediaDetaching",d.MEDIA_DETACHED="hlsMediaDetached",d.BUFFER_RESET="hlsBufferReset",d.BUFFER_CODECS="hlsBufferCodecs",d.BUFFER_CREATED="hlsBufferCreated",d.BUFFER_APPENDING="hlsBufferAppending",d.BUFFER_APPENDED="hlsBufferAppended",d.BUFFER_EOS="hlsBufferEos",d.BUFFER_FLUSHING="hlsBufferFlushing",d.BUFFER_FLUSHED="hlsBufferFlushed",d.MANIFEST_LOADING="hlsManifestLoading",d.MANIFEST_LOADED="hlsManifestLoaded",d.MANIFEST_PARSED="hlsManifestParsed",d.LEVEL_SWITCHING="hlsLevelSwitching",d.LEVEL_SWITCHED="hlsLevelSwitched",d.LEVEL_LOADING="hlsLevelLoading",d.LEVEL_LOADED="hlsLevelLoaded",d.LEVEL_UPDATED="hlsLevelUpdated",d.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",d.LEVELS_UPDATED="hlsLevelsUpdated",d.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",d.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",d.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",d.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",d.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",d.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",d.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",d.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",d.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",d.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",d.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",d.CUES_PARSED="hlsCuesParsed",d.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",d.INIT_PTS_FOUND="hlsInitPtsFound",d.FRAG_LOADING="hlsFragLoading",d.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",d.FRAG_LOADED="hlsFragLoaded",d.FRAG_DECRYPTED="hlsFragDecrypted",d.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",d.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",d.FRAG_PARSING_METADATA="hlsFragParsingMetadata",d.FRAG_PARSED="hlsFragParsed",d.FRAG_BUFFERED="hlsFragBuffered",d.FRAG_CHANGED="hlsFragChanged",d.FPS_DROP="hlsFpsDrop",d.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",d.ERROR="hlsError",d.DESTROYING="hlsDestroying",d.KEY_LOADING="hlsKeyLoading",d.KEY_LOADED="hlsKeyLoaded",d.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",d.BACK_BUFFER_REACHED="hlsBackBufferReached",d}({}),le=function(d){return d.NETWORK_ERROR="networkError",d.MEDIA_ERROR="mediaError",d.KEY_SYSTEM_ERROR="keySystemError",d.MUX_ERROR="muxError",d.OTHER_ERROR="otherError",d}({}),z=function(d){return d.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",d.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",d.KEY_SYSTEM_NO_SESSION="keySystemNoSession",d.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",d.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",d.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",d.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",d.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",d.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",d.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",d.MANIFEST_LOAD_ERROR="manifestLoadError",d.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",d.MANIFEST_PARSING_ERROR="manifestParsingError",d.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",d.LEVEL_EMPTY_ERROR="levelEmptyError",d.LEVEL_LOAD_ERROR="levelLoadError",d.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",d.LEVEL_PARSING_ERROR="levelParsingError",d.LEVEL_SWITCH_ERROR="levelSwitchError",d.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",d.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",d.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",d.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",d.FRAG_LOAD_ERROR="fragLoadError",d.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",d.FRAG_DECRYPT_ERROR="fragDecryptError",d.FRAG_PARSING_ERROR="fragParsingError",d.FRAG_GAP="fragGap",d.REMUX_ALLOC_ERROR="remuxAllocError",d.KEY_LOAD_ERROR="keyLoadError",d.KEY_LOAD_TIMEOUT="keyLoadTimeOut",d.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",d.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",d.BUFFER_APPEND_ERROR="bufferAppendError",d.BUFFER_APPENDING_ERROR="bufferAppendingError",d.BUFFER_STALLED_ERROR="bufferStalledError",d.BUFFER_FULL_ERROR="bufferFullError",d.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",d.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",d.INTERNAL_EXCEPTION="internalException",d.INTERNAL_ABORTED="aborted",d.UNKNOWN="unknown",d}({}),Ke=function(){},Ie={trace:Ke,debug:Ke,log:Ke,warn:Ke,info:Ke,error:Ke},Ee=Ie;function ke(d){var c=self.console[d];return c?c.bind(self.console,"["+d+"] >"):Ke}function G(d){for(var c=arguments.length,u=new Array(c>1?c-1:0),r=1;r<c;r++)u[r-1]=arguments[r];u.forEach(function(s){Ee[s]=d[s]?d[s].bind(d):ke(s)})}function X(d,c){if(self.console&&d===!0||typeof d=="object"){G(d,"debug","log","info","warn","error");try{Ee.log('Debug logs enabled for "'+c+'" in hls.js version 1.4.8')}catch(u){Ee=Ie}}else Ee=Ie}var B=Ee,Ue=/^(\d+)x(\d+)$/,De=/(.+?)=(".*?"|.*?)(?:,|$)/g,q=function(){function d(u){typeof u=="string"&&(u=d.parseAttrList(u));for(var r in u)u.hasOwnProperty(r)&&(r.substring(0,2)==="X-"&&(this.clientAttrs=this.clientAttrs||[],this.clientAttrs.push(r)),this[r]=u[r])}var c=d.prototype;return c.decimalInteger=function(r){var s=parseInt(this[r],10);return s>Number.MAX_SAFE_INTEGER?1/0:s},c.hexadecimalInteger=function(r){if(this[r]){var s=(this[r]||"0x").slice(2);s=(s.length&1?"0":"")+s;for(var o=new Uint8Array(s.length/2),f=0;f<s.length/2;f++)o[f]=parseInt(s.slice(f*2,f*2+2),16);return o}else return null},c.hexadecimalIntegerAsNumber=function(r){var s=parseInt(this[r],16);return s>Number.MAX_SAFE_INTEGER?1/0:s},c.decimalFloatingPoint=function(r){return parseFloat(this[r])},c.optionalFloat=function(r,s){var o=this[r];return o?parseFloat(o):s},c.enumeratedString=function(r){return this[r]},c.bool=function(r){return this[r]==="YES"},c.decimalResolution=function(r){var s=Ue.exec(this[r]);if(s!==null)return{width:parseInt(s[1],10),height:parseInt(s[2],10)}},d.parseAttrList=function(r){var s,o={},f='"';for(De.lastIndex=0;(s=De.exec(r))!==null;){var h=s[2];h.indexOf(f)===0&&h.lastIndexOf(f)===h.length-1&&(h=h.slice(1,-1));var v=s[1].trim();o[v]=h}return o},d}();function ve(d){return d!=="ID"&&d!=="CLASS"&&d!=="START-DATE"&&d!=="DURATION"&&d!=="END-DATE"&&d!=="END-ON-NEXT"}function at(d){return d==="SCTE35-OUT"||d==="SCTE35-IN"}var Qe=function(){function d(c,u){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,u){var r=u.attr;for(var s in r)if(Object.prototype.hasOwnProperty.call(c,s)&&c[s]!==r[s]){B.warn('DATERANGE tag attribute: "'+s+'" does not match for tags with ID: "'+c.ID+'"'),this._badValueForSameId=s;break}c=k(new q({}),r,c)}if(this.attr=c,this._startDate=new Date(c["START-DATE"]),"END-DATE"in this.attr){var o=new Date(this.attr["END-DATE"]);Z(o.getTime())&&(this._endDate=o)}}return p(d,[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){if(this._endDate)return this._endDate;var u=this.duration;return u!==null?new Date(this._startDate.getTime()+u*1e3):null}},{key:"duration",get:function(){if("DURATION"in this.attr){var u=this.attr.decimalFloatingPoint("DURATION");if(Z(u))return u}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}},{key:"endOnNext",get:function(){return this.attr.bool("END-ON-NEXT")}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&Z(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}]),d}(),Et=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}},Oe={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"},Te=function(){function d(u){var r;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(r={},r[Oe.AUDIO]=null,r[Oe.VIDEO]=null,r[Oe.AUDIOVIDEO]=null,r),this.baseurl=u}var c=d.prototype;return c.setByteRange=function(r,s){var o=r.split("@",2),f=[];o.length===1?f[0]=s?s.byteRangeEndOffset:0:f[0]=parseInt(o[1]),f[1]=parseInt(o[0])+f[0],this._byteRange=f},p(d,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=pe.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(r){this._url=r}}]),d}(),it=function(d){T(c,d);function c(r,s){var o;return o=d.call(this,s)||this,o._decryptdata=null,o.rawProgramDateTime=null,o.programDateTime=null,o.tagList=[],o.duration=0,o.sn=0,o.levelkeys=void 0,o.type=void 0,o.loader=null,o.keyLoader=null,o.level=-1,o.cc=0,o.startPTS=void 0,o.endPTS=void 0,o.startDTS=void 0,o.endDTS=void 0,o.start=0,o.deltaPTS=void 0,o.maxStartPTS=void 0,o.minEndPTS=void 0,o.stats=new Et,o.urlId=0,o.data=void 0,o.bitrateTest=!1,o.title=null,o.initSegment=null,o.endList=void 0,o.gap=void 0,o.type=r,o}var u=c.prototype;return u.setKeyFormat=function(s){if(this.levelkeys){var o=this.levelkeys[s];o&&!this._decryptdata&&(this._decryptdata=o.getDecryptData(this.sn))}},u.abortRequests=function(){var s,o;(s=this.loader)==null||s.abort(),(o=this.keyLoader)==null||o.abort()},u.setElementaryStreamInfo=function(s,o,f,h,v,m){m===void 0&&(m=!1);var y=this.elementaryStreams,b=y[s];if(!b){y[s]={startPTS:o,endPTS:f,startDTS:h,endDTS:v,partial:m};return}b.startPTS=Math.min(b.startPTS,o),b.endPTS=Math.max(b.endPTS,f),b.startDTS=Math.min(b.startDTS,h),b.endDTS=Math.max(b.endDTS,v)},u.clearElementaryStreamInfo=function(){var s=this.elementaryStreams;s[Oe.AUDIO]=null,s[Oe.VIDEO]=null,s[Oe.AUDIOVIDEO]=null},p(c,[{key:"decryptdata",get:function(){var s=this.levelkeys;if(!s&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){var o=this.levelkeys.identity;if(o)this._decryptdata=o.getDecryptData(this.sn);else{var f=Object.keys(this.levelkeys);if(f.length===1)return this._decryptdata=this.levelkeys[f[0]].getDecryptData(this.sn)}}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null||!Z(this.programDateTime))return null;var s=Z(this.duration)?this.duration:0;return this.programDateTime+s*1e3}},{key:"encrypted",get:function(){var s;if((s=this._decryptdata)!=null&&s.encrypted)return!0;if(this.levelkeys){var o=Object.keys(this.levelkeys),f=o.length;if(f>1||f===1&&this.levelkeys[o[0]].encrypted)return!0}return!1}}]),c}(Te),xt=function(d){T(c,d);function c(u,r,s,o,f){var h;h=d.call(this,s)||this,h.fragOffset=0,h.duration=0,h.gap=!1,h.independent=!1,h.relurl=void 0,h.fragment=void 0,h.index=void 0,h.stats=new Et,h.duration=u.decimalFloatingPoint("DURATION"),h.gap=u.bool("GAP"),h.independent=u.bool("INDEPENDENT"),h.relurl=u.enumeratedString("URI"),h.fragment=r,h.index=o;var v=u.enumeratedString("BYTERANGE");return v&&h.setByteRange(v,f),f&&(h.fragOffset=f.fragOffset+f.duration),h}return p(c,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var r=this.elementaryStreams;return!!(r.audio||r.video||r.audiovideo)}}]),c}(Te),wt=10,Xt=function(){function d(u){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=u}var c=d.prototype;return c.reloaded=function(r){if(!r){this.advanced=!0,this.updated=!0;return}var s=this.lastPartSn-r.lastPartSn,o=this.lastPartIndex-r.lastPartIndex;this.updated=this.endSN!==r.endSN||!!o||!!s,this.advanced=this.endSN>r.endSN||s>0||s===0&&o>0,this.updated||this.advanced?this.misses=Math.floor(r.misses*.6):this.misses=r.misses+1,this.availabilityDelay=r.availabilityDelay},p(d,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Z(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||wt}},{key:"drift",get:function(){var r=this.driftEndTime-this.driftStartTime;if(r>0){var s=this.driftEnd-this.driftStart;return s*1e3/r}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var r;return(r=this.partList)!=null&&r.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var r;return(r=this.fragments)!=null&&r.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var r;return(r=this.partList)!=null&&r.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var r;return(r=this.partList)!=null&&r.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),d}(),Pt=void 0,Ht=Se(Pt);function yt(d,c,u){return Uint8Array.prototype.slice?d.slice(c,u):new Uint8Array(Array.prototype.slice.call(d,c,u))}var ft=function(c,u){return u+10<=c.length&&c[u]===73&&c[u+1]===68&&c[u+2]===51&&c[u+3]<255&&c[u+4]<255&&c[u+6]<128&&c[u+7]<128&&c[u+8]<128&&c[u+9]<128},Nt=function(c,u){return u+10<=c.length&&c[u]===51&&c[u+1]===68&&c[u+2]===73&&c[u+3]<255&&c[u+4]<255&&c[u+6]<128&&c[u+7]<128&&c[u+8]<128&&c[u+9]<128},mt=function(c,u){for(var r=u,s=0;ft(c,u);){s+=10;var o=bt(c,u+6);s+=o,Nt(c,u+10)&&(s+=10),u+=s}if(s>0)return c.subarray(r,r+s)},bt=function(c,u){var r=0;return r=(c[u]&127)<<21,r|=(c[u+1]&127)<<14,r|=(c[u+2]&127)<<7,r|=c[u+3]&127,r},Zt=function(c,u){return ft(c,u)&&bt(c,u+6)+10<=c.length-u},Rt=function(c){for(var u=ot(c),r=0;r<u.length;r++){var s=u[r];if(Jt(s))return Ot(s)}},Jt=function(c){return c&&c.key==="PRIV"&&c.info==="com.apple.streaming.transportStreamTimestamp"},nt=function(c){var u=String.fromCharCode(c[0],c[1],c[2],c[3]),r=bt(c,4),s=10;return{type:u,size:r,data:c.subarray(s,s+r)}},ot=function(c){for(var u=0,r=[];ft(c,u);){var s=bt(c,u+6);u+=10;for(var o=u+s;u+8<o;){var f=nt(c.subarray(u)),h=li(f);h&&r.push(h),u+=f.size+10}Nt(c,u)&&(u+=10)}return r},li=function(c){return c.type==="PRIV"?Pe(c):c.type[0]==="W"?Ft(c):Dt(c)},Pe=function(c){if(!(c.size<2)){var u=Ut(c.data,!0),r=new Uint8Array(c.data.subarray(u.length+1));return{key:c.type,info:u,data:r.buffer}}},Dt=function(c){if(!(c.size<2)){if(c.type==="TXXX"){var u=1,r=Ut(c.data.subarray(u),!0);u+=r.length+1;var s=Ut(c.data.subarray(u));return{key:c.type,info:r,data:s}}var o=Ut(c.data.subarray(1));return{key:c.type,data:o}}},Ft=function(c){if(c.type==="WXXX"){if(c.size<2)return;var u=1,r=Ut(c.data.subarray(u),!0);u+=r.length+1;var s=Ut(c.data.subarray(u));return{key:c.type,info:r,data:s}}var o=Ut(c.data);return{key:c.type,data:o}},Ot=function(c){if(c.data.byteLength===8){var u=new Uint8Array(c.data),r=u[3]&1,s=(u[4]<<23)+(u[5]<<15)+(u[6]<<7)+u[7];return s/=45,r&&(s+=4772185884e-2),Math.round(s)}},Ut=function(c,u){u===void 0&&(u=!1);var r=ci();if(r){var s=r.decode(c);if(u){var o=s.indexOf("\0");return o!==-1?s.substring(0,o):s}return s.replace(/\0/g,"")}for(var f=c.length,h,v,m,y="",b=0;b<f;){if(h=c[b++],h===0&&u)return y;if(h===0||h===3)continue;switch(h>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:y+=String.fromCharCode(h);break;case 12:case 13:v=c[b++],y+=String.fromCharCode((h&31)<<6|v&63);break;case 14:v=c[b++],m=c[b++],y+=String.fromCharCode((h&15)<<12|(v&63)<<6|(m&63)<<0);break}}return y},jt;function ci(){return!jt&&typeof self.TextDecoder!="undefined"&&(jt=new self.TextDecoder("utf-8")),jt}var Kt={hexDump:function(c){for(var u="",r=0;r<c.length;r++){var s=c[r].toString(16);s.length<2&&(s="0"+s),u+=s}return u}},Yt=Math.pow(2,32)-1,mi=[].push,Vt={video:1,audio:2,id3:3,text:4};function ct(d){return String.fromCharCode.apply(null,d)}function di(d,c){var u=d[c]<<8|d[c+1];return u<0?65536+u:u}function Be(d,c){var u=fi(d,c);return u<0?4294967296+u:u}function fi(d,c){return d[c]<<24|d[c+1]<<16|d[c+2]<<8|d[c+3]}function Qt(d,c,u){d[c]=u>>24,d[c+1]=u>>16&255,d[c+2]=u>>8&255,d[c+3]=u&255}function Je(d,c){var u=[];if(!c.length)return u;for(var r=d.byteLength,s=0;s<r;){var o=Be(d,s),f=ct(d.subarray(s+4,s+8)),h=o>1?s+o:r;if(f===c[0])if(c.length===1)u.push(d.subarray(s+8,h));else{var v=Je(d.subarray(s+8,h),c.slice(1));v.length&&mi.apply(u,v)}s=h}return u}function pi(d){var c=[],u=d[0],r=8,s=Be(d,r);r+=4;var o=0,f=0;u===0?r+=8:r+=16,r+=2;var h=d.length+f,v=di(d,r);r+=2;for(var m=0;m<v;m++){var y=r,b=Be(d,y);y+=4;var S=b&2147483647,E=(b&2147483648)>>>31;if(E===1)return B.warn("SIDX has hierarchical references (not supported)"),null;var A=Be(d,y);y+=4,c.push({referenceSize:S,subsegmentDuration:A,info:{duration:A/s,start:h,end:h+S-1}}),h+=S,y+=4,r=y}return{earliestPresentationTime:o,timescale:s,version:u,referencesCount:v,references:c}}function me(d){for(var c=[],u=Je(d,["moov","trak"]),r=0;r<u.length;r++){var s=u[r],o=Je(s,["tkhd"])[0];if(o){var f=o[0],h=f===0?12:20,v=Be(o,h),m=Je(s,["mdia","mdhd"])[0];if(m){f=m[0],h=f===0?12:20;var y=Be(m,h),b=Je(s,["mdia","hdlr"])[0];if(b){var S=ct(b.subarray(8,12)),E={soun:Oe.AUDIO,vide:Oe.VIDEO}[S];if(E){var A=Je(s,["mdia","minf","stbl","stsd"])[0],x=void 0;A&&(x=ct(A.subarray(12,16))),c[v]={timescale:y,type:E},c[E]={timescale:y,id:v,codec:x}}}}}}var P=Je(d,["moov","mvex","trex"]);return P.forEach(function(O){var M=Be(O,4),D=c[M];D&&(D.default={duration:Be(O,12),flags:Be(O,20)})}),c}function $t(d,c){if(!d||!c)return d;var u=c.keyId;if(u&&c.isCommonEncryption){var r=Je(d,["moov","trak"]);r.forEach(function(s){var o=Je(s,["mdia","minf","stbl","stsd"])[0],f=o.subarray(8),h=Je(f,["enca"]),v=h.length>0;v||(h=Je(f,["encv"])),h.forEach(function(m){var y=v?m.subarray(28):m.subarray(78),b=Je(y,["sinf"]);b.forEach(function(S){var E=hi(S);if(E){var A=E.subarray(8,24);A.some(function(x){return x!==0})||(B.log("[eme] Patching keyId in 'enc"+(v?"a":"v")+">sinf>>tenc' box: "+Kt.hexDump(A)+" -> "+Kt.hexDump(u)),E.set(u,8))}})})})}return d}function hi(d){var c=Je(d,["schm"])[0];if(c){var u=ct(c.subarray(4,8));if(u==="cbcs"||u==="cenc")return Je(d,["schi","tenc"])[0]}return B.error("[eme] missing 'schm' box"),null}function _i(d,c){return Je(c,["moof","traf"]).reduce(function(u,r){var s=Je(r,["tfdt"])[0],o=s[0],f=Je(r,["tfhd"]).reduce(function(h,v){var m=Be(v,4),y=d[m];if(y){var b=Be(s,4);if(o===1){if(b===Yt)return B.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),h;b*=Yt+1,b+=Be(s,8)}var S=y.timescale||9e4,E=b/S;if(isFinite(E)&&(h===null||E<h))return E}return h},null);return f!==null&&isFinite(f)&&(u===null||f<u)?f:u},null)}function wi(d,c){for(var u=0,r=0,s=0,o=Je(d,["moof","traf"]),f=0;f<o.length;f++){var h=o[f],v=Je(h,["tfhd"])[0],m=Be(v,4),y=c[m];if(y){var b=y.default,S=Be(v,0)|(b==null?void 0:b.flags),E=b==null?void 0:b.duration;S&8&&(S&2?E=Be(v,12):E=Be(v,8));for(var A=y.timescale||9e4,x=Je(h,["trun"]),P=0;P<x.length;P++){if(u=yi(x[P]),!u&&E){var O=Be(x[P],4);u=E*O}y.type===Oe.VIDEO?r+=u/A:y.type===Oe.AUDIO&&(s+=u/A)}}}if(r===0&&s===0){for(var M=0,D=Je(d,["sidx"]),j=0;j<D.length;j++){var K=pi(D[j]);K!=null&&K.references&&(M+=K.references.reduce(function(he,re){return he+re.info.duration||0},0))}return M}return r||s}function yi(d){var c=Be(d,0),u=8;c&1&&(u+=4),c&4&&(u+=4);for(var r=0,s=Be(d,4),o=0;o<s;o++){if(c&256){var f=Be(d,u);r+=f,u+=4}c&512&&(u+=4),c&1024&&(u+=4),c&2048&&(u+=4)}return r}function Ei(d,c,u){Je(c,["moof","traf"]).forEach(function(r){Je(r,["tfhd"]).forEach(function(s){var o=Be(s,4),f=d[o];if(f){var h=f.timescale||9e4;Je(r,["tfdt"]).forEach(function(v){var m=v[0],y=Be(v,4);if(m===0)y-=u*h,y=Math.max(y,0),Qt(v,4,y);else{y*=Math.pow(2,32),y+=Be(v,8),y-=u*h,y=Math.max(y,0);var b=Math.floor(y/(Yt+1)),S=Math.floor(y%(Yt+1));Qt(v,4,b),Qt(v,8,S)}})}})})}function Fe(d){var c={valid:null,remainder:null},u=Je(d,["moof"]);if(u){if(u.length<2)return c.remainder=d,c}else return c;var r=u[u.length-1];return c.valid=yt(d,0,r.byteOffset-8),c.remainder=yt(d,r.byteOffset-8),c}function Y(d,c){var u=new Uint8Array(d.length+c.length);return u.set(d),u.set(c,d.length),u}function $(d,c){var u=[],r=c.samples,s=c.timescale,o=c.id,f=!1,h=Je(r,["moof"]);return h.map(function(v){var m=v.byteOffset-8,y=Je(v,["traf"]);y.map(function(b){var S=Je(b,["tfdt"]).map(function(E){var A=E[0],x=Be(E,4);return A===1&&(x*=Math.pow(2,32),x+=Be(E,8)),x/s})[0];return S!==void 0&&(d=S),Je(b,["tfhd"]).map(function(E){var A=Be(E,4),x=Be(E,0)&16777215,P=(x&1)!==0,O=(x&2)!==0,M=(x&8)!==0,D=0,j=(x&16)!==0,K=0,he=(x&32)!==0,re=8;A===o&&(P&&(re+=8),O&&(re+=4),M&&(D=Be(E,re),re+=4),j&&(K=Be(E,re),re+=4),he&&(re+=4),c.type==="video"&&(f=Me(c.codec)),Je(b,["trun"]).map(function(ne){var Ae=ne[0],xe=Be(ne,0)&16777215,we=(xe&1)!==0,Ve=0,dt=(xe&4)!==0,pt=(xe&256)!==0,_t=0,Bt=(xe&512)!==0,St=0,zt=(xe&1024)!==0,Ct=(xe&2048)!==0,ui=0,Vr=Be(ne,4),ri=8;we&&(Ve=Be(ne,ri),ri+=4),dt&&(ri+=4);for(var sr=Ve+m,Xi=0;Xi<Vr;Xi++){if(pt?(_t=Be(ne,ri),ri+=4):_t=D,Bt?(St=Be(ne,ri),ri+=4):St=K,zt&&(ri+=4),Ct&&(Ae===0?ui=Be(ne,ri):ui=fi(ne,ri),ri+=4),c.type===Oe.VIDEO)for(var sn=0;sn<St;){var Tr=Be(r,sr);if(sr+=4,_r(f,r[sr])){var En=r.subarray(sr,sr+Tr);ji(En,f?2:1,d+ui/s,u)}sr+=Tr,sn+=Tr+4}d+=_t/s}}))})})}),u}function Me(d){if(!d)return!1;var c=d.indexOf("."),u=c<0?d:d.substring(0,c);return u==="hvc1"||u==="hev1"||u==="dvh1"||u==="dvhe"}function _r(d,c){if(d){var u=c>>1&63;return u===39||u===40}else{var r=c&31;return r===6}}function ji(d,c,u,r){var s=Qr(d),o=0;o+=c;for(var f=0,h=0,v=!1,m=0;o<s.length;){f=0;do{if(o>=s.length)break;m=s[o++],f+=m}while(m===255);h=0;do{if(o>=s.length)break;m=s[o++],h+=m}while(m===255);var y=s.length-o;if(!v&&f===4&&o<s.length){v=!0;var b=s[o++];if(b===181){var S=di(s,o);if(o+=2,S===49){var E=Be(s,o);if(o+=4,E===1195456820){var A=s[o++];if(A===3){var x=s[o++],P=31&x,O=64&x,M=O?2+P*3:0,D=new Uint8Array(M);if(O){D[0]=x;for(var j=1;j<M;j++)D[j]=s[o++]}r.push({type:A,payloadType:f,pts:u,bytes:D})}}}}}else if(f===5&&h<y){if(v=!0,h>16){for(var K=[],he=0;he<16;he++){var re=s[o++].toString(16);K.push(re.length==1?"0"+re:re),(he===3||he===5||he===7||he===9)&&K.push("-")}for(var ne=h-16,Ae=new Uint8Array(ne),xe=0;xe<ne;xe++)Ae[xe]=s[o++];r.push({payloadType:f,pts:u,uuid:K.join(""),userData:Ut(Ae),userDataBytes:Ae})}}else if(h<y)o+=h;else if(h>y)break}}function Qr(d){for(var c=d.byteLength,u=[],r=1;r<c-2;)d[r]===0&&d[r+1]===0&&d[r+2]===3?(u.push(r+2),r+=2):r++;if(u.length===0)return d;var s=c-u.length,o=new Uint8Array(s),f=0;for(r=0;r<s;f++,r++)f===u[0]&&(f++,u.shift()),o[r]=d[f];return o}function si(d){var c=d[0],u="",r="",s=0,o=0,f=0,h=0,v=0,m=0;if(c===0){for(;ct(d.subarray(m,m+1))!=="\0";)u+=ct(d.subarray(m,m+1)),m+=1;for(u+=ct(d.subarray(m,m+1)),m+=1;ct(d.subarray(m,m+1))!=="\0";)r+=ct(d.subarray(m,m+1)),m+=1;r+=ct(d.subarray(m,m+1)),m+=1,s=Be(d,12),o=Be(d,16),h=Be(d,20),v=Be(d,24),m=28}else if(c===1){m+=4,s=Be(d,m),m+=4;var y=Be(d,m);m+=4;var b=Be(d,m);for(m+=4,f=Math.pow(2,32)*y+b,Number.isSafeInteger(f)||(f=Number.MAX_SAFE_INTEGER,B.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),h=Be(d,m),m+=4,v=Be(d,m),m+=4;ct(d.subarray(m,m+1))!=="\0";)u+=ct(d.subarray(m,m+1)),m+=1;for(u+=ct(d.subarray(m,m+1)),m+=1;ct(d.subarray(m,m+1))!=="\0";)r+=ct(d.subarray(m,m+1)),m+=1;r+=ct(d.subarray(m,m+1)),m+=1}var S=d.subarray(m,d.byteLength);return{schemeIdUri:u,value:r,timeScale:s,presentationTime:f,presentationTimeDelta:o,eventDuration:h,id:v,payload:S}}var yr=function(){d.clearKeyUriToKeyIdMap=function(){};function d(u,r,s,o,f){o===void 0&&(o=[1]),f===void 0&&(f=null),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=u,this.uri=r,this.keyFormat=s,this.keyFormatVersions=o,this.iv=f,this.encrypted=u?u!=="NONE":!1,this.isCommonEncryption=this.encrypted&&u!=="AES-128"}var c=d.prototype;return c.isSupported=function(){if(this.method){if(this.method==="AES-128"||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES"}return!1},c.getDecryptData=function(r){if(!this.encrypted||!this.uri)return null;if(this.method==="AES-128"&&this.uri&&!this.iv){typeof r!="number"&&(this.method==="AES-128"&&!this.iv&&B.warn('missing IV for initialization segment with method="'+this.method+'" - compliance issue'),r=0);var s=Ji(r),o=new d(this.method,this.uri,"identity",this.keyFormatVersions,s);return o}return this},d}();function Ji(d){for(var c=new Uint8Array(16),u=12;u<16;u++)c[u]=d>>8*(15-u)&255;return c}function Qi(){if(typeof self!="undefined")return self.MediaSource||self.WebKitMediaSource}var Gi={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dva1:!0,dvav:!0,dvh1:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}},ur=Qi();function xr(d,c){var u=Gi[c];return!!u&&u[d.slice(0,4)]===!0}function Ii(d,c){var u;return(u=ur==null?void 0:ur.isTypeSupported((c||"video")+'/mp4;codecs="'+d+'"'))!=null?u:!1}var Ri=/#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,cr=/#EXT-X-MEDIA:(.*)/g,wr=/^#EXT(?:INF|-X-TARGETDURATION):/m,zi=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),Si=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("|")),Hi=function(){function d(){}return d.findGroup=function(u,r){for(var s=0;s<u.length;s++){var o=u[s];if(o.id===r)return o}},d.convertAVC1ToAVCOTI=function(u){var r=u.split(".");if(r.length>2){var s=r.shift()+".";return s+=parseInt(r.shift()).toString(16),s+=("000"+parseInt(r.shift()).toString(16)).slice(-4),s}return u},d.resolve=function(u,r){return pe.buildAbsoluteURL(r,u,{alwaysNormalize:!0})},d.isMediaPlaylist=function(u){return wr.test(u)},d.parseMasterPlaylist=function(u,r){var s=!1,o={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:s},f=[];Ri.lastIndex=0;for(var h;(h=Ri.exec(u))!=null;)if(h[1]){var v,m=new q(h[1]),y=h[2],b={attrs:m,bitrate:m.decimalInteger("AVERAGE-BANDWIDTH")||m.decimalInteger("BANDWIDTH"),name:m.NAME,url:d.resolve(y,r)},S=m.decimalResolution("RESOLUTION");S&&(b.width=S.width,b.height=S.height),Ki((m.CODECS||"").split(/[ ,]+/).filter(function(j){return j}),b),b.videoCodec&&b.videoCodec.indexOf("avc1")!==-1&&(b.videoCodec=d.convertAVC1ToAVCOTI(b.videoCodec)),(v=b.unknownCodecs)!=null&&v.length||f.push(b),o.levels.push(b)}else if(h[3]){var E=h[3],A=h[4];switch(E){case"SESSION-DATA":{var x=new q(A),P=x["DATA-ID"];P&&(o.sessionData===null&&(o.sessionData={}),o.sessionData[P]=x);break}case"SESSION-KEY":{var O=Di(A,r);O.encrypted&&O.isSupported()?(o.sessionKeys===null&&(o.sessionKeys=[]),o.sessionKeys.push(O)):B.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'+A+'"');break}case"DEFINE":break;case"CONTENT-STEERING":{var M=new q(A);o.contentSteering={uri:d.resolve(M["SERVER-URI"],r),pathwayId:M["PATHWAY-ID"]||"."};break}case"START":{o.startTimeOffset=ei(A);break}}}var D=f.length>0&&f.length<o.levels.length;return o.levels=D?f:o.levels,o.levels.length===0&&(o.playlistParsingError=new Error("no levels found in manifest")),o},d.parseMasterPlaylistMedia=function(u,r,s){var o,f={},h=s.levels,v={AUDIO:h.map(function(P){return{id:P.attrs.AUDIO,audioCodec:P.audioCodec}}),SUBTITLES:h.map(function(P){return{id:P.attrs.SUBTITLES,textCodec:P.textCodec}}),"CLOSED-CAPTIONS":[]},m=0;for(cr.lastIndex=0;(o=cr.exec(u))!==null;){var y=new q(o[1]),b=y.TYPE;if(b){var S=v[b],E=f[b]||[];f[b]=E;var A={attrs:y,bitrate:0,id:m++,groupId:y["GROUP-ID"]||"",instreamId:y["INSTREAM-ID"],name:y.NAME||y.LANGUAGE||"",type:b,default:y.bool("DEFAULT"),autoselect:y.bool("AUTOSELECT"),forced:y.bool("FORCED"),lang:y.LANGUAGE,url:y.URI?d.resolve(y.URI,r):""};if(S!=null&&S.length){var x=d.findGroup(S,A.groupId)||S[0];ti(A,x,"audioCodec"),ti(A,x,"textCodec")}E.push(A)}}return f},d.parseLevelPlaylist=function(u,r,s,o,f,h){var v=new Xt(r),m=v.fragments,y=null,b=0,S=0,E=0,A=0,x=null,P=new it(o,r),O,M,D,j=-1,K=!1;for(zi.lastIndex=0,v.m3u8=u,v.hasVariableRefs=!1;(O=zi.exec(u))!==null;){K&&(K=!1,P=new it(o,r),P.start=E,P.sn=b,P.cc=A,P.level=s,y&&(P.initSegment=y,P.rawProgramDateTime=y.rawProgramDateTime,y.rawProgramDateTime=null));var he=O[1];if(he){P.duration=parseFloat(he);var re=(" "+O[2]).slice(1);P.title=re||null,P.tagList.push(re?["INF",he,re]:["INF",he])}else if(O[3]){if(Z(P.duration)){P.start=E,D&&_e(P,D,v),P.sn=b,P.level=s,P.cc=A,P.urlId=f,m.push(P);var ne=(" "+O[3]).slice(1);P.relurl=ne,ii(P,x),x=P,E+=P.duration,b++,S=0,K=!0}}else if(O[4]){var Ae=(" "+O[4]).slice(1);x?P.setByteRange(Ae,x):P.setByteRange(Ae)}else if(O[5])P.rawProgramDateTime=(" "+O[5]).slice(1),P.tagList.push(["PROGRAM-DATE-TIME",P.rawProgramDateTime]),j===-1&&(j=m.length);else{if(O=O[0].match(Si),!O){B.warn("No matches on slow regex match for level playlist!");continue}for(M=1;M<O.length&&typeof O[M]=="undefined";M++);var xe=(" "+O[M]).slice(1),we=(" "+O[M+1]).slice(1),Ve=O[M+2]?(" "+O[M+2]).slice(1):"";switch(xe){case"PLAYLIST-TYPE":v.type=we.toUpperCase();break;case"MEDIA-SEQUENCE":b=v.startSN=parseInt(we);break;case"SKIP":{var dt=new q(we),pt=dt.decimalInteger("SKIPPED-SEGMENTS");if(Z(pt)){v.skippedSegments=pt;for(var _t=pt;_t--;)m.unshift(null);b+=pt}var Bt=dt.enumeratedString("RECENTLY-REMOVED-DATERANGES");Bt&&(v.recentlyRemovedDateranges=Bt.split(" "));break}case"TARGETDURATION":v.targetduration=Math.max(parseInt(we),1);break;case"VERSION":v.version=parseInt(we);break;case"EXTM3U":break;case"ENDLIST":v.live=!1;break;case"#":(we||Ve)&&P.tagList.push(Ve?[we,Ve]:[we]);break;case"DISCONTINUITY":A++,P.tagList.push(["DIS"]);break;case"GAP":P.gap=!0,P.tagList.push([xe]);break;case"BITRATE":P.tagList.push([xe,we]);break;case"DATERANGE":{var St=new q(we),zt=new Qe(St,v.dateRanges[St.ID]);zt.isValid||v.skippedSegments?v.dateRanges[zt.id]=zt:B.warn('Ignoring invalid DATERANGE tag: "'+we+'"'),P.tagList.push(["EXT-X-DATERANGE",we]);break}case"DEFINE":break;case"DISCONTINUITY-SEQUENCE":A=parseInt(we);break;case"KEY":{var Ct=Di(we,r);if(Ct.isSupported()){if(Ct.method==="NONE"){D=void 0;break}D||(D={}),D[Ct.keyFormat]&&(D=k({},D)),D[Ct.keyFormat]=Ct}else B.warn('[Keys] Ignoring invalid EXT-X-KEY tag: "'+we+'"');break}case"START":v.startTimeOffset=ei(we);break;case"MAP":{var ui=new q(we);if(P.duration){var Vr=new it(o,r);H(Vr,ui,s,D),y=Vr,P.initSegment=y,y.rawProgramDateTime&&!P.rawProgramDateTime&&(P.rawProgramDateTime=y.rawProgramDateTime)}else H(P,ui,s,D),y=P,K=!0;break}case"SERVER-CONTROL":{var ri=new q(we);v.canBlockReload=ri.bool("CAN-BLOCK-RELOAD"),v.canSkipUntil=ri.optionalFloat("CAN-SKIP-UNTIL",0),v.canSkipDateRanges=v.canSkipUntil>0&&ri.bool("CAN-SKIP-DATERANGES"),v.partHoldBack=ri.optionalFloat("PART-HOLD-BACK",0),v.holdBack=ri.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var sr=new q(we);v.partTarget=sr.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Xi=v.partList;Xi||(Xi=v.partList=[]);var sn=S>0?Xi[Xi.length-1]:void 0,Tr=S++,En=new q(we),Hn=new xt(En,P,r,Tr,sn);Xi.push(Hn),P.duration+=Hn.duration;break}case"PRELOAD-HINT":{var An=new q(we);v.preloadHint=An;break}case"RENDITION-REPORT":{var Kn=new q(we);v.renditionReports=v.renditionReports||[],v.renditionReports.push(Kn);break}default:B.warn("line parsed but not handled: "+O);break}}}x&&!x.relurl?(m.pop(),E-=x.duration,v.partList&&(v.fragmentHint=x)):v.partList&&(ii(P,x),P.cc=A,v.fragmentHint=P,D&&_e(P,D,v));var tr=m.length,hr=m[0],xn=m[tr-1];if(E+=v.skippedSegments*v.targetduration,E>0&&tr&&xn){v.averagetargetduration=E/tr;var Yn=xn.sn;v.endSN=Yn!=="initSegment"?Yn:0,v.live||(xn.endList=!0),hr&&(v.startCC=hr.cc)}else v.endSN=0,v.startCC=0;return v.fragmentHint&&(E+=v.fragmentHint.duration),v.totalduration=E,v.endCC=A,j>0&&br(m,j),v},d}();function Di(d,c,u){var r,s,o=new q(d),f=(r=o.METHOD)!=null?r:"",h=o.URI,v=o.hexadecimalInteger("IV"),m=o.KEYFORMATVERSIONS,y=(s=o.KEYFORMAT)!=null?s:"identity";h&&o.IV&&!v&&B.error("Invalid IV: "+o.IV);var b=h?Hi.resolve(h,c):"",S=(m||"1").split("/").map(Number).filter(Number.isFinite);return new yr(f,b,y,S,v)}function ei(d){var c=new q(d),u=c.decimalFloatingPoint("TIME-OFFSET");return Z(u)?u:null}function Ki(d,c){["video","audio","text"].forEach(function(u){var r=d.filter(function(o){return xr(o,u)});if(r.length){var s=r.filter(function(o){return o.lastIndexOf("avc1",0)===0||o.lastIndexOf("mp4a",0)===0});c[u+"Codec"]=s.length>0?s[0]:r[0],d=d.filter(function(o){return r.indexOf(o)===-1})}}),c.unknownCodecs=d}function ti(d,c,u){var r=c[u];r&&(d[u]=r)}function br(d,c){for(var u=d[c],r=c;r--;){var s=d[r];if(!s)return;s.programDateTime=u.programDateTime-s.duration*1e3,u=s}}function ii(d,c){d.rawProgramDateTime?d.programDateTime=Date.parse(d.rawProgramDateTime):c!=null&&c.programDateTime&&(d.programDateTime=c.endProgramDateTime),Z(d.programDateTime)||(d.programDateTime=null,d.rawProgramDateTime=null)}function H(d,c,u,r){d.relurl=c.URI,c.BYTERANGE&&d.setByteRange(c.BYTERANGE),d.level=u,d.sn="initSegment",r&&(d.levelkeys=r),d.initSegment=null}function _e(d,c,u){d.levelkeys=c;var r=u.encryptedFragments;(!r.length||r[r.length-1].levelkeys!==c)&&Object.keys(c).some(function(s){return c[s].isCommonEncryption})&&r.push(d)}var ye={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},st={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function Mr(d){var c=d.type;switch(c){case ye.AUDIO_TRACK:return st.AUDIO;case ye.SUBTITLE_TRACK:return st.SUBTITLE;default:return st.MAIN}}function Pr(d,c){var u=d.url;return(u===void 0||u.indexOf("data:")===0)&&(u=c.url),u}var $r=function(){function d(u){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=u,this.registerListeners()}var c=d.prototype;return c.startLoad=function(r){},c.stopLoad=function(){this.destroyInternalLoaders()},c.registerListeners=function(){var r=this.hls;r.on(L.MANIFEST_LOADING,this.onManifestLoading,this),r.on(L.LEVEL_LOADING,this.onLevelLoading,this),r.on(L.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),r.on(L.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},c.unregisterListeners=function(){var r=this.hls;r.off(L.MANIFEST_LOADING,this.onManifestLoading,this),r.off(L.LEVEL_LOADING,this.onLevelLoading,this),r.off(L.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),r.off(L.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},c.createInternalLoader=function(r){var s=this.hls.config,o=s.pLoader,f=s.loader,h=o||f,v=new h(s);return this.loaders[r.type]=v,v},c.getInternalLoader=function(r){return this.loaders[r.type]},c.resetInternalLoader=function(r){this.loaders[r]&&delete this.loaders[r]},c.destroyInternalLoaders=function(){for(var r in this.loaders){var s=this.loaders[r];s&&s.destroy(),this.resetInternalLoader(r)}},c.destroy=function(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()},c.onManifestLoading=function(r,s){var o=s.url;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:ye.MANIFEST,url:o,deliveryDirectives:null})},c.onLevelLoading=function(r,s){var o=s.id,f=s.level,h=s.url,v=s.deliveryDirectives;this.load({id:o,level:f,responseType:"text",type:ye.LEVEL,url:h,deliveryDirectives:v})},c.onAudioTrackLoading=function(r,s){var o=s.id,f=s.groupId,h=s.url,v=s.deliveryDirectives;this.load({id:o,groupId:f,level:null,responseType:"text",type:ye.AUDIO_TRACK,url:h,deliveryDirectives:v})},c.onSubtitleTrackLoading=function(r,s){var o=s.id,f=s.groupId,h=s.url,v=s.deliveryDirectives;this.load({id:o,groupId:f,level:null,responseType:"text",type:ye.SUBTITLE_TRACK,url:h,deliveryDirectives:v})},c.load=function(r){var s,o=this,f=this.hls.config,h=this.getInternalLoader(r);if(h){var v=h.context;if(v&&v.url===r.url){B.trace("[playlist-loader]: playlist request ongoing");return}B.log("[playlist-loader]: aborting previous loader for type: "+r.type),h.abort()}var m;if(r.type===ye.MANIFEST?m=f.manifestLoadPolicy.default:m=k({},f.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),h=this.createInternalLoader(r),(s=r.deliveryDirectives)!=null&&s.part){var y;if(r.type===ye.LEVEL&&r.level!==null?y=this.hls.levels[r.level].details:r.type===ye.AUDIO_TRACK&&r.id!==null?y=this.hls.audioTracks[r.id].details:r.type===ye.SUBTITLE_TRACK&&r.id!==null&&(y=this.hls.subtitleTracks[r.id].details),y){var b=y.partTarget,S=y.targetduration;if(b&&S){var E=Math.max(b*3,S*.8)*1e3;m=k({},m,{maxTimeToFirstByteMs:Math.min(E,m.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(E,m.maxTimeToFirstByteMs)})}}}var A=m.errorRetry||m.timeoutRetry||{},x={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:A.maxNumRetry||0,retryDelay:A.retryDelayMs||0,maxRetryDelay:A.maxRetryDelayMs||0},P={onSuccess:function(M,D,j,K){var he=o.getInternalLoader(j);o.resetInternalLoader(j.type);var re=M.data;if(re.indexOf("#EXTM3U")!==0){o.handleManifestParsingError(M,j,new Error("no EXTM3U delimiter"),K||null,D);return}D.parsing.start=performance.now(),Hi.isMediaPlaylist(re)?o.handleTrackOrLevelPlaylist(M,D,j,K||null,he):o.handleMasterPlaylist(M,D,j,K)},onError:function(M,D,j,K){o.handleNetworkError(D,j,!1,M,K)},onTimeout:function(M,D,j){o.handleNetworkError(D,j,!0,void 0,M)}};h.load(r,x,P)},c.handleMasterPlaylist=function(r,s,o,f){var h=this.hls,v=r.data,m=Pr(r,o),y=Hi.parseMasterPlaylist(v,m);if(y.playlistParsingError){this.handleManifestParsingError(r,o,y.playlistParsingError,f,s);return}var b=y.contentSteering,S=y.levels,E=y.sessionData,A=y.sessionKeys,x=y.startTimeOffset,P=y.variableList;this.variableList=P;var O=Hi.parseMasterPlaylistMedia(v,m,y),M=O.AUDIO,D=M===void 0?[]:M,j=O.SUBTITLES,K=O["CLOSED-CAPTIONS"];if(D.length){var he=D.some(function(re){return!re.url});!he&&S[0].audioCodec&&!S[0].attrs.AUDIO&&(B.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),D.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new q({}),bitrate:0,url:""}))}h.trigger(L.MANIFEST_LOADED,{levels:S,audioTracks:D,subtitles:j,captions:K,contentSteering:b,url:m,stats:s,networkDetails:f,sessionData:E,sessionKeys:A,startTimeOffset:x,variableList:P})},c.handleTrackOrLevelPlaylist=function(r,s,o,f,h){var v=this.hls,m=o.id,y=o.level,b=o.type,S=Pr(r,o),E=Z(m)?m:0,A=Z(y)?y:E,x=Mr(o),P=Hi.parseLevelPlaylist(r.data,S,A,x,E,this.variableList);if(b===ye.MANIFEST){var O={attrs:new q({}),bitrate:0,details:P,name:"",url:S};v.trigger(L.MANIFEST_LOADED,{levels:[O],audioTracks:[],url:S,stats:s,networkDetails:f,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}s.parsing.end=performance.now(),o.levelDetails=P,this.handlePlaylistLoaded(P,r,s,o,f,h)},c.handleManifestParsingError=function(r,s,o,f,h){this.hls.trigger(L.ERROR,{type:le.NETWORK_ERROR,details:z.MANIFEST_PARSING_ERROR,fatal:s.type===ye.MANIFEST,url:r.url,err:o,error:o,reason:o.message,response:r,context:s,networkDetails:f,stats:h})},c.handleNetworkError=function(r,s,o,f,h){o===void 0&&(o=!1);var v="A network "+(o?"timeout":"error"+(f?" (status "+f.code+")":""))+" occurred while loading "+r.type;r.type===ye.LEVEL?v+=": "+r.level+" id: "+r.id:(r.type===ye.AUDIO_TRACK||r.type===ye.SUBTITLE_TRACK)&&(v+=" id: "+r.id+' group-id: "'+r.groupId+'"');var m=new Error(v);B.warn("[playlist-loader]: "+v);var y=z.UNKNOWN,b=!1,S=this.getInternalLoader(r);switch(r.type){case ye.MANIFEST:y=o?z.MANIFEST_LOAD_TIMEOUT:z.MANIFEST_LOAD_ERROR,b=!0;break;case ye.LEVEL:y=o?z.LEVEL_LOAD_TIMEOUT:z.LEVEL_LOAD_ERROR,b=!1;break;case ye.AUDIO_TRACK:y=o?z.AUDIO_TRACK_LOAD_TIMEOUT:z.AUDIO_TRACK_LOAD_ERROR,b=!1;break;case ye.SUBTITLE_TRACK:y=o?z.SUBTITLE_TRACK_LOAD_TIMEOUT:z.SUBTITLE_LOAD_ERROR,b=!1;break}S&&this.resetInternalLoader(r.type);var E={type:le.NETWORK_ERROR,details:y,fatal:b,url:r.url,loader:S,context:r,error:m,networkDetails:s,stats:h};if(f){var A=(s==null?void 0:s.url)||r.url;E.response=l({url:A,data:void 0},f)}this.hls.trigger(L.ERROR,E)},c.handlePlaylistLoaded=function(r,s,o,f,h,v){var m=this.hls,y=f.type,b=f.level,S=f.id,E=f.groupId,A=f.deliveryDirectives,x=Pr(s,f),P=Mr(f),O=typeof f.level=="number"&&P===st.MAIN?b:void 0;if(!r.fragments.length){var M=new Error("No Segments found in Playlist");m.trigger(L.ERROR,{type:le.NETWORK_ERROR,details:z.LEVEL_EMPTY_ERROR,fatal:!1,url:x,error:M,reason:M.message,response:s,context:f,level:O,parent:P,networkDetails:h,stats:o});return}r.targetduration||(r.playlistParsingError=new Error("Missing Target Duration"));var D=r.playlistParsingError;if(D){m.trigger(L.ERROR,{type:le.NETWORK_ERROR,details:z.LEVEL_PARSING_ERROR,fatal:!1,url:x,error:D,reason:D.message,response:s,context:f,level:O,parent:P,networkDetails:h,stats:o});return}switch(r.live&&v&&(v.getCacheAge&&(r.ageHeader=v.getCacheAge()||0),(!v.getCacheAge||isNaN(r.ageHeader))&&(r.ageHeader=0)),y){case ye.MANIFEST:case ye.LEVEL:m.trigger(L.LEVEL_LOADED,{details:r,level:O||0,id:S||0,stats:o,networkDetails:h,deliveryDirectives:A});break;case ye.AUDIO_TRACK:m.trigger(L.AUDIO_TRACK_LOADED,{details:r,id:S||0,groupId:E||"",stats:o,networkDetails:h,deliveryDirectives:A});break;case ye.SUBTITLE_TRACK:m.trigger(L.SUBTITLE_TRACK_LOADED,{details:r,id:S||0,groupId:E||"",stats:o,networkDetails:h,deliveryDirectives:A});break}},d}();function Ms(d,c){var u;try{u=new Event("addtrack")}catch(r){u=document.createEvent("Event"),u.initEvent("addtrack",!1,!1)}u.track=d,c.dispatchEvent(u)}function bn(d){var c=d.mode;if(c==="disabled"&&(d.mode="hidden"),d.cues)for(var u=d.cues.length;u--;)d.removeCue(d.cues[u]);c==="disabled"&&(d.mode=c)}function Ns(d,c,u,r){var s=d.mode;if(s==="disabled"&&(d.mode="hidden"),d.cues&&d.cues.length>0)for(var o=en(d.cues,c,u),f=0;f<o.length;f++)(!r||r(o[f]))&&d.removeCue(o[f]);s==="disabled"&&(d.mode=s)}function Yi(d,c){if(c<d[0].startTime)return 0;var u=d.length-1;if(c>d[u].endTime)return-1;for(var r=0,s=u;r<=s;){var o=Math.floor((s+r)/2);if(c<d[o].startTime)s=o-1;else if(c>d[o].startTime&&r<u)r=o+1;else return o}return d[r].startTime-c<c-d[s].startTime?r:s}function en(d,c,u){var r=[],s=Yi(d,c);if(s>-1)for(var o=s,f=d.length;o<f;o++){var h=d[o];if(h.startTime>=c&&h.endTime<=u)r.push(h);else if(h.startTime>u)return r}return r}var Ai={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"},tn=.25;function Cr(){if(typeof self!="undefined")return self.WebKitDataCue||self.VTTCue||self.TextTrackCue}var Sr=function(){var d=Cr();try{new d(0,Number.POSITIVE_INFINITY,"")}catch(c){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY}();function Wn(d,c){return d.getTime()/1e3-c}function Sn(d){return Uint8Array.from(d.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}var Fs=function(){function d(u){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=u,this._registerListeners()}var c=d.prototype;return c.destroy=function(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null},c._registerListeners=function(){var r=this.hls;r.on(L.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(L.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(L.MANIFEST_LOADING,this.onManifestLoading,this),r.on(L.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),r.on(L.BUFFER_FLUSHING,this.onBufferFlushing,this),r.on(L.LEVEL_UPDATED,this.onLevelUpdated,this)},c._unregisterListeners=function(){var r=this.hls;r.off(L.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(L.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(L.MANIFEST_LOADING,this.onManifestLoading,this),r.off(L.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),r.off(L.BUFFER_FLUSHING,this.onBufferFlushing,this),r.off(L.LEVEL_UPDATED,this.onLevelUpdated,this)},c.onMediaAttached=function(r,s){this.media=s.media},c.onMediaDetaching=function(){this.id3Track&&(bn(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})},c.onManifestLoading=function(){this.dateRangeCuesAppended={}},c.createTrack=function(r){var s=this.getID3Track(r.textTracks);return s.mode="hidden",s},c.getID3Track=function(r){if(this.media){for(var s=0;s<r.length;s++){var o=r[s];if(o.kind==="metadata"&&o.label==="id3")return Ms(o,this.media),o}return this.media.addTextTrack("metadata","id3")}},c.onFragParsingMetadata=function(r,s){if(this.media){var o=this.hls.config,f=o.enableEmsgMetadataCues,h=o.enableID3MetadataCues;if(!(!f&&!h)){var v=s.samples;this.id3Track||(this.id3Track=this.createTrack(this.media));for(var m=Cr(),y=0;y<v.length;y++){var b=v[y].type;if(!(b===Ai.emsg&&!f||!h)){var S=ot(v[y].data);if(S){var E=v[y].pts,A=E+v[y].duration;A>Sr&&(A=Sr);var x=A-E;x<=0&&(A=E+tn);for(var P=0;P<S.length;P++){var O=S[P];if(!Jt(O)){this.updateId3CueEnds(E,b);var M=new m(E,A,"");M.value=O,b&&(M.type=b),this.id3Track.addCue(M)}}}}}}}},c.updateId3CueEnds=function(r,s){var o,f=(o=this.id3Track)==null?void 0:o.cues;if(f)for(var h=f.length;h--;){var v=f[h];v.type===s&&v.startTime<r&&v.endTime===Sr&&(v.endTime=r)}},c.onBufferFlushing=function(r,s){var o=s.startOffset,f=s.endOffset,h=s.type,v=this.id3Track,m=this.hls;if(m){var y=m.config,b=y.enableEmsgMetadataCues,S=y.enableID3MetadataCues;if(v&&(b||S)){var E;h==="audio"?E=function(x){return x.type===Ai.audioId3&&S}:h==="video"?E=function(x){return x.type===Ai.emsg&&b}:E=function(x){return x.type===Ai.audioId3&&S||x.type===Ai.emsg&&b},Ns(v,o,f,E)}}},c.onLevelUpdated=function(r,s){var o=this,f=s.details;if(!(!this.media||!f.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)){var h=this.dateRangeCuesAppended,v=this.id3Track,m=f.dateRanges,y=Object.keys(m);if(v)for(var b=Object.keys(h).filter(function(D){return!y.includes(D)}),S=function(){var j=b[E];Object.keys(h[j].cues).forEach(function(K){v.removeCue(h[j].cues[K])}),delete h[j]},E=b.length;E--;)S();var A=f.fragments[f.fragments.length-1];if(!(y.length===0||!Z(A==null?void 0:A.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(var x=A.programDateTime/1e3-A.start,P=Cr(),O=function(){var j=y[M],K=m[j],he=h[j],re=(he==null?void 0:he.cues)||{},ne=(he==null?void 0:he.durationKnown)||!1,Ae=Wn(K.startDate,x),xe=Sr,we=K.endDate;if(we)xe=Wn(we,x),ne=!0;else if(K.endOnNext&&!ne){var Ve=y.reduce(function(zt,Ct){var ui=m[Ct];return ui.class===K.class&&ui.id!==Ct&&ui.startDate>K.startDate&&zt.push(ui),zt},[]).sort(function(zt,Ct){return zt.startDate.getTime()-Ct.startDate.getTime()})[0];Ve&&(xe=Wn(Ve.startDate,x),ne=!0)}for(var dt=Object.keys(K.attr),pt=0;pt<dt.length;pt++){var _t=dt[pt];if(ve(_t)){var Bt=re[_t];if(Bt)ne&&!he.durationKnown&&(Bt.endTime=xe);else{var St=K.attr[_t];Bt=new P(Ae,xe,""),at(_t)&&(St=Sn(St)),Bt.value={key:_t,data:St},Bt.type=Ai.dateRange,Bt.id=j,o.id3Track.addCue(Bt),re[_t]=Bt}}}h[j]={cues:re,dateRange:K,durationKnown:ne}},M=0;M<y.length;M++)O()}}},d}(),kr=function(){function d(u){var r=this;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=function(){return r.timeupdate()},this.hls=u,this.config=u.config,this.registerListeners()}var c=d.prototype;return c.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},c.registerListeners=function(){this.hls.on(L.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(L.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(L.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(L.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(L.ERROR,this.onError,this)},c.unregisterListeners=function(){this.hls.off(L.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(L.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(L.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(L.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(L.ERROR,this.onError,this)},c.onMediaAttached=function(r,s){this.media=s.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},c.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},c.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},c.onLevelUpdated=function(r,s){var o=s.details;this.levelDetails=o,o.advanced&&this.timeupdate(),!o.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},c.onError=function(r,s){var o;s.details===z.BUFFER_STALLED_ERROR&&(this.stallCount++,(o=this.levelDetails)!=null&&o.live&&B.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},c.timeupdate=function(){var r=this.media,s=this.levelDetails;if(!(!r||!s)){this.currentTime=r.currentTime;var o=this.computeLatency();if(o!==null){this._latency=o;var f=this.config,h=f.lowLatencyMode,v=f.maxLiveSyncPlaybackRate;if(!(!h||v===1)){var m=this.targetLatency;if(m!==null){var y=o-m,b=Math.min(this.maxLatency,m+s.targetduration),S=y<b;if(s.live&&S&&y>.05&&this.forwardBufferLength>1){var E=Math.min(2,Math.max(1,v)),A=Math.round(2/(1+Math.exp(-.75*y-this.edgeStalled))*20)/20;r.playbackRate=Math.min(E,Math.max(1,A))}else r.playbackRate!==1&&r.playbackRate!==0&&(r.playbackRate=1)}}}}},c.estimateLiveEdge=function(){var r=this.levelDetails;return r===null?null:r.edge+r.age},c.computeLatency=function(){var r=this.estimateLiveEdge();return r===null?null:r-this.currentTime},p(d,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var r=this.config,s=this.levelDetails;return r.liveMaxLatencyDuration!==void 0?r.liveMaxLatencyDuration:s?r.liveMaxLatencyDurationCount*s.targetduration:0}},{key:"targetLatency",get:function(){var r=this.levelDetails;if(r===null)return null;var s=r.holdBack,o=r.partHoldBack,f=r.targetduration,h=this.config,v=h.liveSyncDuration,m=h.liveSyncDurationCount,y=h.lowLatencyMode,b=this.hls.userConfig,S=y&&o||s;(b.liveSyncDuration||b.liveSyncDurationCount||S===0)&&(S=v!==void 0?v:m*f);var E=f,A=1;return S+Math.min(this.stallCount*A,E)}},{key:"liveSyncPosition",get:function(){var r=this.estimateLiveEdge(),s=this.targetLatency,o=this.levelDetails;if(r===null||s===null||o===null)return null;var f=o.edge,h=r-s-this.edgeStalled,v=f-o.totalduration,m=f-(this.config.lowLatencyMode&&o.partTarget||o.targetduration);return Math.min(Math.max(v,h),m)}},{key:"drift",get:function(){var r=this.levelDetails;return r===null?1:r.drift}},{key:"edgeStalled",get:function(){var r=this.levelDetails;if(r===null)return 0;var s=(this.config.lowLatencyMode&&r.partTarget||r.targetduration)*3;return Math.max(r.age-s,0)}},{key:"forwardBufferLength",get:function(){var r=this.media,s=this.levelDetails;if(!r||!s)return 0;var o=r.buffered.length;return(o?r.buffered.end(o-1):s.edge)-this.currentTime}}]),d}(),jn=["NONE","TYPE-0","TYPE-1",null],Nr={No:"",Yes:"YES",v2:"v2"};function Us(d,c){var u=d.canSkipUntil,r=d.canSkipDateRanges,s=d.endSN,o=c!==void 0?c-s:0;return u&&o<u?r?Nr.v2:Nr.Yes:Nr.No}var as=function(){function d(u,r,s){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=u,this.part=r,this.skip=s}var c=d.prototype;return c.addDirectives=function(r){var s=new self.URL(r);return this.msn!==void 0&&s.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&s.searchParams.set("_HLS_part",this.part.toString()),this.skip&&s.searchParams.set("_HLS_skip",this.skip),s.href},d}(),os=function(){function d(u){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=[u.url],this._attrs=[u.attrs],this.bitrate=u.bitrate,u.details&&(this.details=u.details),this.id=u.id||0,this.name=u.name,this.width=u.width||0,this.height=u.height||0,this.audioCodec=u.audioCodec,this.videoCodec=u.videoCodec,this.unknownCodecs=u.unknownCodecs,this.codecSet=[u.videoCodec,u.audioCodec].filter(function(r){return r}).join(",").replace(/\.[^.,]+/g,"")}var c=d.prototype;return c.addFallback=function(r){this.url.push(r.url),this._attrs.push(r.attrs)},p(d,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"attrs",get:function(){return this._attrs[this._urlId]}},{key:"pathwayId",get:function(){return this.attrs["PATHWAY-ID"]||"."}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(r){var s=r%this.url.length;this._urlId!==s&&(this.fragmentError=0,this.loadError=0,this.details=void 0,this._urlId=s)}},{key:"audioGroupId",get:function(){var r;return(r=this.audioGroupIds)==null?void 0:r[this.urlId]}},{key:"textGroupId",get:function(){var r;return(r=this.textGroupIds)==null?void 0:r[this.urlId]}}]),d}();function Gn(d,c){var u=c.startPTS;if(Z(u)){var r=0,s;c.sn>d.sn?(r=u-d.start,s=d):(r=d.start-u,s=c),s.duration!==r&&(s.duration=r)}else if(c.sn>d.sn){var o=d.cc===c.cc;o&&d.minEndPTS?c.start=d.start+(d.minEndPTS-d.start):c.start=d.start+d.duration}else c.start=Math.max(d.start-c.duration,0)}function Fr(d,c,u,r,s,o){var f=r-u;f<=0&&(B.warn("Fragment should have a positive duration",c),r=u+c.duration,o=s+c.duration);var h=u,v=r,m=c.startPTS,y=c.endPTS;if(Z(m)){var b=Math.abs(m-u);Z(c.deltaPTS)?c.deltaPTS=Math.max(b,c.deltaPTS):c.deltaPTS=b,h=Math.max(u,m),u=Math.min(u,m),s=Math.min(s,c.startDTS),v=Math.min(r,y),r=Math.max(r,y),o=Math.max(o,c.endDTS)}var S=u-c.start;c.start!==0&&(c.start=u),c.duration=r-c.start,c.startPTS=u,c.maxStartPTS=h,c.startDTS=s,c.endPTS=r,c.minEndPTS=v,c.endDTS=o;var E=c.sn;if(!d||E<d.startSN||E>d.endSN)return 0;var A,x=E-d.startSN,P=d.fragments;for(P[x]=c,A=x;A>0;A--)Gn(P[A],P[A-1]);for(A=x;A<P.length-1;A++)Gn(P[A],P[A+1]);return d.fragmentHint&&Gn(P[P.length-1],d.fragmentHint),d.PTSKnown=d.alignedSliding=!0,S}function Pi(d,c){for(var u=null,r=d.fragments,s=r.length-1;s>=0;s--){var o=r[s].initSegment;if(o){u=o;break}}d.fragmentHint&&delete d.fragmentHint.endPTS;var f=0,h;if($i(d,c,function(A,x){A.relurl&&(f=A.cc-x.cc),Z(A.startPTS)&&Z(A.endPTS)&&(x.start=x.startPTS=A.startPTS,x.startDTS=A.startDTS,x.maxStartPTS=A.maxStartPTS,x.endPTS=A.endPTS,x.endDTS=A.endDTS,x.minEndPTS=A.minEndPTS,x.duration=A.endPTS-A.startPTS,x.duration&&(h=x),c.PTSKnown=c.alignedSliding=!0),x.elementaryStreams=A.elementaryStreams,x.loader=A.loader,x.stats=A.stats,x.urlId=A.urlId,A.initSegment&&(x.initSegment=A.initSegment,u=A.initSegment)}),u){var v=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments;v.forEach(function(A){var x;(!A.initSegment||A.initSegment.relurl===((x=u)==null?void 0:x.relurl))&&(A.initSegment=u)})}if(c.skippedSegments)if(c.deltaUpdateFailed=c.fragments.some(function(A){return!A}),c.deltaUpdateFailed){B.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var m=c.skippedSegments;m--;)c.fragments.shift();c.startSN=c.fragments[0].sn,c.startCC=c.fragments[0].cc}else c.canSkipDateRanges&&(c.dateRanges=ya(d.dateRanges,c.dateRanges,c.recentlyRemovedDateranges));var y=c.fragments;if(f){B.warn("discontinuity sliding from playlist, take drift into account");for(var b=0;b<y.length;b++)y[b].cc+=f}c.skippedSegments&&(c.startCC=c.fragments[0].cc),R(d.partList,c.partList,function(A,x){x.elementaryStreams=A.elementaryStreams,x.stats=A.stats}),h?Fr(c,h,h.startPTS,h.endPTS,h.startDTS,h.endDTS):ba(d,c),y.length&&(c.totalduration=c.edge-y[0].start),c.driftStartTime=d.driftStartTime,c.driftStart=d.driftStart;var S=c.advancedDateTime;if(c.advanced&&S){var E=c.edge;c.driftStart||(c.driftStartTime=S,c.driftStart=E),c.driftEndTime=S,c.driftEnd=E}else c.driftEndTime=d.driftEndTime,c.driftEnd=d.driftEnd,c.advancedDateTime=d.advancedDateTime}function ya(d,c,u){var r=k({},d);return u&&u.forEach(function(s){delete r[s]}),Object.keys(c).forEach(function(s){var o=new Qe(c[s].attr,r[s]);o.isValid?r[s]=o:B.warn('Ignoring invalid Playlist Delta Update DATERANGE tag: "'+JSON.stringify(c[s].attr)+'"')}),r}function R(d,c,u){if(d&&c)for(var r=0,s=0,o=d.length;s<=o;s++){var f=d[s],h=c[s+r];f&&h&&f.index===h.index&&f.fragment.sn===h.fragment.sn?u(f,h):r--}}function $i(d,c,u){for(var r=c.skippedSegments,s=Math.max(d.startSN,c.startSN)-c.startSN,o=(d.fragmentHint?1:0)+(r?c.endSN:Math.min(d.endSN,c.endSN))-c.startSN,f=c.startSN-d.startSN,h=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments,v=d.fragmentHint?d.fragments.concat(d.fragmentHint):d.fragments,m=s;m<=o;m++){var y=v[f+m],b=h[m];r&&!b&&m<r&&(b=c.fragments[m]=y),y&&b&&u(y,b)}}function ba(d,c){var u=c.startSN+c.skippedSegments-d.startSN,r=d.fragments;u<0||u>=r.length||Vs(c,r[u].start)}function Vs(d,c){if(c){for(var u=d.fragments,r=d.skippedSegments;r<u.length;r++)u[r].start+=c;d.fragmentHint&&(d.fragmentHint.start+=c)}}function Lr(d,c){c===void 0&&(c=1/0);var u=1e3*d.targetduration;if(d.updated){var r=d.fragments,s=4;if(r.length&&u*s>c){var o=r[r.length-1].duration*1e3;o<u&&(u=o)}}else u/=2;return Math.round(u)}function We(d,c,u){if(!(d!=null&&d.details))return null;var r=d.details,s=r.fragments[c-r.startSN];return s||(s=r.fragmentHint,s&&s.sn===c)?s:c<r.startSN&&u&&u.sn===c?u:null}function Gt(d,c,u){var r;return d!=null&&d.details?ai((r=d.details)==null?void 0:r.partList,c,u):null}function ai(d,c,u){if(d)for(var r=d.length;r--;){var s=d[r];if(s.index===u&&s.fragment.sn===c)return s}return null}function ls(d){switch(d.details){case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_TIMEOUT:case z.LEVEL_LOAD_TIMEOUT:case z.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function yf(d,c){var u=ls(c);return d.default[(u?"timeout":"error")+"Retry"]}function Yl(d,c){var u=d.backoff==="linear"?1:Math.pow(2,c);return Math.min(u*d.retryDelayMs,d.maxRetryDelayMs)}function bf(d){return l(l({},d),{errorRetry:null,timeoutRetry:null})}function Bo(d,c,u,r){return!!d&&c<d.maxNumRetry&&(b2(r)||!!u)}function b2(d){return d===0&&navigator.onLine===!1||!!d&&(d<400||d>499)}var Sf={search:function(c,u){for(var r=0,s=c.length-1,o=null,f=null;r<=s;){o=(r+s)/2|0,f=c[o];var h=u(f);if(h>0)r=o+1;else if(h<0)s=o-1;else return f}return null}};function S2(d,c,u){if(c===null||!Array.isArray(d)||!d.length||!Z(c))return null;var r=d[0].programDateTime;if(c<(r||0))return null;var s=d[d.length-1].endProgramDateTime;if(c>=(s||0))return null;u=u||0;for(var o=0;o<d.length;++o){var f=d[o];if(k2(c,u,f))return f}return null}function ql(d,c,u,r){u===void 0&&(u=0),r===void 0&&(r=0);var s=null;if(d?s=c[d.sn-c[0].sn+1]||null:u===0&&c[0].start===0&&(s=c[0]),s&&kf(u,r,s)===0)return s;var o=Sf.search(c,kf.bind(null,u,r));return o&&(o!==d||!s)?o:s}function kf(d,c,u){if(d===void 0&&(d=0),c===void 0&&(c=0),u.start<=d&&u.start+u.duration>d)return 0;var r=Math.min(c,u.duration+(u.deltaPTS?u.deltaPTS:0));return u.start+u.duration-r<=d?1:u.start-r>d&&u.start?-1:0}function k2(d,c,u){var r=Math.min(c,u.duration+(u.deltaPTS?u.deltaPTS:0))*1e3,s=u.endProgramDateTime||0;return s-r>d}function T2(d,c){return Sf.search(d,function(u){return u.cc<c?1:u.cc>c?-1:0})}var E2=3e5,dr={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},rn={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4},A2=function(){function d(u){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=u,this.log=B.log.bind(B,"[info]:"),this.warn=B.warn.bind(B,"[warning]:"),this.error=B.error.bind(B,"[error]:"),this.registerListeners()}var c=d.prototype;return c.registerListeners=function(){var r=this.hls;r.on(L.ERROR,this.onError,this),r.on(L.MANIFEST_LOADING,this.onManifestLoading,this),r.on(L.LEVEL_UPDATED,this.onLevelUpdated,this)},c.unregisterListeners=function(){var r=this.hls;r&&(r.off(L.ERROR,this.onError,this),r.off(L.ERROR,this.onErrorOut,this),r.off(L.MANIFEST_LOADING,this.onManifestLoading,this),r.off(L.LEVEL_UPDATED,this.onLevelUpdated,this))},c.destroy=function(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}},c.startLoad=function(r){this.playlistError=0},c.stopLoad=function(){},c.getVariantLevelIndex=function(r){return(r==null?void 0:r.type)===st.MAIN?r.level:this.hls.loadLevel},c.onManifestLoading=function(){this.playlistError=0,this.penalizedRenditions={}},c.onLevelUpdated=function(){this.playlistError=0},c.onError=function(r,s){var o;if(!s.fatal){var f=this.hls,h=s.context;switch(s.details){case z.FRAG_LOAD_ERROR:case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_ERROR:case z.KEY_LOAD_TIMEOUT:s.errorAction=this.getFragRetryOrSwitchAction(s);return;case z.FRAG_GAP:case z.FRAG_PARSING_ERROR:case z.FRAG_DECRYPT_ERROR:{s.errorAction=this.getFragRetryOrSwitchAction(s),s.errorAction.action=dr.SendAlternateToPenaltyBox;return}case z.LEVEL_EMPTY_ERROR:case z.LEVEL_PARSING_ERROR:{var v,m,y=s.parent===st.MAIN?s.level:f.loadLevel;s.details===z.LEVEL_EMPTY_ERROR&&((v=s.context)!=null&&(m=v.levelDetails)!=null&&m.live)?s.errorAction=this.getPlaylistRetryOrSwitchAction(s,y):(s.levelRetry=!1,s.errorAction=this.getLevelSwitchAction(s,y))}return;case z.LEVEL_LOAD_ERROR:case z.LEVEL_LOAD_TIMEOUT:typeof(h==null?void 0:h.level)=="number"&&(s.errorAction=this.getPlaylistRetryOrSwitchAction(s,h.level));return;case z.AUDIO_TRACK_LOAD_ERROR:case z.AUDIO_TRACK_LOAD_TIMEOUT:case z.SUBTITLE_LOAD_ERROR:case z.SUBTITLE_TRACK_LOAD_TIMEOUT:if(h){var b=f.levels[f.loadLevel];if(b&&(h.type===ye.AUDIO_TRACK&&h.groupId===b.audioGroupId||h.type===ye.SUBTITLE_TRACK&&h.groupId===b.textGroupId)){s.errorAction=this.getPlaylistRetryOrSwitchAction(s,f.loadLevel),s.errorAction.action=dr.SendAlternateToPenaltyBox,s.errorAction.flags=rn.MoveAllAlternatesMatchingHost;return}}return;case z.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{var S=f.levels[f.loadLevel],E=S==null?void 0:S.attrs["HDCP-LEVEL"];E&&(s.errorAction={action:dr.SendAlternateToPenaltyBox,flags:rn.MoveAllAlternatesMatchingHDCP,hdcpLevel:E})}return;case z.BUFFER_ADD_CODEC_ERROR:case z.REMUX_ALLOC_ERROR:s.errorAction=this.getLevelSwitchAction(s,(o=s.level)!=null?o:f.loadLevel);return;case z.INTERNAL_EXCEPTION:case z.BUFFER_APPENDING_ERROR:case z.BUFFER_APPEND_ERROR:case z.BUFFER_FULL_ERROR:case z.LEVEL_SWITCH_ERROR:case z.BUFFER_STALLED_ERROR:case z.BUFFER_SEEK_OVER_HOLE:case z.BUFFER_NUDGE_ON_STALL:s.errorAction={action:dr.DoNothing,flags:rn.None};return}if(s.type===le.KEY_SYSTEM_ERROR){var A=this.getVariantLevelIndex(s.frag);s.levelRetry=!1,s.errorAction=this.getLevelSwitchAction(s,A);return}}},c.getPlaylistRetryOrSwitchAction=function(r,s){var o,f=this.hls,h=yf(f.config.playlistLoadPolicy,r),v=this.playlistError++,m=(o=r.response)==null?void 0:o.code,y=Bo(h,v,ls(r),m);if(y)return{action:dr.RetryRequest,flags:rn.None,retryConfig:h,retryCount:v};var b=this.getLevelSwitchAction(r,s);return h&&(b.retryConfig=h,b.retryCount=v),b},c.getFragRetryOrSwitchAction=function(r){var s=this.hls,o=this.getVariantLevelIndex(r.frag),f=s.levels[o],h=s.config,v=h.fragLoadPolicy,m=h.keyLoadPolicy,y=yf(r.details.startsWith("key")?m:v,r),b=s.levels.reduce(function(P,O){return P+O.fragmentError},0);if(f){var S;r.details!==z.FRAG_GAP&&f.fragmentError++;var E=(S=r.response)==null?void 0:S.code,A=Bo(y,b,ls(r),E);if(A)return{action:dr.RetryRequest,flags:rn.None,retryConfig:y,retryCount:b}}var x=this.getLevelSwitchAction(r,o);return y&&(x.retryConfig=y,x.retryCount=b),x},c.getLevelSwitchAction=function(r,s){var o=this.hls;s==null&&(s=o.loadLevel);var f=this.hls.levels[s];if(f&&(f.loadError++,o.autoLevelEnabled)){for(var h,v,m=-1,y=o.levels,b=o.loadLevel,S=o.minAutoLevel,E=o.maxAutoLevel,A=(h=r.frag)==null?void 0:h.type,x=(v=r.context)!=null?v:{},P=x.type,O=x.groupId,M=y.length;M--;){var D=(M+b)%y.length;if(D!==b&&D>=S&&D<=E&&y[D].loadError===0){var j=y[D];if(r.details===z.FRAG_GAP&&r.frag){var K=y[D].details;if(K){var he=ql(r.frag,K.fragments,r.frag.start);if(he!=null&&he.gap)continue}}else{if(P===ye.AUDIO_TRACK&&O===j.audioGroupId||P===ye.SUBTITLE_TRACK&&O===j.textGroupId)continue;if(A===st.AUDIO&&f.audioGroupId===j.audioGroupId||A===st.SUBTITLE&&f.textGroupId===j.textGroupId)continue}m=D;break}}if(m>-1&&o.loadLevel!==m)return r.levelRetry=!0,this.playlistError=0,{action:dr.SendAlternateToPenaltyBox,flags:rn.None,nextAutoLevel:m}}return{action:dr.SendAlternateToPenaltyBox,flags:rn.MoveAllAlternatesMatchingHost}},c.onErrorOut=function(r,s){var o;switch((o=s.errorAction)==null?void 0:o.action){case dr.DoNothing:break;case dr.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(s),!s.errorAction.resolved&&s.details!==z.FRAG_GAP&&(s.fatal=!0);break}if(s.fatal){this.hls.stopLoad();return}},c.sendAlternateToPenaltyBox=function(r){var s=this.hls,o=r.errorAction;if(o){var f=o.flags,h=o.hdcpLevel,v=o.nextAutoLevel;switch(f){case rn.None:this.switchLevel(r,v);break;case rn.MoveAllAlternatesMatchingHost:o.resolved||(o.resolved=this.redundantFailover(r));break;case rn.MoveAllAlternatesMatchingHDCP:h&&(s.maxHdcpLevel=jn[jn.indexOf(h)-1],o.resolved=!0),this.warn('Restricting playback to HDCP-LEVEL of "'+s.maxHdcpLevel+'" or lower');break}o.resolved||this.switchLevel(r,v)}},c.switchLevel=function(r,s){s!==void 0&&r.errorAction&&(this.warn("switching to level "+s+" after "+r.details),this.hls.nextAutoLevel=s,r.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)},c.redundantFailover=function(r){var s=this,o=this.hls,f=this.penalizedRenditions,h=r.parent===st.MAIN?r.level:o.loadLevel,v=o.levels[h],m=v.url.length,y=r.frag?r.frag.urlId:v.urlId;v.urlId===y&&(!r.frag||v.details)&&this.penalizeRendition(v,r);for(var b=function(){var x=(y+S)%m,P=f[x];if(!P||x2(P,r,f[y]))return s.warn("Switching to Redundant Stream "+(x+1)+"/"+m+': "'+v.url[x]+'" after '+r.details),s.playlistError=0,o.levels.forEach(function(O){O.urlId=x}),o.nextLoadLevel=h,{v:!0}},S=1;S<m;S++){var E=b();if(typeof E=="object")return E.v}return!1},c.penalizeRendition=function(r,s){var o=this.penalizedRenditions,f=o[r.urlId]||{lastErrorPerfMs:0,errors:[],details:void 0};f.lastErrorPerfMs=performance.now(),f.errors.push(s),f.details=r.details,o[r.urlId]=f},d}();function x2(d,c,u){if(performance.now()-d.lastErrorPerfMs>E2)return!0;var r=d.details;if(c.details===z.FRAG_GAP&&r&&c.frag){var s=c.frag.start,o=ql(null,r.fragments,s);if(o&&!o.gap)return!0}if(u&&d.errors.length<u.errors.length){var f=d.errors[d.errors.length-1];if(r&&f.frag&&c.frag&&Math.abs(f.frag.start-c.frag.start)>r.targetduration*3)return!0}return!1}var w2=function(){function d(u,r){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=B.log.bind(B,r+":"),this.warn=B.warn.bind(B,r+":"),this.hls=u}var c=d.prototype;return c.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},c.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},c.startLoad=function(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()},c.stopLoad=function(){this.canLoad=!1,this.clearTimer()},c.switchParams=function(r,s){var o=s==null?void 0:s.renditionReports;if(o){for(var f=-1,h=0;h<o.length;h++){var v=o[h],m=void 0;try{m=new self.URL(v.URI,s.url).href}catch(A){B.warn("Could not construct new URL for Rendition Report: "+A),m=v.URI||""}if(m===r){f=h;break}else m===r.substring(0,m.length)&&(f=h)}if(f!==-1){var y=o[f],b=parseInt(y["LAST-MSN"])||(s==null?void 0:s.lastPartSn),S=parseInt(y["LAST-PART"])||(s==null?void 0:s.lastPartIndex);if(this.hls.config.lowLatencyMode){var E=Math.min(s.age-s.partTarget,s.targetduration);S>=0&&E>s.partTarget&&(S+=1)}return new as(b,S>=0?S:void 0,Nr.No)}}},c.loadPlaylist=function(r){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())},c.shouldLoadPlaylist=function(r){return this.canLoad&&!!r&&!!r.url&&(!r.details||r.details.live)},c.shouldReloadPlaylist=function(r){return this.timer===-1&&this.requestScheduled===-1&&this.shouldLoadPlaylist(r)},c.playlistLoaded=function(r,s,o){var f=this,h=s.details,v=s.stats,m=self.performance.now(),y=v.loading.first?Math.max(0,m-v.loading.first):0;if(h.advancedDateTime=Date.now()-y,h.live||o!=null&&o.live){if(h.reloaded(o),o&&this.log("live playlist "+r+" "+(h.advanced?"REFRESHED "+h.lastPartSn+"-"+h.lastPartIndex:"MISSED")),o&&h.fragments.length>0&&Pi(o,h),!this.canLoad||!h.live)return;var b,S=void 0,E=void 0;if(h.canBlockReload&&h.endSN&&h.advanced){var A=this.hls.config.lowLatencyMode,x=h.lastPartSn,P=h.endSN,O=h.lastPartIndex,M=O!==-1,D=x===P,j=A?0:O;M?(S=D?P+1:x,E=D?j:O+1):S=P+1;var K=h.age,he=K+h.ageHeader,re=Math.min(he-h.partTarget,h.targetduration*1.5);if(re>0){if(o&&re>o.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+o.tuneInGoal+" to: "+re+" with playlist age: "+h.age),re=0;else{var ne=Math.floor(re/h.targetduration);if(S+=ne,E!==void 0){var Ae=Math.round(re%h.targetduration/h.partTarget);E+=Ae}this.log("CDN Tune-in age: "+h.ageHeader+"s last advanced "+K.toFixed(2)+"s goal: "+re+" skip sn "+ne+" to part "+E)}h.tuneInGoal=re}if(b=this.getDeliveryDirectives(h,s.deliveryDirectives,S,E),A||!D){this.loadPlaylist(b);return}}else h.canBlockReload&&(b=this.getDeliveryDirectives(h,s.deliveryDirectives,S,E));var xe=this.hls.mainForwardBufferInfo,we=xe?xe.end-xe.len:0,Ve=(h.edge-we)*1e3,dt=Lr(h,Ve);h.updated&&m>this.requestScheduled+dt&&(this.requestScheduled=v.loading.start),S!==void 0&&h.canBlockReload?this.requestScheduled=v.loading.first+dt-(h.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+dt<m?this.requestScheduled=m:this.requestScheduled-m<=0&&(this.requestScheduled+=dt);var pt=this.requestScheduled-m;pt=Math.max(0,pt),this.log("reload live playlist "+r+" in "+Math.round(pt)+" ms"),this.timer=self.setTimeout(function(){return f.loadPlaylist(b)},pt)}else this.clearTimer()},c.getDeliveryDirectives=function(r,s,o,f){var h=Us(r,o);return s!=null&&s.skip&&r.deltaUpdateFailed&&(o=s.msn,f=s.part,h=Nr.No),new as(o,f,h)},c.checkRetry=function(r){var s=this,o=r.details,f=ls(r),h=r.errorAction,v=h||{},m=v.action,y=v.retryCount,b=y===void 0?0:y,S=v.retryConfig,E=!!h&&!!S&&(m===dr.RetryRequest||!h.resolved&&m===dr.SendAlternateToPenaltyBox);if(E){var A;if(this.requestScheduled=-1,b>=S.maxNumRetry)return!1;if(f&&(A=r.context)!=null&&A.deliveryDirectives)this.warn("Retrying playlist loading "+(b+1)+"/"+S.maxNumRetry+' after "'+o+'" without delivery-directives'),this.loadPlaylist();else{var x=Yl(S,b);this.timer=self.setTimeout(function(){return s.loadPlaylist()},x),this.warn("Retrying playlist loading "+(b+1)+"/"+S.maxNumRetry+' after "'+o+'" in '+x+"ms")}r.levelRetry=!0,h.resolved=!0}return E},d}(),Xl,P2=function(d){T(c,d);function c(r,s){var o;return o=d.call(this,r,"[level-controller]")||this,o._levels=[],o._firstLevel=-1,o._startLevel=void 0,o.currentLevel=null,o.currentLevelIndex=-1,o.manualLevelIndex=-1,o.steering=void 0,o.onParsedComplete=void 0,o.steering=s,o._registerListeners(),o}var u=c.prototype;return u._registerListeners=function(){var s=this.hls;s.on(L.MANIFEST_LOADING,this.onManifestLoading,this),s.on(L.MANIFEST_LOADED,this.onManifestLoaded,this),s.on(L.LEVEL_LOADED,this.onLevelLoaded,this),s.on(L.LEVELS_UPDATED,this.onLevelsUpdated,this),s.on(L.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),s.on(L.FRAG_LOADED,this.onFragLoaded,this),s.on(L.ERROR,this.onError,this)},u._unregisterListeners=function(){var s=this.hls;s.off(L.MANIFEST_LOADING,this.onManifestLoading,this),s.off(L.MANIFEST_LOADED,this.onManifestLoaded,this),s.off(L.LEVEL_LOADED,this.onLevelLoaded,this),s.off(L.LEVELS_UPDATED,this.onLevelsUpdated,this),s.off(L.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),s.off(L.FRAG_LOADED,this.onFragLoaded,this),s.off(L.ERROR,this.onError,this)},u.destroy=function(){this._unregisterListeners(),this.steering=null,this.resetLevels(),d.prototype.destroy.call(this)},u.startLoad=function(){var s=this._levels;s.forEach(function(o){o.loadError=0,o.fragmentError=0}),d.prototype.startLoad.call(this)},u.resetLevels=function(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[]},u.onManifestLoading=function(s,o){this.resetLevels()},u.onManifestLoaded=function(s,o){var f=[],h={},v;o.levels.forEach(function(m){var y,b=m.attrs;((y=m.audioCodec)==null?void 0:y.indexOf("mp4a.40.34"))!==-1&&(Xl||(Xl=/chrome|firefox/i.test(navigator.userAgent)),Xl&&(m.audioCodec=void 0));var S=b.AUDIO,E=b.CODECS,A=b["FRAME-RATE"];b["PATHWAY-ID"];var x=b.RESOLUTION,P=b.SUBTITLES,O="",M=""+O+m.bitrate+"-"+x+"-"+A+"-"+E;v=h[M],v?v.addFallback(m):(v=new os(m),h[M]=v,f.push(v)),Tf(v,"audio",S),Tf(v,"text",P)}),this.filterAndSortMediaOptions(f,o)},u.filterAndSortMediaOptions=function(s,o){var f=this,h=[],v=[],m=!1,y=!1,b=!1,S=s.filter(function(D){var j=D.audioCodec,K=D.videoCodec,he=D.width,re=D.height,ne=D.unknownCodecs;return m||(m=!!(he&&re)),y||(y=!!K),b||(b=!!j),!(ne!=null&&ne.length)&&(!j||Ii(j,"audio"))&&(!K||Ii(K,"video"))});if((m||y)&&b&&(S=S.filter(function(D){var j=D.videoCodec,K=D.width,he=D.height;return!!j||!!(K&&he)})),S.length===0){Promise.resolve().then(function(){if(f.hls){var D=new Error("no level with compatible codecs found in manifest");f.hls.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:o.url,error:D,reason:D.message})}});return}o.audioTracks&&(h=o.audioTracks.filter(function(D){return!D.audioCodec||Ii(D.audioCodec,"audio")}),Ef(h)),o.subtitles&&(v=o.subtitles,Ef(v));var E=S.slice(0);S.sort(function(D,j){return D.attrs["HDCP-LEVEL"]!==j.attrs["HDCP-LEVEL"]?(D.attrs["HDCP-LEVEL"]||"")>(j.attrs["HDCP-LEVEL"]||"")?1:-1:D.bitrate!==j.bitrate?D.bitrate-j.bitrate:D.attrs["FRAME-RATE"]!==j.attrs["FRAME-RATE"]?D.attrs.decimalFloatingPoint("FRAME-RATE")-j.attrs.decimalFloatingPoint("FRAME-RATE"):D.attrs.SCORE!==j.attrs.SCORE?D.attrs.decimalFloatingPoint("SCORE")-j.attrs.decimalFloatingPoint("SCORE"):m&&D.height!==j.height?D.height-j.height:0});var A=E[0];if(this.steering&&(S=this.steering.filterParsedLevels(S),S.length!==E.length)){for(var x=0;x<E.length;x++)if(E[x].pathwayId===S[0].pathwayId){A=E[x];break}}this._levels=S;for(var P=0;P<S.length;P++)if(S[P]===A){this._firstLevel=P,this.log("manifest loaded, "+S.length+" level(s) found, first bitrate: "+A.bitrate);break}var O=b&&!y,M={levels:S,audioTracks:h,subtitleTracks:v,sessionData:o.sessionData,sessionKeys:o.sessionKeys,firstLevel:this._firstLevel,stats:o.stats,audio:b,video:y,altAudio:!O&&h.some(function(D){return!!D.url})};this.hls.trigger(L.MANIFEST_PARSED,M),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)},u.onError=function(s,o){o.fatal||!o.context||o.context.type===ye.LEVEL&&o.context.level===this.level&&this.checkRetry(o)},u.onFragLoaded=function(s,o){var f=o.frag;if(f!==void 0&&f.type===st.MAIN){var h=this._levels[f.level];h!==void 0&&(h.loadError=0)}},u.onLevelLoaded=function(s,o){var f,h=o.level,v=o.details,m=this._levels[h];if(!m){var y;this.warn("Invalid level index "+h),(y=o.deliveryDirectives)!=null&&y.skip&&(v.deltaUpdateFailed=!0);return}h===this.currentLevelIndex?(m.fragmentError===0&&(m.loadError=0),this.playlistLoaded(h,o,m.details)):(f=o.deliveryDirectives)!=null&&f.skip&&(v.deltaUpdateFailed=!0)},u.onAudioTrackSwitched=function(s,o){var f=this.currentLevel;if(f){var h=this.hls.audioTracks[o.id].groupId;if(f.audioGroupIds&&f.audioGroupId!==h){for(var v=-1,m=0;m<f.audioGroupIds.length;m++)if(f.audioGroupIds[m]===h){v=m;break}v!==-1&&v!==f.urlId&&(f.urlId=v,this.canLoad&&this.startLoad())}}},u.loadPlaylist=function(s){d.prototype.loadPlaylist.call(this);var o=this.currentLevelIndex,f=this.currentLevel;if(f&&this.shouldLoadPlaylist(f)){var h=f.urlId,v=f.uri;if(s)try{v=s.addDirectives(v)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}var m=f.attrs["PATHWAY-ID"];this.log("Loading level index "+o+((s==null?void 0:s.msn)!==void 0?" at sn "+s.msn+" part "+s.part:"")+" with"+(m?" Pathway "+m:"")+" URI "+(h+1)+"/"+f.url.length+" "+v),this.clearTimer(),this.hls.trigger(L.LEVEL_LOADING,{url:v,level:o,id:h,deliveryDirectives:s||null})}},u.removeLevel=function(s,o){var f=this,h=function(y,b){return b!==o},v=this._levels.filter(function(m,y){return y!==s?!0:m.url.length>1&&o!==void 0?(m.url=m.url.filter(h),m.audioGroupIds&&(m.audioGroupIds=m.audioGroupIds.filter(h)),m.textGroupIds&&(m.textGroupIds=m.textGroupIds.filter(h)),m.urlId=0,!0):(f.steering&&f.steering.removeLevel(m),!1)});this.hls.trigger(L.LEVELS_UPDATED,{levels:v})},u.onLevelsUpdated=function(s,o){var f=o.levels;f.forEach(function(h,v){var m=h.details;m!=null&&m.fragments&&m.fragments.forEach(function(y){y.level=v})}),this._levels=f},p(c,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(s){var o=this._levels;if(o.length!==0){if(s<0||s>=o.length){var f=new Error("invalid level idx"),h=s<0;if(this.hls.trigger(L.ERROR,{type:le.OTHER_ERROR,details:z.LEVEL_SWITCH_ERROR,level:s,fatal:h,error:f,reason:f.message}),h)return;s=Math.min(s,o.length-1)}var v=this.currentLevelIndex,m=this.currentLevel,y=m?m.attrs["PATHWAY-ID"]:void 0,b=o[s],S=b.attrs["PATHWAY-ID"];if(this.currentLevelIndex=s,this.currentLevel=b,!(v===s&&b.details&&m&&y===S)){this.log("Switching to level "+s+(S?" with Pathway "+S:"")+" from level "+v+(y?" with Pathway "+y:""));var E=k({},b,{level:s,maxBitrate:b.maxBitrate,attrs:b.attrs,uri:b.uri,urlId:b.urlId});delete E._attrs,delete E._urlId,this.hls.trigger(L.LEVEL_SWITCHING,E);var A=b.details;if(!A||A.live){var x=this.switchParams(b.uri,m==null?void 0:m.details);this.loadPlaylist(x)}}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(s){this.manualLevelIndex=s,this._startLevel===void 0&&(this._startLevel=s),s!==-1&&(this.level=s)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(s){this._firstLevel=s}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var s=this.hls.config.startLevel;return s!==void 0?s:this._firstLevel}else return this._startLevel},set:function(s){this._startLevel=s}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(s){this.level=s,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=s)}}]),c}(w2);function Tf(d,c,u){u&&(c==="audio"?(d.audioGroupIds||(d.audioGroupIds=[]),d.audioGroupIds[d.url.length-1]=u):c==="text"&&(d.textGroupIds||(d.textGroupIds=[]),d.textGroupIds[d.url.length-1]=u))}function Ef(d){var c={};d.forEach(function(u){var r=u.groupId||"";u.id=c[r]=c[r]||0,c[r]++})}var fr={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},C2=function(){function d(u){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=u,this._registerListeners()}var c=d.prototype;return c._registerListeners=function(){var r=this.hls;r.on(L.BUFFER_APPENDED,this.onBufferAppended,this),r.on(L.FRAG_BUFFERED,this.onFragBuffered,this),r.on(L.FRAG_LOADED,this.onFragLoaded,this)},c._unregisterListeners=function(){var r=this.hls;r.off(L.BUFFER_APPENDED,this.onBufferAppended,this),r.off(L.FRAG_BUFFERED,this.onFragBuffered,this),r.off(L.FRAG_LOADED,this.onFragLoaded,this)},c.destroy=function(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null},c.getAppendedFrag=function(r,s){var o=this.activePartLists[s];if(o)for(var f=o.length;f--;){var h=o[f];if(!h)break;var v=h.end;if(h.start<=r&&v!==null&&r<=v)return h}return this.getBufferedFrag(r,s)},c.getBufferedFrag=function(r,s){for(var o=this.fragments,f=Object.keys(o),h=f.length;h--;){var v=o[f[h]];if((v==null?void 0:v.body.type)===s&&v.buffered){var m=v.body;if(m.start<=r&&r<=m.end)return m}}return null},c.detectEvictedFragments=function(r,s,o,f){var h=this;this.timeRanges&&(this.timeRanges[r]=s);var v=(f==null?void 0:f.fragment.sn)||-1;Object.keys(this.fragments).forEach(function(m){var y=h.fragments[m];if(y&&!(v>=y.body.sn)){if(!y.buffered&&!y.loaded){y.body.type===o&&h.removeFragment(y.body);return}var b=y.range[r];b&&b.time.some(function(S){var E=!h.isTimeBuffered(S.startPTS,S.endPTS,s);return E&&h.removeFragment(y.body),E})}})},c.detectPartialFragments=function(r){var s=this,o=this.timeRanges,f=r.frag,h=r.part;if(!(!o||f.sn==="initSegment")){var v=Ws(f),m=this.fragments[v];if(m){var y=!f.relurl;Object.keys(o).forEach(function(b){var S=f.elementaryStreams[b];if(S){var E=o[b],A=y||S.partial===!0;m.range[b]=s.getBufferedTimes(f,h,A,E)}}),m.loaded=null,Object.keys(m.range).length?(m.buffered=!0,m.body.endList&&(this.endListFragments[m.body.type]=m),Mo(m)||this.removeParts(f.sn-1,f.type)):this.removeFragment(m.body)}}},c.removeParts=function(r,s){var o=this.activePartLists[s];o&&(this.activePartLists[s]=o.filter(function(f){return f.fragment.sn>=r}))},c.fragBuffered=function(r,s){var o=Ws(r),f=this.fragments[o];!f&&s&&(f=this.fragments[o]={body:r,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},r.gap&&(this.hasGaps=!0)),f&&(f.loaded=null,f.buffered=!0)},c.getBufferedTimes=function(r,s,o,f){for(var h={time:[],partial:o},v=r.start,m=r.end,y=r.minEndPTS||m,b=r.maxStartPTS||v,S=0;S<f.length;S++){var E=f.start(S)-this.bufferPadding,A=f.end(S)+this.bufferPadding;if(b>=E&&y<=A){h.time.push({startPTS:Math.max(v,f.start(S)),endPTS:Math.min(m,f.end(S))});break}else if(v<A&&m>E)h.partial=!0,h.time.push({startPTS:Math.max(v,f.start(S)),endPTS:Math.min(m,f.end(S))});else if(m<=E)break}return h},c.getPartialFragment=function(r){var s=null,o,f,h,v=0,m=this.bufferPadding,y=this.fragments;return Object.keys(y).forEach(function(b){var S=y[b];S&&Mo(S)&&(f=S.body.start-m,h=S.body.end+m,r>=f&&r<=h&&(o=Math.min(r-f,h-r),v<=o&&(s=S.body,v=o)))}),s},c.isEndListAppended=function(r){var s=this.endListFragments[r];return s!==void 0&&(s.buffered||Mo(s))},c.getState=function(r){var s=Ws(r),o=this.fragments[s];return o?o.buffered?Mo(o)?fr.PARTIAL:fr.OK:fr.APPENDING:fr.NOT_LOADED},c.isTimeBuffered=function(r,s,o){for(var f,h,v=0;v<o.length;v++){if(f=o.start(v)-this.bufferPadding,h=o.end(v)+this.bufferPadding,r>=f&&s<=h)return!0;if(s<=f)return!1}return!1},c.onFragLoaded=function(r,s){var o=s.frag,f=s.part;if(!(o.sn==="initSegment"||o.bitrateTest)){var h=f?null:s,v=Ws(o);this.fragments[v]={body:o,appendedPTS:null,loaded:h,buffered:!1,range:Object.create(null)}}},c.onBufferAppended=function(r,s){var o=this,f=s.frag,h=s.part,v=s.timeRanges;if(f.sn!=="initSegment"){var m=f.type;if(h){var y=this.activePartLists[m];y||(this.activePartLists[m]=y=[]),y.push(h)}this.timeRanges=v,Object.keys(v).forEach(function(b){var S=v[b];o.detectEvictedFragments(b,S,m,h)})}},c.onFragBuffered=function(r,s){this.detectPartialFragments(s)},c.hasFragment=function(r){var s=Ws(r);return!!this.fragments[s]},c.hasParts=function(r){var s;return!!((s=this.activePartLists[r])!=null&&s.length)},c.removeFragmentsInRange=function(r,s,o,f,h){var v=this;f&&!this.hasGaps||Object.keys(this.fragments).forEach(function(m){var y=v.fragments[m];if(y){var b=y.body;b.type!==o||f&&!b.gap||b.start<s&&b.end>r&&(y.buffered||h)&&v.removeFragment(b)}})},c.removeFragment=function(r){var s=Ws(r);r.stats.loaded=0,r.clearElementaryStreamInfo();var o=this.activePartLists[r.type];if(o){var f=r.sn;this.activePartLists[r.type]=o.filter(function(h){return h.fragment.sn!==f})}delete this.fragments[s],r.endList&&delete this.endListFragments[r.type]},c.removeAllFragments=function(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1},d}();function Mo(d){var c,u,r;return d.buffered&&(d.body.gap||((c=d.range.video)==null?void 0:c.partial)||((u=d.range.audio)==null?void 0:u.partial)||((r=d.range.audiovideo)==null?void 0:r.partial))}function Ws(d){return d.type+"_"+d.level+"_"+d.urlId+"_"+d.sn}var Af=Math.pow(2,17),L2=function(){function d(u){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=u}var c=d.prototype;return c.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},c.abort=function(){this.loader&&this.loader.abort()},c.load=function(r,s){var o=this,f=r.url;if(!f)return Promise.reject(new kn({type:le.NETWORK_ERROR,details:z.FRAG_LOAD_ERROR,fatal:!1,frag:r,error:new Error("Fragment does not have a "+(f?"part list":"url")),networkDetails:null}));this.abort();var h=this.config,v=h.fLoader,m=h.loader;return new Promise(function(y,b){if(o.loader&&o.loader.destroy(),r.gap){b(wf(r));return}var S=o.loader=r.loader=v?new v(h):new m(h),E=xf(r),A=bf(h.fragLoadPolicy.default),x={loadPolicy:A,timeout:A.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:r.sn==="initSegment"?1/0:Af};r.stats=S.stats,S.load(E,x,{onSuccess:function(O,M,D,j){o.resetLoader(r,S);var K=O.data;D.resetIV&&r.decryptdata&&(r.decryptdata.iv=new Uint8Array(K.slice(0,16)),K=K.slice(16)),y({frag:r,part:null,payload:K,networkDetails:j})},onError:function(O,M,D,j){o.resetLoader(r,S),b(new kn({type:le.NETWORK_ERROR,details:z.FRAG_LOAD_ERROR,fatal:!1,frag:r,response:l({url:f,data:void 0},O),error:new Error("HTTP Error "+O.code+" "+O.text),networkDetails:D,stats:j}))},onAbort:function(O,M,D){o.resetLoader(r,S),b(new kn({type:le.NETWORK_ERROR,details:z.INTERNAL_ABORTED,fatal:!1,frag:r,error:new Error("Aborted"),networkDetails:D,stats:O}))},onTimeout:function(O,M,D){o.resetLoader(r,S),b(new kn({type:le.NETWORK_ERROR,details:z.FRAG_LOAD_TIMEOUT,fatal:!1,frag:r,error:new Error("Timeout after "+x.timeout+"ms"),networkDetails:D,stats:O}))},onProgress:function(O,M,D,j){s&&s({frag:r,part:null,payload:D,networkDetails:j})}})})},c.loadPart=function(r,s,o){var f=this;this.abort();var h=this.config,v=h.fLoader,m=h.loader;return new Promise(function(y,b){if(f.loader&&f.loader.destroy(),r.gap||s.gap){b(wf(r,s));return}var S=f.loader=r.loader=v?new v(h):new m(h),E=xf(r,s),A=bf(h.fragLoadPolicy.default),x={loadPolicy:A,timeout:A.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Af};s.stats=S.stats,S.load(E,x,{onSuccess:function(O,M,D,j){f.resetLoader(r,S),f.updateStatsFromPart(r,s);var K={frag:r,part:s,payload:O.data,networkDetails:j};o(K),y(K)},onError:function(O,M,D,j){f.resetLoader(r,S),b(new kn({type:le.NETWORK_ERROR,details:z.FRAG_LOAD_ERROR,fatal:!1,frag:r,part:s,response:l({url:E.url,data:void 0},O),error:new Error("HTTP Error "+O.code+" "+O.text),networkDetails:D,stats:j}))},onAbort:function(O,M,D){r.stats.aborted=s.stats.aborted,f.resetLoader(r,S),b(new kn({type:le.NETWORK_ERROR,details:z.INTERNAL_ABORTED,fatal:!1,frag:r,part:s,error:new Error("Aborted"),networkDetails:D,stats:O}))},onTimeout:function(O,M,D){f.resetLoader(r,S),b(new kn({type:le.NETWORK_ERROR,details:z.FRAG_LOAD_TIMEOUT,fatal:!1,frag:r,part:s,error:new Error("Timeout after "+x.timeout+"ms"),networkDetails:D,stats:O}))}})})},c.updateStatsFromPart=function(r,s){var o=r.stats,f=s.stats,h=f.total;if(o.loaded+=f.loaded,h){var v=Math.round(r.duration/s.duration),m=Math.min(Math.round(o.loaded/h),v),y=v-m,b=y*Math.round(o.loaded/m);o.total=o.loaded+b}else o.total=Math.max(o.loaded,o.total);var S=o.loading,E=f.loading;S.start?S.first+=E.first-E.start:(S.start=E.start,S.first=E.first),S.end=E.end},c.resetLoader=function(r,s){r.loader=null,this.loader===s&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),s.destroy()},d}();function xf(d,c){c===void 0&&(c=null);var u=c||d,r={frag:d,part:c,responseType:"arraybuffer",url:u.url,headers:{},rangeStart:0,rangeEnd:0},s=u.byteRangeStartOffset,o=u.byteRangeEndOffset;if(Z(s)&&Z(o)){var f,h=s,v=o;if(d.sn==="initSegment"&&((f=d.decryptdata)==null?void 0:f.method)==="AES-128"){var m=o-s;m%16&&(v=o+(16-m%16)),s!==0&&(r.resetIV=!0,h=s-16)}r.rangeStart=h,r.rangeEnd=v}return r}function wf(d,c){var u=new Error("GAP "+(d.gap?"tag":"attribute")+" found"),r={type:le.MEDIA_ERROR,details:z.FRAG_GAP,fatal:!1,frag:d,error:u,networkDetails:null};return c&&(r.part=c),(c||d).stats.aborted=!0,new kn(r)}var kn=function(d){T(c,d);function c(u){var r;return r=d.call(this,u.error.message)||this,r.data=void 0,r.data=u,r}return c}(W(Error)),I2=function(){function d(u){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=u}var c=d.prototype;return c.abort=function(r){for(var s in this.keyUriToKeyInfo){var o=this.keyUriToKeyInfo[s].loader;if(o){if(r&&r!==o.context.frag.type)return;o.abort()}}},c.detach=function(){for(var r in this.keyUriToKeyInfo){var s=this.keyUriToKeyInfo[r];(s.mediaKeySessionContext||s.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[r]}},c.destroy=function(){this.detach();for(var r in this.keyUriToKeyInfo){var s=this.keyUriToKeyInfo[r].loader;s&&s.destroy()}this.keyUriToKeyInfo={}},c.createKeyLoadError=function(r,s,o,f,h){return s===void 0&&(s=z.KEY_LOAD_ERROR),new kn({type:le.NETWORK_ERROR,details:s,fatal:!1,frag:r,response:h,error:o,networkDetails:f})},c.loadClear=function(r,s){var o=this;if(this.emeController&&this.config.emeEnabled)for(var f=r.sn,h=r.cc,v=function(){var S=s[m];if(h<=S.cc&&(f==="initSegment"||S.sn==="initSegment"||f<S.sn))return o.emeController.selectKeySystemFormat(S).then(function(E){S.setKeyFormat(E)}),"break"},m=0;m<s.length;m++){var y=v();if(y==="break")break}},c.load=function(r){var s=this;return!r.decryptdata&&r.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(r).then(function(o){return s.loadInternal(r,o)}):this.loadInternal(r)},c.loadInternal=function(r,s){var o,f;s&&r.setKeyFormat(s);var h=r.decryptdata;if(!h){var v=new Error(s?"Expected frag.decryptdata to be defined after setting format "+s:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(r,z.KEY_LOAD_ERROR,v))}var m=h.uri;if(!m)return Promise.reject(this.createKeyLoadError(r,z.KEY_LOAD_ERROR,new Error('Invalid key URI: "'+m+'"')));var y=this.keyUriToKeyInfo[m];if((o=y)!=null&&o.decryptdata.key)return h.key=y.decryptdata.key,Promise.resolve({frag:r,keyInfo:y});if((f=y)!=null&&f.keyLoadPromise){var b;switch((b=y.mediaKeySessionContext)==null?void 0:b.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return y.keyLoadPromise.then(function(S){return h.key=S.keyInfo.decryptdata.key,{frag:r,keyInfo:y}})}}switch(y=this.keyUriToKeyInfo[m]={decryptdata:h,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},h.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return h.keyFormat==="identity"?this.loadKeyHTTP(y,r):this.loadKeyEME(y,r);case"AES-128":return this.loadKeyHTTP(y,r);default:return Promise.reject(this.createKeyLoadError(r,z.KEY_LOAD_ERROR,new Error('Key supplied with unsupported METHOD: "'+h.method+'"')))}},c.loadKeyEME=function(r,s){var o={frag:s,keyInfo:r};if(this.emeController&&this.config.emeEnabled){var f=this.emeController.loadKey(o);if(f)return(r.keyLoadPromise=f.then(function(h){return r.mediaKeySessionContext=h,o})).catch(function(h){throw r.keyLoadPromise=null,h})}return Promise.resolve(o)},c.loadKeyHTTP=function(r,s){var o=this,f=this.config,h=f.loader,v=new h(f);return s.keyLoader=r.loader=v,r.keyLoadPromise=new Promise(function(m,y){var b={keyInfo:r,frag:s,responseType:"arraybuffer",url:r.decryptdata.uri},S=f.keyLoadPolicy.default,E={loadPolicy:S,timeout:S.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},A={onSuccess:function(P,O,M,D){var j=M.frag,K=M.keyInfo,he=M.url;if(!j.decryptdata||K!==o.keyUriToKeyInfo[he])return y(o.createKeyLoadError(j,z.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),D));K.decryptdata.key=j.decryptdata.key=new Uint8Array(P.data),j.keyLoader=null,K.loader=null,m({frag:j,keyInfo:K})},onError:function(P,O,M,D){o.resetLoader(O),y(o.createKeyLoadError(s,z.KEY_LOAD_ERROR,new Error("HTTP Error "+P.code+" loading key "+P.text),M,l({url:b.url,data:void 0},P)))},onTimeout:function(P,O,M){o.resetLoader(O),y(o.createKeyLoadError(s,z.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),M))},onAbort:function(P,O,M){o.resetLoader(O),y(o.createKeyLoadError(s,z.INTERNAL_ABORTED,new Error("key loading aborted"),M))}};v.load(b,E,A)})},c.resetLoader=function(r){var s=r.frag,o=r.keyInfo,f=r.url,h=o.loader;s.keyLoader===h&&(s.keyLoader=null,o.loader=null),delete this.keyUriToKeyInfo[f],h&&h.destroy()},d}(),R2=function(){function d(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var c=d.prototype;return c.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},c.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},c.onHandlerDestroyed=function(){},c.hasInterval=function(){return!!this._tickInterval},c.hasNextTick=function(){return!!this._tickTimer},c.setInterval=function(r){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,r),!0)},c.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},c.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},c.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},c.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},c.doTick=function(){},d}(),D2={length:0,start:function(){return 0},end:function(){return 0}},Oi=function(){function d(){}return d.isBuffered=function(u,r){try{if(u){for(var s=d.getBuffered(u),o=0;o<s.length;o++)if(r>=s.start(o)&&r<=s.end(o))return!0}}catch(f){}return!1},d.bufferInfo=function(u,r,s){try{if(u){var o=d.getBuffered(u),f=[],h;for(h=0;h<o.length;h++)f.push({start:o.start(h),end:o.end(h)});return this.bufferedInfo(f,r,s)}}catch(v){}return{len:0,start:r,end:r,nextStart:void 0}},d.bufferedInfo=function(u,r,s){r=Math.max(0,r),u.sort(function(P,O){var M=P.start-O.start;return M||O.end-P.end});var o=[];if(s)for(var f=0;f<u.length;f++){var h=o.length;if(h){var v=o[h-1].end;u[f].start-v<s?u[f].end>v&&(o[h-1].end=u[f].end):o.push(u[f])}else o.push(u[f])}else o=u;for(var m=0,y,b=r,S=r,E=0;E<o.length;E++){var A=o[E].start,x=o[E].end;if(r+s>=A&&r<x)b=A,S=x,m=S-r;else if(r+s<A){y=A;break}}return{len:m,start:b||0,end:S||0,nextStart:y}},d.getBuffered=function(u){try{return u.buffered}catch(r){return B.log("failed to get media.buffered",r),D2}},d}(),Pf=function(c,u,r,s,o,f){s===void 0&&(s=0),o===void 0&&(o=-1),f===void 0&&(f=!1),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=No(),this.buffering={audio:No(),video:No(),audiovideo:No()},this.level=c,this.sn=u,this.id=r,this.size=s,this.part=o,this.partial=f};function No(){return{start:0,executeStart:0,executeEnd:0,end:0}}function O2(d,c){for(var u=null,r=0,s=d.length;r<s;r++){var o=d[r];if(o&&o.cc===c){u=o;break}}return u}function B2(d,c,u){return!!(c.details&&(u.endCC>u.startCC||d&&d.cc<u.startCC))}function M2(d,c,u){var r=d.fragments,s=c.fragments;if(!s.length||!r.length){B.log("No fragments to align");return}var o=O2(r,s[0].cc);if(!o||o&&!o.startPTS){B.log("No frag in previous level to align on");return}return o}function Cf(d,c){if(d){var u=d.start+c;d.start=d.startPTS=u,d.endPTS=u+d.duration}}function Lf(d,c){for(var u=c.fragments,r=0,s=u.length;r<s;r++)Cf(u[r],d);c.fragmentHint&&Cf(c.fragmentHint,d),c.alignedSliding=!0}function N2(d,c,u){c&&(F2(d,u,c),!u.alignedSliding&&c.details&&U2(u,c.details),!u.alignedSliding&&c.details&&!u.skippedSegments&&ba(c.details,u))}function F2(d,c,u){if(B2(d,u,c)){var r=M2(u.details,c);r&&Z(r.start)&&(B.log("Adjusting PTS using last level due to CC increase within current level "+c.url),Lf(r.start,c))}}function U2(d,c){if(!(!c.fragments.length||!d.hasProgramDateTime||!c.hasProgramDateTime)){var u=c.fragments[0].programDateTime,r=d.fragments[0].programDateTime,s=(r-u)/1e3+c.fragments[0].start;s&&Z(s)&&(B.log("Adjusting PTS using programDateTime delta "+(r-u)+"ms, sliding:"+s.toFixed(3)+" "+d.url+" "),Lf(s,d))}}var V2=function(){function d(u,r){this.subtle=void 0,this.aesIV=void 0,this.subtle=u,this.aesIV=r}var c=d.prototype;return c.decrypt=function(r,s){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},s,r)},d}(),W2=function(){function d(u,r){this.subtle=void 0,this.key=void 0,this.subtle=u,this.key=r}var c=d.prototype;return c.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},d}();function j2(d){var c=d.byteLength,u=c&&new DataView(d.buffer).getUint8(c-1);return u?yt(d,0,c-u):d}var G2=function(){function d(){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()}var c=d.prototype;return c.uint8ArrayToUint32Array_=function(r){for(var s=new DataView(r),o=new Uint32Array(4),f=0;f<4;f++)o[f]=s.getUint32(f*4);return o},c.initTable=function(){var r=this.sBox,s=this.invSBox,o=this.subMix,f=o[0],h=o[1],v=o[2],m=o[3],y=this.invSubMix,b=y[0],S=y[1],E=y[2],A=y[3],x=new Uint32Array(256),P=0,O=0,M=0;for(M=0;M<256;M++)M<128?x[M]=M<<1:x[M]=M<<1^283;for(M=0;M<256;M++){var D=O^O<<1^O<<2^O<<3^O<<4;D=D>>>8^D&255^99,r[P]=D,s[D]=P;var j=x[P],K=x[j],he=x[K],re=x[D]*257^D*16843008;f[P]=re<<24|re>>>8,h[P]=re<<16|re>>>16,v[P]=re<<8|re>>>24,m[P]=re,re=he*16843009^K*65537^j*257^P*16843008,b[D]=re<<24|re>>>8,S[D]=re<<16|re>>>16,E[D]=re<<8|re>>>24,A[D]=re,P?(P=j^x[x[x[he^j]]],O^=x[x[O]]):P=O=1}},c.expandKey=function(r){for(var s=this.uint8ArrayToUint32Array_(r),o=!0,f=0;f<s.length&&o;)o=s[f]===this.key[f],f++;if(!o){this.key=s;var h=this.keySize=s.length;if(h!==4&&h!==6&&h!==8)throw new Error("Invalid aes key size="+h);var v=this.ksRows=(h+6+1)*4,m,y,b=this.keySchedule=new Uint32Array(v),S=this.invKeySchedule=new Uint32Array(v),E=this.sBox,A=this.rcon,x=this.invSubMix,P=x[0],O=x[1],M=x[2],D=x[3],j,K;for(m=0;m<v;m++){if(m<h){j=b[m]=s[m];continue}K=j,m%h===0?(K=K<<8|K>>>24,K=E[K>>>24]<<24|E[K>>>16&255]<<16|E[K>>>8&255]<<8|E[K&255],K^=A[m/h|0]<<24):h>6&&m%h===4&&(K=E[K>>>24]<<24|E[K>>>16&255]<<16|E[K>>>8&255]<<8|E[K&255]),b[m]=j=(b[m-h]^K)>>>0}for(y=0;y<v;y++)m=v-y,y&3?K=b[m]:K=b[m-4],y<4||m<=4?S[y]=K:S[y]=P[E[K>>>24]]^O[E[K>>>16&255]]^M[E[K>>>8&255]]^D[E[K&255]],S[y]=S[y]>>>0}},c.networkToHostOrderSwap=function(r){return r<<24|(r&65280)<<8|(r&16711680)>>8|r>>>24},c.decrypt=function(r,s,o){for(var f=this.keySize+6,h=this.invKeySchedule,v=this.invSBox,m=this.invSubMix,y=m[0],b=m[1],S=m[2],E=m[3],A=this.uint8ArrayToUint32Array_(o),x=A[0],P=A[1],O=A[2],M=A[3],D=new Int32Array(r),j=new Int32Array(D.length),K,he,re,ne,Ae,xe,we,Ve,dt,pt,_t,Bt,St,zt,Ct=this.networkToHostOrderSwap;s<D.length;){for(dt=Ct(D[s]),pt=Ct(D[s+1]),_t=Ct(D[s+2]),Bt=Ct(D[s+3]),Ae=dt^h[0],xe=Bt^h[1],we=_t^h[2],Ve=pt^h[3],St=4,zt=1;zt<f;zt++)K=y[Ae>>>24]^b[xe>>16&255]^S[we>>8&255]^E[Ve&255]^h[St],he=y[xe>>>24]^b[we>>16&255]^S[Ve>>8&255]^E[Ae&255]^h[St+1],re=y[we>>>24]^b[Ve>>16&255]^S[Ae>>8&255]^E[xe&255]^h[St+2],ne=y[Ve>>>24]^b[Ae>>16&255]^S[xe>>8&255]^E[we&255]^h[St+3],Ae=K,xe=he,we=re,Ve=ne,St=St+4;K=v[Ae>>>24]<<24^v[xe>>16&255]<<16^v[we>>8&255]<<8^v[Ve&255]^h[St],he=v[xe>>>24]<<24^v[we>>16&255]<<16^v[Ve>>8&255]<<8^v[Ae&255]^h[St+1],re=v[we>>>24]<<24^v[Ve>>16&255]<<16^v[Ae>>8&255]<<8^v[xe&255]^h[St+2],ne=v[Ve>>>24]<<24^v[Ae>>16&255]<<16^v[xe>>8&255]<<8^v[we&255]^h[St+3],j[s]=Ct(K^x),j[s+1]=Ct(ne^P),j[s+2]=Ct(re^O),j[s+3]=Ct(he^M),x=dt,P=pt,O=_t,M=Bt,s=s+4}return j.buffer},d}(),z2=16,Zl=function(){function d(u,r){var s=r===void 0?{}:r,o=s.removePKCS7Padding,f=o===void 0?!0:o;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=u.enableSoftwareAES,this.removePKCS7Padding=f,f)try{var h=self.crypto;h&&(this.subtle=h.subtle||h.webkitSubtle)}catch(v){}this.subtle===null&&(this.useSoftware=!0)}var c=d.prototype;return c.destroy=function(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null},c.isSync=function(){return this.useSoftware},c.flush=function(){var r=this.currentResult,s=this.remainderData;if(!r||s)return this.reset(),null;var o=new Uint8Array(r);return this.reset(),this.removePKCS7Padding?j2(o):o},c.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},c.decrypt=function(r,s,o){var f=this;return this.useSoftware?new Promise(function(h,v){f.softwareDecrypt(new Uint8Array(r),s,o);var m=f.flush();m?h(m.buffer):v(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(r),s,o)},c.softwareDecrypt=function(r,s,o){var f=this.currentIV,h=this.currentResult,v=this.remainderData;this.logOnce("JS AES decrypt"),v&&(r=Y(v,r),this.remainderData=null);var m=this.getValidChunk(r);if(!m.length)return null;f&&(o=f);var y=this.softwareDecrypter;y||(y=this.softwareDecrypter=new G2),y.expandKey(s);var b=h;return this.currentResult=y.decrypt(m.buffer,0,o),this.currentIV=yt(m,-16).buffer,b||null},c.webCryptoDecrypt=function(r,s,o){var f=this,h=this.subtle;return(this.key!==s||!this.fastAesKey)&&(this.key=s,this.fastAesKey=new W2(h,s)),this.fastAesKey.expandKey().then(function(v){if(!h)return Promise.reject(new Error("web crypto not initialized"));f.logOnce("WebCrypto AES decrypt");var m=new V2(h,new Uint8Array(o));return m.decrypt(r.buffer,v)}).catch(function(v){return B.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, "+v.name+": "+v.message),f.onWebCryptoError(r,s,o)})},c.onWebCryptoError=function(r,s,o){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(r,s,o);var f=this.flush();if(f)return f.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")},c.getValidChunk=function(r){var s=r,o=r.length-r.length%z2;return o!==r.length&&(s=yt(r,0,o),this.remainderData=yt(r,o)),s},c.logOnce=function(r){this.logEnabled&&(B.log("[decrypter]: "+r),this.logEnabled=!1)},d}(),H2={toString:function(c){for(var u="",r=c.length,s=0;s<r;s++)u+="["+c.start(s).toFixed(3)+"-"+c.end(s).toFixed(3)+"]";return u}},Re={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},K2=function(d){T(c,d);function c(r,s,o,f,h){var v;return v=d.call(this)||this,v.hls=void 0,v.fragPrevious=null,v.fragCurrent=null,v.fragmentTracker=void 0,v.transmuxer=null,v._state=Re.STOPPED,v.playlistType=void 0,v.media=null,v.mediaBuffer=null,v.config=void 0,v.bitrateTest=!1,v.lastCurrentTime=0,v.nextLoadPosition=0,v.startPosition=0,v.startTimeOffset=null,v.loadedmetadata=!1,v.retryDate=0,v.levels=null,v.fragmentLoader=void 0,v.keyLoader=void 0,v.levelLastLoaded=null,v.startFragRequested=!1,v.decrypter=void 0,v.initPTS=[],v.onvseeking=null,v.onvended=null,v.logPrefix="",v.log=void 0,v.warn=void 0,v.playlistType=h,v.logPrefix=f,v.log=B.log.bind(B,f+":"),v.warn=B.warn.bind(B,f+":"),v.hls=r,v.fragmentLoader=new L2(r.config),v.keyLoader=o,v.fragmentTracker=s,v.config=r.config,v.decrypter=new Zl(r.config),r.on(L.MANIFEST_LOADED,v.onManifestLoaded,ue(v)),v}var u=c.prototype;return u.doTick=function(){this.onTickEnd()},u.onTickEnd=function(){},u.startLoad=function(s){},u.stopLoad=function(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);var s=this.fragCurrent;s!=null&&s.loader&&(s.abortRequests(),this.fragmentTracker.removeFragment(s)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=Re.STOPPED},u._streamEnded=function(s,o){if(o.live||s.nextStart||!s.end||!this.media)return!1;var f=o.partList;if(f!=null&&f.length){var h=f[f.length-1],v=Oi.isBuffered(this.media,h.start+h.duration/2);return v}var m=o.fragments[o.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(m)},u.getLevelDetails=function(){if(this.levels&&this.levelLastLoaded!==null){var s;return(s=this.levels[this.levelLastLoaded])==null?void 0:s.details}},u.onMediaAttached=function(s,o){var f=this.media=this.mediaBuffer=o.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),f.addEventListener("seeking",this.onvseeking),f.addEventListener("ended",this.onvended);var h=this.config;this.levels&&h.autoStartLoad&&this.state===Re.STOPPED&&this.startLoad(h.startPosition)},u.onMediaDetaching=function(){var s=this.media;s!=null&&s.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),s&&this.onvseeking&&this.onvended&&(s.removeEventListener("seeking",this.onvseeking),s.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()},u.onMediaSeeking=function(){var s=this.config,o=this.fragCurrent,f=this.media,h=this.mediaBuffer,v=this.state,m=f?f.currentTime:0,y=Oi.bufferInfo(h||f,m,s.maxBufferHole);if(this.log("media seeking to "+(Z(m)?m.toFixed(3):m)+", state: "+v),this.state===Re.ENDED)this.resetLoadingState();else if(o){var b=s.maxFragLookUpTolerance,S=o.start-b,E=o.start+o.duration+b;if(!y.len||E<y.start||S>y.end){var A=m>E;(m<S||A)&&(A&&o.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),o.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}f&&(this.fragmentTracker.removeFragmentsInRange(m,1/0,this.playlistType,!0),this.lastCurrentTime=m),!this.loadedmetadata&&!y.len&&(this.nextLoadPosition=this.startPosition=m),this.tickImmediate()},u.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},u.onManifestLoaded=function(s,o){this.startTimeOffset=o.startTimeOffset,this.initPTS=[]},u.onHandlerDestroying=function(){this.stopLoad(),d.prototype.onHandlerDestroying.call(this)},u.onHandlerDestroyed=function(){this.state=Re.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,d.prototype.onHandlerDestroyed.call(this)},u.loadFragment=function(s,o,f){this._loadFragForPlayback(s,o,f)},u._loadFragForPlayback=function(s,o,f){var h=this,v=function(y){if(h.fragContextChanged(s)){h.warn("Fragment "+s.sn+(y.part?" p: "+y.part.index:"")+" of level "+s.level+" was dropped during download."),h.fragmentTracker.removeFragment(s);return}s.stats.chunkCount++,h._handleFragmentLoadProgress(y)};this._doFragLoad(s,o,f,v).then(function(m){if(m){var y=h.state;if(h.fragContextChanged(s)){(y===Re.FRAG_LOADING||!h.fragCurrent&&y===Re.PARSING)&&(h.fragmentTracker.removeFragment(s),h.state=Re.IDLE);return}"payload"in m&&(h.log("Loaded fragment "+s.sn+" of level "+s.level),h.hls.trigger(L.FRAG_LOADED,m)),h._handleFragmentLoadComplete(m)}}).catch(function(m){h.state===Re.STOPPED||h.state===Re.ERROR||(h.warn(m),h.resetFragmentLoading(s))})},u.clearTrackerIfNeeded=function(s){var o,f=this.fragmentTracker,h=f.getState(s);if(h===fr.APPENDING){var v=s.type,m=this.getFwdBufferInfo(this.mediaBuffer,v),y=Math.max(s.duration,m?m.len:this.config.maxBufferLength);this.reduceMaxBufferLength(y)&&f.removeFragment(s)}else((o=this.mediaBuffer)==null?void 0:o.buffered.length)===0?f.removeAllFragments():f.hasParts(s.type)&&(f.detectPartialFragments({frag:s,part:null,stats:s.stats,id:s.type}),f.getState(s)===fr.PARTIAL&&f.removeFragment(s))},u.flushMainBuffer=function(s,o,f){if(f===void 0&&(f=null),!!(s-o)){var h={startOffset:s,endOffset:o,type:f};this.hls.trigger(L.BUFFER_FLUSHING,h)}},u._loadInitSegment=function(s,o){var f=this;this._doFragLoad(s,o).then(function(h){if(!h||f.fragContextChanged(s)||!f.levels)throw new Error("init load aborted");return h}).then(function(h){var v=f.hls,m=h.payload,y=s.decryptdata;if(m&&m.byteLength>0&&y&&y.key&&y.iv&&y.method==="AES-128"){var b=self.performance.now();return f.decrypter.decrypt(new Uint8Array(m),y.key.buffer,y.iv.buffer).catch(function(S){throw v.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_DECRYPT_ERROR,fatal:!1,error:S,reason:S.message,frag:s}),S}).then(function(S){var E=self.performance.now();return v.trigger(L.FRAG_DECRYPTED,{frag:s,payload:S,stats:{tstart:b,tdecrypt:E}}),h.payload=S,h})}return h}).then(function(h){var v=f.fragCurrent,m=f.hls,y=f.levels;if(!y)throw new Error("init load aborted, missing levels");var b=s.stats;f.state=Re.IDLE,o.fragmentError=0,s.data=new Uint8Array(h.payload),b.parsing.start=b.buffering.start=self.performance.now(),b.parsing.end=b.buffering.end=self.performance.now(),h.frag===v&&m.trigger(L.FRAG_BUFFERED,{stats:b,frag:v,part:null,id:s.type}),f.tick()}).catch(function(h){f.state===Re.STOPPED||f.state===Re.ERROR||(f.warn(h),f.resetFragmentLoading(s))})},u.fragContextChanged=function(s){var o=this.fragCurrent;return!s||!o||s.level!==o.level||s.sn!==o.sn||s.urlId!==o.urlId},u.fragBufferedComplete=function(s,o){var f,h,v,m,y=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+s.type+" sn: "+s.sn+(o?" part: "+o.index:"")+" of "+(this.playlistType===st.MAIN?"level":"track")+" "+s.level+" (frag:["+((f=s.startPTS)!=null?f:NaN).toFixed(3)+"-"+((h=s.endPTS)!=null?h:NaN).toFixed(3)+"] > buffer:"+(y?H2.toString(Oi.getBuffered(y)):"(detached)")+")"),this.state=Re.IDLE,y&&(!this.loadedmetadata&&s.type==st.MAIN&&y.buffered.length&&((v=this.fragCurrent)==null?void 0:v.sn)===((m=this.fragPrevious)==null?void 0:m.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())},u.seekToStartPos=function(){},u._handleFragmentLoadComplete=function(s){var o=this.transmuxer;if(o){var f=s.frag,h=s.part,v=s.partsLoaded,m=!v||v.length===0||v.some(function(b){return!b}),y=new Pf(f.level,f.sn,f.stats.chunkCount+1,0,h?h.index:-1,!m);o.flush(y)}},u._handleFragmentLoadProgress=function(s){},u._doFragLoad=function(s,o,f,h){var v,m=this;f===void 0&&(f=null);var y=o==null?void 0:o.details;if(!this.levels||!y)throw new Error("frag load aborted, missing level"+(y?"":" detail")+"s");var b=null;if(s.encrypted&&!((v=s.decryptdata)!=null&&v.key)?(this.log("Loading key for "+s.sn+" of ["+y.startSN+"-"+y.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+s.level),this.state=Re.KEY_LOADING,this.fragCurrent=s,b=this.keyLoader.load(s).then(function(M){if(!m.fragContextChanged(M.frag))return m.hls.trigger(L.KEY_LOADED,M),m.state===Re.KEY_LOADING&&(m.state=Re.IDLE),M}),this.hls.trigger(L.KEY_LOADING,{frag:s}),this.fragCurrent===null&&(b=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!s.encrypted&&y.encryptedFragments.length&&this.keyLoader.loadClear(s,y.encryptedFragments),f=Math.max(s.start,f||0),this.config.lowLatencyMode&&s.sn!=="initSegment"){var S=y.partList;if(S&&h){f>s.end&&y.fragmentHint&&(s=y.fragmentHint);var E=this.getNextPart(S,s,f);if(E>-1){var A=S[E];this.log("Loading part sn: "+s.sn+" p: "+A.index+" cc: "+s.cc+" of playlist ["+y.startSN+"-"+y.endSN+"] parts [0-"+E+"-"+(S.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+s.level+", target: "+parseFloat(f.toFixed(3))),this.nextLoadPosition=A.start+A.duration,this.state=Re.FRAG_LOADING;var x;return b?x=b.then(function(M){return!M||m.fragContextChanged(M.frag)?null:m.doFragPartsLoad(s,A,o,h)}).catch(function(M){return m.handleFragLoadError(M)}):x=this.doFragPartsLoad(s,A,o,h).catch(function(M){return m.handleFragLoadError(M)}),this.hls.trigger(L.FRAG_LOADING,{frag:s,part:A,targetBufferTime:f}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):x}else if(!s.url||this.loadedEndOfParts(S,f))return Promise.resolve(null)}}this.log("Loading fragment "+s.sn+" cc: "+s.cc+" "+(y?"of ["+y.startSN+"-"+y.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+s.level+", target: "+parseFloat(f.toFixed(3))),Z(s.sn)&&!this.bitrateTest&&(this.nextLoadPosition=s.start+s.duration),this.state=Re.FRAG_LOADING;var P=this.config.progressive,O;return P&&b?O=b.then(function(M){return!M||m.fragContextChanged(M==null?void 0:M.frag)?null:m.fragmentLoader.load(s,h)}).catch(function(M){return m.handleFragLoadError(M)}):O=Promise.all([this.fragmentLoader.load(s,P?h:void 0),b]).then(function(M){var D=M[0];return!P&&D&&h&&h(D),D}).catch(function(M){return m.handleFragLoadError(M)}),this.hls.trigger(L.FRAG_LOADING,{frag:s,targetBufferTime:f}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):O},u.doFragPartsLoad=function(s,o,f,h){var v=this;return new Promise(function(m,y){var b,S=[],E=(b=f.details)==null?void 0:b.partList,A=function x(P){v.fragmentLoader.loadPart(s,P,h).then(function(O){S[P.index]=O;var M=O.part;v.hls.trigger(L.FRAG_LOADED,O);var D=Gt(f,s.sn,P.index+1)||ai(E,s.sn,P.index+1);if(D)x(D);else return m({frag:s,part:M,partsLoaded:S})}).catch(y)};A(o)})},u.handleFragLoadError=function(s){if("data"in s){var o=s.data;s.data&&o.details===z.INTERNAL_ABORTED?this.handleFragLoadAborted(o.frag,o.part):this.hls.trigger(L.ERROR,o)}else this.hls.trigger(L.ERROR,{type:le.OTHER_ERROR,details:z.INTERNAL_EXCEPTION,err:s,error:s,fatal:!0});return null},u._handleTransmuxerFlush=function(s){var o=this.getCurrentContext(s);if(!o||this.state!==Re.PARSING){!this.fragCurrent&&this.state!==Re.STOPPED&&this.state!==Re.ERROR&&(this.state=Re.IDLE);return}var f=o.frag,h=o.part,v=o.level,m=self.performance.now();f.stats.parsing.end=m,h&&(h.stats.parsing.end=m),this.updateLevelTiming(f,h,v,s.partial)},u.getCurrentContext=function(s){var o=this.levels,f=this.fragCurrent,h=s.level,v=s.sn,m=s.part;if(!(o!=null&&o[h]))return this.warn("Levels object was unset while buffering fragment "+v+" of level "+h+". The current chunk will not be buffered."),null;var y=o[h],b=m>-1?Gt(y,v,m):null,S=b?b.fragment:We(y,v,f);return S?(f&&f!==S&&(S.stats=f.stats),{frag:S,part:b,level:y}):null},u.bufferFragmentData=function(s,o,f,h){var v;if(!(!s||this.state!==Re.PARSING)){var m=s.data1,y=s.data2,b=m;if(m&&y&&(b=Y(m,y)),!!((v=b)!=null&&v.length)){var S={type:s.type,frag:o,part:f,chunkMeta:h,parent:o.type,data:b};this.hls.trigger(L.BUFFER_APPENDING,S),s.dropped&&s.independent&&!f&&this.flushBufferGap(o)}}},u.flushBufferGap=function(s){var o=this.media;if(o){if(!Oi.isBuffered(o,o.currentTime)){this.flushMainBuffer(0,s.start);return}var f=o.currentTime,h=Oi.bufferInfo(o,f,0),v=s.duration,m=Math.min(this.config.maxFragLookUpTolerance*2,v*.25),y=Math.max(Math.min(s.start-m,h.end-m),f+m);s.start-y>m&&this.flushMainBuffer(y,s.start)}},u.getFwdBufferInfo=function(s,o){var f=this.getLoadPosition();return Z(f)?this.getFwdBufferInfoAtPos(s,f,o):null},u.getFwdBufferInfoAtPos=function(s,o,f){var h=this.config.maxBufferHole,v=Oi.bufferInfo(s,o,h);if(v.len===0&&v.nextStart!==void 0){var m=this.fragmentTracker.getBufferedFrag(o,f);if(m&&v.nextStart<m.end)return Oi.bufferInfo(s,o,Math.max(v.nextStart,h))}return v},u.getMaxBufferLength=function(s){var o=this.config,f;return s?f=Math.max(8*o.maxBufferSize/s,o.maxBufferLength):f=o.maxBufferLength,Math.min(f,o.maxMaxBufferLength)},u.reduceMaxBufferLength=function(s){var o=this.config,f=s||o.maxBufferLength;return o.maxMaxBufferLength>=f?(o.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+o.maxMaxBufferLength+"s"),!0):!1},u.getAppendedFrag=function(s,o){var f=this.fragmentTracker.getAppendedFrag(s,st.MAIN);return f&&"fragment"in f?f.fragment:f},u.getNextFragment=function(s,o){var f=o.fragments,h=f.length;if(!h)return null;var v=this.config,m=f[0].start,y;if(o.live){var b=v.initialLiveManifestSize;if(h<b)return this.warn("Not enough fragments to start playback (have: "+h+", need: "+b+")"),null;!o.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(y=this.getInitialLiveFragment(o,f),this.startPosition=y?this.hls.liveSyncPosition||y.start:s)}else s<=m&&(y=f[0]);if(!y){var S=v.lowLatencyMode?o.partEnd:o.fragmentEnd;y=this.getFragmentAtPosition(s,S,o)}return this.mapToInitFragWhenRequired(y)},u.isLoopLoading=function(s,o){var f=this.fragmentTracker.getState(s);return(f===fr.OK||f===fr.PARTIAL&&!!s.gap)&&this.nextLoadPosition>o},u.getNextFragmentLoopLoading=function(s,o,f,h,v){var m=s.gap,y=this.getNextFragment(this.nextLoadPosition,o);if(y===null)return y;if(s=y,m&&s&&!s.gap&&f.nextStart){var b=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,f.nextStart,h);if(b!==null&&f.len+b.len>=v)return this.log('buffer full after gaps in "'+h+'" playlist starting at sn: '+s.sn),null}return s},u.mapToInitFragWhenRequired=function(s){return s!=null&&s.initSegment&&!(s!=null&&s.initSegment.data)&&!this.bitrateTest?s.initSegment:s},u.getNextPart=function(s,o,f){for(var h=-1,v=!1,m=!0,y=0,b=s.length;y<b;y++){var S=s[y];if(m=m&&!S.independent,h>-1&&f<S.start)break;var E=S.loaded;E?h=-1:(v||S.independent||m)&&S.fragment===o&&(h=y),v=E}return h},u.loadedEndOfParts=function(s,o){var f=s[s.length-1];return f&&o>f.start&&f.loaded},u.getInitialLiveFragment=function(s,o){var f=this.fragPrevious,h=null;if(f){if(s.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+f.programDateTime),h=S2(o,f.endProgramDateTime,this.config.maxFragLookUpTolerance)),!h){var v=f.sn+1;if(v>=s.startSN&&v<=s.endSN){var m=o[v-s.startSN];f.cc===m.cc&&(h=m,this.log("Live playlist, switching playlist, load frag with next SN: "+h.sn))}h||(h=T2(o,f.cc),h&&this.log("Live playlist, switching playlist, load frag with same CC: "+h.sn))}}else{var y=this.hls.liveSyncPosition;y!==null&&(h=this.getFragmentAtPosition(y,this.bitrateTest?s.fragmentEnd:s.edge,s))}return h},u.getFragmentAtPosition=function(s,o,f){var h=this.config,v=this.fragPrevious,m=f.fragments,y=f.endSN,b=f.fragmentHint,S=h.maxFragLookUpTolerance,E=f.partList,A=!!(h.lowLatencyMode&&E!=null&&E.length&&b);A&&b&&!this.bitrateTest&&(m=m.concat(b),y=b.sn);var x;if(s<o){var P=s>o-S?0:S;x=ql(v,m,s,P)}else x=m[m.length-1];if(x){var O=x.sn-f.startSN,M=this.fragmentTracker.getState(x);if((M===fr.OK||M===fr.PARTIAL&&x.gap)&&(v=x),v&&x.sn===v.sn&&(!A||E[0].fragment.sn>x.sn)){var D=v&&x.level===v.level;if(D){var j=m[O+1];x.sn<y&&this.fragmentTracker.getState(j)!==fr.OK?x=j:x=null}}}return x},u.synchronizeToLiveEdge=function(s){var o=this.config,f=this.media;if(f){var h=this.hls.liveSyncPosition,v=f.currentTime,m=s.fragments[0].start,y=s.edge,b=v>=m-o.maxFragLookUpTolerance&&v<=y;if(h!==null&&f.duration>h&&(v<h||!b)){var S=o.liveMaxLatencyDuration!==void 0?o.liveMaxLatencyDuration:o.liveMaxLatencyDurationCount*s.targetduration;(!b&&f.readyState<4||v<y-S)&&(this.loadedmetadata||(this.nextLoadPosition=h),f.readyState&&(this.warn("Playback: "+v.toFixed(3)+" is located too far from the end of live sliding playlist: "+y+", reset currentTime to : "+h.toFixed(3)),f.currentTime=h))}}},u.alignPlaylists=function(s,o){var f=this.levels,h=this.levelLastLoaded,v=this.fragPrevious,m=h!==null?f[h]:null,y=s.fragments.length;if(!y)return this.warn("No fragments in live playlist"),0;var b=s.fragments[0].start,S=!o,E=s.alignedSliding&&Z(b);if(S||!E&&!b){N2(v,m,s);var A=s.fragments[0].start;return this.log("Live playlist sliding: "+A.toFixed(2)+" start-sn: "+(o?o.startSN:"na")+"->"+s.startSN+" prev-sn: "+(v?v.sn:"na")+" fragments: "+y),A}return b},u.waitForCdnTuneIn=function(s){var o=3;return s.live&&s.canBlockReload&&s.partTarget&&s.tuneInGoal>Math.max(s.partHoldBack,s.partTarget*o)},u.setStartPosition=function(s,o){var f=this.startPosition;if(f<o&&(f=-1),f===-1||this.lastCurrentTime===-1){var h=this.startTimeOffset!==null,v=h?this.startTimeOffset:s.startTimeOffset;v!==null&&Z(v)?(f=o+v,v<0&&(f+=s.totalduration),f=Math.min(Math.max(o,f),o+s.totalduration),this.log("Start time offset "+v+" found in "+(h?"multivariant":"media")+" playlist, adjust startPosition to "+f),this.startPosition=f):s.live?f=this.hls.liveSyncPosition||o:this.startPosition=f=0,this.lastCurrentTime=f}this.nextLoadPosition=f},u.getLoadPosition=function(){var s=this.media,o=0;return this.loadedmetadata&&s?o=s.currentTime:this.nextLoadPosition&&(o=this.nextLoadPosition),o},u.handleFragLoadAborted=function(s,o){this.transmuxer&&s.sn!=="initSegment"&&s.stats.aborted&&(this.warn("Fragment "+s.sn+(o?" part "+o.index:"")+" of level "+s.level+" was aborted"),this.resetFragmentLoading(s))},u.resetFragmentLoading=function(s){(!this.fragCurrent||!this.fragContextChanged(s)&&this.state!==Re.FRAG_LOADING_WAITING_RETRY)&&(this.state=Re.IDLE)},u.onFragmentOrKeyLoadError=function(s,o){if(o.chunkMeta&&!o.frag){var f=this.getCurrentContext(o.chunkMeta);f&&(o.frag=f.frag)}var h=o.frag;if(!(!h||h.type!==s||!this.levels)){if(this.fragContextChanged(h)){var v;this.warn("Frag load error must match current frag to retry "+h.url+" > "+((v=this.fragCurrent)==null?void 0:v.url));return}var m=o.details===z.FRAG_GAP;m&&this.fragmentTracker.fragBuffered(h,!0);var y=o.errorAction,b=y||{},S=b.action,E=b.retryCount,A=E===void 0?0:E,x=b.retryConfig;if(y&&S===dr.RetryRequest&&x){var P;this.resetStartWhenNotLoaded((P=this.levelLastLoaded)!=null?P:h.level);var O=Yl(x,A);this.warn("Fragment "+h.sn+" of "+s+" "+h.level+" errored with "+o.details+", retrying loading "+(A+1)+"/"+x.maxNumRetry+" in "+O+"ms"),y.resolved=!0,this.retryDate=self.performance.now()+O,this.state=Re.FRAG_LOADING_WAITING_RETRY}else x&&y?(this.resetFragmentErrors(s),A<x.maxNumRetry?m||(y.resolved=!0):B.warn(o.details+" reached or exceeded max retry ("+A+")")):(y==null?void 0:y.action)===dr.SendAlternateToPenaltyBox?this.state=Re.WAITING_LEVEL:this.state=Re.ERROR;this.tickImmediate()}},u.reduceLengthAndFlushBuffer=function(s){if(this.state===Re.PARSING||this.state===Re.PARSED){var o=s.parent,f=this.getFwdBufferInfo(this.mediaBuffer,o),h=f&&f.len>.5;h&&this.reduceMaxBufferLength(f.len);var v=!h;return v&&this.warn("Buffer full error while media.currentTime is not buffered, flush "+o+" buffer"),s.frag&&(this.fragmentTracker.removeFragment(s.frag),this.nextLoadPosition=s.frag.start),this.resetLoadingState(),v}return!1},u.resetFragmentErrors=function(s){s===st.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==Re.STOPPED&&(this.state=Re.IDLE)},u.afterBufferFlushed=function(s,o,f){if(s){var h=Oi.getBuffered(s);this.fragmentTracker.detectEvictedFragments(o,h,f),this.state===Re.ENDED&&this.resetLoadingState()}},u.resetLoadingState=function(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=Re.IDLE},u.resetStartWhenNotLoaded=function(s){if(!this.loadedmetadata){this.startFragRequested=!1;var o=this.levels?this.levels[s].details:null;o!=null&&o.live?(this.startPosition=-1,this.setStartPosition(o,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}},u.resetWhenMissingContext=function(s){var o;this.warn("The loading context changed while buffering fragment "+s.sn+" of level "+s.level+". This chunk will not be buffered."),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded((o=this.levelLastLoaded)!=null?o:s.level),this.resetLoadingState()},u.removeUnbufferedFrags=function(s){s===void 0&&(s=0),this.fragmentTracker.removeFragmentsInRange(s,1/0,this.playlistType,!1,!0)},u.updateLevelTiming=function(s,o,f,h){var v=this,m,y=f.details;if(!y){this.warn("level.details undefined");return}var b=Object.keys(s.elementaryStreams).reduce(function(E,A){var x=s.elementaryStreams[A];if(x){var P=x.endPTS-x.startPTS;if(P<=0)return v.warn("Could not parse fragment "+s.sn+" "+A+" duration reliably ("+P+")"),E||!1;var O=h?0:Fr(y,s,x.startPTS,x.endPTS,x.startDTS,x.endDTS);return v.hls.trigger(L.LEVEL_PTS_UPDATED,{details:y,level:f,drift:O,type:A,frag:s,start:x.startPTS,end:x.endPTS}),!0}return E},!1);if(b)f.fragmentError=0;else if(((m=this.transmuxer)==null?void 0:m.error)===null){var S=new Error("Found no media in fragment "+s.sn+" of level "+f.id+" resetting transmuxer to fallback to playlist timing");if(this.warn(S.message),this.hls.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,error:S,frag:s,reason:"Found no media in msn "+s.sn+' of level "'+f.url+'"'}),!this.hls)return;this.resetTransmuxer()}this.state=Re.PARSED,this.hls.trigger(L.FRAG_PARSED,{frag:s,part:o})},u.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},u.recoverWorkerError=function(s){if(s.event==="demuxerWorker"){var o,f,h;this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded((o=(f=this.levelLastLoaded)!=null?f:(h=this.fragCurrent)==null?void 0:h.level)!=null?o:0),this.resetLoadingState()}},p(c,[{key:"state",get:function(){return this._state},set:function(s){var o=this._state;o!==s&&(this._state=s,this.log(o+"->"+s))}}]),c}(R2);function If(){return self.SourceBuffer||self.WebKitSourceBuffer}function Y2(){var d=Qi();if(!d)return!1;var c=If(),u=d&&typeof d.isTypeSupported=="function"&&d.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!c||c.prototype&&typeof c.prototype.appendBuffer=="function"&&typeof c.prototype.remove=="function";return!!u&&!!r}function q2(){var d,c=If();return typeof(c==null||(d=c.prototype)==null?void 0:d.changeType)=="function"}function nn(d,c){return d===void 0&&(d=""),c===void 0&&(c=9e4),{type:d,id:-1,pid:-1,inputTimeScale:c,sequenceNumber:-1,samples:[],dropped:0}}var Rf=function(){function d(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}var c=d.prototype;return c.resetInitSegment=function(r,s,o,f){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},c.resetTimeStamp=function(r){this.initPTS=r,this.resetContiguity()},c.resetContiguity=function(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0},c.canParse=function(r,s){return!1},c.appendFrame=function(r,s,o){},c.demux=function(r,s){this.cachedData&&(r=Y(this.cachedData,r),this.cachedData=null);var o=mt(r,0),f=o?o.length:0,h,v=this._audioTrack,m=this._id3Track,y=o?Rt(o):void 0,b=r.length;for((this.basePTS===null||this.frameIndex===0&&Z(y))&&(this.basePTS=X2(y,s,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),o&&o.length>0&&m.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:o,type:Ai.audioId3,duration:Number.POSITIVE_INFINITY});f<b;){if(this.canParse(r,f)){var S=this.appendFrame(v,r,f);S?(this.frameIndex++,this.lastPTS=S.sample.pts,f+=S.length,h=f):f=b}else Zt(r,f)?(o=mt(r,f),m.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:o,type:Ai.audioId3,duration:Number.POSITIVE_INFINITY}),f+=o.length,h=f):f++;if(f===b&&h!==b){var E=yt(r,h);this.cachedData?this.cachedData=Y(this.cachedData,E):this.cachedData=E}}return{audioTrack:v,videoTrack:nn(),id3Track:m,textTrack:nn()}},c.demuxSampleAes=function(r,s,o){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},c.flush=function(r){var s=this.cachedData;return s&&(this.cachedData=null,this.demux(s,0)),{audioTrack:this._audioTrack,videoTrack:nn(),id3Track:this._id3Track,textTrack:nn()}},c.destroy=function(){},d}(),X2=function(c,u,r){if(Z(c))return c*90;var s=r?r.baseTime*9e4/r.timescale:0;return u*9e4+s};function Z2(d,c,u,r){var s,o,f,h,v=navigator.userAgent.toLowerCase(),m=r,y=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=((c[u+2]&192)>>>6)+1;var b=(c[u+2]&60)>>>2;if(b>y.length-1){d.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+b});return}return f=(c[u+2]&1)<<2,f|=(c[u+3]&192)>>>6,B.log("manifest codec:"+r+", ADTS type:"+s+", samplingIndex:"+b),/firefox/i.test(v)?b>=6?(s=5,h=new Array(4),o=b-3):(s=2,h=new Array(2),o=b):v.indexOf("android")!==-1?(s=2,h=new Array(2),o=b):(s=5,h=new Array(4),r&&(r.indexOf("mp4a.40.29")!==-1||r.indexOf("mp4a.40.5")!==-1)||!r&&b>=6?o=b-3:((r&&r.indexOf("mp4a.40.2")!==-1&&(b>=6&&f===1||/vivaldi/i.test(v))||!r&&f===1)&&(s=2,h=new Array(2)),o=b)),h[0]=s<<3,h[0]|=(b&14)>>1,h[1]|=(b&1)<<7,h[1]|=f<<3,s===5&&(h[1]|=(o&14)>>1,h[2]=(o&1)<<7,h[2]|=8,h[3]=0),{config:h,samplerate:y[b],channelCount:f,codec:"mp4a.40."+s,manifestCodec:m}}function Df(d,c){return d[c]===255&&(d[c+1]&246)===240}function Of(d,c){return d[c+1]&1?7:9}function Jl(d,c){return(d[c+3]&3)<<11|d[c+4]<<3|(d[c+5]&224)>>>5}function J2(d,c){return c+5<d.length}function Fo(d,c){return c+1<d.length&&Df(d,c)}function Q2(d,c){return J2(d,c)&&Df(d,c)&&Jl(d,c)<=d.length-c}function $2(d,c){if(Fo(d,c)){var u=Of(d,c);if(c+u>=d.length)return!1;var r=Jl(d,c);if(r<=u)return!1;var s=c+r;return s===d.length||Fo(d,s)}return!1}function Bf(d,c,u,r,s){if(!d.samplerate){var o=Z2(c,u,r,s);if(!o)return;d.config=o.config,d.samplerate=o.samplerate,d.channelCount=o.channelCount,d.codec=o.codec,d.manifestCodec=o.manifestCodec,B.log("parsed codec:"+d.codec+", rate:"+o.samplerate+", channels:"+o.channelCount)}}function Mf(d){return 1024*9e4/d}function e3(d,c){var u=Of(d,c);if(c+u<=d.length){var r=Jl(d,c)-u;if(r>0)return{headerLength:u,frameLength:r}}}function Nf(d,c,u,r,s){var o=Mf(d.samplerate),f=r+s*o,h=e3(c,u),v;if(h){var m=h.frameLength,y=h.headerLength,b=y+m,S=Math.max(0,u+b-c.length);S?(v=new Uint8Array(b-y),v.set(c.subarray(u+y,c.length),0)):v=c.subarray(u+y,u+b);var E={unit:v,pts:f};return S||d.samples.push(E),{sample:E,length:b,missing:S}}var A=c.length-u;v=new Uint8Array(A),v.set(c.subarray(u,c.length),0);var x={unit:v,pts:f};return{sample:x,length:A,missing:-1}}var t3=function(d){T(c,d);function c(r,s){var o;return o=d.call(this)||this,o.observer=void 0,o.config=void 0,o.observer=r,o.config=s,o}var u=c.prototype;return u.resetInitSegment=function(s,o,f,h){d.prototype.resetInitSegment.call(this,s,o,f,h),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:o,duration:h,inputTimeScale:9e4,dropped:0}},c.probe=function(s){if(!s)return!1;for(var o=mt(s,0)||[],f=o.length,h=s.length;f<h;f++)if($2(s,f))return B.log("ADTS sync word found !"),!0;return!1},u.canParse=function(s,o){return Q2(s,o)},u.appendFrame=function(s,o,f){Bf(s,this.observer,o,f,s.manifestCodec);var h=Nf(s,o,f,this.basePTS,this.frameIndex);if(h&&h.missing===0)return h},c}(Rf),i3=/\/emsg[-/]ID3/i,r3=function(){function d(u,r){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=r}var c=d.prototype;return c.resetTimeStamp=function(){},c.resetInitSegment=function(r,s,o,f){var h=this.videoTrack=nn("video",1),v=this.audioTrack=nn("audio",1),m=this.txtTrack=nn("text",1);if(this.id3Track=nn("id3",1),this.timeOffset=0,!!(r!=null&&r.byteLength)){var y=me(r);if(y.video){var b=y.video,S=b.id,E=b.timescale,A=b.codec;h.id=S,h.timescale=m.timescale=E,h.codec=A}if(y.audio){var x=y.audio,P=x.id,O=x.timescale,M=x.codec;v.id=P,v.timescale=O,v.codec=M}m.id=Vt.text,h.sampleDuration=0,h.duration=v.duration=f}},c.resetContiguity=function(){this.remainderData=null},d.probe=function(r){return r=r.length>16384?r.subarray(0,16384):r,Je(r,["moof"]).length>0},c.demux=function(r,s){this.timeOffset=s;var o=r,f=this.videoTrack,h=this.txtTrack;if(this.config.progressive){this.remainderData&&(o=Y(this.remainderData,r));var v=Fe(o);this.remainderData=v.remainder,f.samples=v.valid||new Uint8Array}else f.samples=o;var m=this.extractID3Track(f,s);return h.samples=$(s,f),{videoTrack:f,audioTrack:this.audioTrack,id3Track:m,textTrack:this.txtTrack}},c.flush=function(){var r=this.timeOffset,s=this.videoTrack,o=this.txtTrack;s.samples=this.remainderData||new Uint8Array,this.remainderData=null;var f=this.extractID3Track(s,this.timeOffset);return o.samples=$(r,s),{videoTrack:s,audioTrack:nn(),id3Track:f,textTrack:nn()}},c.extractID3Track=function(r,s){var o=this.id3Track;if(r.samples.length){var f=Je(r.samples,["emsg"]);f&&f.forEach(function(h){var v=si(h);if(i3.test(v.schemeIdUri)){var m=Z(v.presentationTime)?v.presentationTime/v.timeScale:s+v.presentationTimeDelta/v.timeScale,y=v.eventDuration===4294967295?Number.POSITIVE_INFINITY:v.eventDuration/v.timeScale;y<=.001&&(y=Number.POSITIVE_INFINITY);var b=v.payload;o.samples.push({data:b,len:b.byteLength,dts:m,pts:m,type:Ai.emsg,duration:y})}})}return o},c.demuxSampleAes=function(r,s,o){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},c.destroy=function(){},d}(),Uo=null,n3=[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],s3=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],a3=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],o3=[0,1,1,4];function Ff(d,c,u,r,s){if(!(u+24>c.length)){var o=Uf(c,u);if(o&&u+o.frameLength<=c.length){var f=o.samplesPerFrame*9e4/o.sampleRate,h=r+s*f,v={unit:c.subarray(u,u+o.frameLength),pts:h,dts:h};return d.config=[],d.channelCount=o.channelCount,d.samplerate=o.sampleRate,d.samples.push(v),{sample:v,length:o.frameLength,missing:0}}}}function Uf(d,c){var u=d[c+1]>>3&3,r=d[c+1]>>1&3,s=d[c+2]>>4&15,o=d[c+2]>>2&3;if(u!==1&&s!==0&&s!==15&&o!==3){var f=d[c+2]>>1&1,h=d[c+3]>>6,v=u===3?3-r:r===3?3:4,m=n3[v*14+s-1]*1e3,y=u===3?0:u===2?1:2,b=s3[y*3+o],S=h===3?1:2,E=a3[u][r],A=o3[r],x=E*8*A,P=Math.floor(E*m/b+f)*A;if(Uo===null){var O=navigator.userAgent||"",M=O.match(/Chrome\/(\d+)/i);Uo=M?parseInt(M[1]):0}var D=!!Uo&&Uo<=87;return D&&r===2&&m>=224e3&&h===0&&(d[c+3]=d[c+3]|128),{sampleRate:b,channelCount:S,frameLength:P,samplesPerFrame:x}}}function Ql(d,c){return d[c]===255&&(d[c+1]&224)===224&&(d[c+1]&6)!==0}function Vf(d,c){return c+1<d.length&&Ql(d,c)}function l3(d,c){var u=4;return Ql(d,c)&&u<=d.length-c}function u3(d,c){if(c+1<d.length&&Ql(d,c)){var u=4,r=Uf(d,c),s=u;r!=null&&r.frameLength&&(s=r.frameLength);var o=c+s;return o===d.length||Vf(d,o)}return!1}var Wf=function(){function d(u){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=u,this.bytesAvailable=u.byteLength,this.word=0,this.bitsAvailable=0}var c=d.prototype;return c.loadWord=function(){var r=this.data,s=this.bytesAvailable,o=r.byteLength-s,f=new Uint8Array(4),h=Math.min(4,s);if(h===0)throw new Error("no bytes available");f.set(r.subarray(o,o+h)),this.word=new DataView(f.buffer).getUint32(0),this.bitsAvailable=h*8,this.bytesAvailable-=h},c.skipBits=function(r){var s;r=Math.min(r,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>r?(this.word<<=r,this.bitsAvailable-=r):(r-=this.bitsAvailable,s=r>>3,r-=s<<3,this.bytesAvailable-=s,this.loadWord(),this.word<<=r,this.bitsAvailable-=r)},c.readBits=function(r){var s=Math.min(this.bitsAvailable,r),o=this.word>>>32-s;if(r>32&&B.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=s,this.bitsAvailable>0)this.word<<=s;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return s=r-s,s>0&&this.bitsAvailable?o<<s|this.readBits(s):o},c.skipLZ=function(){var r;for(r=0;r<this.bitsAvailable;++r)if(this.word&2147483648>>>r)return this.word<<=r,this.bitsAvailable-=r,r;return this.loadWord(),r+this.skipLZ()},c.skipUEG=function(){this.skipBits(1+this.skipLZ())},c.skipEG=function(){this.skipBits(1+this.skipLZ())},c.readUEG=function(){var r=this.skipLZ();return this.readBits(r+1)-1},c.readEG=function(){var r=this.readUEG();return 1&r?1+r>>>1:-1*(r>>>1)},c.readBoolean=function(){return this.readBits(1)===1},c.readUByte=function(){return this.readBits(8)},c.readUShort=function(){return this.readBits(16)},c.readUInt=function(){return this.readBits(32)},c.skipScalingList=function(r){for(var s=8,o=8,f,h=0;h<r;h++)o!==0&&(f=this.readEG(),o=(s+f+256)%256),s=o===0?s:o},c.readSPS=function(){var r=0,s=0,o=0,f=0,h,v,m,y=this.readUByte.bind(this),b=this.readBits.bind(this),S=this.readUEG.bind(this),E=this.readBoolean.bind(this),A=this.skipBits.bind(this),x=this.skipEG.bind(this),P=this.skipUEG.bind(this),O=this.skipScalingList.bind(this);y();var M=y();if(b(5),A(3),y(),P(),M===100||M===110||M===122||M===244||M===44||M===83||M===86||M===118||M===128){var D=S();if(D===3&&A(1),P(),P(),A(1),E())for(v=D!==3?8:12,m=0;m<v;m++)E()&&(m<6?O(16):O(64))}P();var j=S();if(j===0)S();else if(j===1)for(A(1),x(),x(),h=S(),m=0;m<h;m++)x();P(),A(1);var K=S(),he=S(),re=b(1);re===0&&A(1),A(1),E()&&(r=S(),s=S(),o=S(),f=S());var ne=[1,1];if(E()&&E()){var Ae=y();switch(Ae){case 1:ne=[1,1];break;case 2:ne=[12,11];break;case 3:ne=[10,11];break;case 4:ne=[16,11];break;case 5:ne=[40,33];break;case 6:ne=[24,11];break;case 7:ne=[20,11];break;case 8:ne=[32,11];break;case 9:ne=[80,33];break;case 10:ne=[18,11];break;case 11:ne=[15,11];break;case 12:ne=[64,33];break;case 13:ne=[160,99];break;case 14:ne=[4,3];break;case 15:ne=[3,2];break;case 16:ne=[2,1];break;case 255:{ne=[y()<<8|y(),y()<<8|y()];break}}}return{width:Math.ceil((K+1)*16-r*2-s*2),height:(2-re)*(he+1)*16-(re?2:4)*(o+f),pixelRatio:ne}},c.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},d}(),c3=function(){function d(u,r,s){this.keyData=void 0,this.decrypter=void 0,this.keyData=s,this.decrypter=new Zl(r,{removePKCS7Padding:!1})}var c=d.prototype;return c.decryptBuffer=function(r){return this.decrypter.decrypt(r,this.keyData.key.buffer,this.keyData.iv.buffer)},c.decryptAacSample=function(r,s,o){var f=this,h=r[s].unit;if(!(h.length<=16)){var v=h.subarray(16,h.length-h.length%16),m=v.buffer.slice(v.byteOffset,v.byteOffset+v.length);this.decryptBuffer(m).then(function(y){var b=new Uint8Array(y);h.set(b,16),f.decrypter.isSync()||f.decryptAacSamples(r,s+1,o)})}},c.decryptAacSamples=function(r,s,o){for(;;s++){if(s>=r.length){o();return}if(!(r[s].unit.length<32)&&(this.decryptAacSample(r,s,o),!this.decrypter.isSync()))return}},c.getAvcEncryptedData=function(r){for(var s=Math.floor((r.length-48)/160)*16+16,o=new Int8Array(s),f=0,h=32;h<r.length-16;h+=160,f+=16)o.set(r.subarray(h,h+16),f);return o},c.getAvcDecryptedUnit=function(r,s){for(var o=new Uint8Array(s),f=0,h=32;h<r.length-16;h+=160,f+=16)r.set(o.subarray(f,f+16),h);return r},c.decryptAvcSample=function(r,s,o,f,h){var v=this,m=Qr(h.data),y=this.getAvcEncryptedData(m);this.decryptBuffer(y.buffer).then(function(b){h.data=v.getAvcDecryptedUnit(m,b),v.decrypter.isSync()||v.decryptAvcSamples(r,s,o+1,f)})},c.decryptAvcSamples=function(r,s,o,f){if(r instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;s++,o=0){if(s>=r.length){f();return}for(var h=r[s].units;!(o>=h.length);o++){var v=h[o];if(!(v.data.length<=48||v.type!==1&&v.type!==5)&&(this.decryptAvcSample(r,s,o,f,v),!this.decrypter.isSync()))return}}},d}(),er=188,d3=function(){function d(u,r,s){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=u,this.config=r,this.typeSupported=s}d.probe=function(r){var s=d.syncOffset(r);return s>0&&B.warn("MPEG2-TS detected but first sync word found @ offset "+s),s!==-1},d.syncOffset=function(r){for(var s=r.length,o=Math.min(er*5,r.length-er)+1,f=0;f<o;){for(var h=!1,v=-1,m=0,y=f;y<s;y+=er)if(r[y]===71){if(m++,v===-1&&(v=y,v!==0&&(o=Math.min(v+er*99,r.length-er)+1)),h||(h=$l(r,y)===0),h&&m>1&&(v===0&&m>2||y+er>o))return v}else{if(m)return-1;break}f++}return-1},d.createTrack=function(r,s){return{container:r==="video"||r==="audio"?"video/mp2t":void 0,type:r,id:Vt[r],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:r==="audio"?s:void 0}};var c=d.prototype;return c.resetInitSegment=function(r,s,o,f){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=d.createTrack("video"),this._audioTrack=d.createTrack("audio",f),this._id3Track=d.createTrack("id3"),this._txtTrack=d.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=s,this.videoCodec=o,this._duration=f},c.resetTimeStamp=function(){},c.resetContiguity=function(){var r=this._audioTrack,s=this._avcTrack,o=this._id3Track;r&&(r.pesData=null),s&&(s.pesData=null),o&&(o.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null},c.demux=function(r,s,o,f){o===void 0&&(o=!1),f===void 0&&(f=!1),o||(this.sampleAes=null);var h,v=this._avcTrack,m=this._audioTrack,y=this._id3Track,b=this._txtTrack,S=v.pid,E=v.pesData,A=m.pid,x=y.pid,P=m.pesData,O=y.pesData,M=null,D=this.pmtParsed,j=this._pmtId,K=r.length;if(this.remainderData&&(r=Y(this.remainderData,r),K=r.length,this.remainderData=null),K<er&&!f)return this.remainderData=r,{audioTrack:m,videoTrack:v,id3Track:y,textTrack:b};var he=Math.max(0,d.syncOffset(r));K-=(K-he)%er,K<r.byteLength&&!f&&(this.remainderData=new Uint8Array(r.buffer,K,r.buffer.byteLength-K));for(var re=0,ne=he;ne<K;ne+=er)if(r[ne]===71){var Ae=!!(r[ne+1]&64),xe=$l(r,ne),we=(r[ne+3]&48)>>4,Ve=void 0;if(we>1){if(Ve=ne+5+r[ne+4],Ve===ne+er)continue}else Ve=ne+4;switch(xe){case S:Ae&&(E&&(h=js(E))&&this.parseAVCPES(v,b,h,!1),E={data:[],size:0}),E&&(E.data.push(r.subarray(Ve,ne+er)),E.size+=ne+er-Ve);break;case A:if(Ae){if(P&&(h=js(P)))switch(m.segmentCodec){case"aac":this.parseAACPES(m,h);break;case"mp3":this.parseMPEGPES(m,h);break}P={data:[],size:0}}P&&(P.data.push(r.subarray(Ve,ne+er)),P.size+=ne+er-Ve);break;case x:Ae&&(O&&(h=js(O))&&this.parseID3PES(y,h),O={data:[],size:0}),O&&(O.data.push(r.subarray(Ve,ne+er)),O.size+=ne+er-Ve);break;case 0:Ae&&(Ve+=r[Ve]+1),j=this._pmtId=f3(r,Ve);break;case j:{Ae&&(Ve+=r[Ve]+1);var dt=h3(r,Ve,this.typeSupported,o);S=dt.avc,S>0&&(v.pid=S),A=dt.audio,A>0&&(m.pid=A,m.segmentCodec=dt.segmentCodec),x=dt.id3,x>0&&(y.pid=x),M!==null&&!D&&(B.warn("MPEG-TS PMT found at "+ne+" after unknown PID '"+M+"'. Backtracking to sync byte @"+he+" to parse all TS packets."),M=null,ne=he-188),D=this.pmtParsed=!0;break}case 17:case 8191:break;default:M=xe;break}}else re++;if(re>0){var pt=new Error("Found "+re+" TS packet/s that do not start with 0x47");this.observer.emit(L.ERROR,L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,error:pt,reason:pt.message})}v.pesData=E,m.pesData=P,y.pesData=O;var _t={audioTrack:m,videoTrack:v,id3Track:y,textTrack:b};return f&&this.extractRemainingSamples(_t),_t},c.flush=function(){var r=this.remainderData;this.remainderData=null;var s;return r?s=this.demux(r,-1,!1,!0):s={videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(s),this.sampleAes?this.decrypt(s,this.sampleAes):s},c.extractRemainingSamples=function(r){var s=r.audioTrack,o=r.videoTrack,f=r.id3Track,h=r.textTrack,v=o.pesData,m=s.pesData,y=f.pesData,b;if(v&&(b=js(v))?(this.parseAVCPES(o,h,b,!0),o.pesData=null):o.pesData=v,m&&(b=js(m))){switch(s.segmentCodec){case"aac":this.parseAACPES(s,b);break;case"mp3":this.parseMPEGPES(s,b);break}s.pesData=null}else m!=null&&m.size&&B.log("last AAC PES packet truncated,might overlap between fragments"),s.pesData=m;y&&(b=js(y))?(this.parseID3PES(f,b),f.pesData=null):f.pesData=y},c.demuxSampleAes=function(r,s,o){var f=this.demux(r,o,!0,!this.config.progressive),h=this.sampleAes=new c3(this.observer,this.config,s);return this.decrypt(f,h)},c.decrypt=function(r,s){return new Promise(function(o){var f=r.audioTrack,h=r.videoTrack;f.samples&&f.segmentCodec==="aac"?s.decryptAacSamples(f.samples,0,function(){h.samples?s.decryptAvcSamples(h.samples,0,0,function(){o(r)}):o(r)}):h.samples&&s.decryptAvcSamples(h.samples,0,0,function(){o(r)})})},c.destroy=function(){this._duration=0},c.parseAVCPES=function(r,s,o,f){var h=this,v=this.parseAVCNALu(r,o.data),m=this.avcSample,y,b=!1;o.data=null,m&&v.length&&!r.audFound&&(eu(m,r),m=this.avcSample=Vo(!1,o.pts,o.dts,"")),v.forEach(function(S){switch(S.type){case 1:{y=!0,m||(m=h.avcSample=Vo(!0,o.pts,o.dts,"")),m.frame=!0;var E=S.data;if(b&&E.length>4){var A=new Wf(E).readSliceType();(A===2||A===4||A===7||A===9)&&(m.key=!0)}break}case 5:y=!0,m||(m=h.avcSample=Vo(!0,o.pts,o.dts,"")),m.key=!0,m.frame=!0;break;case 6:{y=!0,ji(S.data,1,o.pts,s.samples);break}case 7:if(y=!0,b=!0,!r.sps){var x=S.data,P=new Wf(x),O=P.readSPS();r.width=O.width,r.height=O.height,r.pixelRatio=O.pixelRatio,r.sps=[x],r.duration=h._duration;for(var M=x.subarray(1,4),D="avc1.",j=0;j<3;j++){var K=M[j].toString(16);K.length<2&&(K="0"+K),D+=K}r.codec=D}break;case 8:y=!0,r.pps||(r.pps=[S.data]);break;case 9:y=!1,r.audFound=!0,m&&eu(m,r),m=h.avcSample=Vo(!1,o.pts,o.dts,"");break;case 12:y=!0;break;default:y=!1,m&&(m.debug+="unknown NAL "+S.type+" ");break}if(m&&y){var he=m.units;he.push(S)}}),f&&m&&(eu(m,r),this.avcSample=null)},c.getLastNalUnit=function(r){var s,o=this.avcSample,f;if((!o||o.units.length===0)&&(o=r[r.length-1]),(s=o)!=null&&s.units){var h=o.units;f=h[h.length-1]}return f},c.parseAVCNALu=function(r,s){var o=s.byteLength,f=r.naluState||0,h=f,v=[],m=0,y,b,S,E=-1,A=0;for(f===-1&&(E=0,A=s[0]&31,f=0,m=1);m<o;){if(y=s[m++],!f){f=y?0:1;continue}if(f===1){f=y?0:2;continue}if(!y)f=3;else if(y===1){if(E>=0){var x={data:s.subarray(E,m-f-1),type:A};v.push(x)}else{var P=this.getLastNalUnit(r.samples);if(P&&(h&&m<=4-h&&P.state&&(P.data=P.data.subarray(0,P.data.byteLength-h)),b=m-f-1,b>0)){var O=new Uint8Array(P.data.byteLength+b);O.set(P.data,0),O.set(s.subarray(0,b),P.data.byteLength),P.data=O,P.state=0}}m<o?(S=s[m]&31,E=m,A=S,f=0):f=-1}else f=0}if(E>=0&&f>=0){var M={data:s.subarray(E,o),type:A,state:f};v.push(M)}if(v.length===0){var D=this.getLastNalUnit(r.samples);if(D){var j=new Uint8Array(D.data.byteLength+s.byteLength);j.set(D.data,0),j.set(s,D.data.byteLength),D.data=j}}return r.naluState=f,v},c.parseAACPES=function(r,s){var o=0,f=this.aacOverFlow,h=s.data;if(f){this.aacOverFlow=null;var v=f.missing,m=f.sample.unit.byteLength;if(v===-1){var y=new Uint8Array(m+h.byteLength);y.set(f.sample.unit,0),y.set(h,m),h=y}else{var b=m-v;f.sample.unit.set(h.subarray(0,v),b),r.samples.push(f.sample),o=f.missing}}var S,E;for(S=o,E=h.length;S<E-1&&!Fo(h,S);S++);if(S!==o){var A,x=S<E-1;x?A="AAC PES did not start with ADTS header,offset:"+S:A="No ADTS header found in AAC PES";var P=new Error(A);if(B.warn("parsing error: "+A),this.observer.emit(L.ERROR,L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,levelRetry:x,error:P,reason:A}),!x)return}Bf(r,this.observer,h,S,this.audioCodec);var O;if(s.pts!==void 0)O=s.pts;else if(f){var M=Mf(r.samplerate);O=f.sample.pts+M}else{B.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var D=0,j;S<E;)if(j=Nf(r,h,S,O,D),S+=j.length,j.missing){this.aacOverFlow=j;break}else for(D++;S<E-1&&!Fo(h,S);S++);},c.parseMPEGPES=function(r,s){var o=s.data,f=o.length,h=0,v=0,m=s.pts;if(m===void 0){B.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;v<f;)if(Vf(o,v)){var y=Ff(r,o,v,m,h);if(y)v+=y.length,h++;else break}else v++},c.parseID3PES=function(r,s){if(s.pts===void 0){B.warn("[tsdemuxer]: ID3 PES unknown PTS");return}var o=k({},s,{type:this._avcTrack?Ai.emsg:Ai.audioId3,duration:Number.POSITIVE_INFINITY});r.samples.push(o)},d}();function Vo(d,c,u,r){return{key:d,frame:!1,pts:c,dts:u,units:[],debug:r,length:0}}function $l(d,c){return((d[c+1]&31)<<8)+d[c+2]}function f3(d,c){return(d[c+10]&31)<<8|d[c+11]}function h3(d,c,u,r){var s={audio:-1,avc:-1,id3:-1,segmentCodec:"aac"},o=(d[c+1]&15)<<8|d[c+2],f=c+3+o-4,h=(d[c+10]&15)<<8|d[c+11];for(c+=12+h;c<f;){var v=$l(d,c);switch(d[c]){case 207:if(!r){B.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:s.audio===-1&&(s.audio=v);break;case 21:s.id3===-1&&(s.id3=v);break;case 219:if(!r){B.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:s.avc===-1&&(s.avc=v);break;case 3:case 4:u.mpeg!==!0&&u.mp3!==!0?B.log("MPEG audio found, not supported in this browser"):s.audio===-1&&(s.audio=v,s.segmentCodec="mp3");break;case 36:B.warn("Unsupported HEVC stream type found");break}c+=((d[c+3]&15)<<8|d[c+4])+5}return s}function js(d){var c=0,u,r,s,o,f,h=d.data;if(!d||d.size===0)return null;for(;h[0].length<19&&h.length>1;){var v=new Uint8Array(h[0].length+h[1].length);v.set(h[0]),v.set(h[1],h[0].length),h[0]=v,h.splice(1,1)}u=h[0];var m=(u[0]<<16)+(u[1]<<8)+u[2];if(m===1){if(r=(u[4]<<8)+u[5],r&&r>d.size-6)return null;var y=u[7];y&192&&(o=(u[9]&14)*536870912+(u[10]&255)*4194304+(u[11]&254)*16384+(u[12]&255)*128+(u[13]&254)/2,y&64?(f=(u[14]&14)*536870912+(u[15]&255)*4194304+(u[16]&254)*16384+(u[17]&255)*128+(u[18]&254)/2,o-f>60*9e4&&(B.warn(Math.round((o-f)/9e4)+"s delta between PTS and DTS, align them"),o=f)):f=o),s=u[8];var b=s+9;if(d.size<=b)return null;d.size-=b;for(var S=new Uint8Array(d.size),E=0,A=h.length;E<A;E++){u=h[E];var x=u.byteLength;if(b)if(b>x){b-=x;continue}else u=u.subarray(b),x-=b,b=0;S.set(u,c),c+=x}return r&&(r-=s+3),{data:S,pts:o,dts:f,len:r}}return null}function eu(d,c){if(d.units.length&&d.frame){if(d.pts===void 0){var u=c.samples,r=u.length;if(r){var s=u[r-1];d.pts=s.pts,d.dts=s.dts}else{c.dropped++;return}}c.samples.push(d)}d.debug.length&&B.log(d.pts+"/"+d.dts+":"+d.debug)}var g3=function(d){T(c,d);function c(){return d.apply(this,arguments)||this}var u=c.prototype;return u.resetInitSegment=function(s,o,f,h){d.prototype.resetInitSegment.call(this,s,o,f,h),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:o,duration:h,inputTimeScale:9e4,dropped:0}},c.probe=function(s){if(!s)return!1;for(var o=mt(s,0)||[],f=o.length,h=s.length;f<h;f++)if(u3(s,f))return B.log("MPEG Audio sync word found !"),!0;return!1},u.canParse=function(s,o){return l3(s,o)},u.appendFrame=function(s,o,f){if(this.basePTS!==null)return Ff(s,o,f,this.basePTS,this.frameIndex)},c}(Rf),jf=function(){function d(){}return d.getSilentFrame=function(u,r){switch(u){case"mp4a.40.2":if(r===1)return new Uint8Array([0,200,0,128,35,128]);if(r===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(r===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(r===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(r===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(r===6)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]);break;default:if(r===1)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]);if(r===2)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]);if(r===3)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]);break}},d}(),zn=Math.pow(2,32)-1,qi=function(){function d(){}return d.init=function(){d.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var u;for(u in d.types)d.types.hasOwnProperty(u)&&(d.types[u]=[u.charCodeAt(0),u.charCodeAt(1),u.charCodeAt(2),u.charCodeAt(3)]);var r=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),s=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);d.HDLR_TYPES={video:r,audio:s};var o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),f=new Uint8Array([0,0,0,0,0,0,0,0]);d.STTS=d.STSC=d.STCO=f,d.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),d.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),d.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),d.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var h=new Uint8Array([105,115,111,109]),v=new Uint8Array([97,118,99,49]),m=new Uint8Array([0,0,0,1]);d.FTYP=d.box(d.types.ftyp,h,m,h,v),d.DINF=d.box(d.types.dinf,d.box(d.types.dref,o))},d.box=function(u){for(var r=8,s=arguments.length,o=new Array(s>1?s-1:0),f=1;f<s;f++)o[f-1]=arguments[f];for(var h=o.length,v=h;h--;)r+=o[h].byteLength;var m=new Uint8Array(r);for(m[0]=r>>24&255,m[1]=r>>16&255,m[2]=r>>8&255,m[3]=r&255,m.set(u,4),h=0,r=8;h<v;h++)m.set(o[h],r),r+=o[h].byteLength;return m},d.hdlr=function(u){return d.box(d.types.hdlr,d.HDLR_TYPES[u])},d.mdat=function(u){return d.box(d.types.mdat,u)},d.mdhd=function(u,r){r*=u;var s=Math.floor(r/(zn+1)),o=Math.floor(r%(zn+1));return d.box(d.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,u>>24&255,u>>16&255,u>>8&255,u&255,s>>24,s>>16&255,s>>8&255,s&255,o>>24,o>>16&255,o>>8&255,o&255,85,196,0,0]))},d.mdia=function(u){return d.box(d.types.mdia,d.mdhd(u.timescale,u.duration),d.hdlr(u.type),d.minf(u))},d.mfhd=function(u){return d.box(d.types.mfhd,new Uint8Array([0,0,0,0,u>>24,u>>16&255,u>>8&255,u&255]))},d.minf=function(u){return u.type==="audio"?d.box(d.types.minf,d.box(d.types.smhd,d.SMHD),d.DINF,d.stbl(u)):d.box(d.types.minf,d.box(d.types.vmhd,d.VMHD),d.DINF,d.stbl(u))},d.moof=function(u,r,s){return d.box(d.types.moof,d.mfhd(u),d.traf(s,r))},d.moov=function(u){for(var r=u.length,s=[];r--;)s[r]=d.trak(u[r]);return d.box.apply(null,[d.types.moov,d.mvhd(u[0].timescale,u[0].duration)].concat(s).concat(d.mvex(u)))},d.mvex=function(u){for(var r=u.length,s=[];r--;)s[r]=d.trex(u[r]);return d.box.apply(null,[d.types.mvex].concat(s))},d.mvhd=function(u,r){r*=u;var s=Math.floor(r/(zn+1)),o=Math.floor(r%(zn+1)),f=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,u>>24&255,u>>16&255,u>>8&255,u&255,s>>24,s>>16&255,s>>8&255,s&255,o>>24,o>>16&255,o>>8&255,o&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return d.box(d.types.mvhd,f)},d.sdtp=function(u){var r=u.samples||[],s=new Uint8Array(4+r.length),o,f;for(o=0;o<r.length;o++)f=r[o].flags,s[o+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return d.box(d.types.sdtp,s)},d.stbl=function(u){return d.box(d.types.stbl,d.stsd(u),d.box(d.types.stts,d.STTS),d.box(d.types.stsc,d.STSC),d.box(d.types.stsz,d.STSZ),d.box(d.types.stco,d.STCO))},d.avc1=function(u){var r=[],s=[],o,f,h;for(o=0;o<u.sps.length;o++)f=u.sps[o],h=f.byteLength,r.push(h>>>8&255),r.push(h&255),r=r.concat(Array.prototype.slice.call(f));for(o=0;o<u.pps.length;o++)f=u.pps[o],h=f.byteLength,s.push(h>>>8&255),s.push(h&255),s=s.concat(Array.prototype.slice.call(f));var v=d.box(d.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|u.sps.length].concat(r).concat([u.pps.length]).concat(s))),m=u.width,y=u.height,b=u.pixelRatio[0],S=u.pixelRatio[1];return d.box(d.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,m>>8&255,m&255,y>>8&255,y&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),v,d.box(d.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),d.box(d.types.pasp,new Uint8Array([b>>24,b>>16&255,b>>8&255,b&255,S>>24,S>>16&255,S>>8&255,S&255])))},d.esds=function(u){var r=u.config.length;return new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(u.config).concat([6,1,2]))},d.mp4a=function(u){var r=u.samplerate;return d.box(d.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,u.channelCount,0,16,0,0,0,0,r>>8&255,r&255,0,0]),d.box(d.types.esds,d.esds(u)))},d.mp3=function(u){var r=u.samplerate;return d.box(d.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,u.channelCount,0,16,0,0,0,0,r>>8&255,r&255,0,0]))},d.stsd=function(u){return u.type==="audio"?u.segmentCodec==="mp3"&&u.codec==="mp3"?d.box(d.types.stsd,d.STSD,d.mp3(u)):d.box(d.types.stsd,d.STSD,d.mp4a(u)):d.box(d.types.stsd,d.STSD,d.avc1(u))},d.tkhd=function(u){var r=u.id,s=u.duration*u.timescale,o=u.width,f=u.height,h=Math.floor(s/(zn+1)),v=Math.floor(s%(zn+1));return d.box(d.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,r&255,0,0,0,0,h>>24,h>>16&255,h>>8&255,h&255,v>>24,v>>16&255,v>>8&255,v&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,o>>8&255,o&255,0,0,f>>8&255,f&255,0,0]))},d.traf=function(u,r){var s=d.sdtp(u),o=u.id,f=Math.floor(r/(zn+1)),h=Math.floor(r%(zn+1));return d.box(d.types.traf,d.box(d.types.tfhd,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255])),d.box(d.types.tfdt,new Uint8Array([1,0,0,0,f>>24,f>>16&255,f>>8&255,f&255,h>>24,h>>16&255,h>>8&255,h&255])),d.trun(u,s.length+16+20+8+16+8+8),s)},d.trak=function(u){return u.duration=u.duration||4294967295,d.box(d.types.trak,d.tkhd(u),d.mdia(u))},d.trex=function(u){var r=u.id;return d.box(d.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},d.trun=function(u,r){var s=u.samples||[],o=s.length,f=12+16*o,h=new Uint8Array(f),v,m,y,b,S,E;for(r+=8+f,h.set([u.type==="video"?1:0,0,15,1,o>>>24&255,o>>>16&255,o>>>8&255,o&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255],0),v=0;v<o;v++)m=s[v],y=m.duration,b=m.size,S=m.flags,E=m.cts,h.set([y>>>24&255,y>>>16&255,y>>>8&255,y&255,b>>>24&255,b>>>16&255,b>>>8&255,b&255,S.isLeading<<2|S.dependsOn,S.isDependedOn<<6|S.hasRedundancy<<4|S.paddingValue<<1|S.isNonSync,S.degradPrio&61440,S.degradPrio&15,E>>>24&255,E>>>16&255,E>>>8&255,E&255],12+16*v);return d.box(d.types.trun,h)},d.initSegment=function(u){d.types||d.init();var r=d.moov(u),s=new Uint8Array(d.FTYP.byteLength+r.byteLength);return s.set(d.FTYP),s.set(r,d.FTYP.byteLength),s},d}();qi.types=void 0,qi.HDLR_TYPES=void 0,qi.STTS=void 0,qi.STSC=void 0,qi.STCO=void 0,qi.STSZ=void 0,qi.VMHD=void 0,qi.SMHD=void 0,qi.STSD=void 0,qi.FTYP=void 0,qi.DINF=void 0;var v3=9e4;function m3(d,c,u,r){u===void 0&&(u=1),r===void 0&&(r=!1);var s=d*c*u;return r?Math.round(s):s}function Sa(d,c){return c===void 0&&(c=!1),m3(d,1e3,1/v3,c)}var p3=10*1e3,Gf=1024,_3=1152,Wo=null,tu=null,iu=function(){function d(u,r,s,o){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=u,this.config=r,this.typeSupported=s,this.ISGenerated=!1,Wo===null){var f=navigator.userAgent||"",h=f.match(/Chrome\/(\d+)/i);Wo=h?parseInt(h[1]):0}if(tu===null){var v=navigator.userAgent.match(/Safari\/(\d+)/i);tu=v?parseInt(v[1]):0}}var c=d.prototype;return c.destroy=function(){},c.resetTimeStamp=function(r){B.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=r},c.resetNextTimestamp=function(){B.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},c.resetInitSegment=function(){B.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},c.getVideoStartPts=function(r){var s=!1,o=r.reduce(function(f,h){var v=h.pts-f;return v<-4294967296?(s=!0,Ur(f,h.pts)):v>0?f:h.pts},r[0].pts);return s&&B.debug("PTS rollover detected"),o},c.remux=function(r,s,o,f,h,v,m,y){var b,S,E,A,x,P,O=h,M=h,D=r.pid>-1,j=s.pid>-1,K=s.samples.length,he=r.samples.length>0,re=m&&K>0||K>1,ne=(!D||he)&&(!j||re)||this.ISGenerated||m;if(ne){this.ISGenerated||(E=this.generateIS(r,s,h,v));var Ae=this.isVideoContiguous,xe=-1,we;if(re&&(xe=y3(s.samples),!Ae&&this.config.forceKeyFrameOnDiscontinuity))if(P=!0,xe>0){B.warn("[mp4-remuxer]: Dropped "+xe+" out of "+K+" video samples due to a missing keyframe");var Ve=this.getVideoStartPts(s.samples);s.samples=s.samples.slice(xe),s.dropped+=xe,M+=(s.samples[0].pts-Ve)/s.inputTimeScale,we=M}else xe===-1&&(B.warn("[mp4-remuxer]: No keyframe found out of "+K+" video samples"),P=!1);if(this.ISGenerated){if(he&&re){var dt=this.getVideoStartPts(s.samples),pt=Ur(r.samples[0].pts,dt)-dt,_t=pt/s.inputTimeScale;O+=Math.max(0,_t),M+=Math.max(0,-_t)}if(he){if(r.samplerate||(B.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),E=this.generateIS(r,s,h,v)),S=this.remuxAudio(r,O,this.isAudioContiguous,v,j||re||y===st.AUDIO?M:void 0),re){var Bt=S?S.endPTS-S.startPTS:0;s.inputTimeScale||(B.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),E=this.generateIS(r,s,h,v)),b=this.remuxVideo(s,M,Ae,Bt)}}else re&&(b=this.remuxVideo(s,M,Ae,0));b&&(b.firstKeyFrame=xe,b.independent=xe!==-1,b.firstKeyFramePTS=we)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(o.samples.length&&(x=zf(o,h,this._initPTS,this._initDTS)),f.samples.length&&(A=Hf(f,h,this._initPTS))),{audio:S,video:b,initSegment:E,independent:P,text:A,id3:x}},c.generateIS=function(r,s,o,f){var h=r.samples,v=s.samples,m=this.typeSupported,y={},b=this._initPTS,S=!b||f,E="audio/mp4",A,x,P;if(S&&(A=x=1/0),r.config&&h.length){switch(r.timescale=r.samplerate,r.segmentCodec){case"mp3":m.mpeg?(E="audio/mpeg",r.codec=""):m.mp3&&(r.codec="mp3");break}y.audio={id:"audio",container:E,codec:r.codec,initSegment:r.segmentCodec==="mp3"&&m.mpeg?new Uint8Array(0):qi.initSegment([r]),metadata:{channelCount:r.channelCount}},S&&(P=r.inputTimeScale,!b||P!==b.timescale?A=x=h[0].pts-Math.round(P*o):S=!1)}if(s.sps&&s.pps&&v.length&&(s.timescale=s.inputTimeScale,y.video={id:"main",container:"video/mp4",codec:s.codec,initSegment:qi.initSegment([s]),metadata:{width:s.width,height:s.height}},S))if(P=s.inputTimeScale,!b||P!==b.timescale){var O=this.getVideoStartPts(v),M=Math.round(P*o);x=Math.min(x,Ur(v[0].dts,O)-M),A=Math.min(A,O-M)}else S=!1;if(Object.keys(y).length)return this.ISGenerated=!0,S?(this._initPTS={baseTime:A,timescale:P},this._initDTS={baseTime:x,timescale:P}):A=P=void 0,{tracks:y,initPTS:A,timescale:P}},c.remuxVideo=function(r,s,o,f){var h=r.inputTimeScale,v=r.samples,m=[],y=v.length,b=this._initPTS,S=this.nextAvcDts,E=8,A=this.videoSampleDuration,x,P,O=Number.POSITIVE_INFINITY,M=Number.NEGATIVE_INFINITY,D=!1;if(!o||S===null){var j=s*h,K=v[0].pts-Ur(v[0].dts,v[0].pts);S=j-K}for(var he=b.baseTime*h/b.timescale,re=0;re<y;re++){var ne=v[re];ne.pts=Ur(ne.pts-he,S),ne.dts=Ur(ne.dts-he,S),ne.dts<v[re>0?re-1:re].dts&&(D=!0)}D&&v.sort(function(zo,oh){var hE=zo.dts-oh.dts,gE=zo.pts-oh.pts;return hE||gE}),x=v[0].dts,P=v[v.length-1].dts;var Ae=P-x,xe=Ae?Math.round(Ae/(y-1)):A||r.inputTimeScale/30;if(o){var we=x-S,Ve=we>xe,dt=we<-1;if((Ve||dt)&&(Ve?B.warn("AVC: "+Sa(we,!0)+" ms ("+we+"dts) hole between fragments detected, filling it"):B.warn("AVC: "+Sa(-we,!0)+" ms ("+we+"dts) overlapping between fragments detected"),!dt||S>=v[0].pts)){x=S;var pt=v[0].pts-we;v[0].dts=x,v[0].pts=pt,B.log("Video: First PTS/DTS adjusted: "+Sa(pt,!0)+"/"+Sa(x,!0)+", delta: "+Sa(we,!0)+" ms")}}x=Math.max(0,x);for(var _t=0,Bt=0,St=0;St<y;St++){for(var zt=v[St],Ct=zt.units,ui=Ct.length,Vr=0,ri=0;ri<ui;ri++)Vr+=Ct[ri].data.length;Bt+=Vr,_t+=ui,zt.length=Vr,zt.dts=Math.max(zt.dts,x),O=Math.min(zt.pts,O),M=Math.max(zt.pts,M)}P=v[y-1].dts;var sr=Bt+4*_t+8,Xi;try{Xi=new Uint8Array(sr)}catch(zo){this.observer.emit(L.ERROR,L.ERROR,{type:le.MUX_ERROR,details:z.REMUX_ALLOC_ERROR,fatal:!1,error:zo,bytes:sr,reason:"fail allocating video mdat "+sr});return}var sn=new DataView(Xi.buffer);sn.setUint32(0,sr),Xi.set(qi.types.mdat,4);for(var Tr=!1,En=Number.POSITIVE_INFINITY,Hn=Number.POSITIVE_INFINITY,An=Number.NEGATIVE_INFINITY,Kn=Number.NEGATIVE_INFINITY,tr=0;tr<y;tr++){for(var hr=v[tr],xn=hr.units,Yn=0,ka=0,du=xn.length;ka<du;ka++){var wn=xn[ka],sE=wn.data,fu=wn.data.byteLength;sn.setUint32(E,fu),E+=4,Xi.set(sE,E),E+=fu,Yn+=4+fu}var jo=void 0;if(tr<y-1)A=v[tr+1].dts-hr.dts,jo=v[tr+1].pts-hr.pts;else{var rh=this.config,Go=tr>0?hr.dts-v[tr-1].dts:xe;if(jo=tr>0?hr.pts-v[tr-1].pts:xe,rh.stretchShortVideoTrack&&this.nextAudioPts!==null){var aE=Math.floor(rh.maxBufferHole*h),hu=(f?O+f*h:this.nextAudioPts)-hr.pts;hu>aE?(A=hu-Go,A<0?A=Go:Tr=!0,B.log("[mp4-remuxer]: It is approximately "+hu/90+" ms to the next segment; using duration "+A/90+" ms for the last video frame.")):A=Go}else A=Go}var oE=Math.round(hr.pts-hr.dts);En=Math.min(En,A),An=Math.max(An,A),Hn=Math.min(Hn,jo),Kn=Math.max(Kn,jo),m.push(new Kf(hr.key,A,Yn,oE))}if(m.length){if(Wo){if(Wo<70){var nh=m[0].flags;nh.dependsOn=2,nh.isNonSync=0}}else if(tu&&Kn-Hn<An-En&&xe/An<.025&&m[0].cts===0){B.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");for(var gu=x,Wr=0,sh=m.length;Wr<sh;Wr++){var ah=gu+m[Wr].duration,lE=gu+m[Wr].cts;if(Wr<sh-1){var uE=ah+m[Wr+1].cts;m[Wr].duration=uE-lE}else m[Wr].duration=Wr?m[Wr-1].duration:xe;m[Wr].cts=0,gu=ah}}}A=Tr||!A?xe:A,this.nextAvcDts=S=P+A,this.videoSampleDuration=A,this.isVideoContiguous=!0;var cE=qi.moof(r.sequenceNumber++,x,k({},r,{samples:m})),dE="video",fE={data1:cE,data2:Xi,startPTS:O/h,endPTS:(M+A)/h,startDTS:x/h,endDTS:S/h,type:dE,hasAudio:!1,hasVideo:!0,nb:m.length,dropped:r.dropped};return r.samples=[],r.dropped=0,fE},c.remuxAudio=function(r,s,o,f,h){var v=r.inputTimeScale,m=r.samplerate?r.samplerate:v,y=v/m,b=r.segmentCodec==="aac"?Gf:_3,S=b*y,E=this._initPTS,A=r.segmentCodec==="mp3"&&this.typeSupported.mpeg,x=[],P=h!==void 0,O=r.samples,M=A?0:8,D=this.nextAudioPts||-1,j=s*v,K=E.baseTime*v/E.timescale;if(this.isAudioContiguous=o=o||O.length&&D>0&&(f&&Math.abs(j-D)<9e3||Math.abs(Ur(O[0].pts-K,j)-D)<20*S),O.forEach(function(wn){wn.pts=Ur(wn.pts-K,j)}),!o||D<0){if(O=O.filter(function(wn){return wn.pts>=0}),!O.length)return;h===0?D=0:f&&!P?D=Math.max(0,j):D=O[0].pts}if(r.segmentCodec==="aac")for(var he=this.config.maxAudioFramesDrift,re=0,ne=D;re<O.length;re++){var Ae=O[re],xe=Ae.pts,we=xe-ne,Ve=Math.abs(1e3*we/v);if(we<=-he*S&&P)re===0&&(B.warn("Audio frame @ "+(xe/v).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*we/v)+" ms."),this.nextAudioPts=D=ne=xe);else if(we>=he*S&&Ve<p3&&P){var dt=Math.round(we/S);ne=xe-dt*S,ne<0&&(dt--,ne+=S),re===0&&(this.nextAudioPts=D=ne),B.warn("[mp4-remuxer]: Injecting "+dt+" audio frame @ "+(ne/v).toFixed(3)+"s due to "+Math.round(1e3*we/v)+" ms gap.");for(var pt=0;pt<dt;pt++){var _t=Math.max(ne,0),Bt=jf.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);Bt||(B.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Bt=Ae.unit.subarray()),O.splice(re,0,{unit:Bt,pts:_t}),ne+=S,re++}}Ae.pts=ne,ne+=S}for(var St=null,zt=null,Ct,ui=0,Vr=O.length;Vr--;)ui+=O[Vr].unit.byteLength;for(var ri=0,sr=O.length;ri<sr;ri++){var Xi=O[ri],sn=Xi.unit,Tr=Xi.pts;if(zt!==null){var En=x[ri-1];En.duration=Math.round((Tr-zt)/y)}else if(o&&r.segmentCodec==="aac"&&(Tr=D),St=Tr,ui>0){ui+=M;try{Ct=new Uint8Array(ui)}catch(wn){this.observer.emit(L.ERROR,L.ERROR,{type:le.MUX_ERROR,details:z.REMUX_ALLOC_ERROR,fatal:!1,error:wn,bytes:ui,reason:"fail allocating audio mdat "+ui});return}if(!A){var Hn=new DataView(Ct.buffer);Hn.setUint32(0,ui),Ct.set(qi.types.mdat,4)}}else return;Ct.set(sn,M);var An=sn.byteLength;M+=An,x.push(new Kf(!0,b,An,0)),zt=Tr}var Kn=x.length;if(Kn){var tr=x[x.length-1];this.nextAudioPts=D=zt+y*tr.duration;var hr=A?new Uint8Array(0):qi.moof(r.sequenceNumber++,St/y,k({},r,{samples:x}));r.samples=[];var xn=St/v,Yn=D/v,ka="audio",du={data1:hr,data2:Ct,startPTS:xn,endPTS:Yn,startDTS:xn,endDTS:Yn,type:ka,hasAudio:!0,hasVideo:!1,nb:Kn};return this.isAudioContiguous=!0,du}},c.remuxEmptyAudio=function(r,s,o,f){var h=r.inputTimeScale,v=r.samplerate?r.samplerate:h,m=h/v,y=this.nextAudioPts,b=this._initDTS,S=b.baseTime*9e4/b.timescale,E=(y!==null?y:f.startDTS*h)+S,A=f.endDTS*h+S,x=m*Gf,P=Math.ceil((A-E)/x),O=jf.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);if(B.warn("[mp4-remuxer]: remux empty Audio"),!O){B.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var M=[],D=0;D<P;D++){var j=E+D*x;M.push({unit:O,pts:j,dts:j})}return r.samples=M,this.remuxAudio(r,s,o,!1)},d}();function Ur(d,c){var u;if(c===null)return d;for(c<d?u=-8589934592:u=8589934592;Math.abs(d-c)>4294967296;)d+=u;return d}function y3(d){for(var c=0;c<d.length;c++)if(d[c].key)return c;return-1}function zf(d,c,u,r){var s=d.samples.length;if(s){for(var o=d.inputTimeScale,f=0;f<s;f++){var h=d.samples[f];h.pts=Ur(h.pts-u.baseTime*o/u.timescale,c*o)/o,h.dts=Ur(h.dts-r.baseTime*o/r.timescale,c*o)/o}var v=d.samples;return d.samples=[],{samples:v}}}function Hf(d,c,u){var r=d.samples.length;if(r){for(var s=d.inputTimeScale,o=0;o<r;o++){var f=d.samples[o];f.pts=Ur(f.pts-u.baseTime*9e4/u.timescale,c*s)/s}d.samples.sort(function(v,m){return v.pts-m.pts});var h=d.samples;return d.samples=[],{samples:h}}}var Kf=function(c,u,r,s){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=u,this.size=r,this.cts=s,this.flags=new b3(c)},b3=function(c){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=c?2:1,this.isNonSync=c?0:1},S3=function(){function d(){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}var c=d.prototype;return c.destroy=function(){},c.resetTimeStamp=function(r){this.initPTS=r,this.lastEndTime=null},c.resetNextTimestamp=function(){this.lastEndTime=null},c.resetInitSegment=function(r,s,o,f){this.audioCodec=s,this.videoCodec=o,this.generateInitSegment($t(r,f)),this.emitInitSegment=!0},c.generateInitSegment=function(r){var s=this.audioCodec,o=this.videoCodec;if(!(r!=null&&r.byteLength)){this.initTracks=void 0,this.initData=void 0;return}var f=this.initData=me(r);s||(s=Yf(f.audio,Oe.AUDIO)),o||(o=Yf(f.video,Oe.VIDEO));var h={};f.audio&&f.video?h.audiovideo={container:"video/mp4",codec:s+","+o,initSegment:r,id:"main"}:f.audio?h.audio={container:"audio/mp4",codec:s,initSegment:r,id:"audio"}:f.video?h.video={container:"video/mp4",codec:o,initSegment:r,id:"main"}:B.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=h},c.remux=function(r,s,o,f,h,v){var m,y,b=this.initPTS,S=this.lastEndTime,E={audio:void 0,video:void 0,text:f,id3:o,initSegment:void 0};Z(S)||(S=this.lastEndTime=h||0);var A=s.samples;if(!(A!=null&&A.length))return E;var x={initPTS:void 0,timescale:1},P=this.initData;if((m=P)!=null&&m.length||(this.generateInitSegment(A),P=this.initData),!((y=P)!=null&&y.length))return B.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),E;this.emitInitSegment&&(x.tracks=this.initTracks,this.emitInitSegment=!1);var O=wi(A,P),M=_i(P,A),D=M===null?h:M;(k3(b,D,h,O)||x.timescale!==b.timescale&&v)&&(x.initPTS=D-h,b&&b.timescale===1&&B.warn("Adjusting initPTS by "+(x.initPTS-b.baseTime)),this.initPTS=b={baseTime:x.initPTS,timescale:1});var j=r?D-b.baseTime/b.timescale:S,K=j+O;Ei(P,A,b.baseTime/b.timescale),O>0?this.lastEndTime=K:(B.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var he=!!P.audio,re=!!P.video,ne="";he&&(ne+="audio"),re&&(ne+="video");var Ae={data1:A,startPTS:j,startDTS:j,endPTS:K,endDTS:K,type:ne,hasAudio:he,hasVideo:re,nb:1,dropped:0};return E.audio=Ae.type==="audio"?Ae:void 0,E.video=Ae.type!=="audio"?Ae:void 0,E.initSegment=x,E.id3=zf(o,h,b,b),f.samples.length&&(E.text=Hf(f,h,b)),E},d}();function k3(d,c,u,r){if(d===null)return!0;var s=Math.max(r,1),o=c-d.baseTime/d.timescale;return Math.abs(o-u)>s}function Yf(d,c){var u=d==null?void 0:d.codec;return u&&u.length>4?u:u==="hvc1"||u==="hev1"?"hvc1.1.6.L120.90":u==="av01"?"av01.0.04M.08":u==="avc1"||c===Oe.VIDEO?"avc1.42e01e":"mp4a.40.5"}var Tn;try{Tn=self.performance.now.bind(self.performance)}catch(d){B.debug("Unable to use Performance API on this environment"),Tn=typeof self!="undefined"&&self.Date.now}var ru=[{demux:r3,remux:S3},{demux:d3,remux:iu},{demux:t3,remux:iu},{demux:g3,remux:iu}],nu=function(){function d(u,r,s,o,f){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=u,this.typeSupported=r,this.config=s,this.vendor=o,this.id=f}var c=d.prototype;return c.configure=function(r){this.transmuxConfig=r,this.decrypter&&this.decrypter.reset()},c.push=function(r,s,o,f){var h=this,v=o.transmuxing;v.executeStart=Tn();var m=new Uint8Array(r),y=this.currentTransmuxState,b=this.transmuxConfig;f&&(this.currentTransmuxState=f);var S=f||y,E=S.contiguous,A=S.discontinuity,x=S.trackSwitch,P=S.accurateTimeOffset,O=S.timeOffset,M=S.initSegmentChange,D=b.audioCodec,j=b.videoCodec,K=b.defaultInitPts,he=b.duration,re=b.initSegmentData,ne=T3(m,s);if(ne&&ne.method==="AES-128"){var Ae=this.getDecrypter();if(Ae.isSync()){var xe=Ae.softwareDecrypt(m,ne.key.buffer,ne.iv.buffer),we=o.part>-1;if(we&&(xe=Ae.flush()),!xe)return v.executeEnd=Tn(),su(o);m=new Uint8Array(xe)}else return this.decryptionPromise=Ae.webCryptoDecrypt(m,ne.key.buffer,ne.iv.buffer).then(function(Bt){var St=h.push(Bt,null,o);return h.decryptionPromise=null,St}),this.decryptionPromise}var Ve=this.needsProbing(A,x);if(Ve){var dt=this.configureTransmuxer(m);if(dt)return B.warn("[transmuxer] "+dt.message),this.observer.emit(L.ERROR,L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,error:dt,reason:dt.message}),v.executeEnd=Tn(),su(o)}(A||x||M||Ve)&&this.resetInitSegment(re,D,j,he,s),(A||M||Ve)&&this.resetInitialTimestamp(K),E||this.resetContiguity();var pt=this.transmux(m,ne,O,P,o),_t=this.currentTransmuxState;return _t.contiguous=!0,_t.discontinuity=!1,_t.trackSwitch=!1,v.executeEnd=Tn(),pt},c.flush=function(r){var s=this,o=r.transmuxing;o.executeStart=Tn();var f=this.decrypter,h=this.currentTransmuxState,v=this.decryptionPromise;if(v)return v.then(function(){return s.flush(r)});var m=[],y=h.timeOffset;if(f){var b=f.flush();b&&m.push(this.push(b,null,r))}var S=this.demuxer,E=this.remuxer;if(!S||!E)return o.executeEnd=Tn(),[su(r)];var A=S.flush(y);return us(A)?A.then(function(x){return s.flushRemux(m,x,r),m}):(this.flushRemux(m,A,r),m)},c.flushRemux=function(r,s,o){var f=s.audioTrack,h=s.videoTrack,v=s.id3Track,m=s.textTrack,y=this.currentTransmuxState,b=y.accurateTimeOffset,S=y.timeOffset;B.log("[transmuxer.ts]: Flushed fragment "+o.sn+(o.part>-1?" p: "+o.part:"")+" of level "+o.level);var E=this.remuxer.remux(f,h,v,m,S,b,!0,this.id);r.push({remuxResult:E,chunkMeta:o}),o.transmuxing.executeEnd=Tn()},c.resetInitialTimestamp=function(r){var s=this.demuxer,o=this.remuxer;!s||!o||(s.resetTimeStamp(r),o.resetTimeStamp(r))},c.resetContiguity=function(){var r=this.demuxer,s=this.remuxer;!r||!s||(r.resetContiguity(),s.resetNextTimestamp())},c.resetInitSegment=function(r,s,o,f,h){var v=this.demuxer,m=this.remuxer;!v||!m||(v.resetInitSegment(r,s,o,f),m.resetInitSegment(r,s,o,h))},c.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},c.transmux=function(r,s,o,f,h){var v;return s&&s.method==="SAMPLE-AES"?v=this.transmuxSampleAes(r,s,o,f,h):v=this.transmuxUnencrypted(r,o,f,h),v},c.transmuxUnencrypted=function(r,s,o,f){var h=this.demuxer.demux(r,s,!1,!this.config.progressive),v=h.audioTrack,m=h.videoTrack,y=h.id3Track,b=h.textTrack,S=this.remuxer.remux(v,m,y,b,s,o,!1,this.id);return{remuxResult:S,chunkMeta:f}},c.transmuxSampleAes=function(r,s,o,f,h){var v=this;return this.demuxer.demuxSampleAes(r,s,o).then(function(m){var y=v.remuxer.remux(m.audioTrack,m.videoTrack,m.id3Track,m.textTrack,o,f,!1,v.id);return{remuxResult:y,chunkMeta:h}})},c.configureTransmuxer=function(r){for(var s=this.config,o=this.observer,f=this.typeSupported,h=this.vendor,v,m=0,y=ru.length;m<y;m++)if(ru[m].demux.probe(r)){v=ru[m];break}if(!v)return new Error("Failed to find demuxer by probing fragment data");var b=this.demuxer,S=this.remuxer,E=v.remux,A=v.demux;(!S||!(S instanceof E))&&(this.remuxer=new E(o,s,f,h)),(!b||!(b instanceof A))&&(this.demuxer=new A(o,s,f),this.probe=A.probe)},c.needsProbing=function(r,s){return!this.demuxer||!this.remuxer||r||s},c.getDecrypter=function(){var r=this.decrypter;return r||(r=this.decrypter=new Zl(this.config)),r},d}();function T3(d,c){var u=null;return d.byteLength>0&&c!=null&&c.key!=null&&c.iv!==null&&c.method!=null&&(u=c),u}var su=function(c){return{remuxResult:{},chunkMeta:c}};function us(d){return"then"in d&&d.then instanceof Function}var E3=function(c,u,r,s,o){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=c,this.videoCodec=u,this.initSegmentData=r,this.duration=s,this.defaultInitPts=o||null},A3=function(c,u,r,s,o,f){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=c,this.contiguous=u,this.accurateTimeOffset=r,this.trackSwitch=s,this.timeOffset=o,this.initSegmentChange=f},qf={exports:{}};(function(d){var c=Object.prototype.hasOwnProperty,u="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(u=!1));function s(v,m,y){this.fn=v,this.context=m,this.once=y||!1}function o(v,m,y,b,S){if(typeof y!="function")throw new TypeError("The listener must be a function");var E=new s(y,b||v,S),A=u?u+m:m;return v._events[A]?v._events[A].fn?v._events[A]=[v._events[A],E]:v._events[A].push(E):(v._events[A]=E,v._eventsCount++),v}function f(v,m){--v._eventsCount===0?v._events=new r:delete v._events[m]}function h(){this._events=new r,this._eventsCount=0}h.prototype.eventNames=function(){var m=[],y,b;if(this._eventsCount===0)return m;for(b in y=this._events)c.call(y,b)&&m.push(u?b.slice(1):b);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(y)):m},h.prototype.listeners=function(m){var y=u?u+m:m,b=this._events[y];if(!b)return[];if(b.fn)return[b.fn];for(var S=0,E=b.length,A=new Array(E);S<E;S++)A[S]=b[S].fn;return A},h.prototype.listenerCount=function(m){var y=u?u+m:m,b=this._events[y];return b?b.fn?1:b.length:0},h.prototype.emit=function(m,y,b,S,E,A){var x=u?u+m:m;if(!this._events[x])return!1;var P=this._events[x],O=arguments.length,M,D;if(P.fn){switch(P.once&&this.removeListener(m,P.fn,void 0,!0),O){case 1:return P.fn.call(P.context),!0;case 2:return P.fn.call(P.context,y),!0;case 3:return P.fn.call(P.context,y,b),!0;case 4:return P.fn.call(P.context,y,b,S),!0;case 5:return P.fn.call(P.context,y,b,S,E),!0;case 6:return P.fn.call(P.context,y,b,S,E,A),!0}for(D=1,M=new Array(O-1);D<O;D++)M[D-1]=arguments[D];P.fn.apply(P.context,M)}else{var j=P.length,K;for(D=0;D<j;D++)switch(P[D].once&&this.removeListener(m,P[D].fn,void 0,!0),O){case 1:P[D].fn.call(P[D].context);break;case 2:P[D].fn.call(P[D].context,y);break;case 3:P[D].fn.call(P[D].context,y,b);break;case 4:P[D].fn.call(P[D].context,y,b,S);break;default:if(!M)for(K=1,M=new Array(O-1);K<O;K++)M[K-1]=arguments[K];P[D].fn.apply(P[D].context,M)}}return!0},h.prototype.on=function(m,y,b){return o(this,m,y,b,!1)},h.prototype.once=function(m,y,b){return o(this,m,y,b,!0)},h.prototype.removeListener=function(m,y,b,S){var E=u?u+m:m;if(!this._events[E])return this;if(!y)return f(this,E),this;var A=this._events[E];if(A.fn)A.fn===y&&(!S||A.once)&&(!b||A.context===b)&&f(this,E);else{for(var x=0,P=[],O=A.length;x<O;x++)(A[x].fn!==y||S&&!A[x].once||b&&A[x].context!==b)&&P.push(A[x]);P.length?this._events[E]=P.length===1?P[0]:P:f(this,E)}return this},h.prototype.removeAllListeners=function(m){var y;return m?(y=u?u+m:m,this._events[y]&&f(this,y)):(this._events=new r,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=u,h.EventEmitter=h,d.exports=h})(qf);var x3=qf.exports,au=Se(x3);typeof n!="undefined"&&n&&w3(self);function w3(d){var c=new au,u=function(o,f){d.postMessage({event:o,data:f})};c.on(L.FRAG_DECRYPTED,u),c.on(L.ERROR,u);var r=function(){var o=function(v){var m=function(b){u("workerLog",{logType:v,message:b})};B[v]=m};for(var f in B)o(f)};d.addEventListener("message",function(s){var o=s.data;switch(o.cmd){case"init":{var f=JSON.parse(o.config);d.transmuxer=new nu(c,o.typeSupported,f,o.vendor,o.id),X(f.debug,o.id),r(),u("init",null);break}case"configure":{d.transmuxer.configure(o.config);break}case"demux":{var h=d.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);us(h)?(d.transmuxer.async=!0,h.then(function(b){ou(d,b)}).catch(function(b){u(L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,chunkMeta:o.chunkMeta,fatal:!1,error:b,err:b,reason:"transmuxer-worker push error"})})):(d.transmuxer.async=!1,ou(d,h));break}case"flush":{var v=o.chunkMeta,m=d.transmuxer.flush(v),y=us(m);y||d.transmuxer.async?(us(m)||(m=Promise.resolve(m)),m.then(function(b){Zf(d,b,v)}).catch(function(b){u(L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,chunkMeta:o.chunkMeta,fatal:!1,error:b,err:b,reason:"transmuxer-worker flush error"})})):Zf(d,m,v);break}}})}function ou(d,c){if(P3(c.remuxResult))return!1;var u=[],r=c.remuxResult,s=r.audio,o=r.video;return s&&Xf(u,s),o&&Xf(u,o),d.postMessage({event:"transmuxComplete",data:c},u),!0}function Xf(d,c){c.data1&&d.push(c.data1.buffer),c.data2&&d.push(c.data2.buffer)}function Zf(d,c,u){var r=c.reduce(function(s,o){return ou(d,o)||s},!1);r||d.postMessage({event:"transmuxComplete",data:c[0]}),d.postMessage({event:"flush",data:u})}function P3(d){return!d.audio&&!d.video&&!d.text&&!d.id3&&!d.initSegment}function C3(){return typeof i=="function"}function L3(){var d=new self.Blob(["var exports={};var module={exports:exports};function define(f){f()};define.amd=true;("+i.toString()+")(true);"],{type:"text/javascript"}),c=self.URL.createObjectURL(d),u=new self.Worker(c);return{worker:u,objectURL:c}}function I3(d){var c=new self.URL(d,self.location.href).href,u=new self.Worker(c);return{worker:u,scriptURL:c}}var lu=Qi()||{isTypeSupported:function(){return!1}},R3=function(){function d(u,r,s,o){var f=this;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;var h=u.config;this.hls=u,this.id=r,this.useWorker=!!h.enableWorker,this.onTransmuxComplete=s,this.onFlush=o;var v=function(A,x){x=x||{},x.frag=f.frag,x.id=f.id,A===L.ERROR&&(f.error=x.error),f.hls.trigger(A,x)};this.observer=new au,this.observer.on(L.FRAG_DECRYPTED,v),this.observer.on(L.ERROR,v);var m={mp4:lu.isTypeSupported("video/mp4"),mpeg:lu.isTypeSupported("audio/mpeg"),mp3:lu.isTypeSupported('audio/mp4; codecs="mp3"')},y=navigator.vendor;if(this.useWorker&&typeof Worker!="undefined"){var b=h.workerPath||C3();if(b){try{h.workerPath?(B.log("loading Web Worker "+h.workerPath+' for "'+r+'"'),this.workerContext=I3(h.workerPath)):(B.log('injecting Web Worker for "'+r+'"'),this.workerContext=L3()),this.onwmsg=function(E){return f.onWorkerMessage(E)};var S=this.workerContext.worker;S.addEventListener("message",this.onwmsg),S.onerror=function(E){var A=new Error(E.message+" ("+E.filename+":"+E.lineno+")");h.enableWorker=!1,B.warn('Error in "'+r+'" Web Worker, fallback to inline'),f.hls.trigger(L.ERROR,{type:le.OTHER_ERROR,details:z.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:A})},S.postMessage({cmd:"init",typeSupported:m,vendor:y,id:r,config:JSON.stringify(h)})}catch(E){B.warn('Error setting up "'+r+'" Web Worker, fallback to inline',E),this.resetWorker(),this.error=null,this.transmuxer=new nu(this.observer,m,h,y,r)}return}}this.transmuxer=new nu(this.observer,m,h,y,r)}var c=d.prototype;return c.resetWorker=function(){if(this.workerContext){var r=this.workerContext,s=r.worker,o=r.objectURL;o&&self.URL.revokeObjectURL(o),s.removeEventListener("message",this.onwmsg),s.onerror=null,s.terminate(),this.workerContext=null}},c.destroy=function(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{var r=this.transmuxer;r&&(r.destroy(),this.transmuxer=null)}var s=this.observer;s&&s.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null},c.push=function(r,s,o,f,h,v,m,y,b,S){var E,A,x=this;b.transmuxing.start=self.performance.now();var P=this.transmuxer,O=v?v.start:h.start,M=h.decryptdata,D=this.frag,j=!(D&&h.cc===D.cc),K=!(D&&b.level===D.level),he=D?b.sn-D.sn:-1,re=this.part?b.part-this.part.index:-1,ne=he===0&&b.id>1&&b.id===(D==null?void 0:D.stats.chunkCount),Ae=!K&&(he===1||he===0&&(re===1||ne&&re<=0)),xe=self.performance.now();(K||he||h.stats.parsing.start===0)&&(h.stats.parsing.start=xe),v&&(re||!Ae)&&(v.stats.parsing.start=xe);var we=!(D&&((E=h.initSegment)==null?void 0:E.url)===((A=D.initSegment)==null?void 0:A.url)),Ve=new A3(j,Ae,y,K,O,we);if(!Ae||j||we){B.log("[transmuxer-interface, "+h.type+"]: Starting new transmux session for sn: "+b.sn+" p: "+b.part+" level: "+b.level+" id: "+b.id+`
|
|
13
|
+
`;throw new Error(i)};let La;const tg=new Uint8Array(16);function ig(){if(!La&&(La=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!La))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return La(tg)}const rg=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function qs(t){return typeof t=="string"&&rg.test(t)}const Ni=[];for(let t=0;t<256;++t)Ni.push((t+256).toString(16).slice(1));function ng(t,e=0){return(Ni[t[e+0]]+Ni[t[e+1]]+Ni[t[e+2]]+Ni[t[e+3]]+"-"+Ni[t[e+4]]+Ni[t[e+5]]+"-"+Ni[t[e+6]]+Ni[t[e+7]]+"-"+Ni[t[e+8]]+Ni[t[e+9]]+"-"+Ni[t[e+10]]+Ni[t[e+11]]+Ni[t[e+12]]+Ni[t[e+13]]+Ni[t[e+14]]+Ni[t[e+15]]).toLowerCase()}const Ou={randomUUID:typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ia(t,e,i){if(Ou.randomUUID&&!e&&!t)return Ou.randomUUID();t=t||{};const n=t.random||(t.rng||ig)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){i=i||0;for(let a=0;a<16;++a)e[i+a]=n[a];return e}return ng(n)}const Qo=["user","media","browser","media-session-api","google-ima-sdk","websocket"],Bu=["inline-player","bottom-widget","segment","segment-widget"],sg=["handled","ignored-due-to-advert","ignored-due-to-scrubbing"],ag=["load","play","play_progress","ad_link_click"],og=["phone","tablet","desktop"],lg=["content","ad"],ug=t=>{vt(t,"type",e=>$o(e)),vt(t,"description",e=>e.length>0),vt(t,"initiatedBy",e=>Qo.includes(e))},cg=t=>{vt(t,"type",e=>$o(e)),vt(t,"description",e=>e.length>0),vt(t,"initiatedBy",e=>Qo.includes(e)),vt(t,"emittedFrom",e=>Bu.includes(e)),vt(t,"id",e=>qs(e)),vt(t,"createdAt",e=>el(e)),vt(t,"status",e=>e==="pending")},dg=t=>{vt(t,"type",e=>$o(e)),vt(t,"description",e=>e.length>0),vt(t,"initiatedBy",e=>Qo.includes(e)),vt(t,"emittedFrom",e=>Bu.includes(e)),vt(t,"id",e=>qs(e)),vt(t,"createdAt",e=>el(e)),vt(t,"status",e=>sg.includes(e)),vt(t,"changedProps",e=>typeof e=="object"),vt(t,"processedAt",e=>el(e))},fg=t=>{vt(t,"event_type",e=>ag.includes(e)),vt(t,"device_type",e=>og.includes(e)),vt(t,"media_type",e=>lg.includes(e)),vt(t,"content_id",e=>!e||qs(e)),vt(t,"project_id",e=>!e||e>0),vt(t,"analytics_id",e=>!e||e>0),vt(t,"ad_id",e=>!e||e>0),vt(t,"media_id",e=>!e||e>0),vt(t,"local_storage_id",e=>!e||qs(e)),vt(t,"listen_session_id",e=>!e||qs(e)),vt(t,"session_created_at",e=>e>=0),vt(t,"duration",e=>e>=0),vt(t,"listen_length_percent",e=>e>=0&&e<=100),vt(t,"listen_length_seconds",e=>e>=0),vt(t,"speed",e=>e>=0),vt(t,"location",e=>e.length>0),vt(t,"referrer",e=>typeof e=="string"),vt(t,"player_version",e=>e.length>0),vt(t,"player_npm_version",e=>e.length>0)},$o=t=>{t=t||"<invalid>";const e=t[0]===t[0].toUpperCase(),i=t.match(/[^a-zA-Z]/);return e&&!i},el=t=>{try{return new Date(Date.parse(t)).toISOString()===t}catch(e){return!1}},vt=(t,e,i)=>{Object.prototype.hasOwnProperty.call(t,e)||rr(`Invalid event: missing a '${e}' property`,t),i(t[e])||rr(`Invalid event: '${e}: ${t[e]}' is invalid`,t)},qe=t=>{ug(t);const e=Ia(),i=new Date().toISOString();return de({id:e,createdAt:i,status:"pending"},t)},hg=(t,e={})=>{let i;try{i=new URL(t)}catch(a){return t}const n=new URLSearchParams(i.search);for(const[a,l]of Object.entries(e))n.set(a,l);return i.search=n.toString(),i.toString()},gg=(t,e)=>{const i=window.location.hostname==="localhost",n={};return n.vad_type="linear",n.npa=t!=="personalized"?1:0,n.tfua=t==="under-the-age-of-consent"?1:0,n.ad_type=e?"audio_video":"audio",i&&(n.url||(n.url="https://googleads.github.io")),i&&(n.description_url||(n.description_url="https://googleads.github.io")),i||(n.description_url=window.location.href),n},Mu=t=>{if(!t)return!1;const e=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth,{top:n,bottom:a,left:l,right:g}=t.getBoundingClientRect();return n<e&&a>0&&l<i&&g>0},Nu=(t,e,i)=>rt(t,e,e==="style"?mg(i):i),vg=/;(?!([^()]*\([^()]*\))*[^()]*\))/,mg=t=>t.split(vg).map(e=>e+" !important").join(";"),{document:pg}=Bh;function _g(t){let e,i,n,a,l,g;return{c(){e=F("script"),n=Ce(),a=F("div"),Rr(e.src,i="https://imasdk.googleapis.com/js/sdkloader/ima3.js")||Nu(e,"src",i),Nu(a,"class","vast-container")},m(p,_){I(pg.head,e),se(p,n,_),se(p,a,_),t[12](a),l||(g=[ge(e,"load",t[1]),ge(e,"error",t[2])],l=!0)},p:oe,i:oe,o:oe,d(p){te(e),p&&te(n),p&&te(a),t[12](null),l=!1,Mt(g)}}}function yg(t,e,i){let n,a,{vastUrl:l}=e,{advertConsent:g}=e,{video:p}=e,{playbackState:_}=e,{duration:k}=e,{currentTime:T}=e,{onEvent:C=()=>{}}=e,U,V,N,Q,W,ue,ie;const be=()=>{V=new google.ima.AdDisplayContainer(U,p),N=new google.ima.AdsLoader(V),N.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,Se,!1),N.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,z,!1),Q=new google.ima.AdsRequest,Q.adTagUrl=a,Q.linearAdSlotWidth=p.clientWidth,Q.linearAdSlotHeight=p.clientHeight,N.requestAds(Q)},Se=X=>{i(10,W=X.getAdsManager(p)),W.addEventListener(google.ima.AdEvent.Type.AD_PROGRESS,pe),W.addEventListener(google.ima.AdEvent.Type.CLICK,Z),W.addEventListener(google.ima.AdEvent.Type.PAUSED,L),W.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,le),W.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,z)},fe=()=>{if(!ue){ue=!0,p.pause(),p.load(),V.initialize();try{W.init(p.clientWidth,p.clientHeight,google.ima.ViewMode.NORMAL),W.start(),Ie(),Ee()}catch(X){z(null,X)}}},pe=X=>{ie=X.getAdData(),ie.updatedAt=Date.now(),C(qe({type:"CurrentTimeUpdated",description:"The media's current time was updated.",initiatedBy:"media"})),k!==ie.duration&&(i(4,k=ie.duration),C(qe({type:"DurationUpdated",description:"The media's duration was updated.",initiatedBy:"google-ima-sdk"})))},Z=()=>{C(qe({type:"PressedAdvertVideo",description:"The video background was pressed to open the advert in a new tab.",initiatedBy:"user"}))},L=()=>{_!=="paused"&&(i(3,_="paused"),C(qe({type:"PlaybackPaused",description:"The media became paused at its current playback time.",initiatedBy:"google-ima-sdk"})))},le=()=>{C(qe({type:"PlaybackEnded",description:"The media finished playing because it reached the end.",initiatedBy:"google-ima-sdk"}))},z=(X,B)=>{B=B||X.getError(),W==null||W.destroy(),C(qe({type:"PlaybackErrored",description:"The media failed to play.",initiatedBy:"google-ima-sdk",mediaType:"VAST",mediaUrl:a,errorMessage:`${B.getMessage()} (code=${B.getErrorCode()})`}))},Ke=()=>{C(qe({type:"PlaybackErrored",description:"The media failed to play.",initiatedBy:"browser",mediaType:"VAST",mediaUrl:a,errorMessage:"The ima3.js script was blocked."}))},Ie=()=>{const X=document.createTreeWalker(U);let B;for(;B=X.nextNode();){const Ue=/;(?!([^()]*\([^()]*\))*[^()]*\))/,q=B.style.cssText.split(Ue).filter(ve=>ve).map(ve=>ve.includes("!important")?ve:`${ve} !important`);B.style.cssText=q.join(";")}},Ee=()=>{U&&(i(5,T=ke()),W.resize(p.clientWidth,p.clientHeight,google.ima.ViewMode.NORMAL),requestAnimationFrame(Ee))},ke=()=>{if(!ie)return 0;if(_==="playing"){const X=(Date.now()-ie.updatedAt)/1e3;return ie.currentTime+X}else return ie.updatedAt=Date.now(),T};function G(X){Ne[X?"unshift":"push"](()=>{U=X,i(0,U)})}return t.$$set=X=>{"vastUrl"in X&&i(6,l=X.vastUrl),"advertConsent"in X&&i(7,g=X.advertConsent),"video"in X&&i(8,p=X.video),"playbackState"in X&&i(3,_=X.playbackState),"duration"in X&&i(4,k=X.duration),"currentTime"in X&&i(5,T=X.currentTime),"onEvent"in X&&i(9,C=X.onEvent)},t.$$.update=()=>{t.$$.dirty&384&&i(11,n=gg(g,Mu(p))),t.$$.dirty&2112&&(a=hg(l,n)),t.$$.dirty&1032&&W&&_==="playing"&&fe(),t.$$.dirty&1032&&(_==="playing"?W==null||W.resume():W==null||W.pause())},[U,be,Ke,_,k,T,l,g,p,C,W,n,G]}class bg extends tt{constructor(e){super(),et(this,e,yg,_g,Ye,{vastUrl:6,advertConsent:7,video:8,playbackState:3,duration:4,currentTime:5,onEvent:9})}get vastUrl(){return this.$$.ctx[6]}set vastUrl(e){this.$$set({vastUrl:e}),w()}get advertConsent(){return this.$$.ctx[7]}set advertConsent(e){this.$$set({advertConsent:e}),w()}get video(){return this.$$.ctx[8]}set video(e){this.$$set({video:e}),w()}get playbackState(){return this.$$.ctx[3]}set playbackState(e){this.$$set({playbackState:e}),w()}get duration(){return this.$$.ctx[4]}set duration(e){this.$$set({duration:e}),w()}get currentTime(){return this.$$.ctx[5]}set currentTime(e){this.$$set({currentTime:e}),w()}get onEvent(){return this.$$.ctx[9]}set onEvent(e){this.$$set({onEvent:e}),w()}}const Sg=(t,e)=>{if(!t)return[];const i=t.audio||[],n=t.video||[];return Mu(e)?[...n,...i]:[...i,...n]};function kg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fu={exports:{}};(function(t,e){(function i(n){(function(a,l){t.exports=l()})(this,function(){function a(d,c){var u=Object.keys(d);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(d);c&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(d,s).enumerable})),u.push.apply(u,r)}return u}function l(d){for(var c=1;c<arguments.length;c++){var u=arguments[c]!=null?arguments[c]:{};c%2?a(Object(u),!0).forEach(function(r){_(d,r,u[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(u)):a(Object(u)).forEach(function(r){Object.defineProperty(d,r,Object.getOwnPropertyDescriptor(u,r))})}return d}function g(d,c){for(var u=0;u<c.length;u++){var r=c[u];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(d,be(r.key),r)}}function p(d,c,u){return c&&g(d.prototype,c),u&&g(d,u),Object.defineProperty(d,"prototype",{writable:!1}),d}function _(d,c,u){return c=be(c),c in d?Object.defineProperty(d,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):d[c]=u,d}function k(){return k=Object.assign?Object.assign.bind():function(d){for(var c=1;c<arguments.length;c++){var u=arguments[c];for(var r in u)Object.prototype.hasOwnProperty.call(u,r)&&(d[r]=u[r])}return d},k.apply(this,arguments)}function T(d,c){d.prototype=Object.create(c.prototype),d.prototype.constructor=d,U(d,c)}function C(d){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(u){return u.__proto__||Object.getPrototypeOf(u)},C(d)}function U(d,c){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},U(d,c)}function V(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(d){return!1}}function N(d,c,u){return V()?N=Reflect.construct.bind():N=function(s,o,f){var h=[null];h.push.apply(h,o);var v=Function.bind.apply(s,h),m=new v;return f&&U(m,f.prototype),m},N.apply(null,arguments)}function Q(d){return Function.toString.call(d).indexOf("[native code]")!==-1}function W(d){var c=typeof Map=="function"?new Map:void 0;return W=function(r){if(r===null||!Q(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof c!="undefined"){if(c.has(r))return c.get(r);c.set(r,s)}function s(){return N(r,arguments,C(this).constructor)}return s.prototype=Object.create(r.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),U(s,r)},W(d)}function ue(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function ie(d,c){if(typeof d!="object"||d===null)return d;var u=d[Symbol.toPrimitive];if(u!==void 0){var r=u.call(d,c||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(d)}function be(d){var c=ie(d,"string");return typeof c=="symbol"?c:String(c)}function Se(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}var fe={exports:{}};(function(d,c){(function(u){var r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,s=/^(?=([^\/?#]*))\1([^]*)$/,o=/(?:\/|^)\.(?=\/)/g,f=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,h={buildAbsoluteURL:function(v,m,y){if(y=y||{},v=v.trim(),m=m.trim(),!m){if(!y.alwaysNormalize)return v;var b=h.parseURL(v);if(!b)throw new Error("Error trying to parse base URL.");return b.path=h.normalizePath(b.path),h.buildURLFromParts(b)}var S=h.parseURL(m);if(!S)throw new Error("Error trying to parse relative URL.");if(S.scheme)return y.alwaysNormalize?(S.path=h.normalizePath(S.path),h.buildURLFromParts(S)):m;var E=h.parseURL(v);if(!E)throw new Error("Error trying to parse base URL.");if(!E.netLoc&&E.path&&E.path[0]!=="/"){var A=s.exec(E.path);E.netLoc=A[1],E.path=A[2]}E.netLoc&&!E.path&&(E.path="/");var x={scheme:E.scheme,netLoc:S.netLoc,path:null,params:S.params,query:S.query,fragment:S.fragment};if(!S.netLoc&&(x.netLoc=E.netLoc,S.path[0]!=="/"))if(!S.path)x.path=E.path,S.params||(x.params=E.params,S.query||(x.query=E.query));else{var P=E.path,O=P.substring(0,P.lastIndexOf("/")+1)+S.path;x.path=h.normalizePath(O)}return x.path===null&&(x.path=y.alwaysNormalize?h.normalizePath(S.path):S.path),h.buildURLFromParts(x)},parseURL:function(v){var m=r.exec(v);return m?{scheme:m[1]||"",netLoc:m[2]||"",path:m[3]||"",params:m[4]||"",query:m[5]||"",fragment:m[6]||""}:null},normalizePath:function(v){for(v=v.split("").reverse().join("").replace(o,"");v.length!==(v=v.replace(f,"")).length;);return v.split("").reverse().join("")},buildURLFromParts:function(v){return v.scheme+v.netLoc+v.path+v.params+v.query+v.fragment}};d.exports=h})()})(fe);var pe=fe.exports,Z=Number.isFinite||function(d){return typeof d=="number"&&isFinite(d)},L=function(d){return d.MEDIA_ATTACHING="hlsMediaAttaching",d.MEDIA_ATTACHED="hlsMediaAttached",d.MEDIA_DETACHING="hlsMediaDetaching",d.MEDIA_DETACHED="hlsMediaDetached",d.BUFFER_RESET="hlsBufferReset",d.BUFFER_CODECS="hlsBufferCodecs",d.BUFFER_CREATED="hlsBufferCreated",d.BUFFER_APPENDING="hlsBufferAppending",d.BUFFER_APPENDED="hlsBufferAppended",d.BUFFER_EOS="hlsBufferEos",d.BUFFER_FLUSHING="hlsBufferFlushing",d.BUFFER_FLUSHED="hlsBufferFlushed",d.MANIFEST_LOADING="hlsManifestLoading",d.MANIFEST_LOADED="hlsManifestLoaded",d.MANIFEST_PARSED="hlsManifestParsed",d.LEVEL_SWITCHING="hlsLevelSwitching",d.LEVEL_SWITCHED="hlsLevelSwitched",d.LEVEL_LOADING="hlsLevelLoading",d.LEVEL_LOADED="hlsLevelLoaded",d.LEVEL_UPDATED="hlsLevelUpdated",d.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",d.LEVELS_UPDATED="hlsLevelsUpdated",d.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",d.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",d.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",d.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",d.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",d.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",d.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",d.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",d.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",d.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",d.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",d.CUES_PARSED="hlsCuesParsed",d.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",d.INIT_PTS_FOUND="hlsInitPtsFound",d.FRAG_LOADING="hlsFragLoading",d.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",d.FRAG_LOADED="hlsFragLoaded",d.FRAG_DECRYPTED="hlsFragDecrypted",d.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",d.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",d.FRAG_PARSING_METADATA="hlsFragParsingMetadata",d.FRAG_PARSED="hlsFragParsed",d.FRAG_BUFFERED="hlsFragBuffered",d.FRAG_CHANGED="hlsFragChanged",d.FPS_DROP="hlsFpsDrop",d.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",d.ERROR="hlsError",d.DESTROYING="hlsDestroying",d.KEY_LOADING="hlsKeyLoading",d.KEY_LOADED="hlsKeyLoaded",d.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",d.BACK_BUFFER_REACHED="hlsBackBufferReached",d}({}),le=function(d){return d.NETWORK_ERROR="networkError",d.MEDIA_ERROR="mediaError",d.KEY_SYSTEM_ERROR="keySystemError",d.MUX_ERROR="muxError",d.OTHER_ERROR="otherError",d}({}),z=function(d){return d.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",d.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",d.KEY_SYSTEM_NO_SESSION="keySystemNoSession",d.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",d.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",d.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",d.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",d.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",d.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",d.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",d.MANIFEST_LOAD_ERROR="manifestLoadError",d.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",d.MANIFEST_PARSING_ERROR="manifestParsingError",d.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",d.LEVEL_EMPTY_ERROR="levelEmptyError",d.LEVEL_LOAD_ERROR="levelLoadError",d.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",d.LEVEL_PARSING_ERROR="levelParsingError",d.LEVEL_SWITCH_ERROR="levelSwitchError",d.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",d.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",d.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",d.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",d.FRAG_LOAD_ERROR="fragLoadError",d.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",d.FRAG_DECRYPT_ERROR="fragDecryptError",d.FRAG_PARSING_ERROR="fragParsingError",d.FRAG_GAP="fragGap",d.REMUX_ALLOC_ERROR="remuxAllocError",d.KEY_LOAD_ERROR="keyLoadError",d.KEY_LOAD_TIMEOUT="keyLoadTimeOut",d.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",d.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",d.BUFFER_APPEND_ERROR="bufferAppendError",d.BUFFER_APPENDING_ERROR="bufferAppendingError",d.BUFFER_STALLED_ERROR="bufferStalledError",d.BUFFER_FULL_ERROR="bufferFullError",d.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",d.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",d.INTERNAL_EXCEPTION="internalException",d.INTERNAL_ABORTED="aborted",d.UNKNOWN="unknown",d}({}),Ke=function(){},Ie={trace:Ke,debug:Ke,log:Ke,warn:Ke,info:Ke,error:Ke},Ee=Ie;function ke(d){var c=self.console[d];return c?c.bind(self.console,"["+d+"] >"):Ke}function G(d){for(var c=arguments.length,u=new Array(c>1?c-1:0),r=1;r<c;r++)u[r-1]=arguments[r];u.forEach(function(s){Ee[s]=d[s]?d[s].bind(d):ke(s)})}function X(d,c){if(self.console&&d===!0||typeof d=="object"){G(d,"debug","log","info","warn","error");try{Ee.log('Debug logs enabled for "'+c+'" in hls.js version 1.4.8')}catch(u){Ee=Ie}}else Ee=Ie}var B=Ee,Ue=/^(\d+)x(\d+)$/,De=/(.+?)=(".*?"|.*?)(?:,|$)/g,q=function(){function d(u){typeof u=="string"&&(u=d.parseAttrList(u));for(var r in u)u.hasOwnProperty(r)&&(r.substring(0,2)==="X-"&&(this.clientAttrs=this.clientAttrs||[],this.clientAttrs.push(r)),this[r]=u[r])}var c=d.prototype;return c.decimalInteger=function(r){var s=parseInt(this[r],10);return s>Number.MAX_SAFE_INTEGER?1/0:s},c.hexadecimalInteger=function(r){if(this[r]){var s=(this[r]||"0x").slice(2);s=(s.length&1?"0":"")+s;for(var o=new Uint8Array(s.length/2),f=0;f<s.length/2;f++)o[f]=parseInt(s.slice(f*2,f*2+2),16);return o}else return null},c.hexadecimalIntegerAsNumber=function(r){var s=parseInt(this[r],16);return s>Number.MAX_SAFE_INTEGER?1/0:s},c.decimalFloatingPoint=function(r){return parseFloat(this[r])},c.optionalFloat=function(r,s){var o=this[r];return o?parseFloat(o):s},c.enumeratedString=function(r){return this[r]},c.bool=function(r){return this[r]==="YES"},c.decimalResolution=function(r){var s=Ue.exec(this[r]);if(s!==null)return{width:parseInt(s[1],10),height:parseInt(s[2],10)}},d.parseAttrList=function(r){var s,o={},f='"';for(De.lastIndex=0;(s=De.exec(r))!==null;){var h=s[2];h.indexOf(f)===0&&h.lastIndexOf(f)===h.length-1&&(h=h.slice(1,-1));var v=s[1].trim();o[v]=h}return o},d}();function ve(d){return d!=="ID"&&d!=="CLASS"&&d!=="START-DATE"&&d!=="DURATION"&&d!=="END-DATE"&&d!=="END-ON-NEXT"}function at(d){return d==="SCTE35-OUT"||d==="SCTE35-IN"}var Qe=function(){function d(c,u){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,u){var r=u.attr;for(var s in r)if(Object.prototype.hasOwnProperty.call(c,s)&&c[s]!==r[s]){B.warn('DATERANGE tag attribute: "'+s+'" does not match for tags with ID: "'+c.ID+'"'),this._badValueForSameId=s;break}c=k(new q({}),r,c)}if(this.attr=c,this._startDate=new Date(c["START-DATE"]),"END-DATE"in this.attr){var o=new Date(this.attr["END-DATE"]);Z(o.getTime())&&(this._endDate=o)}}return p(d,[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){if(this._endDate)return this._endDate;var u=this.duration;return u!==null?new Date(this._startDate.getTime()+u*1e3):null}},{key:"duration",get:function(){if("DURATION"in this.attr){var u=this.attr.decimalFloatingPoint("DURATION");if(Z(u))return u}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}},{key:"endOnNext",get:function(){return this.attr.bool("END-ON-NEXT")}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&Z(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}]),d}(),Et=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}},Oe={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"},Te=function(){function d(u){var r;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(r={},r[Oe.AUDIO]=null,r[Oe.VIDEO]=null,r[Oe.AUDIOVIDEO]=null,r),this.baseurl=u}var c=d.prototype;return c.setByteRange=function(r,s){var o=r.split("@",2),f=[];o.length===1?f[0]=s?s.byteRangeEndOffset:0:f[0]=parseInt(o[1]),f[1]=parseInt(o[0])+f[0],this._byteRange=f},p(d,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=pe.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(r){this._url=r}}]),d}(),it=function(d){T(c,d);function c(r,s){var o;return o=d.call(this,s)||this,o._decryptdata=null,o.rawProgramDateTime=null,o.programDateTime=null,o.tagList=[],o.duration=0,o.sn=0,o.levelkeys=void 0,o.type=void 0,o.loader=null,o.keyLoader=null,o.level=-1,o.cc=0,o.startPTS=void 0,o.endPTS=void 0,o.startDTS=void 0,o.endDTS=void 0,o.start=0,o.deltaPTS=void 0,o.maxStartPTS=void 0,o.minEndPTS=void 0,o.stats=new Et,o.urlId=0,o.data=void 0,o.bitrateTest=!1,o.title=null,o.initSegment=null,o.endList=void 0,o.gap=void 0,o.type=r,o}var u=c.prototype;return u.setKeyFormat=function(s){if(this.levelkeys){var o=this.levelkeys[s];o&&!this._decryptdata&&(this._decryptdata=o.getDecryptData(this.sn))}},u.abortRequests=function(){var s,o;(s=this.loader)==null||s.abort(),(o=this.keyLoader)==null||o.abort()},u.setElementaryStreamInfo=function(s,o,f,h,v,m){m===void 0&&(m=!1);var y=this.elementaryStreams,b=y[s];if(!b){y[s]={startPTS:o,endPTS:f,startDTS:h,endDTS:v,partial:m};return}b.startPTS=Math.min(b.startPTS,o),b.endPTS=Math.max(b.endPTS,f),b.startDTS=Math.min(b.startDTS,h),b.endDTS=Math.max(b.endDTS,v)},u.clearElementaryStreamInfo=function(){var s=this.elementaryStreams;s[Oe.AUDIO]=null,s[Oe.VIDEO]=null,s[Oe.AUDIOVIDEO]=null},p(c,[{key:"decryptdata",get:function(){var s=this.levelkeys;if(!s&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){var o=this.levelkeys.identity;if(o)this._decryptdata=o.getDecryptData(this.sn);else{var f=Object.keys(this.levelkeys);if(f.length===1)return this._decryptdata=this.levelkeys[f[0]].getDecryptData(this.sn)}}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null||!Z(this.programDateTime))return null;var s=Z(this.duration)?this.duration:0;return this.programDateTime+s*1e3}},{key:"encrypted",get:function(){var s;if((s=this._decryptdata)!=null&&s.encrypted)return!0;if(this.levelkeys){var o=Object.keys(this.levelkeys),f=o.length;if(f>1||f===1&&this.levelkeys[o[0]].encrypted)return!0}return!1}}]),c}(Te),xt=function(d){T(c,d);function c(u,r,s,o,f){var h;h=d.call(this,s)||this,h.fragOffset=0,h.duration=0,h.gap=!1,h.independent=!1,h.relurl=void 0,h.fragment=void 0,h.index=void 0,h.stats=new Et,h.duration=u.decimalFloatingPoint("DURATION"),h.gap=u.bool("GAP"),h.independent=u.bool("INDEPENDENT"),h.relurl=u.enumeratedString("URI"),h.fragment=r,h.index=o;var v=u.enumeratedString("BYTERANGE");return v&&h.setByteRange(v,f),f&&(h.fragOffset=f.fragOffset+f.duration),h}return p(c,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var r=this.elementaryStreams;return!!(r.audio||r.video||r.audiovideo)}}]),c}(Te),wt=10,Xt=function(){function d(u){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=u}var c=d.prototype;return c.reloaded=function(r){if(!r){this.advanced=!0,this.updated=!0;return}var s=this.lastPartSn-r.lastPartSn,o=this.lastPartIndex-r.lastPartIndex;this.updated=this.endSN!==r.endSN||!!o||!!s,this.advanced=this.endSN>r.endSN||s>0||s===0&&o>0,this.updated||this.advanced?this.misses=Math.floor(r.misses*.6):this.misses=r.misses+1,this.availabilityDelay=r.availabilityDelay},p(d,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Z(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||wt}},{key:"drift",get:function(){var r=this.driftEndTime-this.driftStartTime;if(r>0){var s=this.driftEnd-this.driftStart;return s*1e3/r}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var r;return(r=this.partList)!=null&&r.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var r;return(r=this.fragments)!=null&&r.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var r;return(r=this.partList)!=null&&r.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var r;return(r=this.partList)!=null&&r.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),d}(),Pt=void 0,Ht=Se(Pt);function yt(d,c,u){return Uint8Array.prototype.slice?d.slice(c,u):new Uint8Array(Array.prototype.slice.call(d,c,u))}var ft=function(c,u){return u+10<=c.length&&c[u]===73&&c[u+1]===68&&c[u+2]===51&&c[u+3]<255&&c[u+4]<255&&c[u+6]<128&&c[u+7]<128&&c[u+8]<128&&c[u+9]<128},Nt=function(c,u){return u+10<=c.length&&c[u]===51&&c[u+1]===68&&c[u+2]===73&&c[u+3]<255&&c[u+4]<255&&c[u+6]<128&&c[u+7]<128&&c[u+8]<128&&c[u+9]<128},mt=function(c,u){for(var r=u,s=0;ft(c,u);){s+=10;var o=bt(c,u+6);s+=o,Nt(c,u+10)&&(s+=10),u+=s}if(s>0)return c.subarray(r,r+s)},bt=function(c,u){var r=0;return r=(c[u]&127)<<21,r|=(c[u+1]&127)<<14,r|=(c[u+2]&127)<<7,r|=c[u+3]&127,r},Zt=function(c,u){return ft(c,u)&&bt(c,u+6)+10<=c.length-u},Rt=function(c){for(var u=ot(c),r=0;r<u.length;r++){var s=u[r];if(Jt(s))return Ot(s)}},Jt=function(c){return c&&c.key==="PRIV"&&c.info==="com.apple.streaming.transportStreamTimestamp"},nt=function(c){var u=String.fromCharCode(c[0],c[1],c[2],c[3]),r=bt(c,4),s=10;return{type:u,size:r,data:c.subarray(s,s+r)}},ot=function(c){for(var u=0,r=[];ft(c,u);){var s=bt(c,u+6);u+=10;for(var o=u+s;u+8<o;){var f=nt(c.subarray(u)),h=li(f);h&&r.push(h),u+=f.size+10}Nt(c,u)&&(u+=10)}return r},li=function(c){return c.type==="PRIV"?Ae(c):c.type[0]==="W"?Ft(c):Dt(c)},Ae=function(c){if(!(c.size<2)){var u=Ut(c.data,!0),r=new Uint8Array(c.data.subarray(u.length+1));return{key:c.type,info:u,data:r.buffer}}},Dt=function(c){if(!(c.size<2)){if(c.type==="TXXX"){var u=1,r=Ut(c.data.subarray(u),!0);u+=r.length+1;var s=Ut(c.data.subarray(u));return{key:c.type,info:r,data:s}}var o=Ut(c.data.subarray(1));return{key:c.type,data:o}}},Ft=function(c){if(c.type==="WXXX"){if(c.size<2)return;var u=1,r=Ut(c.data.subarray(u),!0);u+=r.length+1;var s=Ut(c.data.subarray(u));return{key:c.type,info:r,data:s}}var o=Ut(c.data);return{key:c.type,data:o}},Ot=function(c){if(c.data.byteLength===8){var u=new Uint8Array(c.data),r=u[3]&1,s=(u[4]<<23)+(u[5]<<15)+(u[6]<<7)+u[7];return s/=45,r&&(s+=4772185884e-2),Math.round(s)}},Ut=function(c,u){u===void 0&&(u=!1);var r=ci();if(r){var s=r.decode(c);if(u){var o=s.indexOf("\0");return o!==-1?s.substring(0,o):s}return s.replace(/\0/g,"")}for(var f=c.length,h,v,m,y="",b=0;b<f;){if(h=c[b++],h===0&&u)return y;if(h===0||h===3)continue;switch(h>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:y+=String.fromCharCode(h);break;case 12:case 13:v=c[b++],y+=String.fromCharCode((h&31)<<6|v&63);break;case 14:v=c[b++],m=c[b++],y+=String.fromCharCode((h&15)<<12|(v&63)<<6|(m&63)<<0);break}}return y},jt;function ci(){return!jt&&typeof self.TextDecoder!="undefined"&&(jt=new self.TextDecoder("utf-8")),jt}var Kt={hexDump:function(c){for(var u="",r=0;r<c.length;r++){var s=c[r].toString(16);s.length<2&&(s="0"+s),u+=s}return u}},Yt=Math.pow(2,32)-1,mi=[].push,Vt={video:1,audio:2,id3:3,text:4};function ct(d){return String.fromCharCode.apply(null,d)}function di(d,c){var u=d[c]<<8|d[c+1];return u<0?65536+u:u}function Be(d,c){var u=fi(d,c);return u<0?4294967296+u:u}function fi(d,c){return d[c]<<24|d[c+1]<<16|d[c+2]<<8|d[c+3]}function Qt(d,c,u){d[c]=u>>24,d[c+1]=u>>16&255,d[c+2]=u>>8&255,d[c+3]=u&255}function Je(d,c){var u=[];if(!c.length)return u;for(var r=d.byteLength,s=0;s<r;){var o=Be(d,s),f=ct(d.subarray(s+4,s+8)),h=o>1?s+o:r;if(f===c[0])if(c.length===1)u.push(d.subarray(s+8,h));else{var v=Je(d.subarray(s+8,h),c.slice(1));v.length&&mi.apply(u,v)}s=h}return u}function pi(d){var c=[],u=d[0],r=8,s=Be(d,r);r+=4;var o=0,f=0;u===0?r+=8:r+=16,r+=2;var h=d.length+f,v=di(d,r);r+=2;for(var m=0;m<v;m++){var y=r,b=Be(d,y);y+=4;var S=b&2147483647,E=(b&2147483648)>>>31;if(E===1)return B.warn("SIDX has hierarchical references (not supported)"),null;var A=Be(d,y);y+=4,c.push({referenceSize:S,subsegmentDuration:A,info:{duration:A/s,start:h,end:h+S-1}}),h+=S,y+=4,r=y}return{earliestPresentationTime:o,timescale:s,version:u,referencesCount:v,references:c}}function me(d){for(var c=[],u=Je(d,["moov","trak"]),r=0;r<u.length;r++){var s=u[r],o=Je(s,["tkhd"])[0];if(o){var f=o[0],h=f===0?12:20,v=Be(o,h),m=Je(s,["mdia","mdhd"])[0];if(m){f=m[0],h=f===0?12:20;var y=Be(m,h),b=Je(s,["mdia","hdlr"])[0];if(b){var S=ct(b.subarray(8,12)),E={soun:Oe.AUDIO,vide:Oe.VIDEO}[S];if(E){var A=Je(s,["mdia","minf","stbl","stsd"])[0],x=void 0;A&&(x=ct(A.subarray(12,16))),c[v]={timescale:y,type:E},c[E]={timescale:y,id:v,codec:x}}}}}}var P=Je(d,["moov","mvex","trex"]);return P.forEach(function(O){var M=Be(O,4),D=c[M];D&&(D.default={duration:Be(O,12),flags:Be(O,20)})}),c}function $t(d,c){if(!d||!c)return d;var u=c.keyId;if(u&&c.isCommonEncryption){var r=Je(d,["moov","trak"]);r.forEach(function(s){var o=Je(s,["mdia","minf","stbl","stsd"])[0],f=o.subarray(8),h=Je(f,["enca"]),v=h.length>0;v||(h=Je(f,["encv"])),h.forEach(function(m){var y=v?m.subarray(28):m.subarray(78),b=Je(y,["sinf"]);b.forEach(function(S){var E=hi(S);if(E){var A=E.subarray(8,24);A.some(function(x){return x!==0})||(B.log("[eme] Patching keyId in 'enc"+(v?"a":"v")+">sinf>>tenc' box: "+Kt.hexDump(A)+" -> "+Kt.hexDump(u)),E.set(u,8))}})})})}return d}function hi(d){var c=Je(d,["schm"])[0];if(c){var u=ct(c.subarray(4,8));if(u==="cbcs"||u==="cenc")return Je(d,["schi","tenc"])[0]}return B.error("[eme] missing 'schm' box"),null}function _i(d,c){return Je(c,["moof","traf"]).reduce(function(u,r){var s=Je(r,["tfdt"])[0],o=s[0],f=Je(r,["tfhd"]).reduce(function(h,v){var m=Be(v,4),y=d[m];if(y){var b=Be(s,4);if(o===1){if(b===Yt)return B.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),h;b*=Yt+1,b+=Be(s,8)}var S=y.timescale||9e4,E=b/S;if(isFinite(E)&&(h===null||E<h))return E}return h},null);return f!==null&&isFinite(f)&&(u===null||f<u)?f:u},null)}function wi(d,c){for(var u=0,r=0,s=0,o=Je(d,["moof","traf"]),f=0;f<o.length;f++){var h=o[f],v=Je(h,["tfhd"])[0],m=Be(v,4),y=c[m];if(y){var b=y.default,S=Be(v,0)|(b==null?void 0:b.flags),E=b==null?void 0:b.duration;S&8&&(S&2?E=Be(v,12):E=Be(v,8));for(var A=y.timescale||9e4,x=Je(h,["trun"]),P=0;P<x.length;P++){if(u=yi(x[P]),!u&&E){var O=Be(x[P],4);u=E*O}y.type===Oe.VIDEO?r+=u/A:y.type===Oe.AUDIO&&(s+=u/A)}}}if(r===0&&s===0){for(var M=0,D=Je(d,["sidx"]),j=0;j<D.length;j++){var K=pi(D[j]);K!=null&&K.references&&(M+=K.references.reduce(function(he,re){return he+re.info.duration||0},0))}return M}return r||s}function yi(d){var c=Be(d,0),u=8;c&1&&(u+=4),c&4&&(u+=4);for(var r=0,s=Be(d,4),o=0;o<s;o++){if(c&256){var f=Be(d,u);r+=f,u+=4}c&512&&(u+=4),c&1024&&(u+=4),c&2048&&(u+=4)}return r}function Ei(d,c,u){Je(c,["moof","traf"]).forEach(function(r){Je(r,["tfhd"]).forEach(function(s){var o=Be(s,4),f=d[o];if(f){var h=f.timescale||9e4;Je(r,["tfdt"]).forEach(function(v){var m=v[0],y=Be(v,4);if(m===0)y-=u*h,y=Math.max(y,0),Qt(v,4,y);else{y*=Math.pow(2,32),y+=Be(v,8),y-=u*h,y=Math.max(y,0);var b=Math.floor(y/(Yt+1)),S=Math.floor(y%(Yt+1));Qt(v,4,b),Qt(v,8,S)}})}})})}function Fe(d){var c={valid:null,remainder:null},u=Je(d,["moof"]);if(u){if(u.length<2)return c.remainder=d,c}else return c;var r=u[u.length-1];return c.valid=yt(d,0,r.byteOffset-8),c.remainder=yt(d,r.byteOffset-8),c}function Y(d,c){var u=new Uint8Array(d.length+c.length);return u.set(d),u.set(c,d.length),u}function $(d,c){var u=[],r=c.samples,s=c.timescale,o=c.id,f=!1,h=Je(r,["moof"]);return h.map(function(v){var m=v.byteOffset-8,y=Je(v,["traf"]);y.map(function(b){var S=Je(b,["tfdt"]).map(function(E){var A=E[0],x=Be(E,4);return A===1&&(x*=Math.pow(2,32),x+=Be(E,8)),x/s})[0];return S!==void 0&&(d=S),Je(b,["tfhd"]).map(function(E){var A=Be(E,4),x=Be(E,0)&16777215,P=(x&1)!==0,O=(x&2)!==0,M=(x&8)!==0,D=0,j=(x&16)!==0,K=0,he=(x&32)!==0,re=8;A===o&&(P&&(re+=8),O&&(re+=4),M&&(D=Be(E,re),re+=4),j&&(K=Be(E,re),re+=4),he&&(re+=4),c.type==="video"&&(f=Me(c.codec)),Je(b,["trun"]).map(function(ne){var xe=ne[0],we=Be(ne,0)&16777215,Pe=(we&1)!==0,Ve=0,dt=(we&4)!==0,pt=(we&256)!==0,_t=0,Bt=(we&512)!==0,St=0,zt=(we&1024)!==0,Ct=(we&2048)!==0,ui=0,Vr=Be(ne,4),ri=8;Pe&&(Ve=Be(ne,ri),ri+=4),dt&&(ri+=4);for(var sr=Ve+m,Xi=0;Xi<Vr;Xi++){if(pt?(_t=Be(ne,ri),ri+=4):_t=D,Bt?(St=Be(ne,ri),ri+=4):St=K,zt&&(ri+=4),Ct&&(xe===0?ui=Be(ne,ri):ui=fi(ne,ri),ri+=4),c.type===Oe.VIDEO)for(var sn=0;sn<St;){var Tr=Be(r,sr);if(sr+=4,_r(f,r[sr])){var En=r.subarray(sr,sr+Tr);ji(En,f?2:1,d+ui/s,u)}sr+=Tr,sn+=Tr+4}d+=_t/s}}))})})}),u}function Me(d){if(!d)return!1;var c=d.indexOf("."),u=c<0?d:d.substring(0,c);return u==="hvc1"||u==="hev1"||u==="dvh1"||u==="dvhe"}function _r(d,c){if(d){var u=c>>1&63;return u===39||u===40}else{var r=c&31;return r===6}}function ji(d,c,u,r){var s=Qr(d),o=0;o+=c;for(var f=0,h=0,v=!1,m=0;o<s.length;){f=0;do{if(o>=s.length)break;m=s[o++],f+=m}while(m===255);h=0;do{if(o>=s.length)break;m=s[o++],h+=m}while(m===255);var y=s.length-o;if(!v&&f===4&&o<s.length){v=!0;var b=s[o++];if(b===181){var S=di(s,o);if(o+=2,S===49){var E=Be(s,o);if(o+=4,E===1195456820){var A=s[o++];if(A===3){var x=s[o++],P=31&x,O=64&x,M=O?2+P*3:0,D=new Uint8Array(M);if(O){D[0]=x;for(var j=1;j<M;j++)D[j]=s[o++]}r.push({type:A,payloadType:f,pts:u,bytes:D})}}}}}else if(f===5&&h<y){if(v=!0,h>16){for(var K=[],he=0;he<16;he++){var re=s[o++].toString(16);K.push(re.length==1?"0"+re:re),(he===3||he===5||he===7||he===9)&&K.push("-")}for(var ne=h-16,xe=new Uint8Array(ne),we=0;we<ne;we++)xe[we]=s[o++];r.push({payloadType:f,pts:u,uuid:K.join(""),userData:Ut(xe),userDataBytes:xe})}}else if(h<y)o+=h;else if(h>y)break}}function Qr(d){for(var c=d.byteLength,u=[],r=1;r<c-2;)d[r]===0&&d[r+1]===0&&d[r+2]===3?(u.push(r+2),r+=2):r++;if(u.length===0)return d;var s=c-u.length,o=new Uint8Array(s),f=0;for(r=0;r<s;f++,r++)f===u[0]&&(f++,u.shift()),o[r]=d[f];return o}function si(d){var c=d[0],u="",r="",s=0,o=0,f=0,h=0,v=0,m=0;if(c===0){for(;ct(d.subarray(m,m+1))!=="\0";)u+=ct(d.subarray(m,m+1)),m+=1;for(u+=ct(d.subarray(m,m+1)),m+=1;ct(d.subarray(m,m+1))!=="\0";)r+=ct(d.subarray(m,m+1)),m+=1;r+=ct(d.subarray(m,m+1)),m+=1,s=Be(d,12),o=Be(d,16),h=Be(d,20),v=Be(d,24),m=28}else if(c===1){m+=4,s=Be(d,m),m+=4;var y=Be(d,m);m+=4;var b=Be(d,m);for(m+=4,f=Math.pow(2,32)*y+b,Number.isSafeInteger(f)||(f=Number.MAX_SAFE_INTEGER,B.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),h=Be(d,m),m+=4,v=Be(d,m),m+=4;ct(d.subarray(m,m+1))!=="\0";)u+=ct(d.subarray(m,m+1)),m+=1;for(u+=ct(d.subarray(m,m+1)),m+=1;ct(d.subarray(m,m+1))!=="\0";)r+=ct(d.subarray(m,m+1)),m+=1;r+=ct(d.subarray(m,m+1)),m+=1}var S=d.subarray(m,d.byteLength);return{schemeIdUri:u,value:r,timeScale:s,presentationTime:f,presentationTimeDelta:o,eventDuration:h,id:v,payload:S}}var yr=function(){d.clearKeyUriToKeyIdMap=function(){};function d(u,r,s,o,f){o===void 0&&(o=[1]),f===void 0&&(f=null),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=u,this.uri=r,this.keyFormat=s,this.keyFormatVersions=o,this.iv=f,this.encrypted=u?u!=="NONE":!1,this.isCommonEncryption=this.encrypted&&u!=="AES-128"}var c=d.prototype;return c.isSupported=function(){if(this.method){if(this.method==="AES-128"||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES"}return!1},c.getDecryptData=function(r){if(!this.encrypted||!this.uri)return null;if(this.method==="AES-128"&&this.uri&&!this.iv){typeof r!="number"&&(this.method==="AES-128"&&!this.iv&&B.warn('missing IV for initialization segment with method="'+this.method+'" - compliance issue'),r=0);var s=Ji(r),o=new d(this.method,this.uri,"identity",this.keyFormatVersions,s);return o}return this},d}();function Ji(d){for(var c=new Uint8Array(16),u=12;u<16;u++)c[u]=d>>8*(15-u)&255;return c}function Qi(){if(typeof self!="undefined")return self.MediaSource||self.WebKitMediaSource}var Gi={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dva1:!0,dvav:!0,dvh1:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}},ur=Qi();function xr(d,c){var u=Gi[c];return!!u&&u[d.slice(0,4)]===!0}function Ii(d,c){var u;return(u=ur==null?void 0:ur.isTypeSupported((c||"video")+'/mp4;codecs="'+d+'"'))!=null?u:!1}var Ri=/#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,cr=/#EXT-X-MEDIA:(.*)/g,wr=/^#EXT(?:INF|-X-TARGETDURATION):/m,zi=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),Si=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("|")),Hi=function(){function d(){}return d.findGroup=function(u,r){for(var s=0;s<u.length;s++){var o=u[s];if(o.id===r)return o}},d.convertAVC1ToAVCOTI=function(u){var r=u.split(".");if(r.length>2){var s=r.shift()+".";return s+=parseInt(r.shift()).toString(16),s+=("000"+parseInt(r.shift()).toString(16)).slice(-4),s}return u},d.resolve=function(u,r){return pe.buildAbsoluteURL(r,u,{alwaysNormalize:!0})},d.isMediaPlaylist=function(u){return wr.test(u)},d.parseMasterPlaylist=function(u,r){var s=!1,o={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:s},f=[];Ri.lastIndex=0;for(var h;(h=Ri.exec(u))!=null;)if(h[1]){var v,m=new q(h[1]),y=h[2],b={attrs:m,bitrate:m.decimalInteger("AVERAGE-BANDWIDTH")||m.decimalInteger("BANDWIDTH"),name:m.NAME,url:d.resolve(y,r)},S=m.decimalResolution("RESOLUTION");S&&(b.width=S.width,b.height=S.height),Ki((m.CODECS||"").split(/[ ,]+/).filter(function(j){return j}),b),b.videoCodec&&b.videoCodec.indexOf("avc1")!==-1&&(b.videoCodec=d.convertAVC1ToAVCOTI(b.videoCodec)),(v=b.unknownCodecs)!=null&&v.length||f.push(b),o.levels.push(b)}else if(h[3]){var E=h[3],A=h[4];switch(E){case"SESSION-DATA":{var x=new q(A),P=x["DATA-ID"];P&&(o.sessionData===null&&(o.sessionData={}),o.sessionData[P]=x);break}case"SESSION-KEY":{var O=Di(A,r);O.encrypted&&O.isSupported()?(o.sessionKeys===null&&(o.sessionKeys=[]),o.sessionKeys.push(O)):B.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'+A+'"');break}case"DEFINE":break;case"CONTENT-STEERING":{var M=new q(A);o.contentSteering={uri:d.resolve(M["SERVER-URI"],r),pathwayId:M["PATHWAY-ID"]||"."};break}case"START":{o.startTimeOffset=ei(A);break}}}var D=f.length>0&&f.length<o.levels.length;return o.levels=D?f:o.levels,o.levels.length===0&&(o.playlistParsingError=new Error("no levels found in manifest")),o},d.parseMasterPlaylistMedia=function(u,r,s){var o,f={},h=s.levels,v={AUDIO:h.map(function(P){return{id:P.attrs.AUDIO,audioCodec:P.audioCodec}}),SUBTITLES:h.map(function(P){return{id:P.attrs.SUBTITLES,textCodec:P.textCodec}}),"CLOSED-CAPTIONS":[]},m=0;for(cr.lastIndex=0;(o=cr.exec(u))!==null;){var y=new q(o[1]),b=y.TYPE;if(b){var S=v[b],E=f[b]||[];f[b]=E;var A={attrs:y,bitrate:0,id:m++,groupId:y["GROUP-ID"]||"",instreamId:y["INSTREAM-ID"],name:y.NAME||y.LANGUAGE||"",type:b,default:y.bool("DEFAULT"),autoselect:y.bool("AUTOSELECT"),forced:y.bool("FORCED"),lang:y.LANGUAGE,url:y.URI?d.resolve(y.URI,r):""};if(S!=null&&S.length){var x=d.findGroup(S,A.groupId)||S[0];ti(A,x,"audioCodec"),ti(A,x,"textCodec")}E.push(A)}}return f},d.parseLevelPlaylist=function(u,r,s,o,f,h){var v=new Xt(r),m=v.fragments,y=null,b=0,S=0,E=0,A=0,x=null,P=new it(o,r),O,M,D,j=-1,K=!1;for(zi.lastIndex=0,v.m3u8=u,v.hasVariableRefs=!1;(O=zi.exec(u))!==null;){K&&(K=!1,P=new it(o,r),P.start=E,P.sn=b,P.cc=A,P.level=s,y&&(P.initSegment=y,P.rawProgramDateTime=y.rawProgramDateTime,y.rawProgramDateTime=null));var he=O[1];if(he){P.duration=parseFloat(he);var re=(" "+O[2]).slice(1);P.title=re||null,P.tagList.push(re?["INF",he,re]:["INF",he])}else if(O[3]){if(Z(P.duration)){P.start=E,D&&_e(P,D,v),P.sn=b,P.level=s,P.cc=A,P.urlId=f,m.push(P);var ne=(" "+O[3]).slice(1);P.relurl=ne,ii(P,x),x=P,E+=P.duration,b++,S=0,K=!0}}else if(O[4]){var xe=(" "+O[4]).slice(1);x?P.setByteRange(xe,x):P.setByteRange(xe)}else if(O[5])P.rawProgramDateTime=(" "+O[5]).slice(1),P.tagList.push(["PROGRAM-DATE-TIME",P.rawProgramDateTime]),j===-1&&(j=m.length);else{if(O=O[0].match(Si),!O){B.warn("No matches on slow regex match for level playlist!");continue}for(M=1;M<O.length&&typeof O[M]=="undefined";M++);var we=(" "+O[M]).slice(1),Pe=(" "+O[M+1]).slice(1),Ve=O[M+2]?(" "+O[M+2]).slice(1):"";switch(we){case"PLAYLIST-TYPE":v.type=Pe.toUpperCase();break;case"MEDIA-SEQUENCE":b=v.startSN=parseInt(Pe);break;case"SKIP":{var dt=new q(Pe),pt=dt.decimalInteger("SKIPPED-SEGMENTS");if(Z(pt)){v.skippedSegments=pt;for(var _t=pt;_t--;)m.unshift(null);b+=pt}var Bt=dt.enumeratedString("RECENTLY-REMOVED-DATERANGES");Bt&&(v.recentlyRemovedDateranges=Bt.split(" "));break}case"TARGETDURATION":v.targetduration=Math.max(parseInt(Pe),1);break;case"VERSION":v.version=parseInt(Pe);break;case"EXTM3U":break;case"ENDLIST":v.live=!1;break;case"#":(Pe||Ve)&&P.tagList.push(Ve?[Pe,Ve]:[Pe]);break;case"DISCONTINUITY":A++,P.tagList.push(["DIS"]);break;case"GAP":P.gap=!0,P.tagList.push([we]);break;case"BITRATE":P.tagList.push([we,Pe]);break;case"DATERANGE":{var St=new q(Pe),zt=new Qe(St,v.dateRanges[St.ID]);zt.isValid||v.skippedSegments?v.dateRanges[zt.id]=zt:B.warn('Ignoring invalid DATERANGE tag: "'+Pe+'"'),P.tagList.push(["EXT-X-DATERANGE",Pe]);break}case"DEFINE":break;case"DISCONTINUITY-SEQUENCE":A=parseInt(Pe);break;case"KEY":{var Ct=Di(Pe,r);if(Ct.isSupported()){if(Ct.method==="NONE"){D=void 0;break}D||(D={}),D[Ct.keyFormat]&&(D=k({},D)),D[Ct.keyFormat]=Ct}else B.warn('[Keys] Ignoring invalid EXT-X-KEY tag: "'+Pe+'"');break}case"START":v.startTimeOffset=ei(Pe);break;case"MAP":{var ui=new q(Pe);if(P.duration){var Vr=new it(o,r);H(Vr,ui,s,D),y=Vr,P.initSegment=y,y.rawProgramDateTime&&!P.rawProgramDateTime&&(P.rawProgramDateTime=y.rawProgramDateTime)}else H(P,ui,s,D),y=P,K=!0;break}case"SERVER-CONTROL":{var ri=new q(Pe);v.canBlockReload=ri.bool("CAN-BLOCK-RELOAD"),v.canSkipUntil=ri.optionalFloat("CAN-SKIP-UNTIL",0),v.canSkipDateRanges=v.canSkipUntil>0&&ri.bool("CAN-SKIP-DATERANGES"),v.partHoldBack=ri.optionalFloat("PART-HOLD-BACK",0),v.holdBack=ri.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var sr=new q(Pe);v.partTarget=sr.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Xi=v.partList;Xi||(Xi=v.partList=[]);var sn=S>0?Xi[Xi.length-1]:void 0,Tr=S++,En=new q(Pe),Hn=new xt(En,P,r,Tr,sn);Xi.push(Hn),P.duration+=Hn.duration;break}case"PRELOAD-HINT":{var An=new q(Pe);v.preloadHint=An;break}case"RENDITION-REPORT":{var Kn=new q(Pe);v.renditionReports=v.renditionReports||[],v.renditionReports.push(Kn);break}default:B.warn("line parsed but not handled: "+O);break}}}x&&!x.relurl?(m.pop(),E-=x.duration,v.partList&&(v.fragmentHint=x)):v.partList&&(ii(P,x),P.cc=A,v.fragmentHint=P,D&&_e(P,D,v));var tr=m.length,hr=m[0],xn=m[tr-1];if(E+=v.skippedSegments*v.targetduration,E>0&&tr&&xn){v.averagetargetduration=E/tr;var Yn=xn.sn;v.endSN=Yn!=="initSegment"?Yn:0,v.live||(xn.endList=!0),hr&&(v.startCC=hr.cc)}else v.endSN=0,v.startCC=0;return v.fragmentHint&&(E+=v.fragmentHint.duration),v.totalduration=E,v.endCC=A,j>0&&br(m,j),v},d}();function Di(d,c,u){var r,s,o=new q(d),f=(r=o.METHOD)!=null?r:"",h=o.URI,v=o.hexadecimalInteger("IV"),m=o.KEYFORMATVERSIONS,y=(s=o.KEYFORMAT)!=null?s:"identity";h&&o.IV&&!v&&B.error("Invalid IV: "+o.IV);var b=h?Hi.resolve(h,c):"",S=(m||"1").split("/").map(Number).filter(Number.isFinite);return new yr(f,b,y,S,v)}function ei(d){var c=new q(d),u=c.decimalFloatingPoint("TIME-OFFSET");return Z(u)?u:null}function Ki(d,c){["video","audio","text"].forEach(function(u){var r=d.filter(function(o){return xr(o,u)});if(r.length){var s=r.filter(function(o){return o.lastIndexOf("avc1",0)===0||o.lastIndexOf("mp4a",0)===0});c[u+"Codec"]=s.length>0?s[0]:r[0],d=d.filter(function(o){return r.indexOf(o)===-1})}}),c.unknownCodecs=d}function ti(d,c,u){var r=c[u];r&&(d[u]=r)}function br(d,c){for(var u=d[c],r=c;r--;){var s=d[r];if(!s)return;s.programDateTime=u.programDateTime-s.duration*1e3,u=s}}function ii(d,c){d.rawProgramDateTime?d.programDateTime=Date.parse(d.rawProgramDateTime):c!=null&&c.programDateTime&&(d.programDateTime=c.endProgramDateTime),Z(d.programDateTime)||(d.programDateTime=null,d.rawProgramDateTime=null)}function H(d,c,u,r){d.relurl=c.URI,c.BYTERANGE&&d.setByteRange(c.BYTERANGE),d.level=u,d.sn="initSegment",r&&(d.levelkeys=r),d.initSegment=null}function _e(d,c,u){d.levelkeys=c;var r=u.encryptedFragments;(!r.length||r[r.length-1].levelkeys!==c)&&Object.keys(c).some(function(s){return c[s].isCommonEncryption})&&r.push(d)}var ye={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},st={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function Mr(d){var c=d.type;switch(c){case ye.AUDIO_TRACK:return st.AUDIO;case ye.SUBTITLE_TRACK:return st.SUBTITLE;default:return st.MAIN}}function Pr(d,c){var u=d.url;return(u===void 0||u.indexOf("data:")===0)&&(u=c.url),u}var $r=function(){function d(u){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=u,this.registerListeners()}var c=d.prototype;return c.startLoad=function(r){},c.stopLoad=function(){this.destroyInternalLoaders()},c.registerListeners=function(){var r=this.hls;r.on(L.MANIFEST_LOADING,this.onManifestLoading,this),r.on(L.LEVEL_LOADING,this.onLevelLoading,this),r.on(L.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),r.on(L.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},c.unregisterListeners=function(){var r=this.hls;r.off(L.MANIFEST_LOADING,this.onManifestLoading,this),r.off(L.LEVEL_LOADING,this.onLevelLoading,this),r.off(L.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),r.off(L.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},c.createInternalLoader=function(r){var s=this.hls.config,o=s.pLoader,f=s.loader,h=o||f,v=new h(s);return this.loaders[r.type]=v,v},c.getInternalLoader=function(r){return this.loaders[r.type]},c.resetInternalLoader=function(r){this.loaders[r]&&delete this.loaders[r]},c.destroyInternalLoaders=function(){for(var r in this.loaders){var s=this.loaders[r];s&&s.destroy(),this.resetInternalLoader(r)}},c.destroy=function(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()},c.onManifestLoading=function(r,s){var o=s.url;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:ye.MANIFEST,url:o,deliveryDirectives:null})},c.onLevelLoading=function(r,s){var o=s.id,f=s.level,h=s.url,v=s.deliveryDirectives;this.load({id:o,level:f,responseType:"text",type:ye.LEVEL,url:h,deliveryDirectives:v})},c.onAudioTrackLoading=function(r,s){var o=s.id,f=s.groupId,h=s.url,v=s.deliveryDirectives;this.load({id:o,groupId:f,level:null,responseType:"text",type:ye.AUDIO_TRACK,url:h,deliveryDirectives:v})},c.onSubtitleTrackLoading=function(r,s){var o=s.id,f=s.groupId,h=s.url,v=s.deliveryDirectives;this.load({id:o,groupId:f,level:null,responseType:"text",type:ye.SUBTITLE_TRACK,url:h,deliveryDirectives:v})},c.load=function(r){var s,o=this,f=this.hls.config,h=this.getInternalLoader(r);if(h){var v=h.context;if(v&&v.url===r.url){B.trace("[playlist-loader]: playlist request ongoing");return}B.log("[playlist-loader]: aborting previous loader for type: "+r.type),h.abort()}var m;if(r.type===ye.MANIFEST?m=f.manifestLoadPolicy.default:m=k({},f.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),h=this.createInternalLoader(r),(s=r.deliveryDirectives)!=null&&s.part){var y;if(r.type===ye.LEVEL&&r.level!==null?y=this.hls.levels[r.level].details:r.type===ye.AUDIO_TRACK&&r.id!==null?y=this.hls.audioTracks[r.id].details:r.type===ye.SUBTITLE_TRACK&&r.id!==null&&(y=this.hls.subtitleTracks[r.id].details),y){var b=y.partTarget,S=y.targetduration;if(b&&S){var E=Math.max(b*3,S*.8)*1e3;m=k({},m,{maxTimeToFirstByteMs:Math.min(E,m.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(E,m.maxTimeToFirstByteMs)})}}}var A=m.errorRetry||m.timeoutRetry||{},x={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:A.maxNumRetry||0,retryDelay:A.retryDelayMs||0,maxRetryDelay:A.maxRetryDelayMs||0},P={onSuccess:function(M,D,j,K){var he=o.getInternalLoader(j);o.resetInternalLoader(j.type);var re=M.data;if(re.indexOf("#EXTM3U")!==0){o.handleManifestParsingError(M,j,new Error("no EXTM3U delimiter"),K||null,D);return}D.parsing.start=performance.now(),Hi.isMediaPlaylist(re)?o.handleTrackOrLevelPlaylist(M,D,j,K||null,he):o.handleMasterPlaylist(M,D,j,K)},onError:function(M,D,j,K){o.handleNetworkError(D,j,!1,M,K)},onTimeout:function(M,D,j){o.handleNetworkError(D,j,!0,void 0,M)}};h.load(r,x,P)},c.handleMasterPlaylist=function(r,s,o,f){var h=this.hls,v=r.data,m=Pr(r,o),y=Hi.parseMasterPlaylist(v,m);if(y.playlistParsingError){this.handleManifestParsingError(r,o,y.playlistParsingError,f,s);return}var b=y.contentSteering,S=y.levels,E=y.sessionData,A=y.sessionKeys,x=y.startTimeOffset,P=y.variableList;this.variableList=P;var O=Hi.parseMasterPlaylistMedia(v,m,y),M=O.AUDIO,D=M===void 0?[]:M,j=O.SUBTITLES,K=O["CLOSED-CAPTIONS"];if(D.length){var he=D.some(function(re){return!re.url});!he&&S[0].audioCodec&&!S[0].attrs.AUDIO&&(B.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),D.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new q({}),bitrate:0,url:""}))}h.trigger(L.MANIFEST_LOADED,{levels:S,audioTracks:D,subtitles:j,captions:K,contentSteering:b,url:m,stats:s,networkDetails:f,sessionData:E,sessionKeys:A,startTimeOffset:x,variableList:P})},c.handleTrackOrLevelPlaylist=function(r,s,o,f,h){var v=this.hls,m=o.id,y=o.level,b=o.type,S=Pr(r,o),E=Z(m)?m:0,A=Z(y)?y:E,x=Mr(o),P=Hi.parseLevelPlaylist(r.data,S,A,x,E,this.variableList);if(b===ye.MANIFEST){var O={attrs:new q({}),bitrate:0,details:P,name:"",url:S};v.trigger(L.MANIFEST_LOADED,{levels:[O],audioTracks:[],url:S,stats:s,networkDetails:f,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}s.parsing.end=performance.now(),o.levelDetails=P,this.handlePlaylistLoaded(P,r,s,o,f,h)},c.handleManifestParsingError=function(r,s,o,f,h){this.hls.trigger(L.ERROR,{type:le.NETWORK_ERROR,details:z.MANIFEST_PARSING_ERROR,fatal:s.type===ye.MANIFEST,url:r.url,err:o,error:o,reason:o.message,response:r,context:s,networkDetails:f,stats:h})},c.handleNetworkError=function(r,s,o,f,h){o===void 0&&(o=!1);var v="A network "+(o?"timeout":"error"+(f?" (status "+f.code+")":""))+" occurred while loading "+r.type;r.type===ye.LEVEL?v+=": "+r.level+" id: "+r.id:(r.type===ye.AUDIO_TRACK||r.type===ye.SUBTITLE_TRACK)&&(v+=" id: "+r.id+' group-id: "'+r.groupId+'"');var m=new Error(v);B.warn("[playlist-loader]: "+v);var y=z.UNKNOWN,b=!1,S=this.getInternalLoader(r);switch(r.type){case ye.MANIFEST:y=o?z.MANIFEST_LOAD_TIMEOUT:z.MANIFEST_LOAD_ERROR,b=!0;break;case ye.LEVEL:y=o?z.LEVEL_LOAD_TIMEOUT:z.LEVEL_LOAD_ERROR,b=!1;break;case ye.AUDIO_TRACK:y=o?z.AUDIO_TRACK_LOAD_TIMEOUT:z.AUDIO_TRACK_LOAD_ERROR,b=!1;break;case ye.SUBTITLE_TRACK:y=o?z.SUBTITLE_TRACK_LOAD_TIMEOUT:z.SUBTITLE_LOAD_ERROR,b=!1;break}S&&this.resetInternalLoader(r.type);var E={type:le.NETWORK_ERROR,details:y,fatal:b,url:r.url,loader:S,context:r,error:m,networkDetails:s,stats:h};if(f){var A=(s==null?void 0:s.url)||r.url;E.response=l({url:A,data:void 0},f)}this.hls.trigger(L.ERROR,E)},c.handlePlaylistLoaded=function(r,s,o,f,h,v){var m=this.hls,y=f.type,b=f.level,S=f.id,E=f.groupId,A=f.deliveryDirectives,x=Pr(s,f),P=Mr(f),O=typeof f.level=="number"&&P===st.MAIN?b:void 0;if(!r.fragments.length){var M=new Error("No Segments found in Playlist");m.trigger(L.ERROR,{type:le.NETWORK_ERROR,details:z.LEVEL_EMPTY_ERROR,fatal:!1,url:x,error:M,reason:M.message,response:s,context:f,level:O,parent:P,networkDetails:h,stats:o});return}r.targetduration||(r.playlistParsingError=new Error("Missing Target Duration"));var D=r.playlistParsingError;if(D){m.trigger(L.ERROR,{type:le.NETWORK_ERROR,details:z.LEVEL_PARSING_ERROR,fatal:!1,url:x,error:D,reason:D.message,response:s,context:f,level:O,parent:P,networkDetails:h,stats:o});return}switch(r.live&&v&&(v.getCacheAge&&(r.ageHeader=v.getCacheAge()||0),(!v.getCacheAge||isNaN(r.ageHeader))&&(r.ageHeader=0)),y){case ye.MANIFEST:case ye.LEVEL:m.trigger(L.LEVEL_LOADED,{details:r,level:O||0,id:S||0,stats:o,networkDetails:h,deliveryDirectives:A});break;case ye.AUDIO_TRACK:m.trigger(L.AUDIO_TRACK_LOADED,{details:r,id:S||0,groupId:E||"",stats:o,networkDetails:h,deliveryDirectives:A});break;case ye.SUBTITLE_TRACK:m.trigger(L.SUBTITLE_TRACK_LOADED,{details:r,id:S||0,groupId:E||"",stats:o,networkDetails:h,deliveryDirectives:A});break}},d}();function Ms(d,c){var u;try{u=new Event("addtrack")}catch(r){u=document.createEvent("Event"),u.initEvent("addtrack",!1,!1)}u.track=d,c.dispatchEvent(u)}function bn(d){var c=d.mode;if(c==="disabled"&&(d.mode="hidden"),d.cues)for(var u=d.cues.length;u--;)d.removeCue(d.cues[u]);c==="disabled"&&(d.mode=c)}function Ns(d,c,u,r){var s=d.mode;if(s==="disabled"&&(d.mode="hidden"),d.cues&&d.cues.length>0)for(var o=en(d.cues,c,u),f=0;f<o.length;f++)(!r||r(o[f]))&&d.removeCue(o[f]);s==="disabled"&&(d.mode=s)}function Yi(d,c){if(c<d[0].startTime)return 0;var u=d.length-1;if(c>d[u].endTime)return-1;for(var r=0,s=u;r<=s;){var o=Math.floor((s+r)/2);if(c<d[o].startTime)s=o-1;else if(c>d[o].startTime&&r<u)r=o+1;else return o}return d[r].startTime-c<c-d[s].startTime?r:s}function en(d,c,u){var r=[],s=Yi(d,c);if(s>-1)for(var o=s,f=d.length;o<f;o++){var h=d[o];if(h.startTime>=c&&h.endTime<=u)r.push(h);else if(h.startTime>u)return r}return r}var Ai={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"},tn=.25;function Cr(){if(typeof self!="undefined")return self.WebKitDataCue||self.VTTCue||self.TextTrackCue}var Sr=function(){var d=Cr();try{new d(0,Number.POSITIVE_INFINITY,"")}catch(c){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY}();function Wn(d,c){return d.getTime()/1e3-c}function Sn(d){return Uint8Array.from(d.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}var Fs=function(){function d(u){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=u,this._registerListeners()}var c=d.prototype;return c.destroy=function(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null},c._registerListeners=function(){var r=this.hls;r.on(L.MEDIA_ATTACHED,this.onMediaAttached,this),r.on(L.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(L.MANIFEST_LOADING,this.onManifestLoading,this),r.on(L.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),r.on(L.BUFFER_FLUSHING,this.onBufferFlushing,this),r.on(L.LEVEL_UPDATED,this.onLevelUpdated,this)},c._unregisterListeners=function(){var r=this.hls;r.off(L.MEDIA_ATTACHED,this.onMediaAttached,this),r.off(L.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(L.MANIFEST_LOADING,this.onManifestLoading,this),r.off(L.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),r.off(L.BUFFER_FLUSHING,this.onBufferFlushing,this),r.off(L.LEVEL_UPDATED,this.onLevelUpdated,this)},c.onMediaAttached=function(r,s){this.media=s.media},c.onMediaDetaching=function(){this.id3Track&&(bn(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})},c.onManifestLoading=function(){this.dateRangeCuesAppended={}},c.createTrack=function(r){var s=this.getID3Track(r.textTracks);return s.mode="hidden",s},c.getID3Track=function(r){if(this.media){for(var s=0;s<r.length;s++){var o=r[s];if(o.kind==="metadata"&&o.label==="id3")return Ms(o,this.media),o}return this.media.addTextTrack("metadata","id3")}},c.onFragParsingMetadata=function(r,s){if(this.media){var o=this.hls.config,f=o.enableEmsgMetadataCues,h=o.enableID3MetadataCues;if(!(!f&&!h)){var v=s.samples;this.id3Track||(this.id3Track=this.createTrack(this.media));for(var m=Cr(),y=0;y<v.length;y++){var b=v[y].type;if(!(b===Ai.emsg&&!f||!h)){var S=ot(v[y].data);if(S){var E=v[y].pts,A=E+v[y].duration;A>Sr&&(A=Sr);var x=A-E;x<=0&&(A=E+tn);for(var P=0;P<S.length;P++){var O=S[P];if(!Jt(O)){this.updateId3CueEnds(E,b);var M=new m(E,A,"");M.value=O,b&&(M.type=b),this.id3Track.addCue(M)}}}}}}}},c.updateId3CueEnds=function(r,s){var o,f=(o=this.id3Track)==null?void 0:o.cues;if(f)for(var h=f.length;h--;){var v=f[h];v.type===s&&v.startTime<r&&v.endTime===Sr&&(v.endTime=r)}},c.onBufferFlushing=function(r,s){var o=s.startOffset,f=s.endOffset,h=s.type,v=this.id3Track,m=this.hls;if(m){var y=m.config,b=y.enableEmsgMetadataCues,S=y.enableID3MetadataCues;if(v&&(b||S)){var E;h==="audio"?E=function(x){return x.type===Ai.audioId3&&S}:h==="video"?E=function(x){return x.type===Ai.emsg&&b}:E=function(x){return x.type===Ai.audioId3&&S||x.type===Ai.emsg&&b},Ns(v,o,f,E)}}},c.onLevelUpdated=function(r,s){var o=this,f=s.details;if(!(!this.media||!f.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)){var h=this.dateRangeCuesAppended,v=this.id3Track,m=f.dateRanges,y=Object.keys(m);if(v)for(var b=Object.keys(h).filter(function(D){return!y.includes(D)}),S=function(){var j=b[E];Object.keys(h[j].cues).forEach(function(K){v.removeCue(h[j].cues[K])}),delete h[j]},E=b.length;E--;)S();var A=f.fragments[f.fragments.length-1];if(!(y.length===0||!Z(A==null?void 0:A.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(var x=A.programDateTime/1e3-A.start,P=Cr(),O=function(){var j=y[M],K=m[j],he=h[j],re=(he==null?void 0:he.cues)||{},ne=(he==null?void 0:he.durationKnown)||!1,xe=Wn(K.startDate,x),we=Sr,Pe=K.endDate;if(Pe)we=Wn(Pe,x),ne=!0;else if(K.endOnNext&&!ne){var Ve=y.reduce(function(zt,Ct){var ui=m[Ct];return ui.class===K.class&&ui.id!==Ct&&ui.startDate>K.startDate&&zt.push(ui),zt},[]).sort(function(zt,Ct){return zt.startDate.getTime()-Ct.startDate.getTime()})[0];Ve&&(we=Wn(Ve.startDate,x),ne=!0)}for(var dt=Object.keys(K.attr),pt=0;pt<dt.length;pt++){var _t=dt[pt];if(ve(_t)){var Bt=re[_t];if(Bt)ne&&!he.durationKnown&&(Bt.endTime=we);else{var St=K.attr[_t];Bt=new P(xe,we,""),at(_t)&&(St=Sn(St)),Bt.value={key:_t,data:St},Bt.type=Ai.dateRange,Bt.id=j,o.id3Track.addCue(Bt),re[_t]=Bt}}}h[j]={cues:re,dateRange:K,durationKnown:ne}},M=0;M<y.length;M++)O()}}},d}(),kr=function(){function d(u){var r=this;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=function(){return r.timeupdate()},this.hls=u,this.config=u.config,this.registerListeners()}var c=d.prototype;return c.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},c.registerListeners=function(){this.hls.on(L.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(L.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(L.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(L.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(L.ERROR,this.onError,this)},c.unregisterListeners=function(){this.hls.off(L.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(L.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(L.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(L.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(L.ERROR,this.onError,this)},c.onMediaAttached=function(r,s){this.media=s.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},c.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},c.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},c.onLevelUpdated=function(r,s){var o=s.details;this.levelDetails=o,o.advanced&&this.timeupdate(),!o.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},c.onError=function(r,s){var o;s.details===z.BUFFER_STALLED_ERROR&&(this.stallCount++,(o=this.levelDetails)!=null&&o.live&&B.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},c.timeupdate=function(){var r=this.media,s=this.levelDetails;if(!(!r||!s)){this.currentTime=r.currentTime;var o=this.computeLatency();if(o!==null){this._latency=o;var f=this.config,h=f.lowLatencyMode,v=f.maxLiveSyncPlaybackRate;if(!(!h||v===1)){var m=this.targetLatency;if(m!==null){var y=o-m,b=Math.min(this.maxLatency,m+s.targetduration),S=y<b;if(s.live&&S&&y>.05&&this.forwardBufferLength>1){var E=Math.min(2,Math.max(1,v)),A=Math.round(2/(1+Math.exp(-.75*y-this.edgeStalled))*20)/20;r.playbackRate=Math.min(E,Math.max(1,A))}else r.playbackRate!==1&&r.playbackRate!==0&&(r.playbackRate=1)}}}}},c.estimateLiveEdge=function(){var r=this.levelDetails;return r===null?null:r.edge+r.age},c.computeLatency=function(){var r=this.estimateLiveEdge();return r===null?null:r-this.currentTime},p(d,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var r=this.config,s=this.levelDetails;return r.liveMaxLatencyDuration!==void 0?r.liveMaxLatencyDuration:s?r.liveMaxLatencyDurationCount*s.targetduration:0}},{key:"targetLatency",get:function(){var r=this.levelDetails;if(r===null)return null;var s=r.holdBack,o=r.partHoldBack,f=r.targetduration,h=this.config,v=h.liveSyncDuration,m=h.liveSyncDurationCount,y=h.lowLatencyMode,b=this.hls.userConfig,S=y&&o||s;(b.liveSyncDuration||b.liveSyncDurationCount||S===0)&&(S=v!==void 0?v:m*f);var E=f,A=1;return S+Math.min(this.stallCount*A,E)}},{key:"liveSyncPosition",get:function(){var r=this.estimateLiveEdge(),s=this.targetLatency,o=this.levelDetails;if(r===null||s===null||o===null)return null;var f=o.edge,h=r-s-this.edgeStalled,v=f-o.totalduration,m=f-(this.config.lowLatencyMode&&o.partTarget||o.targetduration);return Math.min(Math.max(v,h),m)}},{key:"drift",get:function(){var r=this.levelDetails;return r===null?1:r.drift}},{key:"edgeStalled",get:function(){var r=this.levelDetails;if(r===null)return 0;var s=(this.config.lowLatencyMode&&r.partTarget||r.targetduration)*3;return Math.max(r.age-s,0)}},{key:"forwardBufferLength",get:function(){var r=this.media,s=this.levelDetails;if(!r||!s)return 0;var o=r.buffered.length;return(o?r.buffered.end(o-1):s.edge)-this.currentTime}}]),d}(),jn=["NONE","TYPE-0","TYPE-1",null],Nr={No:"",Yes:"YES",v2:"v2"};function Us(d,c){var u=d.canSkipUntil,r=d.canSkipDateRanges,s=d.endSN,o=c!==void 0?c-s:0;return u&&o<u?r?Nr.v2:Nr.Yes:Nr.No}var as=function(){function d(u,r,s){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=u,this.part=r,this.skip=s}var c=d.prototype;return c.addDirectives=function(r){var s=new self.URL(r);return this.msn!==void 0&&s.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&s.searchParams.set("_HLS_part",this.part.toString()),this.skip&&s.searchParams.set("_HLS_skip",this.skip),s.href},d}(),os=function(){function d(u){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=[u.url],this._attrs=[u.attrs],this.bitrate=u.bitrate,u.details&&(this.details=u.details),this.id=u.id||0,this.name=u.name,this.width=u.width||0,this.height=u.height||0,this.audioCodec=u.audioCodec,this.videoCodec=u.videoCodec,this.unknownCodecs=u.unknownCodecs,this.codecSet=[u.videoCodec,u.audioCodec].filter(function(r){return r}).join(",").replace(/\.[^.,]+/g,"")}var c=d.prototype;return c.addFallback=function(r){this.url.push(r.url),this._attrs.push(r.attrs)},p(d,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"attrs",get:function(){return this._attrs[this._urlId]}},{key:"pathwayId",get:function(){return this.attrs["PATHWAY-ID"]||"."}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(r){var s=r%this.url.length;this._urlId!==s&&(this.fragmentError=0,this.loadError=0,this.details=void 0,this._urlId=s)}},{key:"audioGroupId",get:function(){var r;return(r=this.audioGroupIds)==null?void 0:r[this.urlId]}},{key:"textGroupId",get:function(){var r;return(r=this.textGroupIds)==null?void 0:r[this.urlId]}}]),d}();function Gn(d,c){var u=c.startPTS;if(Z(u)){var r=0,s;c.sn>d.sn?(r=u-d.start,s=d):(r=d.start-u,s=c),s.duration!==r&&(s.duration=r)}else if(c.sn>d.sn){var o=d.cc===c.cc;o&&d.minEndPTS?c.start=d.start+(d.minEndPTS-d.start):c.start=d.start+d.duration}else c.start=Math.max(d.start-c.duration,0)}function Fr(d,c,u,r,s,o){var f=r-u;f<=0&&(B.warn("Fragment should have a positive duration",c),r=u+c.duration,o=s+c.duration);var h=u,v=r,m=c.startPTS,y=c.endPTS;if(Z(m)){var b=Math.abs(m-u);Z(c.deltaPTS)?c.deltaPTS=Math.max(b,c.deltaPTS):c.deltaPTS=b,h=Math.max(u,m),u=Math.min(u,m),s=Math.min(s,c.startDTS),v=Math.min(r,y),r=Math.max(r,y),o=Math.max(o,c.endDTS)}var S=u-c.start;c.start!==0&&(c.start=u),c.duration=r-c.start,c.startPTS=u,c.maxStartPTS=h,c.startDTS=s,c.endPTS=r,c.minEndPTS=v,c.endDTS=o;var E=c.sn;if(!d||E<d.startSN||E>d.endSN)return 0;var A,x=E-d.startSN,P=d.fragments;for(P[x]=c,A=x;A>0;A--)Gn(P[A],P[A-1]);for(A=x;A<P.length-1;A++)Gn(P[A],P[A+1]);return d.fragmentHint&&Gn(P[P.length-1],d.fragmentHint),d.PTSKnown=d.alignedSliding=!0,S}function Pi(d,c){for(var u=null,r=d.fragments,s=r.length-1;s>=0;s--){var o=r[s].initSegment;if(o){u=o;break}}d.fragmentHint&&delete d.fragmentHint.endPTS;var f=0,h;if($i(d,c,function(A,x){A.relurl&&(f=A.cc-x.cc),Z(A.startPTS)&&Z(A.endPTS)&&(x.start=x.startPTS=A.startPTS,x.startDTS=A.startDTS,x.maxStartPTS=A.maxStartPTS,x.endPTS=A.endPTS,x.endDTS=A.endDTS,x.minEndPTS=A.minEndPTS,x.duration=A.endPTS-A.startPTS,x.duration&&(h=x),c.PTSKnown=c.alignedSliding=!0),x.elementaryStreams=A.elementaryStreams,x.loader=A.loader,x.stats=A.stats,x.urlId=A.urlId,A.initSegment&&(x.initSegment=A.initSegment,u=A.initSegment)}),u){var v=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments;v.forEach(function(A){var x;(!A.initSegment||A.initSegment.relurl===((x=u)==null?void 0:x.relurl))&&(A.initSegment=u)})}if(c.skippedSegments)if(c.deltaUpdateFailed=c.fragments.some(function(A){return!A}),c.deltaUpdateFailed){B.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var m=c.skippedSegments;m--;)c.fragments.shift();c.startSN=c.fragments[0].sn,c.startCC=c.fragments[0].cc}else c.canSkipDateRanges&&(c.dateRanges=ya(d.dateRanges,c.dateRanges,c.recentlyRemovedDateranges));var y=c.fragments;if(f){B.warn("discontinuity sliding from playlist, take drift into account");for(var b=0;b<y.length;b++)y[b].cc+=f}c.skippedSegments&&(c.startCC=c.fragments[0].cc),R(d.partList,c.partList,function(A,x){x.elementaryStreams=A.elementaryStreams,x.stats=A.stats}),h?Fr(c,h,h.startPTS,h.endPTS,h.startDTS,h.endDTS):ba(d,c),y.length&&(c.totalduration=c.edge-y[0].start),c.driftStartTime=d.driftStartTime,c.driftStart=d.driftStart;var S=c.advancedDateTime;if(c.advanced&&S){var E=c.edge;c.driftStart||(c.driftStartTime=S,c.driftStart=E),c.driftEndTime=S,c.driftEnd=E}else c.driftEndTime=d.driftEndTime,c.driftEnd=d.driftEnd,c.advancedDateTime=d.advancedDateTime}function ya(d,c,u){var r=k({},d);return u&&u.forEach(function(s){delete r[s]}),Object.keys(c).forEach(function(s){var o=new Qe(c[s].attr,r[s]);o.isValid?r[s]=o:B.warn('Ignoring invalid Playlist Delta Update DATERANGE tag: "'+JSON.stringify(c[s].attr)+'"')}),r}function R(d,c,u){if(d&&c)for(var r=0,s=0,o=d.length;s<=o;s++){var f=d[s],h=c[s+r];f&&h&&f.index===h.index&&f.fragment.sn===h.fragment.sn?u(f,h):r--}}function $i(d,c,u){for(var r=c.skippedSegments,s=Math.max(d.startSN,c.startSN)-c.startSN,o=(d.fragmentHint?1:0)+(r?c.endSN:Math.min(d.endSN,c.endSN))-c.startSN,f=c.startSN-d.startSN,h=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments,v=d.fragmentHint?d.fragments.concat(d.fragmentHint):d.fragments,m=s;m<=o;m++){var y=v[f+m],b=h[m];r&&!b&&m<r&&(b=c.fragments[m]=y),y&&b&&u(y,b)}}function ba(d,c){var u=c.startSN+c.skippedSegments-d.startSN,r=d.fragments;u<0||u>=r.length||Vs(c,r[u].start)}function Vs(d,c){if(c){for(var u=d.fragments,r=d.skippedSegments;r<u.length;r++)u[r].start+=c;d.fragmentHint&&(d.fragmentHint.start+=c)}}function Lr(d,c){c===void 0&&(c=1/0);var u=1e3*d.targetduration;if(d.updated){var r=d.fragments,s=4;if(r.length&&u*s>c){var o=r[r.length-1].duration*1e3;o<u&&(u=o)}}else u/=2;return Math.round(u)}function We(d,c,u){if(!(d!=null&&d.details))return null;var r=d.details,s=r.fragments[c-r.startSN];return s||(s=r.fragmentHint,s&&s.sn===c)?s:c<r.startSN&&u&&u.sn===c?u:null}function Gt(d,c,u){var r;return d!=null&&d.details?ai((r=d.details)==null?void 0:r.partList,c,u):null}function ai(d,c,u){if(d)for(var r=d.length;r--;){var s=d[r];if(s.index===u&&s.fragment.sn===c)return s}return null}function ls(d){switch(d.details){case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_TIMEOUT:case z.LEVEL_LOAD_TIMEOUT:case z.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function yf(d,c){var u=ls(c);return d.default[(u?"timeout":"error")+"Retry"]}function Yl(d,c){var u=d.backoff==="linear"?1:Math.pow(2,c);return Math.min(u*d.retryDelayMs,d.maxRetryDelayMs)}function bf(d){return l(l({},d),{errorRetry:null,timeoutRetry:null})}function Bo(d,c,u,r){return!!d&&c<d.maxNumRetry&&(b2(r)||!!u)}function b2(d){return d===0&&navigator.onLine===!1||!!d&&(d<400||d>499)}var Sf={search:function(c,u){for(var r=0,s=c.length-1,o=null,f=null;r<=s;){o=(r+s)/2|0,f=c[o];var h=u(f);if(h>0)r=o+1;else if(h<0)s=o-1;else return f}return null}};function S2(d,c,u){if(c===null||!Array.isArray(d)||!d.length||!Z(c))return null;var r=d[0].programDateTime;if(c<(r||0))return null;var s=d[d.length-1].endProgramDateTime;if(c>=(s||0))return null;u=u||0;for(var o=0;o<d.length;++o){var f=d[o];if(k2(c,u,f))return f}return null}function ql(d,c,u,r){u===void 0&&(u=0),r===void 0&&(r=0);var s=null;if(d?s=c[d.sn-c[0].sn+1]||null:u===0&&c[0].start===0&&(s=c[0]),s&&kf(u,r,s)===0)return s;var o=Sf.search(c,kf.bind(null,u,r));return o&&(o!==d||!s)?o:s}function kf(d,c,u){if(d===void 0&&(d=0),c===void 0&&(c=0),u.start<=d&&u.start+u.duration>d)return 0;var r=Math.min(c,u.duration+(u.deltaPTS?u.deltaPTS:0));return u.start+u.duration-r<=d?1:u.start-r>d&&u.start?-1:0}function k2(d,c,u){var r=Math.min(c,u.duration+(u.deltaPTS?u.deltaPTS:0))*1e3,s=u.endProgramDateTime||0;return s-r>d}function T2(d,c){return Sf.search(d,function(u){return u.cc<c?1:u.cc>c?-1:0})}var E2=3e5,dr={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},rn={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4},A2=function(){function d(u){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=u,this.log=B.log.bind(B,"[info]:"),this.warn=B.warn.bind(B,"[warning]:"),this.error=B.error.bind(B,"[error]:"),this.registerListeners()}var c=d.prototype;return c.registerListeners=function(){var r=this.hls;r.on(L.ERROR,this.onError,this),r.on(L.MANIFEST_LOADING,this.onManifestLoading,this),r.on(L.LEVEL_UPDATED,this.onLevelUpdated,this)},c.unregisterListeners=function(){var r=this.hls;r&&(r.off(L.ERROR,this.onError,this),r.off(L.ERROR,this.onErrorOut,this),r.off(L.MANIFEST_LOADING,this.onManifestLoading,this),r.off(L.LEVEL_UPDATED,this.onLevelUpdated,this))},c.destroy=function(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}},c.startLoad=function(r){this.playlistError=0},c.stopLoad=function(){},c.getVariantLevelIndex=function(r){return(r==null?void 0:r.type)===st.MAIN?r.level:this.hls.loadLevel},c.onManifestLoading=function(){this.playlistError=0,this.penalizedRenditions={}},c.onLevelUpdated=function(){this.playlistError=0},c.onError=function(r,s){var o;if(!s.fatal){var f=this.hls,h=s.context;switch(s.details){case z.FRAG_LOAD_ERROR:case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_ERROR:case z.KEY_LOAD_TIMEOUT:s.errorAction=this.getFragRetryOrSwitchAction(s);return;case z.FRAG_GAP:case z.FRAG_PARSING_ERROR:case z.FRAG_DECRYPT_ERROR:{s.errorAction=this.getFragRetryOrSwitchAction(s),s.errorAction.action=dr.SendAlternateToPenaltyBox;return}case z.LEVEL_EMPTY_ERROR:case z.LEVEL_PARSING_ERROR:{var v,m,y=s.parent===st.MAIN?s.level:f.loadLevel;s.details===z.LEVEL_EMPTY_ERROR&&((v=s.context)!=null&&(m=v.levelDetails)!=null&&m.live)?s.errorAction=this.getPlaylistRetryOrSwitchAction(s,y):(s.levelRetry=!1,s.errorAction=this.getLevelSwitchAction(s,y))}return;case z.LEVEL_LOAD_ERROR:case z.LEVEL_LOAD_TIMEOUT:typeof(h==null?void 0:h.level)=="number"&&(s.errorAction=this.getPlaylistRetryOrSwitchAction(s,h.level));return;case z.AUDIO_TRACK_LOAD_ERROR:case z.AUDIO_TRACK_LOAD_TIMEOUT:case z.SUBTITLE_LOAD_ERROR:case z.SUBTITLE_TRACK_LOAD_TIMEOUT:if(h){var b=f.levels[f.loadLevel];if(b&&(h.type===ye.AUDIO_TRACK&&h.groupId===b.audioGroupId||h.type===ye.SUBTITLE_TRACK&&h.groupId===b.textGroupId)){s.errorAction=this.getPlaylistRetryOrSwitchAction(s,f.loadLevel),s.errorAction.action=dr.SendAlternateToPenaltyBox,s.errorAction.flags=rn.MoveAllAlternatesMatchingHost;return}}return;case z.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{var S=f.levels[f.loadLevel],E=S==null?void 0:S.attrs["HDCP-LEVEL"];E&&(s.errorAction={action:dr.SendAlternateToPenaltyBox,flags:rn.MoveAllAlternatesMatchingHDCP,hdcpLevel:E})}return;case z.BUFFER_ADD_CODEC_ERROR:case z.REMUX_ALLOC_ERROR:s.errorAction=this.getLevelSwitchAction(s,(o=s.level)!=null?o:f.loadLevel);return;case z.INTERNAL_EXCEPTION:case z.BUFFER_APPENDING_ERROR:case z.BUFFER_APPEND_ERROR:case z.BUFFER_FULL_ERROR:case z.LEVEL_SWITCH_ERROR:case z.BUFFER_STALLED_ERROR:case z.BUFFER_SEEK_OVER_HOLE:case z.BUFFER_NUDGE_ON_STALL:s.errorAction={action:dr.DoNothing,flags:rn.None};return}if(s.type===le.KEY_SYSTEM_ERROR){var A=this.getVariantLevelIndex(s.frag);s.levelRetry=!1,s.errorAction=this.getLevelSwitchAction(s,A);return}}},c.getPlaylistRetryOrSwitchAction=function(r,s){var o,f=this.hls,h=yf(f.config.playlistLoadPolicy,r),v=this.playlistError++,m=(o=r.response)==null?void 0:o.code,y=Bo(h,v,ls(r),m);if(y)return{action:dr.RetryRequest,flags:rn.None,retryConfig:h,retryCount:v};var b=this.getLevelSwitchAction(r,s);return h&&(b.retryConfig=h,b.retryCount=v),b},c.getFragRetryOrSwitchAction=function(r){var s=this.hls,o=this.getVariantLevelIndex(r.frag),f=s.levels[o],h=s.config,v=h.fragLoadPolicy,m=h.keyLoadPolicy,y=yf(r.details.startsWith("key")?m:v,r),b=s.levels.reduce(function(P,O){return P+O.fragmentError},0);if(f){var S;r.details!==z.FRAG_GAP&&f.fragmentError++;var E=(S=r.response)==null?void 0:S.code,A=Bo(y,b,ls(r),E);if(A)return{action:dr.RetryRequest,flags:rn.None,retryConfig:y,retryCount:b}}var x=this.getLevelSwitchAction(r,o);return y&&(x.retryConfig=y,x.retryCount=b),x},c.getLevelSwitchAction=function(r,s){var o=this.hls;s==null&&(s=o.loadLevel);var f=this.hls.levels[s];if(f&&(f.loadError++,o.autoLevelEnabled)){for(var h,v,m=-1,y=o.levels,b=o.loadLevel,S=o.minAutoLevel,E=o.maxAutoLevel,A=(h=r.frag)==null?void 0:h.type,x=(v=r.context)!=null?v:{},P=x.type,O=x.groupId,M=y.length;M--;){var D=(M+b)%y.length;if(D!==b&&D>=S&&D<=E&&y[D].loadError===0){var j=y[D];if(r.details===z.FRAG_GAP&&r.frag){var K=y[D].details;if(K){var he=ql(r.frag,K.fragments,r.frag.start);if(he!=null&&he.gap)continue}}else{if(P===ye.AUDIO_TRACK&&O===j.audioGroupId||P===ye.SUBTITLE_TRACK&&O===j.textGroupId)continue;if(A===st.AUDIO&&f.audioGroupId===j.audioGroupId||A===st.SUBTITLE&&f.textGroupId===j.textGroupId)continue}m=D;break}}if(m>-1&&o.loadLevel!==m)return r.levelRetry=!0,this.playlistError=0,{action:dr.SendAlternateToPenaltyBox,flags:rn.None,nextAutoLevel:m}}return{action:dr.SendAlternateToPenaltyBox,flags:rn.MoveAllAlternatesMatchingHost}},c.onErrorOut=function(r,s){var o;switch((o=s.errorAction)==null?void 0:o.action){case dr.DoNothing:break;case dr.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(s),!s.errorAction.resolved&&s.details!==z.FRAG_GAP&&(s.fatal=!0);break}if(s.fatal){this.hls.stopLoad();return}},c.sendAlternateToPenaltyBox=function(r){var s=this.hls,o=r.errorAction;if(o){var f=o.flags,h=o.hdcpLevel,v=o.nextAutoLevel;switch(f){case rn.None:this.switchLevel(r,v);break;case rn.MoveAllAlternatesMatchingHost:o.resolved||(o.resolved=this.redundantFailover(r));break;case rn.MoveAllAlternatesMatchingHDCP:h&&(s.maxHdcpLevel=jn[jn.indexOf(h)-1],o.resolved=!0),this.warn('Restricting playback to HDCP-LEVEL of "'+s.maxHdcpLevel+'" or lower');break}o.resolved||this.switchLevel(r,v)}},c.switchLevel=function(r,s){s!==void 0&&r.errorAction&&(this.warn("switching to level "+s+" after "+r.details),this.hls.nextAutoLevel=s,r.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)},c.redundantFailover=function(r){var s=this,o=this.hls,f=this.penalizedRenditions,h=r.parent===st.MAIN?r.level:o.loadLevel,v=o.levels[h],m=v.url.length,y=r.frag?r.frag.urlId:v.urlId;v.urlId===y&&(!r.frag||v.details)&&this.penalizeRendition(v,r);for(var b=function(){var x=(y+S)%m,P=f[x];if(!P||x2(P,r,f[y]))return s.warn("Switching to Redundant Stream "+(x+1)+"/"+m+': "'+v.url[x]+'" after '+r.details),s.playlistError=0,o.levels.forEach(function(O){O.urlId=x}),o.nextLoadLevel=h,{v:!0}},S=1;S<m;S++){var E=b();if(typeof E=="object")return E.v}return!1},c.penalizeRendition=function(r,s){var o=this.penalizedRenditions,f=o[r.urlId]||{lastErrorPerfMs:0,errors:[],details:void 0};f.lastErrorPerfMs=performance.now(),f.errors.push(s),f.details=r.details,o[r.urlId]=f},d}();function x2(d,c,u){if(performance.now()-d.lastErrorPerfMs>E2)return!0;var r=d.details;if(c.details===z.FRAG_GAP&&r&&c.frag){var s=c.frag.start,o=ql(null,r.fragments,s);if(o&&!o.gap)return!0}if(u&&d.errors.length<u.errors.length){var f=d.errors[d.errors.length-1];if(r&&f.frag&&c.frag&&Math.abs(f.frag.start-c.frag.start)>r.targetduration*3)return!0}return!1}var w2=function(){function d(u,r){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=B.log.bind(B,r+":"),this.warn=B.warn.bind(B,r+":"),this.hls=u}var c=d.prototype;return c.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},c.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},c.startLoad=function(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()},c.stopLoad=function(){this.canLoad=!1,this.clearTimer()},c.switchParams=function(r,s){var o=s==null?void 0:s.renditionReports;if(o){for(var f=-1,h=0;h<o.length;h++){var v=o[h],m=void 0;try{m=new self.URL(v.URI,s.url).href}catch(A){B.warn("Could not construct new URL for Rendition Report: "+A),m=v.URI||""}if(m===r){f=h;break}else m===r.substring(0,m.length)&&(f=h)}if(f!==-1){var y=o[f],b=parseInt(y["LAST-MSN"])||(s==null?void 0:s.lastPartSn),S=parseInt(y["LAST-PART"])||(s==null?void 0:s.lastPartIndex);if(this.hls.config.lowLatencyMode){var E=Math.min(s.age-s.partTarget,s.targetduration);S>=0&&E>s.partTarget&&(S+=1)}return new as(b,S>=0?S:void 0,Nr.No)}}},c.loadPlaylist=function(r){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())},c.shouldLoadPlaylist=function(r){return this.canLoad&&!!r&&!!r.url&&(!r.details||r.details.live)},c.shouldReloadPlaylist=function(r){return this.timer===-1&&this.requestScheduled===-1&&this.shouldLoadPlaylist(r)},c.playlistLoaded=function(r,s,o){var f=this,h=s.details,v=s.stats,m=self.performance.now(),y=v.loading.first?Math.max(0,m-v.loading.first):0;if(h.advancedDateTime=Date.now()-y,h.live||o!=null&&o.live){if(h.reloaded(o),o&&this.log("live playlist "+r+" "+(h.advanced?"REFRESHED "+h.lastPartSn+"-"+h.lastPartIndex:"MISSED")),o&&h.fragments.length>0&&Pi(o,h),!this.canLoad||!h.live)return;var b,S=void 0,E=void 0;if(h.canBlockReload&&h.endSN&&h.advanced){var A=this.hls.config.lowLatencyMode,x=h.lastPartSn,P=h.endSN,O=h.lastPartIndex,M=O!==-1,D=x===P,j=A?0:O;M?(S=D?P+1:x,E=D?j:O+1):S=P+1;var K=h.age,he=K+h.ageHeader,re=Math.min(he-h.partTarget,h.targetduration*1.5);if(re>0){if(o&&re>o.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+o.tuneInGoal+" to: "+re+" with playlist age: "+h.age),re=0;else{var ne=Math.floor(re/h.targetduration);if(S+=ne,E!==void 0){var xe=Math.round(re%h.targetduration/h.partTarget);E+=xe}this.log("CDN Tune-in age: "+h.ageHeader+"s last advanced "+K.toFixed(2)+"s goal: "+re+" skip sn "+ne+" to part "+E)}h.tuneInGoal=re}if(b=this.getDeliveryDirectives(h,s.deliveryDirectives,S,E),A||!D){this.loadPlaylist(b);return}}else h.canBlockReload&&(b=this.getDeliveryDirectives(h,s.deliveryDirectives,S,E));var we=this.hls.mainForwardBufferInfo,Pe=we?we.end-we.len:0,Ve=(h.edge-Pe)*1e3,dt=Lr(h,Ve);h.updated&&m>this.requestScheduled+dt&&(this.requestScheduled=v.loading.start),S!==void 0&&h.canBlockReload?this.requestScheduled=v.loading.first+dt-(h.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+dt<m?this.requestScheduled=m:this.requestScheduled-m<=0&&(this.requestScheduled+=dt);var pt=this.requestScheduled-m;pt=Math.max(0,pt),this.log("reload live playlist "+r+" in "+Math.round(pt)+" ms"),this.timer=self.setTimeout(function(){return f.loadPlaylist(b)},pt)}else this.clearTimer()},c.getDeliveryDirectives=function(r,s,o,f){var h=Us(r,o);return s!=null&&s.skip&&r.deltaUpdateFailed&&(o=s.msn,f=s.part,h=Nr.No),new as(o,f,h)},c.checkRetry=function(r){var s=this,o=r.details,f=ls(r),h=r.errorAction,v=h||{},m=v.action,y=v.retryCount,b=y===void 0?0:y,S=v.retryConfig,E=!!h&&!!S&&(m===dr.RetryRequest||!h.resolved&&m===dr.SendAlternateToPenaltyBox);if(E){var A;if(this.requestScheduled=-1,b>=S.maxNumRetry)return!1;if(f&&(A=r.context)!=null&&A.deliveryDirectives)this.warn("Retrying playlist loading "+(b+1)+"/"+S.maxNumRetry+' after "'+o+'" without delivery-directives'),this.loadPlaylist();else{var x=Yl(S,b);this.timer=self.setTimeout(function(){return s.loadPlaylist()},x),this.warn("Retrying playlist loading "+(b+1)+"/"+S.maxNumRetry+' after "'+o+'" in '+x+"ms")}r.levelRetry=!0,h.resolved=!0}return E},d}(),Xl,P2=function(d){T(c,d);function c(r,s){var o;return o=d.call(this,r,"[level-controller]")||this,o._levels=[],o._firstLevel=-1,o._startLevel=void 0,o.currentLevel=null,o.currentLevelIndex=-1,o.manualLevelIndex=-1,o.steering=void 0,o.onParsedComplete=void 0,o.steering=s,o._registerListeners(),o}var u=c.prototype;return u._registerListeners=function(){var s=this.hls;s.on(L.MANIFEST_LOADING,this.onManifestLoading,this),s.on(L.MANIFEST_LOADED,this.onManifestLoaded,this),s.on(L.LEVEL_LOADED,this.onLevelLoaded,this),s.on(L.LEVELS_UPDATED,this.onLevelsUpdated,this),s.on(L.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),s.on(L.FRAG_LOADED,this.onFragLoaded,this),s.on(L.ERROR,this.onError,this)},u._unregisterListeners=function(){var s=this.hls;s.off(L.MANIFEST_LOADING,this.onManifestLoading,this),s.off(L.MANIFEST_LOADED,this.onManifestLoaded,this),s.off(L.LEVEL_LOADED,this.onLevelLoaded,this),s.off(L.LEVELS_UPDATED,this.onLevelsUpdated,this),s.off(L.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),s.off(L.FRAG_LOADED,this.onFragLoaded,this),s.off(L.ERROR,this.onError,this)},u.destroy=function(){this._unregisterListeners(),this.steering=null,this.resetLevels(),d.prototype.destroy.call(this)},u.startLoad=function(){var s=this._levels;s.forEach(function(o){o.loadError=0,o.fragmentError=0}),d.prototype.startLoad.call(this)},u.resetLevels=function(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[]},u.onManifestLoading=function(s,o){this.resetLevels()},u.onManifestLoaded=function(s,o){var f=[],h={},v;o.levels.forEach(function(m){var y,b=m.attrs;((y=m.audioCodec)==null?void 0:y.indexOf("mp4a.40.34"))!==-1&&(Xl||(Xl=/chrome|firefox/i.test(navigator.userAgent)),Xl&&(m.audioCodec=void 0));var S=b.AUDIO,E=b.CODECS,A=b["FRAME-RATE"];b["PATHWAY-ID"];var x=b.RESOLUTION,P=b.SUBTITLES,O="",M=""+O+m.bitrate+"-"+x+"-"+A+"-"+E;v=h[M],v?v.addFallback(m):(v=new os(m),h[M]=v,f.push(v)),Tf(v,"audio",S),Tf(v,"text",P)}),this.filterAndSortMediaOptions(f,o)},u.filterAndSortMediaOptions=function(s,o){var f=this,h=[],v=[],m=!1,y=!1,b=!1,S=s.filter(function(D){var j=D.audioCodec,K=D.videoCodec,he=D.width,re=D.height,ne=D.unknownCodecs;return m||(m=!!(he&&re)),y||(y=!!K),b||(b=!!j),!(ne!=null&&ne.length)&&(!j||Ii(j,"audio"))&&(!K||Ii(K,"video"))});if((m||y)&&b&&(S=S.filter(function(D){var j=D.videoCodec,K=D.width,he=D.height;return!!j||!!(K&&he)})),S.length===0){Promise.resolve().then(function(){if(f.hls){var D=new Error("no level with compatible codecs found in manifest");f.hls.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:o.url,error:D,reason:D.message})}});return}o.audioTracks&&(h=o.audioTracks.filter(function(D){return!D.audioCodec||Ii(D.audioCodec,"audio")}),Ef(h)),o.subtitles&&(v=o.subtitles,Ef(v));var E=S.slice(0);S.sort(function(D,j){return D.attrs["HDCP-LEVEL"]!==j.attrs["HDCP-LEVEL"]?(D.attrs["HDCP-LEVEL"]||"")>(j.attrs["HDCP-LEVEL"]||"")?1:-1:D.bitrate!==j.bitrate?D.bitrate-j.bitrate:D.attrs["FRAME-RATE"]!==j.attrs["FRAME-RATE"]?D.attrs.decimalFloatingPoint("FRAME-RATE")-j.attrs.decimalFloatingPoint("FRAME-RATE"):D.attrs.SCORE!==j.attrs.SCORE?D.attrs.decimalFloatingPoint("SCORE")-j.attrs.decimalFloatingPoint("SCORE"):m&&D.height!==j.height?D.height-j.height:0});var A=E[0];if(this.steering&&(S=this.steering.filterParsedLevels(S),S.length!==E.length)){for(var x=0;x<E.length;x++)if(E[x].pathwayId===S[0].pathwayId){A=E[x];break}}this._levels=S;for(var P=0;P<S.length;P++)if(S[P]===A){this._firstLevel=P,this.log("manifest loaded, "+S.length+" level(s) found, first bitrate: "+A.bitrate);break}var O=b&&!y,M={levels:S,audioTracks:h,subtitleTracks:v,sessionData:o.sessionData,sessionKeys:o.sessionKeys,firstLevel:this._firstLevel,stats:o.stats,audio:b,video:y,altAudio:!O&&h.some(function(D){return!!D.url})};this.hls.trigger(L.MANIFEST_PARSED,M),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)},u.onError=function(s,o){o.fatal||!o.context||o.context.type===ye.LEVEL&&o.context.level===this.level&&this.checkRetry(o)},u.onFragLoaded=function(s,o){var f=o.frag;if(f!==void 0&&f.type===st.MAIN){var h=this._levels[f.level];h!==void 0&&(h.loadError=0)}},u.onLevelLoaded=function(s,o){var f,h=o.level,v=o.details,m=this._levels[h];if(!m){var y;this.warn("Invalid level index "+h),(y=o.deliveryDirectives)!=null&&y.skip&&(v.deltaUpdateFailed=!0);return}h===this.currentLevelIndex?(m.fragmentError===0&&(m.loadError=0),this.playlistLoaded(h,o,m.details)):(f=o.deliveryDirectives)!=null&&f.skip&&(v.deltaUpdateFailed=!0)},u.onAudioTrackSwitched=function(s,o){var f=this.currentLevel;if(f){var h=this.hls.audioTracks[o.id].groupId;if(f.audioGroupIds&&f.audioGroupId!==h){for(var v=-1,m=0;m<f.audioGroupIds.length;m++)if(f.audioGroupIds[m]===h){v=m;break}v!==-1&&v!==f.urlId&&(f.urlId=v,this.canLoad&&this.startLoad())}}},u.loadPlaylist=function(s){d.prototype.loadPlaylist.call(this);var o=this.currentLevelIndex,f=this.currentLevel;if(f&&this.shouldLoadPlaylist(f)){var h=f.urlId,v=f.uri;if(s)try{v=s.addDirectives(v)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}var m=f.attrs["PATHWAY-ID"];this.log("Loading level index "+o+((s==null?void 0:s.msn)!==void 0?" at sn "+s.msn+" part "+s.part:"")+" with"+(m?" Pathway "+m:"")+" URI "+(h+1)+"/"+f.url.length+" "+v),this.clearTimer(),this.hls.trigger(L.LEVEL_LOADING,{url:v,level:o,id:h,deliveryDirectives:s||null})}},u.removeLevel=function(s,o){var f=this,h=function(y,b){return b!==o},v=this._levels.filter(function(m,y){return y!==s?!0:m.url.length>1&&o!==void 0?(m.url=m.url.filter(h),m.audioGroupIds&&(m.audioGroupIds=m.audioGroupIds.filter(h)),m.textGroupIds&&(m.textGroupIds=m.textGroupIds.filter(h)),m.urlId=0,!0):(f.steering&&f.steering.removeLevel(m),!1)});this.hls.trigger(L.LEVELS_UPDATED,{levels:v})},u.onLevelsUpdated=function(s,o){var f=o.levels;f.forEach(function(h,v){var m=h.details;m!=null&&m.fragments&&m.fragments.forEach(function(y){y.level=v})}),this._levels=f},p(c,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(s){var o=this._levels;if(o.length!==0){if(s<0||s>=o.length){var f=new Error("invalid level idx"),h=s<0;if(this.hls.trigger(L.ERROR,{type:le.OTHER_ERROR,details:z.LEVEL_SWITCH_ERROR,level:s,fatal:h,error:f,reason:f.message}),h)return;s=Math.min(s,o.length-1)}var v=this.currentLevelIndex,m=this.currentLevel,y=m?m.attrs["PATHWAY-ID"]:void 0,b=o[s],S=b.attrs["PATHWAY-ID"];if(this.currentLevelIndex=s,this.currentLevel=b,!(v===s&&b.details&&m&&y===S)){this.log("Switching to level "+s+(S?" with Pathway "+S:"")+" from level "+v+(y?" with Pathway "+y:""));var E=k({},b,{level:s,maxBitrate:b.maxBitrate,attrs:b.attrs,uri:b.uri,urlId:b.urlId});delete E._attrs,delete E._urlId,this.hls.trigger(L.LEVEL_SWITCHING,E);var A=b.details;if(!A||A.live){var x=this.switchParams(b.uri,m==null?void 0:m.details);this.loadPlaylist(x)}}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(s){this.manualLevelIndex=s,this._startLevel===void 0&&(this._startLevel=s),s!==-1&&(this.level=s)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(s){this._firstLevel=s}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var s=this.hls.config.startLevel;return s!==void 0?s:this._firstLevel}else return this._startLevel},set:function(s){this._startLevel=s}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(s){this.level=s,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=s)}}]),c}(w2);function Tf(d,c,u){u&&(c==="audio"?(d.audioGroupIds||(d.audioGroupIds=[]),d.audioGroupIds[d.url.length-1]=u):c==="text"&&(d.textGroupIds||(d.textGroupIds=[]),d.textGroupIds[d.url.length-1]=u))}function Ef(d){var c={};d.forEach(function(u){var r=u.groupId||"";u.id=c[r]=c[r]||0,c[r]++})}var fr={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"},C2=function(){function d(u){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=u,this._registerListeners()}var c=d.prototype;return c._registerListeners=function(){var r=this.hls;r.on(L.BUFFER_APPENDED,this.onBufferAppended,this),r.on(L.FRAG_BUFFERED,this.onFragBuffered,this),r.on(L.FRAG_LOADED,this.onFragLoaded,this)},c._unregisterListeners=function(){var r=this.hls;r.off(L.BUFFER_APPENDED,this.onBufferAppended,this),r.off(L.FRAG_BUFFERED,this.onFragBuffered,this),r.off(L.FRAG_LOADED,this.onFragLoaded,this)},c.destroy=function(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null},c.getAppendedFrag=function(r,s){var o=this.activePartLists[s];if(o)for(var f=o.length;f--;){var h=o[f];if(!h)break;var v=h.end;if(h.start<=r&&v!==null&&r<=v)return h}return this.getBufferedFrag(r,s)},c.getBufferedFrag=function(r,s){for(var o=this.fragments,f=Object.keys(o),h=f.length;h--;){var v=o[f[h]];if((v==null?void 0:v.body.type)===s&&v.buffered){var m=v.body;if(m.start<=r&&r<=m.end)return m}}return null},c.detectEvictedFragments=function(r,s,o,f){var h=this;this.timeRanges&&(this.timeRanges[r]=s);var v=(f==null?void 0:f.fragment.sn)||-1;Object.keys(this.fragments).forEach(function(m){var y=h.fragments[m];if(y&&!(v>=y.body.sn)){if(!y.buffered&&!y.loaded){y.body.type===o&&h.removeFragment(y.body);return}var b=y.range[r];b&&b.time.some(function(S){var E=!h.isTimeBuffered(S.startPTS,S.endPTS,s);return E&&h.removeFragment(y.body),E})}})},c.detectPartialFragments=function(r){var s=this,o=this.timeRanges,f=r.frag,h=r.part;if(!(!o||f.sn==="initSegment")){var v=Ws(f),m=this.fragments[v];if(m){var y=!f.relurl;Object.keys(o).forEach(function(b){var S=f.elementaryStreams[b];if(S){var E=o[b],A=y||S.partial===!0;m.range[b]=s.getBufferedTimes(f,h,A,E)}}),m.loaded=null,Object.keys(m.range).length?(m.buffered=!0,m.body.endList&&(this.endListFragments[m.body.type]=m),Mo(m)||this.removeParts(f.sn-1,f.type)):this.removeFragment(m.body)}}},c.removeParts=function(r,s){var o=this.activePartLists[s];o&&(this.activePartLists[s]=o.filter(function(f){return f.fragment.sn>=r}))},c.fragBuffered=function(r,s){var o=Ws(r),f=this.fragments[o];!f&&s&&(f=this.fragments[o]={body:r,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},r.gap&&(this.hasGaps=!0)),f&&(f.loaded=null,f.buffered=!0)},c.getBufferedTimes=function(r,s,o,f){for(var h={time:[],partial:o},v=r.start,m=r.end,y=r.minEndPTS||m,b=r.maxStartPTS||v,S=0;S<f.length;S++){var E=f.start(S)-this.bufferPadding,A=f.end(S)+this.bufferPadding;if(b>=E&&y<=A){h.time.push({startPTS:Math.max(v,f.start(S)),endPTS:Math.min(m,f.end(S))});break}else if(v<A&&m>E)h.partial=!0,h.time.push({startPTS:Math.max(v,f.start(S)),endPTS:Math.min(m,f.end(S))});else if(m<=E)break}return h},c.getPartialFragment=function(r){var s=null,o,f,h,v=0,m=this.bufferPadding,y=this.fragments;return Object.keys(y).forEach(function(b){var S=y[b];S&&Mo(S)&&(f=S.body.start-m,h=S.body.end+m,r>=f&&r<=h&&(o=Math.min(r-f,h-r),v<=o&&(s=S.body,v=o)))}),s},c.isEndListAppended=function(r){var s=this.endListFragments[r];return s!==void 0&&(s.buffered||Mo(s))},c.getState=function(r){var s=Ws(r),o=this.fragments[s];return o?o.buffered?Mo(o)?fr.PARTIAL:fr.OK:fr.APPENDING:fr.NOT_LOADED},c.isTimeBuffered=function(r,s,o){for(var f,h,v=0;v<o.length;v++){if(f=o.start(v)-this.bufferPadding,h=o.end(v)+this.bufferPadding,r>=f&&s<=h)return!0;if(s<=f)return!1}return!1},c.onFragLoaded=function(r,s){var o=s.frag,f=s.part;if(!(o.sn==="initSegment"||o.bitrateTest)){var h=f?null:s,v=Ws(o);this.fragments[v]={body:o,appendedPTS:null,loaded:h,buffered:!1,range:Object.create(null)}}},c.onBufferAppended=function(r,s){var o=this,f=s.frag,h=s.part,v=s.timeRanges;if(f.sn!=="initSegment"){var m=f.type;if(h){var y=this.activePartLists[m];y||(this.activePartLists[m]=y=[]),y.push(h)}this.timeRanges=v,Object.keys(v).forEach(function(b){var S=v[b];o.detectEvictedFragments(b,S,m,h)})}},c.onFragBuffered=function(r,s){this.detectPartialFragments(s)},c.hasFragment=function(r){var s=Ws(r);return!!this.fragments[s]},c.hasParts=function(r){var s;return!!((s=this.activePartLists[r])!=null&&s.length)},c.removeFragmentsInRange=function(r,s,o,f,h){var v=this;f&&!this.hasGaps||Object.keys(this.fragments).forEach(function(m){var y=v.fragments[m];if(y){var b=y.body;b.type!==o||f&&!b.gap||b.start<s&&b.end>r&&(y.buffered||h)&&v.removeFragment(b)}})},c.removeFragment=function(r){var s=Ws(r);r.stats.loaded=0,r.clearElementaryStreamInfo();var o=this.activePartLists[r.type];if(o){var f=r.sn;this.activePartLists[r.type]=o.filter(function(h){return h.fragment.sn!==f})}delete this.fragments[s],r.endList&&delete this.endListFragments[r.type]},c.removeAllFragments=function(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1},d}();function Mo(d){var c,u,r;return d.buffered&&(d.body.gap||((c=d.range.video)==null?void 0:c.partial)||((u=d.range.audio)==null?void 0:u.partial)||((r=d.range.audiovideo)==null?void 0:r.partial))}function Ws(d){return d.type+"_"+d.level+"_"+d.urlId+"_"+d.sn}var Af=Math.pow(2,17),L2=function(){function d(u){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=u}var c=d.prototype;return c.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},c.abort=function(){this.loader&&this.loader.abort()},c.load=function(r,s){var o=this,f=r.url;if(!f)return Promise.reject(new kn({type:le.NETWORK_ERROR,details:z.FRAG_LOAD_ERROR,fatal:!1,frag:r,error:new Error("Fragment does not have a "+(f?"part list":"url")),networkDetails:null}));this.abort();var h=this.config,v=h.fLoader,m=h.loader;return new Promise(function(y,b){if(o.loader&&o.loader.destroy(),r.gap){b(wf(r));return}var S=o.loader=r.loader=v?new v(h):new m(h),E=xf(r),A=bf(h.fragLoadPolicy.default),x={loadPolicy:A,timeout:A.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:r.sn==="initSegment"?1/0:Af};r.stats=S.stats,S.load(E,x,{onSuccess:function(O,M,D,j){o.resetLoader(r,S);var K=O.data;D.resetIV&&r.decryptdata&&(r.decryptdata.iv=new Uint8Array(K.slice(0,16)),K=K.slice(16)),y({frag:r,part:null,payload:K,networkDetails:j})},onError:function(O,M,D,j){o.resetLoader(r,S),b(new kn({type:le.NETWORK_ERROR,details:z.FRAG_LOAD_ERROR,fatal:!1,frag:r,response:l({url:f,data:void 0},O),error:new Error("HTTP Error "+O.code+" "+O.text),networkDetails:D,stats:j}))},onAbort:function(O,M,D){o.resetLoader(r,S),b(new kn({type:le.NETWORK_ERROR,details:z.INTERNAL_ABORTED,fatal:!1,frag:r,error:new Error("Aborted"),networkDetails:D,stats:O}))},onTimeout:function(O,M,D){o.resetLoader(r,S),b(new kn({type:le.NETWORK_ERROR,details:z.FRAG_LOAD_TIMEOUT,fatal:!1,frag:r,error:new Error("Timeout after "+x.timeout+"ms"),networkDetails:D,stats:O}))},onProgress:function(O,M,D,j){s&&s({frag:r,part:null,payload:D,networkDetails:j})}})})},c.loadPart=function(r,s,o){var f=this;this.abort();var h=this.config,v=h.fLoader,m=h.loader;return new Promise(function(y,b){if(f.loader&&f.loader.destroy(),r.gap||s.gap){b(wf(r,s));return}var S=f.loader=r.loader=v?new v(h):new m(h),E=xf(r,s),A=bf(h.fragLoadPolicy.default),x={loadPolicy:A,timeout:A.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Af};s.stats=S.stats,S.load(E,x,{onSuccess:function(O,M,D,j){f.resetLoader(r,S),f.updateStatsFromPart(r,s);var K={frag:r,part:s,payload:O.data,networkDetails:j};o(K),y(K)},onError:function(O,M,D,j){f.resetLoader(r,S),b(new kn({type:le.NETWORK_ERROR,details:z.FRAG_LOAD_ERROR,fatal:!1,frag:r,part:s,response:l({url:E.url,data:void 0},O),error:new Error("HTTP Error "+O.code+" "+O.text),networkDetails:D,stats:j}))},onAbort:function(O,M,D){r.stats.aborted=s.stats.aborted,f.resetLoader(r,S),b(new kn({type:le.NETWORK_ERROR,details:z.INTERNAL_ABORTED,fatal:!1,frag:r,part:s,error:new Error("Aborted"),networkDetails:D,stats:O}))},onTimeout:function(O,M,D){f.resetLoader(r,S),b(new kn({type:le.NETWORK_ERROR,details:z.FRAG_LOAD_TIMEOUT,fatal:!1,frag:r,part:s,error:new Error("Timeout after "+x.timeout+"ms"),networkDetails:D,stats:O}))}})})},c.updateStatsFromPart=function(r,s){var o=r.stats,f=s.stats,h=f.total;if(o.loaded+=f.loaded,h){var v=Math.round(r.duration/s.duration),m=Math.min(Math.round(o.loaded/h),v),y=v-m,b=y*Math.round(o.loaded/m);o.total=o.loaded+b}else o.total=Math.max(o.loaded,o.total);var S=o.loading,E=f.loading;S.start?S.first+=E.first-E.start:(S.start=E.start,S.first=E.first),S.end=E.end},c.resetLoader=function(r,s){r.loader=null,this.loader===s&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),s.destroy()},d}();function xf(d,c){c===void 0&&(c=null);var u=c||d,r={frag:d,part:c,responseType:"arraybuffer",url:u.url,headers:{},rangeStart:0,rangeEnd:0},s=u.byteRangeStartOffset,o=u.byteRangeEndOffset;if(Z(s)&&Z(o)){var f,h=s,v=o;if(d.sn==="initSegment"&&((f=d.decryptdata)==null?void 0:f.method)==="AES-128"){var m=o-s;m%16&&(v=o+(16-m%16)),s!==0&&(r.resetIV=!0,h=s-16)}r.rangeStart=h,r.rangeEnd=v}return r}function wf(d,c){var u=new Error("GAP "+(d.gap?"tag":"attribute")+" found"),r={type:le.MEDIA_ERROR,details:z.FRAG_GAP,fatal:!1,frag:d,error:u,networkDetails:null};return c&&(r.part=c),(c||d).stats.aborted=!0,new kn(r)}var kn=function(d){T(c,d);function c(u){var r;return r=d.call(this,u.error.message)||this,r.data=void 0,r.data=u,r}return c}(W(Error)),I2=function(){function d(u){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=u}var c=d.prototype;return c.abort=function(r){for(var s in this.keyUriToKeyInfo){var o=this.keyUriToKeyInfo[s].loader;if(o){if(r&&r!==o.context.frag.type)return;o.abort()}}},c.detach=function(){for(var r in this.keyUriToKeyInfo){var s=this.keyUriToKeyInfo[r];(s.mediaKeySessionContext||s.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[r]}},c.destroy=function(){this.detach();for(var r in this.keyUriToKeyInfo){var s=this.keyUriToKeyInfo[r].loader;s&&s.destroy()}this.keyUriToKeyInfo={}},c.createKeyLoadError=function(r,s,o,f,h){return s===void 0&&(s=z.KEY_LOAD_ERROR),new kn({type:le.NETWORK_ERROR,details:s,fatal:!1,frag:r,response:h,error:o,networkDetails:f})},c.loadClear=function(r,s){var o=this;if(this.emeController&&this.config.emeEnabled)for(var f=r.sn,h=r.cc,v=function(){var S=s[m];if(h<=S.cc&&(f==="initSegment"||S.sn==="initSegment"||f<S.sn))return o.emeController.selectKeySystemFormat(S).then(function(E){S.setKeyFormat(E)}),"break"},m=0;m<s.length;m++){var y=v();if(y==="break")break}},c.load=function(r){var s=this;return!r.decryptdata&&r.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(r).then(function(o){return s.loadInternal(r,o)}):this.loadInternal(r)},c.loadInternal=function(r,s){var o,f;s&&r.setKeyFormat(s);var h=r.decryptdata;if(!h){var v=new Error(s?"Expected frag.decryptdata to be defined after setting format "+s:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(r,z.KEY_LOAD_ERROR,v))}var m=h.uri;if(!m)return Promise.reject(this.createKeyLoadError(r,z.KEY_LOAD_ERROR,new Error('Invalid key URI: "'+m+'"')));var y=this.keyUriToKeyInfo[m];if((o=y)!=null&&o.decryptdata.key)return h.key=y.decryptdata.key,Promise.resolve({frag:r,keyInfo:y});if((f=y)!=null&&f.keyLoadPromise){var b;switch((b=y.mediaKeySessionContext)==null?void 0:b.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return y.keyLoadPromise.then(function(S){return h.key=S.keyInfo.decryptdata.key,{frag:r,keyInfo:y}})}}switch(y=this.keyUriToKeyInfo[m]={decryptdata:h,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},h.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return h.keyFormat==="identity"?this.loadKeyHTTP(y,r):this.loadKeyEME(y,r);case"AES-128":return this.loadKeyHTTP(y,r);default:return Promise.reject(this.createKeyLoadError(r,z.KEY_LOAD_ERROR,new Error('Key supplied with unsupported METHOD: "'+h.method+'"')))}},c.loadKeyEME=function(r,s){var o={frag:s,keyInfo:r};if(this.emeController&&this.config.emeEnabled){var f=this.emeController.loadKey(o);if(f)return(r.keyLoadPromise=f.then(function(h){return r.mediaKeySessionContext=h,o})).catch(function(h){throw r.keyLoadPromise=null,h})}return Promise.resolve(o)},c.loadKeyHTTP=function(r,s){var o=this,f=this.config,h=f.loader,v=new h(f);return s.keyLoader=r.loader=v,r.keyLoadPromise=new Promise(function(m,y){var b={keyInfo:r,frag:s,responseType:"arraybuffer",url:r.decryptdata.uri},S=f.keyLoadPolicy.default,E={loadPolicy:S,timeout:S.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},A={onSuccess:function(P,O,M,D){var j=M.frag,K=M.keyInfo,he=M.url;if(!j.decryptdata||K!==o.keyUriToKeyInfo[he])return y(o.createKeyLoadError(j,z.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),D));K.decryptdata.key=j.decryptdata.key=new Uint8Array(P.data),j.keyLoader=null,K.loader=null,m({frag:j,keyInfo:K})},onError:function(P,O,M,D){o.resetLoader(O),y(o.createKeyLoadError(s,z.KEY_LOAD_ERROR,new Error("HTTP Error "+P.code+" loading key "+P.text),M,l({url:b.url,data:void 0},P)))},onTimeout:function(P,O,M){o.resetLoader(O),y(o.createKeyLoadError(s,z.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),M))},onAbort:function(P,O,M){o.resetLoader(O),y(o.createKeyLoadError(s,z.INTERNAL_ABORTED,new Error("key loading aborted"),M))}};v.load(b,E,A)})},c.resetLoader=function(r){var s=r.frag,o=r.keyInfo,f=r.url,h=o.loader;s.keyLoader===h&&(s.keyLoader=null,o.loader=null),delete this.keyUriToKeyInfo[f],h&&h.destroy()},d}(),R2=function(){function d(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var c=d.prototype;return c.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},c.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},c.onHandlerDestroyed=function(){},c.hasInterval=function(){return!!this._tickInterval},c.hasNextTick=function(){return!!this._tickTimer},c.setInterval=function(r){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,r),!0)},c.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},c.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},c.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},c.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},c.doTick=function(){},d}(),D2={length:0,start:function(){return 0},end:function(){return 0}},Oi=function(){function d(){}return d.isBuffered=function(u,r){try{if(u){for(var s=d.getBuffered(u),o=0;o<s.length;o++)if(r>=s.start(o)&&r<=s.end(o))return!0}}catch(f){}return!1},d.bufferInfo=function(u,r,s){try{if(u){var o=d.getBuffered(u),f=[],h;for(h=0;h<o.length;h++)f.push({start:o.start(h),end:o.end(h)});return this.bufferedInfo(f,r,s)}}catch(v){}return{len:0,start:r,end:r,nextStart:void 0}},d.bufferedInfo=function(u,r,s){r=Math.max(0,r),u.sort(function(P,O){var M=P.start-O.start;return M||O.end-P.end});var o=[];if(s)for(var f=0;f<u.length;f++){var h=o.length;if(h){var v=o[h-1].end;u[f].start-v<s?u[f].end>v&&(o[h-1].end=u[f].end):o.push(u[f])}else o.push(u[f])}else o=u;for(var m=0,y,b=r,S=r,E=0;E<o.length;E++){var A=o[E].start,x=o[E].end;if(r+s>=A&&r<x)b=A,S=x,m=S-r;else if(r+s<A){y=A;break}}return{len:m,start:b||0,end:S||0,nextStart:y}},d.getBuffered=function(u){try{return u.buffered}catch(r){return B.log("failed to get media.buffered",r),D2}},d}(),Pf=function(c,u,r,s,o,f){s===void 0&&(s=0),o===void 0&&(o=-1),f===void 0&&(f=!1),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=No(),this.buffering={audio:No(),video:No(),audiovideo:No()},this.level=c,this.sn=u,this.id=r,this.size=s,this.part=o,this.partial=f};function No(){return{start:0,executeStart:0,executeEnd:0,end:0}}function O2(d,c){for(var u=null,r=0,s=d.length;r<s;r++){var o=d[r];if(o&&o.cc===c){u=o;break}}return u}function B2(d,c,u){return!!(c.details&&(u.endCC>u.startCC||d&&d.cc<u.startCC))}function M2(d,c,u){var r=d.fragments,s=c.fragments;if(!s.length||!r.length){B.log("No fragments to align");return}var o=O2(r,s[0].cc);if(!o||o&&!o.startPTS){B.log("No frag in previous level to align on");return}return o}function Cf(d,c){if(d){var u=d.start+c;d.start=d.startPTS=u,d.endPTS=u+d.duration}}function Lf(d,c){for(var u=c.fragments,r=0,s=u.length;r<s;r++)Cf(u[r],d);c.fragmentHint&&Cf(c.fragmentHint,d),c.alignedSliding=!0}function N2(d,c,u){c&&(F2(d,u,c),!u.alignedSliding&&c.details&&U2(u,c.details),!u.alignedSliding&&c.details&&!u.skippedSegments&&ba(c.details,u))}function F2(d,c,u){if(B2(d,u,c)){var r=M2(u.details,c);r&&Z(r.start)&&(B.log("Adjusting PTS using last level due to CC increase within current level "+c.url),Lf(r.start,c))}}function U2(d,c){if(!(!c.fragments.length||!d.hasProgramDateTime||!c.hasProgramDateTime)){var u=c.fragments[0].programDateTime,r=d.fragments[0].programDateTime,s=(r-u)/1e3+c.fragments[0].start;s&&Z(s)&&(B.log("Adjusting PTS using programDateTime delta "+(r-u)+"ms, sliding:"+s.toFixed(3)+" "+d.url+" "),Lf(s,d))}}var V2=function(){function d(u,r){this.subtle=void 0,this.aesIV=void 0,this.subtle=u,this.aesIV=r}var c=d.prototype;return c.decrypt=function(r,s){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},s,r)},d}(),W2=function(){function d(u,r){this.subtle=void 0,this.key=void 0,this.subtle=u,this.key=r}var c=d.prototype;return c.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},d}();function j2(d){var c=d.byteLength,u=c&&new DataView(d.buffer).getUint8(c-1);return u?yt(d,0,c-u):d}var G2=function(){function d(){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()}var c=d.prototype;return c.uint8ArrayToUint32Array_=function(r){for(var s=new DataView(r),o=new Uint32Array(4),f=0;f<4;f++)o[f]=s.getUint32(f*4);return o},c.initTable=function(){var r=this.sBox,s=this.invSBox,o=this.subMix,f=o[0],h=o[1],v=o[2],m=o[3],y=this.invSubMix,b=y[0],S=y[1],E=y[2],A=y[3],x=new Uint32Array(256),P=0,O=0,M=0;for(M=0;M<256;M++)M<128?x[M]=M<<1:x[M]=M<<1^283;for(M=0;M<256;M++){var D=O^O<<1^O<<2^O<<3^O<<4;D=D>>>8^D&255^99,r[P]=D,s[D]=P;var j=x[P],K=x[j],he=x[K],re=x[D]*257^D*16843008;f[P]=re<<24|re>>>8,h[P]=re<<16|re>>>16,v[P]=re<<8|re>>>24,m[P]=re,re=he*16843009^K*65537^j*257^P*16843008,b[D]=re<<24|re>>>8,S[D]=re<<16|re>>>16,E[D]=re<<8|re>>>24,A[D]=re,P?(P=j^x[x[x[he^j]]],O^=x[x[O]]):P=O=1}},c.expandKey=function(r){for(var s=this.uint8ArrayToUint32Array_(r),o=!0,f=0;f<s.length&&o;)o=s[f]===this.key[f],f++;if(!o){this.key=s;var h=this.keySize=s.length;if(h!==4&&h!==6&&h!==8)throw new Error("Invalid aes key size="+h);var v=this.ksRows=(h+6+1)*4,m,y,b=this.keySchedule=new Uint32Array(v),S=this.invKeySchedule=new Uint32Array(v),E=this.sBox,A=this.rcon,x=this.invSubMix,P=x[0],O=x[1],M=x[2],D=x[3],j,K;for(m=0;m<v;m++){if(m<h){j=b[m]=s[m];continue}K=j,m%h===0?(K=K<<8|K>>>24,K=E[K>>>24]<<24|E[K>>>16&255]<<16|E[K>>>8&255]<<8|E[K&255],K^=A[m/h|0]<<24):h>6&&m%h===4&&(K=E[K>>>24]<<24|E[K>>>16&255]<<16|E[K>>>8&255]<<8|E[K&255]),b[m]=j=(b[m-h]^K)>>>0}for(y=0;y<v;y++)m=v-y,y&3?K=b[m]:K=b[m-4],y<4||m<=4?S[y]=K:S[y]=P[E[K>>>24]]^O[E[K>>>16&255]]^M[E[K>>>8&255]]^D[E[K&255]],S[y]=S[y]>>>0}},c.networkToHostOrderSwap=function(r){return r<<24|(r&65280)<<8|(r&16711680)>>8|r>>>24},c.decrypt=function(r,s,o){for(var f=this.keySize+6,h=this.invKeySchedule,v=this.invSBox,m=this.invSubMix,y=m[0],b=m[1],S=m[2],E=m[3],A=this.uint8ArrayToUint32Array_(o),x=A[0],P=A[1],O=A[2],M=A[3],D=new Int32Array(r),j=new Int32Array(D.length),K,he,re,ne,xe,we,Pe,Ve,dt,pt,_t,Bt,St,zt,Ct=this.networkToHostOrderSwap;s<D.length;){for(dt=Ct(D[s]),pt=Ct(D[s+1]),_t=Ct(D[s+2]),Bt=Ct(D[s+3]),xe=dt^h[0],we=Bt^h[1],Pe=_t^h[2],Ve=pt^h[3],St=4,zt=1;zt<f;zt++)K=y[xe>>>24]^b[we>>16&255]^S[Pe>>8&255]^E[Ve&255]^h[St],he=y[we>>>24]^b[Pe>>16&255]^S[Ve>>8&255]^E[xe&255]^h[St+1],re=y[Pe>>>24]^b[Ve>>16&255]^S[xe>>8&255]^E[we&255]^h[St+2],ne=y[Ve>>>24]^b[xe>>16&255]^S[we>>8&255]^E[Pe&255]^h[St+3],xe=K,we=he,Pe=re,Ve=ne,St=St+4;K=v[xe>>>24]<<24^v[we>>16&255]<<16^v[Pe>>8&255]<<8^v[Ve&255]^h[St],he=v[we>>>24]<<24^v[Pe>>16&255]<<16^v[Ve>>8&255]<<8^v[xe&255]^h[St+1],re=v[Pe>>>24]<<24^v[Ve>>16&255]<<16^v[xe>>8&255]<<8^v[we&255]^h[St+2],ne=v[Ve>>>24]<<24^v[xe>>16&255]<<16^v[we>>8&255]<<8^v[Pe&255]^h[St+3],j[s]=Ct(K^x),j[s+1]=Ct(ne^P),j[s+2]=Ct(re^O),j[s+3]=Ct(he^M),x=dt,P=pt,O=_t,M=Bt,s=s+4}return j.buffer},d}(),z2=16,Zl=function(){function d(u,r){var s=r===void 0?{}:r,o=s.removePKCS7Padding,f=o===void 0?!0:o;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=u.enableSoftwareAES,this.removePKCS7Padding=f,f)try{var h=self.crypto;h&&(this.subtle=h.subtle||h.webkitSubtle)}catch(v){}this.subtle===null&&(this.useSoftware=!0)}var c=d.prototype;return c.destroy=function(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null},c.isSync=function(){return this.useSoftware},c.flush=function(){var r=this.currentResult,s=this.remainderData;if(!r||s)return this.reset(),null;var o=new Uint8Array(r);return this.reset(),this.removePKCS7Padding?j2(o):o},c.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},c.decrypt=function(r,s,o){var f=this;return this.useSoftware?new Promise(function(h,v){f.softwareDecrypt(new Uint8Array(r),s,o);var m=f.flush();m?h(m.buffer):v(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(r),s,o)},c.softwareDecrypt=function(r,s,o){var f=this.currentIV,h=this.currentResult,v=this.remainderData;this.logOnce("JS AES decrypt"),v&&(r=Y(v,r),this.remainderData=null);var m=this.getValidChunk(r);if(!m.length)return null;f&&(o=f);var y=this.softwareDecrypter;y||(y=this.softwareDecrypter=new G2),y.expandKey(s);var b=h;return this.currentResult=y.decrypt(m.buffer,0,o),this.currentIV=yt(m,-16).buffer,b||null},c.webCryptoDecrypt=function(r,s,o){var f=this,h=this.subtle;return(this.key!==s||!this.fastAesKey)&&(this.key=s,this.fastAesKey=new W2(h,s)),this.fastAesKey.expandKey().then(function(v){if(!h)return Promise.reject(new Error("web crypto not initialized"));f.logOnce("WebCrypto AES decrypt");var m=new V2(h,new Uint8Array(o));return m.decrypt(r.buffer,v)}).catch(function(v){return B.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, "+v.name+": "+v.message),f.onWebCryptoError(r,s,o)})},c.onWebCryptoError=function(r,s,o){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(r,s,o);var f=this.flush();if(f)return f.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")},c.getValidChunk=function(r){var s=r,o=r.length-r.length%z2;return o!==r.length&&(s=yt(r,0,o),this.remainderData=yt(r,o)),s},c.logOnce=function(r){this.logEnabled&&(B.log("[decrypter]: "+r),this.logEnabled=!1)},d}(),H2={toString:function(c){for(var u="",r=c.length,s=0;s<r;s++)u+="["+c.start(s).toFixed(3)+"-"+c.end(s).toFixed(3)+"]";return u}},Re={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},K2=function(d){T(c,d);function c(r,s,o,f,h){var v;return v=d.call(this)||this,v.hls=void 0,v.fragPrevious=null,v.fragCurrent=null,v.fragmentTracker=void 0,v.transmuxer=null,v._state=Re.STOPPED,v.playlistType=void 0,v.media=null,v.mediaBuffer=null,v.config=void 0,v.bitrateTest=!1,v.lastCurrentTime=0,v.nextLoadPosition=0,v.startPosition=0,v.startTimeOffset=null,v.loadedmetadata=!1,v.retryDate=0,v.levels=null,v.fragmentLoader=void 0,v.keyLoader=void 0,v.levelLastLoaded=null,v.startFragRequested=!1,v.decrypter=void 0,v.initPTS=[],v.onvseeking=null,v.onvended=null,v.logPrefix="",v.log=void 0,v.warn=void 0,v.playlistType=h,v.logPrefix=f,v.log=B.log.bind(B,f+":"),v.warn=B.warn.bind(B,f+":"),v.hls=r,v.fragmentLoader=new L2(r.config),v.keyLoader=o,v.fragmentTracker=s,v.config=r.config,v.decrypter=new Zl(r.config),r.on(L.MANIFEST_LOADED,v.onManifestLoaded,ue(v)),v}var u=c.prototype;return u.doTick=function(){this.onTickEnd()},u.onTickEnd=function(){},u.startLoad=function(s){},u.stopLoad=function(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);var s=this.fragCurrent;s!=null&&s.loader&&(s.abortRequests(),this.fragmentTracker.removeFragment(s)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=Re.STOPPED},u._streamEnded=function(s,o){if(o.live||s.nextStart||!s.end||!this.media)return!1;var f=o.partList;if(f!=null&&f.length){var h=f[f.length-1],v=Oi.isBuffered(this.media,h.start+h.duration/2);return v}var m=o.fragments[o.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(m)},u.getLevelDetails=function(){if(this.levels&&this.levelLastLoaded!==null){var s;return(s=this.levels[this.levelLastLoaded])==null?void 0:s.details}},u.onMediaAttached=function(s,o){var f=this.media=this.mediaBuffer=o.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),f.addEventListener("seeking",this.onvseeking),f.addEventListener("ended",this.onvended);var h=this.config;this.levels&&h.autoStartLoad&&this.state===Re.STOPPED&&this.startLoad(h.startPosition)},u.onMediaDetaching=function(){var s=this.media;s!=null&&s.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),s&&this.onvseeking&&this.onvended&&(s.removeEventListener("seeking",this.onvseeking),s.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()},u.onMediaSeeking=function(){var s=this.config,o=this.fragCurrent,f=this.media,h=this.mediaBuffer,v=this.state,m=f?f.currentTime:0,y=Oi.bufferInfo(h||f,m,s.maxBufferHole);if(this.log("media seeking to "+(Z(m)?m.toFixed(3):m)+", state: "+v),this.state===Re.ENDED)this.resetLoadingState();else if(o){var b=s.maxFragLookUpTolerance,S=o.start-b,E=o.start+o.duration+b;if(!y.len||E<y.start||S>y.end){var A=m>E;(m<S||A)&&(A&&o.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),o.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}f&&(this.fragmentTracker.removeFragmentsInRange(m,1/0,this.playlistType,!0),this.lastCurrentTime=m),!this.loadedmetadata&&!y.len&&(this.nextLoadPosition=this.startPosition=m),this.tickImmediate()},u.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},u.onManifestLoaded=function(s,o){this.startTimeOffset=o.startTimeOffset,this.initPTS=[]},u.onHandlerDestroying=function(){this.stopLoad(),d.prototype.onHandlerDestroying.call(this)},u.onHandlerDestroyed=function(){this.state=Re.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,d.prototype.onHandlerDestroyed.call(this)},u.loadFragment=function(s,o,f){this._loadFragForPlayback(s,o,f)},u._loadFragForPlayback=function(s,o,f){var h=this,v=function(y){if(h.fragContextChanged(s)){h.warn("Fragment "+s.sn+(y.part?" p: "+y.part.index:"")+" of level "+s.level+" was dropped during download."),h.fragmentTracker.removeFragment(s);return}s.stats.chunkCount++,h._handleFragmentLoadProgress(y)};this._doFragLoad(s,o,f,v).then(function(m){if(m){var y=h.state;if(h.fragContextChanged(s)){(y===Re.FRAG_LOADING||!h.fragCurrent&&y===Re.PARSING)&&(h.fragmentTracker.removeFragment(s),h.state=Re.IDLE);return}"payload"in m&&(h.log("Loaded fragment "+s.sn+" of level "+s.level),h.hls.trigger(L.FRAG_LOADED,m)),h._handleFragmentLoadComplete(m)}}).catch(function(m){h.state===Re.STOPPED||h.state===Re.ERROR||(h.warn(m),h.resetFragmentLoading(s))})},u.clearTrackerIfNeeded=function(s){var o,f=this.fragmentTracker,h=f.getState(s);if(h===fr.APPENDING){var v=s.type,m=this.getFwdBufferInfo(this.mediaBuffer,v),y=Math.max(s.duration,m?m.len:this.config.maxBufferLength);this.reduceMaxBufferLength(y)&&f.removeFragment(s)}else((o=this.mediaBuffer)==null?void 0:o.buffered.length)===0?f.removeAllFragments():f.hasParts(s.type)&&(f.detectPartialFragments({frag:s,part:null,stats:s.stats,id:s.type}),f.getState(s)===fr.PARTIAL&&f.removeFragment(s))},u.flushMainBuffer=function(s,o,f){if(f===void 0&&(f=null),!!(s-o)){var h={startOffset:s,endOffset:o,type:f};this.hls.trigger(L.BUFFER_FLUSHING,h)}},u._loadInitSegment=function(s,o){var f=this;this._doFragLoad(s,o).then(function(h){if(!h||f.fragContextChanged(s)||!f.levels)throw new Error("init load aborted");return h}).then(function(h){var v=f.hls,m=h.payload,y=s.decryptdata;if(m&&m.byteLength>0&&y&&y.key&&y.iv&&y.method==="AES-128"){var b=self.performance.now();return f.decrypter.decrypt(new Uint8Array(m),y.key.buffer,y.iv.buffer).catch(function(S){throw v.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_DECRYPT_ERROR,fatal:!1,error:S,reason:S.message,frag:s}),S}).then(function(S){var E=self.performance.now();return v.trigger(L.FRAG_DECRYPTED,{frag:s,payload:S,stats:{tstart:b,tdecrypt:E}}),h.payload=S,h})}return h}).then(function(h){var v=f.fragCurrent,m=f.hls,y=f.levels;if(!y)throw new Error("init load aborted, missing levels");var b=s.stats;f.state=Re.IDLE,o.fragmentError=0,s.data=new Uint8Array(h.payload),b.parsing.start=b.buffering.start=self.performance.now(),b.parsing.end=b.buffering.end=self.performance.now(),h.frag===v&&m.trigger(L.FRAG_BUFFERED,{stats:b,frag:v,part:null,id:s.type}),f.tick()}).catch(function(h){f.state===Re.STOPPED||f.state===Re.ERROR||(f.warn(h),f.resetFragmentLoading(s))})},u.fragContextChanged=function(s){var o=this.fragCurrent;return!s||!o||s.level!==o.level||s.sn!==o.sn||s.urlId!==o.urlId},u.fragBufferedComplete=function(s,o){var f,h,v,m,y=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+s.type+" sn: "+s.sn+(o?" part: "+o.index:"")+" of "+(this.playlistType===st.MAIN?"level":"track")+" "+s.level+" (frag:["+((f=s.startPTS)!=null?f:NaN).toFixed(3)+"-"+((h=s.endPTS)!=null?h:NaN).toFixed(3)+"] > buffer:"+(y?H2.toString(Oi.getBuffered(y)):"(detached)")+")"),this.state=Re.IDLE,y&&(!this.loadedmetadata&&s.type==st.MAIN&&y.buffered.length&&((v=this.fragCurrent)==null?void 0:v.sn)===((m=this.fragPrevious)==null?void 0:m.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())},u.seekToStartPos=function(){},u._handleFragmentLoadComplete=function(s){var o=this.transmuxer;if(o){var f=s.frag,h=s.part,v=s.partsLoaded,m=!v||v.length===0||v.some(function(b){return!b}),y=new Pf(f.level,f.sn,f.stats.chunkCount+1,0,h?h.index:-1,!m);o.flush(y)}},u._handleFragmentLoadProgress=function(s){},u._doFragLoad=function(s,o,f,h){var v,m=this;f===void 0&&(f=null);var y=o==null?void 0:o.details;if(!this.levels||!y)throw new Error("frag load aborted, missing level"+(y?"":" detail")+"s");var b=null;if(s.encrypted&&!((v=s.decryptdata)!=null&&v.key)?(this.log("Loading key for "+s.sn+" of ["+y.startSN+"-"+y.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+s.level),this.state=Re.KEY_LOADING,this.fragCurrent=s,b=this.keyLoader.load(s).then(function(M){if(!m.fragContextChanged(M.frag))return m.hls.trigger(L.KEY_LOADED,M),m.state===Re.KEY_LOADING&&(m.state=Re.IDLE),M}),this.hls.trigger(L.KEY_LOADING,{frag:s}),this.fragCurrent===null&&(b=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!s.encrypted&&y.encryptedFragments.length&&this.keyLoader.loadClear(s,y.encryptedFragments),f=Math.max(s.start,f||0),this.config.lowLatencyMode&&s.sn!=="initSegment"){var S=y.partList;if(S&&h){f>s.end&&y.fragmentHint&&(s=y.fragmentHint);var E=this.getNextPart(S,s,f);if(E>-1){var A=S[E];this.log("Loading part sn: "+s.sn+" p: "+A.index+" cc: "+s.cc+" of playlist ["+y.startSN+"-"+y.endSN+"] parts [0-"+E+"-"+(S.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+s.level+", target: "+parseFloat(f.toFixed(3))),this.nextLoadPosition=A.start+A.duration,this.state=Re.FRAG_LOADING;var x;return b?x=b.then(function(M){return!M||m.fragContextChanged(M.frag)?null:m.doFragPartsLoad(s,A,o,h)}).catch(function(M){return m.handleFragLoadError(M)}):x=this.doFragPartsLoad(s,A,o,h).catch(function(M){return m.handleFragLoadError(M)}),this.hls.trigger(L.FRAG_LOADING,{frag:s,part:A,targetBufferTime:f}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):x}else if(!s.url||this.loadedEndOfParts(S,f))return Promise.resolve(null)}}this.log("Loading fragment "+s.sn+" cc: "+s.cc+" "+(y?"of ["+y.startSN+"-"+y.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+s.level+", target: "+parseFloat(f.toFixed(3))),Z(s.sn)&&!this.bitrateTest&&(this.nextLoadPosition=s.start+s.duration),this.state=Re.FRAG_LOADING;var P=this.config.progressive,O;return P&&b?O=b.then(function(M){return!M||m.fragContextChanged(M==null?void 0:M.frag)?null:m.fragmentLoader.load(s,h)}).catch(function(M){return m.handleFragLoadError(M)}):O=Promise.all([this.fragmentLoader.load(s,P?h:void 0),b]).then(function(M){var D=M[0];return!P&&D&&h&&h(D),D}).catch(function(M){return m.handleFragLoadError(M)}),this.hls.trigger(L.FRAG_LOADING,{frag:s,targetBufferTime:f}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):O},u.doFragPartsLoad=function(s,o,f,h){var v=this;return new Promise(function(m,y){var b,S=[],E=(b=f.details)==null?void 0:b.partList,A=function x(P){v.fragmentLoader.loadPart(s,P,h).then(function(O){S[P.index]=O;var M=O.part;v.hls.trigger(L.FRAG_LOADED,O);var D=Gt(f,s.sn,P.index+1)||ai(E,s.sn,P.index+1);if(D)x(D);else return m({frag:s,part:M,partsLoaded:S})}).catch(y)};A(o)})},u.handleFragLoadError=function(s){if("data"in s){var o=s.data;s.data&&o.details===z.INTERNAL_ABORTED?this.handleFragLoadAborted(o.frag,o.part):this.hls.trigger(L.ERROR,o)}else this.hls.trigger(L.ERROR,{type:le.OTHER_ERROR,details:z.INTERNAL_EXCEPTION,err:s,error:s,fatal:!0});return null},u._handleTransmuxerFlush=function(s){var o=this.getCurrentContext(s);if(!o||this.state!==Re.PARSING){!this.fragCurrent&&this.state!==Re.STOPPED&&this.state!==Re.ERROR&&(this.state=Re.IDLE);return}var f=o.frag,h=o.part,v=o.level,m=self.performance.now();f.stats.parsing.end=m,h&&(h.stats.parsing.end=m),this.updateLevelTiming(f,h,v,s.partial)},u.getCurrentContext=function(s){var o=this.levels,f=this.fragCurrent,h=s.level,v=s.sn,m=s.part;if(!(o!=null&&o[h]))return this.warn("Levels object was unset while buffering fragment "+v+" of level "+h+". The current chunk will not be buffered."),null;var y=o[h],b=m>-1?Gt(y,v,m):null,S=b?b.fragment:We(y,v,f);return S?(f&&f!==S&&(S.stats=f.stats),{frag:S,part:b,level:y}):null},u.bufferFragmentData=function(s,o,f,h){var v;if(!(!s||this.state!==Re.PARSING)){var m=s.data1,y=s.data2,b=m;if(m&&y&&(b=Y(m,y)),!!((v=b)!=null&&v.length)){var S={type:s.type,frag:o,part:f,chunkMeta:h,parent:o.type,data:b};this.hls.trigger(L.BUFFER_APPENDING,S),s.dropped&&s.independent&&!f&&this.flushBufferGap(o)}}},u.flushBufferGap=function(s){var o=this.media;if(o){if(!Oi.isBuffered(o,o.currentTime)){this.flushMainBuffer(0,s.start);return}var f=o.currentTime,h=Oi.bufferInfo(o,f,0),v=s.duration,m=Math.min(this.config.maxFragLookUpTolerance*2,v*.25),y=Math.max(Math.min(s.start-m,h.end-m),f+m);s.start-y>m&&this.flushMainBuffer(y,s.start)}},u.getFwdBufferInfo=function(s,o){var f=this.getLoadPosition();return Z(f)?this.getFwdBufferInfoAtPos(s,f,o):null},u.getFwdBufferInfoAtPos=function(s,o,f){var h=this.config.maxBufferHole,v=Oi.bufferInfo(s,o,h);if(v.len===0&&v.nextStart!==void 0){var m=this.fragmentTracker.getBufferedFrag(o,f);if(m&&v.nextStart<m.end)return Oi.bufferInfo(s,o,Math.max(v.nextStart,h))}return v},u.getMaxBufferLength=function(s){var o=this.config,f;return s?f=Math.max(8*o.maxBufferSize/s,o.maxBufferLength):f=o.maxBufferLength,Math.min(f,o.maxMaxBufferLength)},u.reduceMaxBufferLength=function(s){var o=this.config,f=s||o.maxBufferLength;return o.maxMaxBufferLength>=f?(o.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+o.maxMaxBufferLength+"s"),!0):!1},u.getAppendedFrag=function(s,o){var f=this.fragmentTracker.getAppendedFrag(s,st.MAIN);return f&&"fragment"in f?f.fragment:f},u.getNextFragment=function(s,o){var f=o.fragments,h=f.length;if(!h)return null;var v=this.config,m=f[0].start,y;if(o.live){var b=v.initialLiveManifestSize;if(h<b)return this.warn("Not enough fragments to start playback (have: "+h+", need: "+b+")"),null;!o.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(y=this.getInitialLiveFragment(o,f),this.startPosition=y?this.hls.liveSyncPosition||y.start:s)}else s<=m&&(y=f[0]);if(!y){var S=v.lowLatencyMode?o.partEnd:o.fragmentEnd;y=this.getFragmentAtPosition(s,S,o)}return this.mapToInitFragWhenRequired(y)},u.isLoopLoading=function(s,o){var f=this.fragmentTracker.getState(s);return(f===fr.OK||f===fr.PARTIAL&&!!s.gap)&&this.nextLoadPosition>o},u.getNextFragmentLoopLoading=function(s,o,f,h,v){var m=s.gap,y=this.getNextFragment(this.nextLoadPosition,o);if(y===null)return y;if(s=y,m&&s&&!s.gap&&f.nextStart){var b=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,f.nextStart,h);if(b!==null&&f.len+b.len>=v)return this.log('buffer full after gaps in "'+h+'" playlist starting at sn: '+s.sn),null}return s},u.mapToInitFragWhenRequired=function(s){return s!=null&&s.initSegment&&!(s!=null&&s.initSegment.data)&&!this.bitrateTest?s.initSegment:s},u.getNextPart=function(s,o,f){for(var h=-1,v=!1,m=!0,y=0,b=s.length;y<b;y++){var S=s[y];if(m=m&&!S.independent,h>-1&&f<S.start)break;var E=S.loaded;E?h=-1:(v||S.independent||m)&&S.fragment===o&&(h=y),v=E}return h},u.loadedEndOfParts=function(s,o){var f=s[s.length-1];return f&&o>f.start&&f.loaded},u.getInitialLiveFragment=function(s,o){var f=this.fragPrevious,h=null;if(f){if(s.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+f.programDateTime),h=S2(o,f.endProgramDateTime,this.config.maxFragLookUpTolerance)),!h){var v=f.sn+1;if(v>=s.startSN&&v<=s.endSN){var m=o[v-s.startSN];f.cc===m.cc&&(h=m,this.log("Live playlist, switching playlist, load frag with next SN: "+h.sn))}h||(h=T2(o,f.cc),h&&this.log("Live playlist, switching playlist, load frag with same CC: "+h.sn))}}else{var y=this.hls.liveSyncPosition;y!==null&&(h=this.getFragmentAtPosition(y,this.bitrateTest?s.fragmentEnd:s.edge,s))}return h},u.getFragmentAtPosition=function(s,o,f){var h=this.config,v=this.fragPrevious,m=f.fragments,y=f.endSN,b=f.fragmentHint,S=h.maxFragLookUpTolerance,E=f.partList,A=!!(h.lowLatencyMode&&E!=null&&E.length&&b);A&&b&&!this.bitrateTest&&(m=m.concat(b),y=b.sn);var x;if(s<o){var P=s>o-S?0:S;x=ql(v,m,s,P)}else x=m[m.length-1];if(x){var O=x.sn-f.startSN,M=this.fragmentTracker.getState(x);if((M===fr.OK||M===fr.PARTIAL&&x.gap)&&(v=x),v&&x.sn===v.sn&&(!A||E[0].fragment.sn>x.sn)){var D=v&&x.level===v.level;if(D){var j=m[O+1];x.sn<y&&this.fragmentTracker.getState(j)!==fr.OK?x=j:x=null}}}return x},u.synchronizeToLiveEdge=function(s){var o=this.config,f=this.media;if(f){var h=this.hls.liveSyncPosition,v=f.currentTime,m=s.fragments[0].start,y=s.edge,b=v>=m-o.maxFragLookUpTolerance&&v<=y;if(h!==null&&f.duration>h&&(v<h||!b)){var S=o.liveMaxLatencyDuration!==void 0?o.liveMaxLatencyDuration:o.liveMaxLatencyDurationCount*s.targetduration;(!b&&f.readyState<4||v<y-S)&&(this.loadedmetadata||(this.nextLoadPosition=h),f.readyState&&(this.warn("Playback: "+v.toFixed(3)+" is located too far from the end of live sliding playlist: "+y+", reset currentTime to : "+h.toFixed(3)),f.currentTime=h))}}},u.alignPlaylists=function(s,o){var f=this.levels,h=this.levelLastLoaded,v=this.fragPrevious,m=h!==null?f[h]:null,y=s.fragments.length;if(!y)return this.warn("No fragments in live playlist"),0;var b=s.fragments[0].start,S=!o,E=s.alignedSliding&&Z(b);if(S||!E&&!b){N2(v,m,s);var A=s.fragments[0].start;return this.log("Live playlist sliding: "+A.toFixed(2)+" start-sn: "+(o?o.startSN:"na")+"->"+s.startSN+" prev-sn: "+(v?v.sn:"na")+" fragments: "+y),A}return b},u.waitForCdnTuneIn=function(s){var o=3;return s.live&&s.canBlockReload&&s.partTarget&&s.tuneInGoal>Math.max(s.partHoldBack,s.partTarget*o)},u.setStartPosition=function(s,o){var f=this.startPosition;if(f<o&&(f=-1),f===-1||this.lastCurrentTime===-1){var h=this.startTimeOffset!==null,v=h?this.startTimeOffset:s.startTimeOffset;v!==null&&Z(v)?(f=o+v,v<0&&(f+=s.totalduration),f=Math.min(Math.max(o,f),o+s.totalduration),this.log("Start time offset "+v+" found in "+(h?"multivariant":"media")+" playlist, adjust startPosition to "+f),this.startPosition=f):s.live?f=this.hls.liveSyncPosition||o:this.startPosition=f=0,this.lastCurrentTime=f}this.nextLoadPosition=f},u.getLoadPosition=function(){var s=this.media,o=0;return this.loadedmetadata&&s?o=s.currentTime:this.nextLoadPosition&&(o=this.nextLoadPosition),o},u.handleFragLoadAborted=function(s,o){this.transmuxer&&s.sn!=="initSegment"&&s.stats.aborted&&(this.warn("Fragment "+s.sn+(o?" part "+o.index:"")+" of level "+s.level+" was aborted"),this.resetFragmentLoading(s))},u.resetFragmentLoading=function(s){(!this.fragCurrent||!this.fragContextChanged(s)&&this.state!==Re.FRAG_LOADING_WAITING_RETRY)&&(this.state=Re.IDLE)},u.onFragmentOrKeyLoadError=function(s,o){if(o.chunkMeta&&!o.frag){var f=this.getCurrentContext(o.chunkMeta);f&&(o.frag=f.frag)}var h=o.frag;if(!(!h||h.type!==s||!this.levels)){if(this.fragContextChanged(h)){var v;this.warn("Frag load error must match current frag to retry "+h.url+" > "+((v=this.fragCurrent)==null?void 0:v.url));return}var m=o.details===z.FRAG_GAP;m&&this.fragmentTracker.fragBuffered(h,!0);var y=o.errorAction,b=y||{},S=b.action,E=b.retryCount,A=E===void 0?0:E,x=b.retryConfig;if(y&&S===dr.RetryRequest&&x){var P;this.resetStartWhenNotLoaded((P=this.levelLastLoaded)!=null?P:h.level);var O=Yl(x,A);this.warn("Fragment "+h.sn+" of "+s+" "+h.level+" errored with "+o.details+", retrying loading "+(A+1)+"/"+x.maxNumRetry+" in "+O+"ms"),y.resolved=!0,this.retryDate=self.performance.now()+O,this.state=Re.FRAG_LOADING_WAITING_RETRY}else x&&y?(this.resetFragmentErrors(s),A<x.maxNumRetry?m||(y.resolved=!0):B.warn(o.details+" reached or exceeded max retry ("+A+")")):(y==null?void 0:y.action)===dr.SendAlternateToPenaltyBox?this.state=Re.WAITING_LEVEL:this.state=Re.ERROR;this.tickImmediate()}},u.reduceLengthAndFlushBuffer=function(s){if(this.state===Re.PARSING||this.state===Re.PARSED){var o=s.parent,f=this.getFwdBufferInfo(this.mediaBuffer,o),h=f&&f.len>.5;h&&this.reduceMaxBufferLength(f.len);var v=!h;return v&&this.warn("Buffer full error while media.currentTime is not buffered, flush "+o+" buffer"),s.frag&&(this.fragmentTracker.removeFragment(s.frag),this.nextLoadPosition=s.frag.start),this.resetLoadingState(),v}return!1},u.resetFragmentErrors=function(s){s===st.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==Re.STOPPED&&(this.state=Re.IDLE)},u.afterBufferFlushed=function(s,o,f){if(s){var h=Oi.getBuffered(s);this.fragmentTracker.detectEvictedFragments(o,h,f),this.state===Re.ENDED&&this.resetLoadingState()}},u.resetLoadingState=function(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=Re.IDLE},u.resetStartWhenNotLoaded=function(s){if(!this.loadedmetadata){this.startFragRequested=!1;var o=this.levels?this.levels[s].details:null;o!=null&&o.live?(this.startPosition=-1,this.setStartPosition(o,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}},u.resetWhenMissingContext=function(s){var o;this.warn("The loading context changed while buffering fragment "+s.sn+" of level "+s.level+". This chunk will not be buffered."),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded((o=this.levelLastLoaded)!=null?o:s.level),this.resetLoadingState()},u.removeUnbufferedFrags=function(s){s===void 0&&(s=0),this.fragmentTracker.removeFragmentsInRange(s,1/0,this.playlistType,!1,!0)},u.updateLevelTiming=function(s,o,f,h){var v=this,m,y=f.details;if(!y){this.warn("level.details undefined");return}var b=Object.keys(s.elementaryStreams).reduce(function(E,A){var x=s.elementaryStreams[A];if(x){var P=x.endPTS-x.startPTS;if(P<=0)return v.warn("Could not parse fragment "+s.sn+" "+A+" duration reliably ("+P+")"),E||!1;var O=h?0:Fr(y,s,x.startPTS,x.endPTS,x.startDTS,x.endDTS);return v.hls.trigger(L.LEVEL_PTS_UPDATED,{details:y,level:f,drift:O,type:A,frag:s,start:x.startPTS,end:x.endPTS}),!0}return E},!1);if(b)f.fragmentError=0;else if(((m=this.transmuxer)==null?void 0:m.error)===null){var S=new Error("Found no media in fragment "+s.sn+" of level "+f.id+" resetting transmuxer to fallback to playlist timing");if(this.warn(S.message),this.hls.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,error:S,frag:s,reason:"Found no media in msn "+s.sn+' of level "'+f.url+'"'}),!this.hls)return;this.resetTransmuxer()}this.state=Re.PARSED,this.hls.trigger(L.FRAG_PARSED,{frag:s,part:o})},u.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},u.recoverWorkerError=function(s){if(s.event==="demuxerWorker"){var o,f,h;this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded((o=(f=this.levelLastLoaded)!=null?f:(h=this.fragCurrent)==null?void 0:h.level)!=null?o:0),this.resetLoadingState()}},p(c,[{key:"state",get:function(){return this._state},set:function(s){var o=this._state;o!==s&&(this._state=s,this.log(o+"->"+s))}}]),c}(R2);function If(){return self.SourceBuffer||self.WebKitSourceBuffer}function Y2(){var d=Qi();if(!d)return!1;var c=If(),u=d&&typeof d.isTypeSupported=="function"&&d.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!c||c.prototype&&typeof c.prototype.appendBuffer=="function"&&typeof c.prototype.remove=="function";return!!u&&!!r}function q2(){var d,c=If();return typeof(c==null||(d=c.prototype)==null?void 0:d.changeType)=="function"}function nn(d,c){return d===void 0&&(d=""),c===void 0&&(c=9e4),{type:d,id:-1,pid:-1,inputTimeScale:c,sequenceNumber:-1,samples:[],dropped:0}}var Rf=function(){function d(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}var c=d.prototype;return c.resetInitSegment=function(r,s,o,f){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},c.resetTimeStamp=function(r){this.initPTS=r,this.resetContiguity()},c.resetContiguity=function(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0},c.canParse=function(r,s){return!1},c.appendFrame=function(r,s,o){},c.demux=function(r,s){this.cachedData&&(r=Y(this.cachedData,r),this.cachedData=null);var o=mt(r,0),f=o?o.length:0,h,v=this._audioTrack,m=this._id3Track,y=o?Rt(o):void 0,b=r.length;for((this.basePTS===null||this.frameIndex===0&&Z(y))&&(this.basePTS=X2(y,s,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),o&&o.length>0&&m.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:o,type:Ai.audioId3,duration:Number.POSITIVE_INFINITY});f<b;){if(this.canParse(r,f)){var S=this.appendFrame(v,r,f);S?(this.frameIndex++,this.lastPTS=S.sample.pts,f+=S.length,h=f):f=b}else Zt(r,f)?(o=mt(r,f),m.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:o,type:Ai.audioId3,duration:Number.POSITIVE_INFINITY}),f+=o.length,h=f):f++;if(f===b&&h!==b){var E=yt(r,h);this.cachedData?this.cachedData=Y(this.cachedData,E):this.cachedData=E}}return{audioTrack:v,videoTrack:nn(),id3Track:m,textTrack:nn()}},c.demuxSampleAes=function(r,s,o){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},c.flush=function(r){var s=this.cachedData;return s&&(this.cachedData=null,this.demux(s,0)),{audioTrack:this._audioTrack,videoTrack:nn(),id3Track:this._id3Track,textTrack:nn()}},c.destroy=function(){},d}(),X2=function(c,u,r){if(Z(c))return c*90;var s=r?r.baseTime*9e4/r.timescale:0;return u*9e4+s};function Z2(d,c,u,r){var s,o,f,h,v=navigator.userAgent.toLowerCase(),m=r,y=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=((c[u+2]&192)>>>6)+1;var b=(c[u+2]&60)>>>2;if(b>y.length-1){d.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+b});return}return f=(c[u+2]&1)<<2,f|=(c[u+3]&192)>>>6,B.log("manifest codec:"+r+", ADTS type:"+s+", samplingIndex:"+b),/firefox/i.test(v)?b>=6?(s=5,h=new Array(4),o=b-3):(s=2,h=new Array(2),o=b):v.indexOf("android")!==-1?(s=2,h=new Array(2),o=b):(s=5,h=new Array(4),r&&(r.indexOf("mp4a.40.29")!==-1||r.indexOf("mp4a.40.5")!==-1)||!r&&b>=6?o=b-3:((r&&r.indexOf("mp4a.40.2")!==-1&&(b>=6&&f===1||/vivaldi/i.test(v))||!r&&f===1)&&(s=2,h=new Array(2)),o=b)),h[0]=s<<3,h[0]|=(b&14)>>1,h[1]|=(b&1)<<7,h[1]|=f<<3,s===5&&(h[1]|=(o&14)>>1,h[2]=(o&1)<<7,h[2]|=8,h[3]=0),{config:h,samplerate:y[b],channelCount:f,codec:"mp4a.40."+s,manifestCodec:m}}function Df(d,c){return d[c]===255&&(d[c+1]&246)===240}function Of(d,c){return d[c+1]&1?7:9}function Jl(d,c){return(d[c+3]&3)<<11|d[c+4]<<3|(d[c+5]&224)>>>5}function J2(d,c){return c+5<d.length}function Fo(d,c){return c+1<d.length&&Df(d,c)}function Q2(d,c){return J2(d,c)&&Df(d,c)&&Jl(d,c)<=d.length-c}function $2(d,c){if(Fo(d,c)){var u=Of(d,c);if(c+u>=d.length)return!1;var r=Jl(d,c);if(r<=u)return!1;var s=c+r;return s===d.length||Fo(d,s)}return!1}function Bf(d,c,u,r,s){if(!d.samplerate){var o=Z2(c,u,r,s);if(!o)return;d.config=o.config,d.samplerate=o.samplerate,d.channelCount=o.channelCount,d.codec=o.codec,d.manifestCodec=o.manifestCodec,B.log("parsed codec:"+d.codec+", rate:"+o.samplerate+", channels:"+o.channelCount)}}function Mf(d){return 1024*9e4/d}function e3(d,c){var u=Of(d,c);if(c+u<=d.length){var r=Jl(d,c)-u;if(r>0)return{headerLength:u,frameLength:r}}}function Nf(d,c,u,r,s){var o=Mf(d.samplerate),f=r+s*o,h=e3(c,u),v;if(h){var m=h.frameLength,y=h.headerLength,b=y+m,S=Math.max(0,u+b-c.length);S?(v=new Uint8Array(b-y),v.set(c.subarray(u+y,c.length),0)):v=c.subarray(u+y,u+b);var E={unit:v,pts:f};return S||d.samples.push(E),{sample:E,length:b,missing:S}}var A=c.length-u;v=new Uint8Array(A),v.set(c.subarray(u,c.length),0);var x={unit:v,pts:f};return{sample:x,length:A,missing:-1}}var t3=function(d){T(c,d);function c(r,s){var o;return o=d.call(this)||this,o.observer=void 0,o.config=void 0,o.observer=r,o.config=s,o}var u=c.prototype;return u.resetInitSegment=function(s,o,f,h){d.prototype.resetInitSegment.call(this,s,o,f,h),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:o,duration:h,inputTimeScale:9e4,dropped:0}},c.probe=function(s){if(!s)return!1;for(var o=mt(s,0)||[],f=o.length,h=s.length;f<h;f++)if($2(s,f))return B.log("ADTS sync word found !"),!0;return!1},u.canParse=function(s,o){return Q2(s,o)},u.appendFrame=function(s,o,f){Bf(s,this.observer,o,f,s.manifestCodec);var h=Nf(s,o,f,this.basePTS,this.frameIndex);if(h&&h.missing===0)return h},c}(Rf),i3=/\/emsg[-/]ID3/i,r3=function(){function d(u,r){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=r}var c=d.prototype;return c.resetTimeStamp=function(){},c.resetInitSegment=function(r,s,o,f){var h=this.videoTrack=nn("video",1),v=this.audioTrack=nn("audio",1),m=this.txtTrack=nn("text",1);if(this.id3Track=nn("id3",1),this.timeOffset=0,!!(r!=null&&r.byteLength)){var y=me(r);if(y.video){var b=y.video,S=b.id,E=b.timescale,A=b.codec;h.id=S,h.timescale=m.timescale=E,h.codec=A}if(y.audio){var x=y.audio,P=x.id,O=x.timescale,M=x.codec;v.id=P,v.timescale=O,v.codec=M}m.id=Vt.text,h.sampleDuration=0,h.duration=v.duration=f}},c.resetContiguity=function(){this.remainderData=null},d.probe=function(r){return r=r.length>16384?r.subarray(0,16384):r,Je(r,["moof"]).length>0},c.demux=function(r,s){this.timeOffset=s;var o=r,f=this.videoTrack,h=this.txtTrack;if(this.config.progressive){this.remainderData&&(o=Y(this.remainderData,r));var v=Fe(o);this.remainderData=v.remainder,f.samples=v.valid||new Uint8Array}else f.samples=o;var m=this.extractID3Track(f,s);return h.samples=$(s,f),{videoTrack:f,audioTrack:this.audioTrack,id3Track:m,textTrack:this.txtTrack}},c.flush=function(){var r=this.timeOffset,s=this.videoTrack,o=this.txtTrack;s.samples=this.remainderData||new Uint8Array,this.remainderData=null;var f=this.extractID3Track(s,this.timeOffset);return o.samples=$(r,s),{videoTrack:s,audioTrack:nn(),id3Track:f,textTrack:nn()}},c.extractID3Track=function(r,s){var o=this.id3Track;if(r.samples.length){var f=Je(r.samples,["emsg"]);f&&f.forEach(function(h){var v=si(h);if(i3.test(v.schemeIdUri)){var m=Z(v.presentationTime)?v.presentationTime/v.timeScale:s+v.presentationTimeDelta/v.timeScale,y=v.eventDuration===4294967295?Number.POSITIVE_INFINITY:v.eventDuration/v.timeScale;y<=.001&&(y=Number.POSITIVE_INFINITY);var b=v.payload;o.samples.push({data:b,len:b.byteLength,dts:m,pts:m,type:Ai.emsg,duration:y})}})}return o},c.demuxSampleAes=function(r,s,o){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},c.destroy=function(){},d}(),Uo=null,n3=[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],s3=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],a3=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],o3=[0,1,1,4];function Ff(d,c,u,r,s){if(!(u+24>c.length)){var o=Uf(c,u);if(o&&u+o.frameLength<=c.length){var f=o.samplesPerFrame*9e4/o.sampleRate,h=r+s*f,v={unit:c.subarray(u,u+o.frameLength),pts:h,dts:h};return d.config=[],d.channelCount=o.channelCount,d.samplerate=o.sampleRate,d.samples.push(v),{sample:v,length:o.frameLength,missing:0}}}}function Uf(d,c){var u=d[c+1]>>3&3,r=d[c+1]>>1&3,s=d[c+2]>>4&15,o=d[c+2]>>2&3;if(u!==1&&s!==0&&s!==15&&o!==3){var f=d[c+2]>>1&1,h=d[c+3]>>6,v=u===3?3-r:r===3?3:4,m=n3[v*14+s-1]*1e3,y=u===3?0:u===2?1:2,b=s3[y*3+o],S=h===3?1:2,E=a3[u][r],A=o3[r],x=E*8*A,P=Math.floor(E*m/b+f)*A;if(Uo===null){var O=navigator.userAgent||"",M=O.match(/Chrome\/(\d+)/i);Uo=M?parseInt(M[1]):0}var D=!!Uo&&Uo<=87;return D&&r===2&&m>=224e3&&h===0&&(d[c+3]=d[c+3]|128),{sampleRate:b,channelCount:S,frameLength:P,samplesPerFrame:x}}}function Ql(d,c){return d[c]===255&&(d[c+1]&224)===224&&(d[c+1]&6)!==0}function Vf(d,c){return c+1<d.length&&Ql(d,c)}function l3(d,c){var u=4;return Ql(d,c)&&u<=d.length-c}function u3(d,c){if(c+1<d.length&&Ql(d,c)){var u=4,r=Uf(d,c),s=u;r!=null&&r.frameLength&&(s=r.frameLength);var o=c+s;return o===d.length||Vf(d,o)}return!1}var Wf=function(){function d(u){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=u,this.bytesAvailable=u.byteLength,this.word=0,this.bitsAvailable=0}var c=d.prototype;return c.loadWord=function(){var r=this.data,s=this.bytesAvailable,o=r.byteLength-s,f=new Uint8Array(4),h=Math.min(4,s);if(h===0)throw new Error("no bytes available");f.set(r.subarray(o,o+h)),this.word=new DataView(f.buffer).getUint32(0),this.bitsAvailable=h*8,this.bytesAvailable-=h},c.skipBits=function(r){var s;r=Math.min(r,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>r?(this.word<<=r,this.bitsAvailable-=r):(r-=this.bitsAvailable,s=r>>3,r-=s<<3,this.bytesAvailable-=s,this.loadWord(),this.word<<=r,this.bitsAvailable-=r)},c.readBits=function(r){var s=Math.min(this.bitsAvailable,r),o=this.word>>>32-s;if(r>32&&B.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=s,this.bitsAvailable>0)this.word<<=s;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return s=r-s,s>0&&this.bitsAvailable?o<<s|this.readBits(s):o},c.skipLZ=function(){var r;for(r=0;r<this.bitsAvailable;++r)if(this.word&2147483648>>>r)return this.word<<=r,this.bitsAvailable-=r,r;return this.loadWord(),r+this.skipLZ()},c.skipUEG=function(){this.skipBits(1+this.skipLZ())},c.skipEG=function(){this.skipBits(1+this.skipLZ())},c.readUEG=function(){var r=this.skipLZ();return this.readBits(r+1)-1},c.readEG=function(){var r=this.readUEG();return 1&r?1+r>>>1:-1*(r>>>1)},c.readBoolean=function(){return this.readBits(1)===1},c.readUByte=function(){return this.readBits(8)},c.readUShort=function(){return this.readBits(16)},c.readUInt=function(){return this.readBits(32)},c.skipScalingList=function(r){for(var s=8,o=8,f,h=0;h<r;h++)o!==0&&(f=this.readEG(),o=(s+f+256)%256),s=o===0?s:o},c.readSPS=function(){var r=0,s=0,o=0,f=0,h,v,m,y=this.readUByte.bind(this),b=this.readBits.bind(this),S=this.readUEG.bind(this),E=this.readBoolean.bind(this),A=this.skipBits.bind(this),x=this.skipEG.bind(this),P=this.skipUEG.bind(this),O=this.skipScalingList.bind(this);y();var M=y();if(b(5),A(3),y(),P(),M===100||M===110||M===122||M===244||M===44||M===83||M===86||M===118||M===128){var D=S();if(D===3&&A(1),P(),P(),A(1),E())for(v=D!==3?8:12,m=0;m<v;m++)E()&&(m<6?O(16):O(64))}P();var j=S();if(j===0)S();else if(j===1)for(A(1),x(),x(),h=S(),m=0;m<h;m++)x();P(),A(1);var K=S(),he=S(),re=b(1);re===0&&A(1),A(1),E()&&(r=S(),s=S(),o=S(),f=S());var ne=[1,1];if(E()&&E()){var xe=y();switch(xe){case 1:ne=[1,1];break;case 2:ne=[12,11];break;case 3:ne=[10,11];break;case 4:ne=[16,11];break;case 5:ne=[40,33];break;case 6:ne=[24,11];break;case 7:ne=[20,11];break;case 8:ne=[32,11];break;case 9:ne=[80,33];break;case 10:ne=[18,11];break;case 11:ne=[15,11];break;case 12:ne=[64,33];break;case 13:ne=[160,99];break;case 14:ne=[4,3];break;case 15:ne=[3,2];break;case 16:ne=[2,1];break;case 255:{ne=[y()<<8|y(),y()<<8|y()];break}}}return{width:Math.ceil((K+1)*16-r*2-s*2),height:(2-re)*(he+1)*16-(re?2:4)*(o+f),pixelRatio:ne}},c.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},d}(),c3=function(){function d(u,r,s){this.keyData=void 0,this.decrypter=void 0,this.keyData=s,this.decrypter=new Zl(r,{removePKCS7Padding:!1})}var c=d.prototype;return c.decryptBuffer=function(r){return this.decrypter.decrypt(r,this.keyData.key.buffer,this.keyData.iv.buffer)},c.decryptAacSample=function(r,s,o){var f=this,h=r[s].unit;if(!(h.length<=16)){var v=h.subarray(16,h.length-h.length%16),m=v.buffer.slice(v.byteOffset,v.byteOffset+v.length);this.decryptBuffer(m).then(function(y){var b=new Uint8Array(y);h.set(b,16),f.decrypter.isSync()||f.decryptAacSamples(r,s+1,o)})}},c.decryptAacSamples=function(r,s,o){for(;;s++){if(s>=r.length){o();return}if(!(r[s].unit.length<32)&&(this.decryptAacSample(r,s,o),!this.decrypter.isSync()))return}},c.getAvcEncryptedData=function(r){for(var s=Math.floor((r.length-48)/160)*16+16,o=new Int8Array(s),f=0,h=32;h<r.length-16;h+=160,f+=16)o.set(r.subarray(h,h+16),f);return o},c.getAvcDecryptedUnit=function(r,s){for(var o=new Uint8Array(s),f=0,h=32;h<r.length-16;h+=160,f+=16)r.set(o.subarray(f,f+16),h);return r},c.decryptAvcSample=function(r,s,o,f,h){var v=this,m=Qr(h.data),y=this.getAvcEncryptedData(m);this.decryptBuffer(y.buffer).then(function(b){h.data=v.getAvcDecryptedUnit(m,b),v.decrypter.isSync()||v.decryptAvcSamples(r,s,o+1,f)})},c.decryptAvcSamples=function(r,s,o,f){if(r instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;s++,o=0){if(s>=r.length){f();return}for(var h=r[s].units;!(o>=h.length);o++){var v=h[o];if(!(v.data.length<=48||v.type!==1&&v.type!==5)&&(this.decryptAvcSample(r,s,o,f,v),!this.decrypter.isSync()))return}}},d}(),er=188,d3=function(){function d(u,r,s){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=u,this.config=r,this.typeSupported=s}d.probe=function(r){var s=d.syncOffset(r);return s>0&&B.warn("MPEG2-TS detected but first sync word found @ offset "+s),s!==-1},d.syncOffset=function(r){for(var s=r.length,o=Math.min(er*5,r.length-er)+1,f=0;f<o;){for(var h=!1,v=-1,m=0,y=f;y<s;y+=er)if(r[y]===71){if(m++,v===-1&&(v=y,v!==0&&(o=Math.min(v+er*99,r.length-er)+1)),h||(h=$l(r,y)===0),h&&m>1&&(v===0&&m>2||y+er>o))return v}else{if(m)return-1;break}f++}return-1},d.createTrack=function(r,s){return{container:r==="video"||r==="audio"?"video/mp2t":void 0,type:r,id:Vt[r],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:r==="audio"?s:void 0}};var c=d.prototype;return c.resetInitSegment=function(r,s,o,f){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=d.createTrack("video"),this._audioTrack=d.createTrack("audio",f),this._id3Track=d.createTrack("id3"),this._txtTrack=d.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=s,this.videoCodec=o,this._duration=f},c.resetTimeStamp=function(){},c.resetContiguity=function(){var r=this._audioTrack,s=this._avcTrack,o=this._id3Track;r&&(r.pesData=null),s&&(s.pesData=null),o&&(o.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null},c.demux=function(r,s,o,f){o===void 0&&(o=!1),f===void 0&&(f=!1),o||(this.sampleAes=null);var h,v=this._avcTrack,m=this._audioTrack,y=this._id3Track,b=this._txtTrack,S=v.pid,E=v.pesData,A=m.pid,x=y.pid,P=m.pesData,O=y.pesData,M=null,D=this.pmtParsed,j=this._pmtId,K=r.length;if(this.remainderData&&(r=Y(this.remainderData,r),K=r.length,this.remainderData=null),K<er&&!f)return this.remainderData=r,{audioTrack:m,videoTrack:v,id3Track:y,textTrack:b};var he=Math.max(0,d.syncOffset(r));K-=(K-he)%er,K<r.byteLength&&!f&&(this.remainderData=new Uint8Array(r.buffer,K,r.buffer.byteLength-K));for(var re=0,ne=he;ne<K;ne+=er)if(r[ne]===71){var xe=!!(r[ne+1]&64),we=$l(r,ne),Pe=(r[ne+3]&48)>>4,Ve=void 0;if(Pe>1){if(Ve=ne+5+r[ne+4],Ve===ne+er)continue}else Ve=ne+4;switch(we){case S:xe&&(E&&(h=js(E))&&this.parseAVCPES(v,b,h,!1),E={data:[],size:0}),E&&(E.data.push(r.subarray(Ve,ne+er)),E.size+=ne+er-Ve);break;case A:if(xe){if(P&&(h=js(P)))switch(m.segmentCodec){case"aac":this.parseAACPES(m,h);break;case"mp3":this.parseMPEGPES(m,h);break}P={data:[],size:0}}P&&(P.data.push(r.subarray(Ve,ne+er)),P.size+=ne+er-Ve);break;case x:xe&&(O&&(h=js(O))&&this.parseID3PES(y,h),O={data:[],size:0}),O&&(O.data.push(r.subarray(Ve,ne+er)),O.size+=ne+er-Ve);break;case 0:xe&&(Ve+=r[Ve]+1),j=this._pmtId=f3(r,Ve);break;case j:{xe&&(Ve+=r[Ve]+1);var dt=h3(r,Ve,this.typeSupported,o);S=dt.avc,S>0&&(v.pid=S),A=dt.audio,A>0&&(m.pid=A,m.segmentCodec=dt.segmentCodec),x=dt.id3,x>0&&(y.pid=x),M!==null&&!D&&(B.warn("MPEG-TS PMT found at "+ne+" after unknown PID '"+M+"'. Backtracking to sync byte @"+he+" to parse all TS packets."),M=null,ne=he-188),D=this.pmtParsed=!0;break}case 17:case 8191:break;default:M=we;break}}else re++;if(re>0){var pt=new Error("Found "+re+" TS packet/s that do not start with 0x47");this.observer.emit(L.ERROR,L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,error:pt,reason:pt.message})}v.pesData=E,m.pesData=P,y.pesData=O;var _t={audioTrack:m,videoTrack:v,id3Track:y,textTrack:b};return f&&this.extractRemainingSamples(_t),_t},c.flush=function(){var r=this.remainderData;this.remainderData=null;var s;return r?s=this.demux(r,-1,!1,!0):s={videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(s),this.sampleAes?this.decrypt(s,this.sampleAes):s},c.extractRemainingSamples=function(r){var s=r.audioTrack,o=r.videoTrack,f=r.id3Track,h=r.textTrack,v=o.pesData,m=s.pesData,y=f.pesData,b;if(v&&(b=js(v))?(this.parseAVCPES(o,h,b,!0),o.pesData=null):o.pesData=v,m&&(b=js(m))){switch(s.segmentCodec){case"aac":this.parseAACPES(s,b);break;case"mp3":this.parseMPEGPES(s,b);break}s.pesData=null}else m!=null&&m.size&&B.log("last AAC PES packet truncated,might overlap between fragments"),s.pesData=m;y&&(b=js(y))?(this.parseID3PES(f,b),f.pesData=null):f.pesData=y},c.demuxSampleAes=function(r,s,o){var f=this.demux(r,o,!0,!this.config.progressive),h=this.sampleAes=new c3(this.observer,this.config,s);return this.decrypt(f,h)},c.decrypt=function(r,s){return new Promise(function(o){var f=r.audioTrack,h=r.videoTrack;f.samples&&f.segmentCodec==="aac"?s.decryptAacSamples(f.samples,0,function(){h.samples?s.decryptAvcSamples(h.samples,0,0,function(){o(r)}):o(r)}):h.samples&&s.decryptAvcSamples(h.samples,0,0,function(){o(r)})})},c.destroy=function(){this._duration=0},c.parseAVCPES=function(r,s,o,f){var h=this,v=this.parseAVCNALu(r,o.data),m=this.avcSample,y,b=!1;o.data=null,m&&v.length&&!r.audFound&&(eu(m,r),m=this.avcSample=Vo(!1,o.pts,o.dts,"")),v.forEach(function(S){switch(S.type){case 1:{y=!0,m||(m=h.avcSample=Vo(!0,o.pts,o.dts,"")),m.frame=!0;var E=S.data;if(b&&E.length>4){var A=new Wf(E).readSliceType();(A===2||A===4||A===7||A===9)&&(m.key=!0)}break}case 5:y=!0,m||(m=h.avcSample=Vo(!0,o.pts,o.dts,"")),m.key=!0,m.frame=!0;break;case 6:{y=!0,ji(S.data,1,o.pts,s.samples);break}case 7:if(y=!0,b=!0,!r.sps){var x=S.data,P=new Wf(x),O=P.readSPS();r.width=O.width,r.height=O.height,r.pixelRatio=O.pixelRatio,r.sps=[x],r.duration=h._duration;for(var M=x.subarray(1,4),D="avc1.",j=0;j<3;j++){var K=M[j].toString(16);K.length<2&&(K="0"+K),D+=K}r.codec=D}break;case 8:y=!0,r.pps||(r.pps=[S.data]);break;case 9:y=!1,r.audFound=!0,m&&eu(m,r),m=h.avcSample=Vo(!1,o.pts,o.dts,"");break;case 12:y=!0;break;default:y=!1,m&&(m.debug+="unknown NAL "+S.type+" ");break}if(m&&y){var he=m.units;he.push(S)}}),f&&m&&(eu(m,r),this.avcSample=null)},c.getLastNalUnit=function(r){var s,o=this.avcSample,f;if((!o||o.units.length===0)&&(o=r[r.length-1]),(s=o)!=null&&s.units){var h=o.units;f=h[h.length-1]}return f},c.parseAVCNALu=function(r,s){var o=s.byteLength,f=r.naluState||0,h=f,v=[],m=0,y,b,S,E=-1,A=0;for(f===-1&&(E=0,A=s[0]&31,f=0,m=1);m<o;){if(y=s[m++],!f){f=y?0:1;continue}if(f===1){f=y?0:2;continue}if(!y)f=3;else if(y===1){if(E>=0){var x={data:s.subarray(E,m-f-1),type:A};v.push(x)}else{var P=this.getLastNalUnit(r.samples);if(P&&(h&&m<=4-h&&P.state&&(P.data=P.data.subarray(0,P.data.byteLength-h)),b=m-f-1,b>0)){var O=new Uint8Array(P.data.byteLength+b);O.set(P.data,0),O.set(s.subarray(0,b),P.data.byteLength),P.data=O,P.state=0}}m<o?(S=s[m]&31,E=m,A=S,f=0):f=-1}else f=0}if(E>=0&&f>=0){var M={data:s.subarray(E,o),type:A,state:f};v.push(M)}if(v.length===0){var D=this.getLastNalUnit(r.samples);if(D){var j=new Uint8Array(D.data.byteLength+s.byteLength);j.set(D.data,0),j.set(s,D.data.byteLength),D.data=j}}return r.naluState=f,v},c.parseAACPES=function(r,s){var o=0,f=this.aacOverFlow,h=s.data;if(f){this.aacOverFlow=null;var v=f.missing,m=f.sample.unit.byteLength;if(v===-1){var y=new Uint8Array(m+h.byteLength);y.set(f.sample.unit,0),y.set(h,m),h=y}else{var b=m-v;f.sample.unit.set(h.subarray(0,v),b),r.samples.push(f.sample),o=f.missing}}var S,E;for(S=o,E=h.length;S<E-1&&!Fo(h,S);S++);if(S!==o){var A,x=S<E-1;x?A="AAC PES did not start with ADTS header,offset:"+S:A="No ADTS header found in AAC PES";var P=new Error(A);if(B.warn("parsing error: "+A),this.observer.emit(L.ERROR,L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,levelRetry:x,error:P,reason:A}),!x)return}Bf(r,this.observer,h,S,this.audioCodec);var O;if(s.pts!==void 0)O=s.pts;else if(f){var M=Mf(r.samplerate);O=f.sample.pts+M}else{B.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var D=0,j;S<E;)if(j=Nf(r,h,S,O,D),S+=j.length,j.missing){this.aacOverFlow=j;break}else for(D++;S<E-1&&!Fo(h,S);S++);},c.parseMPEGPES=function(r,s){var o=s.data,f=o.length,h=0,v=0,m=s.pts;if(m===void 0){B.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;v<f;)if(Vf(o,v)){var y=Ff(r,o,v,m,h);if(y)v+=y.length,h++;else break}else v++},c.parseID3PES=function(r,s){if(s.pts===void 0){B.warn("[tsdemuxer]: ID3 PES unknown PTS");return}var o=k({},s,{type:this._avcTrack?Ai.emsg:Ai.audioId3,duration:Number.POSITIVE_INFINITY});r.samples.push(o)},d}();function Vo(d,c,u,r){return{key:d,frame:!1,pts:c,dts:u,units:[],debug:r,length:0}}function $l(d,c){return((d[c+1]&31)<<8)+d[c+2]}function f3(d,c){return(d[c+10]&31)<<8|d[c+11]}function h3(d,c,u,r){var s={audio:-1,avc:-1,id3:-1,segmentCodec:"aac"},o=(d[c+1]&15)<<8|d[c+2],f=c+3+o-4,h=(d[c+10]&15)<<8|d[c+11];for(c+=12+h;c<f;){var v=$l(d,c);switch(d[c]){case 207:if(!r){B.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:s.audio===-1&&(s.audio=v);break;case 21:s.id3===-1&&(s.id3=v);break;case 219:if(!r){B.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:s.avc===-1&&(s.avc=v);break;case 3:case 4:u.mpeg!==!0&&u.mp3!==!0?B.log("MPEG audio found, not supported in this browser"):s.audio===-1&&(s.audio=v,s.segmentCodec="mp3");break;case 36:B.warn("Unsupported HEVC stream type found");break}c+=((d[c+3]&15)<<8|d[c+4])+5}return s}function js(d){var c=0,u,r,s,o,f,h=d.data;if(!d||d.size===0)return null;for(;h[0].length<19&&h.length>1;){var v=new Uint8Array(h[0].length+h[1].length);v.set(h[0]),v.set(h[1],h[0].length),h[0]=v,h.splice(1,1)}u=h[0];var m=(u[0]<<16)+(u[1]<<8)+u[2];if(m===1){if(r=(u[4]<<8)+u[5],r&&r>d.size-6)return null;var y=u[7];y&192&&(o=(u[9]&14)*536870912+(u[10]&255)*4194304+(u[11]&254)*16384+(u[12]&255)*128+(u[13]&254)/2,y&64?(f=(u[14]&14)*536870912+(u[15]&255)*4194304+(u[16]&254)*16384+(u[17]&255)*128+(u[18]&254)/2,o-f>60*9e4&&(B.warn(Math.round((o-f)/9e4)+"s delta between PTS and DTS, align them"),o=f)):f=o),s=u[8];var b=s+9;if(d.size<=b)return null;d.size-=b;for(var S=new Uint8Array(d.size),E=0,A=h.length;E<A;E++){u=h[E];var x=u.byteLength;if(b)if(b>x){b-=x;continue}else u=u.subarray(b),x-=b,b=0;S.set(u,c),c+=x}return r&&(r-=s+3),{data:S,pts:o,dts:f,len:r}}return null}function eu(d,c){if(d.units.length&&d.frame){if(d.pts===void 0){var u=c.samples,r=u.length;if(r){var s=u[r-1];d.pts=s.pts,d.dts=s.dts}else{c.dropped++;return}}c.samples.push(d)}d.debug.length&&B.log(d.pts+"/"+d.dts+":"+d.debug)}var g3=function(d){T(c,d);function c(){return d.apply(this,arguments)||this}var u=c.prototype;return u.resetInitSegment=function(s,o,f,h){d.prototype.resetInitSegment.call(this,s,o,f,h),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:o,duration:h,inputTimeScale:9e4,dropped:0}},c.probe=function(s){if(!s)return!1;for(var o=mt(s,0)||[],f=o.length,h=s.length;f<h;f++)if(u3(s,f))return B.log("MPEG Audio sync word found !"),!0;return!1},u.canParse=function(s,o){return l3(s,o)},u.appendFrame=function(s,o,f){if(this.basePTS!==null)return Ff(s,o,f,this.basePTS,this.frameIndex)},c}(Rf),jf=function(){function d(){}return d.getSilentFrame=function(u,r){switch(u){case"mp4a.40.2":if(r===1)return new Uint8Array([0,200,0,128,35,128]);if(r===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(r===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(r===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(r===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(r===6)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]);break;default:if(r===1)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]);if(r===2)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]);if(r===3)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]);break}},d}(),zn=Math.pow(2,32)-1,qi=function(){function d(){}return d.init=function(){d.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var u;for(u in d.types)d.types.hasOwnProperty(u)&&(d.types[u]=[u.charCodeAt(0),u.charCodeAt(1),u.charCodeAt(2),u.charCodeAt(3)]);var r=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),s=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);d.HDLR_TYPES={video:r,audio:s};var o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),f=new Uint8Array([0,0,0,0,0,0,0,0]);d.STTS=d.STSC=d.STCO=f,d.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),d.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),d.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),d.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var h=new Uint8Array([105,115,111,109]),v=new Uint8Array([97,118,99,49]),m=new Uint8Array([0,0,0,1]);d.FTYP=d.box(d.types.ftyp,h,m,h,v),d.DINF=d.box(d.types.dinf,d.box(d.types.dref,o))},d.box=function(u){for(var r=8,s=arguments.length,o=new Array(s>1?s-1:0),f=1;f<s;f++)o[f-1]=arguments[f];for(var h=o.length,v=h;h--;)r+=o[h].byteLength;var m=new Uint8Array(r);for(m[0]=r>>24&255,m[1]=r>>16&255,m[2]=r>>8&255,m[3]=r&255,m.set(u,4),h=0,r=8;h<v;h++)m.set(o[h],r),r+=o[h].byteLength;return m},d.hdlr=function(u){return d.box(d.types.hdlr,d.HDLR_TYPES[u])},d.mdat=function(u){return d.box(d.types.mdat,u)},d.mdhd=function(u,r){r*=u;var s=Math.floor(r/(zn+1)),o=Math.floor(r%(zn+1));return d.box(d.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,u>>24&255,u>>16&255,u>>8&255,u&255,s>>24,s>>16&255,s>>8&255,s&255,o>>24,o>>16&255,o>>8&255,o&255,85,196,0,0]))},d.mdia=function(u){return d.box(d.types.mdia,d.mdhd(u.timescale,u.duration),d.hdlr(u.type),d.minf(u))},d.mfhd=function(u){return d.box(d.types.mfhd,new Uint8Array([0,0,0,0,u>>24,u>>16&255,u>>8&255,u&255]))},d.minf=function(u){return u.type==="audio"?d.box(d.types.minf,d.box(d.types.smhd,d.SMHD),d.DINF,d.stbl(u)):d.box(d.types.minf,d.box(d.types.vmhd,d.VMHD),d.DINF,d.stbl(u))},d.moof=function(u,r,s){return d.box(d.types.moof,d.mfhd(u),d.traf(s,r))},d.moov=function(u){for(var r=u.length,s=[];r--;)s[r]=d.trak(u[r]);return d.box.apply(null,[d.types.moov,d.mvhd(u[0].timescale,u[0].duration)].concat(s).concat(d.mvex(u)))},d.mvex=function(u){for(var r=u.length,s=[];r--;)s[r]=d.trex(u[r]);return d.box.apply(null,[d.types.mvex].concat(s))},d.mvhd=function(u,r){r*=u;var s=Math.floor(r/(zn+1)),o=Math.floor(r%(zn+1)),f=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,u>>24&255,u>>16&255,u>>8&255,u&255,s>>24,s>>16&255,s>>8&255,s&255,o>>24,o>>16&255,o>>8&255,o&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return d.box(d.types.mvhd,f)},d.sdtp=function(u){var r=u.samples||[],s=new Uint8Array(4+r.length),o,f;for(o=0;o<r.length;o++)f=r[o].flags,s[o+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return d.box(d.types.sdtp,s)},d.stbl=function(u){return d.box(d.types.stbl,d.stsd(u),d.box(d.types.stts,d.STTS),d.box(d.types.stsc,d.STSC),d.box(d.types.stsz,d.STSZ),d.box(d.types.stco,d.STCO))},d.avc1=function(u){var r=[],s=[],o,f,h;for(o=0;o<u.sps.length;o++)f=u.sps[o],h=f.byteLength,r.push(h>>>8&255),r.push(h&255),r=r.concat(Array.prototype.slice.call(f));for(o=0;o<u.pps.length;o++)f=u.pps[o],h=f.byteLength,s.push(h>>>8&255),s.push(h&255),s=s.concat(Array.prototype.slice.call(f));var v=d.box(d.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|u.sps.length].concat(r).concat([u.pps.length]).concat(s))),m=u.width,y=u.height,b=u.pixelRatio[0],S=u.pixelRatio[1];return d.box(d.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,m>>8&255,m&255,y>>8&255,y&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),v,d.box(d.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),d.box(d.types.pasp,new Uint8Array([b>>24,b>>16&255,b>>8&255,b&255,S>>24,S>>16&255,S>>8&255,S&255])))},d.esds=function(u){var r=u.config.length;return new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(u.config).concat([6,1,2]))},d.mp4a=function(u){var r=u.samplerate;return d.box(d.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,u.channelCount,0,16,0,0,0,0,r>>8&255,r&255,0,0]),d.box(d.types.esds,d.esds(u)))},d.mp3=function(u){var r=u.samplerate;return d.box(d.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,u.channelCount,0,16,0,0,0,0,r>>8&255,r&255,0,0]))},d.stsd=function(u){return u.type==="audio"?u.segmentCodec==="mp3"&&u.codec==="mp3"?d.box(d.types.stsd,d.STSD,d.mp3(u)):d.box(d.types.stsd,d.STSD,d.mp4a(u)):d.box(d.types.stsd,d.STSD,d.avc1(u))},d.tkhd=function(u){var r=u.id,s=u.duration*u.timescale,o=u.width,f=u.height,h=Math.floor(s/(zn+1)),v=Math.floor(s%(zn+1));return d.box(d.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,r&255,0,0,0,0,h>>24,h>>16&255,h>>8&255,h&255,v>>24,v>>16&255,v>>8&255,v&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,o>>8&255,o&255,0,0,f>>8&255,f&255,0,0]))},d.traf=function(u,r){var s=d.sdtp(u),o=u.id,f=Math.floor(r/(zn+1)),h=Math.floor(r%(zn+1));return d.box(d.types.traf,d.box(d.types.tfhd,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255])),d.box(d.types.tfdt,new Uint8Array([1,0,0,0,f>>24,f>>16&255,f>>8&255,f&255,h>>24,h>>16&255,h>>8&255,h&255])),d.trun(u,s.length+16+20+8+16+8+8),s)},d.trak=function(u){return u.duration=u.duration||4294967295,d.box(d.types.trak,d.tkhd(u),d.mdia(u))},d.trex=function(u){var r=u.id;return d.box(d.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},d.trun=function(u,r){var s=u.samples||[],o=s.length,f=12+16*o,h=new Uint8Array(f),v,m,y,b,S,E;for(r+=8+f,h.set([u.type==="video"?1:0,0,15,1,o>>>24&255,o>>>16&255,o>>>8&255,o&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255],0),v=0;v<o;v++)m=s[v],y=m.duration,b=m.size,S=m.flags,E=m.cts,h.set([y>>>24&255,y>>>16&255,y>>>8&255,y&255,b>>>24&255,b>>>16&255,b>>>8&255,b&255,S.isLeading<<2|S.dependsOn,S.isDependedOn<<6|S.hasRedundancy<<4|S.paddingValue<<1|S.isNonSync,S.degradPrio&61440,S.degradPrio&15,E>>>24&255,E>>>16&255,E>>>8&255,E&255],12+16*v);return d.box(d.types.trun,h)},d.initSegment=function(u){d.types||d.init();var r=d.moov(u),s=new Uint8Array(d.FTYP.byteLength+r.byteLength);return s.set(d.FTYP),s.set(r,d.FTYP.byteLength),s},d}();qi.types=void 0,qi.HDLR_TYPES=void 0,qi.STTS=void 0,qi.STSC=void 0,qi.STCO=void 0,qi.STSZ=void 0,qi.VMHD=void 0,qi.SMHD=void 0,qi.STSD=void 0,qi.FTYP=void 0,qi.DINF=void 0;var v3=9e4;function m3(d,c,u,r){u===void 0&&(u=1),r===void 0&&(r=!1);var s=d*c*u;return r?Math.round(s):s}function Sa(d,c){return c===void 0&&(c=!1),m3(d,1e3,1/v3,c)}var p3=10*1e3,Gf=1024,_3=1152,Wo=null,tu=null,iu=function(){function d(u,r,s,o){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=u,this.config=r,this.typeSupported=s,this.ISGenerated=!1,Wo===null){var f=navigator.userAgent||"",h=f.match(/Chrome\/(\d+)/i);Wo=h?parseInt(h[1]):0}if(tu===null){var v=navigator.userAgent.match(/Safari\/(\d+)/i);tu=v?parseInt(v[1]):0}}var c=d.prototype;return c.destroy=function(){},c.resetTimeStamp=function(r){B.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=r},c.resetNextTimestamp=function(){B.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},c.resetInitSegment=function(){B.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},c.getVideoStartPts=function(r){var s=!1,o=r.reduce(function(f,h){var v=h.pts-f;return v<-4294967296?(s=!0,Ur(f,h.pts)):v>0?f:h.pts},r[0].pts);return s&&B.debug("PTS rollover detected"),o},c.remux=function(r,s,o,f,h,v,m,y){var b,S,E,A,x,P,O=h,M=h,D=r.pid>-1,j=s.pid>-1,K=s.samples.length,he=r.samples.length>0,re=m&&K>0||K>1,ne=(!D||he)&&(!j||re)||this.ISGenerated||m;if(ne){this.ISGenerated||(E=this.generateIS(r,s,h,v));var xe=this.isVideoContiguous,we=-1,Pe;if(re&&(we=y3(s.samples),!xe&&this.config.forceKeyFrameOnDiscontinuity))if(P=!0,we>0){B.warn("[mp4-remuxer]: Dropped "+we+" out of "+K+" video samples due to a missing keyframe");var Ve=this.getVideoStartPts(s.samples);s.samples=s.samples.slice(we),s.dropped+=we,M+=(s.samples[0].pts-Ve)/s.inputTimeScale,Pe=M}else we===-1&&(B.warn("[mp4-remuxer]: No keyframe found out of "+K+" video samples"),P=!1);if(this.ISGenerated){if(he&&re){var dt=this.getVideoStartPts(s.samples),pt=Ur(r.samples[0].pts,dt)-dt,_t=pt/s.inputTimeScale;O+=Math.max(0,_t),M+=Math.max(0,-_t)}if(he){if(r.samplerate||(B.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),E=this.generateIS(r,s,h,v)),S=this.remuxAudio(r,O,this.isAudioContiguous,v,j||re||y===st.AUDIO?M:void 0),re){var Bt=S?S.endPTS-S.startPTS:0;s.inputTimeScale||(B.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),E=this.generateIS(r,s,h,v)),b=this.remuxVideo(s,M,xe,Bt)}}else re&&(b=this.remuxVideo(s,M,xe,0));b&&(b.firstKeyFrame=we,b.independent=we!==-1,b.firstKeyFramePTS=Pe)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(o.samples.length&&(x=zf(o,h,this._initPTS,this._initDTS)),f.samples.length&&(A=Hf(f,h,this._initPTS))),{audio:S,video:b,initSegment:E,independent:P,text:A,id3:x}},c.generateIS=function(r,s,o,f){var h=r.samples,v=s.samples,m=this.typeSupported,y={},b=this._initPTS,S=!b||f,E="audio/mp4",A,x,P;if(S&&(A=x=1/0),r.config&&h.length){switch(r.timescale=r.samplerate,r.segmentCodec){case"mp3":m.mpeg?(E="audio/mpeg",r.codec=""):m.mp3&&(r.codec="mp3");break}y.audio={id:"audio",container:E,codec:r.codec,initSegment:r.segmentCodec==="mp3"&&m.mpeg?new Uint8Array(0):qi.initSegment([r]),metadata:{channelCount:r.channelCount}},S&&(P=r.inputTimeScale,!b||P!==b.timescale?A=x=h[0].pts-Math.round(P*o):S=!1)}if(s.sps&&s.pps&&v.length&&(s.timescale=s.inputTimeScale,y.video={id:"main",container:"video/mp4",codec:s.codec,initSegment:qi.initSegment([s]),metadata:{width:s.width,height:s.height}},S))if(P=s.inputTimeScale,!b||P!==b.timescale){var O=this.getVideoStartPts(v),M=Math.round(P*o);x=Math.min(x,Ur(v[0].dts,O)-M),A=Math.min(A,O-M)}else S=!1;if(Object.keys(y).length)return this.ISGenerated=!0,S?(this._initPTS={baseTime:A,timescale:P},this._initDTS={baseTime:x,timescale:P}):A=P=void 0,{tracks:y,initPTS:A,timescale:P}},c.remuxVideo=function(r,s,o,f){var h=r.inputTimeScale,v=r.samples,m=[],y=v.length,b=this._initPTS,S=this.nextAvcDts,E=8,A=this.videoSampleDuration,x,P,O=Number.POSITIVE_INFINITY,M=Number.NEGATIVE_INFINITY,D=!1;if(!o||S===null){var j=s*h,K=v[0].pts-Ur(v[0].dts,v[0].pts);S=j-K}for(var he=b.baseTime*h/b.timescale,re=0;re<y;re++){var ne=v[re];ne.pts=Ur(ne.pts-he,S),ne.dts=Ur(ne.dts-he,S),ne.dts<v[re>0?re-1:re].dts&&(D=!0)}D&&v.sort(function(zo,oh){var hE=zo.dts-oh.dts,gE=zo.pts-oh.pts;return hE||gE}),x=v[0].dts,P=v[v.length-1].dts;var xe=P-x,we=xe?Math.round(xe/(y-1)):A||r.inputTimeScale/30;if(o){var Pe=x-S,Ve=Pe>we,dt=Pe<-1;if((Ve||dt)&&(Ve?B.warn("AVC: "+Sa(Pe,!0)+" ms ("+Pe+"dts) hole between fragments detected, filling it"):B.warn("AVC: "+Sa(-Pe,!0)+" ms ("+Pe+"dts) overlapping between fragments detected"),!dt||S>=v[0].pts)){x=S;var pt=v[0].pts-Pe;v[0].dts=x,v[0].pts=pt,B.log("Video: First PTS/DTS adjusted: "+Sa(pt,!0)+"/"+Sa(x,!0)+", delta: "+Sa(Pe,!0)+" ms")}}x=Math.max(0,x);for(var _t=0,Bt=0,St=0;St<y;St++){for(var zt=v[St],Ct=zt.units,ui=Ct.length,Vr=0,ri=0;ri<ui;ri++)Vr+=Ct[ri].data.length;Bt+=Vr,_t+=ui,zt.length=Vr,zt.dts=Math.max(zt.dts,x),O=Math.min(zt.pts,O),M=Math.max(zt.pts,M)}P=v[y-1].dts;var sr=Bt+4*_t+8,Xi;try{Xi=new Uint8Array(sr)}catch(zo){this.observer.emit(L.ERROR,L.ERROR,{type:le.MUX_ERROR,details:z.REMUX_ALLOC_ERROR,fatal:!1,error:zo,bytes:sr,reason:"fail allocating video mdat "+sr});return}var sn=new DataView(Xi.buffer);sn.setUint32(0,sr),Xi.set(qi.types.mdat,4);for(var Tr=!1,En=Number.POSITIVE_INFINITY,Hn=Number.POSITIVE_INFINITY,An=Number.NEGATIVE_INFINITY,Kn=Number.NEGATIVE_INFINITY,tr=0;tr<y;tr++){for(var hr=v[tr],xn=hr.units,Yn=0,ka=0,du=xn.length;ka<du;ka++){var wn=xn[ka],sE=wn.data,fu=wn.data.byteLength;sn.setUint32(E,fu),E+=4,Xi.set(sE,E),E+=fu,Yn+=4+fu}var jo=void 0;if(tr<y-1)A=v[tr+1].dts-hr.dts,jo=v[tr+1].pts-hr.pts;else{var rh=this.config,Go=tr>0?hr.dts-v[tr-1].dts:we;if(jo=tr>0?hr.pts-v[tr-1].pts:we,rh.stretchShortVideoTrack&&this.nextAudioPts!==null){var aE=Math.floor(rh.maxBufferHole*h),hu=(f?O+f*h:this.nextAudioPts)-hr.pts;hu>aE?(A=hu-Go,A<0?A=Go:Tr=!0,B.log("[mp4-remuxer]: It is approximately "+hu/90+" ms to the next segment; using duration "+A/90+" ms for the last video frame.")):A=Go}else A=Go}var oE=Math.round(hr.pts-hr.dts);En=Math.min(En,A),An=Math.max(An,A),Hn=Math.min(Hn,jo),Kn=Math.max(Kn,jo),m.push(new Kf(hr.key,A,Yn,oE))}if(m.length){if(Wo){if(Wo<70){var nh=m[0].flags;nh.dependsOn=2,nh.isNonSync=0}}else if(tu&&Kn-Hn<An-En&&we/An<.025&&m[0].cts===0){B.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");for(var gu=x,Wr=0,sh=m.length;Wr<sh;Wr++){var ah=gu+m[Wr].duration,lE=gu+m[Wr].cts;if(Wr<sh-1){var uE=ah+m[Wr+1].cts;m[Wr].duration=uE-lE}else m[Wr].duration=Wr?m[Wr-1].duration:we;m[Wr].cts=0,gu=ah}}}A=Tr||!A?we:A,this.nextAvcDts=S=P+A,this.videoSampleDuration=A,this.isVideoContiguous=!0;var cE=qi.moof(r.sequenceNumber++,x,k({},r,{samples:m})),dE="video",fE={data1:cE,data2:Xi,startPTS:O/h,endPTS:(M+A)/h,startDTS:x/h,endDTS:S/h,type:dE,hasAudio:!1,hasVideo:!0,nb:m.length,dropped:r.dropped};return r.samples=[],r.dropped=0,fE},c.remuxAudio=function(r,s,o,f,h){var v=r.inputTimeScale,m=r.samplerate?r.samplerate:v,y=v/m,b=r.segmentCodec==="aac"?Gf:_3,S=b*y,E=this._initPTS,A=r.segmentCodec==="mp3"&&this.typeSupported.mpeg,x=[],P=h!==void 0,O=r.samples,M=A?0:8,D=this.nextAudioPts||-1,j=s*v,K=E.baseTime*v/E.timescale;if(this.isAudioContiguous=o=o||O.length&&D>0&&(f&&Math.abs(j-D)<9e3||Math.abs(Ur(O[0].pts-K,j)-D)<20*S),O.forEach(function(wn){wn.pts=Ur(wn.pts-K,j)}),!o||D<0){if(O=O.filter(function(wn){return wn.pts>=0}),!O.length)return;h===0?D=0:f&&!P?D=Math.max(0,j):D=O[0].pts}if(r.segmentCodec==="aac")for(var he=this.config.maxAudioFramesDrift,re=0,ne=D;re<O.length;re++){var xe=O[re],we=xe.pts,Pe=we-ne,Ve=Math.abs(1e3*Pe/v);if(Pe<=-he*S&&P)re===0&&(B.warn("Audio frame @ "+(we/v).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Pe/v)+" ms."),this.nextAudioPts=D=ne=we);else if(Pe>=he*S&&Ve<p3&&P){var dt=Math.round(Pe/S);ne=we-dt*S,ne<0&&(dt--,ne+=S),re===0&&(this.nextAudioPts=D=ne),B.warn("[mp4-remuxer]: Injecting "+dt+" audio frame @ "+(ne/v).toFixed(3)+"s due to "+Math.round(1e3*Pe/v)+" ms gap.");for(var pt=0;pt<dt;pt++){var _t=Math.max(ne,0),Bt=jf.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);Bt||(B.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Bt=xe.unit.subarray()),O.splice(re,0,{unit:Bt,pts:_t}),ne+=S,re++}}xe.pts=ne,ne+=S}for(var St=null,zt=null,Ct,ui=0,Vr=O.length;Vr--;)ui+=O[Vr].unit.byteLength;for(var ri=0,sr=O.length;ri<sr;ri++){var Xi=O[ri],sn=Xi.unit,Tr=Xi.pts;if(zt!==null){var En=x[ri-1];En.duration=Math.round((Tr-zt)/y)}else if(o&&r.segmentCodec==="aac"&&(Tr=D),St=Tr,ui>0){ui+=M;try{Ct=new Uint8Array(ui)}catch(wn){this.observer.emit(L.ERROR,L.ERROR,{type:le.MUX_ERROR,details:z.REMUX_ALLOC_ERROR,fatal:!1,error:wn,bytes:ui,reason:"fail allocating audio mdat "+ui});return}if(!A){var Hn=new DataView(Ct.buffer);Hn.setUint32(0,ui),Ct.set(qi.types.mdat,4)}}else return;Ct.set(sn,M);var An=sn.byteLength;M+=An,x.push(new Kf(!0,b,An,0)),zt=Tr}var Kn=x.length;if(Kn){var tr=x[x.length-1];this.nextAudioPts=D=zt+y*tr.duration;var hr=A?new Uint8Array(0):qi.moof(r.sequenceNumber++,St/y,k({},r,{samples:x}));r.samples=[];var xn=St/v,Yn=D/v,ka="audio",du={data1:hr,data2:Ct,startPTS:xn,endPTS:Yn,startDTS:xn,endDTS:Yn,type:ka,hasAudio:!0,hasVideo:!1,nb:Kn};return this.isAudioContiguous=!0,du}},c.remuxEmptyAudio=function(r,s,o,f){var h=r.inputTimeScale,v=r.samplerate?r.samplerate:h,m=h/v,y=this.nextAudioPts,b=this._initDTS,S=b.baseTime*9e4/b.timescale,E=(y!==null?y:f.startDTS*h)+S,A=f.endDTS*h+S,x=m*Gf,P=Math.ceil((A-E)/x),O=jf.getSilentFrame(r.manifestCodec||r.codec,r.channelCount);if(B.warn("[mp4-remuxer]: remux empty Audio"),!O){B.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var M=[],D=0;D<P;D++){var j=E+D*x;M.push({unit:O,pts:j,dts:j})}return r.samples=M,this.remuxAudio(r,s,o,!1)},d}();function Ur(d,c){var u;if(c===null)return d;for(c<d?u=-8589934592:u=8589934592;Math.abs(d-c)>4294967296;)d+=u;return d}function y3(d){for(var c=0;c<d.length;c++)if(d[c].key)return c;return-1}function zf(d,c,u,r){var s=d.samples.length;if(s){for(var o=d.inputTimeScale,f=0;f<s;f++){var h=d.samples[f];h.pts=Ur(h.pts-u.baseTime*o/u.timescale,c*o)/o,h.dts=Ur(h.dts-r.baseTime*o/r.timescale,c*o)/o}var v=d.samples;return d.samples=[],{samples:v}}}function Hf(d,c,u){var r=d.samples.length;if(r){for(var s=d.inputTimeScale,o=0;o<r;o++){var f=d.samples[o];f.pts=Ur(f.pts-u.baseTime*9e4/u.timescale,c*s)/s}d.samples.sort(function(v,m){return v.pts-m.pts});var h=d.samples;return d.samples=[],{samples:h}}}var Kf=function(c,u,r,s){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=u,this.size=r,this.cts=s,this.flags=new b3(c)},b3=function(c){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=c?2:1,this.isNonSync=c?0:1},S3=function(){function d(){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}var c=d.prototype;return c.destroy=function(){},c.resetTimeStamp=function(r){this.initPTS=r,this.lastEndTime=null},c.resetNextTimestamp=function(){this.lastEndTime=null},c.resetInitSegment=function(r,s,o,f){this.audioCodec=s,this.videoCodec=o,this.generateInitSegment($t(r,f)),this.emitInitSegment=!0},c.generateInitSegment=function(r){var s=this.audioCodec,o=this.videoCodec;if(!(r!=null&&r.byteLength)){this.initTracks=void 0,this.initData=void 0;return}var f=this.initData=me(r);s||(s=Yf(f.audio,Oe.AUDIO)),o||(o=Yf(f.video,Oe.VIDEO));var h={};f.audio&&f.video?h.audiovideo={container:"video/mp4",codec:s+","+o,initSegment:r,id:"main"}:f.audio?h.audio={container:"audio/mp4",codec:s,initSegment:r,id:"audio"}:f.video?h.video={container:"video/mp4",codec:o,initSegment:r,id:"main"}:B.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=h},c.remux=function(r,s,o,f,h,v){var m,y,b=this.initPTS,S=this.lastEndTime,E={audio:void 0,video:void 0,text:f,id3:o,initSegment:void 0};Z(S)||(S=this.lastEndTime=h||0);var A=s.samples;if(!(A!=null&&A.length))return E;var x={initPTS:void 0,timescale:1},P=this.initData;if((m=P)!=null&&m.length||(this.generateInitSegment(A),P=this.initData),!((y=P)!=null&&y.length))return B.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),E;this.emitInitSegment&&(x.tracks=this.initTracks,this.emitInitSegment=!1);var O=wi(A,P),M=_i(P,A),D=M===null?h:M;(k3(b,D,h,O)||x.timescale!==b.timescale&&v)&&(x.initPTS=D-h,b&&b.timescale===1&&B.warn("Adjusting initPTS by "+(x.initPTS-b.baseTime)),this.initPTS=b={baseTime:x.initPTS,timescale:1});var j=r?D-b.baseTime/b.timescale:S,K=j+O;Ei(P,A,b.baseTime/b.timescale),O>0?this.lastEndTime=K:(B.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var he=!!P.audio,re=!!P.video,ne="";he&&(ne+="audio"),re&&(ne+="video");var xe={data1:A,startPTS:j,startDTS:j,endPTS:K,endDTS:K,type:ne,hasAudio:he,hasVideo:re,nb:1,dropped:0};return E.audio=xe.type==="audio"?xe:void 0,E.video=xe.type!=="audio"?xe:void 0,E.initSegment=x,E.id3=zf(o,h,b,b),f.samples.length&&(E.text=Hf(f,h,b)),E},d}();function k3(d,c,u,r){if(d===null)return!0;var s=Math.max(r,1),o=c-d.baseTime/d.timescale;return Math.abs(o-u)>s}function Yf(d,c){var u=d==null?void 0:d.codec;return u&&u.length>4?u:u==="hvc1"||u==="hev1"?"hvc1.1.6.L120.90":u==="av01"?"av01.0.04M.08":u==="avc1"||c===Oe.VIDEO?"avc1.42e01e":"mp4a.40.5"}var Tn;try{Tn=self.performance.now.bind(self.performance)}catch(d){B.debug("Unable to use Performance API on this environment"),Tn=typeof self!="undefined"&&self.Date.now}var ru=[{demux:r3,remux:S3},{demux:d3,remux:iu},{demux:t3,remux:iu},{demux:g3,remux:iu}],nu=function(){function d(u,r,s,o,f){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=u,this.typeSupported=r,this.config=s,this.vendor=o,this.id=f}var c=d.prototype;return c.configure=function(r){this.transmuxConfig=r,this.decrypter&&this.decrypter.reset()},c.push=function(r,s,o,f){var h=this,v=o.transmuxing;v.executeStart=Tn();var m=new Uint8Array(r),y=this.currentTransmuxState,b=this.transmuxConfig;f&&(this.currentTransmuxState=f);var S=f||y,E=S.contiguous,A=S.discontinuity,x=S.trackSwitch,P=S.accurateTimeOffset,O=S.timeOffset,M=S.initSegmentChange,D=b.audioCodec,j=b.videoCodec,K=b.defaultInitPts,he=b.duration,re=b.initSegmentData,ne=T3(m,s);if(ne&&ne.method==="AES-128"){var xe=this.getDecrypter();if(xe.isSync()){var we=xe.softwareDecrypt(m,ne.key.buffer,ne.iv.buffer),Pe=o.part>-1;if(Pe&&(we=xe.flush()),!we)return v.executeEnd=Tn(),su(o);m=new Uint8Array(we)}else return this.decryptionPromise=xe.webCryptoDecrypt(m,ne.key.buffer,ne.iv.buffer).then(function(Bt){var St=h.push(Bt,null,o);return h.decryptionPromise=null,St}),this.decryptionPromise}var Ve=this.needsProbing(A,x);if(Ve){var dt=this.configureTransmuxer(m);if(dt)return B.warn("[transmuxer] "+dt.message),this.observer.emit(L.ERROR,L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,error:dt,reason:dt.message}),v.executeEnd=Tn(),su(o)}(A||x||M||Ve)&&this.resetInitSegment(re,D,j,he,s),(A||M||Ve)&&this.resetInitialTimestamp(K),E||this.resetContiguity();var pt=this.transmux(m,ne,O,P,o),_t=this.currentTransmuxState;return _t.contiguous=!0,_t.discontinuity=!1,_t.trackSwitch=!1,v.executeEnd=Tn(),pt},c.flush=function(r){var s=this,o=r.transmuxing;o.executeStart=Tn();var f=this.decrypter,h=this.currentTransmuxState,v=this.decryptionPromise;if(v)return v.then(function(){return s.flush(r)});var m=[],y=h.timeOffset;if(f){var b=f.flush();b&&m.push(this.push(b,null,r))}var S=this.demuxer,E=this.remuxer;if(!S||!E)return o.executeEnd=Tn(),[su(r)];var A=S.flush(y);return us(A)?A.then(function(x){return s.flushRemux(m,x,r),m}):(this.flushRemux(m,A,r),m)},c.flushRemux=function(r,s,o){var f=s.audioTrack,h=s.videoTrack,v=s.id3Track,m=s.textTrack,y=this.currentTransmuxState,b=y.accurateTimeOffset,S=y.timeOffset;B.log("[transmuxer.ts]: Flushed fragment "+o.sn+(o.part>-1?" p: "+o.part:"")+" of level "+o.level);var E=this.remuxer.remux(f,h,v,m,S,b,!0,this.id);r.push({remuxResult:E,chunkMeta:o}),o.transmuxing.executeEnd=Tn()},c.resetInitialTimestamp=function(r){var s=this.demuxer,o=this.remuxer;!s||!o||(s.resetTimeStamp(r),o.resetTimeStamp(r))},c.resetContiguity=function(){var r=this.demuxer,s=this.remuxer;!r||!s||(r.resetContiguity(),s.resetNextTimestamp())},c.resetInitSegment=function(r,s,o,f,h){var v=this.demuxer,m=this.remuxer;!v||!m||(v.resetInitSegment(r,s,o,f),m.resetInitSegment(r,s,o,h))},c.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},c.transmux=function(r,s,o,f,h){var v;return s&&s.method==="SAMPLE-AES"?v=this.transmuxSampleAes(r,s,o,f,h):v=this.transmuxUnencrypted(r,o,f,h),v},c.transmuxUnencrypted=function(r,s,o,f){var h=this.demuxer.demux(r,s,!1,!this.config.progressive),v=h.audioTrack,m=h.videoTrack,y=h.id3Track,b=h.textTrack,S=this.remuxer.remux(v,m,y,b,s,o,!1,this.id);return{remuxResult:S,chunkMeta:f}},c.transmuxSampleAes=function(r,s,o,f,h){var v=this;return this.demuxer.demuxSampleAes(r,s,o).then(function(m){var y=v.remuxer.remux(m.audioTrack,m.videoTrack,m.id3Track,m.textTrack,o,f,!1,v.id);return{remuxResult:y,chunkMeta:h}})},c.configureTransmuxer=function(r){for(var s=this.config,o=this.observer,f=this.typeSupported,h=this.vendor,v,m=0,y=ru.length;m<y;m++)if(ru[m].demux.probe(r)){v=ru[m];break}if(!v)return new Error("Failed to find demuxer by probing fragment data");var b=this.demuxer,S=this.remuxer,E=v.remux,A=v.demux;(!S||!(S instanceof E))&&(this.remuxer=new E(o,s,f,h)),(!b||!(b instanceof A))&&(this.demuxer=new A(o,s,f),this.probe=A.probe)},c.needsProbing=function(r,s){return!this.demuxer||!this.remuxer||r||s},c.getDecrypter=function(){var r=this.decrypter;return r||(r=this.decrypter=new Zl(this.config)),r},d}();function T3(d,c){var u=null;return d.byteLength>0&&c!=null&&c.key!=null&&c.iv!==null&&c.method!=null&&(u=c),u}var su=function(c){return{remuxResult:{},chunkMeta:c}};function us(d){return"then"in d&&d.then instanceof Function}var E3=function(c,u,r,s,o){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=c,this.videoCodec=u,this.initSegmentData=r,this.duration=s,this.defaultInitPts=o||null},A3=function(c,u,r,s,o,f){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=c,this.contiguous=u,this.accurateTimeOffset=r,this.trackSwitch=s,this.timeOffset=o,this.initSegmentChange=f},qf={exports:{}};(function(d){var c=Object.prototype.hasOwnProperty,u="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(u=!1));function s(v,m,y){this.fn=v,this.context=m,this.once=y||!1}function o(v,m,y,b,S){if(typeof y!="function")throw new TypeError("The listener must be a function");var E=new s(y,b||v,S),A=u?u+m:m;return v._events[A]?v._events[A].fn?v._events[A]=[v._events[A],E]:v._events[A].push(E):(v._events[A]=E,v._eventsCount++),v}function f(v,m){--v._eventsCount===0?v._events=new r:delete v._events[m]}function h(){this._events=new r,this._eventsCount=0}h.prototype.eventNames=function(){var m=[],y,b;if(this._eventsCount===0)return m;for(b in y=this._events)c.call(y,b)&&m.push(u?b.slice(1):b);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(y)):m},h.prototype.listeners=function(m){var y=u?u+m:m,b=this._events[y];if(!b)return[];if(b.fn)return[b.fn];for(var S=0,E=b.length,A=new Array(E);S<E;S++)A[S]=b[S].fn;return A},h.prototype.listenerCount=function(m){var y=u?u+m:m,b=this._events[y];return b?b.fn?1:b.length:0},h.prototype.emit=function(m,y,b,S,E,A){var x=u?u+m:m;if(!this._events[x])return!1;var P=this._events[x],O=arguments.length,M,D;if(P.fn){switch(P.once&&this.removeListener(m,P.fn,void 0,!0),O){case 1:return P.fn.call(P.context),!0;case 2:return P.fn.call(P.context,y),!0;case 3:return P.fn.call(P.context,y,b),!0;case 4:return P.fn.call(P.context,y,b,S),!0;case 5:return P.fn.call(P.context,y,b,S,E),!0;case 6:return P.fn.call(P.context,y,b,S,E,A),!0}for(D=1,M=new Array(O-1);D<O;D++)M[D-1]=arguments[D];P.fn.apply(P.context,M)}else{var j=P.length,K;for(D=0;D<j;D++)switch(P[D].once&&this.removeListener(m,P[D].fn,void 0,!0),O){case 1:P[D].fn.call(P[D].context);break;case 2:P[D].fn.call(P[D].context,y);break;case 3:P[D].fn.call(P[D].context,y,b);break;case 4:P[D].fn.call(P[D].context,y,b,S);break;default:if(!M)for(K=1,M=new Array(O-1);K<O;K++)M[K-1]=arguments[K];P[D].fn.apply(P[D].context,M)}}return!0},h.prototype.on=function(m,y,b){return o(this,m,y,b,!1)},h.prototype.once=function(m,y,b){return o(this,m,y,b,!0)},h.prototype.removeListener=function(m,y,b,S){var E=u?u+m:m;if(!this._events[E])return this;if(!y)return f(this,E),this;var A=this._events[E];if(A.fn)A.fn===y&&(!S||A.once)&&(!b||A.context===b)&&f(this,E);else{for(var x=0,P=[],O=A.length;x<O;x++)(A[x].fn!==y||S&&!A[x].once||b&&A[x].context!==b)&&P.push(A[x]);P.length?this._events[E]=P.length===1?P[0]:P:f(this,E)}return this},h.prototype.removeAllListeners=function(m){var y;return m?(y=u?u+m:m,this._events[y]&&f(this,y)):(this._events=new r,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=u,h.EventEmitter=h,d.exports=h})(qf);var x3=qf.exports,au=Se(x3);typeof n!="undefined"&&n&&w3(self);function w3(d){var c=new au,u=function(o,f){d.postMessage({event:o,data:f})};c.on(L.FRAG_DECRYPTED,u),c.on(L.ERROR,u);var r=function(){var o=function(v){var m=function(b){u("workerLog",{logType:v,message:b})};B[v]=m};for(var f in B)o(f)};d.addEventListener("message",function(s){var o=s.data;switch(o.cmd){case"init":{var f=JSON.parse(o.config);d.transmuxer=new nu(c,o.typeSupported,f,o.vendor,o.id),X(f.debug,o.id),r(),u("init",null);break}case"configure":{d.transmuxer.configure(o.config);break}case"demux":{var h=d.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);us(h)?(d.transmuxer.async=!0,h.then(function(b){ou(d,b)}).catch(function(b){u(L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,chunkMeta:o.chunkMeta,fatal:!1,error:b,err:b,reason:"transmuxer-worker push error"})})):(d.transmuxer.async=!1,ou(d,h));break}case"flush":{var v=o.chunkMeta,m=d.transmuxer.flush(v),y=us(m);y||d.transmuxer.async?(us(m)||(m=Promise.resolve(m)),m.then(function(b){Zf(d,b,v)}).catch(function(b){u(L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,chunkMeta:o.chunkMeta,fatal:!1,error:b,err:b,reason:"transmuxer-worker flush error"})})):Zf(d,m,v);break}}})}function ou(d,c){if(P3(c.remuxResult))return!1;var u=[],r=c.remuxResult,s=r.audio,o=r.video;return s&&Xf(u,s),o&&Xf(u,o),d.postMessage({event:"transmuxComplete",data:c},u),!0}function Xf(d,c){c.data1&&d.push(c.data1.buffer),c.data2&&d.push(c.data2.buffer)}function Zf(d,c,u){var r=c.reduce(function(s,o){return ou(d,o)||s},!1);r||d.postMessage({event:"transmuxComplete",data:c[0]}),d.postMessage({event:"flush",data:u})}function P3(d){return!d.audio&&!d.video&&!d.text&&!d.id3&&!d.initSegment}function C3(){return typeof i=="function"}function L3(){var d=new self.Blob(["var exports={};var module={exports:exports};function define(f){f()};define.amd=true;("+i.toString()+")(true);"],{type:"text/javascript"}),c=self.URL.createObjectURL(d),u=new self.Worker(c);return{worker:u,objectURL:c}}function I3(d){var c=new self.URL(d,self.location.href).href,u=new self.Worker(c);return{worker:u,scriptURL:c}}var lu=Qi()||{isTypeSupported:function(){return!1}},R3=function(){function d(u,r,s,o){var f=this;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;var h=u.config;this.hls=u,this.id=r,this.useWorker=!!h.enableWorker,this.onTransmuxComplete=s,this.onFlush=o;var v=function(A,x){x=x||{},x.frag=f.frag,x.id=f.id,A===L.ERROR&&(f.error=x.error),f.hls.trigger(A,x)};this.observer=new au,this.observer.on(L.FRAG_DECRYPTED,v),this.observer.on(L.ERROR,v);var m={mp4:lu.isTypeSupported("video/mp4"),mpeg:lu.isTypeSupported("audio/mpeg"),mp3:lu.isTypeSupported('audio/mp4; codecs="mp3"')},y=navigator.vendor;if(this.useWorker&&typeof Worker!="undefined"){var b=h.workerPath||C3();if(b){try{h.workerPath?(B.log("loading Web Worker "+h.workerPath+' for "'+r+'"'),this.workerContext=I3(h.workerPath)):(B.log('injecting Web Worker for "'+r+'"'),this.workerContext=L3()),this.onwmsg=function(E){return f.onWorkerMessage(E)};var S=this.workerContext.worker;S.addEventListener("message",this.onwmsg),S.onerror=function(E){var A=new Error(E.message+" ("+E.filename+":"+E.lineno+")");h.enableWorker=!1,B.warn('Error in "'+r+'" Web Worker, fallback to inline'),f.hls.trigger(L.ERROR,{type:le.OTHER_ERROR,details:z.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:A})},S.postMessage({cmd:"init",typeSupported:m,vendor:y,id:r,config:JSON.stringify(h)})}catch(E){B.warn('Error setting up "'+r+'" Web Worker, fallback to inline',E),this.resetWorker(),this.error=null,this.transmuxer=new nu(this.observer,m,h,y,r)}return}}this.transmuxer=new nu(this.observer,m,h,y,r)}var c=d.prototype;return c.resetWorker=function(){if(this.workerContext){var r=this.workerContext,s=r.worker,o=r.objectURL;o&&self.URL.revokeObjectURL(o),s.removeEventListener("message",this.onwmsg),s.onerror=null,s.terminate(),this.workerContext=null}},c.destroy=function(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{var r=this.transmuxer;r&&(r.destroy(),this.transmuxer=null)}var s=this.observer;s&&s.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null},c.push=function(r,s,o,f,h,v,m,y,b,S){var E,A,x=this;b.transmuxing.start=self.performance.now();var P=this.transmuxer,O=v?v.start:h.start,M=h.decryptdata,D=this.frag,j=!(D&&h.cc===D.cc),K=!(D&&b.level===D.level),he=D?b.sn-D.sn:-1,re=this.part?b.part-this.part.index:-1,ne=he===0&&b.id>1&&b.id===(D==null?void 0:D.stats.chunkCount),xe=!K&&(he===1||he===0&&(re===1||ne&&re<=0)),we=self.performance.now();(K||he||h.stats.parsing.start===0)&&(h.stats.parsing.start=we),v&&(re||!xe)&&(v.stats.parsing.start=we);var Pe=!(D&&((E=h.initSegment)==null?void 0:E.url)===((A=D.initSegment)==null?void 0:A.url)),Ve=new A3(j,xe,y,K,O,Pe);if(!xe||j||Pe){B.log("[transmuxer-interface, "+h.type+"]: Starting new transmux session for sn: "+b.sn+" p: "+b.part+" level: "+b.level+" id: "+b.id+`
|
|
14
14
|
discontinuity: `+j+`
|
|
15
15
|
trackSwitch: `+K+`
|
|
16
|
-
contiguous: `+
|
|
16
|
+
contiguous: `+xe+`
|
|
17
17
|
accurateTimeOffset: `+y+`
|
|
18
18
|
timeOffset: `+O+`
|
|
19
|
-
initSegmentChange: `+we);var dt=new E3(o,f,s,m,S);this.configureTransmuxer(dt)}if(this.frag=h,this.part=v,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:r,decryptdata:M,chunkMeta:b,state:Ve},r instanceof ArrayBuffer?[r]:[]);else if(P){var pt=P.push(r,M,b,Ve);us(pt)?(P.async=!0,pt.then(function(_t){x.handleTransmuxComplete(_t)}).catch(function(_t){x.transmuxerError(_t,b,"transmuxer-interface push error")})):(P.async=!1,this.handleTransmuxComplete(pt))}},c.flush=function(r){var s=this;r.transmuxing.start=self.performance.now();var o=this.transmuxer;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:r});else if(o){var f=o.flush(r),h=us(f);h||o.async?(us(f)||(f=Promise.resolve(f)),f.then(function(v){s.handleFlushResult(v,r)}).catch(function(v){s.transmuxerError(v,r,"transmuxer-interface flush error")})):this.handleFlushResult(f,r)}},c.transmuxerError=function(r,s,o){this.hls&&(this.error=r,this.hls.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,chunkMeta:s,fatal:!1,error:r,err:r,reason:o}))},c.handleFlushResult=function(r,s){var o=this;r.forEach(function(f){o.handleTransmuxComplete(f)}),this.onFlush(s)},c.onWorkerMessage=function(r){var s=r.data,o=this.hls;switch(s.event){case"init":{var f,h=(f=this.workerContext)==null?void 0:f.objectURL;h&&self.URL.revokeObjectURL(h);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}case"workerLog":B[s.data.logType]&&B[s.data.logType](s.data.message);break;default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,o.trigger(s.event,s.data);break}}},c.configureTransmuxer=function(r){var s=this.transmuxer;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:r}):s&&s.configure(r)},c.handleTransmuxComplete=function(r){r.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(r)},d}(),D3=250,uu=2,O3=.1,B3=.05,M3=function(){function d(u,r,s,o){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=u,this.media=r,this.fragmentTracker=s,this.hls=o}var c=d.prototype;return c.destroy=function(){this.media=null,this.hls=this.fragmentTracker=null},c.poll=function(r,s){var o=this.config,f=this.media,h=this.stalled;if(f!==null){var v=f.currentTime,m=f.seeking,y=this.seeking&&!m,b=!this.seeking&&m;if(this.seeking=m,v!==r){if(this.moved=!0,h!==null){if(this.stallReported){var S=self.performance.now()-h;B.warn("playback not stuck anymore @"+v+", after "+Math.round(S)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if(b||y){this.stalled=null;return}if(!(f.paused&&!m||f.ended||f.playbackRate===0||!Oi.getBuffered(f).length)){var E=Oi.bufferInfo(f,v,0),A=E.len>0,x=E.nextStart||0;if(!(!A&&!x)){if(m){var P=E.len>uu,O=!x||s&&s.start<=v||x-v>uu&&!this.fragmentTracker.getPartialFragment(v);if(P||O)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var M,D=Math.max(x,E.start||0)-v,j=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,K=j==null||(M=j.details)==null?void 0:M.live,he=K?j.details.targetduration*2:uu,re=this.fragmentTracker.getPartialFragment(v);if(D>0&&(D<=he||re)){this._trySkipBufferHole(re);return}}var ne=self.performance.now();if(h===null){this.stalled=ne;return}var Ae=ne-h;if(!(!m&&Ae>=D3&&(this._reportStall(E),!this.media))){var xe=Oi.bufferInfo(f,v,o.maxBufferHole);this._tryFixBufferStall(xe,Ae)}}}}},c._tryFixBufferStall=function(r,s){var o=this.config,f=this.fragmentTracker,h=this.media;if(h!==null){var v=h.currentTime,m=f.getPartialFragment(v);if(m){var y=this._trySkipBufferHole(m);if(y||!this.media)return}(r.len>o.maxBufferHole||r.nextStart&&r.nextStart-v<o.maxBufferHole)&&s>o.highBufferWatchdogPeriod*1e3&&(B.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}},c._reportStall=function(r){var s=this.hls,o=this.media,f=this.stallReported;if(!f&&o){this.stallReported=!0;var h=new Error("Playback stalling at @"+o.currentTime+" due to low buffer ("+JSON.stringify(r)+")");B.warn(h.message),s.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.BUFFER_STALLED_ERROR,fatal:!1,error:h,buffer:r.len})}},c._trySkipBufferHole=function(r){var s=this.config,o=this.hls,f=this.media;if(f===null)return 0;var h=f.currentTime,v=Oi.bufferInfo(f,h,0),m=h<v.start?v.start:v.nextStart;if(m){var y=v.len<=s.maxBufferHole,b=v.len>0&&v.len<1&&f.readyState<3,S=m-h;if(S>0&&(y||b)){if(S>s.maxBufferHole){var E=this.fragmentTracker,A=!1;if(h===0){var x=E.getAppendedFrag(0,st.MAIN);x&&m<x.end&&(A=!0)}if(!A){var P=r||E.getAppendedFrag(h,st.MAIN);if(P){for(var O=!1,M=P.end;M<m;){var D=E.getPartialFragment(M);if(D)M+=D.duration;else{O=!0;break}}if(O)return 0}}}var j=Math.max(m+B3,h+O3);if(B.warn("skipping hole, adjusting currentTime from "+h+" to "+j),this.moved=!0,this.stalled=null,f.currentTime=j,r&&!r.gap){var K=new Error("fragment loaded with buffer holes, seeking from "+h+" to "+j);o.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:K,reason:K.message,frag:r})}return j}}return 0},c._tryNudgeBuffer=function(){var r=this.config,s=this.hls,o=this.media,f=this.nudgeRetry;if(o!==null){var h=o.currentTime;if(this.nudgeRetry++,f<r.nudgeMaxRetry){var v=h+(f+1)*r.nudgeOffset,m=new Error("Nudging 'currentTime' from "+h+" to "+v);B.warn(m.message),o.currentTime=v,s.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.BUFFER_NUDGE_ON_STALL,error:m,fatal:!1})}else{var y=new Error("Playhead still not moving while enough data buffered @"+h+" after "+r.nudgeMaxRetry+" nudges");B.error(y.message),s.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.BUFFER_STALLED_ERROR,error:y,fatal:!0})}}},d}(),N3=100,F3=function(d){T(c,d);function c(r,s,o){var f;return f=d.call(this,r,s,o,"[stream-controller]",st.MAIN)||this,f.audioCodecSwap=!1,f.gapController=null,f.level=-1,f._forceStartLoad=!1,f.altAudio=!1,f.audioOnly=!1,f.fragPlaying=null,f.onvplaying=null,f.onvseeked=null,f.fragLastKbps=0,f.couldBacktrack=!1,f.backtrackFragment=null,f.audioCodecSwitch=!1,f.videoBuffer=null,f._registerListeners(),f}var u=c.prototype;return u._registerListeners=function(){var s=this.hls;s.on(L.MEDIA_ATTACHED,this.onMediaAttached,this),s.on(L.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(L.MANIFEST_LOADING,this.onManifestLoading,this),s.on(L.MANIFEST_PARSED,this.onManifestParsed,this),s.on(L.LEVEL_LOADING,this.onLevelLoading,this),s.on(L.LEVEL_LOADED,this.onLevelLoaded,this),s.on(L.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),s.on(L.ERROR,this.onError,this),s.on(L.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),s.on(L.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),s.on(L.BUFFER_CREATED,this.onBufferCreated,this),s.on(L.BUFFER_FLUSHED,this.onBufferFlushed,this),s.on(L.LEVELS_UPDATED,this.onLevelsUpdated,this),s.on(L.FRAG_BUFFERED,this.onFragBuffered,this)},u._unregisterListeners=function(){var s=this.hls;s.off(L.MEDIA_ATTACHED,this.onMediaAttached,this),s.off(L.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(L.MANIFEST_LOADING,this.onManifestLoading,this),s.off(L.MANIFEST_PARSED,this.onManifestParsed,this),s.off(L.LEVEL_LOADED,this.onLevelLoaded,this),s.off(L.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),s.off(L.ERROR,this.onError,this),s.off(L.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),s.off(L.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),s.off(L.BUFFER_CREATED,this.onBufferCreated,this),s.off(L.BUFFER_FLUSHED,this.onBufferFlushed,this),s.off(L.LEVELS_UPDATED,this.onLevelsUpdated,this),s.off(L.FRAG_BUFFERED,this.onFragBuffered,this)},u.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},u.startLoad=function(s){if(this.levels){var o=this.lastCurrentTime,f=this.hls;if(this.stopLoad(),this.setInterval(N3),this.level=-1,!this.startFragRequested){var h=f.startLevel;h===-1&&(f.config.testBandwidth&&this.levels.length>1?(h=0,this.bitrateTest=!0):h=f.nextAutoLevel),this.level=f.nextLoadLevel=h,this.loadedmetadata=!1}o>0&&s===-1&&(this.log("Override startPosition with lastCurrentTime @"+o.toFixed(3)),s=o),this.state=Re.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=s,this.tick()}else this._forceStartLoad=!0,this.state=Re.STOPPED},u.stopLoad=function(){this._forceStartLoad=!1,d.prototype.stopLoad.call(this)},u.doTick=function(){switch(this.state){case Re.WAITING_LEVEL:{var s,o=this.levels,f=this.level,h=o==null||(s=o[f])==null?void 0:s.details;if(h&&(!h.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(h))break;this.state=Re.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Re.IDLE;break}break}case Re.FRAG_LOADING_WAITING_RETRY:{var v,m=self.performance.now(),y=this.retryDate;(!y||m>=y||(v=this.media)!=null&&v.seeking)&&(this.resetStartWhenNotLoaded(this.level),this.state=Re.IDLE)}break}this.state===Re.IDLE&&this.doTickIdle(),this.onTickEnd()},u.onTickEnd=function(){d.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},u.doTickIdle=function(){var s=this.hls,o=this.levelLastLoaded,f=this.levels,h=this.media,v=s.config,m=s.nextLoadLevel;if(!(o===null||!h&&(this.startFragRequested||!v.startFragPrefetch))&&!(this.altAudio&&this.audioOnly)&&f!=null&&f[m]){var y=f[m],b=this.getMainFwdBufferInfo();if(b!==null){var S=this.getLevelDetails();if(S&&this._streamEnded(b,S)){var E={};this.altAudio&&(E.type="video"),this.hls.trigger(L.BUFFER_EOS,E),this.state=Re.ENDED;return}s.loadLevel!==m&&s.manualLevel===-1&&this.log("Adapting to level "+m+" from level "+this.level),this.level=s.nextLoadLevel=m;var A=y.details;if(!A||this.state===Re.WAITING_LEVEL||A.live&&this.levelLastLoaded!==m){this.level=m,this.state=Re.WAITING_LEVEL;return}var x=b.len,P=this.getMaxBufferLength(y.maxBitrate);if(!(x>=P)){this.backtrackFragment&&this.backtrackFragment.start>b.end&&(this.backtrackFragment=null);var O=this.backtrackFragment?this.backtrackFragment.start:b.end,M=this.getNextFragment(O,A);if(this.couldBacktrack&&!this.fragPrevious&&M&&M.sn!=="initSegment"&&this.fragmentTracker.getState(M)!==fr.OK){var D,j=((D=this.backtrackFragment)!=null?D:M).sn,K=j-A.startSN,he=A.fragments[K-1];he&&M.cc===he.cc&&(M=he,this.fragmentTracker.removeFragment(he))}else this.backtrackFragment&&b.len&&(this.backtrackFragment=null);if(M&&this.isLoopLoading(M,O)){var re=M.gap;if(!re){var ne=this.audioOnly&&!this.altAudio?Oe.AUDIO:Oe.VIDEO,Ae=(ne===Oe.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;Ae&&this.afterBufferFlushed(Ae,ne,st.MAIN)}M=this.getNextFragmentLoopLoading(M,A,b,st.MAIN,P)}M&&(M.initSegment&&!M.initSegment.data&&!this.bitrateTest&&(M=M.initSegment),this.loadFragment(M,y,O))}}}},u.loadFragment=function(s,o,f){var h=this.fragmentTracker.getState(s);this.fragCurrent=s,h===fr.NOT_LOADED||h===fr.PARTIAL?s.sn==="initSegment"?this._loadInitSegment(s,o):this.bitrateTest?(this.log("Fragment "+s.sn+" of level "+s.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(s,o)):(this.startFragRequested=!0,d.prototype.loadFragment.call(this,s,o,f)):this.clearTrackerIfNeeded(s)},u.getBufferedFrag=function(s){return this.fragmentTracker.getBufferedFrag(s,st.MAIN)},u.followingBufferedFrag=function(s){return s?this.getBufferedFrag(s.end+.5):null},u.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},u.nextLevelSwitch=function(){var s=this.levels,o=this.media;if(o!=null&&o.readyState){var f,h=this.getAppendedFrag(o.currentTime);h&&h.start>1&&this.flushMainBuffer(0,h.start-1);var v=this.getLevelDetails();if(v!=null&&v.live){var m=this.getMainFwdBufferInfo();if(!m||m.len<v.targetduration*2)return}if(!o.paused&&s){var y=this.hls.nextLoadLevel,b=s[y],S=this.fragLastKbps;S&&this.fragCurrent?f=this.fragCurrent.duration*b.maxBitrate/(1e3*S)+1:f=0}else f=0;var E=this.getBufferedFrag(o.currentTime+f);if(E){var A=this.followingBufferedFrag(E);if(A){this.abortCurrentFrag();var x=A.maxStartPTS?A.maxStartPTS:A.start,P=A.duration,O=Math.max(E.end,x+Math.min(Math.max(P-this.config.maxFragLookUpTolerance,P*.5),P*.75));this.flushMainBuffer(O,Number.POSITIVE_INFINITY)}}}},u.abortCurrentFrag=function(){var s=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,s&&(s.abortRequests(),this.fragmentTracker.removeFragment(s)),this.state){case Re.KEY_LOADING:case Re.FRAG_LOADING:case Re.FRAG_LOADING_WAITING_RETRY:case Re.PARSING:case Re.PARSED:this.state=Re.IDLE;break}this.nextLoadPosition=this.getLoadPosition()},u.flushMainBuffer=function(s,o){d.prototype.flushMainBuffer.call(this,s,o,this.altAudio?"video":null)},u.onMediaAttached=function(s,o){d.prototype.onMediaAttached.call(this,s,o);var f=o.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),f.addEventListener("playing",this.onvplaying),f.addEventListener("seeked",this.onvseeked),this.gapController=new M3(this.config,f,this.fragmentTracker,this.hls)},u.onMediaDetaching=function(){var s=this.media;s&&this.onvplaying&&this.onvseeked&&(s.removeEventListener("playing",this.onvplaying),s.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),d.prototype.onMediaDetaching.call(this)},u.onMediaPlaying=function(){this.tick()},u.onMediaSeeked=function(){var s=this.media,o=s?s.currentTime:null;Z(o)&&this.log("Media seeked to "+o.toFixed(3));var f=this.getMainFwdBufferInfo();if(f===null||f.len===0){this.warn('Main forward buffer length on "seeked" event '+(f?f.len:"empty")+")");return}this.tick()},u.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(L.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},u.onManifestParsed=function(s,o){var f=!1,h=!1,v;o.levels.forEach(function(m){v=m.audioCodec,v&&(v.indexOf("mp4a.40.2")!==-1&&(f=!0),v.indexOf("mp4a.40.5")!==-1&&(h=!0))}),this.audioCodecSwitch=f&&h&&!q2(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=o.levels,this.startFragRequested=!1},u.onLevelLoading=function(s,o){var f=this.levels;if(!(!f||this.state!==Re.IDLE)){var h=f[o.level];(!h.details||h.details.live&&this.levelLastLoaded!==o.level||this.waitForCdnTuneIn(h.details))&&(this.state=Re.WAITING_LEVEL)}},u.onLevelLoaded=function(s,o){var f,h=this.levels,v=o.level,m=o.details,y=m.totalduration;if(!h){this.warn("Levels were reset while loading level "+v);return}this.log("Level "+v+" loaded ["+m.startSN+","+m.endSN+"]"+(m.lastPartSn?"[part-"+m.lastPartSn+"-"+m.lastPartIndex+"]":"")+", cc ["+m.startCC+", "+m.endCC+"] duration:"+y);var b=h[v],S=this.fragCurrent;S&&(this.state===Re.FRAG_LOADING||this.state===Re.FRAG_LOADING_WAITING_RETRY)&&(S.level!==o.level||S.urlId!==b.urlId)&&S.loader&&this.abortCurrentFrag();var E=0;if(m.live||(f=b.details)!=null&&f.live){if(m.fragments[0]||(m.deltaUpdateFailed=!0),m.deltaUpdateFailed)return;E=this.alignPlaylists(m,b.details)}if(b.details=m,this.levelLastLoaded=v,this.hls.trigger(L.LEVEL_UPDATED,{details:m,level:v}),this.state===Re.WAITING_LEVEL){if(this.waitForCdnTuneIn(m))return;this.state=Re.IDLE}this.startFragRequested?m.live&&this.synchronizeToLiveEdge(m):this.setStartPosition(m,E),this.tick()},u._handleFragmentLoadProgress=function(s){var o,f=s.frag,h=s.part,v=s.payload,m=this.levels;if(!m){this.warn("Levels were reset while fragment load was in progress. Fragment "+f.sn+" of level "+f.level+" will not be buffered");return}var y=m[f.level],b=y.details;if(!b){this.warn("Dropping fragment "+f.sn+" of level "+f.level+" after level details were reset"),this.fragmentTracker.removeFragment(f);return}var S=y.videoCodec,E=b.PTSKnown||!b.live,A=(o=f.initSegment)==null?void 0:o.data,x=this._getAudioCodec(y),P=this.transmuxer=this.transmuxer||new R3(this.hls,st.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),O=h?h.index:-1,M=O!==-1,D=new Pf(f.level,f.sn,f.stats.chunkCount,v.byteLength,O,M),j=this.initPTS[f.cc];P.push(v,A,x,S,f,h,b.totalduration,E,D,j)},u.onAudioTrackSwitching=function(s,o){var f=this.altAudio,h=!!o.url;if(!h){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var v=this.fragCurrent;v&&(this.log("Switching to main audio track, cancel main fragment load"),v.abortRequests(),this.fragmentTracker.removeFragment(v)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var m=this.hls;f&&(m.trigger(L.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),m.trigger(L.AUDIO_TRACK_SWITCHED,o)}},u.onAudioTrackSwitched=function(s,o){var f=o.id,h=!!this.hls.audioTracks[f].url;if(h){var v=this.videoBuffer;v&&this.mediaBuffer!==v&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=v)}this.altAudio=h,this.tick()},u.onBufferCreated=function(s,o){var f=o.tracks,h,v,m=!1;for(var y in f){var b=f[y];if(b.id==="main"){if(v=y,h=b,y==="video"){var S=f[y];S&&(this.videoBuffer=S.buffer)}}else m=!0}m&&h?(this.log("Alternate track found, use "+v+".buffered to schedule main fragment loading"),this.mediaBuffer=h.buffer):this.mediaBuffer=this.media},u.onFragBuffered=function(s,o){var f=o.frag,h=o.part;if(!(f&&f.type!==st.MAIN)){if(this.fragContextChanged(f)){this.warn("Fragment "+f.sn+(h?" p: "+h.index:"")+" of level "+f.level+" finished buffering, but was aborted. state: "+this.state),this.state===Re.PARSED&&(this.state=Re.IDLE);return}var v=h?h.stats:f.stats;this.fragLastKbps=Math.round(8*v.total/(v.buffering.end-v.loading.first)),f.sn!=="initSegment"&&(this.fragPrevious=f),this.fragBufferedComplete(f,h)}},u.onError=function(s,o){var f;if(o.fatal){this.state=Re.ERROR;return}switch(o.details){case z.FRAG_GAP:case z.FRAG_PARSING_ERROR:case z.FRAG_DECRYPT_ERROR:case z.FRAG_LOAD_ERROR:case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_ERROR:case z.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(st.MAIN,o);break;case z.LEVEL_LOAD_ERROR:case z.LEVEL_LOAD_TIMEOUT:case z.LEVEL_PARSING_ERROR:!o.levelRetry&&this.state===Re.WAITING_LEVEL&&((f=o.context)==null?void 0:f.type)===ye.LEVEL&&(this.state=Re.IDLE);break;case z.BUFFER_FULL_ERROR:if(!o.parent||o.parent!=="main")return;this.reduceLengthAndFlushBuffer(o)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case z.INTERNAL_EXCEPTION:this.recoverWorkerError(o);break}},u.checkBuffer=function(){var s=this.media,o=this.gapController;if(!(!s||!o||!s.readyState)){if(this.loadedmetadata||!Oi.getBuffered(s).length){var f=this.state!==Re.IDLE?this.fragCurrent:null;o.poll(this.lastCurrentTime,f)}this.lastCurrentTime=s.currentTime}},u.onFragLoadEmergencyAborted=function(){this.state=Re.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},u.onBufferFlushed=function(s,o){var f=o.type;if(f!==Oe.AUDIO||this.audioOnly&&!this.altAudio){var h=(f===Oe.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(h,f,st.MAIN)}},u.onLevelsUpdated=function(s,o){this.levels=o.levels},u.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},u.seekToStartPos=function(){var s=this.media;if(s){var o=s.currentTime,f=this.startPosition;if(f>=0&&o<f){if(s.seeking){this.log("could not seek to "+f+", already seeking at "+o);return}var h=Oi.getBuffered(s),v=h.length?h.start(0):0,m=v-f;m>0&&(m<this.config.maxBufferHole||m<this.config.maxFragLookUpTolerance)&&(this.log("adjusting start position by "+m+" to match buffer start"),f+=m,this.startPosition=f),this.log("seek to target start position "+f+" from current time "+o),s.currentTime=f}}},u._getAudioCodec=function(s){var o=this.config.defaultAudioCodec||s.audioCodec;return this.audioCodecSwap&&o&&(this.log("Swapping audio codec"),o.indexOf("mp4a.40.5")!==-1?o="mp4a.40.2":o="mp4a.40.5"),o},u._loadBitrateTestFrag=function(s,o){var f=this;s.bitrateTest=!0,this._doFragLoad(s,o).then(function(h){var v=f.hls;if(!(!h||f.fragContextChanged(s))){o.fragmentError=0,f.state=Re.IDLE,f.startFragRequested=!1,f.bitrateTest=!1;var m=s.stats;m.parsing.start=m.parsing.end=m.buffering.start=m.buffering.end=self.performance.now(),v.trigger(L.FRAG_LOADED,h),s.bitrateTest=!1}})},u._handleTransmuxComplete=function(s){var o,f="main",h=this.hls,v=s.remuxResult,m=s.chunkMeta,y=this.getCurrentContext(m);if(!y){this.resetWhenMissingContext(m);return}var b=y.frag,S=y.part,E=y.level,A=v.video,x=v.text,P=v.id3,O=v.initSegment,M=E.details,D=this.altAudio?void 0:v.audio;if(this.fragContextChanged(b)){this.fragmentTracker.removeFragment(b);return}if(this.state=Re.PARSING,O){if(O!=null&&O.tracks){var j=b.initSegment||b;this._bufferInitSegment(E,O.tracks,j,m),h.trigger(L.FRAG_PARSING_INIT_SEGMENT,{frag:j,id:f,tracks:O.tracks})}var K=O.initPTS,he=O.timescale;Z(K)&&(this.initPTS[b.cc]={baseTime:K,timescale:he},h.trigger(L.INIT_PTS_FOUND,{frag:b,id:f,initPTS:K,timescale:he}))}var re=b.sn!==(M==null?void 0:M.startSN);if(A&&v.independent!==!1){if(M){var ne=A.startPTS,Ae=A.endPTS,xe=A.startDTS,we=A.endDTS;if(S)S.elementaryStreams[A.type]={startPTS:ne,endPTS:Ae,startDTS:xe,endDTS:we};else if(A.firstKeyFrame&&A.independent&&m.id===1&&(this.couldBacktrack=!0),A.dropped&&A.independent){var Ve=this.getMainFwdBufferInfo(),dt=(Ve?Ve.end:this.getLoadPosition())+this.config.maxBufferHole,pt=A.firstKeyFramePTS?A.firstKeyFramePTS:ne;if(re&&dt<pt-this.config.maxBufferHole){this.backtrack(b);return}b.setElementaryStreamInfo(A.type,b.start,Ae,b.start,we,!0)}b.setElementaryStreamInfo(A.type,ne,Ae,xe,we),this.backtrackFragment&&(this.backtrackFragment=b),this.bufferFragmentData(A,b,S,m)}}else if(re&&v.independent===!1){this.backtrack(b);return}if(D){var _t=D.startPTS,Bt=D.endPTS,St=D.startDTS,zt=D.endDTS;S&&(S.elementaryStreams[Oe.AUDIO]={startPTS:_t,endPTS:Bt,startDTS:St,endDTS:zt}),b.setElementaryStreamInfo(Oe.AUDIO,_t,Bt,St,zt),this.bufferFragmentData(D,b,S,m)}if(M&&P!=null&&(o=P.samples)!=null&&o.length){var Ct={id:f,frag:b,details:M,samples:P.samples};h.trigger(L.FRAG_PARSING_METADATA,Ct)}if(M&&x){var ui={id:f,frag:b,details:M,samples:x.samples};h.trigger(L.FRAG_PARSING_USERDATA,ui)}},u._bufferInitSegment=function(s,o,f,h){var v=this;if(this.state===Re.PARSING){this.audioOnly=!!o.audio&&!o.video,this.altAudio&&!this.audioOnly&&delete o.audio;var m=o.audio,y=o.video,b=o.audiovideo;if(m){var S=s.audioCodec,E=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(S&&(S.indexOf("mp4a.40.5")!==-1?S="mp4a.40.2":S="mp4a.40.5"),m.metadata.channelCount!==1&&E.indexOf("firefox")===-1&&(S="mp4a.40.5")),E.indexOf("android")!==-1&&m.container!=="audio/mpeg"&&(S="mp4a.40.2",this.log("Android: force audio codec to "+S)),s.audioCodec&&s.audioCodec!==S&&this.log('Swapping manifest audio codec "'+s.audioCodec+'" for "'+S+'"'),m.levelCodec=S,m.id="main",this.log("Init audio buffer, container:"+m.container+", codecs[selected/level/parsed]=["+(S||"")+"/"+(s.audioCodec||"")+"/"+m.codec+"]")}y&&(y.levelCodec=s.videoCodec,y.id="main",this.log("Init video buffer, container:"+y.container+", codecs[level/parsed]=["+(s.videoCodec||"")+"/"+y.codec+"]")),b&&this.log("Init audiovideo buffer, container:"+b.container+", codecs[level/parsed]=["+(s.attrs.CODECS||"")+"/"+b.codec+"]"),this.hls.trigger(L.BUFFER_CODECS,o),Object.keys(o).forEach(function(A){var x=o[A],P=x.initSegment;P!=null&&P.byteLength&&v.hls.trigger(L.BUFFER_APPENDING,{type:A,data:P,frag:f,part:null,chunkMeta:h,parent:f.type})}),this.tick()}},u.getMainFwdBufferInfo=function(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,st.MAIN)},u.backtrack=function(s){this.couldBacktrack=!0,this.backtrackFragment=s,this.resetTransmuxer(),this.flushBufferGap(s),this.fragmentTracker.removeFragment(s),this.fragPrevious=null,this.nextLoadPosition=s.start,this.state=Re.IDLE},u.checkFragmentChanged=function(){var s=this.media,o=null;if(s&&s.readyState>1&&s.seeking===!1){var f=s.currentTime;if(Oi.isBuffered(s,f)?o=this.getAppendedFrag(f):Oi.isBuffered(s,f+.1)&&(o=this.getAppendedFrag(f+.1)),o){this.backtrackFragment=null;var h=this.fragPlaying,v=o.level;(!h||o.sn!==h.sn||h.level!==v||o.urlId!==h.urlId)&&(this.fragPlaying=o,this.hls.trigger(L.FRAG_CHANGED,{frag:o}),(!h||h.level!==v)&&this.hls.trigger(L.LEVEL_SWITCHED,{level:v}))}}},p(c,[{key:"nextLevel",get:function(){var s=this.nextBufferedFrag;return s?s.level:-1}},{key:"currentFrag",get:function(){var s=this.media;return s?this.fragPlaying||this.getAppendedFrag(s.currentTime):null}},{key:"currentProgramDateTime",get:function(){var s=this.media;if(s){var o=s.currentTime,f=this.currentFrag;if(f&&Z(o)&&Z(f.programDateTime)){var h=f.programDateTime+(o-f.start)*1e3;return new Date(h)}}return null}},{key:"currentLevel",get:function(){var s=this.currentFrag;return s?s.level:-1}},{key:"nextBufferedFrag",get:function(){var s=this.currentFrag;return s?this.followingBufferedFrag(s):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),c}(K2),Gs=function(){function d(u,r,s){r===void 0&&(r=0),s===void 0&&(s=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=u,this.alpha_=u?Math.exp(Math.log(.5)/u):0,this.estimate_=r,this.totalWeight_=s}var c=d.prototype;return c.sample=function(r,s){var o=Math.pow(this.alpha_,r);this.estimate_=s*(1-o)+o*this.estimate_,this.totalWeight_+=r},c.getTotalWeight=function(){return this.totalWeight_},c.getEstimate=function(){if(this.alpha_){var r=1-Math.pow(this.alpha_,this.totalWeight_);if(r)return this.estimate_/r}return this.estimate_},d}(),U3=function(){function d(u,r,s,o){o===void 0&&(o=100),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_=.001,this.minDelayMs_=50,this.slow_=new Gs(u),this.fast_=new Gs(r),this.defaultTTFB_=o,this.ttfb_=new Gs(u)}var c=d.prototype;return c.update=function(r,s){var o=this.slow_,f=this.fast_,h=this.ttfb_;o.halfLife!==r&&(this.slow_=new Gs(r,o.getEstimate(),o.getTotalWeight())),f.halfLife!==s&&(this.fast_=new Gs(s,f.getEstimate(),f.getTotalWeight())),h.halfLife!==r&&(this.ttfb_=new Gs(r,h.getEstimate(),h.getTotalWeight()))},c.sample=function(r,s){r=Math.max(r,this.minDelayMs_);var o=8*s,f=r/1e3,h=o/f;this.fast_.sample(f,h),this.slow_.sample(f,h)},c.sampleTTFB=function(r){var s=r/1e3,o=Math.sqrt(2)*Math.exp(-Math.pow(s,2)/2);this.ttfb_.sample(o,Math.max(r,5))},c.canEstimate=function(){return this.fast_.getTotalWeight()>=this.minWeight_},c.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},c.getEstimateTTFB=function(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_},c.destroy=function(){},d}(),V3=function(){function d(u){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=u;var r=u.config;this.bwEstimator=new U3(r.abrEwmaSlowVoD,r.abrEwmaFastVoD,r.abrEwmaDefaultEstimate),this.registerListeners()}var c=d.prototype;return c.registerListeners=function(){var r=this.hls;r.on(L.FRAG_LOADING,this.onFragLoading,this),r.on(L.FRAG_LOADED,this.onFragLoaded,this),r.on(L.FRAG_BUFFERED,this.onFragBuffered,this),r.on(L.LEVEL_SWITCHING,this.onLevelSwitching,this),r.on(L.LEVEL_LOADED,this.onLevelLoaded,this)},c.unregisterListeners=function(){var r=this.hls;r.off(L.FRAG_LOADING,this.onFragLoading,this),r.off(L.FRAG_LOADED,this.onFragLoaded,this),r.off(L.FRAG_BUFFERED,this.onFragBuffered,this),r.off(L.LEVEL_SWITCHING,this.onLevelSwitching,this),r.off(L.LEVEL_LOADED,this.onLevelLoaded,this)},c.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},c.onFragLoading=function(r,s){var o,f=s.frag;this.ignoreFragment(f)||(this.fragCurrent=f,this.partCurrent=(o=s.part)!=null?o:null,this.clearTimer(),this.timer=self.setInterval(this.onCheck,100))},c.onLevelSwitching=function(r,s){this.clearTimer()},c.getTimeToLoadFrag=function(r,s,o,f){var h=r+o/s,v=f?this.lastLevelLoadSec:0;return h+v},c.onLevelLoaded=function(r,s){var o=this.hls.config,f=s.stats,h=f.total,v=f.bwEstimate;Z(h)&&Z(v)&&(this.lastLevelLoadSec=8*h/v),s.details.live?this.bwEstimator.update(o.abrEwmaSlowLive,o.abrEwmaFastLive):this.bwEstimator.update(o.abrEwmaSlowVoD,o.abrEwmaFastVoD)},c._abandonRulesCheck=function(){var r=this.fragCurrent,s=this.partCurrent,o=this.hls,f=o.autoLevelEnabled,h=o.media;if(!(!r||!h)){var v=performance.now(),m=s?s.stats:r.stats,y=s?s.duration:r.duration,b=v-m.loading.start;if(m.aborted||m.loaded&&m.loaded===m.total||r.level===0){this.clearTimer(),this._nextAutoLevel=-1;return}if(!(!f||h.paused||!h.playbackRate||!h.readyState)){var S=o.mainForwardBufferInfo;if(S!==null){var E=this.bwEstimator.getEstimateTTFB(),A=Math.abs(h.playbackRate);if(!(b<=Math.max(E,1e3*(y/(A*2))))){var x=S.len/A;if(!(x>=2*y/A)){var P=m.loading.first?m.loading.first-m.loading.start:-1,O=m.loaded&&P>-1,M=this.bwEstimator.getEstimate(),D=o.levels,j=o.minAutoLevel,K=D[r.level],he=m.total||Math.max(m.loaded,Math.round(y*K.maxBitrate/8)),re=b-P;re<1&&O&&(re=Math.min(b,m.loaded*8/M));var ne=O?m.loaded*1e3/re:0,Ae=ne?(he-m.loaded)/ne:he*8/M+E/1e3;if(!(Ae<=x)){var xe=ne?ne*8:M,we=Number.POSITIVE_INFINITY,Ve;for(Ve=r.level-1;Ve>j;Ve--){var dt=D[Ve].maxBitrate;if(we=this.getTimeToLoadFrag(E/1e3,xe,y*dt,!D[Ve].details),we<x)break}we>=Ae||we>y*10||(o.nextLoadLevel=Ve,O?this.bwEstimator.sample(b-Math.min(E,P),m.loaded):this.bwEstimator.sampleTTFB(b),this.clearTimer(),B.warn("[abr] Fragment "+r.sn+(s?" part "+s.index:"")+" of level "+r.level+` is loading too slowly;
|
|
19
|
+
initSegmentChange: `+Pe);var dt=new E3(o,f,s,m,S);this.configureTransmuxer(dt)}if(this.frag=h,this.part=v,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:r,decryptdata:M,chunkMeta:b,state:Ve},r instanceof ArrayBuffer?[r]:[]);else if(P){var pt=P.push(r,M,b,Ve);us(pt)?(P.async=!0,pt.then(function(_t){x.handleTransmuxComplete(_t)}).catch(function(_t){x.transmuxerError(_t,b,"transmuxer-interface push error")})):(P.async=!1,this.handleTransmuxComplete(pt))}},c.flush=function(r){var s=this;r.transmuxing.start=self.performance.now();var o=this.transmuxer;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:r});else if(o){var f=o.flush(r),h=us(f);h||o.async?(us(f)||(f=Promise.resolve(f)),f.then(function(v){s.handleFlushResult(v,r)}).catch(function(v){s.transmuxerError(v,r,"transmuxer-interface flush error")})):this.handleFlushResult(f,r)}},c.transmuxerError=function(r,s,o){this.hls&&(this.error=r,this.hls.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,chunkMeta:s,fatal:!1,error:r,err:r,reason:o}))},c.handleFlushResult=function(r,s){var o=this;r.forEach(function(f){o.handleTransmuxComplete(f)}),this.onFlush(s)},c.onWorkerMessage=function(r){var s=r.data,o=this.hls;switch(s.event){case"init":{var f,h=(f=this.workerContext)==null?void 0:f.objectURL;h&&self.URL.revokeObjectURL(h);break}case"transmuxComplete":{this.handleTransmuxComplete(s.data);break}case"flush":{this.onFlush(s.data);break}case"workerLog":B[s.data.logType]&&B[s.data.logType](s.data.message);break;default:{s.data=s.data||{},s.data.frag=this.frag,s.data.id=this.id,o.trigger(s.event,s.data);break}}},c.configureTransmuxer=function(r){var s=this.transmuxer;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:r}):s&&s.configure(r)},c.handleTransmuxComplete=function(r){r.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(r)},d}(),D3=250,uu=2,O3=.1,B3=.05,M3=function(){function d(u,r,s,o){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=u,this.media=r,this.fragmentTracker=s,this.hls=o}var c=d.prototype;return c.destroy=function(){this.media=null,this.hls=this.fragmentTracker=null},c.poll=function(r,s){var o=this.config,f=this.media,h=this.stalled;if(f!==null){var v=f.currentTime,m=f.seeking,y=this.seeking&&!m,b=!this.seeking&&m;if(this.seeking=m,v!==r){if(this.moved=!0,h!==null){if(this.stallReported){var S=self.performance.now()-h;B.warn("playback not stuck anymore @"+v+", after "+Math.round(S)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if(b||y){this.stalled=null;return}if(!(f.paused&&!m||f.ended||f.playbackRate===0||!Oi.getBuffered(f).length)){var E=Oi.bufferInfo(f,v,0),A=E.len>0,x=E.nextStart||0;if(!(!A&&!x)){if(m){var P=E.len>uu,O=!x||s&&s.start<=v||x-v>uu&&!this.fragmentTracker.getPartialFragment(v);if(P||O)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var M,D=Math.max(x,E.start||0)-v,j=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,K=j==null||(M=j.details)==null?void 0:M.live,he=K?j.details.targetduration*2:uu,re=this.fragmentTracker.getPartialFragment(v);if(D>0&&(D<=he||re)){this._trySkipBufferHole(re);return}}var ne=self.performance.now();if(h===null){this.stalled=ne;return}var xe=ne-h;if(!(!m&&xe>=D3&&(this._reportStall(E),!this.media))){var we=Oi.bufferInfo(f,v,o.maxBufferHole);this._tryFixBufferStall(we,xe)}}}}},c._tryFixBufferStall=function(r,s){var o=this.config,f=this.fragmentTracker,h=this.media;if(h!==null){var v=h.currentTime,m=f.getPartialFragment(v);if(m){var y=this._trySkipBufferHole(m);if(y||!this.media)return}(r.len>o.maxBufferHole||r.nextStart&&r.nextStart-v<o.maxBufferHole)&&s>o.highBufferWatchdogPeriod*1e3&&(B.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}},c._reportStall=function(r){var s=this.hls,o=this.media,f=this.stallReported;if(!f&&o){this.stallReported=!0;var h=new Error("Playback stalling at @"+o.currentTime+" due to low buffer ("+JSON.stringify(r)+")");B.warn(h.message),s.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.BUFFER_STALLED_ERROR,fatal:!1,error:h,buffer:r.len})}},c._trySkipBufferHole=function(r){var s=this.config,o=this.hls,f=this.media;if(f===null)return 0;var h=f.currentTime,v=Oi.bufferInfo(f,h,0),m=h<v.start?v.start:v.nextStart;if(m){var y=v.len<=s.maxBufferHole,b=v.len>0&&v.len<1&&f.readyState<3,S=m-h;if(S>0&&(y||b)){if(S>s.maxBufferHole){var E=this.fragmentTracker,A=!1;if(h===0){var x=E.getAppendedFrag(0,st.MAIN);x&&m<x.end&&(A=!0)}if(!A){var P=r||E.getAppendedFrag(h,st.MAIN);if(P){for(var O=!1,M=P.end;M<m;){var D=E.getPartialFragment(M);if(D)M+=D.duration;else{O=!0;break}}if(O)return 0}}}var j=Math.max(m+B3,h+O3);if(B.warn("skipping hole, adjusting currentTime from "+h+" to "+j),this.moved=!0,this.stalled=null,f.currentTime=j,r&&!r.gap){var K=new Error("fragment loaded with buffer holes, seeking from "+h+" to "+j);o.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:K,reason:K.message,frag:r})}return j}}return 0},c._tryNudgeBuffer=function(){var r=this.config,s=this.hls,o=this.media,f=this.nudgeRetry;if(o!==null){var h=o.currentTime;if(this.nudgeRetry++,f<r.nudgeMaxRetry){var v=h+(f+1)*r.nudgeOffset,m=new Error("Nudging 'currentTime' from "+h+" to "+v);B.warn(m.message),o.currentTime=v,s.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.BUFFER_NUDGE_ON_STALL,error:m,fatal:!1})}else{var y=new Error("Playhead still not moving while enough data buffered @"+h+" after "+r.nudgeMaxRetry+" nudges");B.error(y.message),s.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.BUFFER_STALLED_ERROR,error:y,fatal:!0})}}},d}(),N3=100,F3=function(d){T(c,d);function c(r,s,o){var f;return f=d.call(this,r,s,o,"[stream-controller]",st.MAIN)||this,f.audioCodecSwap=!1,f.gapController=null,f.level=-1,f._forceStartLoad=!1,f.altAudio=!1,f.audioOnly=!1,f.fragPlaying=null,f.onvplaying=null,f.onvseeked=null,f.fragLastKbps=0,f.couldBacktrack=!1,f.backtrackFragment=null,f.audioCodecSwitch=!1,f.videoBuffer=null,f._registerListeners(),f}var u=c.prototype;return u._registerListeners=function(){var s=this.hls;s.on(L.MEDIA_ATTACHED,this.onMediaAttached,this),s.on(L.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(L.MANIFEST_LOADING,this.onManifestLoading,this),s.on(L.MANIFEST_PARSED,this.onManifestParsed,this),s.on(L.LEVEL_LOADING,this.onLevelLoading,this),s.on(L.LEVEL_LOADED,this.onLevelLoaded,this),s.on(L.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),s.on(L.ERROR,this.onError,this),s.on(L.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),s.on(L.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),s.on(L.BUFFER_CREATED,this.onBufferCreated,this),s.on(L.BUFFER_FLUSHED,this.onBufferFlushed,this),s.on(L.LEVELS_UPDATED,this.onLevelsUpdated,this),s.on(L.FRAG_BUFFERED,this.onFragBuffered,this)},u._unregisterListeners=function(){var s=this.hls;s.off(L.MEDIA_ATTACHED,this.onMediaAttached,this),s.off(L.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(L.MANIFEST_LOADING,this.onManifestLoading,this),s.off(L.MANIFEST_PARSED,this.onManifestParsed,this),s.off(L.LEVEL_LOADED,this.onLevelLoaded,this),s.off(L.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),s.off(L.ERROR,this.onError,this),s.off(L.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),s.off(L.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),s.off(L.BUFFER_CREATED,this.onBufferCreated,this),s.off(L.BUFFER_FLUSHED,this.onBufferFlushed,this),s.off(L.LEVELS_UPDATED,this.onLevelsUpdated,this),s.off(L.FRAG_BUFFERED,this.onFragBuffered,this)},u.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},u.startLoad=function(s){if(this.levels){var o=this.lastCurrentTime,f=this.hls;if(this.stopLoad(),this.setInterval(N3),this.level=-1,!this.startFragRequested){var h=f.startLevel;h===-1&&(f.config.testBandwidth&&this.levels.length>1?(h=0,this.bitrateTest=!0):h=f.nextAutoLevel),this.level=f.nextLoadLevel=h,this.loadedmetadata=!1}o>0&&s===-1&&(this.log("Override startPosition with lastCurrentTime @"+o.toFixed(3)),s=o),this.state=Re.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=s,this.tick()}else this._forceStartLoad=!0,this.state=Re.STOPPED},u.stopLoad=function(){this._forceStartLoad=!1,d.prototype.stopLoad.call(this)},u.doTick=function(){switch(this.state){case Re.WAITING_LEVEL:{var s,o=this.levels,f=this.level,h=o==null||(s=o[f])==null?void 0:s.details;if(h&&(!h.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(h))break;this.state=Re.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Re.IDLE;break}break}case Re.FRAG_LOADING_WAITING_RETRY:{var v,m=self.performance.now(),y=this.retryDate;(!y||m>=y||(v=this.media)!=null&&v.seeking)&&(this.resetStartWhenNotLoaded(this.level),this.state=Re.IDLE)}break}this.state===Re.IDLE&&this.doTickIdle(),this.onTickEnd()},u.onTickEnd=function(){d.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},u.doTickIdle=function(){var s=this.hls,o=this.levelLastLoaded,f=this.levels,h=this.media,v=s.config,m=s.nextLoadLevel;if(!(o===null||!h&&(this.startFragRequested||!v.startFragPrefetch))&&!(this.altAudio&&this.audioOnly)&&f!=null&&f[m]){var y=f[m],b=this.getMainFwdBufferInfo();if(b!==null){var S=this.getLevelDetails();if(S&&this._streamEnded(b,S)){var E={};this.altAudio&&(E.type="video"),this.hls.trigger(L.BUFFER_EOS,E),this.state=Re.ENDED;return}s.loadLevel!==m&&s.manualLevel===-1&&this.log("Adapting to level "+m+" from level "+this.level),this.level=s.nextLoadLevel=m;var A=y.details;if(!A||this.state===Re.WAITING_LEVEL||A.live&&this.levelLastLoaded!==m){this.level=m,this.state=Re.WAITING_LEVEL;return}var x=b.len,P=this.getMaxBufferLength(y.maxBitrate);if(!(x>=P)){this.backtrackFragment&&this.backtrackFragment.start>b.end&&(this.backtrackFragment=null);var O=this.backtrackFragment?this.backtrackFragment.start:b.end,M=this.getNextFragment(O,A);if(this.couldBacktrack&&!this.fragPrevious&&M&&M.sn!=="initSegment"&&this.fragmentTracker.getState(M)!==fr.OK){var D,j=((D=this.backtrackFragment)!=null?D:M).sn,K=j-A.startSN,he=A.fragments[K-1];he&&M.cc===he.cc&&(M=he,this.fragmentTracker.removeFragment(he))}else this.backtrackFragment&&b.len&&(this.backtrackFragment=null);if(M&&this.isLoopLoading(M,O)){var re=M.gap;if(!re){var ne=this.audioOnly&&!this.altAudio?Oe.AUDIO:Oe.VIDEO,xe=(ne===Oe.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;xe&&this.afterBufferFlushed(xe,ne,st.MAIN)}M=this.getNextFragmentLoopLoading(M,A,b,st.MAIN,P)}M&&(M.initSegment&&!M.initSegment.data&&!this.bitrateTest&&(M=M.initSegment),this.loadFragment(M,y,O))}}}},u.loadFragment=function(s,o,f){var h=this.fragmentTracker.getState(s);this.fragCurrent=s,h===fr.NOT_LOADED||h===fr.PARTIAL?s.sn==="initSegment"?this._loadInitSegment(s,o):this.bitrateTest?(this.log("Fragment "+s.sn+" of level "+s.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(s,o)):(this.startFragRequested=!0,d.prototype.loadFragment.call(this,s,o,f)):this.clearTrackerIfNeeded(s)},u.getBufferedFrag=function(s){return this.fragmentTracker.getBufferedFrag(s,st.MAIN)},u.followingBufferedFrag=function(s){return s?this.getBufferedFrag(s.end+.5):null},u.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},u.nextLevelSwitch=function(){var s=this.levels,o=this.media;if(o!=null&&o.readyState){var f,h=this.getAppendedFrag(o.currentTime);h&&h.start>1&&this.flushMainBuffer(0,h.start-1);var v=this.getLevelDetails();if(v!=null&&v.live){var m=this.getMainFwdBufferInfo();if(!m||m.len<v.targetduration*2)return}if(!o.paused&&s){var y=this.hls.nextLoadLevel,b=s[y],S=this.fragLastKbps;S&&this.fragCurrent?f=this.fragCurrent.duration*b.maxBitrate/(1e3*S)+1:f=0}else f=0;var E=this.getBufferedFrag(o.currentTime+f);if(E){var A=this.followingBufferedFrag(E);if(A){this.abortCurrentFrag();var x=A.maxStartPTS?A.maxStartPTS:A.start,P=A.duration,O=Math.max(E.end,x+Math.min(Math.max(P-this.config.maxFragLookUpTolerance,P*.5),P*.75));this.flushMainBuffer(O,Number.POSITIVE_INFINITY)}}}},u.abortCurrentFrag=function(){var s=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,s&&(s.abortRequests(),this.fragmentTracker.removeFragment(s)),this.state){case Re.KEY_LOADING:case Re.FRAG_LOADING:case Re.FRAG_LOADING_WAITING_RETRY:case Re.PARSING:case Re.PARSED:this.state=Re.IDLE;break}this.nextLoadPosition=this.getLoadPosition()},u.flushMainBuffer=function(s,o){d.prototype.flushMainBuffer.call(this,s,o,this.altAudio?"video":null)},u.onMediaAttached=function(s,o){d.prototype.onMediaAttached.call(this,s,o);var f=o.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),f.addEventListener("playing",this.onvplaying),f.addEventListener("seeked",this.onvseeked),this.gapController=new M3(this.config,f,this.fragmentTracker,this.hls)},u.onMediaDetaching=function(){var s=this.media;s&&this.onvplaying&&this.onvseeked&&(s.removeEventListener("playing",this.onvplaying),s.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),d.prototype.onMediaDetaching.call(this)},u.onMediaPlaying=function(){this.tick()},u.onMediaSeeked=function(){var s=this.media,o=s?s.currentTime:null;Z(o)&&this.log("Media seeked to "+o.toFixed(3));var f=this.getMainFwdBufferInfo();if(f===null||f.len===0){this.warn('Main forward buffer length on "seeked" event '+(f?f.len:"empty")+")");return}this.tick()},u.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(L.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},u.onManifestParsed=function(s,o){var f=!1,h=!1,v;o.levels.forEach(function(m){v=m.audioCodec,v&&(v.indexOf("mp4a.40.2")!==-1&&(f=!0),v.indexOf("mp4a.40.5")!==-1&&(h=!0))}),this.audioCodecSwitch=f&&h&&!q2(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=o.levels,this.startFragRequested=!1},u.onLevelLoading=function(s,o){var f=this.levels;if(!(!f||this.state!==Re.IDLE)){var h=f[o.level];(!h.details||h.details.live&&this.levelLastLoaded!==o.level||this.waitForCdnTuneIn(h.details))&&(this.state=Re.WAITING_LEVEL)}},u.onLevelLoaded=function(s,o){var f,h=this.levels,v=o.level,m=o.details,y=m.totalduration;if(!h){this.warn("Levels were reset while loading level "+v);return}this.log("Level "+v+" loaded ["+m.startSN+","+m.endSN+"]"+(m.lastPartSn?"[part-"+m.lastPartSn+"-"+m.lastPartIndex+"]":"")+", cc ["+m.startCC+", "+m.endCC+"] duration:"+y);var b=h[v],S=this.fragCurrent;S&&(this.state===Re.FRAG_LOADING||this.state===Re.FRAG_LOADING_WAITING_RETRY)&&(S.level!==o.level||S.urlId!==b.urlId)&&S.loader&&this.abortCurrentFrag();var E=0;if(m.live||(f=b.details)!=null&&f.live){if(m.fragments[0]||(m.deltaUpdateFailed=!0),m.deltaUpdateFailed)return;E=this.alignPlaylists(m,b.details)}if(b.details=m,this.levelLastLoaded=v,this.hls.trigger(L.LEVEL_UPDATED,{details:m,level:v}),this.state===Re.WAITING_LEVEL){if(this.waitForCdnTuneIn(m))return;this.state=Re.IDLE}this.startFragRequested?m.live&&this.synchronizeToLiveEdge(m):this.setStartPosition(m,E),this.tick()},u._handleFragmentLoadProgress=function(s){var o,f=s.frag,h=s.part,v=s.payload,m=this.levels;if(!m){this.warn("Levels were reset while fragment load was in progress. Fragment "+f.sn+" of level "+f.level+" will not be buffered");return}var y=m[f.level],b=y.details;if(!b){this.warn("Dropping fragment "+f.sn+" of level "+f.level+" after level details were reset"),this.fragmentTracker.removeFragment(f);return}var S=y.videoCodec,E=b.PTSKnown||!b.live,A=(o=f.initSegment)==null?void 0:o.data,x=this._getAudioCodec(y),P=this.transmuxer=this.transmuxer||new R3(this.hls,st.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),O=h?h.index:-1,M=O!==-1,D=new Pf(f.level,f.sn,f.stats.chunkCount,v.byteLength,O,M),j=this.initPTS[f.cc];P.push(v,A,x,S,f,h,b.totalduration,E,D,j)},u.onAudioTrackSwitching=function(s,o){var f=this.altAudio,h=!!o.url;if(!h){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var v=this.fragCurrent;v&&(this.log("Switching to main audio track, cancel main fragment load"),v.abortRequests(),this.fragmentTracker.removeFragment(v)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var m=this.hls;f&&(m.trigger(L.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),m.trigger(L.AUDIO_TRACK_SWITCHED,o)}},u.onAudioTrackSwitched=function(s,o){var f=o.id,h=!!this.hls.audioTracks[f].url;if(h){var v=this.videoBuffer;v&&this.mediaBuffer!==v&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=v)}this.altAudio=h,this.tick()},u.onBufferCreated=function(s,o){var f=o.tracks,h,v,m=!1;for(var y in f){var b=f[y];if(b.id==="main"){if(v=y,h=b,y==="video"){var S=f[y];S&&(this.videoBuffer=S.buffer)}}else m=!0}m&&h?(this.log("Alternate track found, use "+v+".buffered to schedule main fragment loading"),this.mediaBuffer=h.buffer):this.mediaBuffer=this.media},u.onFragBuffered=function(s,o){var f=o.frag,h=o.part;if(!(f&&f.type!==st.MAIN)){if(this.fragContextChanged(f)){this.warn("Fragment "+f.sn+(h?" p: "+h.index:"")+" of level "+f.level+" finished buffering, but was aborted. state: "+this.state),this.state===Re.PARSED&&(this.state=Re.IDLE);return}var v=h?h.stats:f.stats;this.fragLastKbps=Math.round(8*v.total/(v.buffering.end-v.loading.first)),f.sn!=="initSegment"&&(this.fragPrevious=f),this.fragBufferedComplete(f,h)}},u.onError=function(s,o){var f;if(o.fatal){this.state=Re.ERROR;return}switch(o.details){case z.FRAG_GAP:case z.FRAG_PARSING_ERROR:case z.FRAG_DECRYPT_ERROR:case z.FRAG_LOAD_ERROR:case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_ERROR:case z.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(st.MAIN,o);break;case z.LEVEL_LOAD_ERROR:case z.LEVEL_LOAD_TIMEOUT:case z.LEVEL_PARSING_ERROR:!o.levelRetry&&this.state===Re.WAITING_LEVEL&&((f=o.context)==null?void 0:f.type)===ye.LEVEL&&(this.state=Re.IDLE);break;case z.BUFFER_FULL_ERROR:if(!o.parent||o.parent!=="main")return;this.reduceLengthAndFlushBuffer(o)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case z.INTERNAL_EXCEPTION:this.recoverWorkerError(o);break}},u.checkBuffer=function(){var s=this.media,o=this.gapController;if(!(!s||!o||!s.readyState)){if(this.loadedmetadata||!Oi.getBuffered(s).length){var f=this.state!==Re.IDLE?this.fragCurrent:null;o.poll(this.lastCurrentTime,f)}this.lastCurrentTime=s.currentTime}},u.onFragLoadEmergencyAborted=function(){this.state=Re.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},u.onBufferFlushed=function(s,o){var f=o.type;if(f!==Oe.AUDIO||this.audioOnly&&!this.altAudio){var h=(f===Oe.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(h,f,st.MAIN)}},u.onLevelsUpdated=function(s,o){this.levels=o.levels},u.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},u.seekToStartPos=function(){var s=this.media;if(s){var o=s.currentTime,f=this.startPosition;if(f>=0&&o<f){if(s.seeking){this.log("could not seek to "+f+", already seeking at "+o);return}var h=Oi.getBuffered(s),v=h.length?h.start(0):0,m=v-f;m>0&&(m<this.config.maxBufferHole||m<this.config.maxFragLookUpTolerance)&&(this.log("adjusting start position by "+m+" to match buffer start"),f+=m,this.startPosition=f),this.log("seek to target start position "+f+" from current time "+o),s.currentTime=f}}},u._getAudioCodec=function(s){var o=this.config.defaultAudioCodec||s.audioCodec;return this.audioCodecSwap&&o&&(this.log("Swapping audio codec"),o.indexOf("mp4a.40.5")!==-1?o="mp4a.40.2":o="mp4a.40.5"),o},u._loadBitrateTestFrag=function(s,o){var f=this;s.bitrateTest=!0,this._doFragLoad(s,o).then(function(h){var v=f.hls;if(!(!h||f.fragContextChanged(s))){o.fragmentError=0,f.state=Re.IDLE,f.startFragRequested=!1,f.bitrateTest=!1;var m=s.stats;m.parsing.start=m.parsing.end=m.buffering.start=m.buffering.end=self.performance.now(),v.trigger(L.FRAG_LOADED,h),s.bitrateTest=!1}})},u._handleTransmuxComplete=function(s){var o,f="main",h=this.hls,v=s.remuxResult,m=s.chunkMeta,y=this.getCurrentContext(m);if(!y){this.resetWhenMissingContext(m);return}var b=y.frag,S=y.part,E=y.level,A=v.video,x=v.text,P=v.id3,O=v.initSegment,M=E.details,D=this.altAudio?void 0:v.audio;if(this.fragContextChanged(b)){this.fragmentTracker.removeFragment(b);return}if(this.state=Re.PARSING,O){if(O!=null&&O.tracks){var j=b.initSegment||b;this._bufferInitSegment(E,O.tracks,j,m),h.trigger(L.FRAG_PARSING_INIT_SEGMENT,{frag:j,id:f,tracks:O.tracks})}var K=O.initPTS,he=O.timescale;Z(K)&&(this.initPTS[b.cc]={baseTime:K,timescale:he},h.trigger(L.INIT_PTS_FOUND,{frag:b,id:f,initPTS:K,timescale:he}))}var re=b.sn!==(M==null?void 0:M.startSN);if(A&&v.independent!==!1){if(M){var ne=A.startPTS,xe=A.endPTS,we=A.startDTS,Pe=A.endDTS;if(S)S.elementaryStreams[A.type]={startPTS:ne,endPTS:xe,startDTS:we,endDTS:Pe};else if(A.firstKeyFrame&&A.independent&&m.id===1&&(this.couldBacktrack=!0),A.dropped&&A.independent){var Ve=this.getMainFwdBufferInfo(),dt=(Ve?Ve.end:this.getLoadPosition())+this.config.maxBufferHole,pt=A.firstKeyFramePTS?A.firstKeyFramePTS:ne;if(re&&dt<pt-this.config.maxBufferHole){this.backtrack(b);return}b.setElementaryStreamInfo(A.type,b.start,xe,b.start,Pe,!0)}b.setElementaryStreamInfo(A.type,ne,xe,we,Pe),this.backtrackFragment&&(this.backtrackFragment=b),this.bufferFragmentData(A,b,S,m)}}else if(re&&v.independent===!1){this.backtrack(b);return}if(D){var _t=D.startPTS,Bt=D.endPTS,St=D.startDTS,zt=D.endDTS;S&&(S.elementaryStreams[Oe.AUDIO]={startPTS:_t,endPTS:Bt,startDTS:St,endDTS:zt}),b.setElementaryStreamInfo(Oe.AUDIO,_t,Bt,St,zt),this.bufferFragmentData(D,b,S,m)}if(M&&P!=null&&(o=P.samples)!=null&&o.length){var Ct={id:f,frag:b,details:M,samples:P.samples};h.trigger(L.FRAG_PARSING_METADATA,Ct)}if(M&&x){var ui={id:f,frag:b,details:M,samples:x.samples};h.trigger(L.FRAG_PARSING_USERDATA,ui)}},u._bufferInitSegment=function(s,o,f,h){var v=this;if(this.state===Re.PARSING){this.audioOnly=!!o.audio&&!o.video,this.altAudio&&!this.audioOnly&&delete o.audio;var m=o.audio,y=o.video,b=o.audiovideo;if(m){var S=s.audioCodec,E=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(S&&(S.indexOf("mp4a.40.5")!==-1?S="mp4a.40.2":S="mp4a.40.5"),m.metadata.channelCount!==1&&E.indexOf("firefox")===-1&&(S="mp4a.40.5")),E.indexOf("android")!==-1&&m.container!=="audio/mpeg"&&(S="mp4a.40.2",this.log("Android: force audio codec to "+S)),s.audioCodec&&s.audioCodec!==S&&this.log('Swapping manifest audio codec "'+s.audioCodec+'" for "'+S+'"'),m.levelCodec=S,m.id="main",this.log("Init audio buffer, container:"+m.container+", codecs[selected/level/parsed]=["+(S||"")+"/"+(s.audioCodec||"")+"/"+m.codec+"]")}y&&(y.levelCodec=s.videoCodec,y.id="main",this.log("Init video buffer, container:"+y.container+", codecs[level/parsed]=["+(s.videoCodec||"")+"/"+y.codec+"]")),b&&this.log("Init audiovideo buffer, container:"+b.container+", codecs[level/parsed]=["+(s.attrs.CODECS||"")+"/"+b.codec+"]"),this.hls.trigger(L.BUFFER_CODECS,o),Object.keys(o).forEach(function(A){var x=o[A],P=x.initSegment;P!=null&&P.byteLength&&v.hls.trigger(L.BUFFER_APPENDING,{type:A,data:P,frag:f,part:null,chunkMeta:h,parent:f.type})}),this.tick()}},u.getMainFwdBufferInfo=function(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,st.MAIN)},u.backtrack=function(s){this.couldBacktrack=!0,this.backtrackFragment=s,this.resetTransmuxer(),this.flushBufferGap(s),this.fragmentTracker.removeFragment(s),this.fragPrevious=null,this.nextLoadPosition=s.start,this.state=Re.IDLE},u.checkFragmentChanged=function(){var s=this.media,o=null;if(s&&s.readyState>1&&s.seeking===!1){var f=s.currentTime;if(Oi.isBuffered(s,f)?o=this.getAppendedFrag(f):Oi.isBuffered(s,f+.1)&&(o=this.getAppendedFrag(f+.1)),o){this.backtrackFragment=null;var h=this.fragPlaying,v=o.level;(!h||o.sn!==h.sn||h.level!==v||o.urlId!==h.urlId)&&(this.fragPlaying=o,this.hls.trigger(L.FRAG_CHANGED,{frag:o}),(!h||h.level!==v)&&this.hls.trigger(L.LEVEL_SWITCHED,{level:v}))}}},p(c,[{key:"nextLevel",get:function(){var s=this.nextBufferedFrag;return s?s.level:-1}},{key:"currentFrag",get:function(){var s=this.media;return s?this.fragPlaying||this.getAppendedFrag(s.currentTime):null}},{key:"currentProgramDateTime",get:function(){var s=this.media;if(s){var o=s.currentTime,f=this.currentFrag;if(f&&Z(o)&&Z(f.programDateTime)){var h=f.programDateTime+(o-f.start)*1e3;return new Date(h)}}return null}},{key:"currentLevel",get:function(){var s=this.currentFrag;return s?s.level:-1}},{key:"nextBufferedFrag",get:function(){var s=this.currentFrag;return s?this.followingBufferedFrag(s):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),c}(K2),Gs=function(){function d(u,r,s){r===void 0&&(r=0),s===void 0&&(s=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=u,this.alpha_=u?Math.exp(Math.log(.5)/u):0,this.estimate_=r,this.totalWeight_=s}var c=d.prototype;return c.sample=function(r,s){var o=Math.pow(this.alpha_,r);this.estimate_=s*(1-o)+o*this.estimate_,this.totalWeight_+=r},c.getTotalWeight=function(){return this.totalWeight_},c.getEstimate=function(){if(this.alpha_){var r=1-Math.pow(this.alpha_,this.totalWeight_);if(r)return this.estimate_/r}return this.estimate_},d}(),U3=function(){function d(u,r,s,o){o===void 0&&(o=100),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_=.001,this.minDelayMs_=50,this.slow_=new Gs(u),this.fast_=new Gs(r),this.defaultTTFB_=o,this.ttfb_=new Gs(u)}var c=d.prototype;return c.update=function(r,s){var o=this.slow_,f=this.fast_,h=this.ttfb_;o.halfLife!==r&&(this.slow_=new Gs(r,o.getEstimate(),o.getTotalWeight())),f.halfLife!==s&&(this.fast_=new Gs(s,f.getEstimate(),f.getTotalWeight())),h.halfLife!==r&&(this.ttfb_=new Gs(r,h.getEstimate(),h.getTotalWeight()))},c.sample=function(r,s){r=Math.max(r,this.minDelayMs_);var o=8*s,f=r/1e3,h=o/f;this.fast_.sample(f,h),this.slow_.sample(f,h)},c.sampleTTFB=function(r){var s=r/1e3,o=Math.sqrt(2)*Math.exp(-Math.pow(s,2)/2);this.ttfb_.sample(o,Math.max(r,5))},c.canEstimate=function(){return this.fast_.getTotalWeight()>=this.minWeight_},c.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},c.getEstimateTTFB=function(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_},c.destroy=function(){},d}(),V3=function(){function d(u){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=u;var r=u.config;this.bwEstimator=new U3(r.abrEwmaSlowVoD,r.abrEwmaFastVoD,r.abrEwmaDefaultEstimate),this.registerListeners()}var c=d.prototype;return c.registerListeners=function(){var r=this.hls;r.on(L.FRAG_LOADING,this.onFragLoading,this),r.on(L.FRAG_LOADED,this.onFragLoaded,this),r.on(L.FRAG_BUFFERED,this.onFragBuffered,this),r.on(L.LEVEL_SWITCHING,this.onLevelSwitching,this),r.on(L.LEVEL_LOADED,this.onLevelLoaded,this)},c.unregisterListeners=function(){var r=this.hls;r.off(L.FRAG_LOADING,this.onFragLoading,this),r.off(L.FRAG_LOADED,this.onFragLoaded,this),r.off(L.FRAG_BUFFERED,this.onFragBuffered,this),r.off(L.LEVEL_SWITCHING,this.onLevelSwitching,this),r.off(L.LEVEL_LOADED,this.onLevelLoaded,this)},c.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},c.onFragLoading=function(r,s){var o,f=s.frag;this.ignoreFragment(f)||(this.fragCurrent=f,this.partCurrent=(o=s.part)!=null?o:null,this.clearTimer(),this.timer=self.setInterval(this.onCheck,100))},c.onLevelSwitching=function(r,s){this.clearTimer()},c.getTimeToLoadFrag=function(r,s,o,f){var h=r+o/s,v=f?this.lastLevelLoadSec:0;return h+v},c.onLevelLoaded=function(r,s){var o=this.hls.config,f=s.stats,h=f.total,v=f.bwEstimate;Z(h)&&Z(v)&&(this.lastLevelLoadSec=8*h/v),s.details.live?this.bwEstimator.update(o.abrEwmaSlowLive,o.abrEwmaFastLive):this.bwEstimator.update(o.abrEwmaSlowVoD,o.abrEwmaFastVoD)},c._abandonRulesCheck=function(){var r=this.fragCurrent,s=this.partCurrent,o=this.hls,f=o.autoLevelEnabled,h=o.media;if(!(!r||!h)){var v=performance.now(),m=s?s.stats:r.stats,y=s?s.duration:r.duration,b=v-m.loading.start;if(m.aborted||m.loaded&&m.loaded===m.total||r.level===0){this.clearTimer(),this._nextAutoLevel=-1;return}if(!(!f||h.paused||!h.playbackRate||!h.readyState)){var S=o.mainForwardBufferInfo;if(S!==null){var E=this.bwEstimator.getEstimateTTFB(),A=Math.abs(h.playbackRate);if(!(b<=Math.max(E,1e3*(y/(A*2))))){var x=S.len/A;if(!(x>=2*y/A)){var P=m.loading.first?m.loading.first-m.loading.start:-1,O=m.loaded&&P>-1,M=this.bwEstimator.getEstimate(),D=o.levels,j=o.minAutoLevel,K=D[r.level],he=m.total||Math.max(m.loaded,Math.round(y*K.maxBitrate/8)),re=b-P;re<1&&O&&(re=Math.min(b,m.loaded*8/M));var ne=O?m.loaded*1e3/re:0,xe=ne?(he-m.loaded)/ne:he*8/M+E/1e3;if(!(xe<=x)){var we=ne?ne*8:M,Pe=Number.POSITIVE_INFINITY,Ve;for(Ve=r.level-1;Ve>j;Ve--){var dt=D[Ve].maxBitrate;if(Pe=this.getTimeToLoadFrag(E/1e3,we,y*dt,!D[Ve].details),Pe<x)break}Pe>=xe||Pe>y*10||(o.nextLoadLevel=Ve,O?this.bwEstimator.sample(b-Math.min(E,P),m.loaded):this.bwEstimator.sampleTTFB(b),this.clearTimer(),B.warn("[abr] Fragment "+r.sn+(s?" part "+s.index:"")+" of level "+r.level+` is loading too slowly;
|
|
20
20
|
Time to underbuffer: `+x.toFixed(3)+` s
|
|
21
|
-
Estimated load time for current fragment: `+
|
|
22
|
-
Estimated load time for down switch fragment: `+
|
|
21
|
+
Estimated load time for current fragment: `+xe.toFixed(3)+` s
|
|
22
|
+
Estimated load time for down switch fragment: `+Pe.toFixed(3)+` s
|
|
23
23
|
TTFB estimate: `+P+`
|
|
24
24
|
Current BW estimate: `+(Z(M)?(M/1024).toFixed(3):"Unknown")+` Kb/s
|
|
25
25
|
New BW estimate: `+(this.bwEstimator.getEstimate()/1024).toFixed(3)+` Kb/s
|
|
26
|
-
Aborting and switching to level `+Ve),r.loader&&(this.fragCurrent=this.partCurrent=null,r.abortRequests()),o.trigger(L.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,part:s,stats:m}))}}}}}}},c.onFragLoaded=function(r,s){var o=s.frag,f=s.part,h=f?f.stats:o.stats;if(o.type===st.MAIN&&this.bwEstimator.sampleTTFB(h.loading.first-h.loading.start),!this.ignoreFragment(o)){if(this.clearTimer(),this.lastLoadedFragLevel=o.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var v=f?f.duration:o.duration,m=this.hls.levels[o.level],y=(m.loaded?m.loaded.bytes:0)+h.loaded,b=(m.loaded?m.loaded.duration:0)+v;m.loaded={bytes:y,duration:b},m.realBitrate=Math.round(8*y/b)}if(o.bitrateTest){var S={stats:h,frag:o,part:f,id:o.type};this.onFragBuffered(L.FRAG_BUFFERED,S),o.bitrateTest=!1}}},c.onFragBuffered=function(r,s){var o=s.frag,f=s.part,h=f!=null&&f.stats.loaded?f.stats:o.stats;if(!h.aborted&&!this.ignoreFragment(o)){var v=h.parsing.end-h.loading.start-Math.min(h.loading.first-h.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(v,h.loaded),h.bwEstimate=this.bwEstimator.getEstimate(),o.bitrateTest?this.bitrateTestDelay=v/1e3:this.bitrateTestDelay=0}},c.ignoreFragment=function(r){return r.type!==st.MAIN||r.sn==="initSegment"},c.clearTimer=function(){self.clearInterval(this.timer)},c.getNextABRAutoLevel=function(){var r=this.fragCurrent,s=this.partCurrent,o=this.hls,f=o.maxAutoLevel,h=o.config,v=o.minAutoLevel,m=o.media,y=s?s.duration:r?r.duration:0,b=m&&m.playbackRate!==0?Math.abs(m.playbackRate):1,S=this.bwEstimator?this.bwEstimator.getEstimate():h.abrEwmaDefaultEstimate,E=o.mainForwardBufferInfo,A=(E?E.len:0)/b,x=this.findBestLevel(S,v,f,A,h.abrBandWidthFactor,h.abrBandWidthUpFactor);if(x>=0)return x;B.trace("[abr] "+(A?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var P=y?Math.min(y,h.maxStarvationDelay):h.maxStarvationDelay,O=h.abrBandWidthFactor,M=h.abrBandWidthUpFactor;if(!A){var D=this.bitrateTestDelay;if(D){var j=y?Math.min(y,h.maxLoadingDelay):h.maxLoadingDelay;P=j-D,B.trace("[abr] bitrate test took "+Math.round(1e3*D)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*P)+" ms"),O=M=1}}return x=this.findBestLevel(S,v,f,A+P,O,M),Math.max(x,0)},c.findBestLevel=function(r,s,o,f,h,v){for(var m,y=this.fragCurrent,b=this.partCurrent,S=this.lastLoadedFragLevel,E=this.hls.levels,A=E[S],x=!!(A!=null&&(m=A.details)!=null&&m.live),P=A==null?void 0:A.codecSet,O=b?b.duration:y?y.duration:0,M=this.bwEstimator.getEstimateTTFB()/1e3,D=s,j=-1,K=o;K>=s;K--){var he=E[K];if(!he||P&&he.codecSet!==P){he&&(D=Math.min(K,D),j=Math.max(K,j));continue}j!==-1&&B.trace("[abr] Skipped level(s) "+D+"-"+j+' with CODECS:"'+E[j].attrs.CODECS+'"; not compatible with "'+A.attrs.CODECS+'"');var re=he.details,ne=(b?re==null?void 0:re.partTarget:re==null?void 0:re.averagetargetduration)||O,Ae=void 0;K<=S?Ae=h*r:Ae=v*r;var xe=E[K].maxBitrate,we=this.getTimeToLoadFrag(M,Ae,xe*ne,re===void 0);if(B.trace("[abr] level:"+K+" adjustedbw-bitrate:"+Math.round(Ae-xe)+" avgDuration:"+ne.toFixed(1)+" maxFetchDuration:"+f.toFixed(1)+" fetchDuration:"+we.toFixed(1)),Ae>xe&&(we===0||!Z(we)||x&&!this.bitrateTestDelay||we<f))return K}return-1},p(d,[{key:"nextAutoLevel",get:function(){var r=this._nextAutoLevel,s=this.bwEstimator;if(r!==-1&&!s.canEstimate())return r;var o=this.getNextABRAutoLevel();if(r!==-1){var f=this.hls.levels;if(f.length>Math.max(r,o)&&f[r].loadError<=f[o].loadError)return r}return r!==-1&&(o=Math.min(r,o)),o},set:function(r){this._nextAutoLevel=r}}]),d}(),W3=function(){function d(u){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=u}var c=d.prototype;return c.append=function(r,s){var o=this.queues[s];o.push(r),o.length===1&&this.buffers[s]&&this.executeNext(s)},c.insertAbort=function(r,s){var o=this.queues[s];o.unshift(r),this.executeNext(s)},c.appendBlocker=function(r){var s,o=new Promise(function(h){s=h}),f={execute:s,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(f,r),o},c.executeNext=function(r){var s=this.buffers,o=this.queues,f=s[r],h=o[r];if(h.length){var v=h[0];try{v.execute()}catch(m){B.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),v.onError(m),f!=null&&f.updating||(h.shift(),this.executeNext(r))}}},c.shiftAndExecuteNext=function(r){this.queues[r].shift(),this.executeNext(r)},c.current=function(r){return this.queues[r][0]},d}(),Jf=Qi(),Qf=/([ha]vc.)(?:\.[^.,]+)+/,j3=function(){function d(u){var r=this;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=function(){var s=r.media,o=r.mediaSource;B.log("[buffer-controller]: Media source opened"),s&&(s.removeEventListener("emptied",r._onMediaEmptied),r.updateMediaElementDuration(),r.hls.trigger(L.MEDIA_ATTACHED,{media:s})),o&&o.removeEventListener("sourceopen",r._onMediaSourceOpen),r.checkPendingTracks()},this._onMediaSourceClose=function(){B.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){B.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=function(){var s=r.media,o=r._objectUrl;s&&s.src!==o&&B.error("Media element src was set while attaching MediaSource ("+o+" > "+s.src+")")},this.hls=u,this._initSourceBuffer(),this.registerListeners()}var c=d.prototype;return c.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},c.destroy=function(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null},c.registerListeners=function(){var r=this.hls;r.on(L.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(L.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(L.MANIFEST_LOADING,this.onManifestLoading,this),r.on(L.MANIFEST_PARSED,this.onManifestParsed,this),r.on(L.BUFFER_RESET,this.onBufferReset,this),r.on(L.BUFFER_APPENDING,this.onBufferAppending,this),r.on(L.BUFFER_CODECS,this.onBufferCodecs,this),r.on(L.BUFFER_EOS,this.onBufferEos,this),r.on(L.BUFFER_FLUSHING,this.onBufferFlushing,this),r.on(L.LEVEL_UPDATED,this.onLevelUpdated,this),r.on(L.FRAG_PARSED,this.onFragParsed,this),r.on(L.FRAG_CHANGED,this.onFragChanged,this)},c.unregisterListeners=function(){var r=this.hls;r.off(L.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(L.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(L.MANIFEST_LOADING,this.onManifestLoading,this),r.off(L.MANIFEST_PARSED,this.onManifestParsed,this),r.off(L.BUFFER_RESET,this.onBufferReset,this),r.off(L.BUFFER_APPENDING,this.onBufferAppending,this),r.off(L.BUFFER_CODECS,this.onBufferCodecs,this),r.off(L.BUFFER_EOS,this.onBufferEos,this),r.off(L.BUFFER_FLUSHING,this.onBufferFlushing,this),r.off(L.LEVEL_UPDATED,this.onLevelUpdated,this),r.off(L.FRAG_PARSED,this.onFragParsed,this),r.off(L.FRAG_CHANGED,this.onFragChanged,this)},c._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new W3(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null},c.onManifestLoading=function(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null},c.onManifestParsed=function(r,s){var o=2;s.audio&&!s.video||s.altAudio,o=1,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=o,B.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},c.onMediaAttaching=function(r,s){var o=this.media=s.media;if(o&&Jf){var f=this.mediaSource=new Jf;f.addEventListener("sourceopen",this._onMediaSourceOpen),f.addEventListener("sourceended",this._onMediaSourceEnded),f.addEventListener("sourceclose",this._onMediaSourceClose),o.src=self.URL.createObjectURL(f),this._objectUrl=o.src,o.addEventListener("emptied",this._onMediaEmptied)}},c.onMediaDetaching=function(){var r=this.media,s=this.mediaSource,o=this._objectUrl;if(s){if(B.log("[buffer-controller]: media source detaching"),s.readyState==="open")try{s.endOfStream()}catch(f){B.warn("[buffer-controller]: onMediaDetaching: "+f.message+" while calling endOfStream")}this.onBufferReset(),s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),r&&(r.removeEventListener("emptied",this._onMediaEmptied),o&&self.URL.revokeObjectURL(o),r.src===o?(r.removeAttribute("src"),r.load()):B.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={}}this.hls.trigger(L.MEDIA_DETACHED,void 0)},c.onBufferReset=function(){var r=this;this.getSourceBufferTypes().forEach(function(s){var o=r.sourceBuffer[s];try{o&&(r.removeBufferListeners(s),r.mediaSource&&r.mediaSource.removeSourceBuffer(o),r.sourceBuffer[s]=void 0)}catch(f){B.warn("[buffer-controller]: Failed to reset the "+s+" buffer",f)}}),this._initSourceBuffer()},c.onBufferCodecs=function(r,s){var o=this,f=this.getSourceBufferTypes().length;Object.keys(s).forEach(function(h){if(f){var v=o.tracks[h];if(v&&typeof v.buffer.changeType=="function"){var m=s[h],y=m.id,b=m.codec,S=m.levelCodec,E=m.container,A=m.metadata,x=(v.levelCodec||v.codec).replace(Qf,"$1"),P=(S||b).replace(Qf,"$1");if(x!==P){var O=E+";codecs="+(S||b);o.appendChangeType(h,O),B.log("[buffer-controller]: switching codec "+x+" to "+P),o.tracks[h]={buffer:v.buffer,codec:b,container:E,levelCodec:S,metadata:A,id:y}}}}else o.pendingTracks[h]=s[h]}),!f&&(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks())},c.appendChangeType=function(r,s){var o=this,f=this.operationQueue,h={execute:function(){var m=o.sourceBuffer[r];m&&(B.log("[buffer-controller]: changing "+r+" sourceBuffer type to "+s),m.changeType(s)),f.shiftAndExecuteNext(r)},onStart:function(){},onComplete:function(){},onError:function(m){B.warn("[buffer-controller]: Failed to change "+r+" SourceBuffer type",m)}};f.append(h,r)},c.onBufferAppending=function(r,s){var o=this,f=this.hls,h=this.operationQueue,v=this.tracks,m=s.data,y=s.type,b=s.frag,S=s.part,E=s.chunkMeta,A=E.buffering[y],x=self.performance.now();A.start=x;var P=b.stats.buffering,O=S?S.stats.buffering:null;P.start===0&&(P.start=x),O&&O.start===0&&(O.start=x);var M=v.audio,D=!1;y==="audio"&&(M==null?void 0:M.container)==="audio/mpeg"&&(D=!this.lastMpegAudioChunk||E.id===1||this.lastMpegAudioChunk.sn!==E.sn,this.lastMpegAudioChunk=E);var j=b.start,K={execute:function(){if(A.executeStart=self.performance.now(),D){var re=o.sourceBuffer[y];if(re){var ne=j-re.timestampOffset;Math.abs(ne)>=.1&&(B.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+j+" (delta: "+ne+") sn: "+b.sn+")"),re.timestampOffset=j)}}o.appendExecutor(m,y)},onStart:function(){},onComplete:function(){var re=self.performance.now();A.executeEnd=A.end=re,P.first===0&&(P.first=re),O&&O.first===0&&(O.first=re);var ne=o.sourceBuffer,Ae={};for(var xe in ne)Ae[xe]=Oi.getBuffered(ne[xe]);o.appendError=0,o.hls.trigger(L.BUFFER_APPENDED,{type:y,frag:b,part:S,chunkMeta:E,parent:b.type,timeRanges:Ae})},onError:function(re){B.error("[buffer-controller]: Error encountered while trying to append to the "+y+" SourceBuffer",re);var ne={type:le.MEDIA_ERROR,parent:b.type,details:z.BUFFER_APPEND_ERROR,frag:b,part:S,chunkMeta:E,error:re,err:re,fatal:!1};re.code===DOMException.QUOTA_EXCEEDED_ERR?ne.details=z.BUFFER_FULL_ERROR:(o.appendError++,ne.details=z.BUFFER_APPEND_ERROR,o.appendError>f.config.appendErrorMaxRetry&&(B.error("[buffer-controller]: Failed "+f.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),ne.fatal=!0)),f.trigger(L.ERROR,ne)}};h.append(K,y)},c.onBufferFlushing=function(r,s){var o=this,f=this.operationQueue,h=function(m){return{execute:o.removeExecutor.bind(o,m,s.startOffset,s.endOffset),onStart:function(){},onComplete:function(){o.hls.trigger(L.BUFFER_FLUSHED,{type:m})},onError:function(b){B.warn("[buffer-controller]: Failed to remove from "+m+" SourceBuffer",b)}}};s.type?f.append(h(s.type),s.type):this.getSourceBufferTypes().forEach(function(v){f.append(h(v),v)})},c.onFragParsed=function(r,s){var o=this,f=s.frag,h=s.part,v=[],m=h?h.elementaryStreams:f.elementaryStreams;m[Oe.AUDIOVIDEO]?v.push("audiovideo"):(m[Oe.AUDIO]&&v.push("audio"),m[Oe.VIDEO]&&v.push("video"));var y=function(){var S=self.performance.now();f.stats.buffering.end=S,h&&(h.stats.buffering.end=S);var E=h?h.stats:f.stats;o.hls.trigger(L.FRAG_BUFFERED,{frag:f,part:h,stats:E,id:f.type})};v.length===0&&B.warn("Fragments must have at least one ElementaryStreamType set. type: "+f.type+" level: "+f.level+" sn: "+f.sn),this.blockBuffers(y,v)},c.onFragChanged=function(r,s){this.flushBackBuffer()},c.onBufferEos=function(r,s){var o=this,f=this.getSourceBufferTypes().reduce(function(h,v){var m=o.sourceBuffer[v];return m&&(!s.type||s.type===v)&&(m.ending=!0,m.ended||(m.ended=!0,B.log("[buffer-controller]: "+v+" sourceBuffer now EOS"))),h&&!!(!m||m.ended)},!0);f&&(B.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers(function(){o.getSourceBufferTypes().forEach(function(v){var m=o.sourceBuffer[v];m&&(m.ending=!1)});var h=o.mediaSource;if(!h||h.readyState!=="open"){h&&B.info("[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: "+h.readyState);return}B.log("[buffer-controller]: Calling mediaSource.endOfStream()"),h.endOfStream()}))},c.onLevelUpdated=function(r,s){var o=s.details;o.fragments.length&&(this.details=o,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},c.flushBackBuffer=function(){var r=this.hls,s=this.details,o=this.media,f=this.sourceBuffer;if(!(!o||s===null)){var h=this.getSourceBufferTypes();if(h.length){var v=s.live&&r.config.liveBackBufferLength!==null?r.config.liveBackBufferLength:r.config.backBufferLength;if(!(!Z(v)||v<0)){var m=o.currentTime,y=s.levelTargetDuration,b=Math.max(v,y),S=Math.floor(m/y)*y-b;h.forEach(function(E){var A=f[E];if(A){var x=Oi.getBuffered(A);if(x.length>0&&S>x.start(0)){if(r.trigger(L.BACK_BUFFER_REACHED,{bufferEnd:S}),s.live)r.trigger(L.LIVE_BACK_BUFFER_REACHED,{bufferEnd:S});else if(A.ended&&x.end(x.length-1)-m<y*2){B.info("[buffer-controller]: Cannot flush "+E+" back buffer while SourceBuffer is in ended state");return}r.trigger(L.BUFFER_FLUSHING,{startOffset:0,endOffset:S,type:E})}}})}}}},c.updateMediaElementDuration=function(){if(!(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")){var r=this.details,s=this.hls,o=this.media,f=this.mediaSource,h=r.fragments[0].start+r.totalduration,v=o.duration,m=Z(f.duration)?f.duration:0;r.live&&s.config.liveDurationInfinity?(B.log("[buffer-controller]: Media Source duration is set to Infinity"),f.duration=1/0,this.updateSeekableRange(r)):(h>m&&h>v||!Z(v))&&(B.log("[buffer-controller]: Updating Media Source duration to "+h.toFixed(3)),f.duration=h)}},c.updateSeekableRange=function(r){var s=this.mediaSource,o=r.fragments,f=o.length;if(f&&r.live&&s!=null&&s.setLiveSeekableRange){var h=Math.max(0,o[0].start),v=Math.max(h,h+r.totalduration);s.setLiveSeekableRange(h,v)}},c.checkPendingTracks=function(){var r=this.bufferCodecEventsExpected,s=this.operationQueue,o=this.pendingTracks,f=Object.keys(o).length;if(f&&!r||f===2){this.createSourceBuffers(o),this.pendingTracks={};var h=this.getSourceBufferTypes();if(h.length)this.hls.trigger(L.BUFFER_CREATED,{tracks:this.tracks}),h.forEach(function(m){s.executeNext(m)});else{var v=new Error("could not create source buffer for media codec(s)");this.hls.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:v,reason:v.message})}}},c.createSourceBuffers=function(r){var s=this.sourceBuffer,o=this.mediaSource;if(!o)throw Error("createSourceBuffers called when mediaSource was null");for(var f in r)if(!s[f]){var h=r[f];if(!h)throw Error("source buffer exists for track "+f+", however track does not");var v=h.levelCodec||h.codec,m=h.container+";codecs="+v;B.log("[buffer-controller]: creating sourceBuffer("+m+")");try{var y=s[f]=o.addSourceBuffer(m),b=f;this.addBufferListener(b,"updatestart",this._onSBUpdateStart),this.addBufferListener(b,"updateend",this._onSBUpdateEnd),this.addBufferListener(b,"error",this._onSBUpdateError),this.tracks[f]={buffer:y,codec:v,container:h.container,levelCodec:h.levelCodec,metadata:h.metadata,id:h.id}}catch(S){B.error("[buffer-controller]: error while trying to add sourceBuffer: "+S.message),this.hls.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:S,mimeType:m})}}},c._onSBUpdateStart=function(r){var s=this.operationQueue,o=s.current(r);o.onStart()},c._onSBUpdateEnd=function(r){var s=this.operationQueue,o=s.current(r);o.onComplete(),s.shiftAndExecuteNext(r)},c._onSBUpdateError=function(r,s){var o=new Error(r+" SourceBuffer error");B.error("[buffer-controller]: "+o,s),this.hls.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.BUFFER_APPENDING_ERROR,error:o,fatal:!1});var f=this.operationQueue.current(r);f&&f.onError(s)},c.removeExecutor=function(r,s,o){var f=this.media,h=this.mediaSource,v=this.operationQueue,m=this.sourceBuffer,y=m[r];if(!f||!h||!y){B.warn("[buffer-controller]: Attempting to remove from the "+r+" SourceBuffer, but it does not exist"),v.shiftAndExecuteNext(r);return}var b=Z(f.duration)?f.duration:1/0,S=Z(h.duration)?h.duration:1/0,E=Math.max(0,s),A=Math.min(o,b,S);A>E&&!y.ending?(y.ended=!1,B.log("[buffer-controller]: Removing ["+E+","+A+"] from the "+r+" SourceBuffer"),y.remove(E,A)):v.shiftAndExecuteNext(r)},c.appendExecutor=function(r,s){var o=this.operationQueue,f=this.sourceBuffer,h=f[s];if(!h){B.warn("[buffer-controller]: Attempting to append to the "+s+" SourceBuffer, but it does not exist"),o.shiftAndExecuteNext(s);return}h.ended=!1,h.appendBuffer(r)},c.blockBuffers=function(r,s){var o=this;if(s===void 0&&(s=this.getSourceBufferTypes()),!s.length){B.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(r);return}var f=this.operationQueue,h=s.map(function(v){return f.appendBlocker(v)});Promise.all(h).then(function(){r(),s.forEach(function(v){var m=o.sourceBuffer[v];m!=null&&m.updating||f.shiftAndExecuteNext(v)})})},c.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},c.addBufferListener=function(r,s,o){var f=this.sourceBuffer[r];if(f){var h=o.bind(this,r);this.listeners[r].push({event:s,listener:h}),f.addEventListener(s,h)}},c.removeBufferListeners=function(r){var s=this.sourceBuffer[r];s&&this.listeners[r].forEach(function(o){s.removeEventListener(o.event,o.listener)})},d}(),G3=function(){function d(u){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=u,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var c=d.prototype;return c.setStreamController=function(r){this.streamController=r},c.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},c.registerListeners=function(){var r=this.hls;r.on(L.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.on(L.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(L.MANIFEST_PARSED,this.onManifestParsed,this),r.on(L.BUFFER_CODECS,this.onBufferCodecs,this),r.on(L.MEDIA_DETACHING,this.onMediaDetaching,this)},c.unregisterListener=function(){var r=this.hls;r.off(L.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.off(L.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(L.MANIFEST_PARSED,this.onManifestParsed,this),r.off(L.BUFFER_CODECS,this.onBufferCodecs,this),r.off(L.MEDIA_DETACHING,this.onMediaDetaching,this)},c.onFpsDropLevelCapping=function(r,s){var o=this.hls.levels[s.droppedLevel];this.isLevelAllowed(o)&&this.restrictedLevels.push({bitrate:o.bitrate,height:o.height,width:o.width})},c.onMediaAttaching=function(r,s){this.media=s.media instanceof HTMLVideoElement?s.media:null,this.clientRect=null},c.onManifestParsed=function(r,s){var o=this.hls;this.restrictedLevels=[],this.firstLevel=s.firstLevel,o.config.capLevelToPlayerSize&&s.video&&this.startCapping()},c.onBufferCodecs=function(r,s){var o=this.hls;o.config.capLevelToPlayerSize&&s.video&&this.startCapping()},c.onMediaDetaching=function(){this.stopCapping()},c.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var r=this.hls.levels;if(r.length){var s=this.hls;s.autoLevelCapping=this.getMaxLevel(r.length-1),s.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=s.autoLevelCapping}}},c.getMaxLevel=function(r){var s=this,o=this.hls.levels;if(!o.length)return-1;var f=o.filter(function(h,v){return s.isLevelAllowed(h)&&v<=r});return this.clientRect=null,d.getMaxLevelByMediaSize(f,this.mediaWidth,this.mediaHeight)},c.startCapping=function(){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())},c.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},c.getDimensions=function(){if(this.clientRect)return this.clientRect;var r=this.media,s={width:0,height:0};if(r){var o=r.getBoundingClientRect();s.width=o.width,s.height=o.height,!s.width&&!s.height&&(s.width=o.right-o.left||r.width||0,s.height=o.bottom-o.top||r.height||0)}return this.clientRect=s,s},c.isLevelAllowed=function(r){var s=this.restrictedLevels;return!s.some(function(o){return r.bitrate===o.bitrate&&r.width===o.width&&r.height===o.height})},d.getMaxLevelByMediaSize=function(r,s,o){if(!(r!=null&&r.length))return-1;for(var f=function(b,S){return S?b.width!==S.width||b.height!==S.height:!0},h=r.length-1,v=0;v<r.length;v+=1){var m=r[v];if((m.width>=s||m.height>=o)&&f(m,r[v+1])){h=v;break}}return h},p(d,[{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var r=1;if(!this.hls.config.ignoreDevicePixelRatio)try{r=self.devicePixelRatio}catch(s){}return r}}]),d}(),z3=function(){function d(u){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=u,this.registerListeners()}var c=d.prototype;return c.setStreamController=function(r){this.streamController=r},c.registerListeners=function(){this.hls.on(L.MEDIA_ATTACHING,this.onMediaAttaching,this)},c.unregisterListeners=function(){this.hls.off(L.MEDIA_ATTACHING,this.onMediaAttaching,this)},c.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},c.onMediaAttaching=function(r,s){var o=this.hls.config;if(o.capLevelOnFPSDrop){var f=s.media instanceof self.HTMLVideoElement?s.media:null;this.media=f,f&&typeof f.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),o.fpsDroppedMonitoringPeriod)}},c.checkFPS=function(r,s,o){var f=performance.now();if(s){if(this.lastTime){var h=f-this.lastTime,v=o-this.lastDroppedFrames,m=s-this.lastDecodedFrames,y=1e3*v/h,b=this.hls;if(b.trigger(L.FPS_DROP,{currentDropped:v,currentDecoded:m,totalDroppedFrames:o}),y>0&&v>b.config.fpsDroppedMonitoringThreshold*m){var S=b.currentLevel;B.warn("drop FPS ratio greater than max allowed value for currentLevel: "+S),S>0&&(b.autoLevelCapping===-1||b.autoLevelCapping>=S)&&(S=S-1,b.trigger(L.FPS_DROP_LEVEL_CAPPING,{level:S,droppedLevel:b.currentLevel}),b.autoLevelCapping=S,this.streamController.nextLevelSwitch())}}this.lastTime=f,this.lastDroppedFrames=o,this.lastDecodedFrames=s}},c.checkFPSInterval=function(){var r=this.media;if(r)if(this.isVideoPlaybackQualityAvailable){var s=r.getVideoPlaybackQuality();this.checkFPS(r,s.totalVideoFrames,s.droppedVideoFrames)}else this.checkFPS(r,r.webkitDecodedFrameCount,r.webkitDroppedFrameCount)},d}(),H3=/^age:\s*[\d.]+\s*$/im,$f=function(){function d(u){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=u&&u.xhrSetup||null,this.stats=new Et,this.retryDelay=0}var c=d.prototype;return c.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},c.abortInternal=function(){var r=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),r&&(r.onreadystatechange=null,r.onprogress=null,r.readyState!==4&&(this.stats.aborted=!0,r.abort()))},c.abort=function(){var r;this.abortInternal(),(r=this.callbacks)!=null&&r.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},c.load=function(r,s,o){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=r,this.config=s,this.callbacks=o,this.loadInternal()},c.loadInternal=function(){var r=this,s=this.config,o=this.context;if(s){var f=this.loader=new self.XMLHttpRequest,h=this.stats;h.loading.first=0,h.loaded=0,h.aborted=!1;var v=this.xhrSetup;v?Promise.resolve().then(function(){if(!r.stats.aborted)return v(f,o.url)}).catch(function(m){return f.open("GET",o.url,!0),v(f,o.url)}).then(function(){r.stats.aborted||r.openAndSendXhr(f,o,s)}).catch(function(m){r.callbacks.onError({code:f.status,text:m.message},o,f,h)}):this.openAndSendXhr(f,o,s)}},c.openAndSendXhr=function(r,s,o){r.readyState||r.open("GET",s.url,!0);var f=this.context.headers,h=o.loadPolicy,v=h.maxTimeToFirstByteMs,m=h.maxLoadTimeMs;if(f)for(var y in f)r.setRequestHeader(y,f[y]);s.rangeEnd&&r.setRequestHeader("Range","bytes="+s.rangeStart+"-"+(s.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=s.responseType,self.clearTimeout(this.requestTimeout),o.timeout=v&&Z(v)?v:m,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout),r.send()},c.readystatechange=function(){var r=this.context,s=this.loader,o=this.stats;if(!(!r||!s)){var f=s.readyState,h=this.config;if(!o.aborted&&f>=2&&(o.loading.first===0&&(o.loading.first=Math.max(self.performance.now(),o.loading.start),h.timeout!==h.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),h.timeout=h.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),h.loadPolicy.maxLoadTimeMs-(o.loading.first-o.loading.start)))),f===4)){self.clearTimeout(this.requestTimeout),s.onreadystatechange=null,s.onprogress=null;var v=s.status,m=s.responseType!=="text";if(v>=200&&v<300&&(m&&s.response||s.responseText!==null)){o.loading.end=Math.max(self.performance.now(),o.loading.first);var y=m?s.response:s.responseText,b=s.responseType==="arraybuffer"?y.byteLength:y.length;if(o.loaded=o.total=b,o.bwEstimate=o.total*8e3/(o.loading.end-o.loading.first),!this.callbacks)return;var S=this.callbacks.onProgress;if(S&&S(o,r,y,s),!this.callbacks)return;var E={url:s.responseURL,data:y,code:v};this.callbacks.onSuccess(E,o,r,s)}else{var A=h.loadPolicy.errorRetry,x=o.retry;Bo(A,x,!1,v)?this.retry(A):(B.error(v+" while loading "+r.url),this.callbacks.onError({code:v,text:s.statusText},r,s,o))}}}},c.loadtimeout=function(){var r,s=(r=this.config)==null?void 0:r.loadPolicy.timeoutRetry,o=this.stats.retry;if(Bo(s,o,!0))this.retry(s);else{B.warn("timeout while loading "+this.context.url);var f=this.callbacks;f&&(this.abortInternal(),f.onTimeout(this.stats,this.context,this.loader))}},c.retry=function(r){var s=this.context,o=this.stats;this.retryDelay=Yl(r,o.retry),o.retry++,B.warn((status?"HTTP Status "+status:"Timeout")+" while loading "+s.url+", retrying "+o.retry+"/"+r.maxNumRetry+" in "+this.retryDelay+"ms"),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)},c.loadprogress=function(r){var s=this.stats;s.loaded=r.loaded,r.lengthComputable&&(s.total=r.total)},c.getCacheAge=function(){var r=null;if(this.loader&&H3.test(this.loader.getAllResponseHeaders())){var s=this.loader.getResponseHeader("age");r=s?parseFloat(s):null}return r},c.getResponseHeader=function(r){return this.loader&&new RegExp("^"+r+":\\s*[\\d.]+\\s*$","im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(r):null},d}(),K3=function(){function d(){this.chunks=[],this.dataLength=0}var c=d.prototype;return c.push=function(r){this.chunks.push(r),this.dataLength+=r.length},c.flush=function(){var r=this.chunks,s=this.dataLength,o;if(r.length)r.length===1?o=r[0]:o=Y3(r,s);else return new Uint8Array(0);return this.reset(),o},c.reset=function(){this.chunks.length=0,this.dataLength=0},d}();function Y3(d,c){for(var u=new Uint8Array(c),r=0,s=0;s<d.length;s++){var o=d[s];u.set(o,r),r+=o.length}return u}function q3(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(d){}return!1}var X3=/(\d+)-(\d+)\/(\d+)/,eh=function(){function d(u){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=u.fetchSetup||$3,this.controller=new self.AbortController,this.stats=new Et}var c=d.prototype;return c.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},c.abortInternal=function(){var r=this.response;r!=null&&r.ok||(this.stats.aborted=!0,this.controller.abort())},c.abort=function(){var r;this.abortInternal(),(r=this.callbacks)!=null&&r.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},c.load=function(r,s,o){var f=this,h=this.stats;if(h.loading.start)throw new Error("Loader can only be used once.");h.loading.start=self.performance.now();var v=Z3(r,this.controller.signal),m=o.onProgress,y=r.responseType==="arraybuffer",b=y?"byteLength":"length",S=s.loadPolicy,E=S.maxTimeToFirstByteMs,A=S.maxLoadTimeMs;this.context=r,this.config=s,this.callbacks=o,this.request=this.fetchSetup(r,v),self.clearTimeout(this.requestTimeout),s.timeout=E&&Z(E)?E:A,this.requestTimeout=self.setTimeout(function(){f.abortInternal(),o.onTimeout(h,r,f.response)},s.timeout),self.fetch(this.request).then(function(x){f.response=f.loader=x;var P=Math.max(self.performance.now(),h.loading.start);if(self.clearTimeout(f.requestTimeout),s.timeout=A,f.requestTimeout=self.setTimeout(function(){f.abortInternal(),o.onTimeout(h,r,f.response)},A-(P-h.loading.start)),!x.ok){var O=x.status,M=x.statusText;throw new eE(M||"fetch, bad network response",O,x)}return h.loading.first=P,h.total=Q3(x.headers)||h.total,m&&Z(s.highWaterMark)?f.loadProgressively(x,h,r,s.highWaterMark,m):y?x.arrayBuffer():r.responseType==="json"?x.json():x.text()}).then(function(x){var P=f.response;self.clearTimeout(f.requestTimeout),h.loading.end=Math.max(self.performance.now(),h.loading.first);var O=x[b];O&&(h.loaded=h.total=O);var M={url:P.url,data:x,code:P.status};m&&!Z(s.highWaterMark)&&m(h,r,x,P),o.onSuccess(M,h,r,P)}).catch(function(x){if(self.clearTimeout(f.requestTimeout),!h.aborted){var P=x&&x.code||0,O=x?x.message:null;o.onError({code:P,text:O},r,x?x.details:null,h)}})},c.getCacheAge=function(){var r=null;if(this.response){var s=this.response.headers.get("age");r=s?parseFloat(s):null}return r},c.getResponseHeader=function(r){return this.response?this.response.headers.get(r):null},c.loadProgressively=function(r,s,o,f,h){f===void 0&&(f=0);var v=new K3,m=r.body.getReader(),y=function b(){return m.read().then(function(S){if(S.done)return v.dataLength&&h(s,o,v.flush(),r),Promise.resolve(new ArrayBuffer(0));var E=S.value,A=E.length;return s.loaded+=A,A<f||v.dataLength?(v.push(E),v.dataLength>=f&&h(s,o,v.flush(),r)):h(s,o,E,r),b()}).catch(function(){return Promise.reject()})};return y()},d}();function Z3(d,c){var u={method:"GET",mode:"cors",credentials:"same-origin",signal:c,headers:new self.Headers(k({},d.headers))};return d.rangeEnd&&u.headers.set("Range","bytes="+d.rangeStart+"-"+String(d.rangeEnd-1)),u}function J3(d){var c=X3.exec(d);if(c)return parseInt(c[2])-parseInt(c[1])+1}function Q3(d){var c=d.get("Content-Range");if(c){var u=J3(c);if(Z(u))return u}var r=d.get("Content-Length");if(r)return parseInt(r)}function $3(d,c){return new self.Request(d.url,c)}var eE=function(d){T(c,d);function c(u,r,s){var o;return o=d.call(this,u)||this,o.code=void 0,o.details=void 0,o.code=r,o.details=s,o}return c}(W(Error)),th={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},tE=l(l({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:$f,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:V3,bufferController:j3,capLevelController:G3,errorController:A2,fpsController:z3,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:null,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,certLoadPolicy:{default:th},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:th},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},iE()),{},{subtitleStreamController:void 0,subtitleTrackController:void 0,timelineController:void 0,audioStreamController:void 0,audioTrackController:void 0,emeController:void 0,cmcdController:void 0,contentSteeringController:void 0});function iE(){return{cueHandler:Ht,enableWebVTT:!1,enableIMSC1:!1,enableCEA708Captions:!1,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function rE(d,c){if((c.liveSyncDurationCount||c.liveMaxLatencyDurationCount)&&(c.liveSyncDuration||c.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(c.liveMaxLatencyDurationCount!==void 0&&(c.liveSyncDurationCount===void 0||c.liveMaxLatencyDurationCount<=c.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(c.liveMaxLatencyDuration!==void 0&&(c.liveSyncDuration===void 0||c.liveMaxLatencyDuration<=c.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');var u=cu(d),r=["manifest","level","frag"],s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return r.forEach(function(o){var f=(o==="level"?"playlist":o)+"LoadPolicy",h=c[f]===void 0,v=[];s.forEach(function(m){var y=o+"Loading"+m,b=c[y];if(b!==void 0&&h){v.push(y);var S=u[f].default;switch(c[f]={default:S},m){case"TimeOut":S.maxLoadTimeMs=b,S.maxTimeToFirstByteMs=b;break;case"MaxRetry":S.errorRetry.maxNumRetry=b,S.timeoutRetry.maxNumRetry=b;break;case"RetryDelay":S.errorRetry.retryDelayMs=b,S.timeoutRetry.retryDelayMs=b;break;case"MaxRetryTimeout":S.errorRetry.maxRetryDelayMs=b,S.timeoutRetry.maxRetryDelayMs=b;break}}}),v.length&&B.warn('hls.js config: "'+v.join('", "')+'" setting(s) are deprecated, use "'+f+'": '+JSON.stringify(c[f]))}),l(l({},u),c)}function cu(d){return d&&typeof d=="object"?Array.isArray(d)?d.map(cu):Object.keys(d).reduce(function(c,u){return c[u]=cu(d[u]),c},{}):d}function nE(d){var c=d.loader;if(c!==eh&&c!==$f)B.log("[config]: Custom loader detected, cannot enable progressive streaming"),d.progressive=!1;else{var u=q3();u&&(d.loader=eh,d.progressive=!0,d.enableSoftwareAES=!0,B.log("[config]: Progressive streaming enabled, using FetchLoader"))}}var ih=function(){d.isSupported=function(){return Y2()};function d(u){u===void 0&&(u={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new au,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,X(u.debug||!1,"Hls instance");var r=this.config=rE(d.DefaultConfig,u);this.userConfig=u,this._autoLevelCapping=-1,r.progressive&&nE(r);var s=r.abrController,o=r.bufferController,f=r.capLevelController,h=r.errorController,v=r.fpsController,m=new h(this),y=this.abrController=new s(this),b=this.bufferController=new o(this),S=this.capLevelController=new f(this),E=new v(this),A=new $r(this),x=new Fs(this),P=r.contentSteeringController,O=P?new P(this):null,M=this.levelController=new P2(this,O),D=new C2(this),j=new I2(this.config),K=this.streamController=new F3(this,D,j);S.setStreamController(K),E.setStreamController(K);var he=[A,M,K];O&&he.splice(1,0,O),this.networkControllers=he;var re=[y,b,S,E,x,D];this.audioTrackController=this.createController(r.audioTrackController,he);var ne=r.audioStreamController;ne&&he.push(new ne(this,D,j)),this.subtitleTrackController=this.createController(r.subtitleTrackController,he);var Ae=r.subtitleStreamController;Ae&&he.push(new Ae(this,D,j)),this.createController(r.timelineController,re),j.emeController=this.emeController=this.createController(r.emeController,re),this.cmcdController=this.createController(r.cmcdController,re),this.latencyController=this.createController(kr,re),this.coreComponents=re,he.push(m);var xe=m.onErrorOut;typeof xe=="function"&&this.on(L.ERROR,xe,m)}var c=d.prototype;return c.createController=function(r,s){if(r){var o=new r(this);return s&&s.push(o),o}return null},c.on=function(r,s,o){o===void 0&&(o=this),this._emitter.on(r,s,o)},c.once=function(r,s,o){o===void 0&&(o=this),this._emitter.once(r,s,o)},c.removeAllListeners=function(r){this._emitter.removeAllListeners(r)},c.off=function(r,s,o,f){o===void 0&&(o=this),this._emitter.off(r,s,o,f)},c.listeners=function(r){return this._emitter.listeners(r)},c.emit=function(r,s,o){return this._emitter.emit(r,s,o)},c.trigger=function(r,s){if(this.config.debug)return this.emit(r,r,s);try{return this.emit(r,r,s)}catch(o){B.error("An internal error happened while handling event "+r+'. Error message: "'+o.message+'". Here is a stacktrace:',o),this.trigger(L.ERROR,{type:le.OTHER_ERROR,details:z.INTERNAL_EXCEPTION,fatal:!1,event:r,error:o})}return!1},c.listenerCount=function(r){return this._emitter.listenerCount(r)},c.destroy=function(){B.log("destroy"),this.trigger(L.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(s){return s.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(s){return s.destroy()}),this.coreComponents.length=0;var r=this.config;r.xhrSetup=r.fetchSetup=void 0,this.userConfig=null},c.attachMedia=function(r){B.log("attachMedia"),this._media=r,this.trigger(L.MEDIA_ATTACHING,{media:r})},c.detachMedia=function(){B.log("detachMedia"),this.trigger(L.MEDIA_DETACHING,void 0),this._media=null},c.loadSource=function(r){this.stopLoad();var s=this.media,o=this.url,f=this.url=pe.buildAbsoluteURL(self.location.href,r,{alwaysNormalize:!0});B.log("loadSource:"+f),s&&o&&(o!==f||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(s)),this.trigger(L.MANIFEST_LOADING,{url:r})},c.startLoad=function(r){r===void 0&&(r=-1),B.log("startLoad("+r+")"),this.networkControllers.forEach(function(s){s.startLoad(r)})},c.stopLoad=function(){B.log("stopLoad"),this.networkControllers.forEach(function(r){r.stopLoad()})},c.swapAudioCodec=function(){B.log("swapAudioCodec"),this.streamController.swapAudioCodec()},c.recoverMediaError=function(){B.log("recoverMediaError");var r=this._media;this.detachMedia(),r&&this.attachMedia(r)},c.removeLevel=function(r,s){s===void 0&&(s=0),this.levelController.removeLevel(r,s)},p(d,[{key:"levels",get:function(){var r=this.levelController.levels;return r||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(r){B.log("set currentLevel:"+r),this.loadLevel=r,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(r){B.log("set nextLevel:"+r),this.levelController.manualLevel=r,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(r){B.log("set loadLevel:"+r),this.levelController.manualLevel=r}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(r){this.levelController.nextLoadLevel=r}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(r){B.log("set firstLevel:"+r),this.levelController.firstLevel=r}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(r){B.log("set startLevel:"+r),r!==-1&&(r=Math.max(r,this.minAutoLevel)),this.levelController.startLevel=r}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(r){var s=!!r;s!==this.config.capLevelToPlayerSize&&(s?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=s)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(r){this._autoLevelCapping!==r&&(B.log("set autoLevelCapping:"+r),this._autoLevelCapping=r)}},{key:"bandwidthEstimate",get:function(){var r=this.abrController.bwEstimator;return r?r.getEstimate():NaN}},{key:"ttfbEstimate",get:function(){var r=this.abrController.bwEstimator;return r?r.getEstimateTTFB():NaN}},{key:"maxHdcpLevel",get:function(){return this._maxHdcpLevel},set:function(r){jn.indexOf(r)>-1&&(this._maxHdcpLevel=r)}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var r=this.levels,s=this.config.minAutoBitrate;if(!r)return 0;for(var o=r.length,f=0;f<o;f++)if(r[f].maxBitrate>=s)return f;return 0}},{key:"maxAutoLevel",get:function(){var r=this.levels,s=this.autoLevelCapping,o=this.maxHdcpLevel,f;if(s===-1&&r&&r.length?f=r.length-1:f=s,o)for(var h=f;h--;){var v=r[h].attrs["HDCP-LEVEL"];if(v&&v<=o)return h}return f}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(r){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,r)}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"mainForwardBufferInfo",get:function(){return this.streamController.getMainFwdBufferInfo()}},{key:"audioTracks",get:function(){var r=this.audioTrackController;return r?r.audioTracks:[]}},{key:"audioTrack",get:function(){var r=this.audioTrackController;return r?r.audioTrack:-1},set:function(r){var s=this.audioTrackController;s&&(s.audioTrack=r)}},{key:"subtitleTracks",get:function(){var r=this.subtitleTrackController;return r?r.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var r=this.subtitleTrackController;return r?r.subtitleTrack:-1},set:function(r){var s=this.subtitleTrackController;s&&(s.subtitleTrack=r)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var r=this.subtitleTrackController;return r?r.subtitleDisplay:!1},set:function(r){var s=this.subtitleTrackController;s&&(s.subtitleDisplay=r)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(r){this.config.lowLatencyMode=r}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.4.8"}},{key:"Events",get:function(){return L}},{key:"ErrorTypes",get:function(){return le}},{key:"ErrorDetails",get:function(){return z}},{key:"DefaultConfig",get:function(){return d.defaultConfig?d.defaultConfig:tE},set:function(r){d.defaultConfig=r}}]),d}();return ih.defaultConfig=void 0,ih})})(!1)})(Fu);var Tg=Fu.exports;const tl=kg(Tg),Eg=(t,e,i,n,a,l)=>{if(!e)return;const g=e.paused,p=e.playbackRate;i==null||i.detachMedia(),i==null||i.destroy();const _=(t||{}).contentType==="application/x-mpegURL",k=tl.isSupported(),T=e.canPlayType("application/vnd.apple.mpegurl");return _&&k&&!T?(i=new tl({enableWorker:!1,startPosition:l}),i.on(tl.Events.ERROR,n),i.loadSource(t.url),i.attachMedia(e)):(e.removeAttribute("src"),e.load()),g||a(),e.playbackRate=p,i},Ag=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Luister na hierdie artikel",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),xg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Tie asɛm yi",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),wg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ይህን ጽሑፍ ያዳምጡ",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Pg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"استمع إلى هذا المقال",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Cg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"এই লেখাটো শুনক",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Lg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Bu məqaləyə qulaq asın",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Ig=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Слухайце гэты артыкул",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Rg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Чуйте тази статия",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Dg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Aw ye nin barokun lamɛn",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Og=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"এই নিবন্ধটি শুনুন",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Bg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Poslušajte ovaj članak",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Mg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Escolta aquest article",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Ng=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"گوێ لەم بابەتە بگرن",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Fg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Poslechněte si tento článek",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Ug=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Gwrandewch ar yr erthygl hon",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Vg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Lyt til denne artikel",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Wg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Hören Sie sich diesen Artikel an",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),jg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Se nyati sia ɖa",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Gg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Ακούστε αυτό το άρθρο",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),zg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Listen to this article",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Hg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Aŭskultu ĉi tiun artikolon",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Kg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Escucha este artículo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Yg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Kuulake seda artiklit",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),qg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Entzun artikulu hau",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Xg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"به این مقاله گوش دهید",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Zg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Kuuntele tämä artikkeli",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Jg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Makinig sa artikulong ito",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Qg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Écoutez cet article",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),$g=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Éist leis an alt seo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),e0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Èist ris an artaigil seo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),t0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Escoita este artigo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),i0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"આ લેખ સાંભળો",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),r0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Saurari wannan labarin",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),n0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"E hoʻolohe i kēia ʻatikala",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),s0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"האזינו למאמר הזה",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),a0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"इस लेख को सुनें",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),o0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Poslušajte ovaj članak",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),l0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Hallgassa meg ezt a cikket",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),u0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Լսեք այս հոդվածը",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),c0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Dengarkan artikel ini",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),d0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Gee akụkọ a",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),f0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Hlustaðu á þessa grein",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),h0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Ascolta questo articolo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),g0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"האזינו למאמר הזה",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),v0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"この記事を聞く",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),m0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"მოუსმინეთ ამ სტატიას",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),p0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Бұл мақаланы тыңдаңыз",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),_0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"សូមស្តាប់អត្ថបទនេះ។",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),y0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ಈ ಲೇಖನವನ್ನು ಆಲಿಸಿ",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),b0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"이 기사를 들어라",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),S0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Бул макаланы уккула",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),k0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Lauschtert dësen Artikel",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),T0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Wuliriza ekitundu kino",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),E0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Yoká lisolo oyo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),A0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ຟັງບົດຄວາມນີ້",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),x0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Klausykite šio straipsnio",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),w0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Klausieties šo rakstu",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),P0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Henoy ity lahatsoratra ity",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),C0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Слушајте ја оваа статија",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),L0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ഈ ലേഖനം ശ്രദ്ധിക്കുക",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),I0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Энэ нийтлэлийг сонсоорой",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),R0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"हा लेख ऐका",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),D0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Dengar artikel ini",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),O0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Isma' dan l-artiklu",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),B0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ဒီဆောင်းပါးကို နားထောင်ပါ။",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),M0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Hør denne artikkelen",playAudio:"Spill av lyd",pauseAudio:"Sett lyden på pause",scrubProgressBar:"Scrub fremdriftslinje",visitAdvert:"Besøk annonsen",visitBeyondWords:"Besøk BeyondWords",closeWidget:"Lukk widget",seekBack:"Søk tilbake",seekAhead:"Søk fremover",previousSegment:"Forrige segment",nextSegment:"Neste segment",previousTrack:"Forrige spor",nextTrack:"Neste spor",togglePlaylist:"Bytt spilleliste",visitSourceArticle:"Besøk kildeartikkelen",maximizeVideo:"Maksimer videoen",changePlaybackSpeed:"Endre avspillingshastighet",downloadAudio:"Last ned lyd"}},Symbol.toStringTag,{value:"Module"})),N0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"यो लेख सुन्नुहोस्",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),F0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Luister naar dit artikel",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),U0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Hør denne artikkelen",playAudio:"Spill av lyd",pauseAudio:"Sett lyden på pause",scrubProgressBar:"Scrub fremdriftslinje",visitAdvert:"Besøk annonsen",visitBeyondWords:"Besøk BeyondWords",closeWidget:"Lukk widget",seekBack:"Søk tilbake",seekAhead:"Søk fremover",previousSegment:"Forrige segment",nextSegment:"Neste segment",previousTrack:"Forrige spor",nextTrack:"Neste spor",togglePlaylist:"Bytt spilleliste",visitSourceArticle:"Besøk kildeartikkelen",maximizeVideo:"Maksimer videoen",changePlaybackSpeed:"Endre avspillingshastighet",downloadAudio:"Last ned lyd"}},Symbol.toStringTag,{value:"Module"})),V0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Hør denne artikkelen",playAudio:"Spill av lyd",pauseAudio:"Sett lyden på pause",scrubProgressBar:"Scrub fremdriftslinje",visitAdvert:"Besøk annonsen",visitBeyondWords:"Besøk BeyondWords",closeWidget:"Lukk widget",seekBack:"Søk tilbake",seekAhead:"Søk fremover",previousSegment:"Forrige segment",nextSegment:"Neste segment",previousTrack:"Forrige spor",nextTrack:"Neste spor",togglePlaylist:"Bytt spilleliste",visitSourceArticle:"Besøk kildeartikkelen",maximizeVideo:"Maksimer videoen",changePlaybackSpeed:"Endre avspillingshastighet",downloadAudio:"Last ned lyd"}},Symbol.toStringTag,{value:"Module"})),W0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Barreeffama kana dhaggeeffadhaa",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),j0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ଏହି ଲେଖା ଶୁଣ |",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),G0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ਇਸ ਲੇਖ ਨੂੰ ਸੁਣੋ",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),z0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Posłuchaj tego artykułu",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),H0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"دا لیکنه واورئ",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),K0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Ouça este artigo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Y0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Kay qillqasqata uyariy",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),q0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Ascultă acest articol",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),X0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Прослушать эту статью",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Z0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Umva iyi ngingo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),J0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"මෙම ලිපියට සවන් දෙන්න",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Q0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Vypočujte si tento článok",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),$0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Poslušajte ta članek",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),ev=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Teerera kuchinyorwa ichi",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),tv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Dhageyso maqaalkan",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),iv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Dëgjoni këtë artikull",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),rv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Слушајте овај чланак",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),nv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Lyssna på den här artikeln",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),sv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Sikiliza makala hii",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),av=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"இந்தக் கட்டுரையைக் கேளுங்கள்",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),ov=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ఈ కథనాన్ని వినండి",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),lv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Ин мақоларо гӯш кунед",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),uv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ฟังบทความนี้",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),cv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ነዚ ጽሑፍ ስምዑዎ።",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),dv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Bu makaleyi dinle",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),fv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Бу мәкаләне тыңлагыз",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),hv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"بۇ ماقالىنى ئاڭلاڭ",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),gv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Послухайте цю статтю",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),vv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"اس مضمون کو سنیں۔",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),mv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Ushbu maqolani tinglang",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),pv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Nghe bài viết này",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),_v=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"הערן צו דעם אַרטיקל",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),yv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Gbọ nkan yii",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),bv=Object.freeze(Object.defineProperty({__proto__:null,default:{listenToThisArticle:"聽這篇文章",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Sv=Object.freeze(Object.defineProperty({__proto__:null,default:{listenToThisArticle:"聽這篇文章",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),kv=Object.freeze(Object.defineProperty({__proto__:null,default:{listenToThisArticle:"聽這篇文章",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Tv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"听这篇文章",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Ev=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Lalela lesi sihloko",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Av=t=>t.split("/").pop().split(".")[0],xv=(t,e)=>{wv(t,e),Pv(t),Cv(t)},wv=(t,e)=>{for(const i of Object.keys(t)){const n=i.split("-")[0];e[n]||rr([`The language '${n}' has no default locale set. Should it be '${i}' ?`,`If so, please set 'isDefaultForLanguage: true' in src/translations/${i}.ts`])}},Pv=t=>{const e={};for(const[i,n]of Object.entries(t)){const a=i.split("-")[0];n.isDefaultForLanguage&&(e[a]||(e[a]=[]),e[a].push(i))}for(const[i,n]of Object.entries(e))n.length!==1&&rr([`The language '${i}' has more than one default locale: ${n.map(a=>`'${a}'`).join(", ")}`,"Please ensure 'isDefaultForLanguage: true' is set in exactly one file."])},Cv=t=>{const e=Object.values(t).map(Object.keys).flat(),i=new Set(e.filter(n=>n!=="isDefaultForLanguage"));for(const[n,a]of Object.entries(t))for(const l of i)a[l]||rr([`The locale '${n}' is missing the translation key '${l}'.`,`Please set '${l}: "something"' in src/translations/${n}.ts`])},Uu=Object.entries(Object.assign({"../translations/af.ts":Ag,"../translations/ak.ts":xg,"../translations/am.ts":wg,"../translations/ar.ts":Pg,"../translations/as.ts":Cg,"../translations/az.ts":Lg,"../translations/be.ts":Ig,"../translations/bg.ts":Rg,"../translations/bm.ts":Dg,"../translations/bn.ts":Og,"../translations/bs.ts":Bg,"../translations/ca.ts":Mg,"../translations/ckb.ts":Ng,"../translations/cs.ts":Fg,"../translations/cy.ts":Ug,"../translations/da.ts":Vg,"../translations/de.ts":Wg,"../translations/ee.ts":jg,"../translations/el.ts":Gg,"../translations/en.ts":zg,"../translations/eo.ts":Hg,"../translations/es.ts":Kg,"../translations/et.ts":Yg,"../translations/eu.ts":qg,"../translations/fa.ts":Xg,"../translations/fi.ts":Zg,"../translations/fil.ts":Jg,"../translations/fr.ts":Qg,"../translations/ga.ts":$g,"../translations/gd.ts":e0,"../translations/gl.ts":t0,"../translations/gu.ts":i0,"../translations/ha.ts":r0,"../translations/haw.ts":n0,"../translations/he.ts":s0,"../translations/hi.ts":a0,"../translations/hr.ts":o0,"../translations/hu.ts":l0,"../translations/hy.ts":u0,"../translations/id.ts":c0,"../translations/ig.ts":d0,"../translations/is.ts":f0,"../translations/it.ts":h0,"../translations/iw.ts":g0,"../translations/ja.ts":v0,"../translations/ka.ts":m0,"../translations/kk.ts":p0,"../translations/km.ts":_0,"../translations/kn.ts":y0,"../translations/ko.ts":b0,"../translations/ky.ts":S0,"../translations/lb.ts":k0,"../translations/lg.ts":T0,"../translations/ln.ts":E0,"../translations/lo.ts":A0,"../translations/lt.ts":x0,"../translations/lv.ts":w0,"../translations/mg.ts":P0,"../translations/mk.ts":C0,"../translations/ml.ts":L0,"../translations/mn.ts":I0,"../translations/mr.ts":R0,"../translations/ms.ts":D0,"../translations/mt.ts":O0,"../translations/my.ts":B0,"../translations/nb.ts":M0,"../translations/ne.ts":N0,"../translations/nl.ts":F0,"../translations/nn.ts":U0,"../translations/no.ts":V0,"../translations/om.ts":W0,"../translations/or.ts":j0,"../translations/pa.ts":G0,"../translations/pl.ts":z0,"../translations/ps.ts":H0,"../translations/pt.ts":K0,"../translations/qu.ts":Y0,"../translations/ro.ts":q0,"../translations/ru.ts":X0,"../translations/rw.ts":Z0,"../translations/si.ts":J0,"../translations/sk.ts":Q0,"../translations/sl.ts":$0,"../translations/sn.ts":ev,"../translations/so.ts":tv,"../translations/sq.ts":iv,"../translations/sr.ts":rv,"../translations/sv.ts":nv,"../translations/sw.ts":sv,"../translations/ta.ts":av,"../translations/te.ts":ov,"../translations/tg.ts":lv,"../translations/th.ts":uv,"../translations/ti.ts":cv,"../translations/tr.ts":dv,"../translations/tt.ts":fv,"../translations/ug.ts":hv,"../translations/uk.ts":gv,"../translations/ur.ts":vv,"../translations/uz.ts":mv,"../translations/vi.ts":pv,"../translations/yi.ts":_v,"../translations/yo.ts":yv,"../translations/zh-HK.ts":bv,"../translations/zh-MO.ts":Sv,"../translations/zh-TW.ts":kv,"../translations/zh.ts":Tv,"../translations/zu.ts":Ev})).map(([t,e])=>[Av(t),e.default]),il=Object.fromEntries(Uu.filter(([t,e])=>t.includes("-"))),rl=Object.fromEntries(Uu.filter(([t,e])=>e.isDefaultForLanguage).map(([t,e])=>[t.split("-")[0],e]));xv(il,rl);const bi=(t,{locale:e}={})=>{const i=Lv(e);return i[t]||rr([`No translations found for the '${t}' translation key.`,`Please ensure '${t}: "something"' is set in src/translations/`]),i[t]},Lv=(t=null)=>{const e=[t,...navigator.languages,"en"].filter(i=>i);for(const i of e){const n=i.split("-")[0];if(il[i])return il[i];if(rl[n])return rl[n]}},Zi=t=>t.currentTarget.blur(),nl=(t,e)=>{const i=t.findIndex(g=>g.startTime>e),n=i===-1,a=i-1;return a===-1?0:n?t.length-1:a},Iv=(t,e)=>t.find(i=>{var l,g;const n=i.url&&i.url===(e==null?void 0:e.currentSrc),a=((l=i.url)==null?void 0:l.endsWith(".m3u8"))&&((g=e==null?void 0:e.currentSrc)==null?void 0:g.startsWith("blob:"));return n||a}),b6="",xi=(t,e,i)=>rt(t,e,e==="style"?Dv(i):i),Rv=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Dv=t=>t.split(Rv).map(e=>e+" !important").join(";");function Vu(t,e,i){const n=t.slice();return n[57]=e[i].url,n[58]=e[i].contentType,n[60]=i,n}function Wu(t){let e,i,n,a,l;return{c(){e=F("source"),Rr(e.src,i=`${t[57]}${t[17]}`)||xi(e,"src",i),xi(e,"type",n=t[58])},m(g,p){se(g,e,p),a||(l=ge(e,"error",t[25](t[60])),a=!0)},p(g,p){t=g,p[0]&132096&&!Rr(e.src,i=`${t[57]}${t[17]}`)&&xi(e,"src",i),p[0]&1024&&n!==(n=t[58])&&xi(e,"type",n)},d(g){g&&te(e),a=!1,l()}}}function ju(t){let e,i,n,a,l;function g(T){t[46](T)}function p(T){t[47](T)}function _(T){t[48](T)}let k={onEvent:t[7],vastUrl:t[11],advertConsent:t[4],video:t[8]};return t[0]!==void 0&&(k.playbackState=t[0]),t[2]!==void 0&&(k.duration=t[2]),t[1]!==void 0&&(k.currentTime=t[1]),e=new bg({props:k}),Ne.push(()=>Ze(e,"playbackState",g)),Ne.push(()=>Ze(e,"duration",p)),Ne.push(()=>Ze(e,"currentTime",_)),{c(){He(e.$$.fragment)},m(T,C){Ge(e,T,C),l=!0},p(T,C){const U={};C[0]&128&&(U.onEvent=T[7]),C[0]&2048&&(U.vastUrl=T[11]),C[0]&16&&(U.advertConsent=T[4]),C[0]&256&&(U.video=T[8]),!i&&C[0]&1&&(i=!0,U.playbackState=T[0],Xe(()=>i=!1)),!n&&C[0]&4&&(n=!0,U.duration=T[2],Xe(()=>n=!1)),!a&&C[0]&2&&(a=!0,U.currentTime=T[1],Xe(()=>a=!1)),e.$set(U)},i(T){l||(J(e.$$.fragment,T),l=!0)},o(T){ae(e.$$.fragment,T),l=!1},d(T){ze(e,T)}}}function Gu(t){let e,i,n,a;return{c(){e=F("a"),i=Le(" "),xi(e,"class","custom-advert-link svelte-fdymel"),xi(e,"href",t[16]),xi(e,"target","_blank"),xi(e,"aria-label",bi("visitAdvert"))},m(l,g){se(l,e,g),I(e,i),n||(a=ge(e,"mouseup",Zi),n=!0)},p(l,g){g[0]&65536&&xi(e,"href",l[16])},d(l){l&&te(e),n=!1,a()}}}function Ov(t){let e,i,n,a,l=!1,g,p,_,k,T,C,U,V=t[10],N=[];for(let ie=0;ie<V.length;ie+=1)N[ie]=Wu(Vu(t,V,ie));function Q(){cancelAnimationFrame(g),n.paused||(g=Aa(Q),l=!0),t[44].call(n)}let W=t[11]&&ju(t),ue=t[16]&&Gu(t);return{c(){e=F("div"),i=F("div"),n=F("video");for(let ie=0;ie<N.length;ie+=1)N[ie].c();p=Ce(),W&&W.c(),_=Ce(),ue&&ue.c(),xi(n,"poster",a=t[12]||""),xi(n,"preload","metadata"),n.playsInline=!0,xi(n,"disablepictureinpicture",""),xi(n,"class","svelte-fdymel"),t[2]===void 0&&Wt(()=>t[43].call(n)),xi(i,"class","inner svelte-fdymel"),xi(e,"class",k="media-element "+t[15]+" svelte-fdymel"),xi(e,"style",t[14]),je(e,"animating",t[13]),je(e,"behind-static",t[6]),je(e,"behind-widget",t[5])},m(ie,be){se(ie,e,be),I(e,i),I(i,n);for(let Se=0;Se<N.length;Se+=1)N[Se]&&N[Se].m(n,null);t[42](n),isNaN(t[3])||(n.playbackRate=t[3]),I(i,p),W&&W.m(i,null),I(i,_),ue&&ue.m(i,null),T=!0,C||(U=[ge(n,"durationchange",t[43]),ge(n,"timeupdate",Q),ge(n,"ratechange",t[45]),ge(n,"play",t[18]),ge(n,"pause",t[19]),ge(n,"ended",t[20]),ge(n,"durationchange",t[21]),ge(n,"loadeddata",t[22]),ge(n,"timeupdate",t[23]),ge(n,"ratechange",t[24])],C=!0)},p(ie,be){if(be[0]&33686528){V=ie[10];let Se;for(Se=0;Se<V.length;Se+=1){const fe=Vu(ie,V,Se);N[Se]?N[Se].p(fe,be):(N[Se]=Wu(fe),N[Se].c(),N[Se].m(n,null))}for(;Se<N.length;Se+=1)N[Se].d(1);N.length=V.length}(!T||be[0]&4096&&a!==(a=ie[12]||""))&&xi(n,"poster",a),!l&&be[0]&512&&!isNaN(ie[9])&&(n.currentTime=ie[9]),l=!1,be[0]&8&&!isNaN(ie[3])&&(n.playbackRate=ie[3]),ie[11]?W?(W.p(ie,be),be[0]&2048&&J(W,1)):(W=ju(ie),W.c(),J(W,1),W.m(i,_)):W&&(Lt(),ae(W,1,1,()=>{W=null}),It()),ie[16]?ue?ue.p(ie,be):(ue=Gu(ie),ue.c(),ue.m(i,null)):ue&&(ue.d(1),ue=null),(!T||be[0]&32768&&k!==(k="media-element "+ie[15]+" svelte-fdymel"))&&xi(e,"class",k),(!T||be[0]&16384)&&xi(e,"style",ie[14]),(!T||be[0]&40960)&&je(e,"animating",ie[13]),(!T||be[0]&32832)&&je(e,"behind-static",ie[6]),(!T||be[0]&32800)&&je(e,"behind-widget",ie[5])},i(ie){T||(J(W),T=!0)},o(ie){ae(W),T=!1},d(ie){ie&&te(e),Ln(N,ie),t[42](null),W&&W.d(),ue&&ue.d(),C=!1,Mt(U)}}}function Bv(t,e,i){let n,a,l,g,p,_,k,T,C,U,V,N,Q,{content:W}=e,{contentIndex:ue}=e,{introOrOutro:ie}=e,{activeAdvert:be}=e,{advertConsent:Se}=e,{playbackState:fe}=e,{duration:pe}=e,{currentTime:Z}=e,{playbackRate:L}=e,{prevPercentage:le}=e,{videoBehindWidget:z}=e,{videoBehindStatic:Ke}=e,{widgetPosition:Ie}=e,{widgetWidth:Ee}=e,{onEvent:ke=()=>{}}=e,G,X=null,B,Ue,De=0,q=0,ve=Z;const at=Pe=>i(9,De=Pe),Qe=()=>{var Pe;return(Pe=G==null?void 0:G.play())==null?void 0:Pe.catch(yt)},Et=()=>{Ue&&clearTimeout(Ue),i(13,Ue=setTimeout(()=>i(13,Ue=null),500))},Oe=()=>{ke(qe({type:"PlaybackPlaying",description:"The media began playing from its current playback time.",initiatedBy:"media"}))},Te=()=>{ke(qe({type:"PlaybackPaused",description:"The media became paused at its current playback time.",initiatedBy:"media"}))},it=()=>{ke(qe({type:"PlaybackEnded",description:"The media finished playing because it reached the end.",initiatedBy:"media"}))},xt=()=>{ke(qe({type:"DurationUpdated",description:"The media's duration was updated.",initiatedBy:"media"}))},wt=()=>{const Pe=Iv(_,G);ke(qe({type:"MediaLoaded",description:"The media finished loading its first frame of data.",initiatedBy:"media",loadedMedia:Pe}))},Xt=()=>{k||ke(qe({type:"CurrentTimeUpdated",description:"The media's current time was updated.",initiatedBy:"media"}))},Pt=()=>{ke(qe({type:"CurrentSegmentUpdated",description:"The media's current segment was updated.",initiatedBy:"media",segment:a[Q],contentIndex:ue,segmentIndex:Q}))},Ht=()=>{ke(qe({type:"PlaybackRateUpdated",description:"The media's playback rate was updated.",initiatedBy:"media"}))},yt=Pe=>{if((Pe==null?void 0:Pe.name)!=="NotAllowedError")throw Pe;ke(qe({type:"PlaybackNotAllowed",description:"The media cannot play because there was no user event.",initiatedBy:"media"}))},ft=Pe=>()=>{Pe===_.length-1&&ke(qe({type:"PlaybackErrored",description:"The media failed to play.",initiatedBy:"media",mediaType:"native",mediaUrl:_[0].url,errorMessage:"The video tag contains sources but none are playable."}))},Nt=(Pe,Dt)=>{Dt.fatal&&(X==null||X.destroy(),i(33,X=null),ke(qe({type:"PlaybackErrored",description:"The media failed to play.",initiatedBy:"media",mediaType:"HLS",mediaUrl:_[0].url,errorMessage:`${Dt.type} ${Dt.details}`})))},mt=()=>{ke(qe({type:"FullScreenModeUpdated",description:"The browser entered or exited full screen mode.",initiatedBy:"browser"}))};Ko(()=>{const Pe=addEventListener("fullscreenchange",mt),Dt=addEventListener("webkitfullscreenchange",mt);return()=>{removeEventListener("fullscreenchange",Pe),removeEventListener("fullscreenchange",Dt)}});function bt(Pe){Ne[Pe?"unshift":"push"](()=>{G=Pe,i(8,G)})}function Zt(){pe=this.duration,i(2,pe)}function Rt(){De=this.currentTime,i(9,De)}function Jt(){L=this.playbackRate,i(3,L)}function nt(Pe){fe=Pe,i(0,fe)}function ot(Pe){pe=Pe,i(2,pe)}function li(Pe){Z=Pe,i(1,Z),i(9,De)}return t.$$set=Pe=>{"content"in Pe&&i(27,W=Pe.content),"contentIndex"in Pe&&i(28,ue=Pe.contentIndex),"introOrOutro"in Pe&&i(29,ie=Pe.introOrOutro),"activeAdvert"in Pe&&i(30,be=Pe.activeAdvert),"advertConsent"in Pe&&i(4,Se=Pe.advertConsent),"playbackState"in Pe&&i(0,fe=Pe.playbackState),"duration"in Pe&&i(2,pe=Pe.duration),"currentTime"in Pe&&i(1,Z=Pe.currentTime),"playbackRate"in Pe&&i(3,L=Pe.playbackRate),"prevPercentage"in Pe&&i(26,le=Pe.prevPercentage),"videoBehindWidget"in Pe&&i(5,z=Pe.videoBehindWidget),"videoBehindStatic"in Pe&&i(6,Ke=Pe.videoBehindStatic),"widgetPosition"in Pe&&i(31,Ie=Pe.widgetPosition),"widgetWidth"in Pe&&i(32,Ee=Pe.widgetWidth),"onEvent"in Pe&&i(7,ke=Pe.onEvent)},t.$$.update=()=>{t.$$.dirty[0]&512&&i(1,Z=De),t.$$.dirty[0]&1073741826&&!be&&at(Z),t.$$.dirty[0]&402653184&&i(39,n=W[ue]),t.$$.dirty[1]&256&&i(36,a=(n==null?void 0:n.segments)||[]),t.$$.dirty[0]&1879048192|t.$$.dirty[1]&8&&i(34,q+=1),t.$$.dirty[1]&8&&i(40,l=q===1),t.$$.dirty[1]&512&&i(17,g=l?`#t=${ve}`:""),t.$$.dirty[0]&536870912&&i(41,p=ie),t.$$.dirty[0]&1610612736&&!ie&&i(41,p=be),t.$$.dirty[0]&1610612736|t.$$.dirty[1]&256&&!ie&&!be&&i(41,p=n),t.$$.dirty[0]&256|t.$$.dirty[1]&1024&&i(10,_=Sg(p,G)),t.$$.dirty[0]&1280|t.$$.dirty[1]&516&&i(33,X=Eg(_[0],G,X,Nt,Qe,l&&ve)),t.$$.dirty[0]&1073741824&&i(11,k=be==null?void 0:be.vastUrl),t.$$.dirty[0]&1073741824&&i(16,T=be==null?void 0:be.clickThroughUrl),t.$$.dirty[0]&3329&&!k&&(fe==="playing"?Qe():G==null||G.pause()),t.$$.dirty[0]&1024&&i(26,le=0),t.$$.dirty[0]&32|t.$$.dirty[1]&1&&i(15,C=z&&Ie!=="auto"?`fixed-${Ie}`:""),t.$$.dirty[0]&32|t.$$.dirty[1]&2&&i(14,U=z?`width: ${Ee}`:""),t.$$.dirty[0]&1073741825|t.$$.dirty[1]&256&&i(38,V=fe!=="stopped"&&((be==null?void 0:be.imageUrl)||(n==null?void 0:n.imageUrl))),t.$$.dirty[1]&128&&Ru().then(()=>i(12,B=V)),t.$$.dirty[0]&3&&i(37,N=fe==="stopped"&&Z===0),t.$$.dirty[0]&1610612738|t.$$.dirty[1]&96&&i(35,Q=ie||be||N?-1:nl(a,Z)),t.$$.dirty[1]&16&&Pt(),t.$$.dirty[0]&32&&z&&Et()},[fe,Z,pe,L,Se,z,Ke,ke,G,De,_,k,B,Ue,U,C,T,g,Oe,Te,it,xt,wt,Xt,Ht,ft,le,W,ue,ie,be,Ie,Ee,X,q,Q,a,N,V,n,l,p,bt,Zt,Rt,Jt,nt,ot,li]}class Mv extends tt{constructor(e){super(),et(this,e,Bv,Ov,Ye,{content:27,contentIndex:28,introOrOutro:29,activeAdvert:30,advertConsent:4,playbackState:0,duration:2,currentTime:1,playbackRate:3,prevPercentage:26,videoBehindWidget:5,videoBehindStatic:6,widgetPosition:31,widgetWidth:32,onEvent:7},null,[-1,-1])}get content(){return this.$$.ctx[27]}set content(e){this.$$set({content:e}),w()}get contentIndex(){return this.$$.ctx[28]}set contentIndex(e){this.$$set({contentIndex:e}),w()}get introOrOutro(){return this.$$.ctx[29]}set introOrOutro(e){this.$$set({introOrOutro:e}),w()}get activeAdvert(){return this.$$.ctx[30]}set activeAdvert(e){this.$$set({activeAdvert:e}),w()}get advertConsent(){return this.$$.ctx[4]}set advertConsent(e){this.$$set({advertConsent:e}),w()}get playbackState(){return this.$$.ctx[0]}set playbackState(e){this.$$set({playbackState:e}),w()}get duration(){return this.$$.ctx[2]}set duration(e){this.$$set({duration:e}),w()}get currentTime(){return this.$$.ctx[1]}set currentTime(e){this.$$set({currentTime:e}),w()}get playbackRate(){return this.$$.ctx[3]}set playbackRate(e){this.$$set({playbackRate:e}),w()}get prevPercentage(){return this.$$.ctx[26]}set prevPercentage(e){this.$$set({prevPercentage:e}),w()}get videoBehindWidget(){return this.$$.ctx[5]}set videoBehindWidget(e){this.$$set({videoBehindWidget:e}),w()}get videoBehindStatic(){return this.$$.ctx[6]}set videoBehindStatic(e){this.$$set({videoBehindStatic:e}),w()}get widgetPosition(){return this.$$.ctx[31]}set widgetPosition(e){this.$$set({widgetPosition:e}),w()}get widgetWidth(){return this.$$.ctx[32]}set widgetWidth(e){this.$$set({widgetWidth:e}),w()}get onEvent(){return this.$$.ctx[7]}set onEvent(e){this.$$set({onEvent:e}),w()}}const S6="";function Nv(t){const e=t-1;return e*e*e+1}function Fv(t,{delay:e=0,duration:i=400,easing:n=Nv,x:a=0,y:l=0,opacity:g=0}={}){const p=getComputedStyle(t),_=+p.opacity,k=p.transform==="none"?"":p.transform,T=_*(1-g),[C,U]=Eu(a),[V,N]=Eu(l);return{delay:e,duration:i,easing:n,css:(Q,W)=>`
|
|
26
|
+
Aborting and switching to level `+Ve),r.loader&&(this.fragCurrent=this.partCurrent=null,r.abortRequests()),o.trigger(L.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,part:s,stats:m}))}}}}}}},c.onFragLoaded=function(r,s){var o=s.frag,f=s.part,h=f?f.stats:o.stats;if(o.type===st.MAIN&&this.bwEstimator.sampleTTFB(h.loading.first-h.loading.start),!this.ignoreFragment(o)){if(this.clearTimer(),this.lastLoadedFragLevel=o.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var v=f?f.duration:o.duration,m=this.hls.levels[o.level],y=(m.loaded?m.loaded.bytes:0)+h.loaded,b=(m.loaded?m.loaded.duration:0)+v;m.loaded={bytes:y,duration:b},m.realBitrate=Math.round(8*y/b)}if(o.bitrateTest){var S={stats:h,frag:o,part:f,id:o.type};this.onFragBuffered(L.FRAG_BUFFERED,S),o.bitrateTest=!1}}},c.onFragBuffered=function(r,s){var o=s.frag,f=s.part,h=f!=null&&f.stats.loaded?f.stats:o.stats;if(!h.aborted&&!this.ignoreFragment(o)){var v=h.parsing.end-h.loading.start-Math.min(h.loading.first-h.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(v,h.loaded),h.bwEstimate=this.bwEstimator.getEstimate(),o.bitrateTest?this.bitrateTestDelay=v/1e3:this.bitrateTestDelay=0}},c.ignoreFragment=function(r){return r.type!==st.MAIN||r.sn==="initSegment"},c.clearTimer=function(){self.clearInterval(this.timer)},c.getNextABRAutoLevel=function(){var r=this.fragCurrent,s=this.partCurrent,o=this.hls,f=o.maxAutoLevel,h=o.config,v=o.minAutoLevel,m=o.media,y=s?s.duration:r?r.duration:0,b=m&&m.playbackRate!==0?Math.abs(m.playbackRate):1,S=this.bwEstimator?this.bwEstimator.getEstimate():h.abrEwmaDefaultEstimate,E=o.mainForwardBufferInfo,A=(E?E.len:0)/b,x=this.findBestLevel(S,v,f,A,h.abrBandWidthFactor,h.abrBandWidthUpFactor);if(x>=0)return x;B.trace("[abr] "+(A?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var P=y?Math.min(y,h.maxStarvationDelay):h.maxStarvationDelay,O=h.abrBandWidthFactor,M=h.abrBandWidthUpFactor;if(!A){var D=this.bitrateTestDelay;if(D){var j=y?Math.min(y,h.maxLoadingDelay):h.maxLoadingDelay;P=j-D,B.trace("[abr] bitrate test took "+Math.round(1e3*D)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*P)+" ms"),O=M=1}}return x=this.findBestLevel(S,v,f,A+P,O,M),Math.max(x,0)},c.findBestLevel=function(r,s,o,f,h,v){for(var m,y=this.fragCurrent,b=this.partCurrent,S=this.lastLoadedFragLevel,E=this.hls.levels,A=E[S],x=!!(A!=null&&(m=A.details)!=null&&m.live),P=A==null?void 0:A.codecSet,O=b?b.duration:y?y.duration:0,M=this.bwEstimator.getEstimateTTFB()/1e3,D=s,j=-1,K=o;K>=s;K--){var he=E[K];if(!he||P&&he.codecSet!==P){he&&(D=Math.min(K,D),j=Math.max(K,j));continue}j!==-1&&B.trace("[abr] Skipped level(s) "+D+"-"+j+' with CODECS:"'+E[j].attrs.CODECS+'"; not compatible with "'+A.attrs.CODECS+'"');var re=he.details,ne=(b?re==null?void 0:re.partTarget:re==null?void 0:re.averagetargetduration)||O,xe=void 0;K<=S?xe=h*r:xe=v*r;var we=E[K].maxBitrate,Pe=this.getTimeToLoadFrag(M,xe,we*ne,re===void 0);if(B.trace("[abr] level:"+K+" adjustedbw-bitrate:"+Math.round(xe-we)+" avgDuration:"+ne.toFixed(1)+" maxFetchDuration:"+f.toFixed(1)+" fetchDuration:"+Pe.toFixed(1)),xe>we&&(Pe===0||!Z(Pe)||x&&!this.bitrateTestDelay||Pe<f))return K}return-1},p(d,[{key:"nextAutoLevel",get:function(){var r=this._nextAutoLevel,s=this.bwEstimator;if(r!==-1&&!s.canEstimate())return r;var o=this.getNextABRAutoLevel();if(r!==-1){var f=this.hls.levels;if(f.length>Math.max(r,o)&&f[r].loadError<=f[o].loadError)return r}return r!==-1&&(o=Math.min(r,o)),o},set:function(r){this._nextAutoLevel=r}}]),d}(),W3=function(){function d(u){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=u}var c=d.prototype;return c.append=function(r,s){var o=this.queues[s];o.push(r),o.length===1&&this.buffers[s]&&this.executeNext(s)},c.insertAbort=function(r,s){var o=this.queues[s];o.unshift(r),this.executeNext(s)},c.appendBlocker=function(r){var s,o=new Promise(function(h){s=h}),f={execute:s,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(f,r),o},c.executeNext=function(r){var s=this.buffers,o=this.queues,f=s[r],h=o[r];if(h.length){var v=h[0];try{v.execute()}catch(m){B.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),v.onError(m),f!=null&&f.updating||(h.shift(),this.executeNext(r))}}},c.shiftAndExecuteNext=function(r){this.queues[r].shift(),this.executeNext(r)},c.current=function(r){return this.queues[r][0]},d}(),Jf=Qi(),Qf=/([ha]vc.)(?:\.[^.,]+)+/,j3=function(){function d(u){var r=this;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=function(){var s=r.media,o=r.mediaSource;B.log("[buffer-controller]: Media source opened"),s&&(s.removeEventListener("emptied",r._onMediaEmptied),r.updateMediaElementDuration(),r.hls.trigger(L.MEDIA_ATTACHED,{media:s})),o&&o.removeEventListener("sourceopen",r._onMediaSourceOpen),r.checkPendingTracks()},this._onMediaSourceClose=function(){B.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){B.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=function(){var s=r.media,o=r._objectUrl;s&&s.src!==o&&B.error("Media element src was set while attaching MediaSource ("+o+" > "+s.src+")")},this.hls=u,this._initSourceBuffer(),this.registerListeners()}var c=d.prototype;return c.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},c.destroy=function(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null},c.registerListeners=function(){var r=this.hls;r.on(L.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(L.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(L.MANIFEST_LOADING,this.onManifestLoading,this),r.on(L.MANIFEST_PARSED,this.onManifestParsed,this),r.on(L.BUFFER_RESET,this.onBufferReset,this),r.on(L.BUFFER_APPENDING,this.onBufferAppending,this),r.on(L.BUFFER_CODECS,this.onBufferCodecs,this),r.on(L.BUFFER_EOS,this.onBufferEos,this),r.on(L.BUFFER_FLUSHING,this.onBufferFlushing,this),r.on(L.LEVEL_UPDATED,this.onLevelUpdated,this),r.on(L.FRAG_PARSED,this.onFragParsed,this),r.on(L.FRAG_CHANGED,this.onFragChanged,this)},c.unregisterListeners=function(){var r=this.hls;r.off(L.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(L.MEDIA_DETACHING,this.onMediaDetaching,this),r.off(L.MANIFEST_LOADING,this.onManifestLoading,this),r.off(L.MANIFEST_PARSED,this.onManifestParsed,this),r.off(L.BUFFER_RESET,this.onBufferReset,this),r.off(L.BUFFER_APPENDING,this.onBufferAppending,this),r.off(L.BUFFER_CODECS,this.onBufferCodecs,this),r.off(L.BUFFER_EOS,this.onBufferEos,this),r.off(L.BUFFER_FLUSHING,this.onBufferFlushing,this),r.off(L.LEVEL_UPDATED,this.onLevelUpdated,this),r.off(L.FRAG_PARSED,this.onFragParsed,this),r.off(L.FRAG_CHANGED,this.onFragChanged,this)},c._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new W3(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null},c.onManifestLoading=function(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null},c.onManifestParsed=function(r,s){var o=2;s.audio&&!s.video||s.altAudio,o=1,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=o,B.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},c.onMediaAttaching=function(r,s){var o=this.media=s.media;if(o&&Jf){var f=this.mediaSource=new Jf;f.addEventListener("sourceopen",this._onMediaSourceOpen),f.addEventListener("sourceended",this._onMediaSourceEnded),f.addEventListener("sourceclose",this._onMediaSourceClose),o.src=self.URL.createObjectURL(f),this._objectUrl=o.src,o.addEventListener("emptied",this._onMediaEmptied)}},c.onMediaDetaching=function(){var r=this.media,s=this.mediaSource,o=this._objectUrl;if(s){if(B.log("[buffer-controller]: media source detaching"),s.readyState==="open")try{s.endOfStream()}catch(f){B.warn("[buffer-controller]: onMediaDetaching: "+f.message+" while calling endOfStream")}this.onBufferReset(),s.removeEventListener("sourceopen",this._onMediaSourceOpen),s.removeEventListener("sourceended",this._onMediaSourceEnded),s.removeEventListener("sourceclose",this._onMediaSourceClose),r&&(r.removeEventListener("emptied",this._onMediaEmptied),o&&self.URL.revokeObjectURL(o),r.src===o?(r.removeAttribute("src"),r.load()):B.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={}}this.hls.trigger(L.MEDIA_DETACHED,void 0)},c.onBufferReset=function(){var r=this;this.getSourceBufferTypes().forEach(function(s){var o=r.sourceBuffer[s];try{o&&(r.removeBufferListeners(s),r.mediaSource&&r.mediaSource.removeSourceBuffer(o),r.sourceBuffer[s]=void 0)}catch(f){B.warn("[buffer-controller]: Failed to reset the "+s+" buffer",f)}}),this._initSourceBuffer()},c.onBufferCodecs=function(r,s){var o=this,f=this.getSourceBufferTypes().length;Object.keys(s).forEach(function(h){if(f){var v=o.tracks[h];if(v&&typeof v.buffer.changeType=="function"){var m=s[h],y=m.id,b=m.codec,S=m.levelCodec,E=m.container,A=m.metadata,x=(v.levelCodec||v.codec).replace(Qf,"$1"),P=(S||b).replace(Qf,"$1");if(x!==P){var O=E+";codecs="+(S||b);o.appendChangeType(h,O),B.log("[buffer-controller]: switching codec "+x+" to "+P),o.tracks[h]={buffer:v.buffer,codec:b,container:E,levelCodec:S,metadata:A,id:y}}}}else o.pendingTracks[h]=s[h]}),!f&&(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks())},c.appendChangeType=function(r,s){var o=this,f=this.operationQueue,h={execute:function(){var m=o.sourceBuffer[r];m&&(B.log("[buffer-controller]: changing "+r+" sourceBuffer type to "+s),m.changeType(s)),f.shiftAndExecuteNext(r)},onStart:function(){},onComplete:function(){},onError:function(m){B.warn("[buffer-controller]: Failed to change "+r+" SourceBuffer type",m)}};f.append(h,r)},c.onBufferAppending=function(r,s){var o=this,f=this.hls,h=this.operationQueue,v=this.tracks,m=s.data,y=s.type,b=s.frag,S=s.part,E=s.chunkMeta,A=E.buffering[y],x=self.performance.now();A.start=x;var P=b.stats.buffering,O=S?S.stats.buffering:null;P.start===0&&(P.start=x),O&&O.start===0&&(O.start=x);var M=v.audio,D=!1;y==="audio"&&(M==null?void 0:M.container)==="audio/mpeg"&&(D=!this.lastMpegAudioChunk||E.id===1||this.lastMpegAudioChunk.sn!==E.sn,this.lastMpegAudioChunk=E);var j=b.start,K={execute:function(){if(A.executeStart=self.performance.now(),D){var re=o.sourceBuffer[y];if(re){var ne=j-re.timestampOffset;Math.abs(ne)>=.1&&(B.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+j+" (delta: "+ne+") sn: "+b.sn+")"),re.timestampOffset=j)}}o.appendExecutor(m,y)},onStart:function(){},onComplete:function(){var re=self.performance.now();A.executeEnd=A.end=re,P.first===0&&(P.first=re),O&&O.first===0&&(O.first=re);var ne=o.sourceBuffer,xe={};for(var we in ne)xe[we]=Oi.getBuffered(ne[we]);o.appendError=0,o.hls.trigger(L.BUFFER_APPENDED,{type:y,frag:b,part:S,chunkMeta:E,parent:b.type,timeRanges:xe})},onError:function(re){B.error("[buffer-controller]: Error encountered while trying to append to the "+y+" SourceBuffer",re);var ne={type:le.MEDIA_ERROR,parent:b.type,details:z.BUFFER_APPEND_ERROR,frag:b,part:S,chunkMeta:E,error:re,err:re,fatal:!1};re.code===DOMException.QUOTA_EXCEEDED_ERR?ne.details=z.BUFFER_FULL_ERROR:(o.appendError++,ne.details=z.BUFFER_APPEND_ERROR,o.appendError>f.config.appendErrorMaxRetry&&(B.error("[buffer-controller]: Failed "+f.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),ne.fatal=!0)),f.trigger(L.ERROR,ne)}};h.append(K,y)},c.onBufferFlushing=function(r,s){var o=this,f=this.operationQueue,h=function(m){return{execute:o.removeExecutor.bind(o,m,s.startOffset,s.endOffset),onStart:function(){},onComplete:function(){o.hls.trigger(L.BUFFER_FLUSHED,{type:m})},onError:function(b){B.warn("[buffer-controller]: Failed to remove from "+m+" SourceBuffer",b)}}};s.type?f.append(h(s.type),s.type):this.getSourceBufferTypes().forEach(function(v){f.append(h(v),v)})},c.onFragParsed=function(r,s){var o=this,f=s.frag,h=s.part,v=[],m=h?h.elementaryStreams:f.elementaryStreams;m[Oe.AUDIOVIDEO]?v.push("audiovideo"):(m[Oe.AUDIO]&&v.push("audio"),m[Oe.VIDEO]&&v.push("video"));var y=function(){var S=self.performance.now();f.stats.buffering.end=S,h&&(h.stats.buffering.end=S);var E=h?h.stats:f.stats;o.hls.trigger(L.FRAG_BUFFERED,{frag:f,part:h,stats:E,id:f.type})};v.length===0&&B.warn("Fragments must have at least one ElementaryStreamType set. type: "+f.type+" level: "+f.level+" sn: "+f.sn),this.blockBuffers(y,v)},c.onFragChanged=function(r,s){this.flushBackBuffer()},c.onBufferEos=function(r,s){var o=this,f=this.getSourceBufferTypes().reduce(function(h,v){var m=o.sourceBuffer[v];return m&&(!s.type||s.type===v)&&(m.ending=!0,m.ended||(m.ended=!0,B.log("[buffer-controller]: "+v+" sourceBuffer now EOS"))),h&&!!(!m||m.ended)},!0);f&&(B.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers(function(){o.getSourceBufferTypes().forEach(function(v){var m=o.sourceBuffer[v];m&&(m.ending=!1)});var h=o.mediaSource;if(!h||h.readyState!=="open"){h&&B.info("[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: "+h.readyState);return}B.log("[buffer-controller]: Calling mediaSource.endOfStream()"),h.endOfStream()}))},c.onLevelUpdated=function(r,s){var o=s.details;o.fragments.length&&(this.details=o,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},c.flushBackBuffer=function(){var r=this.hls,s=this.details,o=this.media,f=this.sourceBuffer;if(!(!o||s===null)){var h=this.getSourceBufferTypes();if(h.length){var v=s.live&&r.config.liveBackBufferLength!==null?r.config.liveBackBufferLength:r.config.backBufferLength;if(!(!Z(v)||v<0)){var m=o.currentTime,y=s.levelTargetDuration,b=Math.max(v,y),S=Math.floor(m/y)*y-b;h.forEach(function(E){var A=f[E];if(A){var x=Oi.getBuffered(A);if(x.length>0&&S>x.start(0)){if(r.trigger(L.BACK_BUFFER_REACHED,{bufferEnd:S}),s.live)r.trigger(L.LIVE_BACK_BUFFER_REACHED,{bufferEnd:S});else if(A.ended&&x.end(x.length-1)-m<y*2){B.info("[buffer-controller]: Cannot flush "+E+" back buffer while SourceBuffer is in ended state");return}r.trigger(L.BUFFER_FLUSHING,{startOffset:0,endOffset:S,type:E})}}})}}}},c.updateMediaElementDuration=function(){if(!(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")){var r=this.details,s=this.hls,o=this.media,f=this.mediaSource,h=r.fragments[0].start+r.totalduration,v=o.duration,m=Z(f.duration)?f.duration:0;r.live&&s.config.liveDurationInfinity?(B.log("[buffer-controller]: Media Source duration is set to Infinity"),f.duration=1/0,this.updateSeekableRange(r)):(h>m&&h>v||!Z(v))&&(B.log("[buffer-controller]: Updating Media Source duration to "+h.toFixed(3)),f.duration=h)}},c.updateSeekableRange=function(r){var s=this.mediaSource,o=r.fragments,f=o.length;if(f&&r.live&&s!=null&&s.setLiveSeekableRange){var h=Math.max(0,o[0].start),v=Math.max(h,h+r.totalduration);s.setLiveSeekableRange(h,v)}},c.checkPendingTracks=function(){var r=this.bufferCodecEventsExpected,s=this.operationQueue,o=this.pendingTracks,f=Object.keys(o).length;if(f&&!r||f===2){this.createSourceBuffers(o),this.pendingTracks={};var h=this.getSourceBufferTypes();if(h.length)this.hls.trigger(L.BUFFER_CREATED,{tracks:this.tracks}),h.forEach(function(m){s.executeNext(m)});else{var v=new Error("could not create source buffer for media codec(s)");this.hls.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:v,reason:v.message})}}},c.createSourceBuffers=function(r){var s=this.sourceBuffer,o=this.mediaSource;if(!o)throw Error("createSourceBuffers called when mediaSource was null");for(var f in r)if(!s[f]){var h=r[f];if(!h)throw Error("source buffer exists for track "+f+", however track does not");var v=h.levelCodec||h.codec,m=h.container+";codecs="+v;B.log("[buffer-controller]: creating sourceBuffer("+m+")");try{var y=s[f]=o.addSourceBuffer(m),b=f;this.addBufferListener(b,"updatestart",this._onSBUpdateStart),this.addBufferListener(b,"updateend",this._onSBUpdateEnd),this.addBufferListener(b,"error",this._onSBUpdateError),this.tracks[f]={buffer:y,codec:v,container:h.container,levelCodec:h.levelCodec,metadata:h.metadata,id:h.id}}catch(S){B.error("[buffer-controller]: error while trying to add sourceBuffer: "+S.message),this.hls.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:S,mimeType:m})}}},c._onSBUpdateStart=function(r){var s=this.operationQueue,o=s.current(r);o.onStart()},c._onSBUpdateEnd=function(r){var s=this.operationQueue,o=s.current(r);o.onComplete(),s.shiftAndExecuteNext(r)},c._onSBUpdateError=function(r,s){var o=new Error(r+" SourceBuffer error");B.error("[buffer-controller]: "+o,s),this.hls.trigger(L.ERROR,{type:le.MEDIA_ERROR,details:z.BUFFER_APPENDING_ERROR,error:o,fatal:!1});var f=this.operationQueue.current(r);f&&f.onError(s)},c.removeExecutor=function(r,s,o){var f=this.media,h=this.mediaSource,v=this.operationQueue,m=this.sourceBuffer,y=m[r];if(!f||!h||!y){B.warn("[buffer-controller]: Attempting to remove from the "+r+" SourceBuffer, but it does not exist"),v.shiftAndExecuteNext(r);return}var b=Z(f.duration)?f.duration:1/0,S=Z(h.duration)?h.duration:1/0,E=Math.max(0,s),A=Math.min(o,b,S);A>E&&!y.ending?(y.ended=!1,B.log("[buffer-controller]: Removing ["+E+","+A+"] from the "+r+" SourceBuffer"),y.remove(E,A)):v.shiftAndExecuteNext(r)},c.appendExecutor=function(r,s){var o=this.operationQueue,f=this.sourceBuffer,h=f[s];if(!h){B.warn("[buffer-controller]: Attempting to append to the "+s+" SourceBuffer, but it does not exist"),o.shiftAndExecuteNext(s);return}h.ended=!1,h.appendBuffer(r)},c.blockBuffers=function(r,s){var o=this;if(s===void 0&&(s=this.getSourceBufferTypes()),!s.length){B.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(r);return}var f=this.operationQueue,h=s.map(function(v){return f.appendBlocker(v)});Promise.all(h).then(function(){r(),s.forEach(function(v){var m=o.sourceBuffer[v];m!=null&&m.updating||f.shiftAndExecuteNext(v)})})},c.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},c.addBufferListener=function(r,s,o){var f=this.sourceBuffer[r];if(f){var h=o.bind(this,r);this.listeners[r].push({event:s,listener:h}),f.addEventListener(s,h)}},c.removeBufferListeners=function(r){var s=this.sourceBuffer[r];s&&this.listeners[r].forEach(function(o){s.removeEventListener(o.event,o.listener)})},d}(),G3=function(){function d(u){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=u,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var c=d.prototype;return c.setStreamController=function(r){this.streamController=r},c.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},c.registerListeners=function(){var r=this.hls;r.on(L.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.on(L.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(L.MANIFEST_PARSED,this.onManifestParsed,this),r.on(L.BUFFER_CODECS,this.onBufferCodecs,this),r.on(L.MEDIA_DETACHING,this.onMediaDetaching,this)},c.unregisterListener=function(){var r=this.hls;r.off(L.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),r.off(L.MEDIA_ATTACHING,this.onMediaAttaching,this),r.off(L.MANIFEST_PARSED,this.onManifestParsed,this),r.off(L.BUFFER_CODECS,this.onBufferCodecs,this),r.off(L.MEDIA_DETACHING,this.onMediaDetaching,this)},c.onFpsDropLevelCapping=function(r,s){var o=this.hls.levels[s.droppedLevel];this.isLevelAllowed(o)&&this.restrictedLevels.push({bitrate:o.bitrate,height:o.height,width:o.width})},c.onMediaAttaching=function(r,s){this.media=s.media instanceof HTMLVideoElement?s.media:null,this.clientRect=null},c.onManifestParsed=function(r,s){var o=this.hls;this.restrictedLevels=[],this.firstLevel=s.firstLevel,o.config.capLevelToPlayerSize&&s.video&&this.startCapping()},c.onBufferCodecs=function(r,s){var o=this.hls;o.config.capLevelToPlayerSize&&s.video&&this.startCapping()},c.onMediaDetaching=function(){this.stopCapping()},c.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var r=this.hls.levels;if(r.length){var s=this.hls;s.autoLevelCapping=this.getMaxLevel(r.length-1),s.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=s.autoLevelCapping}}},c.getMaxLevel=function(r){var s=this,o=this.hls.levels;if(!o.length)return-1;var f=o.filter(function(h,v){return s.isLevelAllowed(h)&&v<=r});return this.clientRect=null,d.getMaxLevelByMediaSize(f,this.mediaWidth,this.mediaHeight)},c.startCapping=function(){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())},c.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},c.getDimensions=function(){if(this.clientRect)return this.clientRect;var r=this.media,s={width:0,height:0};if(r){var o=r.getBoundingClientRect();s.width=o.width,s.height=o.height,!s.width&&!s.height&&(s.width=o.right-o.left||r.width||0,s.height=o.bottom-o.top||r.height||0)}return this.clientRect=s,s},c.isLevelAllowed=function(r){var s=this.restrictedLevels;return!s.some(function(o){return r.bitrate===o.bitrate&&r.width===o.width&&r.height===o.height})},d.getMaxLevelByMediaSize=function(r,s,o){if(!(r!=null&&r.length))return-1;for(var f=function(b,S){return S?b.width!==S.width||b.height!==S.height:!0},h=r.length-1,v=0;v<r.length;v+=1){var m=r[v];if((m.width>=s||m.height>=o)&&f(m,r[v+1])){h=v;break}}return h},p(d,[{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var r=1;if(!this.hls.config.ignoreDevicePixelRatio)try{r=self.devicePixelRatio}catch(s){}return r}}]),d}(),z3=function(){function d(u){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=u,this.registerListeners()}var c=d.prototype;return c.setStreamController=function(r){this.streamController=r},c.registerListeners=function(){this.hls.on(L.MEDIA_ATTACHING,this.onMediaAttaching,this)},c.unregisterListeners=function(){this.hls.off(L.MEDIA_ATTACHING,this.onMediaAttaching,this)},c.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},c.onMediaAttaching=function(r,s){var o=this.hls.config;if(o.capLevelOnFPSDrop){var f=s.media instanceof self.HTMLVideoElement?s.media:null;this.media=f,f&&typeof f.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),o.fpsDroppedMonitoringPeriod)}},c.checkFPS=function(r,s,o){var f=performance.now();if(s){if(this.lastTime){var h=f-this.lastTime,v=o-this.lastDroppedFrames,m=s-this.lastDecodedFrames,y=1e3*v/h,b=this.hls;if(b.trigger(L.FPS_DROP,{currentDropped:v,currentDecoded:m,totalDroppedFrames:o}),y>0&&v>b.config.fpsDroppedMonitoringThreshold*m){var S=b.currentLevel;B.warn("drop FPS ratio greater than max allowed value for currentLevel: "+S),S>0&&(b.autoLevelCapping===-1||b.autoLevelCapping>=S)&&(S=S-1,b.trigger(L.FPS_DROP_LEVEL_CAPPING,{level:S,droppedLevel:b.currentLevel}),b.autoLevelCapping=S,this.streamController.nextLevelSwitch())}}this.lastTime=f,this.lastDroppedFrames=o,this.lastDecodedFrames=s}},c.checkFPSInterval=function(){var r=this.media;if(r)if(this.isVideoPlaybackQualityAvailable){var s=r.getVideoPlaybackQuality();this.checkFPS(r,s.totalVideoFrames,s.droppedVideoFrames)}else this.checkFPS(r,r.webkitDecodedFrameCount,r.webkitDroppedFrameCount)},d}(),H3=/^age:\s*[\d.]+\s*$/im,$f=function(){function d(u){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=u&&u.xhrSetup||null,this.stats=new Et,this.retryDelay=0}var c=d.prototype;return c.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},c.abortInternal=function(){var r=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),r&&(r.onreadystatechange=null,r.onprogress=null,r.readyState!==4&&(this.stats.aborted=!0,r.abort()))},c.abort=function(){var r;this.abortInternal(),(r=this.callbacks)!=null&&r.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},c.load=function(r,s,o){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=r,this.config=s,this.callbacks=o,this.loadInternal()},c.loadInternal=function(){var r=this,s=this.config,o=this.context;if(s){var f=this.loader=new self.XMLHttpRequest,h=this.stats;h.loading.first=0,h.loaded=0,h.aborted=!1;var v=this.xhrSetup;v?Promise.resolve().then(function(){if(!r.stats.aborted)return v(f,o.url)}).catch(function(m){return f.open("GET",o.url,!0),v(f,o.url)}).then(function(){r.stats.aborted||r.openAndSendXhr(f,o,s)}).catch(function(m){r.callbacks.onError({code:f.status,text:m.message},o,f,h)}):this.openAndSendXhr(f,o,s)}},c.openAndSendXhr=function(r,s,o){r.readyState||r.open("GET",s.url,!0);var f=this.context.headers,h=o.loadPolicy,v=h.maxTimeToFirstByteMs,m=h.maxLoadTimeMs;if(f)for(var y in f)r.setRequestHeader(y,f[y]);s.rangeEnd&&r.setRequestHeader("Range","bytes="+s.rangeStart+"-"+(s.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=s.responseType,self.clearTimeout(this.requestTimeout),o.timeout=v&&Z(v)?v:m,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout),r.send()},c.readystatechange=function(){var r=this.context,s=this.loader,o=this.stats;if(!(!r||!s)){var f=s.readyState,h=this.config;if(!o.aborted&&f>=2&&(o.loading.first===0&&(o.loading.first=Math.max(self.performance.now(),o.loading.start),h.timeout!==h.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),h.timeout=h.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),h.loadPolicy.maxLoadTimeMs-(o.loading.first-o.loading.start)))),f===4)){self.clearTimeout(this.requestTimeout),s.onreadystatechange=null,s.onprogress=null;var v=s.status,m=s.responseType!=="text";if(v>=200&&v<300&&(m&&s.response||s.responseText!==null)){o.loading.end=Math.max(self.performance.now(),o.loading.first);var y=m?s.response:s.responseText,b=s.responseType==="arraybuffer"?y.byteLength:y.length;if(o.loaded=o.total=b,o.bwEstimate=o.total*8e3/(o.loading.end-o.loading.first),!this.callbacks)return;var S=this.callbacks.onProgress;if(S&&S(o,r,y,s),!this.callbacks)return;var E={url:s.responseURL,data:y,code:v};this.callbacks.onSuccess(E,o,r,s)}else{var A=h.loadPolicy.errorRetry,x=o.retry;Bo(A,x,!1,v)?this.retry(A):(B.error(v+" while loading "+r.url),this.callbacks.onError({code:v,text:s.statusText},r,s,o))}}}},c.loadtimeout=function(){var r,s=(r=this.config)==null?void 0:r.loadPolicy.timeoutRetry,o=this.stats.retry;if(Bo(s,o,!0))this.retry(s);else{B.warn("timeout while loading "+this.context.url);var f=this.callbacks;f&&(this.abortInternal(),f.onTimeout(this.stats,this.context,this.loader))}},c.retry=function(r){var s=this.context,o=this.stats;this.retryDelay=Yl(r,o.retry),o.retry++,B.warn((status?"HTTP Status "+status:"Timeout")+" while loading "+s.url+", retrying "+o.retry+"/"+r.maxNumRetry+" in "+this.retryDelay+"ms"),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)},c.loadprogress=function(r){var s=this.stats;s.loaded=r.loaded,r.lengthComputable&&(s.total=r.total)},c.getCacheAge=function(){var r=null;if(this.loader&&H3.test(this.loader.getAllResponseHeaders())){var s=this.loader.getResponseHeader("age");r=s?parseFloat(s):null}return r},c.getResponseHeader=function(r){return this.loader&&new RegExp("^"+r+":\\s*[\\d.]+\\s*$","im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(r):null},d}(),K3=function(){function d(){this.chunks=[],this.dataLength=0}var c=d.prototype;return c.push=function(r){this.chunks.push(r),this.dataLength+=r.length},c.flush=function(){var r=this.chunks,s=this.dataLength,o;if(r.length)r.length===1?o=r[0]:o=Y3(r,s);else return new Uint8Array(0);return this.reset(),o},c.reset=function(){this.chunks.length=0,this.dataLength=0},d}();function Y3(d,c){for(var u=new Uint8Array(c),r=0,s=0;s<d.length;s++){var o=d[s];u.set(o,r),r+=o.length}return u}function q3(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(d){}return!1}var X3=/(\d+)-(\d+)\/(\d+)/,eh=function(){function d(u){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=u.fetchSetup||$3,this.controller=new self.AbortController,this.stats=new Et}var c=d.prototype;return c.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},c.abortInternal=function(){var r=this.response;r!=null&&r.ok||(this.stats.aborted=!0,this.controller.abort())},c.abort=function(){var r;this.abortInternal(),(r=this.callbacks)!=null&&r.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},c.load=function(r,s,o){var f=this,h=this.stats;if(h.loading.start)throw new Error("Loader can only be used once.");h.loading.start=self.performance.now();var v=Z3(r,this.controller.signal),m=o.onProgress,y=r.responseType==="arraybuffer",b=y?"byteLength":"length",S=s.loadPolicy,E=S.maxTimeToFirstByteMs,A=S.maxLoadTimeMs;this.context=r,this.config=s,this.callbacks=o,this.request=this.fetchSetup(r,v),self.clearTimeout(this.requestTimeout),s.timeout=E&&Z(E)?E:A,this.requestTimeout=self.setTimeout(function(){f.abortInternal(),o.onTimeout(h,r,f.response)},s.timeout),self.fetch(this.request).then(function(x){f.response=f.loader=x;var P=Math.max(self.performance.now(),h.loading.start);if(self.clearTimeout(f.requestTimeout),s.timeout=A,f.requestTimeout=self.setTimeout(function(){f.abortInternal(),o.onTimeout(h,r,f.response)},A-(P-h.loading.start)),!x.ok){var O=x.status,M=x.statusText;throw new eE(M||"fetch, bad network response",O,x)}return h.loading.first=P,h.total=Q3(x.headers)||h.total,m&&Z(s.highWaterMark)?f.loadProgressively(x,h,r,s.highWaterMark,m):y?x.arrayBuffer():r.responseType==="json"?x.json():x.text()}).then(function(x){var P=f.response;self.clearTimeout(f.requestTimeout),h.loading.end=Math.max(self.performance.now(),h.loading.first);var O=x[b];O&&(h.loaded=h.total=O);var M={url:P.url,data:x,code:P.status};m&&!Z(s.highWaterMark)&&m(h,r,x,P),o.onSuccess(M,h,r,P)}).catch(function(x){if(self.clearTimeout(f.requestTimeout),!h.aborted){var P=x&&x.code||0,O=x?x.message:null;o.onError({code:P,text:O},r,x?x.details:null,h)}})},c.getCacheAge=function(){var r=null;if(this.response){var s=this.response.headers.get("age");r=s?parseFloat(s):null}return r},c.getResponseHeader=function(r){return this.response?this.response.headers.get(r):null},c.loadProgressively=function(r,s,o,f,h){f===void 0&&(f=0);var v=new K3,m=r.body.getReader(),y=function b(){return m.read().then(function(S){if(S.done)return v.dataLength&&h(s,o,v.flush(),r),Promise.resolve(new ArrayBuffer(0));var E=S.value,A=E.length;return s.loaded+=A,A<f||v.dataLength?(v.push(E),v.dataLength>=f&&h(s,o,v.flush(),r)):h(s,o,E,r),b()}).catch(function(){return Promise.reject()})};return y()},d}();function Z3(d,c){var u={method:"GET",mode:"cors",credentials:"same-origin",signal:c,headers:new self.Headers(k({},d.headers))};return d.rangeEnd&&u.headers.set("Range","bytes="+d.rangeStart+"-"+String(d.rangeEnd-1)),u}function J3(d){var c=X3.exec(d);if(c)return parseInt(c[2])-parseInt(c[1])+1}function Q3(d){var c=d.get("Content-Range");if(c){var u=J3(c);if(Z(u))return u}var r=d.get("Content-Length");if(r)return parseInt(r)}function $3(d,c){return new self.Request(d.url,c)}var eE=function(d){T(c,d);function c(u,r,s){var o;return o=d.call(this,u)||this,o.code=void 0,o.details=void 0,o.code=r,o.details=s,o}return c}(W(Error)),th={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},tE=l(l({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:$f,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:V3,bufferController:j3,capLevelController:G3,errorController:A2,fpsController:z3,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:null,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,certLoadPolicy:{default:th},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:th},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},iE()),{},{subtitleStreamController:void 0,subtitleTrackController:void 0,timelineController:void 0,audioStreamController:void 0,audioTrackController:void 0,emeController:void 0,cmcdController:void 0,contentSteeringController:void 0});function iE(){return{cueHandler:Ht,enableWebVTT:!1,enableIMSC1:!1,enableCEA708Captions:!1,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function rE(d,c){if((c.liveSyncDurationCount||c.liveMaxLatencyDurationCount)&&(c.liveSyncDuration||c.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(c.liveMaxLatencyDurationCount!==void 0&&(c.liveSyncDurationCount===void 0||c.liveMaxLatencyDurationCount<=c.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(c.liveMaxLatencyDuration!==void 0&&(c.liveSyncDuration===void 0||c.liveMaxLatencyDuration<=c.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');var u=cu(d),r=["manifest","level","frag"],s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return r.forEach(function(o){var f=(o==="level"?"playlist":o)+"LoadPolicy",h=c[f]===void 0,v=[];s.forEach(function(m){var y=o+"Loading"+m,b=c[y];if(b!==void 0&&h){v.push(y);var S=u[f].default;switch(c[f]={default:S},m){case"TimeOut":S.maxLoadTimeMs=b,S.maxTimeToFirstByteMs=b;break;case"MaxRetry":S.errorRetry.maxNumRetry=b,S.timeoutRetry.maxNumRetry=b;break;case"RetryDelay":S.errorRetry.retryDelayMs=b,S.timeoutRetry.retryDelayMs=b;break;case"MaxRetryTimeout":S.errorRetry.maxRetryDelayMs=b,S.timeoutRetry.maxRetryDelayMs=b;break}}}),v.length&&B.warn('hls.js config: "'+v.join('", "')+'" setting(s) are deprecated, use "'+f+'": '+JSON.stringify(c[f]))}),l(l({},u),c)}function cu(d){return d&&typeof d=="object"?Array.isArray(d)?d.map(cu):Object.keys(d).reduce(function(c,u){return c[u]=cu(d[u]),c},{}):d}function nE(d){var c=d.loader;if(c!==eh&&c!==$f)B.log("[config]: Custom loader detected, cannot enable progressive streaming"),d.progressive=!1;else{var u=q3();u&&(d.loader=eh,d.progressive=!0,d.enableSoftwareAES=!0,B.log("[config]: Progressive streaming enabled, using FetchLoader"))}}var ih=function(){d.isSupported=function(){return Y2()};function d(u){u===void 0&&(u={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new au,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,X(u.debug||!1,"Hls instance");var r=this.config=rE(d.DefaultConfig,u);this.userConfig=u,this._autoLevelCapping=-1,r.progressive&&nE(r);var s=r.abrController,o=r.bufferController,f=r.capLevelController,h=r.errorController,v=r.fpsController,m=new h(this),y=this.abrController=new s(this),b=this.bufferController=new o(this),S=this.capLevelController=new f(this),E=new v(this),A=new $r(this),x=new Fs(this),P=r.contentSteeringController,O=P?new P(this):null,M=this.levelController=new P2(this,O),D=new C2(this),j=new I2(this.config),K=this.streamController=new F3(this,D,j);S.setStreamController(K),E.setStreamController(K);var he=[A,M,K];O&&he.splice(1,0,O),this.networkControllers=he;var re=[y,b,S,E,x,D];this.audioTrackController=this.createController(r.audioTrackController,he);var ne=r.audioStreamController;ne&&he.push(new ne(this,D,j)),this.subtitleTrackController=this.createController(r.subtitleTrackController,he);var xe=r.subtitleStreamController;xe&&he.push(new xe(this,D,j)),this.createController(r.timelineController,re),j.emeController=this.emeController=this.createController(r.emeController,re),this.cmcdController=this.createController(r.cmcdController,re),this.latencyController=this.createController(kr,re),this.coreComponents=re,he.push(m);var we=m.onErrorOut;typeof we=="function"&&this.on(L.ERROR,we,m)}var c=d.prototype;return c.createController=function(r,s){if(r){var o=new r(this);return s&&s.push(o),o}return null},c.on=function(r,s,o){o===void 0&&(o=this),this._emitter.on(r,s,o)},c.once=function(r,s,o){o===void 0&&(o=this),this._emitter.once(r,s,o)},c.removeAllListeners=function(r){this._emitter.removeAllListeners(r)},c.off=function(r,s,o,f){o===void 0&&(o=this),this._emitter.off(r,s,o,f)},c.listeners=function(r){return this._emitter.listeners(r)},c.emit=function(r,s,o){return this._emitter.emit(r,s,o)},c.trigger=function(r,s){if(this.config.debug)return this.emit(r,r,s);try{return this.emit(r,r,s)}catch(o){B.error("An internal error happened while handling event "+r+'. Error message: "'+o.message+'". Here is a stacktrace:',o),this.trigger(L.ERROR,{type:le.OTHER_ERROR,details:z.INTERNAL_EXCEPTION,fatal:!1,event:r,error:o})}return!1},c.listenerCount=function(r){return this._emitter.listenerCount(r)},c.destroy=function(){B.log("destroy"),this.trigger(L.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(s){return s.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(s){return s.destroy()}),this.coreComponents.length=0;var r=this.config;r.xhrSetup=r.fetchSetup=void 0,this.userConfig=null},c.attachMedia=function(r){B.log("attachMedia"),this._media=r,this.trigger(L.MEDIA_ATTACHING,{media:r})},c.detachMedia=function(){B.log("detachMedia"),this.trigger(L.MEDIA_DETACHING,void 0),this._media=null},c.loadSource=function(r){this.stopLoad();var s=this.media,o=this.url,f=this.url=pe.buildAbsoluteURL(self.location.href,r,{alwaysNormalize:!0});B.log("loadSource:"+f),s&&o&&(o!==f||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(s)),this.trigger(L.MANIFEST_LOADING,{url:r})},c.startLoad=function(r){r===void 0&&(r=-1),B.log("startLoad("+r+")"),this.networkControllers.forEach(function(s){s.startLoad(r)})},c.stopLoad=function(){B.log("stopLoad"),this.networkControllers.forEach(function(r){r.stopLoad()})},c.swapAudioCodec=function(){B.log("swapAudioCodec"),this.streamController.swapAudioCodec()},c.recoverMediaError=function(){B.log("recoverMediaError");var r=this._media;this.detachMedia(),r&&this.attachMedia(r)},c.removeLevel=function(r,s){s===void 0&&(s=0),this.levelController.removeLevel(r,s)},p(d,[{key:"levels",get:function(){var r=this.levelController.levels;return r||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(r){B.log("set currentLevel:"+r),this.loadLevel=r,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(r){B.log("set nextLevel:"+r),this.levelController.manualLevel=r,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(r){B.log("set loadLevel:"+r),this.levelController.manualLevel=r}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(r){this.levelController.nextLoadLevel=r}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(r){B.log("set firstLevel:"+r),this.levelController.firstLevel=r}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(r){B.log("set startLevel:"+r),r!==-1&&(r=Math.max(r,this.minAutoLevel)),this.levelController.startLevel=r}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(r){var s=!!r;s!==this.config.capLevelToPlayerSize&&(s?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=s)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(r){this._autoLevelCapping!==r&&(B.log("set autoLevelCapping:"+r),this._autoLevelCapping=r)}},{key:"bandwidthEstimate",get:function(){var r=this.abrController.bwEstimator;return r?r.getEstimate():NaN}},{key:"ttfbEstimate",get:function(){var r=this.abrController.bwEstimator;return r?r.getEstimateTTFB():NaN}},{key:"maxHdcpLevel",get:function(){return this._maxHdcpLevel},set:function(r){jn.indexOf(r)>-1&&(this._maxHdcpLevel=r)}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var r=this.levels,s=this.config.minAutoBitrate;if(!r)return 0;for(var o=r.length,f=0;f<o;f++)if(r[f].maxBitrate>=s)return f;return 0}},{key:"maxAutoLevel",get:function(){var r=this.levels,s=this.autoLevelCapping,o=this.maxHdcpLevel,f;if(s===-1&&r&&r.length?f=r.length-1:f=s,o)for(var h=f;h--;){var v=r[h].attrs["HDCP-LEVEL"];if(v&&v<=o)return h}return f}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(r){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,r)}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"mainForwardBufferInfo",get:function(){return this.streamController.getMainFwdBufferInfo()}},{key:"audioTracks",get:function(){var r=this.audioTrackController;return r?r.audioTracks:[]}},{key:"audioTrack",get:function(){var r=this.audioTrackController;return r?r.audioTrack:-1},set:function(r){var s=this.audioTrackController;s&&(s.audioTrack=r)}},{key:"subtitleTracks",get:function(){var r=this.subtitleTrackController;return r?r.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var r=this.subtitleTrackController;return r?r.subtitleTrack:-1},set:function(r){var s=this.subtitleTrackController;s&&(s.subtitleTrack=r)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var r=this.subtitleTrackController;return r?r.subtitleDisplay:!1},set:function(r){var s=this.subtitleTrackController;s&&(s.subtitleDisplay=r)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(r){this.config.lowLatencyMode=r}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.4.8"}},{key:"Events",get:function(){return L}},{key:"ErrorTypes",get:function(){return le}},{key:"ErrorDetails",get:function(){return z}},{key:"DefaultConfig",get:function(){return d.defaultConfig?d.defaultConfig:tE},set:function(r){d.defaultConfig=r}}]),d}();return ih.defaultConfig=void 0,ih})})(!1)})(Fu);var Tg=Fu.exports;const tl=kg(Tg),Eg=(t,e,i,n,a,l)=>{if(!e)return;const g=e.paused,p=e.playbackRate;i==null||i.detachMedia(),i==null||i.destroy();const _=(t||{}).contentType==="application/x-mpegURL",k=tl.isSupported(),T=e.canPlayType("application/vnd.apple.mpegurl");return _&&k&&!T?(i=new tl({enableWorker:!1,startPosition:l}),i.on(tl.Events.ERROR,n),i.loadSource(t.url),i.attachMedia(e)):(e.removeAttribute("src"),e.load()),g||a(),e.playbackRate=p,i},Ag=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Luister na hierdie artikel",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),xg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Tie asɛm yi",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),wg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ይህን ጽሑፍ ያዳምጡ",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Pg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"استمع إلى هذا المقال",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Cg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"এই লেখাটো শুনক",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Lg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Bu məqaləyə qulaq asın",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Ig=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Слухайце гэты артыкул",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Rg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Чуйте тази статия",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Dg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Aw ye nin barokun lamɛn",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Og=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"এই নিবন্ধটি শুনুন",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Bg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Poslušajte ovaj članak",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Mg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Escolta aquest article",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Ng=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"گوێ لەم بابەتە بگرن",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Fg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Poslechněte si tento článek",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Ug=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Gwrandewch ar yr erthygl hon",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Vg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Lyt til denne artikel",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Wg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Hören Sie sich diesen Artikel an",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),jg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Se nyati sia ɖa",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Gg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Ακούστε αυτό το άρθρο",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),zg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Listen to this article",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Hg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Aŭskultu ĉi tiun artikolon",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Kg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Escucha este artículo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Yg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Kuulake seda artiklit",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),qg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Entzun artikulu hau",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Xg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"به این مقاله گوش دهید",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Zg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Kuuntele tämä artikkeli",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Jg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Makinig sa artikulong ito",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Qg=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Écoutez cet article",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),$g=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Éist leis an alt seo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),e0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Èist ris an artaigil seo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),t0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Escoita este artigo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),i0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"આ લેખ સાંભળો",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),r0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Saurari wannan labarin",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),n0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"E hoʻolohe i kēia ʻatikala",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),s0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"האזינו למאמר הזה",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),a0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"इस लेख को सुनें",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),o0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Poslušajte ovaj članak",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),l0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Hallgassa meg ezt a cikket",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),u0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Լսեք այս հոդվածը",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),c0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Dengarkan artikel ini",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),d0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Gee akụkọ a",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),f0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Hlustaðu á þessa grein",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),h0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Ascolta questo articolo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),g0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"האזינו למאמר הזה",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),v0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"この記事を聞く",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),m0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"მოუსმინეთ ამ სტატიას",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),p0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Бұл мақаланы тыңдаңыз",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),_0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"សូមស្តាប់អត្ថបទនេះ។",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),y0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ಈ ಲೇಖನವನ್ನು ಆಲಿಸಿ",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),b0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"이 기사를 들어라",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),S0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Бул макаланы уккула",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),k0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Lauschtert dësen Artikel",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),T0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Wuliriza ekitundu kino",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),E0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Yoká lisolo oyo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),A0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ຟັງບົດຄວາມນີ້",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),x0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Klausykite šio straipsnio",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),w0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Klausieties šo rakstu",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),P0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Henoy ity lahatsoratra ity",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),C0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Слушајте ја оваа статија",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),L0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ഈ ലേഖനം ശ്രദ്ധിക്കുക",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),I0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Энэ нийтлэлийг сонсоорой",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),R0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"हा लेख ऐका",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),D0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Dengar artikel ini",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),O0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Isma' dan l-artiklu",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),B0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ဒီဆောင်းပါးကို နားထောင်ပါ။",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),M0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Hør denne artikkelen",playAudio:"Spill av lyd",pauseAudio:"Sett lyden på pause",scrubProgressBar:"Scrub fremdriftslinje",visitAdvert:"Besøk annonsen",visitBeyondWords:"Besøk BeyondWords",closeWidget:"Lukk widget",seekBack:"Søk tilbake",seekAhead:"Søk fremover",previousSegment:"Forrige segment",nextSegment:"Neste segment",previousTrack:"Forrige spor",nextTrack:"Neste spor",togglePlaylist:"Bytt spilleliste",visitSourceArticle:"Besøk kildeartikkelen",maximizeVideo:"Maksimer videoen",changePlaybackSpeed:"Endre avspillingshastighet",downloadAudio:"Last ned lyd"}},Symbol.toStringTag,{value:"Module"})),N0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"यो लेख सुन्नुहोस्",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),F0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Luister naar dit artikel",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),U0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Hør denne artikkelen",playAudio:"Spill av lyd",pauseAudio:"Sett lyden på pause",scrubProgressBar:"Scrub fremdriftslinje",visitAdvert:"Besøk annonsen",visitBeyondWords:"Besøk BeyondWords",closeWidget:"Lukk widget",seekBack:"Søk tilbake",seekAhead:"Søk fremover",previousSegment:"Forrige segment",nextSegment:"Neste segment",previousTrack:"Forrige spor",nextTrack:"Neste spor",togglePlaylist:"Bytt spilleliste",visitSourceArticle:"Besøk kildeartikkelen",maximizeVideo:"Maksimer videoen",changePlaybackSpeed:"Endre avspillingshastighet",downloadAudio:"Last ned lyd"}},Symbol.toStringTag,{value:"Module"})),V0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Hør denne artikkelen",playAudio:"Spill av lyd",pauseAudio:"Sett lyden på pause",scrubProgressBar:"Scrub fremdriftslinje",visitAdvert:"Besøk annonsen",visitBeyondWords:"Besøk BeyondWords",closeWidget:"Lukk widget",seekBack:"Søk tilbake",seekAhead:"Søk fremover",previousSegment:"Forrige segment",nextSegment:"Neste segment",previousTrack:"Forrige spor",nextTrack:"Neste spor",togglePlaylist:"Bytt spilleliste",visitSourceArticle:"Besøk kildeartikkelen",maximizeVideo:"Maksimer videoen",changePlaybackSpeed:"Endre avspillingshastighet",downloadAudio:"Last ned lyd"}},Symbol.toStringTag,{value:"Module"})),W0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Barreeffama kana dhaggeeffadhaa",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),j0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ଏହି ଲେଖା ଶୁଣ |",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),G0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ਇਸ ਲੇਖ ਨੂੰ ਸੁਣੋ",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),z0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Posłuchaj tego artykułu",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),H0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"دا لیکنه واورئ",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),K0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Ouça este artigo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Y0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Kay qillqasqata uyariy",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),q0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Ascultă acest articol",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),X0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Прослушать эту статью",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Z0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Umva iyi ngingo",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),J0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"මෙම ලිපියට සවන් දෙන්න",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Q0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Vypočujte si tento článok",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),$0=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Poslušajte ta članek",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),ev=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Teerera kuchinyorwa ichi",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),tv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Dhageyso maqaalkan",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),iv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Dëgjoni këtë artikull",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),rv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Слушајте овај чланак",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),nv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Lyssna på den här artikeln",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),sv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Sikiliza makala hii",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),av=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"இந்தக் கட்டுரையைக் கேளுங்கள்",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),ov=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ఈ కథనాన్ని వినండి",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),lv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Ин мақоларо гӯш кунед",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),uv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ฟังบทความนี้",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),cv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"ነዚ ጽሑፍ ስምዑዎ።",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),dv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Bu makaleyi dinle",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),fv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Бу мәкаләне тыңлагыз",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),hv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"بۇ ماقالىنى ئاڭلاڭ",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),gv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Послухайте цю статтю",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),vv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"اس مضمون کو سنیں۔",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),mv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Ushbu maqolani tinglang",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),pv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Nghe bài viết này",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),_v=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"הערן צו דעם אַרטיקל",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),yv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Gbọ nkan yii",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),bv=Object.freeze(Object.defineProperty({__proto__:null,default:{listenToThisArticle:"聽這篇文章",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Sv=Object.freeze(Object.defineProperty({__proto__:null,default:{listenToThisArticle:"聽這篇文章",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),kv=Object.freeze(Object.defineProperty({__proto__:null,default:{listenToThisArticle:"聽這篇文章",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Tv=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"听这篇文章",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Ev=Object.freeze(Object.defineProperty({__proto__:null,default:{isDefaultForLanguage:!0,listenToThisArticle:"Lalela lesi sihloko",playAudio:"Play audio",pauseAudio:"Pause audio",scrubProgressBar:"Scrub progress bar",visitAdvert:"Visit advert",visitBeyondWords:"Visit BeyondWords",closeWidget:"Close widget",seekBack:"Seek back",seekAhead:"Seek ahead",previousSegment:"Previous segment",nextSegment:"Next segment",previousTrack:"Previous track",nextTrack:"Next track",togglePlaylist:"Toggle playlist",visitSourceArticle:"Visit source article",maximizeVideo:"Maximize video",changePlaybackSpeed:"Change playback speed",downloadAudio:"Download audio"}},Symbol.toStringTag,{value:"Module"})),Av=t=>t.split("/").pop().split(".")[0],xv=(t,e)=>{wv(t,e),Pv(t),Cv(t)},wv=(t,e)=>{for(const i of Object.keys(t)){const n=i.split("-")[0];e[n]||rr([`The language '${n}' has no default locale set. Should it be '${i}' ?`,`If so, please set 'isDefaultForLanguage: true' in src/translations/${i}.ts`])}},Pv=t=>{const e={};for(const[i,n]of Object.entries(t)){const a=i.split("-")[0];n.isDefaultForLanguage&&(e[a]||(e[a]=[]),e[a].push(i))}for(const[i,n]of Object.entries(e))n.length!==1&&rr([`The language '${i}' has more than one default locale: ${n.map(a=>`'${a}'`).join(", ")}`,"Please ensure 'isDefaultForLanguage: true' is set in exactly one file."])},Cv=t=>{const e=Object.values(t).map(Object.keys).flat(),i=new Set(e.filter(n=>n!=="isDefaultForLanguage"));for(const[n,a]of Object.entries(t))for(const l of i)a[l]||rr([`The locale '${n}' is missing the translation key '${l}'.`,`Please set '${l}: "something"' in src/translations/${n}.ts`])},Uu=Object.entries(Object.assign({"../translations/af.ts":Ag,"../translations/ak.ts":xg,"../translations/am.ts":wg,"../translations/ar.ts":Pg,"../translations/as.ts":Cg,"../translations/az.ts":Lg,"../translations/be.ts":Ig,"../translations/bg.ts":Rg,"../translations/bm.ts":Dg,"../translations/bn.ts":Og,"../translations/bs.ts":Bg,"../translations/ca.ts":Mg,"../translations/ckb.ts":Ng,"../translations/cs.ts":Fg,"../translations/cy.ts":Ug,"../translations/da.ts":Vg,"../translations/de.ts":Wg,"../translations/ee.ts":jg,"../translations/el.ts":Gg,"../translations/en.ts":zg,"../translations/eo.ts":Hg,"../translations/es.ts":Kg,"../translations/et.ts":Yg,"../translations/eu.ts":qg,"../translations/fa.ts":Xg,"../translations/fi.ts":Zg,"../translations/fil.ts":Jg,"../translations/fr.ts":Qg,"../translations/ga.ts":$g,"../translations/gd.ts":e0,"../translations/gl.ts":t0,"../translations/gu.ts":i0,"../translations/ha.ts":r0,"../translations/haw.ts":n0,"../translations/he.ts":s0,"../translations/hi.ts":a0,"../translations/hr.ts":o0,"../translations/hu.ts":l0,"../translations/hy.ts":u0,"../translations/id.ts":c0,"../translations/ig.ts":d0,"../translations/is.ts":f0,"../translations/it.ts":h0,"../translations/iw.ts":g0,"../translations/ja.ts":v0,"../translations/ka.ts":m0,"../translations/kk.ts":p0,"../translations/km.ts":_0,"../translations/kn.ts":y0,"../translations/ko.ts":b0,"../translations/ky.ts":S0,"../translations/lb.ts":k0,"../translations/lg.ts":T0,"../translations/ln.ts":E0,"../translations/lo.ts":A0,"../translations/lt.ts":x0,"../translations/lv.ts":w0,"../translations/mg.ts":P0,"../translations/mk.ts":C0,"../translations/ml.ts":L0,"../translations/mn.ts":I0,"../translations/mr.ts":R0,"../translations/ms.ts":D0,"../translations/mt.ts":O0,"../translations/my.ts":B0,"../translations/nb.ts":M0,"../translations/ne.ts":N0,"../translations/nl.ts":F0,"../translations/nn.ts":U0,"../translations/no.ts":V0,"../translations/om.ts":W0,"../translations/or.ts":j0,"../translations/pa.ts":G0,"../translations/pl.ts":z0,"../translations/ps.ts":H0,"../translations/pt.ts":K0,"../translations/qu.ts":Y0,"../translations/ro.ts":q0,"../translations/ru.ts":X0,"../translations/rw.ts":Z0,"../translations/si.ts":J0,"../translations/sk.ts":Q0,"../translations/sl.ts":$0,"../translations/sn.ts":ev,"../translations/so.ts":tv,"../translations/sq.ts":iv,"../translations/sr.ts":rv,"../translations/sv.ts":nv,"../translations/sw.ts":sv,"../translations/ta.ts":av,"../translations/te.ts":ov,"../translations/tg.ts":lv,"../translations/th.ts":uv,"../translations/ti.ts":cv,"../translations/tr.ts":dv,"../translations/tt.ts":fv,"../translations/ug.ts":hv,"../translations/uk.ts":gv,"../translations/ur.ts":vv,"../translations/uz.ts":mv,"../translations/vi.ts":pv,"../translations/yi.ts":_v,"../translations/yo.ts":yv,"../translations/zh-HK.ts":bv,"../translations/zh-MO.ts":Sv,"../translations/zh-TW.ts":kv,"../translations/zh.ts":Tv,"../translations/zu.ts":Ev})).map(([t,e])=>[Av(t),e.default]),il=Object.fromEntries(Uu.filter(([t,e])=>t.includes("-"))),rl=Object.fromEntries(Uu.filter(([t,e])=>e.isDefaultForLanguage).map(([t,e])=>[t.split("-")[0],e]));xv(il,rl);const bi=(t,{locale:e}={})=>{const i=Lv(e);return i[t]||rr([`No translations found for the '${t}' translation key.`,`Please ensure '${t}: "something"' is set in src/translations/`]),i[t]},Lv=(t=null)=>{const e=[t,...navigator.languages,"en"].filter(i=>i);for(const i of e){const n=i.split("-")[0];if(il[i])return il[i];if(rl[n])return rl[n]}},Zi=t=>t.currentTarget.blur(),nl=(t,e)=>{const i=t.findIndex(g=>g.startTime>e),n=i===-1,a=i-1;return a===-1?0:n?t.length-1:a},Iv=(t,e)=>t.find(i=>{var l,g;const n=i.url&&i.url===(e==null?void 0:e.currentSrc),a=((l=i.url)==null?void 0:l.endsWith(".m3u8"))&&((g=e==null?void 0:e.currentSrc)==null?void 0:g.startsWith("blob:"));return n||a}),b6="",xi=(t,e,i)=>rt(t,e,e==="style"?Dv(i):i),Rv=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Dv=t=>t.split(Rv).map(e=>e+" !important").join(";");function Vu(t,e,i){const n=t.slice();return n[57]=e[i].url,n[58]=e[i].contentType,n[60]=i,n}function Wu(t){let e,i,n,a,l;return{c(){e=F("source"),Rr(e.src,i=`${t[57]}${t[17]}`)||xi(e,"src",i),xi(e,"type",n=t[58])},m(g,p){se(g,e,p),a||(l=ge(e,"error",t[25](t[60])),a=!0)},p(g,p){t=g,p[0]&132096&&!Rr(e.src,i=`${t[57]}${t[17]}`)&&xi(e,"src",i),p[0]&1024&&n!==(n=t[58])&&xi(e,"type",n)},d(g){g&&te(e),a=!1,l()}}}function ju(t){let e,i,n,a,l;function g(T){t[46](T)}function p(T){t[47](T)}function _(T){t[48](T)}let k={onEvent:t[8],vastUrl:t[11],advertConsent:t[5],video:t[2]};return t[0]!==void 0&&(k.playbackState=t[0]),t[3]!==void 0&&(k.duration=t[3]),t[1]!==void 0&&(k.currentTime=t[1]),e=new bg({props:k}),Ne.push(()=>Ze(e,"playbackState",g)),Ne.push(()=>Ze(e,"duration",p)),Ne.push(()=>Ze(e,"currentTime",_)),{c(){He(e.$$.fragment)},m(T,C){Ge(e,T,C),l=!0},p(T,C){const U={};C[0]&256&&(U.onEvent=T[8]),C[0]&2048&&(U.vastUrl=T[11]),C[0]&32&&(U.advertConsent=T[5]),C[0]&4&&(U.video=T[2]),!i&&C[0]&1&&(i=!0,U.playbackState=T[0],Xe(()=>i=!1)),!n&&C[0]&8&&(n=!0,U.duration=T[3],Xe(()=>n=!1)),!a&&C[0]&2&&(a=!0,U.currentTime=T[1],Xe(()=>a=!1)),e.$set(U)},i(T){l||(J(e.$$.fragment,T),l=!0)},o(T){ae(e.$$.fragment,T),l=!1},d(T){ze(e,T)}}}function Gu(t){let e,i,n,a;return{c(){e=F("a"),i=Le(" "),xi(e,"class","custom-advert-link svelte-fdymel"),xi(e,"href",t[16]),xi(e,"target","_blank"),xi(e,"aria-label",bi("visitAdvert"))},m(l,g){se(l,e,g),I(e,i),n||(a=ge(e,"mouseup",Zi),n=!0)},p(l,g){g[0]&65536&&xi(e,"href",l[16])},d(l){l&&te(e),n=!1,a()}}}function Ov(t){let e,i,n,a,l=!1,g,p,_,k,T,C,U,V=t[10],N=[];for(let ie=0;ie<V.length;ie+=1)N[ie]=Wu(Vu(t,V,ie));function Q(){cancelAnimationFrame(g),n.paused||(g=Aa(Q),l=!0),t[44].call(n)}let W=t[11]&&ju(t),ue=t[16]&&Gu(t);return{c(){e=F("div"),i=F("div"),n=F("video");for(let ie=0;ie<N.length;ie+=1)N[ie].c();p=Ce(),W&&W.c(),_=Ce(),ue&&ue.c(),xi(n,"poster",a=t[12]||""),xi(n,"preload","metadata"),n.playsInline=!0,xi(n,"disablepictureinpicture",""),xi(n,"class","svelte-fdymel"),t[3]===void 0&&Wt(()=>t[43].call(n)),xi(i,"class","inner svelte-fdymel"),xi(e,"class",k="media-element "+t[15]+" svelte-fdymel"),xi(e,"style",t[14]),je(e,"animating",t[13]),je(e,"behind-static",t[7]),je(e,"behind-widget",t[6])},m(ie,be){se(ie,e,be),I(e,i),I(i,n);for(let Se=0;Se<N.length;Se+=1)N[Se]&&N[Se].m(n,null);t[42](n),isNaN(t[4])||(n.playbackRate=t[4]),I(i,p),W&&W.m(i,null),I(i,_),ue&&ue.m(i,null),T=!0,C||(U=[ge(n,"durationchange",t[43]),ge(n,"timeupdate",Q),ge(n,"ratechange",t[45]),ge(n,"play",t[18]),ge(n,"pause",t[19]),ge(n,"ended",t[20]),ge(n,"durationchange",t[21]),ge(n,"loadeddata",t[22]),ge(n,"timeupdate",t[23]),ge(n,"ratechange",t[24])],C=!0)},p(ie,be){if(be[0]&33686528){V=ie[10];let Se;for(Se=0;Se<V.length;Se+=1){const fe=Vu(ie,V,Se);N[Se]?N[Se].p(fe,be):(N[Se]=Wu(fe),N[Se].c(),N[Se].m(n,null))}for(;Se<N.length;Se+=1)N[Se].d(1);N.length=V.length}(!T||be[0]&4096&&a!==(a=ie[12]||""))&&xi(n,"poster",a),!l&&be[0]&512&&!isNaN(ie[9])&&(n.currentTime=ie[9]),l=!1,be[0]&16&&!isNaN(ie[4])&&(n.playbackRate=ie[4]),ie[11]?W?(W.p(ie,be),be[0]&2048&&J(W,1)):(W=ju(ie),W.c(),J(W,1),W.m(i,_)):W&&(Lt(),ae(W,1,1,()=>{W=null}),It()),ie[16]?ue?ue.p(ie,be):(ue=Gu(ie),ue.c(),ue.m(i,null)):ue&&(ue.d(1),ue=null),(!T||be[0]&32768&&k!==(k="media-element "+ie[15]+" svelte-fdymel"))&&xi(e,"class",k),(!T||be[0]&16384)&&xi(e,"style",ie[14]),(!T||be[0]&40960)&&je(e,"animating",ie[13]),(!T||be[0]&32896)&&je(e,"behind-static",ie[7]),(!T||be[0]&32832)&&je(e,"behind-widget",ie[6])},i(ie){T||(J(W),T=!0)},o(ie){ae(W),T=!1},d(ie){ie&&te(e),Ln(N,ie),t[42](null),W&&W.d(),ue&&ue.d(),C=!1,Mt(U)}}}function Bv(t,e,i){let n,a,l,g,p,_,k,T,C,U,V,N,Q,{content:W}=e,{contentIndex:ue}=e,{introOrOutro:ie}=e,{activeAdvert:be}=e,{advertConsent:Se}=e,{playbackState:fe}=e,{duration:pe}=e,{currentTime:Z}=e,{playbackRate:L}=e,{prevPercentage:le}=e,{videoBehindWidget:z}=e,{videoBehindStatic:Ke}=e,{widgetPosition:Ie}=e,{widgetWidth:Ee}=e,{onEvent:ke=()=>{}}=e,{video:G}=e,X=null,B,Ue,De=0,q=0,ve=Z;const at=Ae=>i(9,De=Ae),Qe=()=>{var Ae;return(Ae=G==null?void 0:G.play())==null?void 0:Ae.catch(yt)},Et=()=>{Ue&&clearTimeout(Ue),i(13,Ue=setTimeout(()=>i(13,Ue=null),500))},Oe=()=>{ke(qe({type:"PlaybackPlaying",description:"The media began playing from its current playback time.",initiatedBy:"media"}))},Te=()=>{ke(qe({type:"PlaybackPaused",description:"The media became paused at its current playback time.",initiatedBy:"media"}))},it=()=>{ke(qe({type:"PlaybackEnded",description:"The media finished playing because it reached the end.",initiatedBy:"media"}))},xt=()=>{ke(qe({type:"DurationUpdated",description:"The media's duration was updated.",initiatedBy:"media"}))},wt=()=>{const Ae=Iv(_,G);ke(qe({type:"MediaLoaded",description:"The media finished loading its first frame of data.",initiatedBy:"media",loadedMedia:Ae}))},Xt=()=>{k||ke(qe({type:"CurrentTimeUpdated",description:"The media's current time was updated.",initiatedBy:"media"}))},Pt=()=>{ke(qe({type:"CurrentSegmentUpdated",description:"The media's current segment was updated.",initiatedBy:"media",segment:a[Q],contentIndex:ue,segmentIndex:Q}))},Ht=()=>{ke(qe({type:"PlaybackRateUpdated",description:"The media's playback rate was updated.",initiatedBy:"media"}))},yt=Ae=>{if((Ae==null?void 0:Ae.name)!=="NotAllowedError")throw Ae;ke(qe({type:"PlaybackNotAllowed",description:"The media cannot play because there was no user event.",initiatedBy:"media"}))},ft=Ae=>()=>{Ae===_.length-1&&ke(qe({type:"PlaybackErrored",description:"The media failed to play.",initiatedBy:"media",mediaType:"native",mediaUrl:_[0].url,errorMessage:"The video tag contains sources but none are playable."}))},Nt=(Ae,Dt)=>{Dt.fatal&&(X==null||X.destroy(),i(33,X=null),ke(qe({type:"PlaybackErrored",description:"The media failed to play.",initiatedBy:"media",mediaType:"HLS",mediaUrl:_[0].url,errorMessage:`${Dt.type} ${Dt.details}`})))},mt=()=>{ke(qe({type:"FullScreenModeUpdated",description:"The browser entered or exited full screen mode.",initiatedBy:"browser"}))};Ko(()=>{const Ae=addEventListener("fullscreenchange",mt),Dt=addEventListener("webkitfullscreenchange",mt);return()=>{removeEventListener("fullscreenchange",Ae),removeEventListener("fullscreenchange",Dt)}});function bt(Ae){Ne[Ae?"unshift":"push"](()=>{G=Ae,i(2,G)})}function Zt(){pe=this.duration,i(3,pe)}function Rt(){De=this.currentTime,i(9,De)}function Jt(){L=this.playbackRate,i(4,L)}function nt(Ae){fe=Ae,i(0,fe)}function ot(Ae){pe=Ae,i(3,pe)}function li(Ae){Z=Ae,i(1,Z),i(9,De)}return t.$$set=Ae=>{"content"in Ae&&i(27,W=Ae.content),"contentIndex"in Ae&&i(28,ue=Ae.contentIndex),"introOrOutro"in Ae&&i(29,ie=Ae.introOrOutro),"activeAdvert"in Ae&&i(30,be=Ae.activeAdvert),"advertConsent"in Ae&&i(5,Se=Ae.advertConsent),"playbackState"in Ae&&i(0,fe=Ae.playbackState),"duration"in Ae&&i(3,pe=Ae.duration),"currentTime"in Ae&&i(1,Z=Ae.currentTime),"playbackRate"in Ae&&i(4,L=Ae.playbackRate),"prevPercentage"in Ae&&i(26,le=Ae.prevPercentage),"videoBehindWidget"in Ae&&i(6,z=Ae.videoBehindWidget),"videoBehindStatic"in Ae&&i(7,Ke=Ae.videoBehindStatic),"widgetPosition"in Ae&&i(31,Ie=Ae.widgetPosition),"widgetWidth"in Ae&&i(32,Ee=Ae.widgetWidth),"onEvent"in Ae&&i(8,ke=Ae.onEvent),"video"in Ae&&i(2,G=Ae.video)},t.$$.update=()=>{t.$$.dirty[0]&512&&i(1,Z=De),t.$$.dirty[0]&1073741826&&!be&&at(Z),t.$$.dirty[0]&402653184&&i(39,n=W[ue]),t.$$.dirty[1]&256&&i(36,a=(n==null?void 0:n.segments)||[]),t.$$.dirty[0]&1879048192|t.$$.dirty[1]&8&&i(34,q+=1),t.$$.dirty[1]&8&&i(40,l=q===1),t.$$.dirty[1]&512&&i(17,g=l?`#t=${ve}`:""),t.$$.dirty[0]&536870912&&i(41,p=ie),t.$$.dirty[0]&1610612736&&!ie&&i(41,p=be),t.$$.dirty[0]&1610612736|t.$$.dirty[1]&256&&!ie&&!be&&i(41,p=n),t.$$.dirty[0]&4|t.$$.dirty[1]&1024&&i(10,_=Sg(p,G)),t.$$.dirty[0]&1028|t.$$.dirty[1]&516&&i(33,X=Eg(_[0],G,X,Nt,Qe,l&&ve)),t.$$.dirty[0]&1073741824&&i(11,k=be==null?void 0:be.vastUrl),t.$$.dirty[0]&1073741824&&i(16,T=be==null?void 0:be.clickThroughUrl),t.$$.dirty[0]&3077&&!k&&(fe==="playing"?Qe():G==null||G.pause()),t.$$.dirty[0]&1024&&i(26,le=0),t.$$.dirty[0]&64|t.$$.dirty[1]&1&&i(15,C=z&&Ie!=="auto"?`fixed-${Ie}`:""),t.$$.dirty[0]&64|t.$$.dirty[1]&2&&i(14,U=z?`width: ${Ee}`:""),t.$$.dirty[0]&1073741825|t.$$.dirty[1]&256&&i(38,V=fe!=="stopped"&&((be==null?void 0:be.imageUrl)||(n==null?void 0:n.imageUrl))),t.$$.dirty[1]&128&&Ru().then(()=>i(12,B=V)),t.$$.dirty[0]&3&&i(37,N=fe==="stopped"&&Z===0),t.$$.dirty[0]&1610612738|t.$$.dirty[1]&96&&i(35,Q=ie||be||N?-1:nl(a,Z)),t.$$.dirty[1]&16&&Pt(),t.$$.dirty[0]&64&&z&&Et()},[fe,Z,G,pe,L,Se,z,Ke,ke,De,_,k,B,Ue,U,C,T,g,Oe,Te,it,xt,wt,Xt,Ht,ft,le,W,ue,ie,be,Ie,Ee,X,q,Q,a,N,V,n,l,p,bt,Zt,Rt,Jt,nt,ot,li]}class Mv extends tt{constructor(e){super(),et(this,e,Bv,Ov,Ye,{content:27,contentIndex:28,introOrOutro:29,activeAdvert:30,advertConsent:5,playbackState:0,duration:3,currentTime:1,playbackRate:4,prevPercentage:26,videoBehindWidget:6,videoBehindStatic:7,widgetPosition:31,widgetWidth:32,onEvent:8,video:2},null,[-1,-1])}get content(){return this.$$.ctx[27]}set content(e){this.$$set({content:e}),w()}get contentIndex(){return this.$$.ctx[28]}set contentIndex(e){this.$$set({contentIndex:e}),w()}get introOrOutro(){return this.$$.ctx[29]}set introOrOutro(e){this.$$set({introOrOutro:e}),w()}get activeAdvert(){return this.$$.ctx[30]}set activeAdvert(e){this.$$set({activeAdvert:e}),w()}get advertConsent(){return this.$$.ctx[5]}set advertConsent(e){this.$$set({advertConsent:e}),w()}get playbackState(){return this.$$.ctx[0]}set playbackState(e){this.$$set({playbackState:e}),w()}get duration(){return this.$$.ctx[3]}set duration(e){this.$$set({duration:e}),w()}get currentTime(){return this.$$.ctx[1]}set currentTime(e){this.$$set({currentTime:e}),w()}get playbackRate(){return this.$$.ctx[4]}set playbackRate(e){this.$$set({playbackRate:e}),w()}get prevPercentage(){return this.$$.ctx[26]}set prevPercentage(e){this.$$set({prevPercentage:e}),w()}get videoBehindWidget(){return this.$$.ctx[6]}set videoBehindWidget(e){this.$$set({videoBehindWidget:e}),w()}get videoBehindStatic(){return this.$$.ctx[7]}set videoBehindStatic(e){this.$$set({videoBehindStatic:e}),w()}get widgetPosition(){return this.$$.ctx[31]}set widgetPosition(e){this.$$set({widgetPosition:e}),w()}get widgetWidth(){return this.$$.ctx[32]}set widgetWidth(e){this.$$set({widgetWidth:e}),w()}get onEvent(){return this.$$.ctx[8]}set onEvent(e){this.$$set({onEvent:e}),w()}get video(){return this.$$.ctx[2]}set video(e){this.$$set({video:e}),w()}}const S6="";function Nv(t){const e=t-1;return e*e*e+1}function Fv(t,{delay:e=0,duration:i=400,easing:n=Nv,x:a=0,y:l=0,opacity:g=0}={}){const p=getComputedStyle(t),_=+p.opacity,k=p.transform==="none"?"":p.transform,T=_*(1-g),[C,U]=Eu(a),[V,N]=Eu(l);return{delay:e,duration:i,easing:n,css:(Q,W)=>`
|
|
27
27
|
transform: ${k} translate(${(1-Q)*C}${U}, ${(1-Q)*V}${N});
|
|
28
|
-
opacity: ${_-T*W}`}}const Gr=(t,e,i)=>rt(t,e,e==="style"?Vv(i):i),Uv=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Vv=t=>t.split(Uv).map(e=>e+" !important").join(";");function Wv(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),Gr(i,"fill",t[1]),Gr(i,"d","M14 0.666748C6.63996 0.666748 0.666626 6.64008 0.666626 14.0001C0.666626 21.3601 6.63996 27.3334 14 27.3334C21.36 27.3334 27.3333 21.3601 27.3333 14.0001C27.3333 6.64008 21.36 0.666748 14 0.666748ZM11.3333 18.6667V9.33341C11.3333 8.78675 11.96 8.46675 12.4 8.80008L18.6266 13.4667C18.9866 13.7334 18.9866 14.2667 18.6266 14.5334L12.4 19.2001C11.96 19.5334 11.3333 19.2134 11.3333 18.6667Z"),Gr(e,"width",n=40*t[0]),Gr(e,"height",a=40*t[0]),Gr(e,"viewBox","0.6667 0.6667 26.6667 26.6667"),Gr(e,"fill","none"),Gr(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,[g]){g&2&&Gr(i,"fill",l[1]),g&1&&n!==(n=40*l[0])&&Gr(e,"width",n),g&1&&a!==(a=40*l[0])&&Gr(e,"height",a)},i:oe,o:oe,d(l){l&&te(e)}}}function jv(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class Gv extends tt{constructor(e){super(),et(this,e,jv,Wv,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const zr=(t,e,i)=>rt(t,e,e==="style"?Hv(i):i),zv=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Hv=t=>t.split(zv).map(e=>e+" !important").join(";");function Kv(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),zr(i,"fill",t[1]),zr(i,"d","M14 0.666748C6.63996 0.666748 0.666626 6.64008 0.666626 14.0001C0.666626 21.3601 6.63996 27.3334 14 27.3334C21.36 27.3334 27.3333 21.3601 27.3333 14.0001C27.3333 6.64008 21.36 0.666748 14 0.666748ZM11.3333 19.3334C10.6 19.3334 9.99996 18.7334 9.99996 18.0001V10.0001C9.99996 9.26675 10.6 8.66675 11.3333 8.66675C12.0666 8.66675 12.6666 9.26675 12.6666 10.0001V18.0001C12.6666 18.7334 12.0666 19.3334 11.3333 19.3334ZM16.6666 19.3334C15.9333 19.3334 15.3333 18.7334 15.3333 18.0001V10.0001C15.3333 9.26675 15.9333 8.66675 16.6666 8.66675C17.4 8.66675 18 9.26675 18 10.0001V18.0001C18 18.7334 17.4 19.3334 16.6666 19.3334Z"),zr(e,"width",n=40*t[0]),zr(e,"height",a=40*t[0]),zr(e,"viewBox","0.6667 0.6667 26.6667 26.6667"),zr(e,"fill","none"),zr(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,[g]){g&2&&zr(i,"fill",l[1]),g&1&&n!==(n=40*l[0])&&zr(e,"width",n),g&1&&a!==(a=40*l[0])&&zr(e,"height",a)},i:oe,o:oe,d(l){l&&te(e)}}}function Yv(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class qv extends tt{constructor(e){super(),et(this,e,Yv,Kv,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const k6="",zu=(t,e,i)=>Mi(t,e,i,1),ks=(t,e,i)=>rt(t,e,e==="style"?Zv(i):i),Xv=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Zv=t=>t.split(Xv).map(e=>e+" !important").join(";");function Jv(t){let e,i;return e=new Gv({props:{scale:t[2],color:t[3]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&4&&(l.scale=n[2]),a&8&&(l.color=n[3]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function Qv(t){let e,i;return e=new qv({props:{scale:t[2],color:t[3]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&4&&(l.scale=n[2]),a&8&&(l.color=n[3]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function $v(t){let e,i,n,a,l,g;const p=[Qv,Jv],_=[];function k(T,C){return T[0]?0:1}return i=k(t),n=_[i]=p[i](t),{c(){e=F("button"),n.c(),ks(e,"type","button"),ks(e,"class","play-pause-button svelte-1dxzkq6"),ks(e,"tabindex",t[1]),zu(e,"outline-offset",3.2*t[2]+"px"),ks(e,"aria-label",t[4])},m(T,C){se(T,e,C),_[i].m(e,null),a=!0,l||(g=[ge(e,"click",t[5]),ge(e,"mouseup",Zi)],l=!0)},p(T,[C]){let U=i;i=k(T),i===U?_[i].p(T,C):(Lt(),ae(_[U],1,1,()=>{_[U]=null}),It(),n=_[i],n?n.p(T,C):(n=_[i]=p[i](T),n.c()),J(n,1),n.m(e,null)),(!a||C&2)&&ks(e,"tabindex",T[1]),(!a||C&4)&&zu(e,"outline-offset",3.2*T[2]+"px"),(!a||C&16)&&ks(e,"aria-label",T[4])},i(T){a||(J(n),a=!0)},o(T){ae(n),a=!1},d(T){T&&te(e),_[i].d(),l=!1,Mt(g)}}}function em(t,e,i){let n,{isPlaying:a=!1}=e,{tabindex:l=0}=e,{scale:g=1}=e,{color:p="#323232"}=e,{onEvent:_=()=>{}}=e;const k=T=>{T.preventDefault();const C=a?"Pause":"Play";_(qe({type:`Pressed${C}`,description:`The ${C.toLowerCase()} button was pressed.`,initiatedBy:"user"}))};return t.$$set=T=>{"isPlaying"in T&&i(0,a=T.isPlaying),"tabindex"in T&&i(1,l=T.tabindex),"scale"in T&&i(2,g=T.scale),"color"in T&&i(3,p=T.color),"onEvent"in T&&i(6,_=T.onEvent)},t.$$.update=()=>{t.$$.dirty&1&&i(4,n=bi(a?"pauseAudio":"playAudio"))},[a,l,g,p,n,k,_]}class tm extends tt{constructor(e){super(),et(this,e,em,$v,Ye,{isPlaying:0,tabindex:1,scale:2,color:3,onEvent:6})}get isPlaying(){return this.$$.ctx[0]}set isPlaying(e){this.$$set({isPlaying:e}),w()}get tabindex(){return this.$$.ctx[1]}set tabindex(e){this.$$set({tabindex:e}),w()}get scale(){return this.$$.ctx[2]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[3]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[6]}set onEvent(e){this.$$set({onEvent:e}),w()}}const T6="",In=(t,e,i)=>Mi(t,e,i,1),Ra=(t,e,i)=>rt(t,e,e==="style"?rm(i):i),im=/;(?!([^()]*\([^()]*\))*[^()]*\))/,rm=t=>t.split(im).map(e=>e+" !important").join(";");function nm(t){let e,i,n,a,l,g;return{c(){e=F("button"),i=F("span"),n=Le(t[0]),a=Le("x"),In(i,"font-size",t[2]),In(i,"color",t[1]),Ra(i,"class","svelte-8srhgk"),Ra(e,"type","button"),Ra(e,"class","speed-button svelte-8srhgk"),In(e,"width",t[3]),In(e,"height",t[3]),Ra(e,"aria-label",bi("changePlaybackSpeed"))},m(p,_){se(p,e,_),I(e,i),I(i,n),I(i,a),l||(g=[ge(e,"click",t[4]),ge(e,"mouseup",Zi),ge(e,"keydown",t[5])],l=!0)},p(p,[_]){_&1&&gr(n,p[0]),_&4&&In(i,"font-size",p[2]),_&2&&In(i,"color",p[1]),_&8&&In(e,"width",p[3]),_&8&&In(e,"height",p[3])},i:oe,o:oe,d(p){p&&te(e),l=!1,Mt(g)}}}function sm(t,e,i){let n,a,{speed:l=1}=e,{scale:g=1}=e,{color:p="#323232"}=e,{onEvent:_=()=>{}}=e;const k=()=>{_(qe({type:"PressedChangeSpeed",description:"The change speed button was pressed.",initiatedBy:"user"}))},T=C=>{let U;C.key==="ArrowLeft"&&(U="Left"),C.key==="ArrowRight"&&(U="Right"),C.key==="ArrowDown"&&(U="Down"),C.key==="ArrowUp"&&(U="Up"),C.key===" "&&(U="Space"),C.key==="Enter"&&(U="Enter"),U&&(C.preventDefault(),_(qe({type:`Pressed${U}OnChangeSpeed`,description:`The ${U.toLowerCase()} key was pressed while change speed was focussed.`,initiatedBy:"user"})))};return t.$$set=C=>{"speed"in C&&i(0,l=C.speed),"scale"in C&&i(6,g=C.scale),"color"in C&&i(1,p=C.color),"onEvent"in C&&i(7,_=C.onEvent)},t.$$.update=()=>{t.$$.dirty&64&&i(3,n=`${40*g}px`),t.$$.dirty&64&&i(2,a=`${12*g}px`)},[l,p,a,n,k,T,g,_]}class am extends tt{constructor(e){super(),et(this,e,sm,nm,Ye,{speed:0,scale:6,color:1,onEvent:7})}get speed(){return this.$$.ctx[0]}set speed(e){this.$$set({speed:e}),w()}get scale(){return this.$$.ctx[6]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[7]}set onEvent(e){this.$$set({onEvent:e}),w()}}const E6="",Fi=(t,e,i)=>rt(t,e,e==="style"?lm(i):i),om=/;(?!([^()]*\([^()]*\))*[^()]*\))/,lm=t=>t.split(om).map(e=>e+" !important").join(";");function um(t){let e,i,n,a,l,g;return{c(){e=$e("svg"),i=$e("path"),n=$e("text"),a=Le(t[2]),Fi(i,"fill",t[1]),Fi(i,"d","M12.3035 28.3333C9.12574 28.3333 6.39796 27.2778 4.12019 25.1667C1.84241 23.0556 0.581297 20.4444 0.336852 17.3333C0.31463 17.0667 0.397963 16.8333 0.586852 16.6333C0.775741 16.4333 1.01463 16.3333 1.30352 16.3333C1.57019 16.3333 1.79796 16.4278 1.98685 16.6167C2.17574 16.8056 2.29241 17.0444 2.33685 17.3333C2.5813 19.8889 3.64796 22.0278 5.53685 23.75C7.42574 25.4722 9.6813 26.3333 12.3035 26.3333C15.0813 26.3333 17.4424 25.3611 19.3869 23.4167C21.3313 21.4722 22.3035 19.1111 22.3035 16.3333C22.3035 13.5556 21.3591 11.1944 19.4702 9.25C17.5813 7.30555 15.248 6.33333 12.4702 6.33333H11.7369L13.4702 8.06666C13.6702 8.26666 13.7702 8.5 13.7702 8.76666C13.7702 9.03333 13.6702 9.26666 13.4702 9.46666C13.2702 9.66666 13.0369 9.76666 12.7702 9.76666C12.5035 9.76666 12.2702 9.66666 12.0702 9.46666L8.57019 5.96666C8.45907 5.85555 8.3813 5.74444 8.33685 5.63333C8.29241 5.52222 8.27019 5.4 8.27019 5.26666C8.27019 5.13333 8.29241 5.01111 8.33685 4.9C8.3813 4.78889 8.45907 4.67777 8.57019 4.56666L12.1035 1.03333C12.2813 0.855551 12.5035 0.766663 12.7702 0.766663C13.0369 0.766663 13.2702 0.855551 13.4702 1.03333C13.648 1.23333 13.7369 1.46666 13.7369 1.73333C13.7369 2 13.648 2.22222 13.4702 2.4L11.5369 4.33333H12.3035C13.9702 4.33333 15.5313 4.64444 16.9869 5.26666C18.4424 5.88889 19.7146 6.74444 20.8035 7.83333C21.8924 8.92222 22.748 10.1944 23.3702 11.65C23.9924 13.1056 24.3035 14.6667 24.3035 16.3333C24.3035 18 23.9924 19.5611 23.3702 21.0167C22.748 22.4722 21.8924 23.7444 20.8035 24.8333C19.7146 25.9222 18.4424 26.7778 16.9869 27.4C15.5313 28.0222 13.9702 28.3333 12.3035 28.3333Z"),Fi(n,"fill",t[1]),Fi(n,"x","36%"),Fi(n,"y","46%"),Fi(n,"dominant-baseline","middle"),Fi(n,"text-anchor","middle"),Fi(n,"class","svelte-1xysf6z"),Fi(e,"width",l=40*t[0]),Fi(e,"height",g=40*t[0]),Fi(e,"viewBox","-5 -5 35 39"),Fi(e,"fill","none"),Fi(e,"xmlns","http://www.w3.org/2000/svg")},m(p,_){se(p,e,_),I(e,i),I(e,n),I(n,a)},p(p,[_]){_&2&&Fi(i,"fill",p[1]),_&4&&gr(a,p[2]),_&2&&Fi(n,"fill",p[1]),_&1&&l!==(l=40*p[0])&&Fi(e,"width",l),_&1&&g!==(g=40*p[0])&&Fi(e,"height",g)},i:oe,o:oe,d(p){p&&te(e)}}}function cm(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e,{seconds:l=10}=e;return t.$$set=g=>{"scale"in g&&i(0,n=g.scale),"color"in g&&i(1,a=g.color),"seconds"in g&&i(2,l=g.seconds)},[n,a,l]}class dm extends tt{constructor(e){super(),et(this,e,cm,um,Ye,{scale:0,color:1,seconds:2})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get seconds(){return this.$$.ctx[2]}set seconds(e){this.$$set({seconds:e}),w()}}const Hr=(t,e,i)=>rt(t,e,e==="style"?hm(i):i),fm=/;(?!([^()]*\([^()]*\))*[^()]*\))/,hm=t=>t.split(fm).map(e=>e+" !important").join(";");function gm(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),Hr(i,"fill",t[1]),Hr(i,"d","M1.25 7.29901C0.249999 6.72166 0.250001 5.27828 1.25 4.70093L8.75 0.370802C9.75 -0.206548 11 0.51514 11 1.66984V10.3301C11 11.4848 9.75 12.2065 8.75 11.6291L1.25 7.29901Z"),Hr(e,"width",n=40*t[0]),Hr(e,"height",a=40*t[0]),Hr(e,"viewBox","-12 -12 35 36"),Hr(e,"fill","none"),Hr(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,[g]){g&2&&Hr(i,"fill",l[1]),g&1&&n!==(n=40*l[0])&&Hr(e,"width",n),g&1&&a!==(a=40*l[0])&&Hr(e,"height",a)},i:oe,o:oe,d(l){l&&te(e)}}}function vm(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class mm extends tt{constructor(e){super(),et(this,e,vm,gm,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const vr=(t,e,i)=>rt(t,e,e==="style"?_m(i):i),pm=/;(?!([^()]*\([^()]*\))*[^()]*\))/,_m=t=>t.split(pm).map(e=>e+" !important").join(";");function ym(t){let e,i,n,a,l;return{c(){e=$e("svg"),i=$e("path"),n=$e("path"),vr(i,"fill",t[1]),vr(i,"d","M0 1C0 0.447716 0.447715 0 1 0C1.55228 0 2 0.447715 2 1V13C2 13.5523 1.55228 14 1 14C0.447715 14 0 13.5523 0 13V1Z"),vr(n,"fill",t[1]),vr(n,"d","M7.25 8.29904C6.25 7.72169 6.25 6.27831 7.25 5.70096L14.75 1.37083C15.75 0.793484 17 1.51517 17 2.66987V11.3301C17 12.4848 15.75 13.2065 14.75 12.6292L7.25 8.29904Z"),vr(e,"width",a=40*t[0]),vr(e,"height",l=40*t[0]),vr(e,"viewBox","-10 -10 37 34"),vr(e,"fill","none"),vr(e,"xmlns","http://www.w3.org/2000/svg")},m(g,p){se(g,e,p),I(e,i),I(e,n)},p(g,[p]){p&2&&vr(i,"fill",g[1]),p&2&&vr(n,"fill",g[1]),p&1&&a!==(a=40*g[0])&&vr(e,"width",a),p&1&&l!==(l=40*g[0])&&vr(e,"height",l)},i:oe,o:oe,d(g){g&&te(e)}}}function bm(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class Sm extends tt{constructor(e){super(),et(this,e,bm,ym,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const A6="",Da=(t,e,i)=>rt(t,e,e==="style"?Tm(i):i),km=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Tm=t=>t.split(km).map(e=>e+" !important").join(";");function Em(t){let e,i;return e=new Sm({props:{scale:t[0],color:t[1]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&1&&(l.scale=n[0]),a&2&&(l.color=n[1]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function Am(t){let e,i;return e=new mm({props:{scale:t[0],color:t[1]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&1&&(l.scale=n[0]),a&2&&(l.color=n[1]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function xm(t){let e,i;return e=new dm({props:{seconds:t[3],scale:t[0],color:t[1]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&8&&(l.seconds=n[3]),a&1&&(l.scale=n[0]),a&2&&(l.color=n[1]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function wm(t){let e,i,n,a,l,g;const p=[xm,Am,Em],_=[];function k(T,C){return T[4]?0:T[5]?1:T[2]?2:-1}return~(i=k(t))&&(n=_[i]=p[i](t)),{c(){e=F("button"),n&&n.c(),Da(e,"type","button"),Da(e,"class","prev-button svelte-tawm7k"),Da(e,"aria-label",t[6])},m(T,C){se(T,e,C),~i&&_[i].m(e,null),a=!0,l||(g=[ge(e,"click",t[7]),ge(e,"mouseup",Zi)],l=!0)},p(T,[C]){let U=i;i=k(T),i===U?~i&&_[i].p(T,C):(n&&(Lt(),ae(_[U],1,1,()=>{_[U]=null}),It()),~i?(n=_[i],n?n.p(T,C):(n=_[i]=p[i](T),n.c()),J(n,1),n.m(e,null)):n=null),(!a||C&64)&&Da(e,"aria-label",T[6])},i(T){a||(J(n),a=!0)},o(T){ae(n),a=!1},d(T){T&&te(e),~i&&_[i].d(),l=!1,Mt(g)}}}function Pm(t,e,i){let n,a,l,g,{style:p="segments"}=e,{scale:_=1}=e,{color:k="#323232"}=e,{onEvent:T=()=>{}}=e,C;const U=()=>{let V,N,Q;a?(V="PressedPrevSegment",N="The previous segment button was pressed."):l?(V="PressedSeekBack",N="The seek backward button was pressed.",Q={seconds:n}):g&&(V="PressedPrevTrack",N="The previous track button was pressed."),T(qe(de({type:V,description:N,initiatedBy:"user"},Q)))};return t.$$set=V=>{"style"in V&&i(8,p=V.style),"scale"in V&&i(0,_=V.scale),"color"in V&&i(1,k=V.color),"onEvent"in V&&i(9,T=V.onEvent)},t.$$.update=()=>{t.$$.dirty&256&&i(3,n=p.split("-")[1]||10),t.$$.dirty&264&&p.split("-")[2],t.$$.dirty&256&&i(5,a=p==="segments"),t.$$.dirty&256&&i(4,l=p.startsWith("seconds")),t.$$.dirty&256&&i(2,g=p==="tracks"),t.$$.dirty&52&&(l?i(6,C=bi("seekBack")):a?i(6,C=bi("previousSegment")):g&&i(6,C=bi("previousTrack")))},[_,k,g,n,l,a,C,U,p,T]}class Cm extends tt{constructor(e){super(),et(this,e,Pm,wm,Ye,{style:8,scale:0,color:1,onEvent:9})}get style(){return this.$$.ctx[8]}set style(e){this.$$set({style:e}),w()}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[9]}set onEvent(e){this.$$set({onEvent:e}),w()}}const x6="",Ui=(t,e,i)=>rt(t,e,e==="style"?Im(i):i),Lm=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Im=t=>t.split(Lm).map(e=>e+" !important").join(";");function Rm(t){let e,i,n,a,l,g;return{c(){e=$e("svg"),i=$e("path"),n=$e("text"),a=Le(t[2]),Ui(i,"fill",t[1]),Ui(i,"d","M12.5 28.3333C10.8333 28.3333 9.27222 28.0167 7.81667 27.3833C6.36111 26.75 5.09444 25.8944 4.01667 24.8167C2.93889 23.7389 2.08333 22.4722 1.45 21.0167C0.816667 19.5611 0.5 18 0.5 16.3333C0.5 14.6667 0.816667 13.1056 1.45 11.65C2.08333 10.1944 2.93889 8.92777 4.01667 7.85C5.09444 6.77222 6.36111 5.91666 7.81667 5.28333C9.27222 4.65 10.8333 4.33333 12.5 4.33333H13.2667L11.3333 2.4C11.1556 2.22222 11.0722 1.99444 11.0833 1.71666C11.0944 1.43888 11.1889 1.21111 11.3667 1.03333C11.5444 0.855551 11.7722 0.766663 12.05 0.766663C12.3278 0.766663 12.5556 0.855551 12.7333 1.03333L16.2333 4.56666C16.4333 4.76666 16.5333 5 16.5333 5.26666C16.5333 5.53333 16.4333 5.76666 16.2333 5.96666L12.7333 9.46666C12.5333 9.66666 12.2944 9.76666 12.0167 9.76666C11.7389 9.76666 11.5111 9.66666 11.3333 9.46666C11.1333 9.26666 11.0389 9.03333 11.05 8.76666C11.0611 8.5 11.1667 8.26666 11.3667 8.06666L13.1 6.33333H12.3333C9.57778 6.33333 7.25 7.30555 5.35 9.25C3.45 11.1944 2.5 13.5556 2.5 16.3333C2.5 19.1111 3.47222 21.4722 5.41667 23.4167C7.36111 25.3611 9.72222 26.3333 12.5 26.3333C15.0778 26.3333 17.3222 25.4722 19.2333 23.75C21.1444 22.0278 22.2222 19.8889 22.4667 17.3333C22.5111 17.0444 22.6278 16.8056 22.8167 16.6167C23.0056 16.4278 23.2333 16.3333 23.5 16.3333C23.7889 16.3333 24.0278 16.4333 24.2167 16.6333C24.4056 16.8333 24.4889 17.0667 24.4667 17.3333C24.2222 20.4667 22.95 23.0833 20.65 25.1833C18.35 27.2833 15.6333 28.3333 12.5 28.3333Z"),Ui(n,"fill",t[1]),Ui(n,"x","36%"),Ui(n,"y","46%"),Ui(n,"dominant-baseline","middle"),Ui(n,"text-anchor","middle"),Ui(n,"class","svelte-1xysf6z"),Ui(e,"width",l=40*t[0]),Ui(e,"height",g=40*t[0]),Ui(e,"viewBox","-5 -5 35 39"),Ui(e,"fill","none"),Ui(e,"xmlns","http://www.w3.org/2000/svg")},m(p,_){se(p,e,_),I(e,i),I(e,n),I(n,a)},p(p,[_]){_&2&&Ui(i,"fill",p[1]),_&4&&gr(a,p[2]),_&2&&Ui(n,"fill",p[1]),_&1&&l!==(l=40*p[0])&&Ui(e,"width",l),_&1&&g!==(g=40*p[0])&&Ui(e,"height",g)},i:oe,o:oe,d(p){p&&te(e)}}}function Dm(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e,{seconds:l=10}=e;return t.$$set=g=>{"scale"in g&&i(0,n=g.scale),"color"in g&&i(1,a=g.color),"seconds"in g&&i(2,l=g.seconds)},[n,a,l]}class Om extends tt{constructor(e){super(),et(this,e,Dm,Rm,Ye,{scale:0,color:1,seconds:2})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get seconds(){return this.$$.ctx[2]}set seconds(e){this.$$set({seconds:e}),w()}}const Kr=(t,e,i)=>rt(t,e,e==="style"?Mm(i):i),Bm=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Mm=t=>t.split(Bm).map(e=>e+" !important").join(";");function Nm(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),Kr(i,"fill",t[1]),Kr(i,"d","M9.75 4.70093C10.75 5.27828 10.75 6.72166 9.75 7.29901L2.25 11.6291C1.25 12.2065 0 11.4848 0 10.3301V1.66984C0 0.515139 1.25 -0.206548 2.25 0.370802L9.75 4.70093Z"),Kr(e,"width",n=40*t[0]),Kr(e,"height",a=40*t[0]),Kr(e,"viewBox","-12 -12 35 36"),Kr(e,"fill","none"),Kr(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,[g]){g&2&&Kr(i,"fill",l[1]),g&1&&n!==(n=40*l[0])&&Kr(e,"width",n),g&1&&a!==(a=40*l[0])&&Kr(e,"height",a)},i:oe,o:oe,d(l){l&&te(e)}}}function Fm(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class Um extends tt{constructor(e){super(),et(this,e,Fm,Nm,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const mr=(t,e,i)=>rt(t,e,e==="style"?Wm(i):i),Vm=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Wm=t=>t.split(Vm).map(e=>e+" !important").join(";");function jm(t){let e,i,n,a,l;return{c(){e=$e("svg"),i=$e("path"),n=$e("path"),mr(i,"fill",t[1]),mr(i,"d","M17 13C17 13.5523 16.5523 14 16 14C15.4477 14 15 13.5523 15 13V1C15 0.447716 15.4477 0 16 0C16.5523 0 17 0.447715 17 1V13Z"),mr(n,"fill",t[1]),mr(n,"d","M9.75 5.70096C10.75 6.27831 10.75 7.72169 9.75 8.29904L2.25 12.6292C1.25 13.2065 0 12.4848 0 11.3301V2.66987C0 1.51517 1.25 0.793485 2.25 1.37083L9.75 5.70096Z"),mr(e,"width",a=40*t[0]),mr(e,"height",l=40*t[0]),mr(e,"viewBox","-10 -10 37 34"),mr(e,"fill","none"),mr(e,"xmlns","http://www.w3.org/2000/svg")},m(g,p){se(g,e,p),I(e,i),I(e,n)},p(g,[p]){p&2&&mr(i,"fill",g[1]),p&2&&mr(n,"fill",g[1]),p&1&&a!==(a=40*g[0])&&mr(e,"width",a),p&1&&l!==(l=40*g[0])&&mr(e,"height",l)},i:oe,o:oe,d(g){g&&te(e)}}}function Gm(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class zm extends tt{constructor(e){super(),et(this,e,Gm,jm,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const w6="",Oa=(t,e,i)=>rt(t,e,e==="style"?Km(i):i),Hm=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Km=t=>t.split(Hm).map(e=>e+" !important").join(";");function Ym(t){let e,i;return e=new zm({props:{scale:t[0],color:t[1]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&1&&(l.scale=n[0]),a&2&&(l.color=n[1]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function qm(t){let e,i;return e=new Um({props:{scale:t[0],color:t[1]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&1&&(l.scale=n[0]),a&2&&(l.color=n[1]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function Xm(t){let e,i;return e=new Om({props:{seconds:t[6],scale:t[0],color:t[1]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&64&&(l.seconds=n[6]),a&1&&(l.scale=n[0]),a&2&&(l.color=n[1]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function Zm(t){let e,i,n,a,l,g;const p=[Xm,qm,Ym],_=[];function k(T,C){return T[3]?0:T[4]?1:T[2]?2:-1}return~(i=k(t))&&(n=_[i]=p[i](t)),{c(){e=F("button"),n&&n.c(),Oa(e,"type","button"),Oa(e,"class","next-button svelte-1ukrri8"),Oa(e,"aria-label",t[5])},m(T,C){se(T,e,C),~i&&_[i].m(e,null),a=!0,l||(g=[ge(e,"click",t[7]),ge(e,"mouseup",Zi)],l=!0)},p(T,[C]){let U=i;i=k(T),i===U?~i&&_[i].p(T,C):(n&&(Lt(),ae(_[U],1,1,()=>{_[U]=null}),It()),~i?(n=_[i],n?n.p(T,C):(n=_[i]=p[i](T),n.c()),J(n,1),n.m(e,null)):n=null),(!a||C&32)&&Oa(e,"aria-label",T[5])},i(T){a||(J(n),a=!0)},o(T){ae(n),a=!1},d(T){T&&te(e),~i&&_[i].d(),l=!1,Mt(g)}}}function Jm(t,e,i){let n,a,l,g,p,{style:_="segments"}=e,{scale:k=1}=e,{color:T="#323232"}=e,{onEvent:C=()=>{}}=e,U;const V=()=>{let N,Q,W;l?(N="PressedNextSegment",Q="The next segment button was pressed."):g?(N="PressedSeekAhead",Q="The seek ahead button was pressed.",W={seconds:a}):p&&(N="PressedNextTrack",Q="The next track button was pressed."),C(qe(de({type:N,description:Q,initiatedBy:"user"},W)))};return t.$$set=N=>{"style"in N&&i(8,_=N.style),"scale"in N&&i(0,k=N.scale),"color"in N&&i(1,T=N.color),"onEvent"in N&&i(9,C=N.onEvent)},t.$$.update=()=>{t.$$.dirty&256&&i(10,n=parseFloat(_.split("-")[1]||10)),t.$$.dirty&1280&&i(6,a=parseFloat(_.split("-")[2]||n)),t.$$.dirty&256&&i(4,l=_==="segments"),t.$$.dirty&256&&i(3,g=_.startsWith("seconds")),t.$$.dirty&256&&i(2,p=_==="tracks"),t.$$.dirty&28&&(g?i(5,U=bi("seekAhead")):l?i(5,U=bi("nextSegment")):p&&i(5,U=bi("nextTrack")))},[k,T,p,g,l,U,a,V,_,C,n]}class Qm extends tt{constructor(e){super(),et(this,e,Jm,Zm,Ye,{style:8,scale:0,color:1,onEvent:9})}get style(){return this.$$.ctx[8]}set style(e){this.$$set({style:e}),w()}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[9]}set onEvent(e){this.$$set({onEvent:e}),w()}}const ar=(t,e,i)=>rt(t,e,e==="style"?ep(i):i),$m=/;(?!([^()]*\([^()]*\))*[^()]*\))/,ep=t=>t.split($m).map(e=>e+" !important").join(";");function tp(t){let e,i,n,a,l,g;return{c(){e=$e("svg"),i=$e("path"),n=$e("g"),a=$e("path"),ar(i,"fill",t[1]),ar(i,"d","M1.33332 1.33333C1.14443 1.33333 0.986101 1.26944 0.858323 1.14167C0.730545 1.01389 0.666656 0.855556 0.666656 0.666667C0.666656 0.477778 0.730545 0.319444 0.858323 0.191667C0.986101 0.0638889 1.14443 0 1.33332 0H7.99999C8.18888 0 8.34721 0.0638889 8.47499 0.191667C8.60277 0.319444 8.66666 0.477778 8.66666 0.666667C8.66666 0.855556 8.60277 1.01389 8.47499 1.14167C8.34721 1.26944 8.18888 1.33333 7.99999 1.33333H1.33332ZM1.33332 4C1.14443 4 0.986101 3.93611 0.858323 3.80833C0.730545 3.68056 0.666656 3.52222 0.666656 3.33333C0.666656 3.14444 0.730545 2.98611 0.858323 2.85833C0.986101 2.73056 1.14443 2.66667 1.33332 2.66667H7.99999C8.18888 2.66667 8.34721 2.73056 8.47499 2.85833C8.60277 2.98611 8.66666 3.14444 8.66666 3.33333C8.66666 3.52222 8.60277 3.68056 8.47499 3.80833C8.34721 3.93611 8.18888 4 7.99999 4H1.33332ZM1.33332 6.66667C1.14443 6.66667 0.986101 6.60278 0.858323 6.475C0.730545 6.34722 0.666656 6.18889 0.666656 6C0.666656 5.81111 0.730545 5.65278 0.858323 5.525C0.986101 5.39722 1.14443 5.33333 1.33332 5.33333H5.33332C5.52221 5.33333 5.68055 5.39722 5.80832 5.525C5.9361 5.65278 5.99999 5.81111 5.99999 6C5.99999 6.18889 5.9361 6.34722 5.80832 6.475C5.68055 6.60278 5.52221 6.66667 5.33332 6.66667H1.33332Z"),ar(a,"fill",t[1]),ar(a,"d","M10.3667 9.31667C10.1444 9.47222 9.91666 9.48333 9.68332 9.35C9.44999 9.21667 9.33332 9.01667 9.33332 8.75V5.91667C9.33332 5.65 9.44999 5.45 9.68332 5.31667C9.91666 5.18333 10.1444 5.19444 10.3667 5.35L12.5 6.78333C12.7 6.91667 12.8 7.1 12.8 7.33333C12.8 7.56667 12.7 7.75 12.5 7.88333L10.3667 9.31667Z"),ar(n,"transform","scale(1.05) translate(-1.7 0)"),ar(e,"width",l=20*t[0]),ar(e,"height",g=20*t[0]),ar(e,"viewBox","-0.6 -0.3 12 8"),ar(e,"fill","none"),ar(e,"xmlns","http://www.w3.org/2000/svg")},m(p,_){se(p,e,_),I(e,i),I(e,n),I(n,a)},p(p,[_]){_&2&&ar(i,"fill",p[1]),_&2&&ar(a,"fill",p[1]),_&1&&l!==(l=20*p[0])&&ar(e,"width",l),_&1&&g!==(g=20*p[0])&&ar(e,"height",g)},i:oe,o:oe,d(p){p&&te(e)}}}function ip(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class rp extends tt{constructor(e){super(),et(this,e,ip,tp,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const or=(t,e,i)=>rt(t,e,e==="style"?sp(i):i),np=/;(?!([^()]*\([^()]*\))*[^()]*\))/,sp=t=>t.split(np).map(e=>e+" !important").join(";");function ap(t){let e,i,n,a,l,g;return{c(){e=$e("svg"),i=$e("path"),n=$e("g"),a=$e("path"),or(i,"fill",t[1]),or(i,"d","M1.33332 1.33333C1.14443 1.33333 0.986101 1.26944 0.858323 1.14167C0.730545 1.01389 0.666656 0.855556 0.666656 0.666667C0.666656 0.477778 0.730545 0.319444 0.858323 0.191667C0.986101 0.0638889 1.14443 0 1.33332 0H7.99999C8.18888 0 8.34721 0.0638889 8.47499 0.191667C8.60277 0.319444 8.66666 0.477778 8.66666 0.666667C8.66666 0.855556 8.60277 1.01389 8.47499 1.14167C8.34721 1.26944 8.18888 1.33333 7.99999 1.33333H1.33332ZM1.33332 4C1.14443 4 0.986101 3.93611 0.858323 3.80833C0.730545 3.68056 0.666656 3.52222 0.666656 3.33333C0.666656 3.14444 0.730545 2.98611 0.858323 2.85833C0.986101 2.73056 1.14443 2.66667 1.33332 2.66667H7.99999C8.18888 2.66667 8.34721 2.73056 8.47499 2.85833C8.60277 2.98611 8.66666 3.14444 8.66666 3.33333C8.66666 3.52222 8.60277 3.68056 8.47499 3.80833C8.34721 3.93611 8.18888 4 7.99999 4H1.33332ZM1.33332 6.66667C1.14443 6.66667 0.986101 6.60278 0.858323 6.475C0.730545 6.34722 0.666656 6.18889 0.666656 6C0.666656 5.81111 0.730545 5.65278 0.858323 5.525C0.986101 5.39722 1.14443 5.33333 1.33332 5.33333H5.33332C5.52221 5.33333 5.68055 5.39722 5.80832 5.525C5.9361 5.65278 5.99999 5.81111 5.99999 6C5.99999 6.18889 5.9361 6.34722 5.80832 6.475C5.68055 6.60278 5.52221 6.66667 5.33332 6.66667H1.33332Z"),or(a,"fill",t[1]),or(a,"d","M7.13333 10.2C7.01111 10.0778 6.95 9.92222 6.95 9.73333C6.95 9.54444 7.01111 9.38889 7.13333 9.26667L8.4 8L7.13333 6.73333C7.01111 6.61111 6.95 6.45555 6.95 6.26667C6.95 6.07778 7.01111 5.92222 7.13333 5.8C7.25556 5.67778 7.41111 5.61667 7.6 5.61667C7.78889 5.61667 7.94444 5.67778 8.06667 5.8L9.33333 7.06667L10.6 5.8C10.7222 5.67778 10.8778 5.61667 11.0667 5.61667C11.2556 5.61667 11.4111 5.67778 11.5333 5.8C11.6556 5.92222 11.7167 6.07778 11.7167 6.26667C11.7167 6.45555 11.6556 6.61111 11.5333 6.73333L10.2667 8L11.5333 9.26667C11.6556 9.38889 11.7167 9.54444 11.7167 9.73333C11.7167 9.92222 11.6556 10.0778 11.5333 10.2C11.4111 10.3222 11.2556 10.3833 11.0667 10.3833C10.8778 10.3833 10.7222 10.3222 10.6 10.2L9.33333 8.93333L8.06667 10.2C7.94444 10.3222 7.78889 10.3833 7.6 10.3833C7.41111 10.3833 7.25556 10.3222 7.13333 10.2Z"),or(n,"transform","translate(0.3 0)"),or(e,"width",l=20*t[0]),or(e,"height",g=20*t[0]),or(e,"viewBox","-0.6 -0.3 12 8"),or(e,"fill","none"),or(e,"xmlns","http://www.w3.org/2000/svg")},m(p,_){se(p,e,_),I(e,i),I(e,n),I(n,a)},p(p,[_]){_&2&&or(i,"fill",p[1]),_&2&&or(a,"fill",p[1]),_&1&&l!==(l=20*p[0])&&or(e,"width",l),_&1&&g!==(g=20*p[0])&&or(e,"height",g)},i:oe,o:oe,d(p){p&&te(e)}}}function op(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class lp extends tt{constructor(e){super(),et(this,e,op,ap,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const P6="",Hu=(t,e,i)=>Mi(t,e,i,1),Ba=(t,e,i)=>rt(t,e,e==="style"?cp(i):i),up=/;(?!([^()]*\([^()]*\))*[^()]*\))/,cp=t=>t.split(up).map(e=>e+" !important").join(";");function dp(t){let e,i;return e=new rp({props:{scale:t[2],color:t[3]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&4&&(l.scale=n[2]),a&8&&(l.color=n[3]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function fp(t){let e,i;return e=new lp({props:{scale:t[2],color:t[3]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&4&&(l.scale=n[2]),a&8&&(l.color=n[3]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function hp(t){let e,i,n,a,l,g,p;const _=[fp,dp],k=[];function T(C,U){return C[0]?0:1}return i=T(t),n=k[i]=_[i](t),{c(){e=F("button"),n.c(),Ba(e,"type","button"),Ba(e,"class",a="playlist-button "+t[1]+" svelte-xhif6r"),Hu(e,"outline-offset",5*t[2]+"px"),Ba(e,"aria-label",bi("togglePlaylist"))},m(C,U){se(C,e,U),k[i].m(e,null),l=!0,g||(p=[ge(e,"click",t[4]),ge(e,"mouseup",Zi)],g=!0)},p(C,[U]){let V=i;i=T(C),i===V?k[i].p(C,U):(Lt(),ae(k[V],1,1,()=>{k[V]=null}),It(),n=k[i],n?n.p(C,U):(n=k[i]=_[i](C),n.c()),J(n,1),n.m(e,null)),(!l||U&2&&a!==(a="playlist-button "+C[1]+" svelte-xhif6r"))&&Ba(e,"class",a),(!l||U&4)&&Hu(e,"outline-offset",5*C[2]+"px")},i(C){l||(J(n),l=!0)},o(C){ae(n),l=!1},d(C){C&&te(e),k[i].d(),g=!1,Mt(p)}}}function gp(t,e,i){let{playlistShowing:n}=e,{playerStyle:a}=e,{scale:l=1}=e,{color:g="#323232"}=e,{onEvent:p=()=>{}}=e;const _=()=>{p(qe({type:"PressedTogglePlaylist",description:"The toggle playlist button was pressed.",initiatedBy:"user"}))};return t.$$set=k=>{"playlistShowing"in k&&i(0,n=k.playlistShowing),"playerStyle"in k&&i(1,a=k.playerStyle),"scale"in k&&i(2,l=k.scale),"color"in k&&i(3,g=k.color),"onEvent"in k&&i(5,p=k.onEvent)},[n,a,l,g,_,p]}class vp extends tt{constructor(e){super(),et(this,e,gp,hp,Ye,{playlistShowing:0,playerStyle:1,scale:2,color:3,onEvent:5})}get playlistShowing(){return this.$$.ctx[0]}set playlistShowing(e){this.$$set({playlistShowing:e}),w()}get playerStyle(){return this.$$.ctx[1]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get scale(){return this.$$.ctx[2]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[3]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[5]}set onEvent(e){this.$$set({onEvent:e}),w()}}const C6="",Ku=(t,e,i)=>Mi(t,e,i,1),Yu=(t,e,i)=>rt(t,e,e==="style"?pp(i):i),mp=/;(?!([^()]*\([^()]*\))*[^()]*\))/,pp=t=>t.split(mp).map(e=>e+" !important").join(";");function _p(t){let e,i,n;const a=t[5].default,l=gs(a,t,t[4],null);return{c(){e=F("div"),l&&l.c(),Yu(e,"class",i="secondary-button "+t[0]+" svelte-ll9nv2"),Ku(e,"--scale",t[3]),je(e,"mobile",t[1]),je(e,"advert_",t[2])},m(g,p){se(g,e,p),l&&l.m(e,null),n=!0},p(g,[p]){l&&l.p&&(!n||p&16)&&ms(l,a,g,g[4],n?vs(a,g[4],p,null):ps(g[4]),null),(!n||p&1&&i!==(i="secondary-button "+g[0]+" svelte-ll9nv2"))&&Yu(e,"class",i),(!n||p&8)&&Ku(e,"--scale",g[3]),(!n||p&3)&&je(e,"mobile",g[1]),(!n||p&5)&&je(e,"advert_",g[2])},i(g){n||(J(l,g),n=!0)},o(g){ae(l,g),n=!1},d(g){g&&te(e),l&&l.d(g)}}}function yp(t,e,i){let{$$slots:n={},$$scope:a}=e,{playerStyle:l}=e,{isMobile:g}=e,{isAdvert:p}=e,{scale:_}=e;return t.$$set=k=>{"playerStyle"in k&&i(0,l=k.playerStyle),"isMobile"in k&&i(1,g=k.isMobile),"isAdvert"in k&&i(2,p=k.isAdvert),"scale"in k&&i(3,_=k.scale),"$$scope"in k&&i(4,a=k.$$scope)},[l,g,p,_,a,n]}class bp extends tt{constructor(e){super(),et(this,e,yp,_p,Ye,{playerStyle:0,isMobile:1,isAdvert:2,scale:3})}get playerStyle(){return this.$$.ctx[0]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get isMobile(){return this.$$.ctx[1]}set isMobile(e){this.$$set({isMobile:e}),w()}get isAdvert(){return this.$$.ctx[2]}set isAdvert(e){this.$$set({isAdvert:e}),w()}get scale(){return this.$$.ctx[3]}set scale(e){this.$$set({scale:e}),w()}}const Yr=(t,e,i)=>rt(t,e,e==="style"?kp(i):i),Sp=/;(?!([^()]*\([^()]*\))*[^()]*\))/,kp=t=>t.split(Sp).map(e=>e+" !important").join(";");function Tp(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),Yr(i,"fill",t[1]),Yr(i,"d","M1.28571 24C0.914286 24 0.607143 23.8786 0.364286 23.6357C0.121429 23.3929 0 23.0857 0 22.7143V17.0143C0 16.6429 0.121429 16.3357 0.364286 16.0929C0.607143 15.85 0.914286 15.7286 1.28571 15.7286C1.65714 15.7286 1.96429 15.85 2.20714 16.0929C2.45 16.3357 2.57143 16.6429 2.57143 17.0143V21.4286H6.98571C7.35714 21.4286 7.66429 21.55 7.90714 21.7929C8.15 22.0357 8.27143 22.3429 8.27143 22.7143C8.27143 23.0857 8.15 23.3929 7.90714 23.6357C7.66429 23.8786 7.35714 24 6.98571 24H1.28571ZM1.28571 8.27143C0.914286 8.27143 0.607143 8.15 0.364286 7.90714C0.121429 7.66429 0 7.35714 0 6.98571V1.28571C0 0.914286 0.121429 0.607143 0.364286 0.364286C0.607143 0.121429 0.914286 0 1.28571 0H6.98571C7.35714 0 7.66429 0.121429 7.90714 0.364286C8.15 0.607143 8.27143 0.914286 8.27143 1.28571C8.27143 1.65714 8.15 1.96429 7.90714 2.20714C7.66429 2.45 7.35714 2.57143 6.98571 2.57143H2.57143V6.98571C2.57143 7.35714 2.45 7.66429 2.20714 7.90714C1.96429 8.15 1.65714 8.27143 1.28571 8.27143ZM17.0143 24C16.6429 24 16.3357 23.8786 16.0929 23.6357C15.85 23.3929 15.7286 23.0857 15.7286 22.7143C15.7286 22.3429 15.85 22.0357 16.0929 21.7929C16.3357 21.55 16.6429 21.4286 17.0143 21.4286H21.4286V17.0143C21.4286 16.6429 21.55 16.3357 21.7929 16.0929C22.0357 15.85 22.3429 15.7286 22.7143 15.7286C23.0857 15.7286 23.3929 15.85 23.6357 16.0929C23.8786 16.3357 24 16.6429 24 17.0143V22.7143C24 23.0857 23.8786 23.3929 23.6357 23.6357C23.3929 23.8786 23.0857 24 22.7143 24H17.0143ZM22.7143 8.27143C22.3429 8.27143 22.0357 8.15 21.7929 7.90714C21.55 7.66429 21.4286 7.35714 21.4286 6.98571V2.57143H17.0143C16.6429 2.57143 16.3357 2.45 16.0929 2.20714C15.85 1.96429 15.7286 1.65714 15.7286 1.28571C15.7286 0.914286 15.85 0.607143 16.0929 0.364286C16.3357 0.121429 16.6429 0 17.0143 0H22.7143C23.0857 0 23.3929 0.121429 23.6357 0.364286C23.8786 0.607143 24 0.914286 24 1.28571V6.98571C24 7.35714 23.8786 7.66429 23.6357 7.90714C23.3929 8.15 23.0857 8.27143 22.7143 8.27143Z"),Yr(e,"width",n=24*t[0]),Yr(e,"height",a=24*t[0]),Yr(e,"viewBox","0 0 24 24"),Yr(e,"fill","none"),Yr(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,[g]){g&2&&Yr(i,"fill",l[1]),g&1&&n!==(n=24*l[0])&&Yr(e,"width",n),g&1&&a!==(a=24*l[0])&&Yr(e,"height",a)},i:oe,o:oe,d(l){l&&te(e)}}}function Ep(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class Ap extends tt{constructor(e){super(),et(this,e,Ep,Tp,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const L6="",qu=(t,e,i)=>Mi(t,e,i,1),sl=(t,e,i)=>rt(t,e,e==="style"?wp(i):i),xp=/;(?!([^()]*\([^()]*\))*[^()]*\))/,wp=t=>t.split(xp).map(e=>e+" !important").join(";");function Pp(t){let e,i,n,a,l;return i=new Ap({props:{scale:t[0],color:t[1]}}),{c(){e=F("button"),He(i.$$.fragment),sl(e,"type","button"),sl(e,"class","maximize-button svelte-fk321i"),qu(e,"outline-offset",6.4*t[0]+"px"),sl(e,"aria-label",bi("maximizeVideo"))},m(g,p){se(g,e,p),Ge(i,e,null),n=!0,a||(l=[ge(e,"click",t[2]),ge(e,"mouseup",Zi)],a=!0)},p(g,[p]){const _={};p&1&&(_.scale=g[0]),p&2&&(_.color=g[1]),i.$set(_),(!n||p&1)&&qu(e,"outline-offset",6.4*g[0]+"px")},i(g){n||(J(i.$$.fragment,g),n=!0)},o(g){ae(i.$$.fragment,g),n=!1},d(g){g&&te(e),ze(i),a=!1,Mt(l)}}}function Cp(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e,{onEvent:l=()=>{}}=e;const g=()=>{l(qe({type:"PressedMaximize",description:"The maximize button was pressed.",initiatedBy:"user"}))};return t.$$set=p=>{"scale"in p&&i(0,n=p.scale),"color"in p&&i(1,a=p.color),"onEvent"in p&&i(3,l=p.onEvent)},[n,a,g,l]}class Lp extends tt{constructor(e){super(),et(this,e,Cp,Pp,Ye,{scale:0,color:1,onEvent:3})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[3]}set onEvent(e){this.$$set({onEvent:e}),w()}}const qr=(t,e,i)=>rt(t,e,e==="style"?Rp(i):i),Ip=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Rp=t=>t.split(Ip).map(e=>e+" !important").join(";");function Dp(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),qr(i,"fill",t[1]),qr(i,"d","M1.66873 11.1188L0.881226 10.3313L5.21248 6.00001L0.881226 1.66876L1.66873 0.881256L5.99998 5.21251L10.3312 0.881256L11.1187 1.66876L6.78748 6.00001L11.1187 10.3313L10.3312 11.1188L5.99998 6.78751L1.66873 11.1188Z"),qr(e,"width",n=12*t[0]),qr(e,"height",a=12*t[0]),qr(e,"viewBox","0 0 12 12"),qr(e,"fill","none"),qr(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,[g]){g&2&&qr(i,"fill",l[1]),g&1&&n!==(n=12*l[0])&&qr(e,"width",n),g&1&&a!==(a=12*l[0])&&qr(e,"height",a)},i:oe,o:oe,d(l){l&&te(e)}}}function Op(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class Bp extends tt{constructor(e){super(),et(this,e,Op,Dp,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const I6="",Ma=(t,e,i)=>Mi(t,e,i,1),al=(t,e,i)=>rt(t,e,e==="style"?Np(i):i),Mp=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Np=t=>t.split(Mp).map(e=>e+" !important").join(";");function Fp(t){let e,i,n,a,l;return i=new Bp({props:{scale:t[0],color:t[1]}}),{c(){e=F("button"),He(i.$$.fragment),al(e,"type","button"),al(e,"class","close-widget-button svelte-1bnl89m"),Ma(e,"margin",t[2]),Ma(e,"outline-offset",4.8*t[0]+"px"),al(e,"aria-label",bi("closeWidget"))},m(g,p){se(g,e,p),Ge(i,e,null),n=!0,a||(l=[ge(e,"click",t[3]),ge(e,"mouseup",Zi)],a=!0)},p(g,[p]){const _={};p&1&&(_.scale=g[0]),p&2&&(_.color=g[1]),i.$set(_),(!n||p&4)&&Ma(e,"margin",g[2]),(!n||p&1)&&Ma(e,"outline-offset",4.8*g[0]+"px")},i(g){n||(J(i.$$.fragment,g),n=!0)},o(g){ae(i.$$.fragment,g),n=!1},d(g){g&&te(e),ze(i),a=!1,Mt(l)}}}function Up(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e,{margin:l="auto"}=e,{onEvent:g=()=>{}}=e;const p=()=>{g(qe({type:"PressedCloseWidget",description:"The close widget button was pressed.",initiatedBy:"user"}))};return t.$$set=_=>{"scale"in _&&i(0,n=_.scale),"color"in _&&i(1,a=_.color),"margin"in _&&i(2,l=_.margin),"onEvent"in _&&i(4,g=_.onEvent)},[n,a,l,p,g]}class Vp extends tt{constructor(e){super(),et(this,e,Up,Fp,Ye,{scale:0,color:1,margin:2,onEvent:4})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get margin(){return this.$$.ctx[2]}set margin(e){this.$$set({margin:e}),w()}get onEvent(){return this.$$.ctx[4]}set onEvent(e){this.$$set({onEvent:e}),w()}}const R6="",Jn=(t,e,i)=>rt(t,e,e==="style"?jp(i):i),Wp=/;(?!([^()]*\([^()]*\))*[^()]*\))/,jp=t=>t.split(Wp).map(e=>e+" !important").join(";");function Gp(t){let e,i=(t[6]||"")+"",n,a,l,g;return{c(){e=F("a"),n=Le(i),Jn(e,"class",a="advert-link "+t[1]+" "+t[2]+" svelte-1iiylz1"),Jn(e,"href",t[0]),Jn(e,"style",t[5]),Jn(e,"target","_blank"),je(e,"no-image",!t[3]),je(e,"mobile",t[4])},m(p,_){se(p,e,_),I(e,n),l||(g=[ge(e,"click",t[7]),ge(e,"mouseup",Zi)],l=!0)},p(p,[_]){_&64&&i!==(i=(p[6]||"")+"")&&gr(n,i),_&6&&a!==(a="advert-link "+p[1]+" "+p[2]+" svelte-1iiylz1")&&Jn(e,"class",a),_&1&&Jn(e,"href",p[0]),_&32&&Jn(e,"style",p[5]),_&14&&je(e,"no-image",!p[3]),_&22&&je(e,"mobile",p[4])},i:oe,o:oe,d(p){p&&te(e),l=!1,Mt(g)}}}function zp(t,e,i){let n,a,{href:l}=e,{scale:g=1}=e,{color:p="#323232"}=e,{playerStyle:_}=e,{controlsOrder:k}=e,{largeImage:T}=e,{isMobile:C}=e,{onEvent:U=()=>{}}=e;const V=()=>{U(qe({type:"PressedAdvertLink",description:"The advert link was pressed to open the click-through URL in a new tab.",initiatedBy:"user"}))};return t.$$set=N=>{"href"in N&&i(0,l=N.href),"scale"in N&&i(8,g=N.scale),"color"in N&&i(9,p=N.color),"playerStyle"in N&&i(1,_=N.playerStyle),"controlsOrder"in N&&i(2,k=N.controlsOrder),"largeImage"in N&&i(3,T=N.largeImage),"isMobile"in N&&i(4,C=N.isMobile),"onEvent"in N&&i(10,U=N.onEvent)},t.$$.update=()=>{t.$$.dirty&1&&i(6,n=l&&new URL(l).hostname),t.$$.dirty&768&&i(5,a=`font-size: ${12*g}px; color: ${p}; border-color: ${p}`)},[l,_,k,T,C,a,n,V,g,p,U]}class Hp extends tt{constructor(e){super(),et(this,e,zp,Gp,Ye,{href:0,scale:8,color:9,playerStyle:1,controlsOrder:2,largeImage:3,isMobile:4,onEvent:10})}get href(){return this.$$.ctx[0]}set href(e){this.$$set({href:e}),w()}get scale(){return this.$$.ctx[8]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[9]}set color(e){this.$$set({color:e}),w()}get playerStyle(){return this.$$.ctx[1]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get controlsOrder(){return this.$$.ctx[2]}set controlsOrder(e){this.$$set({controlsOrder:e}),w()}get largeImage(){return this.$$.ctx[3]}set largeImage(e){this.$$set({largeImage:e}),w()}get isMobile(){return this.$$.ctx[4]}set isMobile(e){this.$$set({isMobile:e}),w()}get onEvent(){return this.$$.ctx[10]}set onEvent(e){this.$$set({onEvent:e}),w()}}const ki=(t,e,i)=>rt(t,e,e==="style"?Yp(i):i),Kp=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Yp=t=>t.split(Kp).map(e=>e+" !important").join(";");function qp(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),ki(i,"fill",t[1]),ki(i,"d","M30 32H6C4.9 32 4 31.1 4 30V6C4 4.9 4.9 4 6 4H16C17.1 4 18 3.1 18 2C18 0.9 17.1 0 16 0H4C1.78 0 0 1.8 0 4V32C0 34.2 1.8 36 4 36H32C34.2 36 36 34.2 36 32V20C36 18.9 35.1 18 34 18C32.9 18 32 18.9 32 20V30C32 31.1 31.1 32 30 32ZM22 2C22 3.1 22.9 4 24 4H29.18L10.92 22.26C10.14 23.04 10.14 24.3 10.92 25.08C11.7 25.86 12.96 25.86 13.74 25.08L32 6.82V12C32 13.1 32.9 14 34 14C35.1 14 36 13.1 36 12V2C36 0.9 35.1 0 34 0H24C22.9 0 22 0.9 22 2Z"),ki(e,"width",n=14*t[0]),ki(e,"height",a=14*t[0]),ki(e,"viewBox","0 0 36 36"),ki(e,"fill","none"),ki(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,g){g&2&&ki(i,"fill",l[1]),g&1&&n!==(n=14*l[0])&&ki(e,"width",n),g&1&&a!==(a=14*l[0])&&ki(e,"height",a)},d(l){l&&te(e)}}}function Xp(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),ki(i,"fill",t[1]),ki(i,"d","M20 0C8.96 0 0 8.96 0 20C0 31.04 8.96 40 20 40C31.04 40 40 31.04 40 20C40 8.96 31.04 0 20 0ZM23.76 19.08L15.26 27.58C14.48 28.36 13.22 28.36 12.44 27.58C11.66 26.8 11.66 25.54 12.44 24.76L20.94 16.26L18.4 13.72C17.76 13.08 18.22 12 19.1 12H26.98C27.54 12 27.98 12.44 27.98 13V20.88C27.98 21.78 26.9 22.22 26.28 21.58L23.76 19.08Z"),ki(e,"width",n=40*t[0]),ki(e,"height",a=40*t[0]),ki(e,"viewBox","0 0 40 40"),ki(e,"fill","none"),ki(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,g){g&2&&ki(i,"fill",l[1]),g&1&&n!==(n=40*l[0])&&ki(e,"width",n),g&1&&a!==(a=40*l[0])&&ki(e,"height",a)},d(l){l&&te(e)}}}function Zp(t){let e;function i(l,g){return l[2]?Xp:qp}let n=i(t),a=n(t);return{c(){a.c(),e=Zn()},m(l,g){a.m(l,g),se(l,e,g)},p(l,[g]){n===(n=i(l))&&a?a.p(l,g):(a.d(1),a=n(l),a&&(a.c(),a.m(e.parentNode,e)))},i:oe,o:oe,d(l){a.d(l),l&&te(e)}}}function Jp(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e,{circular:l=!0}=e;return t.$$set=g=>{"scale"in g&&i(0,n=g.scale),"color"in g&&i(1,a=g.color),"circular"in g&&i(2,l=g.circular)},[n,a,l]}class Xu extends tt{constructor(e){super(),et(this,e,Jp,Zp,Ye,{scale:0,color:1,circular:2})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get circular(){return this.$$.ctx[2]}set circular(e){this.$$set({circular:e}),w()}}const D6="",Zu=(t,e,i)=>Mi(t,e,i,1),Ts=(t,e,i)=>rt(t,e,e==="style"?$p(i):i),Qp=/;(?!([^()]*\([^()]*\))*[^()]*\))/,$p=t=>t.split(Qp).map(e=>e+" !important").join(";");function e_(t){let e;return{c(){e=F("div")},m(i,n){se(i,e,n)},p:oe,i:oe,o:oe,d(i){i&&te(e)}}}function t_(t){let e,i,n,a,l,g;return i=new Xu({props:{color:t[2],scale:t[1]}}),{c(){e=F("a"),He(i.$$.fragment),Ts(e,"class",n="advert-button "+t[3]+" "+t[4]+" svelte-17nxso5"),Ts(e,"href",t[0]),Ts(e,"target","_blank"),Zu(e,"outline-offset",3.2*t[1]+"px"),Ts(e,"aria-label",bi("visitAdvert"))},m(p,_){se(p,e,_),Ge(i,e,null),a=!0,l||(g=[ge(e,"click",t[5]),ge(e,"mouseup",Zi)],l=!0)},p(p,_){const k={};_&4&&(k.color=p[2]),_&2&&(k.scale=p[1]),i.$set(k),(!a||_&24&&n!==(n="advert-button "+p[3]+" "+p[4]+" svelte-17nxso5"))&&Ts(e,"class",n),(!a||_&1)&&Ts(e,"href",p[0]),(!a||_&2)&&Zu(e,"outline-offset",3.2*p[1]+"px")},i(p){a||(J(i.$$.fragment,p),a=!0)},o(p){ae(i.$$.fragment,p),a=!1},d(p){p&&te(e),ze(i),l=!1,Mt(g)}}}function i_(t){let e,i,n,a;const l=[t_,e_],g=[];function p(_,k){return _[0]?0:1}return e=p(t),i=g[e]=l[e](t),{c(){i.c(),n=Zn()},m(_,k){g[e].m(_,k),se(_,n,k),a=!0},p(_,[k]){let T=e;e=p(_),e===T?g[e].p(_,k):(Lt(),ae(g[T],1,1,()=>{g[T]=null}),It(),i=g[e],i?i.p(_,k):(i=g[e]=l[e](_),i.c()),J(i,1),i.m(n.parentNode,n))},i(_){a||(J(i),a=!0)},o(_){ae(i),a=!1},d(_){g[e].d(_),_&&te(n)}}}function r_(t,e,i){let{href:n}=e,{scale:a=1}=e,{color:l="#323232"}=e,{playerStyle:g}=e,{controlsOrder:p}=e,{onEvent:_=()=>{}}=e;const k=()=>{n&&_(qe({type:"PressedAdvertButton",description:"The advert button was pressed to open the click-through URL in a new tab.",initiatedBy:"user"}))};return t.$$set=T=>{"href"in T&&i(0,n=T.href),"scale"in T&&i(1,a=T.scale),"color"in T&&i(2,l=T.color),"playerStyle"in T&&i(3,g=T.playerStyle),"controlsOrder"in T&&i(4,p=T.controlsOrder),"onEvent"in T&&i(6,_=T.onEvent)},[n,a,l,g,p,k,_]}class n_ extends tt{constructor(e){super(),et(this,e,r_,i_,Ye,{href:0,scale:1,color:2,playerStyle:3,controlsOrder:4,onEvent:6})}get href(){return this.$$.ctx[0]}set href(e){this.$$set({href:e}),w()}get scale(){return this.$$.ctx[1]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[2]}set color(e){this.$$set({color:e}),w()}get playerStyle(){return this.$$.ctx[3]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get controlsOrder(){return this.$$.ctx[4]}set controlsOrder(e){this.$$set({controlsOrder:e}),w()}get onEvent(){return this.$$.ctx[6]}set onEvent(e){this.$$set({onEvent:e}),w()}}const vi=(t,e,i)=>rt(t,e,e==="style"?a_(i):i),s_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,a_=t=>t.split(s_).map(e=>e+" !important").join(";");function o_(t){let e,i,n,a,l,g,p,_,k;return{c(){e=$e("svg"),i=$e("path"),n=$e("path"),a=$e("defs"),l=$e("linearGradient"),g=$e("stop"),p=$e("stop"),vi(i,"fill","url(#gradient)"),vi(i,"d","M4.51819 0C3.20323 0.00414605 2.06058 0.402167 1.23154 1.23171C0.401171 2.06225 0.00315099 3.20622 0 4.52301V4.55435C0.00613614 7.21612 1.61729 10.5771 4.523 13.4826C6.55223 15.5125 8.90619 16.989 11.1512 17.6401C11.9816 17.8809 12.7653 18 13.4871 18C14.8315 18 15.9609 17.5859 16.7732 16.7738C18.0215 15.5255 18.3298 13.5286 17.6401 11.1512C16.9891 8.90638 15.5126 6.55259 13.4826 4.52284C10.5769 1.61679 7.2161 0.00597031 4.55417 0H4.51819ZM11.5084 16.4099C9.46706 15.818 7.30764 14.4566 5.42849 12.577C1.70684 8.85563 0.199673 4.07507 2.13703 2.13737C2.7125 1.56207 3.53856 1.29058 4.51354 1.29058C6.82123 1.29058 9.9611 2.81235 12.5771 5.42851C14.4569 7.308 15.8176 9.46709 16.41 11.5083C16.9634 13.4166 16.7709 14.9649 15.8677 15.8681C15.302 16.4331 14.4843 16.72 13.4841 16.72C12.8859 16.72 12.222 16.6172 11.5084 16.4099Z"),vi(n,"fill","url(#gradient)"),vi(n,"d","M11.1483 0.360687C8.90517 1.01235 6.55252 2.48946 4.52328 4.5188C0.166276 8.87725 -1.28019 14.2587 1.23026 16.7697C2.06293 17.6026 3.21138 18 4.5339 18C7.19718 18 10.5655 16.3873 13.4767 13.4752C17.8334 9.11694 19.28 3.73601 16.7702 1.22481C15.9583 0.413305 14.8303 0 13.4865 0C12.7642 0 11.9795 0.11951 11.1483 0.360687ZM2.14341 15.856C1.24354 14.9563 1.05288 13.4115 1.60627 11.5066C2.19817 9.468 3.55852 7.31101 5.43692 5.43222C7.31433 3.55376 9.47084 2.19334 11.5085 1.60093C12.2231 1.39362 12.8867 1.29071 13.4845 1.29071C14.4808 1.29071 15.2947 1.57604 15.8566 2.13856C16.7563 3.0382 16.947 4.5832 16.3937 6.48756C15.8018 8.52586 14.4415 10.683 12.5632 12.562C9.94941 15.1771 6.8127 16.6998 4.50967 16.6998C3.53911 16.6998 2.71639 16.4293 2.14341 15.856Z"),vi(g,"stop-color",t[1]),vi(p,"offset","1"),vi(p,"stop-color",t[2]),vi(l,"id","gradient"),vi(l,"x1","0"),vi(l,"y1","9"),vi(l,"x2","18"),vi(l,"y2","9"),vi(l,"gradientUnits","userSpaceOnUse"),vi(e,"width",_=16*t[0]),vi(e,"height",k=16*t[0]),vi(e,"viewBox","0 0 18 18"),vi(e,"fill","none"),vi(e,"xmlns","http://www.w3.org/2000/svg")},m(T,C){se(T,e,C),I(e,i),I(e,n),I(e,a),I(a,l),I(l,g),I(l,p)},p(T,[C]){C&2&&vi(g,"stop-color",T[1]),C&4&&vi(p,"stop-color",T[2]),C&1&&_!==(_=16*T[0])&&vi(e,"width",_),C&1&&k!==(k=16*T[0])&&vi(e,"height",k)},i:oe,o:oe,d(T){T&&te(e)}}}function l_(t,e,i){let{scale:n=1}=e,{color1:a="#933afb"}=e,{color2:l="#fb3a41"}=e;return t.$$set=g=>{"scale"in g&&i(0,n=g.scale),"color1"in g&&i(1,a=g.color1),"color2"in g&&i(2,l=g.color2)},[n,a,l]}class u_ extends tt{constructor(e){super(),et(this,e,l_,o_,Ye,{scale:0,color1:1,color2:2})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color1(){return this.$$.ctx[1]}set color1(e){this.$$set({color1:e}),w()}get color2(){return this.$$.ctx[2]}set color2(e){this.$$set({color2:e}),w()}}const O6="",Ju=(t,e,i)=>Mi(t,e,i,1),Na=(t,e,i)=>rt(t,e,e==="style"?d_(i):i),c_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,d_=t=>t.split(c_).map(e=>e+" !important").join(";");function f_(t){let e,i,n,a,l;return i=new u_({props:{scale:t[0]}}),{c(){e=F("a"),He(i.$$.fragment),Na(e,"class","beyondwords svelte-vl0esb"),Na(e,"href","https://beyondwords.io/"),Na(e,"target","_blank"),Ju(e,"outline-offset",6.4*t[0]+"px"),Na(e,"aria-label",bi("visitBeyondWords")),je(e,"visible",t[1])},m(g,p){se(g,e,p),Ge(i,e,null),n=!0,a||(l=[ge(e,"click",t[2]),ge(e,"mouseup",Zi)],a=!0)},p(g,[p]){const _={};p&1&&(_.scale=g[0]),i.$set(_),(!n||p&1)&&Ju(e,"outline-offset",6.4*g[0]+"px"),(!n||p&2)&&je(e,"visible",g[1])},i(g){n||(J(i.$$.fragment,g),n=!0)},o(g){ae(i.$$.fragment,g),n=!1},d(g){g&&te(e),ze(i),a=!1,Mt(l)}}}function h_(t,e,i){let{scale:n=1}=e,{visible:a=!0}=e,{onEvent:l=()=>{}}=e;const g=()=>{l(qe({type:"PressedBeyondWords",description:"The BeyondWords logo was pressed to open the BeyondWords website in a new tab.",initiatedBy:"user"}))};return t.$$set=p=>{"scale"in p&&i(0,n=p.scale),"visible"in p&&i(1,a=p.visible),"onEvent"in p&&i(3,l=p.onEvent)},[n,a,g,l]}let g_=class extends tt{constructor(e){super(),et(this,e,h_,f_,Ye,{scale:0,visible:1,onEvent:3})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get visible(){return this.$$.ctx[1]}set visible(e){this.$$set({visible:e}),w()}get onEvent(){return this.$$.ctx[3]}set onEvent(e){this.$$set({onEvent:e}),w()}};const B6="",Xs=(t,e,i)=>rt(t,e,e==="style"?m_(i):i),v_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,m_=t=>t.split(v_).map(e=>e+" !important").join(";");function p_(t){let e,i,n,a,l;return i=new Xu({props:{scale:t[1],color:t[2],circular:!1}}),{c(){e=F("a"),He(i.$$.fragment),Xs(e,"class","source-url-button svelte-1umb4uf"),Xs(e,"href",t[0]),Xs(e,"target","_blank"),Xs(e,"aria-label",bi("visitSourceArticle"))},m(g,p){se(g,e,p),Ge(i,e,null),n=!0,a||(l=[ge(e,"click",t[3]),ge(e,"mouseup",Zi)],a=!0)},p(g,[p]){const _={};p&2&&(_.scale=g[1]),p&4&&(_.color=g[2]),i.$set(_),(!n||p&1)&&Xs(e,"href",g[0])},i(g){n||(J(i.$$.fragment,g),n=!0)},o(g){ae(i.$$.fragment,g),n=!1},d(g){g&&te(e),ze(i),a=!1,Mt(l)}}}function __(t,e,i){let{href:n}=e,{scale:a=1}=e,{color:l="#323232"}=e,{onEvent:g=()=>{}}=e;const p=()=>{g(qe({type:"PressedSourceUrl",description:"The source URL button was pressed to open the source article in a new tab.",initiatedBy:"user"}))};return t.$$set=_=>{"href"in _&&i(0,n=_.href),"scale"in _&&i(1,a=_.scale),"color"in _&&i(2,l=_.color),"onEvent"in _&&i(4,g=_.onEvent)},[n,a,l,p,g]}class y_ extends tt{constructor(e){super(),et(this,e,__,p_,Ye,{href:0,scale:1,color:2,onEvent:4})}get href(){return this.$$.ctx[0]}set href(e){this.$$set({href:e}),w()}get scale(){return this.$$.ctx[1]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[2]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[4]}set onEvent(e){this.$$set({onEvent:e}),w()}}const M6="",Rn=(t,e,i)=>Mi(t,e,i,1),ln=(t,e,i)=>rt(t,e,e==="style"?S_(i):i),b_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,S_=t=>t.split(b_).map(e=>e+" !important").join(";");function k_(t){let e,i,n,a,l,g;return{c(){e=F("a"),i=F("img"),Rr(i.src,n=t[0])||ln(i,"src",n),ln(i,"alt",t[2]),Rn(i,"width",t[3]),Rn(i,"height",t[3]),ln(e,"class","large-image svelte-1ngswrw"),ln(e,"href",a=t[1]?t[1]:null),ln(e,"target","_blank"),Rn(e,"width",t[3]),Rn(e,"height",t[3]),ln(e,"aria-label",bi("visitAdvert"))},m(p,_){se(p,e,_),I(e,i),l||(g=[ge(e,"click",t[4]),ge(e,"mouseup",Zi)],l=!0)},p(p,[_]){_&1&&!Rr(i.src,n=p[0])&&ln(i,"src",n),_&4&&ln(i,"alt",p[2]),_&8&&Rn(i,"width",p[3]),_&8&&Rn(i,"height",p[3]),_&2&&a!==(a=p[1]?p[1]:null)&&ln(e,"href",a),_&8&&Rn(e,"width",p[3]),_&8&&Rn(e,"height",p[3])},i:oe,o:oe,d(p){p&&te(e),l=!1,Mt(g)}}}function T_(t,e,i){let n,{src:a}=e,{href:l}=e,{alt:g="Player Image"}=e,{scale:p=1}=e,{onEvent:_=()=>{}}=e;const k=()=>{l&&_(qe({type:"PressedAdvertImage",description:"The advert image was pressed to open the click-through URL in a new tab.",initiatedBy:"user"}))};return t.$$set=T=>{"src"in T&&i(0,a=T.src),"href"in T&&i(1,l=T.href),"alt"in T&&i(2,g=T.alt),"scale"in T&&i(5,p=T.scale),"onEvent"in T&&i(6,_=T.onEvent)},t.$$.update=()=>{t.$$.dirty&32&&i(3,n=`${p*80}px`)},[a,l,g,n,k,p,_]}class E_ extends tt{constructor(e){super(),et(this,e,T_,k_,Ye,{src:0,href:1,alt:2,scale:5,onEvent:6})}get src(){return this.$$.ctx[0]}set src(e){this.$$set({src:e}),w()}get href(){return this.$$.ctx[1]}set href(e){this.$$set({href:e}),w()}get alt(){return this.$$.ctx[2]}set alt(e){this.$$set({alt:e}),w()}get scale(){return this.$$.ctx[5]}set scale(e){this.$$set({scale:e}),w()}get onEvent(){return this.$$.ctx[6]}set onEvent(e){this.$$set({onEvent:e}),w()}}const N6="",Fa=(t,e,i)=>rt(t,e,e==="style"?x_(i):i),A_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,x_=t=>t.split(A_).map(e=>e+" !important").join(";");function w_(t){var a;let e,i=(((a=t[0])==null?void 0:a.replaceAll(/<[^>]+>/gi,""))||"")+"",n;return{c(){e=F("div"),Fa(e,"class",n="player-title "+t[1]+" svelte-xrh20u"),Fa(e,"style",t[3])},m(l,g){se(l,e,g),e.innerHTML=i,t[10](e)},p(l,[g]){var p;g&1&&i!==(i=(((p=l[0])==null?void 0:p.replaceAll(/<[^>]+>/gi,""))||"")+"")&&(e.innerHTML=i),g&2&&n!==(n="player-title "+l[1]+" svelte-xrh20u")&&Fa(e,"class",n),g&8&&Fa(e,"style",l[3])},i:oe,o:oe,d(l){l&&te(e),t[10](null)}}}function P_(t,e,i){let n,a,{title:l}=e,{playerStyle:g}=e,{scale:p=1}=e,{visible:_=!0}=e,{collapsible:k=!1}=e,{collapsed:T=!1}=e,{color:C="#111"}=e,U;function V(N){Ne[N?"unshift":"push"](()=>{U=N,i(2,U)})}return t.$$set=N=>{"title"in N&&i(0,l=N.title),"playerStyle"in N&&i(1,g=N.playerStyle),"scale"in N&&i(4,p=N.scale),"visible"in N&&i(5,_=N.visible),"collapsible"in N&&i(6,k=N.collapsible),"collapsed"in N&&i(7,T=N.collapsed),"color"in N&&i(8,C=N.color)},t.$$.update=()=>{t.$$.dirty&196&&i(9,n=T?0:k&&U?`${U.scrollWidth}px`:"auto"),t.$$.dirty&944&&i(3,a=`font-size: ${12*p}px; visibility: ${_?"visible":"hidden"}; width: ${n}; opacity: ${T?0:1}; color: ${C}`)},[l,g,U,a,p,_,k,T,C,n,V]}class Qu extends tt{constructor(e){super(),et(this,e,P_,w_,Ye,{title:0,playerStyle:1,scale:4,visible:5,collapsible:6,collapsed:7,color:8})}get title(){return this.$$.ctx[0]}set title(e){this.$$set({title:e}),w()}get playerStyle(){return this.$$.ctx[1]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get scale(){return this.$$.ctx[4]}set scale(e){this.$$set({scale:e}),w()}get visible(){return this.$$.ctx[5]}set visible(e){this.$$set({visible:e}),w()}get collapsible(){return this.$$.ctx[6]}set collapsible(e){this.$$set({collapsible:e}),w()}get collapsed(){return this.$$.ctx[7]}set collapsed(e){this.$$set({collapsed:e}),w()}get color(){return this.$$.ctx[8]}set color(e){this.$$set({color:e}),w()}}const F6="",ol=(t,e,i)=>rt(t,e,e==="style"?L_(i):i),C_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,L_=t=>t.split(C_).map(e=>e+" !important").join(";");function I_(t){var n;let e,i=(((n=t[0])==null?void 0:n.replaceAll(/<[^>]+>/gi,""))||"")+"";return{c(){e=F("div"),ol(e,"class","content-title svelte-mtaayt"),ol(e,"style",t[4]),je(e,"bold",t[3]),je(e,"one-line",t[1]===1),je(e,"center",t[2]),je(e,"n-lines",t[1]>1)},m(a,l){se(a,e,l),e.innerHTML=i},p(a,[l]){var g;l&1&&i!==(i=(((g=a[0])==null?void 0:g.replaceAll(/<[^>]+>/gi,""))||"")+"")&&(e.innerHTML=i),l&16&&ol(e,"style",a[4]),l&8&&je(e,"bold",a[3]),l&2&&je(e,"one-line",a[1]===1),l&4&&je(e,"center",a[2]),l&2&&je(e,"n-lines",a[1]>1)},i:oe,o:oe,d(a){a&&te(e)}}}function R_(t,e,i){let n,a,l,g,{title:p}=e,{maxLines:_=1}=e,{maxWidth:k=void 0}=e,{center:T=!1}=e,{bold:C=!1}=e,{flex:U="0 1 auto"}=e,{scale:V=1}=e,{color:N="#111"}=e;return t.$$set=Q=>{"title"in Q&&i(0,p=Q.title),"maxLines"in Q&&i(1,_=Q.maxLines),"maxWidth"in Q&&i(5,k=Q.maxWidth),"center"in Q&&i(2,T=Q.center),"bold"in Q&&i(3,C=Q.bold),"flex"in Q&&i(6,U=Q.flex),"scale"in Q&&i(7,V=Q.scale),"color"in Q&&i(8,N=Q.color)},t.$$.update=()=>{t.$$.dirty&128&&i(11,n=`${10*V}px`),t.$$.dirty&130&&i(10,a=`${10*V*1.2*_}px`),t.$$.dirty&32&&i(9,l=k?`max-width: ${k}px`:""),t.$$.dirty&3906&&i(4,g=`--n: ${_}; font-size: ${n}; max-height: ${a}; flex: ${U}; ${l}; color: ${N}`)},[p,_,T,C,g,k,U,V,N,l,a,n]}class ll extends tt{constructor(e){super(),et(this,e,R_,I_,Ye,{title:0,maxLines:1,maxWidth:5,center:2,bold:3,flex:6,scale:7,color:8})}get title(){return this.$$.ctx[0]}set title(e){this.$$set({title:e}),w()}get maxLines(){return this.$$.ctx[1]}set maxLines(e){this.$$set({maxLines:e}),w()}get maxWidth(){return this.$$.ctx[5]}set maxWidth(e){this.$$set({maxWidth:e}),w()}get center(){return this.$$.ctx[2]}set center(e){this.$$set({center:e}),w()}get bold(){return this.$$.ctx[3]}set bold(e){this.$$set({bold:e}),w()}get flex(){return this.$$.ctx[6]}set flex(e){this.$$set({flex:e}),w()}get scale(){return this.$$.ctx[7]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[8]}set color(e){this.$$set({color:e}),w()}}const Ua=(t,e)=>i=>{let n;i.key==="ArrowLeft"&&(n="Left"),i.key==="ArrowRight"&&(n="Right"),i.key===" "&&(n="Space"),i.key==="Enter"&&(n="Enter"),n&&(i.preventDefault(),t(qe({type:`Pressed${n}OnProgress${e}`,description:`The ${n.toLowerCase()} key was pressed while the progress ${e.toLowerCase()} was focussed.`,initiatedBy:"user"})))},U6="",un=(t,e,i)=>rt(t,e,e==="style"?O_(i):i),D_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,O_=t=>t.split(D_).map(e=>e+" !important").join(";");function B_(t){let e,i,n,a,l,g,p;return{c(){e=F("button"),i=F("div"),n=Ce(),a=F("div"),un(i,"class","background svelte-8a7sls"),un(i,"style",t[6]),un(a,"class","progress svelte-8a7sls"),un(a,"style",l=t[6]+"; width: "+t[0]*100+"%"),un(e,"type","button"),un(e,"class","progress-bar svelte-8a7sls"),un(e,"aria-label",bi("scrubProgressBar")),je(e,"full-width",t[1]),je(e,"readonly",t[2]),je(e,"mouse-down",t[5])},m(_,k){se(_,e,k),I(e,i),I(e,n),I(e,a),t[9](e),g||(p=[ge(e,"mousedown",t[7]),ge(e,"keydown",function(){Cn(Ua(t[3],"Bar"))&&Ua(t[3],"Bar").apply(this,arguments)}),ge(e,"mouseup",Zi)],g=!0)},p(_,[k]){t=_,k&64&&un(i,"style",t[6]),k&65&&l!==(l=t[6]+"; width: "+t[0]*100+"%")&&un(a,"style",l),k&2&&je(e,"full-width",t[1]),k&4&&je(e,"readonly",t[2]),k&32&&je(e,"mouse-down",t[5])},i:oe,o:oe,d(_){_&&te(e),t[9](null),g=!1,Mt(p)}}}function M_(t,e,i){let n,{progress:a=0}=e,{fullWidth:l=!1}=e,{readonly:g=!1}=e,{color:p="#323232"}=e,{onEvent:_=()=>{}}=e,k,T;const C=W=>{i(5,T=!0),_(qe({type:"PressedProgressBar",description:"The progress bar was pressed at some ratio.",initiatedBy:"user",ratio:N(W)}))},U=W=>{if(T){if(!k){V();return}_(qe({type:"ScrubbedProgressBar",description:"The user pressed on the progress bar then dragged.",initiatedBy:"user",ratio:N(W)}))}},V=()=>{T&&(i(5,T=!1),_(qe({type:"FinishedScrubbingProgressBar",description:"The user let go after scrubbing the progress bar.",initiatedBy:"user"})))},N=W=>{const{x:ue,width:ie}=k.getBoundingClientRect(),be=(W.clientX-ue)/ie;return Math.max(0,Math.min(1,be))};Ko(()=>{const W=addEventListener("mouseup",V),ue=addEventListener("mousemove",U);return()=>{removeEventListener("mouseup",W),removeEventListener("mousemove",ue)}});function Q(W){Ne[W?"unshift":"push"](()=>{k=W,i(4,k)})}return t.$$set=W=>{"progress"in W&&i(0,a=W.progress),"fullWidth"in W&&i(1,l=W.fullWidth),"readonly"in W&&i(2,g=W.readonly),"color"in W&&i(8,p=W.color),"onEvent"in W&&i(3,_=W.onEvent)},t.$$.update=()=>{t.$$.dirty&258&&i(6,n=l?"":`background: ${p}`)},[a,l,g,_,k,T,n,C,p,Q]}class N_ extends tt{constructor(e){super(),et(this,e,M_,B_,Ye,{progress:0,fullWidth:1,readonly:2,color:8,onEvent:3})}get progress(){return this.$$.ctx[0]}set progress(e){this.$$set({progress:e}),w()}get fullWidth(){return this.$$.ctx[1]}set fullWidth(e){this.$$set({fullWidth:e}),w()}get readonly(){return this.$$.ctx[2]}set readonly(e){this.$$set({readonly:e}),w()}get color(){return this.$$.ctx[8]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[3]}set onEvent(e){this.$$set({onEvent:e}),w()}}const V6="",Va=(t,e,i)=>Mi(t,e,i,1),Ti=(t,e,i)=>rt(t,e,e==="style"?U_(i):i),F_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,U_=t=>t.split(F_).map(e=>e+" !important").join(";");function V_(t){let e;const i=t[13].default,n=gs(i,t,t[12],null);return{c(){n&&n.c()},m(a,l){n&&n.m(a,l),e=!0},p(a,l){n&&n.p&&(!e||l&4096)&&ms(n,i,a,a[12],e?vs(i,a[12],l,null):ps(a[12]),null)},i(a){e||(J(n,a),e=!0)},o(a){ae(n,a),e=!1},d(a){n&&n.d(a)}}}function W_(t){let e,i,n,a,l,g,p,_;const k=t[13].default,T=gs(k,t,t[12],null);return{c(){e=F("div"),i=$e("svg"),n=$e("circle"),l=Ce(),T&&T.c(),Ti(n,"cx","50%"),Ti(n,"cy","50%"),Ti(n,"r",t[6]),Ti(n,"stroke",t[3]),Ti(n,"stroke-width",t[7]),Ti(n,"stroke-dasharray",a=t[5]+" "+t[5]),Ti(n,"stroke-dashoffset",t[8]),Ti(i,"fill","none"),Ti(i,"width",t[9]),Ti(i,"height",t[9]),Ti(i,"xmlns","http://www.w3.org/2000/svg"),Ti(i,"class","svelte-niuvgx"),Ti(e,"class","progress-circle svelte-niuvgx"),Va(e,"width",t[2]*40+"px"),Va(e,"height",t[2]*40+"px")},m(C,U){se(C,e,U),I(e,i),I(i,n),I(e,l),T&&T.m(e,null),g=!0,p||(_=ge(e,"keydown",function(){Cn(Ua(t[4],"Circle"))&&Ua(t[4],"Circle").apply(this,arguments)}),p=!0)},p(C,U){t=C,(!g||U&64)&&Ti(n,"r",t[6]),(!g||U&8)&&Ti(n,"stroke",t[3]),(!g||U&128)&&Ti(n,"stroke-width",t[7]),(!g||U&32&&a!==(a=t[5]+" "+t[5]))&&Ti(n,"stroke-dasharray",a),(!g||U&256)&&Ti(n,"stroke-dashoffset",t[8]),(!g||U&512)&&Ti(i,"width",t[9]),(!g||U&512)&&Ti(i,"height",t[9]),T&&T.p&&(!g||U&4096)&&ms(T,k,t,t[12],g?vs(k,t[12],U,null):ps(t[12]),null),(!g||U&4)&&Va(e,"width",t[2]*40+"px"),(!g||U&4)&&Va(e,"height",t[2]*40+"px")},i(C){g||(J(T,C),g=!0)},o(C){ae(T,C),g=!1},d(C){C&&te(e),T&&T.d(C),p=!1,_()}}}function j_(t){let e,i,n,a;const l=[W_,V_],g=[];function p(_,k){return _[1]&&_[0]?0:1}return e=p(t),i=g[e]=l[e](t),{c(){i.c(),n=Zn()},m(_,k){g[e].m(_,k),se(_,n,k),a=!0},p(_,[k]){let T=e;e=p(_),e===T?g[e].p(_,k):(Lt(),ae(g[T],1,1,()=>{g[T]=null}),It(),i=g[e],i?i.p(_,k):(i=g[e]=l[e](_),i.c()),J(i,1),i.m(n.parentNode,n))},i(_){a||(J(i),a=!0)},o(_){ae(i),a=!1},d(_){g[e].d(_),_&&te(n)}}}function G_(t,e,i){let n,a,l,g,p,_,{$$slots:k={},$$scope:T}=e,{progress:C=0}=e,{enabled:U=!1}=e,{bold:V}=e,{scale:N=1}=e,{color:Q="#323232"}=e,{onEvent:W=()=>{}}=e;return t.$$set=ue=>{"progress"in ue&&i(0,C=ue.progress),"enabled"in ue&&i(1,U=ue.enabled),"bold"in ue&&i(10,V=ue.bold),"scale"in ue&&i(2,N=ue.scale),"color"in ue&&i(3,Q=ue.color),"onEvent"in ue&&i(4,W=ue.onEvent),"$$scope"in ue&&i(12,T=ue.$$scope)},t.$$.update=()=>{t.$$.dirty&1028&&i(7,n=N*(V?2.5:1.667)),t.$$.dirty&1156&&i(6,a=20*N+n*(V?1:1.5)),t.$$.dirty&192&&i(9,l=2*a+n),t.$$.dirty&64&&i(5,g=a*2*Math.PI),t.$$.dirty&1&&i(11,p=Math.max(0,Math.min(1,C))),t.$$.dirty&2080&&i(8,_=g*(1-p))},[C,U,N,Q,W,g,a,n,_,l,V,p,T,k]}class z_ extends tt{constructor(e){super(),et(this,e,G_,j_,Ye,{progress:0,enabled:1,bold:10,scale:2,color:3,onEvent:4})}get progress(){return this.$$.ctx[0]}set progress(e){this.$$set({progress:e}),w()}get enabled(){return this.$$.ctx[1]}set enabled(e){this.$$set({enabled:e}),w()}get bold(){return this.$$.ctx[10]}set bold(e){this.$$set({bold:e}),w()}get scale(){return this.$$.ctx[2]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[3]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[4]}set onEvent(e){this.$$set({onEvent:e}),w()}}const Es=t=>{t<0&&(t=Math.max(0,t));const e=Math.floor(t/3600).toString();let i=Math.floor(t%3600/60).toString(),n=Math.floor(t%60).toString();return n.length<2&&(n=`0${n}`),t<3600?`${i}:${n}`:(i.length<2&&(i=`0${i}`),`${e}:${i}:${n}`)},W6="",Wa=(t,e,i)=>Mi(t,e,i,1),H_=(t,e,i)=>rt(t,e,e==="style"?Y_(i):i),K_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Y_=t=>t.split(K_).map(e=>e+" !important").join(";");function q_(t){let e,i,n,a=Es(t[1])+"",l;return{c(){e=F("span"),i=Le(t[0]),n=Le(" • "),l=Le(a),H_(e,"class","countdown-time svelte-mmsohq"),Wa(e,"font-size",10*t[2]+"px"),Wa(e,"color",t[3])},m(g,p){se(g,e,p),I(e,i),I(e,n),I(e,l)},p(g,[p]){p&1&&gr(i,g[0]),p&2&&a!==(a=Es(g[1])+"")&&gr(l,a),p&4&&Wa(e,"font-size",10*g[2]+"px"),p&8&&Wa(e,"color",g[3])},i:oe,o:oe,d(g){g&&te(e)}}}function X_(t,e,i){let{text:n}=e,{remaining:a}=e,{scale:l=1}=e,{color:g="#323232"}=e;return t.$$set=p=>{"text"in p&&i(0,n=p.text),"remaining"in p&&i(1,a=p.remaining),"scale"in p&&i(2,l=p.scale),"color"in p&&i(3,g=p.color)},[n,a,l,g]}class Z_ extends tt{constructor(e){super(),et(this,e,X_,q_,Ye,{text:0,remaining:1,scale:2,color:3})}get text(){return this.$$.ctx[0]}set text(e){this.$$set({text:e}),w()}get remaining(){return this.$$.ctx[1]}set remaining(e){this.$$set({remaining:e}),w()}get scale(){return this.$$.ctx[2]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[3]}set color(e){this.$$set({color:e}),w()}}const j6="",ja=(t,e,i)=>Mi(t,e,i,1),J_=(t,e,i)=>rt(t,e,e==="style"?$_(i):i),Q_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,$_=t=>t.split(Q_).map(e=>e+" !important").join(";");function e1(t){let e,i,n;return{c(){e=F("div"),i=Le(t[3]),n=Le(" min"),J_(e,"class","duration-in-mins svelte-121qsze"),ja(e,"font-size",10*t[1]+"px"),ja(e,"color",t[2]),je(e,"bold",t[0])},m(a,l){se(a,e,l),I(e,i),I(e,n)},p(a,[l]){l&8&&gr(i,a[3]),l&2&&ja(e,"font-size",10*a[1]+"px"),l&4&&ja(e,"color",a[2]),l&1&&je(e,"bold",a[0])},i:oe,o:oe,d(a){a&&te(e)}}}function t1(t,e,i){let n,{duration:a=0}=e,{bold:l=!1}=e,{scale:g=1}=e,{color:p="#323232"}=e;return t.$$set=_=>{"duration"in _&&i(4,a=_.duration),"bold"in _&&i(0,l=_.bold),"scale"in _&&i(1,g=_.scale),"color"in _&&i(2,p=_.color)},t.$$.update=()=>{t.$$.dirty&16&&i(3,n=Math.max(1,Math.round((a||0)/60)))},[l,g,p,n,a]}class $u extends tt{constructor(e){super(),et(this,e,t1,e1,Ye,{duration:4,bold:0,scale:1,color:2})}get duration(){return this.$$.ctx[4]}set duration(e){this.$$set({duration:e}),w()}get bold(){return this.$$.ctx[0]}set bold(e){this.$$set({bold:e}),w()}get scale(){return this.$$.ctx[1]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[2]}set color(e){this.$$set({color:e}),w()}}const G6="",Ga=(t,e,i)=>Mi(t,e,i,1),i1=(t,e,i)=>rt(t,e,e==="style"?n1(i):i),r1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,n1=t=>t.split(r1).map(e=>e+" !important").join(";");function s1(t){let e,i=Es(t[0])+"",n,a,l=Es(t[1])+"",g;return{c(){e=F("span"),n=Le(i),a=Le(" / "),g=Le(l),i1(e,"class","playback-time svelte-17necdw"),Ga(e,"font-size",10*t[2]+"px"),Ga(e,"color",t[3])},m(p,_){se(p,e,_),I(e,n),I(e,a),I(e,g)},p(p,[_]){_&1&&i!==(i=Es(p[0])+"")&&gr(n,i),_&2&&l!==(l=Es(p[1])+"")&&gr(g,l),_&4&&Ga(e,"font-size",10*p[2]+"px"),_&8&&Ga(e,"color",p[3])},i:oe,o:oe,d(p){p&&te(e)}}}function a1(t,e,i){let{currentTime:n=0}=e,{duration:a=0}=e,{scale:l=1}=e,{color:g="#323232"}=e;return t.$$set=p=>{"currentTime"in p&&i(0,n=p.currentTime),"duration"in p&&i(1,a=p.duration),"scale"in p&&i(2,l=p.scale),"color"in p&&i(3,g=p.color)},[n,a,l,g]}class o1 extends tt{constructor(e){super(),et(this,e,a1,s1,Ye,{currentTime:0,duration:1,scale:2,color:3})}get currentTime(){return this.$$.ctx[0]}set currentTime(e){this.$$set({currentTime:e}),w()}get duration(){return this.$$.ctx[1]}set duration(e){this.$$set({duration:e}),w()}get scale(){return this.$$.ctx[2]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[3]}set color(e){this.$$set({color:e}),w()}}const z6="",Zs=(t,e,i)=>rt(t,e,e==="style"?u1(i):i),l1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,u1=t=>t.split(l1).map(e=>e+" !important").join(";");function c1(t){let e,i;return e=new o1({props:{duration:t[0],currentTime:t[1],scale:t[11],color:t[8]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&1&&(l.duration=n[0]),a&2&&(l.currentTime=n[1]),a&2048&&(l.scale=n[11]),a&256&&(l.color=n[8]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function d1(t){let e,i;return e=new $u({props:{duration:t[0],scale:t[11],color:t[8]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&1&&(l.duration=n[0]),a&2048&&(l.scale=n[11]),a&256&&(l.color=n[8]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function f1(t){let e,i;return e=new Z_({props:{text:"Ad",remaining:t[12],scale:t[11],color:t[8]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&4096&&(l.remaining=n[12]),a&2048&&(l.scale=n[11]),a&256&&(l.color=n[8]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function h1(t){return{c:oe,m:oe,p:oe,i:oe,o:oe,d:oe}}function g1(t){let e,i,n,a,l,g;const p=[h1,f1,d1,c1],_=[];function k(T,C){return T[5]&&T[1]===0?0:T[5]?1:T[6]?2:3}return n=k(t),a=_[n]=p[n](t),{c(){e=F("div"),i=F("div"),a.c(),Zs(i,"class","inner svelte-17xceji"),Zs(e,"class",l="time-indicator "+t[2]+" "+t[3]+" svelte-17xceji"),Zs(e,"style",t[10]),je(e,"mobile",t[4]),je(e,"advert_",t[5]),je(e,"stopped",t[6]),je(e,"no-image",!t[7]),je(e,"no-transition",t[9])},m(T,C){se(T,e,C),I(e,i),_[n].m(i,null),g=!0},p(T,[C]){let U=n;n=k(T),n===U?_[n].p(T,C):(Lt(),ae(_[U],1,1,()=>{_[U]=null}),It(),a=_[n],a?a.p(T,C):(a=_[n]=p[n](T),a.c()),J(a,1),a.m(i,null)),(!g||C&12&&l!==(l="time-indicator "+T[2]+" "+T[3]+" svelte-17xceji"))&&Zs(e,"class",l),(!g||C&1024)&&Zs(e,"style",T[10]),(!g||C&28)&&je(e,"mobile",T[4]),(!g||C&44)&&je(e,"advert_",T[5]),(!g||C&76)&&je(e,"stopped",T[6]),(!g||C&140)&&je(e,"no-image",!T[7]),(!g||C&524)&&je(e,"no-transition",T[9])},i(T){g||(J(a),g=!0)},o(T){ae(a),g=!1},d(T){T&&te(e),_[n].d()}}}function v1(t,e,i){let n,a,l,g,p,{duration:_=0}=e,{currentTime:k=0}=e,{playerStyle:T}=e,{positionClasses:C}=e,{isMobile:U}=e,{isAdvert:V}=e,{isStopped:N}=e,{collapsed:Q}=e,{largeImage:W}=e,{color:ue="323232"}=e;return t.$$set=ie=>{"duration"in ie&&i(0,_=ie.duration),"currentTime"in ie&&i(1,k=ie.currentTime),"playerStyle"in ie&&i(2,T=ie.playerStyle),"positionClasses"in ie&&i(3,C=ie.positionClasses),"isMobile"in ie&&i(4,U=ie.isMobile),"isAdvert"in ie&&i(5,V=ie.isAdvert),"isStopped"in ie&&i(6,N=ie.isStopped),"collapsed"in ie&&i(13,Q=ie.collapsed),"largeImage"in ie&&i(7,W=ie.largeImage),"color"in ie&&i(8,ue=ie.color)},t.$$.update=()=>{t.$$.dirty&3&&i(12,n=Math.max(0,_-k)),t.$$.dirty&4&&i(14,a=T==="screen"),t.$$.dirty&16400&&i(11,l=a&&!U?3:a?2:1),t.$$.dirty&8192&&i(10,g=Q?"opacity: 0":""),t.$$.dirty&34&&i(9,p=!V&&k<.1)},[_,k,T,C,U,V,N,W,ue,p,g,l,n,Q,a]}class m1 extends tt{constructor(e){super(),et(this,e,v1,g1,Ye,{duration:0,currentTime:1,playerStyle:2,positionClasses:3,isMobile:4,isAdvert:5,isStopped:6,collapsed:13,largeImage:7,color:8})}get duration(){return this.$$.ctx[0]}set duration(e){this.$$set({duration:e}),w()}get currentTime(){return this.$$.ctx[1]}set currentTime(e){this.$$set({currentTime:e}),w()}get playerStyle(){return this.$$.ctx[2]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get positionClasses(){return this.$$.ctx[3]}set positionClasses(e){this.$$set({positionClasses:e}),w()}get isMobile(){return this.$$.ctx[4]}set isMobile(e){this.$$set({isMobile:e}),w()}get isAdvert(){return this.$$.ctx[5]}set isAdvert(e){this.$$set({isAdvert:e}),w()}get isStopped(){return this.$$.ctx[6]}set isStopped(e){this.$$set({isStopped:e}),w()}get collapsed(){return this.$$.ctx[13]}set collapsed(e){this.$$set({collapsed:e}),w()}get largeImage(){return this.$$.ctx[7]}set largeImage(e){this.$$set({largeImage:e}),w()}get color(){return this.$$.ctx[8]}set color(e){this.$$set({color:e}),w()}}const Vi=(t,e,i)=>rt(t,e,e==="style"?_1(i):i),p1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,_1=t=>t.split(p1).map(e=>e+" !important").join(";");function y1(t){let e,i,n,a,l,g;return{c(){e=$e("svg"),i=$e("rect"),n=$e("path"),Vi(i,"fill",t[3]),Vi(i,"width","100%"),Vi(i,"height","100%"),Vi(n,"fill",t[2]),Vi(n,"transform",a="scale("+t[1]+")"),Vi(n,"transform-origin","50% 50%"),Vi(n,"d","M0 6.99996V11C0 11.55 0.45 12 1 12H4L7.29 15.29C7.92 15.92 9 15.47 9 14.58V3.40996C9 2.51996 7.92 2.06996 7.29 2.69996L4 5.99996H1C0.45 5.99996 0 6.44996 0 6.99996ZM13.5 8.99996C13.5 7.22996 12.48 5.70996 11 4.96996V13.02C12.48 12.29 13.5 10.77 13.5 8.99996ZM11 1.44996V1.64996C11 2.02996 11.25 2.35996 11.6 2.49996C14.18 3.52996 16 6.05996 16 8.99996C16 11.94 14.18 14.47 11.6 15.5C11.24 15.64 11 15.97 11 16.35V16.55C11 17.18 11.63 17.62 12.21 17.4C15.6 16.11 18 12.84 18 8.99996C18 5.15996 15.6 1.88996 12.21 0.599963C11.63 0.369963 11 0.819963 11 1.44996V1.44996Z"),Vi(e,"width",l=18*t[0]),Vi(e,"height",g=18*t[0]),Vi(e,"viewBox","0 0 18 18"),Vi(e,"fill","none"),Vi(e,"xmlns","http://www.w3.org/2000/svg")},m(p,_){se(p,e,_),I(e,i),I(e,n)},p(p,[_]){_&8&&Vi(i,"fill",p[3]),_&4&&Vi(n,"fill",p[2]),_&2&&a!==(a="scale("+p[1]+")")&&Vi(n,"transform",a),_&1&&l!==(l=18*p[0])&&Vi(e,"width",l),_&1&&g!==(g=18*p[0])&&Vi(e,"height",g)},i:oe,o:oe,d(p){p&&te(e)}}}function b1(t,e,i){let{scale:n=1}=e,{zoom:a=1}=e,{color:l="#323232"}=e,{fill:g="transparent"}=e;return t.$$set=p=>{"scale"in p&&i(0,n=p.scale),"zoom"in p&&i(1,a=p.zoom),"color"in p&&i(2,l=p.color),"fill"in p&&i(3,g=p.fill)},[n,a,l,g]}class ec extends tt{constructor(e){super(),et(this,e,b1,y1,Ye,{scale:0,zoom:1,color:2,fill:3})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get zoom(){return this.$$.ctx[1]}set zoom(e){this.$$set({zoom:e}),w()}get color(){return this.$$.ctx[2]}set color(e){this.$$set({color:e}),w()}get fill(){return this.$$.ctx[3]}set fill(e){this.$$set({fill:e}),w()}}const Xr=(t,e,i)=>rt(t,e,e==="style"?k1(i):i),S1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,k1=t=>t.split(S1).map(e=>e+" !important").join(";");function T1(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),Xr(i,"fill",t[1]),Xr(i,"d","M6.33334 5.76668L5.73334 5.18334C5.60001 5.06112 5.44168 5.00279 5.25834 5.00834C5.07501 5.0139 4.92223 5.07779 4.80001 5.20001C4.67779 5.32223 4.61668 5.47779 4.61668 5.66668C4.61668 5.85557 4.67779 6.01112 4.80001 6.13334L6.53334 7.86668C6.65557 7.9889 6.81112 8.05001 7.00001 8.05001C7.1889 8.05001 7.34445 7.9889 7.46668 7.86668L9.21668 6.11668C9.3389 5.99445 9.39723 5.84168 9.39168 5.65834C9.38612 5.47501 9.32223 5.32223 9.20001 5.20001C9.07779 5.07779 8.92223 5.0139 8.73334 5.00834C8.54445 5.00279 8.3889 5.06668 8.26668 5.20001L7.66668 5.76668V3.65001C7.66668 3.46112 7.60279 3.30557 7.47501 3.18334C7.34723 3.06112 7.1889 3.00001 7.00001 3.00001C6.81112 3.00001 6.65279 3.0639 6.52501 3.19168C6.39723 3.31945 6.33334 3.47779 6.33334 3.66668V5.76668ZM4.33334 10.3333H9.68334C9.87223 10.3333 10.0278 10.2695 10.15 10.1417C10.2722 10.0139 10.3333 9.85557 10.3333 9.66668C10.3333 9.47779 10.2695 9.31945 10.1417 9.19168C10.0139 9.0639 9.85557 9.00001 9.66668 9.00001H4.31668C4.12779 9.00001 3.97223 9.0639 3.85001 9.19168C3.72779 9.31945 3.66668 9.47779 3.66668 9.66668C3.66668 9.85557 3.73057 10.0139 3.85834 10.1417C3.98612 10.2695 4.14445 10.3333 4.33334 10.3333ZM7.00001 13.6667C6.07779 13.6667 5.21112 13.4917 4.40001 13.1417C3.5889 12.7917 2.88334 12.3167 2.28334 11.7167C1.68334 11.1167 1.20834 10.4111 0.858343 9.60001C0.508343 8.7889 0.333344 7.92223 0.333344 7.00001C0.333344 6.07779 0.508343 5.21112 0.858343 4.40001C1.20834 3.5889 1.68334 2.88334 2.28334 2.28334C2.88334 1.68334 3.5889 1.20834 4.40001 0.858343C5.21112 0.508343 6.07779 0.333344 7.00001 0.333344C7.92223 0.333344 8.7889 0.508343 9.60001 0.858343C10.4111 1.20834 11.1167 1.68334 11.7167 2.28334C12.3167 2.88334 12.7917 3.5889 13.1417 4.40001C13.4917 5.21112 13.6667 6.07779 13.6667 7.00001C13.6667 7.92223 13.4917 8.7889 13.1417 9.60001C12.7917 10.4111 12.3167 11.1167 11.7167 11.7167C11.1167 12.3167 10.4111 12.7917 9.60001 13.1417C8.7889 13.4917 7.92223 13.6667 7.00001 13.6667Z"),Xr(e,"width",n=16*t[0]),Xr(e,"height",a=16*t[0]),Xr(e,"viewBox","0 0 14 14"),Xr(e,"fill","none"),Xr(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,[g]){g&2&&Xr(i,"fill",l[1]),g&1&&n!==(n=16*l[0])&&Xr(e,"width",n),g&1&&a!==(a=16*l[0])&&Xr(e,"height",a)},i:oe,o:oe,d(l){l&&te(e)}}}function E1(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class A1 extends tt{constructor(e){super(),et(this,e,E1,T1,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const H6="",tc=(t,e,i)=>Mi(t,e,i,1),ul=(t,e,i)=>rt(t,e,e==="style"?w1(i):i),x1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,w1=t=>t.split(x1).map(e=>e+" !important").join(";");function P1(t){let e,i,n,a,l;return i=new A1({props:{scale:t[0],color:t[1]}}),{c(){e=F("button"),He(i.$$.fragment),ul(e,"type","button"),ul(e,"class","download-button svelte-1r5l0am"),tc(e,"outline-offset",4.8*t[0]+"px"),ul(e,"aria-label",bi("downloadAudio"))},m(g,p){se(g,e,p),Ge(i,e,null),n=!0,a||(l=[ge(e,"click",t[2]),ge(e,"mouseup",Zi)],a=!0)},p(g,[p]){const _={};p&1&&(_.scale=g[0]),p&2&&(_.color=g[1]),i.$set(_),(!n||p&1)&&tc(e,"outline-offset",4.8*g[0]+"px")},i(g){n||(J(i.$$.fragment,g),n=!0)},o(g){ae(i.$$.fragment,g),n=!1},d(g){g&&te(e),ze(i),a=!1,Mt(l)}}}function C1(t,e,i){let{contentIndex:n}=e,{audioIndex:a}=e,{videoIndex:l}=e,{scale:g=1}=e,{color:p="#323232"}=e,{onEvent:_=()=>{}}=e;const k=T=>{T.stopPropagation(),_(qe({type:"PressedDownload",description:"The download button next to a playlist item was pressed.",initiatedBy:"user",contentIndex:n,audioIndex:a,videoIndex:l}))};return t.$$set=T=>{"contentIndex"in T&&i(3,n=T.contentIndex),"audioIndex"in T&&i(4,a=T.audioIndex),"videoIndex"in T&&i(5,l=T.videoIndex),"scale"in T&&i(0,g=T.scale),"color"in T&&i(1,p=T.color),"onEvent"in T&&i(6,_=T.onEvent)},[g,p,k,n,a,l,_]}class L1 extends tt{constructor(e){super(),et(this,e,C1,P1,Ye,{contentIndex:3,audioIndex:4,videoIndex:5,scale:0,color:1,onEvent:6})}get contentIndex(){return this.$$.ctx[3]}set contentIndex(e){this.$$set({contentIndex:e}),w()}get audioIndex(){return this.$$.ctx[4]}set audioIndex(e){this.$$set({audioIndex:e}),w()}get videoIndex(){return this.$$.ctx[5]}set videoIndex(e){this.$$set({videoIndex:e}),w()}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[6]}set onEvent(e){this.$$set({onEvent:e}),w()}}const K6="",Dn=(t,e,i)=>Mi(t,e,i,1),pr=(t,e,i)=>rt(t,e,e==="style"?R1(i):i),I1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,R1=t=>t.split(I1).map(e=>e+" !important").join(";");function ic(t,e,i){const n=t.slice();n[18]=e[i].title,n[19]=e[i].duration,n[20]=e[i].audio,n[21]=e[i].video,n[25]=i;const a=n[14](n[20],n[21]);return n[22]=a[0],n[23]=a[1],n}function D1(t){let e,i=t[25]+1+"",n;return{c(){e=F("span"),n=Le(i),pr(e,"class","number svelte-1d5um2m"),Dn(e,"color",t[1]),pr(e,"aria-hidden","true")},m(a,l){se(a,e,l),I(e,n)},p(a,l){l&2&&Dn(e,"color",a[1])},i:oe,o:oe,d(a){a&&te(e)}}}function O1(t){let e,i,n;return i=new ec({props:{color:t[3],scale:t[10]}}),{c(){e=F("span"),He(i.$$.fragment),pr(e,"class","speaker svelte-1d5um2m")},m(a,l){se(a,e,l),Ge(i,e,null),n=!0},p(a,l){const g={};l&8&&(g.color=a[3]),l&1024&&(g.scale=a[10]),i.$set(g)},i(a){n||(J(i.$$.fragment,a),n=!0)},o(a){ae(i.$$.fragment,a),n=!1},d(a){a&&te(e),ze(i)}}}function rc(t){let e,i;return e=new L1({props:{onEvent:t[7],color:t[3],contentIndex:t[25],audioIndex:t[22],videoIndex:t[23]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&128&&(l.onEvent=n[7]),a&8&&(l.color=n[3]),a&16&&(l.audioIndex=n[22]),a&16&&(l.videoIndex=n[23]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function nc(t){let e,i,n,a,l,g,p,_,k,T,C,U,V,N,Q,W;const ue=[O1,D1],ie=[];function be(fe,pe){return fe[25]===fe[5]?0:1}i=be(t),n=ie[i]=ue[i](t),g=new ll({props:{title:t[18],scale:t[10],maxLines:t[6]?3:2,bold:t[25]===t[5],color:t[1]}});let Se=(t[22]!==-1||t[23]!==-1)&&rc(t);return C=new $u({props:{duration:t[19],scale:t[10],bold:t[25]===t[5],color:t[1]}}),{c(){e=F("button"),n.c(),a=Ce(),l=F("span"),He(g.$$.fragment),p=Ce(),_=F("span"),Se&&Se.c(),k=Ce(),T=F("span"),He(C.$$.fragment),U=Ce(),pr(l,"class","title svelte-1d5um2m"),pr(_,"class","download svelte-1d5um2m"),pr(T,"class","duration svelte-1d5um2m"),pr(e,"type","button"),pr(e,"class","item svelte-1d5um2m"),pr(e,"aria-label",V=t[18]),je(e,"active",t[25]===t[5])},m(fe,pe){se(fe,e,pe),ie[i].m(e,null),I(e,a),I(e,l),Ge(g,l,null),I(e,p),I(e,_),Se&&Se.m(_,null),I(e,k),I(e,T),Ge(C,T,null),I(e,U),N=!0,Q||(W=[ge(e,"click",t[11](t[25])),ge(e,"keydown",t[12]),ge(e,"focus",t[13]),ge(e,"mouseup",Zi)],Q=!0)},p(fe,pe){t=fe;let Z=i;i=be(t),i===Z?ie[i].p(t,pe):(Lt(),ae(ie[Z],1,1,()=>{ie[Z]=null}),It(),n=ie[i],n?n.p(t,pe):(n=ie[i]=ue[i](t),n.c()),J(n,1),n.m(e,a));const L={};pe&16&&(L.title=t[18]),pe&1024&&(L.scale=t[10]),pe&64&&(L.maxLines=t[6]?3:2),pe&32&&(L.bold=t[25]===t[5]),pe&2&&(L.color=t[1]),g.$set(L),t[22]!==-1||t[23]!==-1?Se?(Se.p(t,pe),pe&16&&J(Se,1)):(Se=rc(t),Se.c(),J(Se,1),Se.m(_,null)):Se&&(Lt(),ae(Se,1,1,()=>{Se=null}),It());const le={};pe&16&&(le.duration=t[19]),pe&1024&&(le.scale=t[10]),pe&32&&(le.bold=t[25]===t[5]),pe&2&&(le.color=t[1]),C.$set(le),(!N||pe&16&&V!==(V=t[18]))&&pr(e,"aria-label",V),(!N||pe&32)&&je(e,"active",t[25]===t[5])},i(fe){N||(J(n),J(g.$$.fragment,fe),J(Se),J(C.$$.fragment,fe),N=!0)},o(fe){ae(n),ae(g.$$.fragment,fe),ae(Se),ae(C.$$.fragment,fe),N=!1},d(fe){fe&&te(e),ie[i].d(),ze(g),Se&&Se.d(),ze(C),Q=!1,Mt(W)}}}function B1(t){let e,i,n,a=t[4],l=[];for(let p=0;p<a.length;p+=1)l[p]=nc(ic(t,a,p));const g=p=>ae(l[p],1,1,()=>{l[p]=null});return{c(){e=F("div"),i=F("div");for(let p=0;p<l.length;p+=1)l[p].c();pr(i,"class","scrollable svelte-1d5um2m"),pr(i,"tabindex","-1"),pr(e,"class","playlist svelte-1d5um2m"),Dn(e,"--desktop-rows",t[8]),Dn(e,"--mobile-rows",t[9]),Dn(e,"background",t[2]),je(e,"mobile",t[6]),je(e,"larger",t[0])},m(p,_){se(p,e,_),I(e,i);for(let k=0;k<l.length;k+=1)l[k]&&l[k].m(i,null);n=!0},p(p,[_]){if(_&31994){a=p[4];let k;for(k=0;k<a.length;k+=1){const T=ic(p,a,k);l[k]?(l[k].p(T,_),J(l[k],1)):(l[k]=nc(T),l[k].c(),J(l[k],1),l[k].m(i,null))}for(Lt(),k=a.length;k<l.length;k+=1)g(k);It()}(!n||_&256)&&Dn(e,"--desktop-rows",p[8]),(!n||_&512)&&Dn(e,"--mobile-rows",p[9]),(!n||_&4)&&Dn(e,"background",p[2]),(!n||_&64)&&je(e,"mobile",p[6]),(!n||_&1)&&je(e,"larger",p[0])},i(p){if(!n){for(let _=0;_<a.length;_+=1)J(l[_]);n=!0}},o(p){l=l.filter(Boolean);for(let _=0;_<l.length;_+=1)ae(l[_]);n=!1},d(p){p&&te(e),Ln(l,p)}}}function M1(t,e,i){let n,a,l,g,{style:p="auto"}=e,{downloadFormats:_=[]}=e,{larger:k=!1}=e,{textColor:T="#111"}=e,{backgroundColor:C="#f5f5f5"}=e,{iconColor:U="#000"}=e,{content:V=[]}=e,{index:N=0}=e,{isMobile:Q}=e,{onEvent:W}=e;const ue=fe=>()=>{W(qe({type:"PressedPlaylistItem",description:"A playlist item was pressed.",initiatedBy:"user",index:fe}))},ie=fe=>{if(fe.key==="ArrowUp"){fe.preventDefault();const pe=fe.target.previousElementSibling;pe&&pe.focus()}if(fe.key==="ArrowDown"){fe.preventDefault();const pe=fe.target.nextElementSibling;pe&&pe.focus()}},be=fe=>{const pe=fe.target.parentNode,Z=Math.round(pe.scrollTop/10)*10;pe.scrollTop=Z},Se=(fe,pe)=>{var Z,L;for(const le of _){for(const[z,Ke]of(fe||[]).entries())if((Z=Ke.url)!=null&&Z.endsWith(`.${le}`))return[z,-1];for(const[z,Ke]of(pe||[]).entries())if((L=Ke.url)!=null&&L.endsWith(`.${le}`))return[-1,z]}return[-1,-1]};return t.$$set=fe=>{"style"in fe&&i(15,p=fe.style),"downloadFormats"in fe&&i(16,_=fe.downloadFormats),"larger"in fe&&i(0,k=fe.larger),"textColor"in fe&&i(1,T=fe.textColor),"backgroundColor"in fe&&i(2,C=fe.backgroundColor),"iconColor"in fe&&i(3,U=fe.iconColor),"content"in fe&&i(4,V=fe.content),"index"in fe&&i(5,N=fe.index),"isMobile"in fe&&i(6,Q=fe.isMobile),"onEvent"in fe&&i(7,W=fe.onEvent)},t.$$.update=()=>{t.$$.dirty&32768&&i(8,[n,a,l]=p.split("-"),a,(i(9,l),i(15,p),i(8,a))),t.$$.dirty&256&&i(8,a=a||5),t.$$.dirty&768&&i(9,l=l||a||4),t.$$.dirty&1&&i(10,g=k?1.25:1)},[k,T,C,U,V,N,Q,W,a,l,g,ue,ie,be,Se,p,_]}class N1 extends tt{constructor(e){super(),et(this,e,M1,B1,Ye,{style:15,downloadFormats:16,larger:0,textColor:1,backgroundColor:2,iconColor:3,content:4,index:5,isMobile:6,onEvent:7})}get style(){return this.$$.ctx[15]}set style(e){this.$$set({style:e}),w()}get downloadFormats(){return this.$$.ctx[16]}set downloadFormats(e){this.$$set({downloadFormats:e}),w()}get larger(){return this.$$.ctx[0]}set larger(e){this.$$set({larger:e}),w()}get textColor(){return this.$$.ctx[1]}set textColor(e){this.$$set({textColor:e}),w()}get backgroundColor(){return this.$$.ctx[2]}set backgroundColor(e){this.$$set({backgroundColor:e}),w()}get iconColor(){return this.$$.ctx[3]}set iconColor(e){this.$$set({iconColor:e}),w()}get content(){return this.$$.ctx[4]}set content(e){this.$$set({content:e}),w()}get index(){return this.$$.ctx[5]}set index(e){this.$$set({index:e}),w()}get isMobile(){return this.$$.ctx[6]}set isMobile(e){this.$$set({isMobile:e}),w()}get onEvent(){return this.$$.ctx[7]}set onEvent(e){this.$$set({onEvent:e}),w()}}const F1=(t,e,i)=>rt(t,e,e==="style"?V1(i):i),U1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,V1=t=>t.split(U1).map(e=>e+" !important").join(";");function W1(t){let e,i,n,a;const l=t[9].default,g=gs(l,t,t[8],null);return{c(){e=F("div"),g&&g.c(),F1(e,"class","hoverable")},m(p,_){se(p,e,_),g&&g.m(e,null),i=!0,n||(a=[ge(e,"mouseenter",t[1]),ge(e,"mouseleave",t[2]),ge(e,"mousemove",function(){Cn(t[0]!==1/0&&t[3])&&(t[0]!==1/0&&t[3]).apply(this,arguments)})],n=!0)},p(p,[_]){t=p,g&&g.p&&(!i||_&256)&&ms(g,l,t,t[8],i?vs(l,t[8],_,null):ps(t[8]),null)},i(p){i||(J(g,p),i=!0)},o(p){ae(g,p),i=!1},d(p){p&&te(e),g&&g.d(p),n=!1,Mt(a)}}}function j1(t,e,i){let{$$slots:n={},$$scope:a}=e,{exitDelay:l=0}=e,{idleDelay:g=1/0}=e,{isHovering:p=!1}=e,_=!0,k=!0,T,C;const U=()=>{T&&clearTimeout(T),C&&clearTimeout(C),i(6,_=!1),i(7,k=!1)},V=()=>{T&&clearTimeout(T),i(6,_=!1),T=setTimeout(()=>i(6,_=!0),l)},N=()=>{C&&clearTimeout(C),i(7,k=!1),C=setTimeout(()=>i(7,k=!0),g)};return Kh(()=>{T&&clearTimeout(T),C&&clearTimeout(C)}),t.$$set=Q=>{"exitDelay"in Q&&i(5,l=Q.exitDelay),"idleDelay"in Q&&i(0,g=Q.idleDelay),"isHovering"in Q&&i(4,p=Q.isHovering),"$$scope"in Q&&i(8,a=Q.$$scope)},t.$$.update=()=>{t.$$.dirty&192&&i(4,p=!_&&!k)},[g,U,V,N,p,l,_,k,a,n]}class G1 extends tt{constructor(e){super(),et(this,e,j1,W1,Ye,{exitDelay:5,idleDelay:0,isHovering:4})}get exitDelay(){return this.$$.ctx[5]}set exitDelay(e){this.$$set({exitDelay:e}),w()}get idleDelay(){return this.$$.ctx[0]}set idleDelay(e){this.$$set({idleDelay:e}),w()}get isHovering(){return this.$$.ctx[4]}set isHovering(e){this.$$set({isHovering:e}),w()}}const Y6="",z1=(t,e,i)=>rt(t,e,e==="style"?K1(i):i),H1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,K1=t=>t.split(H1).map(e=>e+" !important").join(";");function Y1(t){let e,i;const n=t[7].default,a=gs(n,t,t[6],null);return{c(){e=F("div"),a&&a.c(),z1(e,"class","visibility svelte-1exdg3")},m(l,g){se(l,e,g),a&&a.m(e,null),t[8](e),i=!0},p(l,[g]){a&&a.p&&(!i||g&64)&&ms(a,n,l,l[6],i?vs(n,l[6],g,null):ps(l[6]),null)},i(l){i||(J(a,l),i=!0)},o(l){ae(a,l),i=!1},d(l){l&&te(e),a&&a.d(l),t[8](null)}}}function q1(t,e,i){let{$$slots:n={},$$scope:a}=e,l,{enabled:g=!1}=e,{relativeY:p=void 0}=e,{absoluteY:_=void 0}=e,{isVisible:k=void 0}=e,{onEvent:T=()=>{}}=e;const C=([V])=>{i(1,p=V.boundingClientRect.y),i(2,_=p+window.scrollY),k!==V.isIntersecting&&(i(3,k=V.isIntersecting),T(qe({type:"VisibilityChanged",description:"The player was scrolled into or out of view.",initiatedBy:"user",isVisible:k})))};Ko(()=>{if(!g||typeof IntersectionObserver=="undefined")return;const V=new IntersectionObserver(C,{threshold:.5});return V.observe(l),()=>{V.unobserve(l),C([{isIntersecting:!0,boundingClientRect:{y:1/0}}])}});function U(V){Ne[V?"unshift":"push"](()=>{l=V,i(0,l)})}return t.$$set=V=>{"enabled"in V&&i(4,g=V.enabled),"relativeY"in V&&i(1,p=V.relativeY),"absoluteY"in V&&i(2,_=V.absoluteY),"isVisible"in V&&i(3,k=V.isVisible),"onEvent"in V&&i(5,T=V.onEvent),"$$scope"in V&&i(6,a=V.$$scope)},[l,p,_,k,g,T,a,n,U]}class X1 extends tt{constructor(e){super(),et(this,e,q1,Y1,Ye,{enabled:4,relativeY:1,absoluteY:2,isVisible:3,onEvent:5})}get enabled(){return this.$$.ctx[4]}set enabled(e){this.$$set({enabled:e}),w()}get relativeY(){return this.$$.ctx[1]}set relativeY(e){this.$$set({relativeY:e}),w()}get absoluteY(){return this.$$.ctx[2]}set absoluteY(e){this.$$set({absoluteY:e}),w()}get isVisible(){return this.$$.ctx[3]}set isVisible(e){this.$$set({isVisible:e}),w()}get onEvent(){return this.$$.ctx[5]}set onEvent(e){this.$$set({onEvent:e}),w()}}const Z1=({playerStyle:t,width:e})=>t==="standard"&&e<380||t==="large"&&e<380||t==="video"&&e<480||t==="screen"&&e<640,J1=({playerStyle:t,position:e,isMobile:i,isAdvert:n})=>t==="screen"||t==="large"&&i?"symmetrical":t==="standard"&&e==="left"?"left-to-right":t==="standard"&&i||t==="standard"&&e==="right"&&n?"right-to-left":t==="standard"&&e==="right"?"left-to-right-but-swap-ends":t==="small"&&e==="left"?"left-to-right":t==="small"&&e==="right"?"right-to-left":t==="video"&&e==="left"?"left-to-right":t==="video"&&i||t==="video"&&e==="right"?"right-to-left":"left-to-right",Q1=["small","standard","large","screen","video"],cl=t=>Q1.indexOf(t)!==-1,$1=()=>document.fullscreenEnabled||document.webkitFullscreenEnabled,ey=t=>{t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()},ty=()=>{document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},sc=()=>document.fullscreenElement||document.webkitCurrentFullScreenElement,q6="",za=(t,e,i)=>Mi(t,e,i,1),cn=(t,e,i)=>rt(t,e,e==="style"?ry(i):i),iy=/;(?!([^()]*\([^()]*\))*[^()]*\))/,ry=t=>t.split(iy).map(e=>e+" !important").join(";");function ac(t){let e,i,n,a,l,g,p,_,k,T;function C(N){t[73](N)}let U={exitDelay:t[28]?500:0,idleDelay:t[19]?3e3:1/0,$$slots:{default:[fy]},$$scope:{ctx:t}};t[18]!==void 0&&(U.isHovering=t[18]),i=new G1({props:U}),Ne.push(()=>Ze(i,"isHovering",C));let V=t[37]&&pc(t);return{c(){e=F("div"),He(i.$$.fragment),a=Ce(),V&&V.c(),cn(e,"class",l=Tu(t[35])+" svelte-19pq52p"),za(e,"width",t[45]),Wt(()=>t[74].call(e)),je(e,"mobile",t[30]),je(e,"advert_",t[25]),je(e,"hovering",t[18]),je(e,"collapsed",t[40]),je(e,"animating",t[34])},m(N,Q){se(N,e,Q),Ge(i,e,null),I(e,a),V&&V.m(e,null),g=Vh(e,t[74].bind(e)),_=!0,k||(T=ge(e,"outrostart",t[56]),k=!0)},p(N,Q){const W={};Q[0]&268435456&&(W.exitDelay=N[28]?500:0),Q[0]&524288&&(W.idleDelay=N[19]?3e3:1/0),Q[0]&2147482015|Q[1]&33529831|Q[2]&32768&&(W.$$scope={dirty:Q,ctx:N}),!n&&Q[0]&262144&&(n=!0,W.isHovering=N[18],Xe(()=>n=!1)),i.$set(W),N[37]?V?(V.p(N,Q),Q[1]&64&&J(V,1)):(V=pc(N),V.c(),J(V,1),V.m(e,null)):V&&(Lt(),ae(V,1,1,()=>{V=null}),It()),(!_||Q[1]&16&&l!==(l=Tu(N[35])+" svelte-19pq52p"))&&cn(e,"class",l),(!_||Q[1]&16384)&&za(e,"width",N[45]),(!_||Q[0]&1073741824|Q[1]&16)&&je(e,"mobile",N[30]),(!_||Q[0]&33554432|Q[1]&16)&&je(e,"advert_",N[25]),(!_||Q[0]&262144|Q[1]&16)&&je(e,"hovering",N[18]),(!_||Q[1]&528)&&je(e,"collapsed",N[40]),(!_||Q[1]&24)&&je(e,"animating",N[34])},i(N){_||(J(i.$$.fragment,N),J(V),Wt(()=>{_&&(p||(p=Du(e,t[44],{},!0)),p.run(1))}),_=!0)},o(N){ae(i.$$.fragment,N),ae(V),p||(p=Du(e,t[44],{},!1)),p.run(0),_=!1},d(N){N&&te(e),ze(i),V&&V.d(),g(),N&&p&&p.end(),k=!1,T()}}}function oc(t){let e,i;return{c(){e=F("div"),cn(e,"class","video-placeholder svelte-19pq52p"),cn(e,"style",i=t[43]?`background-image: url(${t[43]})`:"")},m(n,a){se(n,e,a)},p(n,a){a[1]&4096&&i!==(i=n[43]?`background-image: url(${n[43]})`:"")&&cn(e,"style",i)},d(n){n&&te(e)}}}function lc(t){let e,i;return e=new E_({props:{onEvent:t[15],src:t[42],href:t[41],scale:t[24]&&!t[30]?1.5:1}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&2048&&(l.src=n[42]),a[1]&1024&&(l.href=n[41]),a[0]&1090519040&&(l.scale=n[24]&&!n[30]?1.5:1),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function uc(t){let e,i,n,a,l;return i=new Qu({props:{title:t[7],visible:!t[25],playerStyle:t[3],scale:t[24]?2:1,color:t[52]}}),a=new ll({props:{title:t[29].title,maxLines:t[30]||t[24]?3:1,center:t[24],scale:t[24]?2:1,maxWidth:t[24]&&!t[30]?640:t[24]?320:null,color:t[52]}}),{c(){e=F("div"),He(i.$$.fragment),n=Ce(),He(a.$$.fragment),cn(e,"class","summary svelte-19pq52p")},m(g,p){se(g,e,p),Ge(i,e,null),I(e,n),Ge(a,e,null),l=!0},p(g,p){const _={};p[0]&128&&(_.title=g[7]),p[0]&33554432&&(_.visible=!g[25]),p[0]&8&&(_.playerStyle=g[3]),p[0]&16777216&&(_.scale=g[24]?2:1),p[1]&2097152&&(_.color=g[52]),i.$set(_);const k={};p[0]&536870912&&(k.title=g[29].title),p[0]&1090519040&&(k.maxLines=g[30]||g[24]?3:1),p[0]&16777216&&(k.center=g[24]),p[0]&16777216&&(k.scale=g[24]?2:1),p[0]&1090519040&&(k.maxWidth=g[24]&&!g[30]?640:g[24]?320:null),p[1]&2097152&&(k.color=g[52]),a.$set(k)},i(g){l||(J(i.$$.fragment,g),J(a.$$.fragment,g),l=!0)},o(g){ae(i.$$.fragment,g),ae(a.$$.fragment,g),l=!1},d(g){g&&te(e),ze(i),ze(a)}}}function ny(t){let e,i;return e=new tm({props:{onEvent:t[15],isPlaying:t[54],scale:t[49],color:t[50]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&8388608&&(l.isPlaying=n[54]),a[1]&262144&&(l.scale=n[49]),a[1]&524288&&(l.color=n[50]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function sy(t){let e,i;return e=new z_({props:{onEvent:t[15],progress:t[53],enabled:t[24]||t[22],bold:t[22],scale:t[49],color:t[32],$$slots:{default:[ny]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&4194304&&(l.progress=n[53]),a[0]&20971520&&(l.enabled=n[24]||n[22]),a[0]&4194304&&(l.bold=n[22]),a[1]&262144&&(l.scale=n[49]),a[1]&2&&(l.color=n[32]),a[0]&32768|a[1]&9175040|a[2]&32768&&(l.$$scope={dirty:a,ctx:n}),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function cc(t){let e,i;return e=new Qu({props:{title:t[4]||bi("listenToThisArticle"),visible:!t[25],playerStyle:t[3],collapsible:t[28],collapsed:t[40],color:t[52]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&16&&(l.title=n[4]||bi("listenToThisArticle")),a[0]&33554432&&(l.visible=!n[25]),a[0]&8&&(l.playerStyle=n[3]),a[0]&268435456&&(l.collapsible=n[28]),a[1]&512&&(l.collapsed=n[40]),a[1]&2097152&&(l.color=n[52]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function dc(t){let e,i,n,a,l,g;return e=new am({props:{onEvent:t[15],speed:t[13],scale:t[31],color:t[19]?t[50]:t[52]}}),n=new Cm({props:{onEvent:t[15],style:t[33],scale:t[31],color:t[50]}}),l=new Qm({props:{onEvent:t[15],style:t[33],scale:t[31],color:t[50]}}),{c(){He(e.$$.fragment),i=Ce(),He(n.$$.fragment),a=Ce(),He(l.$$.fragment)},m(p,_){Ge(e,p,_),se(p,i,_),Ge(n,p,_),se(p,a,_),Ge(l,p,_),g=!0},p(p,_){const k={};_[0]&32768&&(k.onEvent=p[15]),_[0]&8192&&(k.speed=p[13]),_[1]&1&&(k.scale=p[31]),_[0]&524288|_[1]&2621440&&(k.color=p[19]?p[50]:p[52]),e.$set(k);const T={};_[0]&32768&&(T.onEvent=p[15]),_[1]&4&&(T.style=p[33]),_[1]&1&&(T.scale=p[31]),_[1]&524288&&(T.color=p[50]),n.$set(T);const C={};_[0]&32768&&(C.onEvent=p[15]),_[1]&4&&(C.style=p[33]),_[1]&1&&(C.scale=p[31]),_[1]&524288&&(C.color=p[50]),l.$set(C)},i(p){g||(J(e.$$.fragment,p),J(n.$$.fragment,p),J(l.$$.fragment,p),g=!0)},o(p){ae(e.$$.fragment,p),ae(n.$$.fragment,p),ae(l.$$.fragment,p),g=!1},d(p){ze(e,p),p&&te(i),ze(n,p),p&&te(a),ze(l,p)}}}function fc(t){let e,i;return e=new ll({props:{title:t[29].title,maxLines:1,bold:!0,scale:1.2,flex:.52,color:t[52]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&536870912&&(l.title=n[29].title),a[1]&2097152&&(l.color=n[52]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function hc(t){let e,i;return e=new N_({props:{onEvent:t[15],progress:t[53],fullWidth:t[19],readonly:t[25],color:t[32]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&4194304&&(l.progress=n[53]),a[0]&524288&&(l.fullWidth=n[19]),a[0]&33554432&&(l.readonly=n[25]),a[1]&2&&(l.color=n[32]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function gc(t){let e,i,n,a;return e=new Hp({props:{onEvent:t[15],href:t[14].clickThroughUrl,playerStyle:t[3],scale:t[24]&&!t[30]?2:t[24]?1.6:1,controlsOrder:t[20],color:t[19]?"rgba(250, 250, 250, 0.8)":t[52],largeImage:t[42],isMobile:t[30]}}),n=new n_({props:{onEvent:t[15],href:t[14].clickThroughUrl,playerStyle:t[3],scale:t[31],controlsOrder:t[20],color:t[50]}}),{c(){He(e.$$.fragment),i=Ce(),He(n.$$.fragment)},m(l,g){Ge(e,l,g),se(l,i,g),Ge(n,l,g),a=!0},p(l,g){const p={};g[0]&32768&&(p.onEvent=l[15]),g[0]&16384&&(p.href=l[14].clickThroughUrl),g[0]&8&&(p.playerStyle=l[3]),g[0]&1090519040&&(p.scale=l[24]&&!l[30]?2:l[24]?1.6:1),g[0]&1048576&&(p.controlsOrder=l[20]),g[0]&524288|g[1]&2097152&&(p.color=l[19]?"rgba(250, 250, 250, 0.8)":l[52]),g[1]&2048&&(p.largeImage=l[42]),g[0]&1073741824&&(p.isMobile=l[30]),e.$set(p);const _={};g[0]&32768&&(_.onEvent=l[15]),g[0]&16384&&(_.href=l[14].clickThroughUrl),g[0]&8&&(_.playerStyle=l[3]),g[1]&1&&(_.scale=l[31]),g[0]&1048576&&(_.controlsOrder=l[20]),g[1]&524288&&(_.color=l[50]),n.$set(_)},i(l){a||(J(e.$$.fragment,l),J(n.$$.fragment,l),a=!0)},o(l){ae(e.$$.fragment,l),ae(n.$$.fragment,l),a=!1},d(l){ze(e,l),l&&te(i),ze(n,l)}}}function vc(t){let e,i;return e=new bp({props:{playerStyle:t[3],isMobile:t[30],isAdvert:t[25],scale:t[31],$$slots:{default:[uy]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&8&&(l.playerStyle=n[3]),a[0]&1073741824&&(l.isMobile=n[30]),a[0]&33554432&&(l.isAdvert=n[25]),a[1]&1&&(l.scale=n[31]),a[0]&554205192|a[1]&524385|a[2]&32768&&(l.$$scope={dirty:a,ctx:n}),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function ay(t){let e,i;return e=new vp({props:{onEvent:t[15],scale:t[31],color:t[50],playlistShowing:t[37],playerStyle:t[3]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&1&&(l.scale=n[31]),a[1]&524288&&(l.color=n[50]),a[1]&64&&(l.playlistShowing=n[37]),a[0]&8&&(l.playerStyle=n[3]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function oy(t){let e,i;return e=new y_({props:{onEvent:t[15],scale:t[31],href:t[29].sourceUrl,color:t[50]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&1&&(l.scale=n[31]),a[0]&536870912&&(l.href=n[29].sourceUrl),a[1]&524288&&(l.color=n[50]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function ly(t){let e,i;return e=new Lp({props:{onEvent:t[15],scale:t[31],color:t[50]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&1&&(l.scale=n[31]),a[1]&524288&&(l.color=n[50]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function uy(t){let e,i,n,a,l;const g=[ly,oy,ay],p=[];function _(k,T){return T[0]&524288&&(e=null),e==null&&(e=!!(k[19]&&$1())),e?0:k[24]&&k[29].sourceUrl?1:k[36]?2:-1}return~(i=_(t,[-1,-1,-1]))&&(n=p[i]=g[i](t)),{c(){n&&n.c(),a=Zn()},m(k,T){~i&&p[i].m(k,T),se(k,a,T),l=!0},p(k,T){let C=i;i=_(k,T),i===C?~i&&p[i].p(k,T):(n&&(Lt(),ae(p[C],1,1,()=>{p[C]=null}),It()),~i?(n=p[i],n?n.p(k,T):(n=p[i]=g[i](k),n.c()),J(n,1),n.m(a.parentNode,a)):n=null)},i(k){l||(J(n),l=!0)},o(k){ae(n),l=!1},d(k){~i&&p[i].d(k),k&&te(a)}}}function mc(t){let e,i,n,a;const l=[dy,cy],g=[];function p(_,k){return _[39]?0:1}return i=p(t),n=g[i]=l[i](t),{c(){e=F("div"),n.c(),cn(e,"class","end svelte-19pq52p")},m(_,k){se(_,e,k),g[i].m(e,null),a=!0},p(_,k){let T=i;i=p(_),i===T?g[i].p(_,k):(Lt(),ae(g[T],1,1,()=>{g[T]=null}),It(),n=g[i],n?n.p(_,k):(n=g[i]=l[i](_),n.c()),J(n,1),n.m(e,null))},i(_){a||(J(n),a=!0)},o(_){ae(n),a=!1},d(_){_&&te(e),g[i].d()}}}function cy(t){let e,i;return e=new g_({props:{onEvent:t[15],scale:t[48],visible:t[24]||t[18]||t[54]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&131072&&(l.scale=n[48]),a[0]&17039360|a[1]&8388608&&(l.visible=n[24]||n[18]||n[54]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function dy(t){let e,i;return e=new Vp({props:{onEvent:t[15],scale:t[47],margin:t[46],color:t[50]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&65536&&(l.scale=n[47]),a[1]&32768&&(l.margin=n[46]),a[1]&524288&&(l.color=n[50]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function fy(t){let e,i,n,a,l,g,p,_,k,T,C,U,V,N,Q,W,ue,ie,be,Se,fe,pe=t[19]&&(t[43]||!t[16])&&oc(t),Z=t[42]&&(t[55]||t[24])&&lc(t),L=(t[55]||t[24])&&uc(t);function le(q){t[70](q)}function z(q){t[71](q)}function Ke(q){t[72](q)}let Ie={onEvent:t[15],enabled:!t[8],$$slots:{default:[sy]},$$scope:{ctx:t}};t[0]!==void 0&&(Ie.isVisible=t[0]),t[1]!==void 0&&(Ie.relativeY=t[1]),t[2]!==void 0&&(Ie.absoluteY=t[2]),g=new X1({props:Ie}),Ne.push(()=>Ze(g,"isVisible",le)),Ne.push(()=>Ze(g,"relativeY",z)),Ne.push(()=>Ze(g,"absoluteY",Ke));let Ee=(t[26]&&t[27]||t[22])&&cc(t),ke=(!t[22]&&!t[27]&&!t[25]||t[24]&&t[25])&&dc(t),G=t[26]&&t[8]&&!t[27]&&!t[25]&&t[17]>720&&t[20]!=="left-to-right-but-swap-ends"&&fc(t);N=new m1({props:{currentTime:t[12],duration:t[11],playerStyle:t[3],isAdvert:t[25],isMobile:t[30],isStopped:t[27],positionClasses:t[21],collapsed:t[40],largeImage:t[42],color:t[19]?t[50]:t[52]}});let X=(t[26]&&!t[30]&&!t[27]||t[55]&&!t[30]||t[19]&&!t[27])&&hc(t),B=t[25]&&!t[23]&&gc(t),Ue=!t[27]&&vc(t),De=(t[39]||t[38])&&mc(t);return{c(){pe&&pe.c(),e=Ce(),i=F("div"),Z&&Z.c(),n=Ce(),L&&L.c(),a=Ce(),l=F("div"),He(g.$$.fragment),T=Ce(),Ee&&Ee.c(),C=Ce(),ke&&ke.c(),U=Ce(),G&&G.c(),V=Ce(),He(N.$$.fragment),Q=Ce(),X&&X.c(),W=Ce(),B&&B.c(),ue=Ce(),Ue&&Ue.c(),ie=Ce(),De&&De.c(),cn(l,"class","controls svelte-19pq52p"),cn(i,"class","main svelte-19pq52p"),za(i,"background",t[19]?"transparent":t[51]),je(i,"no-image",!t[42])},m(q,ve){pe&&pe.m(q,ve),se(q,e,ve),se(q,i,ve),Z&&Z.m(i,null),I(i,n),L&&L.m(i,null),I(i,a),I(i,l),Ge(g,l,null),I(l,T),Ee&&Ee.m(l,null),I(l,C),ke&&ke.m(l,null),I(l,U),G&&G.m(l,null),I(l,V),Ge(N,l,null),I(l,Q),X&&X.m(l,null),I(l,W),B&&B.m(l,null),I(l,ue),Ue&&Ue.m(l,null),I(i,ie),De&&De.m(i,null),be=!0,Se||(fe=[ge(i,"mousedown",t[57]),ge(i,"keyup",null)],Se=!0)},p(q,ve){q[19]&&(q[43]||!q[16])?pe?pe.p(q,ve):(pe=oc(q),pe.c(),pe.m(e.parentNode,e)):pe&&(pe.d(1),pe=null),q[42]&&(q[55]||q[24])?Z?(Z.p(q,ve),ve[0]&16777216|ve[1]&16779264&&J(Z,1)):(Z=lc(q),Z.c(),J(Z,1),Z.m(i,n)):Z&&(Lt(),ae(Z,1,1,()=>{Z=null}),It()),q[55]||q[24]?L?(L.p(q,ve),ve[0]&16777216|ve[1]&16777216&&J(L,1)):(L=uc(q),L.c(),J(L,1),L.m(i,a)):L&&(Lt(),ae(L,1,1,()=>{L=null}),It());const at={};ve[0]&32768&&(at.onEvent=q[15]),ve[0]&256&&(at.enabled=!q[8]),ve[0]&21004288|ve[1]&13369346|ve[2]&32768&&(at.$$scope={dirty:ve,ctx:q}),!p&&ve[0]&1&&(p=!0,at.isVisible=q[0],Xe(()=>p=!1)),!_&&ve[0]&2&&(_=!0,at.relativeY=q[1],Xe(()=>_=!1)),!k&&ve[0]&4&&(k=!0,at.absoluteY=q[2],Xe(()=>k=!1)),g.$set(at),q[26]&&q[27]||q[22]?Ee?(Ee.p(q,ve),ve[0]&205520896&&J(Ee,1)):(Ee=cc(q),Ee.c(),J(Ee,1),Ee.m(l,C)):Ee&&(Lt(),ae(Ee,1,1,()=>{Ee=null}),It()),!q[22]&&!q[27]&&!q[25]||q[24]&&q[25]?ke?(ke.p(q,ve),ve[0]&188743680&&J(ke,1)):(ke=dc(q),ke.c(),J(ke,1),ke.m(l,U)):ke&&(Lt(),ae(ke,1,1,()=>{ke=null}),It()),q[26]&&q[8]&&!q[27]&&!q[25]&&q[17]>720&&q[20]!=="left-to-right-but-swap-ends"?G?(G.p(q,ve),ve[0]&236060928&&J(G,1)):(G=fc(q),G.c(),J(G,1),G.m(l,V)):G&&(Lt(),ae(G,1,1,()=>{G=null}),It());const Qe={};ve[0]&4096&&(Qe.currentTime=q[12]),ve[0]&2048&&(Qe.duration=q[11]),ve[0]&8&&(Qe.playerStyle=q[3]),ve[0]&33554432&&(Qe.isAdvert=q[25]),ve[0]&1073741824&&(Qe.isMobile=q[30]),ve[0]&134217728&&(Qe.isStopped=q[27]),ve[0]&2097152&&(Qe.positionClasses=q[21]),ve[1]&512&&(Qe.collapsed=q[40]),ve[1]&2048&&(Qe.largeImage=q[42]),ve[0]&524288|ve[1]&2621440&&(Qe.color=q[19]?q[50]:q[52]),N.$set(Qe),q[26]&&!q[30]&&!q[27]||q[55]&&!q[30]||q[19]&&!q[27]?X?(X.p(q,ve),ve[0]&1275592704|ve[1]&16777216&&J(X,1)):(X=hc(q),X.c(),J(X,1),X.m(l,W)):X&&(Lt(),ae(X,1,1,()=>{X=null}),It()),q[25]&&!q[23]?B?(B.p(q,ve),ve[0]&41943040&&J(B,1)):(B=gc(q),B.c(),J(B,1),B.m(l,ue)):B&&(Lt(),ae(B,1,1,()=>{B=null}),It()),q[27]?Ue&&(Lt(),ae(Ue,1,1,()=>{Ue=null}),It()):Ue?(Ue.p(q,ve),ve[0]&134217728&&J(Ue,1)):(Ue=vc(q),Ue.c(),J(Ue,1),Ue.m(l,null)),q[39]||q[38]?De?(De.p(q,ve),ve[1]&384&&J(De,1)):(De=mc(q),De.c(),J(De,1),De.m(i,null)):De&&(Lt(),ae(De,1,1,()=>{De=null}),It()),(!be||ve[0]&524288|ve[1]&1048576)&&za(i,"background",q[19]?"transparent":q[51]),(!be||ve[1]&2048)&&je(i,"no-image",!q[42])},i(q){be||(J(Z),J(L),J(g.$$.fragment,q),J(Ee),J(ke),J(G),J(N.$$.fragment,q),J(X),J(B),J(Ue),J(De),be=!0)},o(q){ae(Z),ae(L),ae(g.$$.fragment,q),ae(Ee),ae(ke),ae(G),ae(N.$$.fragment,q),ae(X),ae(B),ae(Ue),ae(De),be=!1},d(q){pe&&pe.d(q),q&&te(e),q&&te(i),Z&&Z.d(),L&&L.d(),ze(g),Ee&&Ee.d(),ke&&ke.d(),G&&G.d(),ze(N),X&&X.d(),B&&B.d(),Ue&&Ue.d(),De&&De.d(),Se=!1,Mt(fe)}}}function pc(t){let e,i;return e=new N1({props:{onEvent:t[15],style:t[5],downloadFormats:t[6],larger:t[24]&&!t[30],content:t[9],index:t[10],isMobile:t[30],textColor:t[52],backgroundColor:t[51],iconColor:t[32]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[0]&32&&(l.style=n[5]),a[0]&64&&(l.downloadFormats=n[6]),a[0]&1090519040&&(l.larger=n[24]&&!n[30]),a[0]&512&&(l.content=n[9]),a[0]&1024&&(l.index=n[10]),a[0]&1073741824&&(l.isMobile=n[30]),a[1]&2097152&&(l.textColor=n[52]),a[1]&1048576&&(l.backgroundColor=n[51]),a[1]&2&&(l.iconColor=n[32]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function hy(t){let e=cl(t[3])&&t[9].length>0,i,n,a=e&&ac(t);return{c(){a&&a.c(),i=Zn()},m(l,g){a&&a.m(l,g),se(l,i,g),n=!0},p(l,g){g[0]&520&&(e=cl(l[3])&&l[9].length>0),e?a?(a.p(l,g),g[0]&520&&J(a,1)):(a=ac(l),a.c(),J(a,1),a.m(i.parentNode,i)):a&&(Lt(),ae(a,1,1,()=>{a=null}),It())},i(l){n||(J(a),n=!0)},o(l){ae(a),n=!1},d(l){a&&a.d(l),l&&te(i)}}}function gy(t,e,i){let n,a,l,g,p,_,k,T,C,U,V,N,Q,W,ue,ie,be,Se,fe,pe,Z,L,le,z,Ke,Ie,Ee,ke,G,X,B,Ue,De,q,ve,at,Qe,Et,Oe,{playerStyle:Te="standard"}=e,{callToAction:it=void 0}=e,{skipButtonStyle:xt="auto"}=e,{playlistStyle:wt="auto-5-4"}=e,{playlistToggle:Xt="auto"}=e,{downloadFormats:Pt=[]}=e,{playerTitle:Ht=void 0}=e,{fixedPosition:yt=void 0}=e,{fixedWidth:ft="auto"}=e,{content:Nt=[]}=e,{contentIndex:mt=0}=e,{duration:bt=0}=e,{currentTime:Zt=0}=e,{playbackState:Rt="stopped"}=e,{playbackRate:Jt=1}=e,{activeAdvert:nt=void 0}=e,{persistentAdvert:ot=void 0}=e,{textColor:li="#111"}=e,{backgroundColor:Pe="#f5f5f5"}=e,{iconColor:Dt="black"}=e,{logoIconEnabled:Ft=!0}=e,{onEvent:Ot=()=>{}}=e,{videoIsBehind:Ut=!1}=e,{isVisible:jt=void 0}=e,{relativeY:ci=void 0}=e,{absoluteY:Kt=void 0}=e,Yt,mi,Vt;const ct=()=>{Vt&&clearTimeout(Vt),i(34,Vt=setTimeout(()=>i(34,Vt=null),500))},di=me=>{!p||!(me.button===0)||!me.target.classList.contains("main")||Ot(qe({type:"PressedVideoBackground",description:"The video background was pressed.",initiatedBy:"user"}))};function Be(me){jt=me,i(0,jt)}function fi(me){ci=me,i(1,ci)}function Qt(me){Kt=me,i(2,Kt)}function Je(me){mi=me,i(18,mi)}function pi(){Yt=this.clientWidth,i(17,Yt)}return t.$$set=me=>{"playerStyle"in me&&i(3,Te=me.playerStyle),"callToAction"in me&&i(4,it=me.callToAction),"skipButtonStyle"in me&&i(58,xt=me.skipButtonStyle),"playlistStyle"in me&&i(5,wt=me.playlistStyle),"playlistToggle"in me&&i(59,Xt=me.playlistToggle),"downloadFormats"in me&&i(6,Pt=me.downloadFormats),"playerTitle"in me&&i(7,Ht=me.playerTitle),"fixedPosition"in me&&i(8,yt=me.fixedPosition),"fixedWidth"in me&&i(60,ft=me.fixedWidth),"content"in me&&i(9,Nt=me.content),"contentIndex"in me&&i(10,mt=me.contentIndex),"duration"in me&&i(11,bt=me.duration),"currentTime"in me&&i(12,Zt=me.currentTime),"playbackState"in me&&i(61,Rt=me.playbackState),"playbackRate"in me&&i(13,Jt=me.playbackRate),"activeAdvert"in me&&i(14,nt=me.activeAdvert),"persistentAdvert"in me&&i(62,ot=me.persistentAdvert),"textColor"in me&&i(63,li=me.textColor),"backgroundColor"in me&&i(64,Pe=me.backgroundColor),"iconColor"in me&&i(65,Dt=me.iconColor),"logoIconEnabled"in me&&i(66,Ft=me.logoIconEnabled),"onEvent"in me&&i(15,Ot=me.onEvent),"videoIsBehind"in me&&i(16,Ut=me.videoIsBehind),"isVisible"in me&&i(0,jt=me.isVisible),"relativeY"in me&&i(1,ci=me.relativeY),"absoluteY"in me&&i(2,Kt=me.absoluteY)},t.$$.update=()=>{t.$$.dirty[0]&8&&i(22,n=Te==="small"),t.$$.dirty[0]&8&&i(26,a=Te==="standard"),t.$$.dirty[0]&8&&i(55,l=Te==="large"),t.$$.dirty[0]&8&&i(24,g=Te==="screen"),t.$$.dirty[0]&8&&i(19,p=Te==="video"),t.$$.dirty[1]&1073741824&&i(54,_=Rt==="playing"),t.$$.dirty[1]&1073741824,t.$$.dirty[1]&1073741824&&i(27,k=Rt==="stopped"),t.$$.dirty[0]&134234112&&i(25,T=nt&&!k),t.$$.dirty[0]&512&&i(67,C=Nt.length>1),t.$$.dirty[0]&131080&&i(30,U=Z1({playerStyle:Te,width:Yt})),t.$$.dirty[0]&1536&&i(29,V=Nt[mt]||{}),t.$$.dirty[0]&6144&&i(53,N=Zt/bt),t.$$.dirty[0]&33570816|t.$$.dirty[2]&2&&i(52,Q=T&&(nt==null?void 0:nt.textColor)||li),t.$$.dirty[0]&33570816|t.$$.dirty[2]&4&&i(51,W=T&&(nt==null?void 0:nt.backgroundColor)||Pe),t.$$.dirty[0]&33570816|t.$$.dirty[2]&8&&i(32,ue=T&&(nt==null?void 0:nt.iconColor)||Dt),t.$$.dirty[1]&134217728|t.$$.dirty[2]&32&&i(33,ie=xt==="auto"?C?"tracks":"segments":xt),t.$$.dirty[1]&4,t.$$.dirty[0]&524288|t.$$.dirty[1]&2&&i(50,be=p?"rgba(250, 250, 250, 0.8)":ue),t.$$.dirty[0]&1095237888&&i(31,Se=n||p&&yt?.8:g&&!U?2:1),t.$$.dirty[0]&151519232|t.$$.dirty[1]&1&&i(49,fe=Se*(g?1.5:p&&k?2:1)),t.$$.dirty[0]&1091043328&&i(48,pe=g&&!U?3:g?2:p&&!U?1.5:1),t.$$.dirty[0]&1091043328&&i(47,Z=g&&!U?2.5:g?1.75:p&&!U?2:p?1.5:1),t.$$.dirty[0]&1090519040&&i(46,L=g&&!U?"12px 0":g?"4px 0":"auto"),t.$$.dirty[0]&4194304|t.$$.dirty[1]&536870912&&i(45,le=ft==="auto"?n?"fit-content":"":ft),t.$$.dirty[0]&67109120&&i(69,z=yt==="auto"?a?"center":"right":yt),t.$$.dirty[0]&256|t.$$.dirty[2]&128&&i(21,Ke=yt?`fixed fixed-${z}`:""),t.$$.dirty[0]&71303424&&i(44,Ie=me=>yt&&Fv(me,{y:n||a?40:100})),t.$$.dirty[0]&1107296264|t.$$.dirty[2]&128&&i(20,Ee=J1({playerStyle:Te,position:z,isMobile:U,isAdvert:T})),t.$$.dirty[0]&671088640&&i(43,ke=k?V.imageUrl:null),t.$$.dirty[0]&704659456|t.$$.dirty[2]&1&&i(42,G=T&&nt.imageUrl||!k&&(ot==null?void 0:ot.imageUrl)||V.imageUrl),t.$$.dirty[0]&167788544|t.$$.dirty[2]&1&&i(41,X=T&&nt.clickThroughUrl||!k&&(ot==null?void 0:ot.clickThroughUrl)),t.$$.dirty[0]&4194560|t.$$.dirty[1]&536870912&&i(28,B=n&&yt&&ft==="auto"),t.$$.dirty[0]&4194304|t.$$.dirty[1]&536870912&&i(23,Ue=n&&(ft===0||ft==="0")),t.$$.dirty[0]&444858368&&i(40,De=Ue||B&&!T&&!k&&!mi),t.$$.dirty[0]&104857856&&i(39,q=yt&&!n&&!(a&&T)),t.$$.dirty[0]&62914816|t.$$.dirty[2]&16&&i(38,ve=Ft&&(!T||g)&&!(yt&&n)&&!Ue),t.$$.dirty[0]&32&&i(68,at=wt.split("-")),t.$$.dirty[0]&4194304|t.$$.dirty[2]&96&&i(37,Qe=(at[0]==="show"||at[0]==="auto"&&C)&&!n),t.$$.dirty[0]&4194304|t.$$.dirty[1]&268435456|t.$$.dirty[2]&32&&i(36,Et=(Xt==="show"||Xt==="auto"&&C)&&!n),t.$$.dirty[0]&3145736|t.$$.dirty[1]&1073741824&&i(35,Oe=`user-interface ${Te} ${Rt} ${Ke} ${Ee}`),t.$$.dirty[0]&256&&yt&&ct()},[jt,ci,Kt,Te,it,wt,Pt,Ht,yt,Nt,mt,bt,Zt,Jt,nt,Ot,Ut,Yt,mi,p,Ee,Ke,n,Ue,g,T,a,k,B,V,U,Se,ue,ie,Vt,Oe,Et,Qe,ve,q,De,X,G,ke,Ie,le,L,Z,pe,fe,be,W,Q,N,_,l,ct,di,xt,Xt,ft,Rt,ot,li,Pe,Dt,Ft,C,at,z,Be,fi,Qt,Je,pi]}class dl extends tt{constructor(e){super(),et(this,e,gy,hy,Ye,{playerStyle:3,callToAction:4,skipButtonStyle:58,playlistStyle:5,playlistToggle:59,downloadFormats:6,playerTitle:7,fixedPosition:8,fixedWidth:60,content:9,contentIndex:10,duration:11,currentTime:12,playbackState:61,playbackRate:13,activeAdvert:14,persistentAdvert:62,textColor:63,backgroundColor:64,iconColor:65,logoIconEnabled:66,onEvent:15,videoIsBehind:16,isVisible:0,relativeY:1,absoluteY:2},null,[-1,-1,-1])}get playerStyle(){return this.$$.ctx[3]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get callToAction(){return this.$$.ctx[4]}set callToAction(e){this.$$set({callToAction:e}),w()}get skipButtonStyle(){return this.$$.ctx[58]}set skipButtonStyle(e){this.$$set({skipButtonStyle:e}),w()}get playlistStyle(){return this.$$.ctx[5]}set playlistStyle(e){this.$$set({playlistStyle:e}),w()}get playlistToggle(){return this.$$.ctx[59]}set playlistToggle(e){this.$$set({playlistToggle:e}),w()}get downloadFormats(){return this.$$.ctx[6]}set downloadFormats(e){this.$$set({downloadFormats:e}),w()}get playerTitle(){return this.$$.ctx[7]}set playerTitle(e){this.$$set({playerTitle:e}),w()}get fixedPosition(){return this.$$.ctx[8]}set fixedPosition(e){this.$$set({fixedPosition:e}),w()}get fixedWidth(){return this.$$.ctx[60]}set fixedWidth(e){this.$$set({fixedWidth:e}),w()}get content(){return this.$$.ctx[9]}set content(e){this.$$set({content:e}),w()}get contentIndex(){return this.$$.ctx[10]}set contentIndex(e){this.$$set({contentIndex:e}),w()}get duration(){return this.$$.ctx[11]}set duration(e){this.$$set({duration:e}),w()}get currentTime(){return this.$$.ctx[12]}set currentTime(e){this.$$set({currentTime:e}),w()}get playbackState(){return this.$$.ctx[61]}set playbackState(e){this.$$set({playbackState:e}),w()}get playbackRate(){return this.$$.ctx[13]}set playbackRate(e){this.$$set({playbackRate:e}),w()}get activeAdvert(){return this.$$.ctx[14]}set activeAdvert(e){this.$$set({activeAdvert:e}),w()}get persistentAdvert(){return this.$$.ctx[62]}set persistentAdvert(e){this.$$set({persistentAdvert:e}),w()}get textColor(){return this.$$.ctx[63]}set textColor(e){this.$$set({textColor:e}),w()}get backgroundColor(){return this.$$.ctx[64]}set backgroundColor(e){this.$$set({backgroundColor:e}),w()}get iconColor(){return this.$$.ctx[65]}set iconColor(e){this.$$set({iconColor:e}),w()}get logoIconEnabled(){return this.$$.ctx[66]}set logoIconEnabled(e){this.$$set({logoIconEnabled:e}),w()}get onEvent(){return this.$$.ctx[15]}set onEvent(e){this.$$set({onEvent:e}),w()}get videoIsBehind(){return this.$$.ctx[16]}set videoIsBehind(e){this.$$set({videoIsBehind:e}),w()}get isVisible(){return this.$$.ctx[0]}set isVisible(e){this.$$set({isVisible:e}),w()}get relativeY(){return this.$$.ctx[1]}set relativeY(e){this.$$set({relativeY:e}),w()}get absoluteY(){return this.$$.ctx[2]}set absoluteY(e){this.$$set({absoluteY:e}),w()}}const X6="",vy=(t,e,i)=>rt(t,e,e==="style"?py(i):i),my=/;(?!([^()]*\([^()]*\))*[^()]*\))/,py=t=>t.split(my).map(e=>e+" !important").join(";");function _y(t){let e,i;const n=t[4].default,a=gs(n,t,t[3],null);return{c(){e=F("div"),a&&a.c(),vy(e,"class","external-widget svelte-18ldhih")},m(l,g){se(l,e,g),a&&a.m(e,null),t[5](e),i=!0},p(l,[g]){a&&a.p&&(!i||g&8)&&ms(a,n,l,l[3],i?vs(n,l[3],g,null):ps(l[3]),null)},i(l){i||(J(a,l),i=!0)},o(l){ae(a,l),i=!1},d(l){l&&te(e),a&&a.d(l),t[5](null)}}}function yy(t,e,i){let n,{$$slots:a={},$$scope:l}=e,{root:g=void 0}=e,p;function _(k){Ne[k?"unshift":"push"](()=>{p=k,i(0,p)})}return t.$$set=k=>{"root"in k&&i(1,g=k.root),"$$scope"in k&&i(3,l=k.$$scope)},t.$$.update=()=>{var k;t.$$.dirty&2&&i(2,n=typeof g=="string"?null:g),t.$$.dirty&5&&n&&p&&n.appendChild(p),t.$$.dirty&4&&((k=n==null?void 0:n.classList)==null||k.add("beyondwords-widget","bwp"))},[p,g,n,l,a,_]}class fl extends tt{constructor(e){super(),et(this,e,yy,_y,Ye,{root:1})}get root(){return this.$$.ctx[1]}set root(e){this.$$set({root:e}),w()}}const Z6="",ee=(t,e,i)=>rt(t,e,e==="style"?Sy(i):i),by=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Sy=t=>t.split(by).map(e=>e+" !important").join(";");function _c(t,e,i){const n=t.slice();return n[84]=e[i],n[86]=i,n}function yc(t,e,i){const n=t.slice();return n[84]=e[i],n[86]=i,n}function bc(t,e,i){const n=t.slice();return n[84]=e[i],n[86]=i,n}function ky(t,e,i){const n=t.slice();return n[89]=e[i],n}function Sc(t,e,i){const n=t.slice();return n[84]=e[i],n[86]=i,n}function kc(t){let e,i,n,a=t[84].placement+"",l,g;return{c(){e=F("option"),i=Le(t[86]),n=Le(" ("),l=Le(a),g=Le(")"),e.__value=t[86],e.value=e.__value},m(p,_){se(p,e,_),I(e,i),I(e,n),I(e,l),I(e,g)},p(p,_){_[1]&1024&&a!==(a=p[84].placement+"")&&gr(l,a)},d(p){p&&te(e)}}}function Ty(t){let e,i,n;return{c(){e=F("option"),i=Le(t[89]),n=Le("-oclock"),e.__value=t[89]+"-oclock",e.value=e.__value},m(a,l){se(a,e,l),I(e,i),I(e,n)},p:oe,d(a){a&&te(e)}}}function Tc(t){let e,i,n,a,l,g,p,_,k,T,C,U,V,N,Q,W,ue,ie,be,Se,fe,pe,Z,L,le,z,Ke,Ie,Ee,ke,G,X,B,Ue,De,q,ve,at,Qe,Et,Oe,Te,it,xt,wt,Xt,Pt,Ht,yt,ft,Nt,mt,bt,Zt,Rt,Jt,nt,ot,li,Pe,Dt,Ft,Ot,Ut,jt,ci,Kt,Yt,mi,Vt,ct,di,Be,fi,Qt,Je,pi,me,$t,hi,_i,wi,yi,Ei,Fe,Y,$,Me,_r,ji,Qr,si,yr,Ji,Qi,Gi,ur,xr,Ii,Ri,cr,wr,zi,Si,Hi,Di=t[39],ei=[];for(let H=0;H<Di.length;H+=1)ei[H]=Ec(bc(t,Di,H));let Ki=t[40],ti=[];for(let H=0;H<Ki.length;H+=1)ti[H]=Ac(yc(t,Ki,H));let br=t[41],ii=[];for(let H=0;H<br.length;H+=1)ii[H]=xc(_c(t,br,H));return{c(){e=F("br"),i=Ce(),n=F("strong"),n.textContent="Advanced settings:",a=Ce(),l=F("br"),g=F("br"),p=Ce(),_=F("div"),k=Le(`projectId:
|
|
28
|
+
opacity: ${_-T*W}`}}const Gr=(t,e,i)=>rt(t,e,e==="style"?Vv(i):i),Uv=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Vv=t=>t.split(Uv).map(e=>e+" !important").join(";");function Wv(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),Gr(i,"fill",t[1]),Gr(i,"d","M14 0.666748C6.63996 0.666748 0.666626 6.64008 0.666626 14.0001C0.666626 21.3601 6.63996 27.3334 14 27.3334C21.36 27.3334 27.3333 21.3601 27.3333 14.0001C27.3333 6.64008 21.36 0.666748 14 0.666748ZM11.3333 18.6667V9.33341C11.3333 8.78675 11.96 8.46675 12.4 8.80008L18.6266 13.4667C18.9866 13.7334 18.9866 14.2667 18.6266 14.5334L12.4 19.2001C11.96 19.5334 11.3333 19.2134 11.3333 18.6667Z"),Gr(e,"width",n=40*t[0]),Gr(e,"height",a=40*t[0]),Gr(e,"viewBox","0.6667 0.6667 26.6667 26.6667"),Gr(e,"fill","none"),Gr(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,[g]){g&2&&Gr(i,"fill",l[1]),g&1&&n!==(n=40*l[0])&&Gr(e,"width",n),g&1&&a!==(a=40*l[0])&&Gr(e,"height",a)},i:oe,o:oe,d(l){l&&te(e)}}}function jv(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class Gv extends tt{constructor(e){super(),et(this,e,jv,Wv,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const zr=(t,e,i)=>rt(t,e,e==="style"?Hv(i):i),zv=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Hv=t=>t.split(zv).map(e=>e+" !important").join(";");function Kv(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),zr(i,"fill",t[1]),zr(i,"d","M14 0.666748C6.63996 0.666748 0.666626 6.64008 0.666626 14.0001C0.666626 21.3601 6.63996 27.3334 14 27.3334C21.36 27.3334 27.3333 21.3601 27.3333 14.0001C27.3333 6.64008 21.36 0.666748 14 0.666748ZM11.3333 19.3334C10.6 19.3334 9.99996 18.7334 9.99996 18.0001V10.0001C9.99996 9.26675 10.6 8.66675 11.3333 8.66675C12.0666 8.66675 12.6666 9.26675 12.6666 10.0001V18.0001C12.6666 18.7334 12.0666 19.3334 11.3333 19.3334ZM16.6666 19.3334C15.9333 19.3334 15.3333 18.7334 15.3333 18.0001V10.0001C15.3333 9.26675 15.9333 8.66675 16.6666 8.66675C17.4 8.66675 18 9.26675 18 10.0001V18.0001C18 18.7334 17.4 19.3334 16.6666 19.3334Z"),zr(e,"width",n=40*t[0]),zr(e,"height",a=40*t[0]),zr(e,"viewBox","0.6667 0.6667 26.6667 26.6667"),zr(e,"fill","none"),zr(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,[g]){g&2&&zr(i,"fill",l[1]),g&1&&n!==(n=40*l[0])&&zr(e,"width",n),g&1&&a!==(a=40*l[0])&&zr(e,"height",a)},i:oe,o:oe,d(l){l&&te(e)}}}function Yv(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class qv extends tt{constructor(e){super(),et(this,e,Yv,Kv,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const k6="",zu=(t,e,i)=>Mi(t,e,i,1),ks=(t,e,i)=>rt(t,e,e==="style"?Zv(i):i),Xv=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Zv=t=>t.split(Xv).map(e=>e+" !important").join(";");function Jv(t){let e,i;return e=new Gv({props:{scale:t[2],color:t[3]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&4&&(l.scale=n[2]),a&8&&(l.color=n[3]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function Qv(t){let e,i;return e=new qv({props:{scale:t[2],color:t[3]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&4&&(l.scale=n[2]),a&8&&(l.color=n[3]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function $v(t){let e,i,n,a,l,g;const p=[Qv,Jv],_=[];function k(T,C){return T[0]?0:1}return i=k(t),n=_[i]=p[i](t),{c(){e=F("button"),n.c(),ks(e,"type","button"),ks(e,"class","play-pause-button svelte-1dxzkq6"),ks(e,"tabindex",t[1]),zu(e,"outline-offset",3.2*t[2]+"px"),ks(e,"aria-label",t[4])},m(T,C){se(T,e,C),_[i].m(e,null),a=!0,l||(g=[ge(e,"click",t[5]),ge(e,"mouseup",Zi)],l=!0)},p(T,[C]){let U=i;i=k(T),i===U?_[i].p(T,C):(Lt(),ae(_[U],1,1,()=>{_[U]=null}),It(),n=_[i],n?n.p(T,C):(n=_[i]=p[i](T),n.c()),J(n,1),n.m(e,null)),(!a||C&2)&&ks(e,"tabindex",T[1]),(!a||C&4)&&zu(e,"outline-offset",3.2*T[2]+"px"),(!a||C&16)&&ks(e,"aria-label",T[4])},i(T){a||(J(n),a=!0)},o(T){ae(n),a=!1},d(T){T&&te(e),_[i].d(),l=!1,Mt(g)}}}function em(t,e,i){let n,{isPlaying:a=!1}=e,{tabindex:l=0}=e,{scale:g=1}=e,{color:p="#323232"}=e,{onEvent:_=()=>{}}=e;const k=T=>{T.preventDefault();const C=a?"Pause":"Play";_(qe({type:`Pressed${C}`,description:`The ${C.toLowerCase()} button was pressed.`,initiatedBy:"user"}))};return t.$$set=T=>{"isPlaying"in T&&i(0,a=T.isPlaying),"tabindex"in T&&i(1,l=T.tabindex),"scale"in T&&i(2,g=T.scale),"color"in T&&i(3,p=T.color),"onEvent"in T&&i(6,_=T.onEvent)},t.$$.update=()=>{t.$$.dirty&1&&i(4,n=bi(a?"pauseAudio":"playAudio"))},[a,l,g,p,n,k,_]}class tm extends tt{constructor(e){super(),et(this,e,em,$v,Ye,{isPlaying:0,tabindex:1,scale:2,color:3,onEvent:6})}get isPlaying(){return this.$$.ctx[0]}set isPlaying(e){this.$$set({isPlaying:e}),w()}get tabindex(){return this.$$.ctx[1]}set tabindex(e){this.$$set({tabindex:e}),w()}get scale(){return this.$$.ctx[2]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[3]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[6]}set onEvent(e){this.$$set({onEvent:e}),w()}}const T6="",In=(t,e,i)=>Mi(t,e,i,1),Ra=(t,e,i)=>rt(t,e,e==="style"?rm(i):i),im=/;(?!([^()]*\([^()]*\))*[^()]*\))/,rm=t=>t.split(im).map(e=>e+" !important").join(";");function nm(t){let e,i,n,a,l,g;return{c(){e=F("button"),i=F("span"),n=Le(t[0]),a=Le("x"),In(i,"font-size",t[2]),In(i,"color",t[1]),Ra(i,"class","svelte-8srhgk"),Ra(e,"type","button"),Ra(e,"class","speed-button svelte-8srhgk"),In(e,"width",t[3]),In(e,"height",t[3]),Ra(e,"aria-label",bi("changePlaybackSpeed"))},m(p,_){se(p,e,_),I(e,i),I(i,n),I(i,a),l||(g=[ge(e,"click",t[4]),ge(e,"mouseup",Zi),ge(e,"keydown",t[5])],l=!0)},p(p,[_]){_&1&&gr(n,p[0]),_&4&&In(i,"font-size",p[2]),_&2&&In(i,"color",p[1]),_&8&&In(e,"width",p[3]),_&8&&In(e,"height",p[3])},i:oe,o:oe,d(p){p&&te(e),l=!1,Mt(g)}}}function sm(t,e,i){let n,a,{speed:l=1}=e,{scale:g=1}=e,{color:p="#323232"}=e,{onEvent:_=()=>{}}=e;const k=()=>{_(qe({type:"PressedChangeSpeed",description:"The change speed button was pressed.",initiatedBy:"user"}))},T=C=>{let U;C.key==="ArrowLeft"&&(U="Left"),C.key==="ArrowRight"&&(U="Right"),C.key==="ArrowDown"&&(U="Down"),C.key==="ArrowUp"&&(U="Up"),C.key===" "&&(U="Space"),C.key==="Enter"&&(U="Enter"),U&&(C.preventDefault(),_(qe({type:`Pressed${U}OnChangeSpeed`,description:`The ${U.toLowerCase()} key was pressed while change speed was focussed.`,initiatedBy:"user"})))};return t.$$set=C=>{"speed"in C&&i(0,l=C.speed),"scale"in C&&i(6,g=C.scale),"color"in C&&i(1,p=C.color),"onEvent"in C&&i(7,_=C.onEvent)},t.$$.update=()=>{t.$$.dirty&64&&i(3,n=`${40*g}px`),t.$$.dirty&64&&i(2,a=`${12*g}px`)},[l,p,a,n,k,T,g,_]}class am extends tt{constructor(e){super(),et(this,e,sm,nm,Ye,{speed:0,scale:6,color:1,onEvent:7})}get speed(){return this.$$.ctx[0]}set speed(e){this.$$set({speed:e}),w()}get scale(){return this.$$.ctx[6]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[7]}set onEvent(e){this.$$set({onEvent:e}),w()}}const E6="",Fi=(t,e,i)=>rt(t,e,e==="style"?lm(i):i),om=/;(?!([^()]*\([^()]*\))*[^()]*\))/,lm=t=>t.split(om).map(e=>e+" !important").join(";");function um(t){let e,i,n,a,l,g;return{c(){e=$e("svg"),i=$e("path"),n=$e("text"),a=Le(t[2]),Fi(i,"fill",t[1]),Fi(i,"d","M12.3035 28.3333C9.12574 28.3333 6.39796 27.2778 4.12019 25.1667C1.84241 23.0556 0.581297 20.4444 0.336852 17.3333C0.31463 17.0667 0.397963 16.8333 0.586852 16.6333C0.775741 16.4333 1.01463 16.3333 1.30352 16.3333C1.57019 16.3333 1.79796 16.4278 1.98685 16.6167C2.17574 16.8056 2.29241 17.0444 2.33685 17.3333C2.5813 19.8889 3.64796 22.0278 5.53685 23.75C7.42574 25.4722 9.6813 26.3333 12.3035 26.3333C15.0813 26.3333 17.4424 25.3611 19.3869 23.4167C21.3313 21.4722 22.3035 19.1111 22.3035 16.3333C22.3035 13.5556 21.3591 11.1944 19.4702 9.25C17.5813 7.30555 15.248 6.33333 12.4702 6.33333H11.7369L13.4702 8.06666C13.6702 8.26666 13.7702 8.5 13.7702 8.76666C13.7702 9.03333 13.6702 9.26666 13.4702 9.46666C13.2702 9.66666 13.0369 9.76666 12.7702 9.76666C12.5035 9.76666 12.2702 9.66666 12.0702 9.46666L8.57019 5.96666C8.45907 5.85555 8.3813 5.74444 8.33685 5.63333C8.29241 5.52222 8.27019 5.4 8.27019 5.26666C8.27019 5.13333 8.29241 5.01111 8.33685 4.9C8.3813 4.78889 8.45907 4.67777 8.57019 4.56666L12.1035 1.03333C12.2813 0.855551 12.5035 0.766663 12.7702 0.766663C13.0369 0.766663 13.2702 0.855551 13.4702 1.03333C13.648 1.23333 13.7369 1.46666 13.7369 1.73333C13.7369 2 13.648 2.22222 13.4702 2.4L11.5369 4.33333H12.3035C13.9702 4.33333 15.5313 4.64444 16.9869 5.26666C18.4424 5.88889 19.7146 6.74444 20.8035 7.83333C21.8924 8.92222 22.748 10.1944 23.3702 11.65C23.9924 13.1056 24.3035 14.6667 24.3035 16.3333C24.3035 18 23.9924 19.5611 23.3702 21.0167C22.748 22.4722 21.8924 23.7444 20.8035 24.8333C19.7146 25.9222 18.4424 26.7778 16.9869 27.4C15.5313 28.0222 13.9702 28.3333 12.3035 28.3333Z"),Fi(n,"fill",t[1]),Fi(n,"x","36%"),Fi(n,"y","46%"),Fi(n,"dominant-baseline","middle"),Fi(n,"text-anchor","middle"),Fi(n,"class","svelte-1xysf6z"),Fi(e,"width",l=40*t[0]),Fi(e,"height",g=40*t[0]),Fi(e,"viewBox","-5 -5 35 39"),Fi(e,"fill","none"),Fi(e,"xmlns","http://www.w3.org/2000/svg")},m(p,_){se(p,e,_),I(e,i),I(e,n),I(n,a)},p(p,[_]){_&2&&Fi(i,"fill",p[1]),_&4&&gr(a,p[2]),_&2&&Fi(n,"fill",p[1]),_&1&&l!==(l=40*p[0])&&Fi(e,"width",l),_&1&&g!==(g=40*p[0])&&Fi(e,"height",g)},i:oe,o:oe,d(p){p&&te(e)}}}function cm(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e,{seconds:l=10}=e;return t.$$set=g=>{"scale"in g&&i(0,n=g.scale),"color"in g&&i(1,a=g.color),"seconds"in g&&i(2,l=g.seconds)},[n,a,l]}class dm extends tt{constructor(e){super(),et(this,e,cm,um,Ye,{scale:0,color:1,seconds:2})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get seconds(){return this.$$.ctx[2]}set seconds(e){this.$$set({seconds:e}),w()}}const Hr=(t,e,i)=>rt(t,e,e==="style"?hm(i):i),fm=/;(?!([^()]*\([^()]*\))*[^()]*\))/,hm=t=>t.split(fm).map(e=>e+" !important").join(";");function gm(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),Hr(i,"fill",t[1]),Hr(i,"d","M1.25 7.29901C0.249999 6.72166 0.250001 5.27828 1.25 4.70093L8.75 0.370802C9.75 -0.206548 11 0.51514 11 1.66984V10.3301C11 11.4848 9.75 12.2065 8.75 11.6291L1.25 7.29901Z"),Hr(e,"width",n=40*t[0]),Hr(e,"height",a=40*t[0]),Hr(e,"viewBox","-12 -12 35 36"),Hr(e,"fill","none"),Hr(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,[g]){g&2&&Hr(i,"fill",l[1]),g&1&&n!==(n=40*l[0])&&Hr(e,"width",n),g&1&&a!==(a=40*l[0])&&Hr(e,"height",a)},i:oe,o:oe,d(l){l&&te(e)}}}function vm(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class mm extends tt{constructor(e){super(),et(this,e,vm,gm,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const vr=(t,e,i)=>rt(t,e,e==="style"?_m(i):i),pm=/;(?!([^()]*\([^()]*\))*[^()]*\))/,_m=t=>t.split(pm).map(e=>e+" !important").join(";");function ym(t){let e,i,n,a,l;return{c(){e=$e("svg"),i=$e("path"),n=$e("path"),vr(i,"fill",t[1]),vr(i,"d","M0 1C0 0.447716 0.447715 0 1 0C1.55228 0 2 0.447715 2 1V13C2 13.5523 1.55228 14 1 14C0.447715 14 0 13.5523 0 13V1Z"),vr(n,"fill",t[1]),vr(n,"d","M7.25 8.29904C6.25 7.72169 6.25 6.27831 7.25 5.70096L14.75 1.37083C15.75 0.793484 17 1.51517 17 2.66987V11.3301C17 12.4848 15.75 13.2065 14.75 12.6292L7.25 8.29904Z"),vr(e,"width",a=40*t[0]),vr(e,"height",l=40*t[0]),vr(e,"viewBox","-10 -10 37 34"),vr(e,"fill","none"),vr(e,"xmlns","http://www.w3.org/2000/svg")},m(g,p){se(g,e,p),I(e,i),I(e,n)},p(g,[p]){p&2&&vr(i,"fill",g[1]),p&2&&vr(n,"fill",g[1]),p&1&&a!==(a=40*g[0])&&vr(e,"width",a),p&1&&l!==(l=40*g[0])&&vr(e,"height",l)},i:oe,o:oe,d(g){g&&te(e)}}}function bm(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class Sm extends tt{constructor(e){super(),et(this,e,bm,ym,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const A6="",Da=(t,e,i)=>rt(t,e,e==="style"?Tm(i):i),km=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Tm=t=>t.split(km).map(e=>e+" !important").join(";");function Em(t){let e,i;return e=new Sm({props:{scale:t[0],color:t[1]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&1&&(l.scale=n[0]),a&2&&(l.color=n[1]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function Am(t){let e,i;return e=new mm({props:{scale:t[0],color:t[1]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&1&&(l.scale=n[0]),a&2&&(l.color=n[1]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function xm(t){let e,i;return e=new dm({props:{seconds:t[3],scale:t[0],color:t[1]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&8&&(l.seconds=n[3]),a&1&&(l.scale=n[0]),a&2&&(l.color=n[1]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function wm(t){let e,i,n,a,l,g;const p=[xm,Am,Em],_=[];function k(T,C){return T[4]?0:T[5]?1:T[2]?2:-1}return~(i=k(t))&&(n=_[i]=p[i](t)),{c(){e=F("button"),n&&n.c(),Da(e,"type","button"),Da(e,"class","prev-button svelte-tawm7k"),Da(e,"aria-label",t[6])},m(T,C){se(T,e,C),~i&&_[i].m(e,null),a=!0,l||(g=[ge(e,"click",t[7]),ge(e,"mouseup",Zi)],l=!0)},p(T,[C]){let U=i;i=k(T),i===U?~i&&_[i].p(T,C):(n&&(Lt(),ae(_[U],1,1,()=>{_[U]=null}),It()),~i?(n=_[i],n?n.p(T,C):(n=_[i]=p[i](T),n.c()),J(n,1),n.m(e,null)):n=null),(!a||C&64)&&Da(e,"aria-label",T[6])},i(T){a||(J(n),a=!0)},o(T){ae(n),a=!1},d(T){T&&te(e),~i&&_[i].d(),l=!1,Mt(g)}}}function Pm(t,e,i){let n,a,l,g,{style:p="segments"}=e,{scale:_=1}=e,{color:k="#323232"}=e,{onEvent:T=()=>{}}=e,C;const U=()=>{let V,N,Q;a?(V="PressedPrevSegment",N="The previous segment button was pressed."):l?(V="PressedSeekBack",N="The seek backward button was pressed.",Q={seconds:n}):g&&(V="PressedPrevTrack",N="The previous track button was pressed."),T(qe(de({type:V,description:N,initiatedBy:"user"},Q)))};return t.$$set=V=>{"style"in V&&i(8,p=V.style),"scale"in V&&i(0,_=V.scale),"color"in V&&i(1,k=V.color),"onEvent"in V&&i(9,T=V.onEvent)},t.$$.update=()=>{t.$$.dirty&256&&i(3,n=p.split("-")[1]||10),t.$$.dirty&264&&p.split("-")[2],t.$$.dirty&256&&i(5,a=p==="segments"),t.$$.dirty&256&&i(4,l=p.startsWith("seconds")),t.$$.dirty&256&&i(2,g=p==="tracks"),t.$$.dirty&52&&(l?i(6,C=bi("seekBack")):a?i(6,C=bi("previousSegment")):g&&i(6,C=bi("previousTrack")))},[_,k,g,n,l,a,C,U,p,T]}class Cm extends tt{constructor(e){super(),et(this,e,Pm,wm,Ye,{style:8,scale:0,color:1,onEvent:9})}get style(){return this.$$.ctx[8]}set style(e){this.$$set({style:e}),w()}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[9]}set onEvent(e){this.$$set({onEvent:e}),w()}}const x6="",Ui=(t,e,i)=>rt(t,e,e==="style"?Im(i):i),Lm=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Im=t=>t.split(Lm).map(e=>e+" !important").join(";");function Rm(t){let e,i,n,a,l,g;return{c(){e=$e("svg"),i=$e("path"),n=$e("text"),a=Le(t[2]),Ui(i,"fill",t[1]),Ui(i,"d","M12.5 28.3333C10.8333 28.3333 9.27222 28.0167 7.81667 27.3833C6.36111 26.75 5.09444 25.8944 4.01667 24.8167C2.93889 23.7389 2.08333 22.4722 1.45 21.0167C0.816667 19.5611 0.5 18 0.5 16.3333C0.5 14.6667 0.816667 13.1056 1.45 11.65C2.08333 10.1944 2.93889 8.92777 4.01667 7.85C5.09444 6.77222 6.36111 5.91666 7.81667 5.28333C9.27222 4.65 10.8333 4.33333 12.5 4.33333H13.2667L11.3333 2.4C11.1556 2.22222 11.0722 1.99444 11.0833 1.71666C11.0944 1.43888 11.1889 1.21111 11.3667 1.03333C11.5444 0.855551 11.7722 0.766663 12.05 0.766663C12.3278 0.766663 12.5556 0.855551 12.7333 1.03333L16.2333 4.56666C16.4333 4.76666 16.5333 5 16.5333 5.26666C16.5333 5.53333 16.4333 5.76666 16.2333 5.96666L12.7333 9.46666C12.5333 9.66666 12.2944 9.76666 12.0167 9.76666C11.7389 9.76666 11.5111 9.66666 11.3333 9.46666C11.1333 9.26666 11.0389 9.03333 11.05 8.76666C11.0611 8.5 11.1667 8.26666 11.3667 8.06666L13.1 6.33333H12.3333C9.57778 6.33333 7.25 7.30555 5.35 9.25C3.45 11.1944 2.5 13.5556 2.5 16.3333C2.5 19.1111 3.47222 21.4722 5.41667 23.4167C7.36111 25.3611 9.72222 26.3333 12.5 26.3333C15.0778 26.3333 17.3222 25.4722 19.2333 23.75C21.1444 22.0278 22.2222 19.8889 22.4667 17.3333C22.5111 17.0444 22.6278 16.8056 22.8167 16.6167C23.0056 16.4278 23.2333 16.3333 23.5 16.3333C23.7889 16.3333 24.0278 16.4333 24.2167 16.6333C24.4056 16.8333 24.4889 17.0667 24.4667 17.3333C24.2222 20.4667 22.95 23.0833 20.65 25.1833C18.35 27.2833 15.6333 28.3333 12.5 28.3333Z"),Ui(n,"fill",t[1]),Ui(n,"x","36%"),Ui(n,"y","46%"),Ui(n,"dominant-baseline","middle"),Ui(n,"text-anchor","middle"),Ui(n,"class","svelte-1xysf6z"),Ui(e,"width",l=40*t[0]),Ui(e,"height",g=40*t[0]),Ui(e,"viewBox","-5 -5 35 39"),Ui(e,"fill","none"),Ui(e,"xmlns","http://www.w3.org/2000/svg")},m(p,_){se(p,e,_),I(e,i),I(e,n),I(n,a)},p(p,[_]){_&2&&Ui(i,"fill",p[1]),_&4&&gr(a,p[2]),_&2&&Ui(n,"fill",p[1]),_&1&&l!==(l=40*p[0])&&Ui(e,"width",l),_&1&&g!==(g=40*p[0])&&Ui(e,"height",g)},i:oe,o:oe,d(p){p&&te(e)}}}function Dm(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e,{seconds:l=10}=e;return t.$$set=g=>{"scale"in g&&i(0,n=g.scale),"color"in g&&i(1,a=g.color),"seconds"in g&&i(2,l=g.seconds)},[n,a,l]}class Om extends tt{constructor(e){super(),et(this,e,Dm,Rm,Ye,{scale:0,color:1,seconds:2})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get seconds(){return this.$$.ctx[2]}set seconds(e){this.$$set({seconds:e}),w()}}const Kr=(t,e,i)=>rt(t,e,e==="style"?Mm(i):i),Bm=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Mm=t=>t.split(Bm).map(e=>e+" !important").join(";");function Nm(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),Kr(i,"fill",t[1]),Kr(i,"d","M9.75 4.70093C10.75 5.27828 10.75 6.72166 9.75 7.29901L2.25 11.6291C1.25 12.2065 0 11.4848 0 10.3301V1.66984C0 0.515139 1.25 -0.206548 2.25 0.370802L9.75 4.70093Z"),Kr(e,"width",n=40*t[0]),Kr(e,"height",a=40*t[0]),Kr(e,"viewBox","-12 -12 35 36"),Kr(e,"fill","none"),Kr(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,[g]){g&2&&Kr(i,"fill",l[1]),g&1&&n!==(n=40*l[0])&&Kr(e,"width",n),g&1&&a!==(a=40*l[0])&&Kr(e,"height",a)},i:oe,o:oe,d(l){l&&te(e)}}}function Fm(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class Um extends tt{constructor(e){super(),et(this,e,Fm,Nm,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const mr=(t,e,i)=>rt(t,e,e==="style"?Wm(i):i),Vm=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Wm=t=>t.split(Vm).map(e=>e+" !important").join(";");function jm(t){let e,i,n,a,l;return{c(){e=$e("svg"),i=$e("path"),n=$e("path"),mr(i,"fill",t[1]),mr(i,"d","M17 13C17 13.5523 16.5523 14 16 14C15.4477 14 15 13.5523 15 13V1C15 0.447716 15.4477 0 16 0C16.5523 0 17 0.447715 17 1V13Z"),mr(n,"fill",t[1]),mr(n,"d","M9.75 5.70096C10.75 6.27831 10.75 7.72169 9.75 8.29904L2.25 12.6292C1.25 13.2065 0 12.4848 0 11.3301V2.66987C0 1.51517 1.25 0.793485 2.25 1.37083L9.75 5.70096Z"),mr(e,"width",a=40*t[0]),mr(e,"height",l=40*t[0]),mr(e,"viewBox","-10 -10 37 34"),mr(e,"fill","none"),mr(e,"xmlns","http://www.w3.org/2000/svg")},m(g,p){se(g,e,p),I(e,i),I(e,n)},p(g,[p]){p&2&&mr(i,"fill",g[1]),p&2&&mr(n,"fill",g[1]),p&1&&a!==(a=40*g[0])&&mr(e,"width",a),p&1&&l!==(l=40*g[0])&&mr(e,"height",l)},i:oe,o:oe,d(g){g&&te(e)}}}function Gm(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class zm extends tt{constructor(e){super(),et(this,e,Gm,jm,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const w6="",Oa=(t,e,i)=>rt(t,e,e==="style"?Km(i):i),Hm=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Km=t=>t.split(Hm).map(e=>e+" !important").join(";");function Ym(t){let e,i;return e=new zm({props:{scale:t[0],color:t[1]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&1&&(l.scale=n[0]),a&2&&(l.color=n[1]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function qm(t){let e,i;return e=new Um({props:{scale:t[0],color:t[1]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&1&&(l.scale=n[0]),a&2&&(l.color=n[1]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function Xm(t){let e,i;return e=new Om({props:{seconds:t[6],scale:t[0],color:t[1]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&64&&(l.seconds=n[6]),a&1&&(l.scale=n[0]),a&2&&(l.color=n[1]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function Zm(t){let e,i,n,a,l,g;const p=[Xm,qm,Ym],_=[];function k(T,C){return T[3]?0:T[4]?1:T[2]?2:-1}return~(i=k(t))&&(n=_[i]=p[i](t)),{c(){e=F("button"),n&&n.c(),Oa(e,"type","button"),Oa(e,"class","next-button svelte-1ukrri8"),Oa(e,"aria-label",t[5])},m(T,C){se(T,e,C),~i&&_[i].m(e,null),a=!0,l||(g=[ge(e,"click",t[7]),ge(e,"mouseup",Zi)],l=!0)},p(T,[C]){let U=i;i=k(T),i===U?~i&&_[i].p(T,C):(n&&(Lt(),ae(_[U],1,1,()=>{_[U]=null}),It()),~i?(n=_[i],n?n.p(T,C):(n=_[i]=p[i](T),n.c()),J(n,1),n.m(e,null)):n=null),(!a||C&32)&&Oa(e,"aria-label",T[5])},i(T){a||(J(n),a=!0)},o(T){ae(n),a=!1},d(T){T&&te(e),~i&&_[i].d(),l=!1,Mt(g)}}}function Jm(t,e,i){let n,a,l,g,p,{style:_="segments"}=e,{scale:k=1}=e,{color:T="#323232"}=e,{onEvent:C=()=>{}}=e,U;const V=()=>{let N,Q,W;l?(N="PressedNextSegment",Q="The next segment button was pressed."):g?(N="PressedSeekAhead",Q="The seek ahead button was pressed.",W={seconds:a}):p&&(N="PressedNextTrack",Q="The next track button was pressed."),C(qe(de({type:N,description:Q,initiatedBy:"user"},W)))};return t.$$set=N=>{"style"in N&&i(8,_=N.style),"scale"in N&&i(0,k=N.scale),"color"in N&&i(1,T=N.color),"onEvent"in N&&i(9,C=N.onEvent)},t.$$.update=()=>{t.$$.dirty&256&&i(10,n=parseFloat(_.split("-")[1]||10)),t.$$.dirty&1280&&i(6,a=parseFloat(_.split("-")[2]||n)),t.$$.dirty&256&&i(4,l=_==="segments"),t.$$.dirty&256&&i(3,g=_.startsWith("seconds")),t.$$.dirty&256&&i(2,p=_==="tracks"),t.$$.dirty&28&&(g?i(5,U=bi("seekAhead")):l?i(5,U=bi("nextSegment")):p&&i(5,U=bi("nextTrack")))},[k,T,p,g,l,U,a,V,_,C,n]}class Qm extends tt{constructor(e){super(),et(this,e,Jm,Zm,Ye,{style:8,scale:0,color:1,onEvent:9})}get style(){return this.$$.ctx[8]}set style(e){this.$$set({style:e}),w()}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[9]}set onEvent(e){this.$$set({onEvent:e}),w()}}const ar=(t,e,i)=>rt(t,e,e==="style"?ep(i):i),$m=/;(?!([^()]*\([^()]*\))*[^()]*\))/,ep=t=>t.split($m).map(e=>e+" !important").join(";");function tp(t){let e,i,n,a,l,g;return{c(){e=$e("svg"),i=$e("path"),n=$e("g"),a=$e("path"),ar(i,"fill",t[1]),ar(i,"d","M1.33332 1.33333C1.14443 1.33333 0.986101 1.26944 0.858323 1.14167C0.730545 1.01389 0.666656 0.855556 0.666656 0.666667C0.666656 0.477778 0.730545 0.319444 0.858323 0.191667C0.986101 0.0638889 1.14443 0 1.33332 0H7.99999C8.18888 0 8.34721 0.0638889 8.47499 0.191667C8.60277 0.319444 8.66666 0.477778 8.66666 0.666667C8.66666 0.855556 8.60277 1.01389 8.47499 1.14167C8.34721 1.26944 8.18888 1.33333 7.99999 1.33333H1.33332ZM1.33332 4C1.14443 4 0.986101 3.93611 0.858323 3.80833C0.730545 3.68056 0.666656 3.52222 0.666656 3.33333C0.666656 3.14444 0.730545 2.98611 0.858323 2.85833C0.986101 2.73056 1.14443 2.66667 1.33332 2.66667H7.99999C8.18888 2.66667 8.34721 2.73056 8.47499 2.85833C8.60277 2.98611 8.66666 3.14444 8.66666 3.33333C8.66666 3.52222 8.60277 3.68056 8.47499 3.80833C8.34721 3.93611 8.18888 4 7.99999 4H1.33332ZM1.33332 6.66667C1.14443 6.66667 0.986101 6.60278 0.858323 6.475C0.730545 6.34722 0.666656 6.18889 0.666656 6C0.666656 5.81111 0.730545 5.65278 0.858323 5.525C0.986101 5.39722 1.14443 5.33333 1.33332 5.33333H5.33332C5.52221 5.33333 5.68055 5.39722 5.80832 5.525C5.9361 5.65278 5.99999 5.81111 5.99999 6C5.99999 6.18889 5.9361 6.34722 5.80832 6.475C5.68055 6.60278 5.52221 6.66667 5.33332 6.66667H1.33332Z"),ar(a,"fill",t[1]),ar(a,"d","M10.3667 9.31667C10.1444 9.47222 9.91666 9.48333 9.68332 9.35C9.44999 9.21667 9.33332 9.01667 9.33332 8.75V5.91667C9.33332 5.65 9.44999 5.45 9.68332 5.31667C9.91666 5.18333 10.1444 5.19444 10.3667 5.35L12.5 6.78333C12.7 6.91667 12.8 7.1 12.8 7.33333C12.8 7.56667 12.7 7.75 12.5 7.88333L10.3667 9.31667Z"),ar(n,"transform","scale(1.05) translate(-1.7 0)"),ar(e,"width",l=20*t[0]),ar(e,"height",g=20*t[0]),ar(e,"viewBox","-0.6 -0.3 12 8"),ar(e,"fill","none"),ar(e,"xmlns","http://www.w3.org/2000/svg")},m(p,_){se(p,e,_),I(e,i),I(e,n),I(n,a)},p(p,[_]){_&2&&ar(i,"fill",p[1]),_&2&&ar(a,"fill",p[1]),_&1&&l!==(l=20*p[0])&&ar(e,"width",l),_&1&&g!==(g=20*p[0])&&ar(e,"height",g)},i:oe,o:oe,d(p){p&&te(e)}}}function ip(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class rp extends tt{constructor(e){super(),et(this,e,ip,tp,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const or=(t,e,i)=>rt(t,e,e==="style"?sp(i):i),np=/;(?!([^()]*\([^()]*\))*[^()]*\))/,sp=t=>t.split(np).map(e=>e+" !important").join(";");function ap(t){let e,i,n,a,l,g;return{c(){e=$e("svg"),i=$e("path"),n=$e("g"),a=$e("path"),or(i,"fill",t[1]),or(i,"d","M1.33332 1.33333C1.14443 1.33333 0.986101 1.26944 0.858323 1.14167C0.730545 1.01389 0.666656 0.855556 0.666656 0.666667C0.666656 0.477778 0.730545 0.319444 0.858323 0.191667C0.986101 0.0638889 1.14443 0 1.33332 0H7.99999C8.18888 0 8.34721 0.0638889 8.47499 0.191667C8.60277 0.319444 8.66666 0.477778 8.66666 0.666667C8.66666 0.855556 8.60277 1.01389 8.47499 1.14167C8.34721 1.26944 8.18888 1.33333 7.99999 1.33333H1.33332ZM1.33332 4C1.14443 4 0.986101 3.93611 0.858323 3.80833C0.730545 3.68056 0.666656 3.52222 0.666656 3.33333C0.666656 3.14444 0.730545 2.98611 0.858323 2.85833C0.986101 2.73056 1.14443 2.66667 1.33332 2.66667H7.99999C8.18888 2.66667 8.34721 2.73056 8.47499 2.85833C8.60277 2.98611 8.66666 3.14444 8.66666 3.33333C8.66666 3.52222 8.60277 3.68056 8.47499 3.80833C8.34721 3.93611 8.18888 4 7.99999 4H1.33332ZM1.33332 6.66667C1.14443 6.66667 0.986101 6.60278 0.858323 6.475C0.730545 6.34722 0.666656 6.18889 0.666656 6C0.666656 5.81111 0.730545 5.65278 0.858323 5.525C0.986101 5.39722 1.14443 5.33333 1.33332 5.33333H5.33332C5.52221 5.33333 5.68055 5.39722 5.80832 5.525C5.9361 5.65278 5.99999 5.81111 5.99999 6C5.99999 6.18889 5.9361 6.34722 5.80832 6.475C5.68055 6.60278 5.52221 6.66667 5.33332 6.66667H1.33332Z"),or(a,"fill",t[1]),or(a,"d","M7.13333 10.2C7.01111 10.0778 6.95 9.92222 6.95 9.73333C6.95 9.54444 7.01111 9.38889 7.13333 9.26667L8.4 8L7.13333 6.73333C7.01111 6.61111 6.95 6.45555 6.95 6.26667C6.95 6.07778 7.01111 5.92222 7.13333 5.8C7.25556 5.67778 7.41111 5.61667 7.6 5.61667C7.78889 5.61667 7.94444 5.67778 8.06667 5.8L9.33333 7.06667L10.6 5.8C10.7222 5.67778 10.8778 5.61667 11.0667 5.61667C11.2556 5.61667 11.4111 5.67778 11.5333 5.8C11.6556 5.92222 11.7167 6.07778 11.7167 6.26667C11.7167 6.45555 11.6556 6.61111 11.5333 6.73333L10.2667 8L11.5333 9.26667C11.6556 9.38889 11.7167 9.54444 11.7167 9.73333C11.7167 9.92222 11.6556 10.0778 11.5333 10.2C11.4111 10.3222 11.2556 10.3833 11.0667 10.3833C10.8778 10.3833 10.7222 10.3222 10.6 10.2L9.33333 8.93333L8.06667 10.2C7.94444 10.3222 7.78889 10.3833 7.6 10.3833C7.41111 10.3833 7.25556 10.3222 7.13333 10.2Z"),or(n,"transform","translate(0.3 0)"),or(e,"width",l=20*t[0]),or(e,"height",g=20*t[0]),or(e,"viewBox","-0.6 -0.3 12 8"),or(e,"fill","none"),or(e,"xmlns","http://www.w3.org/2000/svg")},m(p,_){se(p,e,_),I(e,i),I(e,n),I(n,a)},p(p,[_]){_&2&&or(i,"fill",p[1]),_&2&&or(a,"fill",p[1]),_&1&&l!==(l=20*p[0])&&or(e,"width",l),_&1&&g!==(g=20*p[0])&&or(e,"height",g)},i:oe,o:oe,d(p){p&&te(e)}}}function op(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class lp extends tt{constructor(e){super(),et(this,e,op,ap,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const P6="",Hu=(t,e,i)=>Mi(t,e,i,1),Ba=(t,e,i)=>rt(t,e,e==="style"?cp(i):i),up=/;(?!([^()]*\([^()]*\))*[^()]*\))/,cp=t=>t.split(up).map(e=>e+" !important").join(";");function dp(t){let e,i;return e=new rp({props:{scale:t[2],color:t[3]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&4&&(l.scale=n[2]),a&8&&(l.color=n[3]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function fp(t){let e,i;return e=new lp({props:{scale:t[2],color:t[3]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&4&&(l.scale=n[2]),a&8&&(l.color=n[3]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function hp(t){let e,i,n,a,l,g,p;const _=[fp,dp],k=[];function T(C,U){return C[0]?0:1}return i=T(t),n=k[i]=_[i](t),{c(){e=F("button"),n.c(),Ba(e,"type","button"),Ba(e,"class",a="playlist-button "+t[1]+" svelte-xhif6r"),Hu(e,"outline-offset",5*t[2]+"px"),Ba(e,"aria-label",bi("togglePlaylist"))},m(C,U){se(C,e,U),k[i].m(e,null),l=!0,g||(p=[ge(e,"click",t[4]),ge(e,"mouseup",Zi)],g=!0)},p(C,[U]){let V=i;i=T(C),i===V?k[i].p(C,U):(Lt(),ae(k[V],1,1,()=>{k[V]=null}),It(),n=k[i],n?n.p(C,U):(n=k[i]=_[i](C),n.c()),J(n,1),n.m(e,null)),(!l||U&2&&a!==(a="playlist-button "+C[1]+" svelte-xhif6r"))&&Ba(e,"class",a),(!l||U&4)&&Hu(e,"outline-offset",5*C[2]+"px")},i(C){l||(J(n),l=!0)},o(C){ae(n),l=!1},d(C){C&&te(e),k[i].d(),g=!1,Mt(p)}}}function gp(t,e,i){let{playlistShowing:n}=e,{playerStyle:a}=e,{scale:l=1}=e,{color:g="#323232"}=e,{onEvent:p=()=>{}}=e;const _=()=>{p(qe({type:"PressedTogglePlaylist",description:"The toggle playlist button was pressed.",initiatedBy:"user"}))};return t.$$set=k=>{"playlistShowing"in k&&i(0,n=k.playlistShowing),"playerStyle"in k&&i(1,a=k.playerStyle),"scale"in k&&i(2,l=k.scale),"color"in k&&i(3,g=k.color),"onEvent"in k&&i(5,p=k.onEvent)},[n,a,l,g,_,p]}class vp extends tt{constructor(e){super(),et(this,e,gp,hp,Ye,{playlistShowing:0,playerStyle:1,scale:2,color:3,onEvent:5})}get playlistShowing(){return this.$$.ctx[0]}set playlistShowing(e){this.$$set({playlistShowing:e}),w()}get playerStyle(){return this.$$.ctx[1]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get scale(){return this.$$.ctx[2]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[3]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[5]}set onEvent(e){this.$$set({onEvent:e}),w()}}const C6="",Ku=(t,e,i)=>Mi(t,e,i,1),Yu=(t,e,i)=>rt(t,e,e==="style"?pp(i):i),mp=/;(?!([^()]*\([^()]*\))*[^()]*\))/,pp=t=>t.split(mp).map(e=>e+" !important").join(";");function _p(t){let e,i,n;const a=t[5].default,l=gs(a,t,t[4],null);return{c(){e=F("div"),l&&l.c(),Yu(e,"class",i="secondary-button "+t[0]+" svelte-ll9nv2"),Ku(e,"--scale",t[3]),je(e,"mobile",t[1]),je(e,"advert_",t[2])},m(g,p){se(g,e,p),l&&l.m(e,null),n=!0},p(g,[p]){l&&l.p&&(!n||p&16)&&ms(l,a,g,g[4],n?vs(a,g[4],p,null):ps(g[4]),null),(!n||p&1&&i!==(i="secondary-button "+g[0]+" svelte-ll9nv2"))&&Yu(e,"class",i),(!n||p&8)&&Ku(e,"--scale",g[3]),(!n||p&3)&&je(e,"mobile",g[1]),(!n||p&5)&&je(e,"advert_",g[2])},i(g){n||(J(l,g),n=!0)},o(g){ae(l,g),n=!1},d(g){g&&te(e),l&&l.d(g)}}}function yp(t,e,i){let{$$slots:n={},$$scope:a}=e,{playerStyle:l}=e,{isMobile:g}=e,{isAdvert:p}=e,{scale:_}=e;return t.$$set=k=>{"playerStyle"in k&&i(0,l=k.playerStyle),"isMobile"in k&&i(1,g=k.isMobile),"isAdvert"in k&&i(2,p=k.isAdvert),"scale"in k&&i(3,_=k.scale),"$$scope"in k&&i(4,a=k.$$scope)},[l,g,p,_,a,n]}class bp extends tt{constructor(e){super(),et(this,e,yp,_p,Ye,{playerStyle:0,isMobile:1,isAdvert:2,scale:3})}get playerStyle(){return this.$$.ctx[0]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get isMobile(){return this.$$.ctx[1]}set isMobile(e){this.$$set({isMobile:e}),w()}get isAdvert(){return this.$$.ctx[2]}set isAdvert(e){this.$$set({isAdvert:e}),w()}get scale(){return this.$$.ctx[3]}set scale(e){this.$$set({scale:e}),w()}}const Yr=(t,e,i)=>rt(t,e,e==="style"?kp(i):i),Sp=/;(?!([^()]*\([^()]*\))*[^()]*\))/,kp=t=>t.split(Sp).map(e=>e+" !important").join(";");function Tp(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),Yr(i,"fill",t[1]),Yr(i,"d","M1.28571 24C0.914286 24 0.607143 23.8786 0.364286 23.6357C0.121429 23.3929 0 23.0857 0 22.7143V17.0143C0 16.6429 0.121429 16.3357 0.364286 16.0929C0.607143 15.85 0.914286 15.7286 1.28571 15.7286C1.65714 15.7286 1.96429 15.85 2.20714 16.0929C2.45 16.3357 2.57143 16.6429 2.57143 17.0143V21.4286H6.98571C7.35714 21.4286 7.66429 21.55 7.90714 21.7929C8.15 22.0357 8.27143 22.3429 8.27143 22.7143C8.27143 23.0857 8.15 23.3929 7.90714 23.6357C7.66429 23.8786 7.35714 24 6.98571 24H1.28571ZM1.28571 8.27143C0.914286 8.27143 0.607143 8.15 0.364286 7.90714C0.121429 7.66429 0 7.35714 0 6.98571V1.28571C0 0.914286 0.121429 0.607143 0.364286 0.364286C0.607143 0.121429 0.914286 0 1.28571 0H6.98571C7.35714 0 7.66429 0.121429 7.90714 0.364286C8.15 0.607143 8.27143 0.914286 8.27143 1.28571C8.27143 1.65714 8.15 1.96429 7.90714 2.20714C7.66429 2.45 7.35714 2.57143 6.98571 2.57143H2.57143V6.98571C2.57143 7.35714 2.45 7.66429 2.20714 7.90714C1.96429 8.15 1.65714 8.27143 1.28571 8.27143ZM17.0143 24C16.6429 24 16.3357 23.8786 16.0929 23.6357C15.85 23.3929 15.7286 23.0857 15.7286 22.7143C15.7286 22.3429 15.85 22.0357 16.0929 21.7929C16.3357 21.55 16.6429 21.4286 17.0143 21.4286H21.4286V17.0143C21.4286 16.6429 21.55 16.3357 21.7929 16.0929C22.0357 15.85 22.3429 15.7286 22.7143 15.7286C23.0857 15.7286 23.3929 15.85 23.6357 16.0929C23.8786 16.3357 24 16.6429 24 17.0143V22.7143C24 23.0857 23.8786 23.3929 23.6357 23.6357C23.3929 23.8786 23.0857 24 22.7143 24H17.0143ZM22.7143 8.27143C22.3429 8.27143 22.0357 8.15 21.7929 7.90714C21.55 7.66429 21.4286 7.35714 21.4286 6.98571V2.57143H17.0143C16.6429 2.57143 16.3357 2.45 16.0929 2.20714C15.85 1.96429 15.7286 1.65714 15.7286 1.28571C15.7286 0.914286 15.85 0.607143 16.0929 0.364286C16.3357 0.121429 16.6429 0 17.0143 0H22.7143C23.0857 0 23.3929 0.121429 23.6357 0.364286C23.8786 0.607143 24 0.914286 24 1.28571V6.98571C24 7.35714 23.8786 7.66429 23.6357 7.90714C23.3929 8.15 23.0857 8.27143 22.7143 8.27143Z"),Yr(e,"width",n=24*t[0]),Yr(e,"height",a=24*t[0]),Yr(e,"viewBox","0 0 24 24"),Yr(e,"fill","none"),Yr(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,[g]){g&2&&Yr(i,"fill",l[1]),g&1&&n!==(n=24*l[0])&&Yr(e,"width",n),g&1&&a!==(a=24*l[0])&&Yr(e,"height",a)},i:oe,o:oe,d(l){l&&te(e)}}}function Ep(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class Ap extends tt{constructor(e){super(),et(this,e,Ep,Tp,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const L6="",qu=(t,e,i)=>Mi(t,e,i,1),sl=(t,e,i)=>rt(t,e,e==="style"?wp(i):i),xp=/;(?!([^()]*\([^()]*\))*[^()]*\))/,wp=t=>t.split(xp).map(e=>e+" !important").join(";");function Pp(t){let e,i,n,a,l;return i=new Ap({props:{scale:t[0],color:t[1]}}),{c(){e=F("button"),He(i.$$.fragment),sl(e,"type","button"),sl(e,"class","maximize-button svelte-fk321i"),qu(e,"outline-offset",6.4*t[0]+"px"),sl(e,"aria-label",bi("maximizeVideo"))},m(g,p){se(g,e,p),Ge(i,e,null),n=!0,a||(l=[ge(e,"click",t[2]),ge(e,"mouseup",Zi)],a=!0)},p(g,[p]){const _={};p&1&&(_.scale=g[0]),p&2&&(_.color=g[1]),i.$set(_),(!n||p&1)&&qu(e,"outline-offset",6.4*g[0]+"px")},i(g){n||(J(i.$$.fragment,g),n=!0)},o(g){ae(i.$$.fragment,g),n=!1},d(g){g&&te(e),ze(i),a=!1,Mt(l)}}}function Cp(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e,{onEvent:l=()=>{}}=e;const g=()=>{l(qe({type:"PressedMaximize",description:"The maximize button was pressed.",initiatedBy:"user"}))};return t.$$set=p=>{"scale"in p&&i(0,n=p.scale),"color"in p&&i(1,a=p.color),"onEvent"in p&&i(3,l=p.onEvent)},[n,a,g,l]}class Lp extends tt{constructor(e){super(),et(this,e,Cp,Pp,Ye,{scale:0,color:1,onEvent:3})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[3]}set onEvent(e){this.$$set({onEvent:e}),w()}}const qr=(t,e,i)=>rt(t,e,e==="style"?Rp(i):i),Ip=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Rp=t=>t.split(Ip).map(e=>e+" !important").join(";");function Dp(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),qr(i,"fill",t[1]),qr(i,"d","M1.66873 11.1188L0.881226 10.3313L5.21248 6.00001L0.881226 1.66876L1.66873 0.881256L5.99998 5.21251L10.3312 0.881256L11.1187 1.66876L6.78748 6.00001L11.1187 10.3313L10.3312 11.1188L5.99998 6.78751L1.66873 11.1188Z"),qr(e,"width",n=12*t[0]),qr(e,"height",a=12*t[0]),qr(e,"viewBox","0 0 12 12"),qr(e,"fill","none"),qr(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,[g]){g&2&&qr(i,"fill",l[1]),g&1&&n!==(n=12*l[0])&&qr(e,"width",n),g&1&&a!==(a=12*l[0])&&qr(e,"height",a)},i:oe,o:oe,d(l){l&&te(e)}}}function Op(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class Bp extends tt{constructor(e){super(),et(this,e,Op,Dp,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const I6="",Ma=(t,e,i)=>Mi(t,e,i,1),al=(t,e,i)=>rt(t,e,e==="style"?Np(i):i),Mp=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Np=t=>t.split(Mp).map(e=>e+" !important").join(";");function Fp(t){let e,i,n,a,l;return i=new Bp({props:{scale:t[0],color:t[1]}}),{c(){e=F("button"),He(i.$$.fragment),al(e,"type","button"),al(e,"class","close-widget-button svelte-1bnl89m"),Ma(e,"margin",t[2]),Ma(e,"outline-offset",4.8*t[0]+"px"),al(e,"aria-label",bi("closeWidget"))},m(g,p){se(g,e,p),Ge(i,e,null),n=!0,a||(l=[ge(e,"click",t[3]),ge(e,"mouseup",Zi)],a=!0)},p(g,[p]){const _={};p&1&&(_.scale=g[0]),p&2&&(_.color=g[1]),i.$set(_),(!n||p&4)&&Ma(e,"margin",g[2]),(!n||p&1)&&Ma(e,"outline-offset",4.8*g[0]+"px")},i(g){n||(J(i.$$.fragment,g),n=!0)},o(g){ae(i.$$.fragment,g),n=!1},d(g){g&&te(e),ze(i),a=!1,Mt(l)}}}function Up(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e,{margin:l="auto"}=e,{onEvent:g=()=>{}}=e;const p=()=>{g(qe({type:"PressedCloseWidget",description:"The close widget button was pressed.",initiatedBy:"user"}))};return t.$$set=_=>{"scale"in _&&i(0,n=_.scale),"color"in _&&i(1,a=_.color),"margin"in _&&i(2,l=_.margin),"onEvent"in _&&i(4,g=_.onEvent)},[n,a,l,p,g]}class Vp extends tt{constructor(e){super(),et(this,e,Up,Fp,Ye,{scale:0,color:1,margin:2,onEvent:4})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get margin(){return this.$$.ctx[2]}set margin(e){this.$$set({margin:e}),w()}get onEvent(){return this.$$.ctx[4]}set onEvent(e){this.$$set({onEvent:e}),w()}}const R6="",Jn=(t,e,i)=>rt(t,e,e==="style"?jp(i):i),Wp=/;(?!([^()]*\([^()]*\))*[^()]*\))/,jp=t=>t.split(Wp).map(e=>e+" !important").join(";");function Gp(t){let e,i=(t[6]||"")+"",n,a,l,g;return{c(){e=F("a"),n=Le(i),Jn(e,"class",a="advert-link "+t[1]+" "+t[2]+" svelte-1iiylz1"),Jn(e,"href",t[0]),Jn(e,"style",t[5]),Jn(e,"target","_blank"),je(e,"no-image",!t[3]),je(e,"mobile",t[4])},m(p,_){se(p,e,_),I(e,n),l||(g=[ge(e,"click",t[7]),ge(e,"mouseup",Zi)],l=!0)},p(p,[_]){_&64&&i!==(i=(p[6]||"")+"")&&gr(n,i),_&6&&a!==(a="advert-link "+p[1]+" "+p[2]+" svelte-1iiylz1")&&Jn(e,"class",a),_&1&&Jn(e,"href",p[0]),_&32&&Jn(e,"style",p[5]),_&14&&je(e,"no-image",!p[3]),_&22&&je(e,"mobile",p[4])},i:oe,o:oe,d(p){p&&te(e),l=!1,Mt(g)}}}function zp(t,e,i){let n,a,{href:l}=e,{scale:g=1}=e,{color:p="#323232"}=e,{playerStyle:_}=e,{controlsOrder:k}=e,{largeImage:T}=e,{isMobile:C}=e,{onEvent:U=()=>{}}=e;const V=()=>{U(qe({type:"PressedAdvertLink",description:"The advert link was pressed to open the click-through URL in a new tab.",initiatedBy:"user"}))};return t.$$set=N=>{"href"in N&&i(0,l=N.href),"scale"in N&&i(8,g=N.scale),"color"in N&&i(9,p=N.color),"playerStyle"in N&&i(1,_=N.playerStyle),"controlsOrder"in N&&i(2,k=N.controlsOrder),"largeImage"in N&&i(3,T=N.largeImage),"isMobile"in N&&i(4,C=N.isMobile),"onEvent"in N&&i(10,U=N.onEvent)},t.$$.update=()=>{t.$$.dirty&1&&i(6,n=l&&new URL(l).hostname),t.$$.dirty&768&&i(5,a=`font-size: ${12*g}px; color: ${p}; border-color: ${p}`)},[l,_,k,T,C,a,n,V,g,p,U]}class Hp extends tt{constructor(e){super(),et(this,e,zp,Gp,Ye,{href:0,scale:8,color:9,playerStyle:1,controlsOrder:2,largeImage:3,isMobile:4,onEvent:10})}get href(){return this.$$.ctx[0]}set href(e){this.$$set({href:e}),w()}get scale(){return this.$$.ctx[8]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[9]}set color(e){this.$$set({color:e}),w()}get playerStyle(){return this.$$.ctx[1]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get controlsOrder(){return this.$$.ctx[2]}set controlsOrder(e){this.$$set({controlsOrder:e}),w()}get largeImage(){return this.$$.ctx[3]}set largeImage(e){this.$$set({largeImage:e}),w()}get isMobile(){return this.$$.ctx[4]}set isMobile(e){this.$$set({isMobile:e}),w()}get onEvent(){return this.$$.ctx[10]}set onEvent(e){this.$$set({onEvent:e}),w()}}const ki=(t,e,i)=>rt(t,e,e==="style"?Yp(i):i),Kp=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Yp=t=>t.split(Kp).map(e=>e+" !important").join(";");function qp(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),ki(i,"fill",t[1]),ki(i,"d","M30 32H6C4.9 32 4 31.1 4 30V6C4 4.9 4.9 4 6 4H16C17.1 4 18 3.1 18 2C18 0.9 17.1 0 16 0H4C1.78 0 0 1.8 0 4V32C0 34.2 1.8 36 4 36H32C34.2 36 36 34.2 36 32V20C36 18.9 35.1 18 34 18C32.9 18 32 18.9 32 20V30C32 31.1 31.1 32 30 32ZM22 2C22 3.1 22.9 4 24 4H29.18L10.92 22.26C10.14 23.04 10.14 24.3 10.92 25.08C11.7 25.86 12.96 25.86 13.74 25.08L32 6.82V12C32 13.1 32.9 14 34 14C35.1 14 36 13.1 36 12V2C36 0.9 35.1 0 34 0H24C22.9 0 22 0.9 22 2Z"),ki(e,"width",n=14*t[0]),ki(e,"height",a=14*t[0]),ki(e,"viewBox","0 0 36 36"),ki(e,"fill","none"),ki(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,g){g&2&&ki(i,"fill",l[1]),g&1&&n!==(n=14*l[0])&&ki(e,"width",n),g&1&&a!==(a=14*l[0])&&ki(e,"height",a)},d(l){l&&te(e)}}}function Xp(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),ki(i,"fill",t[1]),ki(i,"d","M20 0C8.96 0 0 8.96 0 20C0 31.04 8.96 40 20 40C31.04 40 40 31.04 40 20C40 8.96 31.04 0 20 0ZM23.76 19.08L15.26 27.58C14.48 28.36 13.22 28.36 12.44 27.58C11.66 26.8 11.66 25.54 12.44 24.76L20.94 16.26L18.4 13.72C17.76 13.08 18.22 12 19.1 12H26.98C27.54 12 27.98 12.44 27.98 13V20.88C27.98 21.78 26.9 22.22 26.28 21.58L23.76 19.08Z"),ki(e,"width",n=40*t[0]),ki(e,"height",a=40*t[0]),ki(e,"viewBox","0 0 40 40"),ki(e,"fill","none"),ki(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,g){g&2&&ki(i,"fill",l[1]),g&1&&n!==(n=40*l[0])&&ki(e,"width",n),g&1&&a!==(a=40*l[0])&&ki(e,"height",a)},d(l){l&&te(e)}}}function Zp(t){let e;function i(l,g){return l[2]?Xp:qp}let n=i(t),a=n(t);return{c(){a.c(),e=Zn()},m(l,g){a.m(l,g),se(l,e,g)},p(l,[g]){n===(n=i(l))&&a?a.p(l,g):(a.d(1),a=n(l),a&&(a.c(),a.m(e.parentNode,e)))},i:oe,o:oe,d(l){a.d(l),l&&te(e)}}}function Jp(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e,{circular:l=!0}=e;return t.$$set=g=>{"scale"in g&&i(0,n=g.scale),"color"in g&&i(1,a=g.color),"circular"in g&&i(2,l=g.circular)},[n,a,l]}class Xu extends tt{constructor(e){super(),et(this,e,Jp,Zp,Ye,{scale:0,color:1,circular:2})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get circular(){return this.$$.ctx[2]}set circular(e){this.$$set({circular:e}),w()}}const D6="",Zu=(t,e,i)=>Mi(t,e,i,1),Ts=(t,e,i)=>rt(t,e,e==="style"?$p(i):i),Qp=/;(?!([^()]*\([^()]*\))*[^()]*\))/,$p=t=>t.split(Qp).map(e=>e+" !important").join(";");function e_(t){let e;return{c(){e=F("div")},m(i,n){se(i,e,n)},p:oe,i:oe,o:oe,d(i){i&&te(e)}}}function t_(t){let e,i,n,a,l,g;return i=new Xu({props:{color:t[2],scale:t[1]}}),{c(){e=F("a"),He(i.$$.fragment),Ts(e,"class",n="advert-button "+t[3]+" "+t[4]+" svelte-17nxso5"),Ts(e,"href",t[0]),Ts(e,"target","_blank"),Zu(e,"outline-offset",3.2*t[1]+"px"),Ts(e,"aria-label",bi("visitAdvert"))},m(p,_){se(p,e,_),Ge(i,e,null),a=!0,l||(g=[ge(e,"click",t[5]),ge(e,"mouseup",Zi)],l=!0)},p(p,_){const k={};_&4&&(k.color=p[2]),_&2&&(k.scale=p[1]),i.$set(k),(!a||_&24&&n!==(n="advert-button "+p[3]+" "+p[4]+" svelte-17nxso5"))&&Ts(e,"class",n),(!a||_&1)&&Ts(e,"href",p[0]),(!a||_&2)&&Zu(e,"outline-offset",3.2*p[1]+"px")},i(p){a||(J(i.$$.fragment,p),a=!0)},o(p){ae(i.$$.fragment,p),a=!1},d(p){p&&te(e),ze(i),l=!1,Mt(g)}}}function i_(t){let e,i,n,a;const l=[t_,e_],g=[];function p(_,k){return _[0]?0:1}return e=p(t),i=g[e]=l[e](t),{c(){i.c(),n=Zn()},m(_,k){g[e].m(_,k),se(_,n,k),a=!0},p(_,[k]){let T=e;e=p(_),e===T?g[e].p(_,k):(Lt(),ae(g[T],1,1,()=>{g[T]=null}),It(),i=g[e],i?i.p(_,k):(i=g[e]=l[e](_),i.c()),J(i,1),i.m(n.parentNode,n))},i(_){a||(J(i),a=!0)},o(_){ae(i),a=!1},d(_){g[e].d(_),_&&te(n)}}}function r_(t,e,i){let{href:n}=e,{scale:a=1}=e,{color:l="#323232"}=e,{playerStyle:g}=e,{controlsOrder:p}=e,{onEvent:_=()=>{}}=e;const k=()=>{n&&_(qe({type:"PressedAdvertButton",description:"The advert button was pressed to open the click-through URL in a new tab.",initiatedBy:"user"}))};return t.$$set=T=>{"href"in T&&i(0,n=T.href),"scale"in T&&i(1,a=T.scale),"color"in T&&i(2,l=T.color),"playerStyle"in T&&i(3,g=T.playerStyle),"controlsOrder"in T&&i(4,p=T.controlsOrder),"onEvent"in T&&i(6,_=T.onEvent)},[n,a,l,g,p,k,_]}class n_ extends tt{constructor(e){super(),et(this,e,r_,i_,Ye,{href:0,scale:1,color:2,playerStyle:3,controlsOrder:4,onEvent:6})}get href(){return this.$$.ctx[0]}set href(e){this.$$set({href:e}),w()}get scale(){return this.$$.ctx[1]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[2]}set color(e){this.$$set({color:e}),w()}get playerStyle(){return this.$$.ctx[3]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get controlsOrder(){return this.$$.ctx[4]}set controlsOrder(e){this.$$set({controlsOrder:e}),w()}get onEvent(){return this.$$.ctx[6]}set onEvent(e){this.$$set({onEvent:e}),w()}}const vi=(t,e,i)=>rt(t,e,e==="style"?a_(i):i),s_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,a_=t=>t.split(s_).map(e=>e+" !important").join(";");function o_(t){let e,i,n,a,l,g,p,_,k;return{c(){e=$e("svg"),i=$e("path"),n=$e("path"),a=$e("defs"),l=$e("linearGradient"),g=$e("stop"),p=$e("stop"),vi(i,"fill","url(#gradient)"),vi(i,"d","M4.51819 0C3.20323 0.00414605 2.06058 0.402167 1.23154 1.23171C0.401171 2.06225 0.00315099 3.20622 0 4.52301V4.55435C0.00613614 7.21612 1.61729 10.5771 4.523 13.4826C6.55223 15.5125 8.90619 16.989 11.1512 17.6401C11.9816 17.8809 12.7653 18 13.4871 18C14.8315 18 15.9609 17.5859 16.7732 16.7738C18.0215 15.5255 18.3298 13.5286 17.6401 11.1512C16.9891 8.90638 15.5126 6.55259 13.4826 4.52284C10.5769 1.61679 7.2161 0.00597031 4.55417 0H4.51819ZM11.5084 16.4099C9.46706 15.818 7.30764 14.4566 5.42849 12.577C1.70684 8.85563 0.199673 4.07507 2.13703 2.13737C2.7125 1.56207 3.53856 1.29058 4.51354 1.29058C6.82123 1.29058 9.9611 2.81235 12.5771 5.42851C14.4569 7.308 15.8176 9.46709 16.41 11.5083C16.9634 13.4166 16.7709 14.9649 15.8677 15.8681C15.302 16.4331 14.4843 16.72 13.4841 16.72C12.8859 16.72 12.222 16.6172 11.5084 16.4099Z"),vi(n,"fill","url(#gradient)"),vi(n,"d","M11.1483 0.360687C8.90517 1.01235 6.55252 2.48946 4.52328 4.5188C0.166276 8.87725 -1.28019 14.2587 1.23026 16.7697C2.06293 17.6026 3.21138 18 4.5339 18C7.19718 18 10.5655 16.3873 13.4767 13.4752C17.8334 9.11694 19.28 3.73601 16.7702 1.22481C15.9583 0.413305 14.8303 0 13.4865 0C12.7642 0 11.9795 0.11951 11.1483 0.360687ZM2.14341 15.856C1.24354 14.9563 1.05288 13.4115 1.60627 11.5066C2.19817 9.468 3.55852 7.31101 5.43692 5.43222C7.31433 3.55376 9.47084 2.19334 11.5085 1.60093C12.2231 1.39362 12.8867 1.29071 13.4845 1.29071C14.4808 1.29071 15.2947 1.57604 15.8566 2.13856C16.7563 3.0382 16.947 4.5832 16.3937 6.48756C15.8018 8.52586 14.4415 10.683 12.5632 12.562C9.94941 15.1771 6.8127 16.6998 4.50967 16.6998C3.53911 16.6998 2.71639 16.4293 2.14341 15.856Z"),vi(g,"stop-color",t[1]),vi(p,"offset","1"),vi(p,"stop-color",t[2]),vi(l,"id","gradient"),vi(l,"x1","0"),vi(l,"y1","9"),vi(l,"x2","18"),vi(l,"y2","9"),vi(l,"gradientUnits","userSpaceOnUse"),vi(e,"width",_=16*t[0]),vi(e,"height",k=16*t[0]),vi(e,"viewBox","0 0 18 18"),vi(e,"fill","none"),vi(e,"xmlns","http://www.w3.org/2000/svg")},m(T,C){se(T,e,C),I(e,i),I(e,n),I(e,a),I(a,l),I(l,g),I(l,p)},p(T,[C]){C&2&&vi(g,"stop-color",T[1]),C&4&&vi(p,"stop-color",T[2]),C&1&&_!==(_=16*T[0])&&vi(e,"width",_),C&1&&k!==(k=16*T[0])&&vi(e,"height",k)},i:oe,o:oe,d(T){T&&te(e)}}}function l_(t,e,i){let{scale:n=1}=e,{color1:a="#933afb"}=e,{color2:l="#fb3a41"}=e;return t.$$set=g=>{"scale"in g&&i(0,n=g.scale),"color1"in g&&i(1,a=g.color1),"color2"in g&&i(2,l=g.color2)},[n,a,l]}class u_ extends tt{constructor(e){super(),et(this,e,l_,o_,Ye,{scale:0,color1:1,color2:2})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color1(){return this.$$.ctx[1]}set color1(e){this.$$set({color1:e}),w()}get color2(){return this.$$.ctx[2]}set color2(e){this.$$set({color2:e}),w()}}const O6="",Ju=(t,e,i)=>Mi(t,e,i,1),Na=(t,e,i)=>rt(t,e,e==="style"?d_(i):i),c_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,d_=t=>t.split(c_).map(e=>e+" !important").join(";");function f_(t){let e,i,n,a,l;return i=new u_({props:{scale:t[0]}}),{c(){e=F("a"),He(i.$$.fragment),Na(e,"class","beyondwords svelte-vl0esb"),Na(e,"href","https://beyondwords.io/"),Na(e,"target","_blank"),Ju(e,"outline-offset",6.4*t[0]+"px"),Na(e,"aria-label",bi("visitBeyondWords")),je(e,"visible",t[1])},m(g,p){se(g,e,p),Ge(i,e,null),n=!0,a||(l=[ge(e,"click",t[2]),ge(e,"mouseup",Zi)],a=!0)},p(g,[p]){const _={};p&1&&(_.scale=g[0]),i.$set(_),(!n||p&1)&&Ju(e,"outline-offset",6.4*g[0]+"px"),(!n||p&2)&&je(e,"visible",g[1])},i(g){n||(J(i.$$.fragment,g),n=!0)},o(g){ae(i.$$.fragment,g),n=!1},d(g){g&&te(e),ze(i),a=!1,Mt(l)}}}function h_(t,e,i){let{scale:n=1}=e,{visible:a=!0}=e,{onEvent:l=()=>{}}=e;const g=()=>{l(qe({type:"PressedBeyondWords",description:"The BeyondWords logo was pressed to open the BeyondWords website in a new tab.",initiatedBy:"user"}))};return t.$$set=p=>{"scale"in p&&i(0,n=p.scale),"visible"in p&&i(1,a=p.visible),"onEvent"in p&&i(3,l=p.onEvent)},[n,a,g,l]}let g_=class extends tt{constructor(e){super(),et(this,e,h_,f_,Ye,{scale:0,visible:1,onEvent:3})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get visible(){return this.$$.ctx[1]}set visible(e){this.$$set({visible:e}),w()}get onEvent(){return this.$$.ctx[3]}set onEvent(e){this.$$set({onEvent:e}),w()}};const B6="",Xs=(t,e,i)=>rt(t,e,e==="style"?m_(i):i),v_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,m_=t=>t.split(v_).map(e=>e+" !important").join(";");function p_(t){let e,i,n,a,l;return i=new Xu({props:{scale:t[1],color:t[2],circular:!1}}),{c(){e=F("a"),He(i.$$.fragment),Xs(e,"class","source-url-button svelte-1umb4uf"),Xs(e,"href",t[0]),Xs(e,"target","_blank"),Xs(e,"aria-label",bi("visitSourceArticle"))},m(g,p){se(g,e,p),Ge(i,e,null),n=!0,a||(l=[ge(e,"click",t[3]),ge(e,"mouseup",Zi)],a=!0)},p(g,[p]){const _={};p&2&&(_.scale=g[1]),p&4&&(_.color=g[2]),i.$set(_),(!n||p&1)&&Xs(e,"href",g[0])},i(g){n||(J(i.$$.fragment,g),n=!0)},o(g){ae(i.$$.fragment,g),n=!1},d(g){g&&te(e),ze(i),a=!1,Mt(l)}}}function __(t,e,i){let{href:n}=e,{scale:a=1}=e,{color:l="#323232"}=e,{onEvent:g=()=>{}}=e;const p=()=>{g(qe({type:"PressedSourceUrl",description:"The source URL button was pressed to open the source article in a new tab.",initiatedBy:"user"}))};return t.$$set=_=>{"href"in _&&i(0,n=_.href),"scale"in _&&i(1,a=_.scale),"color"in _&&i(2,l=_.color),"onEvent"in _&&i(4,g=_.onEvent)},[n,a,l,p,g]}class y_ extends tt{constructor(e){super(),et(this,e,__,p_,Ye,{href:0,scale:1,color:2,onEvent:4})}get href(){return this.$$.ctx[0]}set href(e){this.$$set({href:e}),w()}get scale(){return this.$$.ctx[1]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[2]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[4]}set onEvent(e){this.$$set({onEvent:e}),w()}}const M6="",Rn=(t,e,i)=>Mi(t,e,i,1),ln=(t,e,i)=>rt(t,e,e==="style"?S_(i):i),b_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,S_=t=>t.split(b_).map(e=>e+" !important").join(";");function k_(t){let e,i,n,a,l,g;return{c(){e=F("a"),i=F("img"),Rr(i.src,n=t[0])||ln(i,"src",n),ln(i,"alt",t[2]),Rn(i,"width",t[3]),Rn(i,"height",t[3]),ln(e,"class","large-image svelte-1ngswrw"),ln(e,"href",a=t[1]?t[1]:null),ln(e,"target","_blank"),Rn(e,"width",t[3]),Rn(e,"height",t[3]),ln(e,"aria-label",bi("visitAdvert"))},m(p,_){se(p,e,_),I(e,i),l||(g=[ge(e,"click",t[4]),ge(e,"mouseup",Zi)],l=!0)},p(p,[_]){_&1&&!Rr(i.src,n=p[0])&&ln(i,"src",n),_&4&&ln(i,"alt",p[2]),_&8&&Rn(i,"width",p[3]),_&8&&Rn(i,"height",p[3]),_&2&&a!==(a=p[1]?p[1]:null)&&ln(e,"href",a),_&8&&Rn(e,"width",p[3]),_&8&&Rn(e,"height",p[3])},i:oe,o:oe,d(p){p&&te(e),l=!1,Mt(g)}}}function T_(t,e,i){let n,{src:a}=e,{href:l}=e,{alt:g="Player Image"}=e,{scale:p=1}=e,{onEvent:_=()=>{}}=e;const k=()=>{l&&_(qe({type:"PressedAdvertImage",description:"The advert image was pressed to open the click-through URL in a new tab.",initiatedBy:"user"}))};return t.$$set=T=>{"src"in T&&i(0,a=T.src),"href"in T&&i(1,l=T.href),"alt"in T&&i(2,g=T.alt),"scale"in T&&i(5,p=T.scale),"onEvent"in T&&i(6,_=T.onEvent)},t.$$.update=()=>{t.$$.dirty&32&&i(3,n=`${p*80}px`)},[a,l,g,n,k,p,_]}class E_ extends tt{constructor(e){super(),et(this,e,T_,k_,Ye,{src:0,href:1,alt:2,scale:5,onEvent:6})}get src(){return this.$$.ctx[0]}set src(e){this.$$set({src:e}),w()}get href(){return this.$$.ctx[1]}set href(e){this.$$set({href:e}),w()}get alt(){return this.$$.ctx[2]}set alt(e){this.$$set({alt:e}),w()}get scale(){return this.$$.ctx[5]}set scale(e){this.$$set({scale:e}),w()}get onEvent(){return this.$$.ctx[6]}set onEvent(e){this.$$set({onEvent:e}),w()}}const N6="",Fa=(t,e,i)=>rt(t,e,e==="style"?x_(i):i),A_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,x_=t=>t.split(A_).map(e=>e+" !important").join(";");function w_(t){var a;let e,i=(((a=t[0])==null?void 0:a.replaceAll(/<[^>]+>/gi,""))||"")+"",n;return{c(){e=F("div"),Fa(e,"class",n="player-title "+t[1]+" svelte-xrh20u"),Fa(e,"style",t[3])},m(l,g){se(l,e,g),e.innerHTML=i,t[10](e)},p(l,[g]){var p;g&1&&i!==(i=(((p=l[0])==null?void 0:p.replaceAll(/<[^>]+>/gi,""))||"")+"")&&(e.innerHTML=i),g&2&&n!==(n="player-title "+l[1]+" svelte-xrh20u")&&Fa(e,"class",n),g&8&&Fa(e,"style",l[3])},i:oe,o:oe,d(l){l&&te(e),t[10](null)}}}function P_(t,e,i){let n,a,{title:l}=e,{playerStyle:g}=e,{scale:p=1}=e,{visible:_=!0}=e,{collapsible:k=!1}=e,{collapsed:T=!1}=e,{color:C="#111"}=e,U;function V(N){Ne[N?"unshift":"push"](()=>{U=N,i(2,U)})}return t.$$set=N=>{"title"in N&&i(0,l=N.title),"playerStyle"in N&&i(1,g=N.playerStyle),"scale"in N&&i(4,p=N.scale),"visible"in N&&i(5,_=N.visible),"collapsible"in N&&i(6,k=N.collapsible),"collapsed"in N&&i(7,T=N.collapsed),"color"in N&&i(8,C=N.color)},t.$$.update=()=>{t.$$.dirty&196&&i(9,n=T?0:k&&U?`${U.scrollWidth}px`:"auto"),t.$$.dirty&944&&i(3,a=`font-size: ${12*p}px; visibility: ${_?"visible":"hidden"}; width: ${n}; opacity: ${T?0:1}; color: ${C}`)},[l,g,U,a,p,_,k,T,C,n,V]}class Qu extends tt{constructor(e){super(),et(this,e,P_,w_,Ye,{title:0,playerStyle:1,scale:4,visible:5,collapsible:6,collapsed:7,color:8})}get title(){return this.$$.ctx[0]}set title(e){this.$$set({title:e}),w()}get playerStyle(){return this.$$.ctx[1]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get scale(){return this.$$.ctx[4]}set scale(e){this.$$set({scale:e}),w()}get visible(){return this.$$.ctx[5]}set visible(e){this.$$set({visible:e}),w()}get collapsible(){return this.$$.ctx[6]}set collapsible(e){this.$$set({collapsible:e}),w()}get collapsed(){return this.$$.ctx[7]}set collapsed(e){this.$$set({collapsed:e}),w()}get color(){return this.$$.ctx[8]}set color(e){this.$$set({color:e}),w()}}const F6="",ol=(t,e,i)=>rt(t,e,e==="style"?L_(i):i),C_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,L_=t=>t.split(C_).map(e=>e+" !important").join(";");function I_(t){var n;let e,i=(((n=t[0])==null?void 0:n.replaceAll(/<[^>]+>/gi,""))||"")+"";return{c(){e=F("div"),ol(e,"class","content-title svelte-mtaayt"),ol(e,"style",t[4]),je(e,"bold",t[3]),je(e,"one-line",t[1]===1),je(e,"center",t[2]),je(e,"n-lines",t[1]>1)},m(a,l){se(a,e,l),e.innerHTML=i},p(a,[l]){var g;l&1&&i!==(i=(((g=a[0])==null?void 0:g.replaceAll(/<[^>]+>/gi,""))||"")+"")&&(e.innerHTML=i),l&16&&ol(e,"style",a[4]),l&8&&je(e,"bold",a[3]),l&2&&je(e,"one-line",a[1]===1),l&4&&je(e,"center",a[2]),l&2&&je(e,"n-lines",a[1]>1)},i:oe,o:oe,d(a){a&&te(e)}}}function R_(t,e,i){let n,a,l,g,{title:p}=e,{maxLines:_=1}=e,{maxWidth:k=void 0}=e,{center:T=!1}=e,{bold:C=!1}=e,{flex:U="0 1 auto"}=e,{scale:V=1}=e,{color:N="#111"}=e;return t.$$set=Q=>{"title"in Q&&i(0,p=Q.title),"maxLines"in Q&&i(1,_=Q.maxLines),"maxWidth"in Q&&i(5,k=Q.maxWidth),"center"in Q&&i(2,T=Q.center),"bold"in Q&&i(3,C=Q.bold),"flex"in Q&&i(6,U=Q.flex),"scale"in Q&&i(7,V=Q.scale),"color"in Q&&i(8,N=Q.color)},t.$$.update=()=>{t.$$.dirty&128&&i(11,n=`${10*V}px`),t.$$.dirty&130&&i(10,a=`${10*V*1.2*_}px`),t.$$.dirty&32&&i(9,l=k?`max-width: ${k}px`:""),t.$$.dirty&3906&&i(4,g=`--n: ${_}; font-size: ${n}; max-height: ${a}; flex: ${U}; ${l}; color: ${N}`)},[p,_,T,C,g,k,U,V,N,l,a,n]}class ll extends tt{constructor(e){super(),et(this,e,R_,I_,Ye,{title:0,maxLines:1,maxWidth:5,center:2,bold:3,flex:6,scale:7,color:8})}get title(){return this.$$.ctx[0]}set title(e){this.$$set({title:e}),w()}get maxLines(){return this.$$.ctx[1]}set maxLines(e){this.$$set({maxLines:e}),w()}get maxWidth(){return this.$$.ctx[5]}set maxWidth(e){this.$$set({maxWidth:e}),w()}get center(){return this.$$.ctx[2]}set center(e){this.$$set({center:e}),w()}get bold(){return this.$$.ctx[3]}set bold(e){this.$$set({bold:e}),w()}get flex(){return this.$$.ctx[6]}set flex(e){this.$$set({flex:e}),w()}get scale(){return this.$$.ctx[7]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[8]}set color(e){this.$$set({color:e}),w()}}const Ua=(t,e)=>i=>{let n;i.key==="ArrowLeft"&&(n="Left"),i.key==="ArrowRight"&&(n="Right"),i.key===" "&&(n="Space"),i.key==="Enter"&&(n="Enter"),n&&(i.preventDefault(),t(qe({type:`Pressed${n}OnProgress${e}`,description:`The ${n.toLowerCase()} key was pressed while the progress ${e.toLowerCase()} was focussed.`,initiatedBy:"user"})))},U6="",un=(t,e,i)=>rt(t,e,e==="style"?O_(i):i),D_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,O_=t=>t.split(D_).map(e=>e+" !important").join(";");function B_(t){let e,i,n,a,l,g,p;return{c(){e=F("button"),i=F("div"),n=Ce(),a=F("div"),un(i,"class","background svelte-8a7sls"),un(i,"style",t[6]),un(a,"class","progress svelte-8a7sls"),un(a,"style",l=t[6]+"; width: "+t[0]*100+"%"),un(e,"type","button"),un(e,"class","progress-bar svelte-8a7sls"),un(e,"aria-label",bi("scrubProgressBar")),je(e,"full-width",t[1]),je(e,"readonly",t[2]),je(e,"mouse-down",t[5])},m(_,k){se(_,e,k),I(e,i),I(e,n),I(e,a),t[9](e),g||(p=[ge(e,"mousedown",t[7]),ge(e,"keydown",function(){Cn(Ua(t[3],"Bar"))&&Ua(t[3],"Bar").apply(this,arguments)}),ge(e,"mouseup",Zi)],g=!0)},p(_,[k]){t=_,k&64&&un(i,"style",t[6]),k&65&&l!==(l=t[6]+"; width: "+t[0]*100+"%")&&un(a,"style",l),k&2&&je(e,"full-width",t[1]),k&4&&je(e,"readonly",t[2]),k&32&&je(e,"mouse-down",t[5])},i:oe,o:oe,d(_){_&&te(e),t[9](null),g=!1,Mt(p)}}}function M_(t,e,i){let n,{progress:a=0}=e,{fullWidth:l=!1}=e,{readonly:g=!1}=e,{color:p="#323232"}=e,{onEvent:_=()=>{}}=e,k,T;const C=W=>{i(5,T=!0),_(qe({type:"PressedProgressBar",description:"The progress bar was pressed at some ratio.",initiatedBy:"user",ratio:N(W)}))},U=W=>{if(T){if(!k){V();return}_(qe({type:"ScrubbedProgressBar",description:"The user pressed on the progress bar then dragged.",initiatedBy:"user",ratio:N(W)}))}},V=()=>{T&&(i(5,T=!1),_(qe({type:"FinishedScrubbingProgressBar",description:"The user let go after scrubbing the progress bar.",initiatedBy:"user"})))},N=W=>{const{x:ue,width:ie}=k.getBoundingClientRect(),be=(W.clientX-ue)/ie;return Math.max(0,Math.min(1,be))};Ko(()=>{const W=addEventListener("mouseup",V),ue=addEventListener("mousemove",U);return()=>{removeEventListener("mouseup",W),removeEventListener("mousemove",ue)}});function Q(W){Ne[W?"unshift":"push"](()=>{k=W,i(4,k)})}return t.$$set=W=>{"progress"in W&&i(0,a=W.progress),"fullWidth"in W&&i(1,l=W.fullWidth),"readonly"in W&&i(2,g=W.readonly),"color"in W&&i(8,p=W.color),"onEvent"in W&&i(3,_=W.onEvent)},t.$$.update=()=>{t.$$.dirty&258&&i(6,n=l?"":`background: ${p}`)},[a,l,g,_,k,T,n,C,p,Q]}class N_ extends tt{constructor(e){super(),et(this,e,M_,B_,Ye,{progress:0,fullWidth:1,readonly:2,color:8,onEvent:3})}get progress(){return this.$$.ctx[0]}set progress(e){this.$$set({progress:e}),w()}get fullWidth(){return this.$$.ctx[1]}set fullWidth(e){this.$$set({fullWidth:e}),w()}get readonly(){return this.$$.ctx[2]}set readonly(e){this.$$set({readonly:e}),w()}get color(){return this.$$.ctx[8]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[3]}set onEvent(e){this.$$set({onEvent:e}),w()}}const V6="",Va=(t,e,i)=>Mi(t,e,i,1),Ti=(t,e,i)=>rt(t,e,e==="style"?U_(i):i),F_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,U_=t=>t.split(F_).map(e=>e+" !important").join(";");function V_(t){let e;const i=t[13].default,n=gs(i,t,t[12],null);return{c(){n&&n.c()},m(a,l){n&&n.m(a,l),e=!0},p(a,l){n&&n.p&&(!e||l&4096)&&ms(n,i,a,a[12],e?vs(i,a[12],l,null):ps(a[12]),null)},i(a){e||(J(n,a),e=!0)},o(a){ae(n,a),e=!1},d(a){n&&n.d(a)}}}function W_(t){let e,i,n,a,l,g,p,_;const k=t[13].default,T=gs(k,t,t[12],null);return{c(){e=F("div"),i=$e("svg"),n=$e("circle"),l=Ce(),T&&T.c(),Ti(n,"cx","50%"),Ti(n,"cy","50%"),Ti(n,"r",t[6]),Ti(n,"stroke",t[3]),Ti(n,"stroke-width",t[7]),Ti(n,"stroke-dasharray",a=t[5]+" "+t[5]),Ti(n,"stroke-dashoffset",t[8]),Ti(i,"fill","none"),Ti(i,"width",t[9]),Ti(i,"height",t[9]),Ti(i,"xmlns","http://www.w3.org/2000/svg"),Ti(i,"class","svelte-niuvgx"),Ti(e,"class","progress-circle svelte-niuvgx"),Va(e,"width",t[2]*40+"px"),Va(e,"height",t[2]*40+"px")},m(C,U){se(C,e,U),I(e,i),I(i,n),I(e,l),T&&T.m(e,null),g=!0,p||(_=ge(e,"keydown",function(){Cn(Ua(t[4],"Circle"))&&Ua(t[4],"Circle").apply(this,arguments)}),p=!0)},p(C,U){t=C,(!g||U&64)&&Ti(n,"r",t[6]),(!g||U&8)&&Ti(n,"stroke",t[3]),(!g||U&128)&&Ti(n,"stroke-width",t[7]),(!g||U&32&&a!==(a=t[5]+" "+t[5]))&&Ti(n,"stroke-dasharray",a),(!g||U&256)&&Ti(n,"stroke-dashoffset",t[8]),(!g||U&512)&&Ti(i,"width",t[9]),(!g||U&512)&&Ti(i,"height",t[9]),T&&T.p&&(!g||U&4096)&&ms(T,k,t,t[12],g?vs(k,t[12],U,null):ps(t[12]),null),(!g||U&4)&&Va(e,"width",t[2]*40+"px"),(!g||U&4)&&Va(e,"height",t[2]*40+"px")},i(C){g||(J(T,C),g=!0)},o(C){ae(T,C),g=!1},d(C){C&&te(e),T&&T.d(C),p=!1,_()}}}function j_(t){let e,i,n,a;const l=[W_,V_],g=[];function p(_,k){return _[1]&&_[0]?0:1}return e=p(t),i=g[e]=l[e](t),{c(){i.c(),n=Zn()},m(_,k){g[e].m(_,k),se(_,n,k),a=!0},p(_,[k]){let T=e;e=p(_),e===T?g[e].p(_,k):(Lt(),ae(g[T],1,1,()=>{g[T]=null}),It(),i=g[e],i?i.p(_,k):(i=g[e]=l[e](_),i.c()),J(i,1),i.m(n.parentNode,n))},i(_){a||(J(i),a=!0)},o(_){ae(i),a=!1},d(_){g[e].d(_),_&&te(n)}}}function G_(t,e,i){let n,a,l,g,p,_,{$$slots:k={},$$scope:T}=e,{progress:C=0}=e,{enabled:U=!1}=e,{bold:V}=e,{scale:N=1}=e,{color:Q="#323232"}=e,{onEvent:W=()=>{}}=e;return t.$$set=ue=>{"progress"in ue&&i(0,C=ue.progress),"enabled"in ue&&i(1,U=ue.enabled),"bold"in ue&&i(10,V=ue.bold),"scale"in ue&&i(2,N=ue.scale),"color"in ue&&i(3,Q=ue.color),"onEvent"in ue&&i(4,W=ue.onEvent),"$$scope"in ue&&i(12,T=ue.$$scope)},t.$$.update=()=>{t.$$.dirty&1028&&i(7,n=N*(V?2.5:1.667)),t.$$.dirty&1156&&i(6,a=20*N+n*(V?1:1.5)),t.$$.dirty&192&&i(9,l=2*a+n),t.$$.dirty&64&&i(5,g=a*2*Math.PI),t.$$.dirty&1&&i(11,p=Math.max(0,Math.min(1,C))),t.$$.dirty&2080&&i(8,_=g*(1-p))},[C,U,N,Q,W,g,a,n,_,l,V,p,T,k]}class z_ extends tt{constructor(e){super(),et(this,e,G_,j_,Ye,{progress:0,enabled:1,bold:10,scale:2,color:3,onEvent:4})}get progress(){return this.$$.ctx[0]}set progress(e){this.$$set({progress:e}),w()}get enabled(){return this.$$.ctx[1]}set enabled(e){this.$$set({enabled:e}),w()}get bold(){return this.$$.ctx[10]}set bold(e){this.$$set({bold:e}),w()}get scale(){return this.$$.ctx[2]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[3]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[4]}set onEvent(e){this.$$set({onEvent:e}),w()}}const Es=t=>{t<0&&(t=Math.max(0,t));const e=Math.floor(t/3600).toString();let i=Math.floor(t%3600/60).toString(),n=Math.floor(t%60).toString();return n.length<2&&(n=`0${n}`),t<3600?`${i}:${n}`:(i.length<2&&(i=`0${i}`),`${e}:${i}:${n}`)},W6="",Wa=(t,e,i)=>Mi(t,e,i,1),H_=(t,e,i)=>rt(t,e,e==="style"?Y_(i):i),K_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Y_=t=>t.split(K_).map(e=>e+" !important").join(";");function q_(t){let e,i,n,a=Es(t[1])+"",l;return{c(){e=F("span"),i=Le(t[0]),n=Le(" • "),l=Le(a),H_(e,"class","countdown-time svelte-mmsohq"),Wa(e,"font-size",10*t[2]+"px"),Wa(e,"color",t[3])},m(g,p){se(g,e,p),I(e,i),I(e,n),I(e,l)},p(g,[p]){p&1&&gr(i,g[0]),p&2&&a!==(a=Es(g[1])+"")&&gr(l,a),p&4&&Wa(e,"font-size",10*g[2]+"px"),p&8&&Wa(e,"color",g[3])},i:oe,o:oe,d(g){g&&te(e)}}}function X_(t,e,i){let{text:n}=e,{remaining:a}=e,{scale:l=1}=e,{color:g="#323232"}=e;return t.$$set=p=>{"text"in p&&i(0,n=p.text),"remaining"in p&&i(1,a=p.remaining),"scale"in p&&i(2,l=p.scale),"color"in p&&i(3,g=p.color)},[n,a,l,g]}class Z_ extends tt{constructor(e){super(),et(this,e,X_,q_,Ye,{text:0,remaining:1,scale:2,color:3})}get text(){return this.$$.ctx[0]}set text(e){this.$$set({text:e}),w()}get remaining(){return this.$$.ctx[1]}set remaining(e){this.$$set({remaining:e}),w()}get scale(){return this.$$.ctx[2]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[3]}set color(e){this.$$set({color:e}),w()}}const j6="",ja=(t,e,i)=>Mi(t,e,i,1),J_=(t,e,i)=>rt(t,e,e==="style"?$_(i):i),Q_=/;(?!([^()]*\([^()]*\))*[^()]*\))/,$_=t=>t.split(Q_).map(e=>e+" !important").join(";");function e1(t){let e,i,n;return{c(){e=F("div"),i=Le(t[3]),n=Le(" min"),J_(e,"class","duration-in-mins svelte-121qsze"),ja(e,"font-size",10*t[1]+"px"),ja(e,"color",t[2]),je(e,"bold",t[0])},m(a,l){se(a,e,l),I(e,i),I(e,n)},p(a,[l]){l&8&&gr(i,a[3]),l&2&&ja(e,"font-size",10*a[1]+"px"),l&4&&ja(e,"color",a[2]),l&1&&je(e,"bold",a[0])},i:oe,o:oe,d(a){a&&te(e)}}}function t1(t,e,i){let n,{duration:a=0}=e,{bold:l=!1}=e,{scale:g=1}=e,{color:p="#323232"}=e;return t.$$set=_=>{"duration"in _&&i(4,a=_.duration),"bold"in _&&i(0,l=_.bold),"scale"in _&&i(1,g=_.scale),"color"in _&&i(2,p=_.color)},t.$$.update=()=>{t.$$.dirty&16&&i(3,n=Math.max(1,Math.round((a||0)/60)))},[l,g,p,n,a]}class $u extends tt{constructor(e){super(),et(this,e,t1,e1,Ye,{duration:4,bold:0,scale:1,color:2})}get duration(){return this.$$.ctx[4]}set duration(e){this.$$set({duration:e}),w()}get bold(){return this.$$.ctx[0]}set bold(e){this.$$set({bold:e}),w()}get scale(){return this.$$.ctx[1]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[2]}set color(e){this.$$set({color:e}),w()}}const G6="",Ga=(t,e,i)=>Mi(t,e,i,1),i1=(t,e,i)=>rt(t,e,e==="style"?n1(i):i),r1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,n1=t=>t.split(r1).map(e=>e+" !important").join(";");function s1(t){let e,i=Es(t[0])+"",n,a,l=Es(t[1])+"",g;return{c(){e=F("span"),n=Le(i),a=Le(" / "),g=Le(l),i1(e,"class","playback-time svelte-17necdw"),Ga(e,"font-size",10*t[2]+"px"),Ga(e,"color",t[3])},m(p,_){se(p,e,_),I(e,n),I(e,a),I(e,g)},p(p,[_]){_&1&&i!==(i=Es(p[0])+"")&&gr(n,i),_&2&&l!==(l=Es(p[1])+"")&&gr(g,l),_&4&&Ga(e,"font-size",10*p[2]+"px"),_&8&&Ga(e,"color",p[3])},i:oe,o:oe,d(p){p&&te(e)}}}function a1(t,e,i){let{currentTime:n=0}=e,{duration:a=0}=e,{scale:l=1}=e,{color:g="#323232"}=e;return t.$$set=p=>{"currentTime"in p&&i(0,n=p.currentTime),"duration"in p&&i(1,a=p.duration),"scale"in p&&i(2,l=p.scale),"color"in p&&i(3,g=p.color)},[n,a,l,g]}class o1 extends tt{constructor(e){super(),et(this,e,a1,s1,Ye,{currentTime:0,duration:1,scale:2,color:3})}get currentTime(){return this.$$.ctx[0]}set currentTime(e){this.$$set({currentTime:e}),w()}get duration(){return this.$$.ctx[1]}set duration(e){this.$$set({duration:e}),w()}get scale(){return this.$$.ctx[2]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[3]}set color(e){this.$$set({color:e}),w()}}const z6="",Zs=(t,e,i)=>rt(t,e,e==="style"?u1(i):i),l1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,u1=t=>t.split(l1).map(e=>e+" !important").join(";");function c1(t){let e,i;return e=new o1({props:{duration:t[0],currentTime:t[1],scale:t[11],color:t[8]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&1&&(l.duration=n[0]),a&2&&(l.currentTime=n[1]),a&2048&&(l.scale=n[11]),a&256&&(l.color=n[8]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function d1(t){let e,i;return e=new $u({props:{duration:t[0],scale:t[11],color:t[8]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&1&&(l.duration=n[0]),a&2048&&(l.scale=n[11]),a&256&&(l.color=n[8]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function f1(t){let e,i;return e=new Z_({props:{text:"Ad",remaining:t[12],scale:t[11],color:t[8]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&4096&&(l.remaining=n[12]),a&2048&&(l.scale=n[11]),a&256&&(l.color=n[8]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function h1(t){return{c:oe,m:oe,p:oe,i:oe,o:oe,d:oe}}function g1(t){let e,i,n,a,l,g;const p=[h1,f1,d1,c1],_=[];function k(T,C){return T[5]&&T[1]===0?0:T[5]?1:T[6]?2:3}return n=k(t),a=_[n]=p[n](t),{c(){e=F("div"),i=F("div"),a.c(),Zs(i,"class","inner svelte-17xceji"),Zs(e,"class",l="time-indicator "+t[2]+" "+t[3]+" svelte-17xceji"),Zs(e,"style",t[10]),je(e,"mobile",t[4]),je(e,"advert_",t[5]),je(e,"stopped",t[6]),je(e,"no-image",!t[7]),je(e,"no-transition",t[9])},m(T,C){se(T,e,C),I(e,i),_[n].m(i,null),g=!0},p(T,[C]){let U=n;n=k(T),n===U?_[n].p(T,C):(Lt(),ae(_[U],1,1,()=>{_[U]=null}),It(),a=_[n],a?a.p(T,C):(a=_[n]=p[n](T),a.c()),J(a,1),a.m(i,null)),(!g||C&12&&l!==(l="time-indicator "+T[2]+" "+T[3]+" svelte-17xceji"))&&Zs(e,"class",l),(!g||C&1024)&&Zs(e,"style",T[10]),(!g||C&28)&&je(e,"mobile",T[4]),(!g||C&44)&&je(e,"advert_",T[5]),(!g||C&76)&&je(e,"stopped",T[6]),(!g||C&140)&&je(e,"no-image",!T[7]),(!g||C&524)&&je(e,"no-transition",T[9])},i(T){g||(J(a),g=!0)},o(T){ae(a),g=!1},d(T){T&&te(e),_[n].d()}}}function v1(t,e,i){let n,a,l,g,p,{duration:_=0}=e,{currentTime:k=0}=e,{playerStyle:T}=e,{positionClasses:C}=e,{isMobile:U}=e,{isAdvert:V}=e,{isStopped:N}=e,{collapsed:Q}=e,{largeImage:W}=e,{color:ue="323232"}=e;return t.$$set=ie=>{"duration"in ie&&i(0,_=ie.duration),"currentTime"in ie&&i(1,k=ie.currentTime),"playerStyle"in ie&&i(2,T=ie.playerStyle),"positionClasses"in ie&&i(3,C=ie.positionClasses),"isMobile"in ie&&i(4,U=ie.isMobile),"isAdvert"in ie&&i(5,V=ie.isAdvert),"isStopped"in ie&&i(6,N=ie.isStopped),"collapsed"in ie&&i(13,Q=ie.collapsed),"largeImage"in ie&&i(7,W=ie.largeImage),"color"in ie&&i(8,ue=ie.color)},t.$$.update=()=>{t.$$.dirty&3&&i(12,n=Math.max(0,_-k)),t.$$.dirty&4&&i(14,a=T==="screen"),t.$$.dirty&16400&&i(11,l=a&&!U?3:a?2:1),t.$$.dirty&8192&&i(10,g=Q?"opacity: 0":""),t.$$.dirty&34&&i(9,p=!V&&k<.1)},[_,k,T,C,U,V,N,W,ue,p,g,l,n,Q,a]}class m1 extends tt{constructor(e){super(),et(this,e,v1,g1,Ye,{duration:0,currentTime:1,playerStyle:2,positionClasses:3,isMobile:4,isAdvert:5,isStopped:6,collapsed:13,largeImage:7,color:8})}get duration(){return this.$$.ctx[0]}set duration(e){this.$$set({duration:e}),w()}get currentTime(){return this.$$.ctx[1]}set currentTime(e){this.$$set({currentTime:e}),w()}get playerStyle(){return this.$$.ctx[2]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get positionClasses(){return this.$$.ctx[3]}set positionClasses(e){this.$$set({positionClasses:e}),w()}get isMobile(){return this.$$.ctx[4]}set isMobile(e){this.$$set({isMobile:e}),w()}get isAdvert(){return this.$$.ctx[5]}set isAdvert(e){this.$$set({isAdvert:e}),w()}get isStopped(){return this.$$.ctx[6]}set isStopped(e){this.$$set({isStopped:e}),w()}get collapsed(){return this.$$.ctx[13]}set collapsed(e){this.$$set({collapsed:e}),w()}get largeImage(){return this.$$.ctx[7]}set largeImage(e){this.$$set({largeImage:e}),w()}get color(){return this.$$.ctx[8]}set color(e){this.$$set({color:e}),w()}}const Vi=(t,e,i)=>rt(t,e,e==="style"?_1(i):i),p1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,_1=t=>t.split(p1).map(e=>e+" !important").join(";");function y1(t){let e,i,n,a,l,g;return{c(){e=$e("svg"),i=$e("rect"),n=$e("path"),Vi(i,"fill",t[3]),Vi(i,"width","100%"),Vi(i,"height","100%"),Vi(n,"fill",t[2]),Vi(n,"transform",a="scale("+t[1]+")"),Vi(n,"transform-origin","50% 50%"),Vi(n,"d","M0 6.99996V11C0 11.55 0.45 12 1 12H4L7.29 15.29C7.92 15.92 9 15.47 9 14.58V3.40996C9 2.51996 7.92 2.06996 7.29 2.69996L4 5.99996H1C0.45 5.99996 0 6.44996 0 6.99996ZM13.5 8.99996C13.5 7.22996 12.48 5.70996 11 4.96996V13.02C12.48 12.29 13.5 10.77 13.5 8.99996ZM11 1.44996V1.64996C11 2.02996 11.25 2.35996 11.6 2.49996C14.18 3.52996 16 6.05996 16 8.99996C16 11.94 14.18 14.47 11.6 15.5C11.24 15.64 11 15.97 11 16.35V16.55C11 17.18 11.63 17.62 12.21 17.4C15.6 16.11 18 12.84 18 8.99996C18 5.15996 15.6 1.88996 12.21 0.599963C11.63 0.369963 11 0.819963 11 1.44996V1.44996Z"),Vi(e,"width",l=18*t[0]),Vi(e,"height",g=18*t[0]),Vi(e,"viewBox","0 0 18 18"),Vi(e,"fill","none"),Vi(e,"xmlns","http://www.w3.org/2000/svg")},m(p,_){se(p,e,_),I(e,i),I(e,n)},p(p,[_]){_&8&&Vi(i,"fill",p[3]),_&4&&Vi(n,"fill",p[2]),_&2&&a!==(a="scale("+p[1]+")")&&Vi(n,"transform",a),_&1&&l!==(l=18*p[0])&&Vi(e,"width",l),_&1&&g!==(g=18*p[0])&&Vi(e,"height",g)},i:oe,o:oe,d(p){p&&te(e)}}}function b1(t,e,i){let{scale:n=1}=e,{zoom:a=1}=e,{color:l="#323232"}=e,{fill:g="transparent"}=e;return t.$$set=p=>{"scale"in p&&i(0,n=p.scale),"zoom"in p&&i(1,a=p.zoom),"color"in p&&i(2,l=p.color),"fill"in p&&i(3,g=p.fill)},[n,a,l,g]}class ec extends tt{constructor(e){super(),et(this,e,b1,y1,Ye,{scale:0,zoom:1,color:2,fill:3})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get zoom(){return this.$$.ctx[1]}set zoom(e){this.$$set({zoom:e}),w()}get color(){return this.$$.ctx[2]}set color(e){this.$$set({color:e}),w()}get fill(){return this.$$.ctx[3]}set fill(e){this.$$set({fill:e}),w()}}const Xr=(t,e,i)=>rt(t,e,e==="style"?k1(i):i),S1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,k1=t=>t.split(S1).map(e=>e+" !important").join(";");function T1(t){let e,i,n,a;return{c(){e=$e("svg"),i=$e("path"),Xr(i,"fill",t[1]),Xr(i,"d","M6.33334 5.76668L5.73334 5.18334C5.60001 5.06112 5.44168 5.00279 5.25834 5.00834C5.07501 5.0139 4.92223 5.07779 4.80001 5.20001C4.67779 5.32223 4.61668 5.47779 4.61668 5.66668C4.61668 5.85557 4.67779 6.01112 4.80001 6.13334L6.53334 7.86668C6.65557 7.9889 6.81112 8.05001 7.00001 8.05001C7.1889 8.05001 7.34445 7.9889 7.46668 7.86668L9.21668 6.11668C9.3389 5.99445 9.39723 5.84168 9.39168 5.65834C9.38612 5.47501 9.32223 5.32223 9.20001 5.20001C9.07779 5.07779 8.92223 5.0139 8.73334 5.00834C8.54445 5.00279 8.3889 5.06668 8.26668 5.20001L7.66668 5.76668V3.65001C7.66668 3.46112 7.60279 3.30557 7.47501 3.18334C7.34723 3.06112 7.1889 3.00001 7.00001 3.00001C6.81112 3.00001 6.65279 3.0639 6.52501 3.19168C6.39723 3.31945 6.33334 3.47779 6.33334 3.66668V5.76668ZM4.33334 10.3333H9.68334C9.87223 10.3333 10.0278 10.2695 10.15 10.1417C10.2722 10.0139 10.3333 9.85557 10.3333 9.66668C10.3333 9.47779 10.2695 9.31945 10.1417 9.19168C10.0139 9.0639 9.85557 9.00001 9.66668 9.00001H4.31668C4.12779 9.00001 3.97223 9.0639 3.85001 9.19168C3.72779 9.31945 3.66668 9.47779 3.66668 9.66668C3.66668 9.85557 3.73057 10.0139 3.85834 10.1417C3.98612 10.2695 4.14445 10.3333 4.33334 10.3333ZM7.00001 13.6667C6.07779 13.6667 5.21112 13.4917 4.40001 13.1417C3.5889 12.7917 2.88334 12.3167 2.28334 11.7167C1.68334 11.1167 1.20834 10.4111 0.858343 9.60001C0.508343 8.7889 0.333344 7.92223 0.333344 7.00001C0.333344 6.07779 0.508343 5.21112 0.858343 4.40001C1.20834 3.5889 1.68334 2.88334 2.28334 2.28334C2.88334 1.68334 3.5889 1.20834 4.40001 0.858343C5.21112 0.508343 6.07779 0.333344 7.00001 0.333344C7.92223 0.333344 8.7889 0.508343 9.60001 0.858343C10.4111 1.20834 11.1167 1.68334 11.7167 2.28334C12.3167 2.88334 12.7917 3.5889 13.1417 4.40001C13.4917 5.21112 13.6667 6.07779 13.6667 7.00001C13.6667 7.92223 13.4917 8.7889 13.1417 9.60001C12.7917 10.4111 12.3167 11.1167 11.7167 11.7167C11.1167 12.3167 10.4111 12.7917 9.60001 13.1417C8.7889 13.4917 7.92223 13.6667 7.00001 13.6667Z"),Xr(e,"width",n=16*t[0]),Xr(e,"height",a=16*t[0]),Xr(e,"viewBox","0 0 14 14"),Xr(e,"fill","none"),Xr(e,"xmlns","http://www.w3.org/2000/svg")},m(l,g){se(l,e,g),I(e,i)},p(l,[g]){g&2&&Xr(i,"fill",l[1]),g&1&&n!==(n=16*l[0])&&Xr(e,"width",n),g&1&&a!==(a=16*l[0])&&Xr(e,"height",a)},i:oe,o:oe,d(l){l&&te(e)}}}function E1(t,e,i){let{scale:n=1}=e,{color:a="#323232"}=e;return t.$$set=l=>{"scale"in l&&i(0,n=l.scale),"color"in l&&i(1,a=l.color)},[n,a]}class A1 extends tt{constructor(e){super(),et(this,e,E1,T1,Ye,{scale:0,color:1})}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}}const H6="",tc=(t,e,i)=>Mi(t,e,i,1),ul=(t,e,i)=>rt(t,e,e==="style"?w1(i):i),x1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,w1=t=>t.split(x1).map(e=>e+" !important").join(";");function P1(t){let e,i,n,a,l;return i=new A1({props:{scale:t[0],color:t[1]}}),{c(){e=F("button"),He(i.$$.fragment),ul(e,"type","button"),ul(e,"class","download-button svelte-1r5l0am"),tc(e,"outline-offset",4.8*t[0]+"px"),ul(e,"aria-label",bi("downloadAudio"))},m(g,p){se(g,e,p),Ge(i,e,null),n=!0,a||(l=[ge(e,"click",t[2]),ge(e,"mouseup",Zi)],a=!0)},p(g,[p]){const _={};p&1&&(_.scale=g[0]),p&2&&(_.color=g[1]),i.$set(_),(!n||p&1)&&tc(e,"outline-offset",4.8*g[0]+"px")},i(g){n||(J(i.$$.fragment,g),n=!0)},o(g){ae(i.$$.fragment,g),n=!1},d(g){g&&te(e),ze(i),a=!1,Mt(l)}}}function C1(t,e,i){let{contentIndex:n}=e,{audioIndex:a}=e,{videoIndex:l}=e,{scale:g=1}=e,{color:p="#323232"}=e,{onEvent:_=()=>{}}=e;const k=T=>{T.stopPropagation(),_(qe({type:"PressedDownload",description:"The download button next to a playlist item was pressed.",initiatedBy:"user",contentIndex:n,audioIndex:a,videoIndex:l}))};return t.$$set=T=>{"contentIndex"in T&&i(3,n=T.contentIndex),"audioIndex"in T&&i(4,a=T.audioIndex),"videoIndex"in T&&i(5,l=T.videoIndex),"scale"in T&&i(0,g=T.scale),"color"in T&&i(1,p=T.color),"onEvent"in T&&i(6,_=T.onEvent)},[g,p,k,n,a,l,_]}class L1 extends tt{constructor(e){super(),et(this,e,C1,P1,Ye,{contentIndex:3,audioIndex:4,videoIndex:5,scale:0,color:1,onEvent:6})}get contentIndex(){return this.$$.ctx[3]}set contentIndex(e){this.$$set({contentIndex:e}),w()}get audioIndex(){return this.$$.ctx[4]}set audioIndex(e){this.$$set({audioIndex:e}),w()}get videoIndex(){return this.$$.ctx[5]}set videoIndex(e){this.$$set({videoIndex:e}),w()}get scale(){return this.$$.ctx[0]}set scale(e){this.$$set({scale:e}),w()}get color(){return this.$$.ctx[1]}set color(e){this.$$set({color:e}),w()}get onEvent(){return this.$$.ctx[6]}set onEvent(e){this.$$set({onEvent:e}),w()}}const K6="",Dn=(t,e,i)=>Mi(t,e,i,1),pr=(t,e,i)=>rt(t,e,e==="style"?R1(i):i),I1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,R1=t=>t.split(I1).map(e=>e+" !important").join(";");function ic(t,e,i){const n=t.slice();n[18]=e[i].title,n[19]=e[i].duration,n[20]=e[i].audio,n[21]=e[i].video,n[25]=i;const a=n[14](n[20],n[21]);return n[22]=a[0],n[23]=a[1],n}function D1(t){let e,i=t[25]+1+"",n;return{c(){e=F("span"),n=Le(i),pr(e,"class","number svelte-1d5um2m"),Dn(e,"color",t[1]),pr(e,"aria-hidden","true")},m(a,l){se(a,e,l),I(e,n)},p(a,l){l&2&&Dn(e,"color",a[1])},i:oe,o:oe,d(a){a&&te(e)}}}function O1(t){let e,i,n;return i=new ec({props:{color:t[3],scale:t[10]}}),{c(){e=F("span"),He(i.$$.fragment),pr(e,"class","speaker svelte-1d5um2m")},m(a,l){se(a,e,l),Ge(i,e,null),n=!0},p(a,l){const g={};l&8&&(g.color=a[3]),l&1024&&(g.scale=a[10]),i.$set(g)},i(a){n||(J(i.$$.fragment,a),n=!0)},o(a){ae(i.$$.fragment,a),n=!1},d(a){a&&te(e),ze(i)}}}function rc(t){let e,i;return e=new L1({props:{onEvent:t[7],color:t[3],contentIndex:t[25],audioIndex:t[22],videoIndex:t[23]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a&128&&(l.onEvent=n[7]),a&8&&(l.color=n[3]),a&16&&(l.audioIndex=n[22]),a&16&&(l.videoIndex=n[23]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function nc(t){let e,i,n,a,l,g,p,_,k,T,C,U,V,N,Q,W;const ue=[O1,D1],ie=[];function be(fe,pe){return fe[25]===fe[5]?0:1}i=be(t),n=ie[i]=ue[i](t),g=new ll({props:{title:t[18],scale:t[10],maxLines:t[6]?3:2,bold:t[25]===t[5],color:t[1]}});let Se=(t[22]!==-1||t[23]!==-1)&&rc(t);return C=new $u({props:{duration:t[19],scale:t[10],bold:t[25]===t[5],color:t[1]}}),{c(){e=F("button"),n.c(),a=Ce(),l=F("span"),He(g.$$.fragment),p=Ce(),_=F("span"),Se&&Se.c(),k=Ce(),T=F("span"),He(C.$$.fragment),U=Ce(),pr(l,"class","title svelte-1d5um2m"),pr(_,"class","download svelte-1d5um2m"),pr(T,"class","duration svelte-1d5um2m"),pr(e,"type","button"),pr(e,"class","item svelte-1d5um2m"),pr(e,"aria-label",V=t[18]),je(e,"active",t[25]===t[5])},m(fe,pe){se(fe,e,pe),ie[i].m(e,null),I(e,a),I(e,l),Ge(g,l,null),I(e,p),I(e,_),Se&&Se.m(_,null),I(e,k),I(e,T),Ge(C,T,null),I(e,U),N=!0,Q||(W=[ge(e,"click",t[11](t[25])),ge(e,"keydown",t[12]),ge(e,"focus",t[13]),ge(e,"mouseup",Zi)],Q=!0)},p(fe,pe){t=fe;let Z=i;i=be(t),i===Z?ie[i].p(t,pe):(Lt(),ae(ie[Z],1,1,()=>{ie[Z]=null}),It(),n=ie[i],n?n.p(t,pe):(n=ie[i]=ue[i](t),n.c()),J(n,1),n.m(e,a));const L={};pe&16&&(L.title=t[18]),pe&1024&&(L.scale=t[10]),pe&64&&(L.maxLines=t[6]?3:2),pe&32&&(L.bold=t[25]===t[5]),pe&2&&(L.color=t[1]),g.$set(L),t[22]!==-1||t[23]!==-1?Se?(Se.p(t,pe),pe&16&&J(Se,1)):(Se=rc(t),Se.c(),J(Se,1),Se.m(_,null)):Se&&(Lt(),ae(Se,1,1,()=>{Se=null}),It());const le={};pe&16&&(le.duration=t[19]),pe&1024&&(le.scale=t[10]),pe&32&&(le.bold=t[25]===t[5]),pe&2&&(le.color=t[1]),C.$set(le),(!N||pe&16&&V!==(V=t[18]))&&pr(e,"aria-label",V),(!N||pe&32)&&je(e,"active",t[25]===t[5])},i(fe){N||(J(n),J(g.$$.fragment,fe),J(Se),J(C.$$.fragment,fe),N=!0)},o(fe){ae(n),ae(g.$$.fragment,fe),ae(Se),ae(C.$$.fragment,fe),N=!1},d(fe){fe&&te(e),ie[i].d(),ze(g),Se&&Se.d(),ze(C),Q=!1,Mt(W)}}}function B1(t){let e,i,n,a=t[4],l=[];for(let p=0;p<a.length;p+=1)l[p]=nc(ic(t,a,p));const g=p=>ae(l[p],1,1,()=>{l[p]=null});return{c(){e=F("div"),i=F("div");for(let p=0;p<l.length;p+=1)l[p].c();pr(i,"class","scrollable svelte-1d5um2m"),pr(i,"tabindex","-1"),pr(e,"class","playlist svelte-1d5um2m"),Dn(e,"--desktop-rows",t[8]),Dn(e,"--mobile-rows",t[9]),Dn(e,"background",t[2]),je(e,"mobile",t[6]),je(e,"larger",t[0])},m(p,_){se(p,e,_),I(e,i);for(let k=0;k<l.length;k+=1)l[k]&&l[k].m(i,null);n=!0},p(p,[_]){if(_&31994){a=p[4];let k;for(k=0;k<a.length;k+=1){const T=ic(p,a,k);l[k]?(l[k].p(T,_),J(l[k],1)):(l[k]=nc(T),l[k].c(),J(l[k],1),l[k].m(i,null))}for(Lt(),k=a.length;k<l.length;k+=1)g(k);It()}(!n||_&256)&&Dn(e,"--desktop-rows",p[8]),(!n||_&512)&&Dn(e,"--mobile-rows",p[9]),(!n||_&4)&&Dn(e,"background",p[2]),(!n||_&64)&&je(e,"mobile",p[6]),(!n||_&1)&&je(e,"larger",p[0])},i(p){if(!n){for(let _=0;_<a.length;_+=1)J(l[_]);n=!0}},o(p){l=l.filter(Boolean);for(let _=0;_<l.length;_+=1)ae(l[_]);n=!1},d(p){p&&te(e),Ln(l,p)}}}function M1(t,e,i){let n,a,l,g,{style:p="auto"}=e,{downloadFormats:_=[]}=e,{larger:k=!1}=e,{textColor:T="#111"}=e,{backgroundColor:C="#f5f5f5"}=e,{iconColor:U="#000"}=e,{content:V=[]}=e,{index:N=0}=e,{isMobile:Q}=e,{onEvent:W}=e;const ue=fe=>()=>{W(qe({type:"PressedPlaylistItem",description:"A playlist item was pressed.",initiatedBy:"user",index:fe}))},ie=fe=>{if(fe.key==="ArrowUp"){fe.preventDefault();const pe=fe.target.previousElementSibling;pe&&pe.focus()}if(fe.key==="ArrowDown"){fe.preventDefault();const pe=fe.target.nextElementSibling;pe&&pe.focus()}},be=fe=>{const pe=fe.target.parentNode,Z=Math.round(pe.scrollTop/10)*10;pe.scrollTop=Z},Se=(fe,pe)=>{var Z,L;for(const le of _){for(const[z,Ke]of(fe||[]).entries())if((Z=Ke.url)!=null&&Z.endsWith(`.${le}`))return[z,-1];for(const[z,Ke]of(pe||[]).entries())if((L=Ke.url)!=null&&L.endsWith(`.${le}`))return[-1,z]}return[-1,-1]};return t.$$set=fe=>{"style"in fe&&i(15,p=fe.style),"downloadFormats"in fe&&i(16,_=fe.downloadFormats),"larger"in fe&&i(0,k=fe.larger),"textColor"in fe&&i(1,T=fe.textColor),"backgroundColor"in fe&&i(2,C=fe.backgroundColor),"iconColor"in fe&&i(3,U=fe.iconColor),"content"in fe&&i(4,V=fe.content),"index"in fe&&i(5,N=fe.index),"isMobile"in fe&&i(6,Q=fe.isMobile),"onEvent"in fe&&i(7,W=fe.onEvent)},t.$$.update=()=>{t.$$.dirty&32768&&i(8,[n,a,l]=p.split("-"),a,(i(9,l),i(15,p),i(8,a))),t.$$.dirty&256&&i(8,a=a||5),t.$$.dirty&768&&i(9,l=l||a||4),t.$$.dirty&1&&i(10,g=k?1.25:1)},[k,T,C,U,V,N,Q,W,a,l,g,ue,ie,be,Se,p,_]}class N1 extends tt{constructor(e){super(),et(this,e,M1,B1,Ye,{style:15,downloadFormats:16,larger:0,textColor:1,backgroundColor:2,iconColor:3,content:4,index:5,isMobile:6,onEvent:7})}get style(){return this.$$.ctx[15]}set style(e){this.$$set({style:e}),w()}get downloadFormats(){return this.$$.ctx[16]}set downloadFormats(e){this.$$set({downloadFormats:e}),w()}get larger(){return this.$$.ctx[0]}set larger(e){this.$$set({larger:e}),w()}get textColor(){return this.$$.ctx[1]}set textColor(e){this.$$set({textColor:e}),w()}get backgroundColor(){return this.$$.ctx[2]}set backgroundColor(e){this.$$set({backgroundColor:e}),w()}get iconColor(){return this.$$.ctx[3]}set iconColor(e){this.$$set({iconColor:e}),w()}get content(){return this.$$.ctx[4]}set content(e){this.$$set({content:e}),w()}get index(){return this.$$.ctx[5]}set index(e){this.$$set({index:e}),w()}get isMobile(){return this.$$.ctx[6]}set isMobile(e){this.$$set({isMobile:e}),w()}get onEvent(){return this.$$.ctx[7]}set onEvent(e){this.$$set({onEvent:e}),w()}}const F1=(t,e,i)=>rt(t,e,e==="style"?V1(i):i),U1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,V1=t=>t.split(U1).map(e=>e+" !important").join(";");function W1(t){let e,i,n,a;const l=t[9].default,g=gs(l,t,t[8],null);return{c(){e=F("div"),g&&g.c(),F1(e,"class","hoverable")},m(p,_){se(p,e,_),g&&g.m(e,null),i=!0,n||(a=[ge(e,"mouseenter",t[1]),ge(e,"mouseleave",t[2]),ge(e,"mousemove",function(){Cn(t[0]!==1/0&&t[3])&&(t[0]!==1/0&&t[3]).apply(this,arguments)})],n=!0)},p(p,[_]){t=p,g&&g.p&&(!i||_&256)&&ms(g,l,t,t[8],i?vs(l,t[8],_,null):ps(t[8]),null)},i(p){i||(J(g,p),i=!0)},o(p){ae(g,p),i=!1},d(p){p&&te(e),g&&g.d(p),n=!1,Mt(a)}}}function j1(t,e,i){let{$$slots:n={},$$scope:a}=e,{exitDelay:l=0}=e,{idleDelay:g=1/0}=e,{isHovering:p=!1}=e,_=!0,k=!0,T,C;const U=()=>{T&&clearTimeout(T),C&&clearTimeout(C),i(6,_=!1),i(7,k=!1)},V=()=>{T&&clearTimeout(T),i(6,_=!1),T=setTimeout(()=>i(6,_=!0),l)},N=()=>{C&&clearTimeout(C),i(7,k=!1),C=setTimeout(()=>i(7,k=!0),g)};return Kh(()=>{T&&clearTimeout(T),C&&clearTimeout(C)}),t.$$set=Q=>{"exitDelay"in Q&&i(5,l=Q.exitDelay),"idleDelay"in Q&&i(0,g=Q.idleDelay),"isHovering"in Q&&i(4,p=Q.isHovering),"$$scope"in Q&&i(8,a=Q.$$scope)},t.$$.update=()=>{t.$$.dirty&192&&i(4,p=!_&&!k)},[g,U,V,N,p,l,_,k,a,n]}class G1 extends tt{constructor(e){super(),et(this,e,j1,W1,Ye,{exitDelay:5,idleDelay:0,isHovering:4})}get exitDelay(){return this.$$.ctx[5]}set exitDelay(e){this.$$set({exitDelay:e}),w()}get idleDelay(){return this.$$.ctx[0]}set idleDelay(e){this.$$set({idleDelay:e}),w()}get isHovering(){return this.$$.ctx[4]}set isHovering(e){this.$$set({isHovering:e}),w()}}const Y6="",z1=(t,e,i)=>rt(t,e,e==="style"?K1(i):i),H1=/;(?!([^()]*\([^()]*\))*[^()]*\))/,K1=t=>t.split(H1).map(e=>e+" !important").join(";");function Y1(t){let e,i;const n=t[7].default,a=gs(n,t,t[6],null);return{c(){e=F("div"),a&&a.c(),z1(e,"class","visibility svelte-1exdg3")},m(l,g){se(l,e,g),a&&a.m(e,null),t[8](e),i=!0},p(l,[g]){a&&a.p&&(!i||g&64)&&ms(a,n,l,l[6],i?vs(n,l[6],g,null):ps(l[6]),null)},i(l){i||(J(a,l),i=!0)},o(l){ae(a,l),i=!1},d(l){l&&te(e),a&&a.d(l),t[8](null)}}}function q1(t,e,i){let{$$slots:n={},$$scope:a}=e,l,{enabled:g=!1}=e,{relativeY:p=void 0}=e,{absoluteY:_=void 0}=e,{isVisible:k=void 0}=e,{onEvent:T=()=>{}}=e;const C=([V])=>{i(1,p=V.boundingClientRect.y),i(2,_=p+window.scrollY),k!==V.isIntersecting&&(i(3,k=V.isIntersecting),T(qe({type:"VisibilityChanged",description:"The player was scrolled into or out of view.",initiatedBy:"user",isVisible:k})))};Ko(()=>{if(!g||typeof IntersectionObserver=="undefined")return;const V=new IntersectionObserver(C,{threshold:.5});return V.observe(l),()=>{V.unobserve(l),C([{isIntersecting:!0,boundingClientRect:{y:1/0}}])}});function U(V){Ne[V?"unshift":"push"](()=>{l=V,i(0,l)})}return t.$$set=V=>{"enabled"in V&&i(4,g=V.enabled),"relativeY"in V&&i(1,p=V.relativeY),"absoluteY"in V&&i(2,_=V.absoluteY),"isVisible"in V&&i(3,k=V.isVisible),"onEvent"in V&&i(5,T=V.onEvent),"$$scope"in V&&i(6,a=V.$$scope)},[l,p,_,k,g,T,a,n,U]}class X1 extends tt{constructor(e){super(),et(this,e,q1,Y1,Ye,{enabled:4,relativeY:1,absoluteY:2,isVisible:3,onEvent:5})}get enabled(){return this.$$.ctx[4]}set enabled(e){this.$$set({enabled:e}),w()}get relativeY(){return this.$$.ctx[1]}set relativeY(e){this.$$set({relativeY:e}),w()}get absoluteY(){return this.$$.ctx[2]}set absoluteY(e){this.$$set({absoluteY:e}),w()}get isVisible(){return this.$$.ctx[3]}set isVisible(e){this.$$set({isVisible:e}),w()}get onEvent(){return this.$$.ctx[5]}set onEvent(e){this.$$set({onEvent:e}),w()}}const Z1=({playerStyle:t,width:e})=>t==="standard"&&e<380||t==="large"&&e<380||t==="video"&&e<480||t==="screen"&&e<640,J1=({playerStyle:t,position:e,isMobile:i,isAdvert:n})=>t==="screen"||t==="large"&&i?"symmetrical":t==="standard"&&e==="left"?"left-to-right":t==="standard"&&i||t==="standard"&&e==="right"&&n?"right-to-left":t==="standard"&&e==="right"?"left-to-right-but-swap-ends":t==="small"&&e==="left"?"left-to-right":t==="small"&&e==="right"?"right-to-left":t==="video"&&e==="left"?"left-to-right":t==="video"&&i||t==="video"&&e==="right"?"right-to-left":"left-to-right",Q1=["small","standard","large","screen","video"],cl=t=>Q1.indexOf(t)!==-1,$1=()=>document.fullscreenEnabled||document.webkitFullscreenEnabled,ey=t=>{t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()},ty=()=>{document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},sc=()=>document.fullscreenElement||document.webkitCurrentFullScreenElement,q6="",za=(t,e,i)=>Mi(t,e,i,1),cn=(t,e,i)=>rt(t,e,e==="style"?ry(i):i),iy=/;(?!([^()]*\([^()]*\))*[^()]*\))/,ry=t=>t.split(iy).map(e=>e+" !important").join(";");function ac(t){let e,i,n,a,l,g,p,_,k,T;function C(N){t[73](N)}let U={exitDelay:t[28]?500:0,idleDelay:t[19]?3e3:1/0,$$slots:{default:[fy]},$$scope:{ctx:t}};t[18]!==void 0&&(U.isHovering=t[18]),i=new G1({props:U}),Ne.push(()=>Ze(i,"isHovering",C));let V=t[37]&&pc(t);return{c(){e=F("div"),He(i.$$.fragment),a=Ce(),V&&V.c(),cn(e,"class",l=Tu(t[35])+" svelte-19pq52p"),za(e,"width",t[45]),Wt(()=>t[74].call(e)),je(e,"mobile",t[30]),je(e,"advert_",t[25]),je(e,"hovering",t[18]),je(e,"collapsed",t[40]),je(e,"animating",t[34])},m(N,Q){se(N,e,Q),Ge(i,e,null),I(e,a),V&&V.m(e,null),g=Vh(e,t[74].bind(e)),_=!0,k||(T=ge(e,"outrostart",t[56]),k=!0)},p(N,Q){const W={};Q[0]&268435456&&(W.exitDelay=N[28]?500:0),Q[0]&524288&&(W.idleDelay=N[19]?3e3:1/0),Q[0]&2147482015|Q[1]&33529831|Q[2]&32768&&(W.$$scope={dirty:Q,ctx:N}),!n&&Q[0]&262144&&(n=!0,W.isHovering=N[18],Xe(()=>n=!1)),i.$set(W),N[37]?V?(V.p(N,Q),Q[1]&64&&J(V,1)):(V=pc(N),V.c(),J(V,1),V.m(e,null)):V&&(Lt(),ae(V,1,1,()=>{V=null}),It()),(!_||Q[1]&16&&l!==(l=Tu(N[35])+" svelte-19pq52p"))&&cn(e,"class",l),(!_||Q[1]&16384)&&za(e,"width",N[45]),(!_||Q[0]&1073741824|Q[1]&16)&&je(e,"mobile",N[30]),(!_||Q[0]&33554432|Q[1]&16)&&je(e,"advert_",N[25]),(!_||Q[0]&262144|Q[1]&16)&&je(e,"hovering",N[18]),(!_||Q[1]&528)&&je(e,"collapsed",N[40]),(!_||Q[1]&24)&&je(e,"animating",N[34])},i(N){_||(J(i.$$.fragment,N),J(V),Wt(()=>{_&&(p||(p=Du(e,t[44],{},!0)),p.run(1))}),_=!0)},o(N){ae(i.$$.fragment,N),ae(V),p||(p=Du(e,t[44],{},!1)),p.run(0),_=!1},d(N){N&&te(e),ze(i),V&&V.d(),g(),N&&p&&p.end(),k=!1,T()}}}function oc(t){let e,i;return{c(){e=F("div"),cn(e,"class","video-placeholder svelte-19pq52p"),cn(e,"style",i=t[43]?`background-image: url(${t[43]})`:"")},m(n,a){se(n,e,a)},p(n,a){a[1]&4096&&i!==(i=n[43]?`background-image: url(${n[43]})`:"")&&cn(e,"style",i)},d(n){n&&te(e)}}}function lc(t){let e,i;return e=new E_({props:{onEvent:t[15],src:t[42],href:t[41],scale:t[24]&&!t[30]?1.5:1}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&2048&&(l.src=n[42]),a[1]&1024&&(l.href=n[41]),a[0]&1090519040&&(l.scale=n[24]&&!n[30]?1.5:1),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function uc(t){let e,i,n,a,l;return i=new Qu({props:{title:t[7],visible:!t[25],playerStyle:t[3],scale:t[24]?2:1,color:t[52]}}),a=new ll({props:{title:t[29].title,maxLines:t[30]||t[24]?3:1,center:t[24],scale:t[24]?2:1,maxWidth:t[24]&&!t[30]?640:t[24]?320:null,color:t[52]}}),{c(){e=F("div"),He(i.$$.fragment),n=Ce(),He(a.$$.fragment),cn(e,"class","summary svelte-19pq52p")},m(g,p){se(g,e,p),Ge(i,e,null),I(e,n),Ge(a,e,null),l=!0},p(g,p){const _={};p[0]&128&&(_.title=g[7]),p[0]&33554432&&(_.visible=!g[25]),p[0]&8&&(_.playerStyle=g[3]),p[0]&16777216&&(_.scale=g[24]?2:1),p[1]&2097152&&(_.color=g[52]),i.$set(_);const k={};p[0]&536870912&&(k.title=g[29].title),p[0]&1090519040&&(k.maxLines=g[30]||g[24]?3:1),p[0]&16777216&&(k.center=g[24]),p[0]&16777216&&(k.scale=g[24]?2:1),p[0]&1090519040&&(k.maxWidth=g[24]&&!g[30]?640:g[24]?320:null),p[1]&2097152&&(k.color=g[52]),a.$set(k)},i(g){l||(J(i.$$.fragment,g),J(a.$$.fragment,g),l=!0)},o(g){ae(i.$$.fragment,g),ae(a.$$.fragment,g),l=!1},d(g){g&&te(e),ze(i),ze(a)}}}function ny(t){let e,i;return e=new tm({props:{onEvent:t[15],isPlaying:t[54],scale:t[49],color:t[50]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&8388608&&(l.isPlaying=n[54]),a[1]&262144&&(l.scale=n[49]),a[1]&524288&&(l.color=n[50]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function sy(t){let e,i;return e=new z_({props:{onEvent:t[15],progress:t[53],enabled:t[24]||t[22],bold:t[22],scale:t[49],color:t[32],$$slots:{default:[ny]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&4194304&&(l.progress=n[53]),a[0]&20971520&&(l.enabled=n[24]||n[22]),a[0]&4194304&&(l.bold=n[22]),a[1]&262144&&(l.scale=n[49]),a[1]&2&&(l.color=n[32]),a[0]&32768|a[1]&9175040|a[2]&32768&&(l.$$scope={dirty:a,ctx:n}),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function cc(t){let e,i;return e=new Qu({props:{title:t[4]||bi("listenToThisArticle"),visible:!t[25],playerStyle:t[3],collapsible:t[28],collapsed:t[40],color:t[52]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&16&&(l.title=n[4]||bi("listenToThisArticle")),a[0]&33554432&&(l.visible=!n[25]),a[0]&8&&(l.playerStyle=n[3]),a[0]&268435456&&(l.collapsible=n[28]),a[1]&512&&(l.collapsed=n[40]),a[1]&2097152&&(l.color=n[52]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function dc(t){let e,i,n,a,l,g;return e=new am({props:{onEvent:t[15],speed:t[13],scale:t[31],color:t[19]?t[50]:t[52]}}),n=new Cm({props:{onEvent:t[15],style:t[33],scale:t[31],color:t[50]}}),l=new Qm({props:{onEvent:t[15],style:t[33],scale:t[31],color:t[50]}}),{c(){He(e.$$.fragment),i=Ce(),He(n.$$.fragment),a=Ce(),He(l.$$.fragment)},m(p,_){Ge(e,p,_),se(p,i,_),Ge(n,p,_),se(p,a,_),Ge(l,p,_),g=!0},p(p,_){const k={};_[0]&32768&&(k.onEvent=p[15]),_[0]&8192&&(k.speed=p[13]),_[1]&1&&(k.scale=p[31]),_[0]&524288|_[1]&2621440&&(k.color=p[19]?p[50]:p[52]),e.$set(k);const T={};_[0]&32768&&(T.onEvent=p[15]),_[1]&4&&(T.style=p[33]),_[1]&1&&(T.scale=p[31]),_[1]&524288&&(T.color=p[50]),n.$set(T);const C={};_[0]&32768&&(C.onEvent=p[15]),_[1]&4&&(C.style=p[33]),_[1]&1&&(C.scale=p[31]),_[1]&524288&&(C.color=p[50]),l.$set(C)},i(p){g||(J(e.$$.fragment,p),J(n.$$.fragment,p),J(l.$$.fragment,p),g=!0)},o(p){ae(e.$$.fragment,p),ae(n.$$.fragment,p),ae(l.$$.fragment,p),g=!1},d(p){ze(e,p),p&&te(i),ze(n,p),p&&te(a),ze(l,p)}}}function fc(t){let e,i;return e=new ll({props:{title:t[29].title,maxLines:1,bold:!0,scale:1.2,flex:.52,color:t[52]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&536870912&&(l.title=n[29].title),a[1]&2097152&&(l.color=n[52]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function hc(t){let e,i;return e=new N_({props:{onEvent:t[15],progress:t[53],fullWidth:t[19],readonly:t[25],color:t[32]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&4194304&&(l.progress=n[53]),a[0]&524288&&(l.fullWidth=n[19]),a[0]&33554432&&(l.readonly=n[25]),a[1]&2&&(l.color=n[32]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function gc(t){let e,i,n,a;return e=new Hp({props:{onEvent:t[15],href:t[14].clickThroughUrl,playerStyle:t[3],scale:t[24]&&!t[30]?2:t[24]?1.6:1,controlsOrder:t[20],color:t[19]?"rgba(250, 250, 250, 0.8)":t[52],largeImage:t[42],isMobile:t[30]}}),n=new n_({props:{onEvent:t[15],href:t[14].clickThroughUrl,playerStyle:t[3],scale:t[31],controlsOrder:t[20],color:t[50]}}),{c(){He(e.$$.fragment),i=Ce(),He(n.$$.fragment)},m(l,g){Ge(e,l,g),se(l,i,g),Ge(n,l,g),a=!0},p(l,g){const p={};g[0]&32768&&(p.onEvent=l[15]),g[0]&16384&&(p.href=l[14].clickThroughUrl),g[0]&8&&(p.playerStyle=l[3]),g[0]&1090519040&&(p.scale=l[24]&&!l[30]?2:l[24]?1.6:1),g[0]&1048576&&(p.controlsOrder=l[20]),g[0]&524288|g[1]&2097152&&(p.color=l[19]?"rgba(250, 250, 250, 0.8)":l[52]),g[1]&2048&&(p.largeImage=l[42]),g[0]&1073741824&&(p.isMobile=l[30]),e.$set(p);const _={};g[0]&32768&&(_.onEvent=l[15]),g[0]&16384&&(_.href=l[14].clickThroughUrl),g[0]&8&&(_.playerStyle=l[3]),g[1]&1&&(_.scale=l[31]),g[0]&1048576&&(_.controlsOrder=l[20]),g[1]&524288&&(_.color=l[50]),n.$set(_)},i(l){a||(J(e.$$.fragment,l),J(n.$$.fragment,l),a=!0)},o(l){ae(e.$$.fragment,l),ae(n.$$.fragment,l),a=!1},d(l){ze(e,l),l&&te(i),ze(n,l)}}}function vc(t){let e,i;return e=new bp({props:{playerStyle:t[3],isMobile:t[30],isAdvert:t[25],scale:t[31],$$slots:{default:[uy]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&8&&(l.playerStyle=n[3]),a[0]&1073741824&&(l.isMobile=n[30]),a[0]&33554432&&(l.isAdvert=n[25]),a[1]&1&&(l.scale=n[31]),a[0]&554205192|a[1]&524385|a[2]&32768&&(l.$$scope={dirty:a,ctx:n}),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function ay(t){let e,i;return e=new vp({props:{onEvent:t[15],scale:t[31],color:t[50],playlistShowing:t[37],playerStyle:t[3]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&1&&(l.scale=n[31]),a[1]&524288&&(l.color=n[50]),a[1]&64&&(l.playlistShowing=n[37]),a[0]&8&&(l.playerStyle=n[3]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function oy(t){let e,i;return e=new y_({props:{onEvent:t[15],scale:t[31],href:t[29].sourceUrl,color:t[50]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&1&&(l.scale=n[31]),a[0]&536870912&&(l.href=n[29].sourceUrl),a[1]&524288&&(l.color=n[50]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function ly(t){let e,i;return e=new Lp({props:{onEvent:t[15],scale:t[31],color:t[50]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&1&&(l.scale=n[31]),a[1]&524288&&(l.color=n[50]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function uy(t){let e,i,n,a,l;const g=[ly,oy,ay],p=[];function _(k,T){return T[0]&524288&&(e=null),e==null&&(e=!!(k[19]&&$1())),e?0:k[24]&&k[29].sourceUrl?1:k[36]?2:-1}return~(i=_(t,[-1,-1,-1]))&&(n=p[i]=g[i](t)),{c(){n&&n.c(),a=Zn()},m(k,T){~i&&p[i].m(k,T),se(k,a,T),l=!0},p(k,T){let C=i;i=_(k,T),i===C?~i&&p[i].p(k,T):(n&&(Lt(),ae(p[C],1,1,()=>{p[C]=null}),It()),~i?(n=p[i],n?n.p(k,T):(n=p[i]=g[i](k),n.c()),J(n,1),n.m(a.parentNode,a)):n=null)},i(k){l||(J(n),l=!0)},o(k){ae(n),l=!1},d(k){~i&&p[i].d(k),k&&te(a)}}}function mc(t){let e,i,n,a;const l=[dy,cy],g=[];function p(_,k){return _[39]?0:1}return i=p(t),n=g[i]=l[i](t),{c(){e=F("div"),n.c(),cn(e,"class","end svelte-19pq52p")},m(_,k){se(_,e,k),g[i].m(e,null),a=!0},p(_,k){let T=i;i=p(_),i===T?g[i].p(_,k):(Lt(),ae(g[T],1,1,()=>{g[T]=null}),It(),n=g[i],n?n.p(_,k):(n=g[i]=l[i](_),n.c()),J(n,1),n.m(e,null))},i(_){a||(J(n),a=!0)},o(_){ae(n),a=!1},d(_){_&&te(e),g[i].d()}}}function cy(t){let e,i;return e=new g_({props:{onEvent:t[15],scale:t[48],visible:t[24]||t[18]||t[54]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&131072&&(l.scale=n[48]),a[0]&17039360|a[1]&8388608&&(l.visible=n[24]||n[18]||n[54]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function dy(t){let e,i;return e=new Vp({props:{onEvent:t[15],scale:t[47],margin:t[46],color:t[50]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[1]&65536&&(l.scale=n[47]),a[1]&32768&&(l.margin=n[46]),a[1]&524288&&(l.color=n[50]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function fy(t){let e,i,n,a,l,g,p,_,k,T,C,U,V,N,Q,W,ue,ie,be,Se,fe,pe=t[19]&&(t[43]||!t[16])&&oc(t),Z=t[42]&&(t[55]||t[24])&&lc(t),L=(t[55]||t[24])&&uc(t);function le(q){t[70](q)}function z(q){t[71](q)}function Ke(q){t[72](q)}let Ie={onEvent:t[15],enabled:!t[8],$$slots:{default:[sy]},$$scope:{ctx:t}};t[0]!==void 0&&(Ie.isVisible=t[0]),t[1]!==void 0&&(Ie.relativeY=t[1]),t[2]!==void 0&&(Ie.absoluteY=t[2]),g=new X1({props:Ie}),Ne.push(()=>Ze(g,"isVisible",le)),Ne.push(()=>Ze(g,"relativeY",z)),Ne.push(()=>Ze(g,"absoluteY",Ke));let Ee=(t[26]&&t[27]||t[22])&&cc(t),ke=(!t[22]&&!t[27]&&!t[25]||t[24]&&t[25])&&dc(t),G=t[26]&&t[8]&&!t[27]&&!t[25]&&t[17]>720&&t[20]!=="left-to-right-but-swap-ends"&&fc(t);N=new m1({props:{currentTime:t[12],duration:t[11],playerStyle:t[3],isAdvert:t[25],isMobile:t[30],isStopped:t[27],positionClasses:t[21],collapsed:t[40],largeImage:t[42],color:t[19]?t[50]:t[52]}});let X=(t[26]&&!t[30]&&!t[27]||t[55]&&!t[30]||t[19]&&!t[27])&&hc(t),B=t[25]&&!t[23]&&gc(t),Ue=!t[27]&&vc(t),De=(t[39]||t[38])&&mc(t);return{c(){pe&&pe.c(),e=Ce(),i=F("div"),Z&&Z.c(),n=Ce(),L&&L.c(),a=Ce(),l=F("div"),He(g.$$.fragment),T=Ce(),Ee&&Ee.c(),C=Ce(),ke&&ke.c(),U=Ce(),G&&G.c(),V=Ce(),He(N.$$.fragment),Q=Ce(),X&&X.c(),W=Ce(),B&&B.c(),ue=Ce(),Ue&&Ue.c(),ie=Ce(),De&&De.c(),cn(l,"class","controls svelte-19pq52p"),cn(i,"class","main svelte-19pq52p"),za(i,"background",t[19]?"transparent":t[51]),je(i,"no-image",!t[42])},m(q,ve){pe&&pe.m(q,ve),se(q,e,ve),se(q,i,ve),Z&&Z.m(i,null),I(i,n),L&&L.m(i,null),I(i,a),I(i,l),Ge(g,l,null),I(l,T),Ee&&Ee.m(l,null),I(l,C),ke&&ke.m(l,null),I(l,U),G&&G.m(l,null),I(l,V),Ge(N,l,null),I(l,Q),X&&X.m(l,null),I(l,W),B&&B.m(l,null),I(l,ue),Ue&&Ue.m(l,null),I(i,ie),De&&De.m(i,null),be=!0,Se||(fe=[ge(i,"mousedown",t[57]),ge(i,"keyup",null)],Se=!0)},p(q,ve){q[19]&&(q[43]||!q[16])?pe?pe.p(q,ve):(pe=oc(q),pe.c(),pe.m(e.parentNode,e)):pe&&(pe.d(1),pe=null),q[42]&&(q[55]||q[24])?Z?(Z.p(q,ve),ve[0]&16777216|ve[1]&16779264&&J(Z,1)):(Z=lc(q),Z.c(),J(Z,1),Z.m(i,n)):Z&&(Lt(),ae(Z,1,1,()=>{Z=null}),It()),q[55]||q[24]?L?(L.p(q,ve),ve[0]&16777216|ve[1]&16777216&&J(L,1)):(L=uc(q),L.c(),J(L,1),L.m(i,a)):L&&(Lt(),ae(L,1,1,()=>{L=null}),It());const at={};ve[0]&32768&&(at.onEvent=q[15]),ve[0]&256&&(at.enabled=!q[8]),ve[0]&21004288|ve[1]&13369346|ve[2]&32768&&(at.$$scope={dirty:ve,ctx:q}),!p&&ve[0]&1&&(p=!0,at.isVisible=q[0],Xe(()=>p=!1)),!_&&ve[0]&2&&(_=!0,at.relativeY=q[1],Xe(()=>_=!1)),!k&&ve[0]&4&&(k=!0,at.absoluteY=q[2],Xe(()=>k=!1)),g.$set(at),q[26]&&q[27]||q[22]?Ee?(Ee.p(q,ve),ve[0]&205520896&&J(Ee,1)):(Ee=cc(q),Ee.c(),J(Ee,1),Ee.m(l,C)):Ee&&(Lt(),ae(Ee,1,1,()=>{Ee=null}),It()),!q[22]&&!q[27]&&!q[25]||q[24]&&q[25]?ke?(ke.p(q,ve),ve[0]&188743680&&J(ke,1)):(ke=dc(q),ke.c(),J(ke,1),ke.m(l,U)):ke&&(Lt(),ae(ke,1,1,()=>{ke=null}),It()),q[26]&&q[8]&&!q[27]&&!q[25]&&q[17]>720&&q[20]!=="left-to-right-but-swap-ends"?G?(G.p(q,ve),ve[0]&236060928&&J(G,1)):(G=fc(q),G.c(),J(G,1),G.m(l,V)):G&&(Lt(),ae(G,1,1,()=>{G=null}),It());const Qe={};ve[0]&4096&&(Qe.currentTime=q[12]),ve[0]&2048&&(Qe.duration=q[11]),ve[0]&8&&(Qe.playerStyle=q[3]),ve[0]&33554432&&(Qe.isAdvert=q[25]),ve[0]&1073741824&&(Qe.isMobile=q[30]),ve[0]&134217728&&(Qe.isStopped=q[27]),ve[0]&2097152&&(Qe.positionClasses=q[21]),ve[1]&512&&(Qe.collapsed=q[40]),ve[1]&2048&&(Qe.largeImage=q[42]),ve[0]&524288|ve[1]&2621440&&(Qe.color=q[19]?q[50]:q[52]),N.$set(Qe),q[26]&&!q[30]&&!q[27]||q[55]&&!q[30]||q[19]&&!q[27]?X?(X.p(q,ve),ve[0]&1275592704|ve[1]&16777216&&J(X,1)):(X=hc(q),X.c(),J(X,1),X.m(l,W)):X&&(Lt(),ae(X,1,1,()=>{X=null}),It()),q[25]&&!q[23]?B?(B.p(q,ve),ve[0]&41943040&&J(B,1)):(B=gc(q),B.c(),J(B,1),B.m(l,ue)):B&&(Lt(),ae(B,1,1,()=>{B=null}),It()),q[27]?Ue&&(Lt(),ae(Ue,1,1,()=>{Ue=null}),It()):Ue?(Ue.p(q,ve),ve[0]&134217728&&J(Ue,1)):(Ue=vc(q),Ue.c(),J(Ue,1),Ue.m(l,null)),q[39]||q[38]?De?(De.p(q,ve),ve[1]&384&&J(De,1)):(De=mc(q),De.c(),J(De,1),De.m(i,null)):De&&(Lt(),ae(De,1,1,()=>{De=null}),It()),(!be||ve[0]&524288|ve[1]&1048576)&&za(i,"background",q[19]?"transparent":q[51]),(!be||ve[1]&2048)&&je(i,"no-image",!q[42])},i(q){be||(J(Z),J(L),J(g.$$.fragment,q),J(Ee),J(ke),J(G),J(N.$$.fragment,q),J(X),J(B),J(Ue),J(De),be=!0)},o(q){ae(Z),ae(L),ae(g.$$.fragment,q),ae(Ee),ae(ke),ae(G),ae(N.$$.fragment,q),ae(X),ae(B),ae(Ue),ae(De),be=!1},d(q){pe&&pe.d(q),q&&te(e),q&&te(i),Z&&Z.d(),L&&L.d(),ze(g),Ee&&Ee.d(),ke&&ke.d(),G&&G.d(),ze(N),X&&X.d(),B&&B.d(),Ue&&Ue.d(),De&&De.d(),Se=!1,Mt(fe)}}}function pc(t){let e,i;return e=new N1({props:{onEvent:t[15],style:t[5],downloadFormats:t[6],larger:t[24]&&!t[30],content:t[9],index:t[10],isMobile:t[30],textColor:t[52],backgroundColor:t[51],iconColor:t[32]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&32768&&(l.onEvent=n[15]),a[0]&32&&(l.style=n[5]),a[0]&64&&(l.downloadFormats=n[6]),a[0]&1090519040&&(l.larger=n[24]&&!n[30]),a[0]&512&&(l.content=n[9]),a[0]&1024&&(l.index=n[10]),a[0]&1073741824&&(l.isMobile=n[30]),a[1]&2097152&&(l.textColor=n[52]),a[1]&1048576&&(l.backgroundColor=n[51]),a[1]&2&&(l.iconColor=n[32]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function hy(t){let e=cl(t[3])&&t[9].length>0,i,n,a=e&&ac(t);return{c(){a&&a.c(),i=Zn()},m(l,g){a&&a.m(l,g),se(l,i,g),n=!0},p(l,g){g[0]&520&&(e=cl(l[3])&&l[9].length>0),e?a?(a.p(l,g),g[0]&520&&J(a,1)):(a=ac(l),a.c(),J(a,1),a.m(i.parentNode,i)):a&&(Lt(),ae(a,1,1,()=>{a=null}),It())},i(l){n||(J(a),n=!0)},o(l){ae(a),n=!1},d(l){a&&a.d(l),l&&te(i)}}}function gy(t,e,i){let n,a,l,g,p,_,k,T,C,U,V,N,Q,W,ue,ie,be,Se,fe,pe,Z,L,le,z,Ke,Ie,Ee,ke,G,X,B,Ue,De,q,ve,at,Qe,Et,Oe,{playerStyle:Te="standard"}=e,{callToAction:it=void 0}=e,{skipButtonStyle:xt="auto"}=e,{playlistStyle:wt="auto-5-4"}=e,{playlistToggle:Xt="auto"}=e,{downloadFormats:Pt=[]}=e,{playerTitle:Ht=void 0}=e,{fixedPosition:yt=void 0}=e,{fixedWidth:ft="auto"}=e,{content:Nt=[]}=e,{contentIndex:mt=0}=e,{duration:bt=0}=e,{currentTime:Zt=0}=e,{playbackState:Rt="stopped"}=e,{playbackRate:Jt=1}=e,{activeAdvert:nt=void 0}=e,{persistentAdvert:ot=void 0}=e,{textColor:li="#111"}=e,{backgroundColor:Ae="#f5f5f5"}=e,{iconColor:Dt="black"}=e,{logoIconEnabled:Ft=!0}=e,{onEvent:Ot=()=>{}}=e,{videoIsBehind:Ut=!1}=e,{isVisible:jt=void 0}=e,{relativeY:ci=void 0}=e,{absoluteY:Kt=void 0}=e,Yt,mi,Vt;const ct=()=>{Vt&&clearTimeout(Vt),i(34,Vt=setTimeout(()=>i(34,Vt=null),500))},di=me=>{!p||!(me.button===0)||!me.target.classList.contains("main")||Ot(qe({type:"PressedVideoBackground",description:"The video background was pressed.",initiatedBy:"user"}))};function Be(me){jt=me,i(0,jt)}function fi(me){ci=me,i(1,ci)}function Qt(me){Kt=me,i(2,Kt)}function Je(me){mi=me,i(18,mi)}function pi(){Yt=this.clientWidth,i(17,Yt)}return t.$$set=me=>{"playerStyle"in me&&i(3,Te=me.playerStyle),"callToAction"in me&&i(4,it=me.callToAction),"skipButtonStyle"in me&&i(58,xt=me.skipButtonStyle),"playlistStyle"in me&&i(5,wt=me.playlistStyle),"playlistToggle"in me&&i(59,Xt=me.playlistToggle),"downloadFormats"in me&&i(6,Pt=me.downloadFormats),"playerTitle"in me&&i(7,Ht=me.playerTitle),"fixedPosition"in me&&i(8,yt=me.fixedPosition),"fixedWidth"in me&&i(60,ft=me.fixedWidth),"content"in me&&i(9,Nt=me.content),"contentIndex"in me&&i(10,mt=me.contentIndex),"duration"in me&&i(11,bt=me.duration),"currentTime"in me&&i(12,Zt=me.currentTime),"playbackState"in me&&i(61,Rt=me.playbackState),"playbackRate"in me&&i(13,Jt=me.playbackRate),"activeAdvert"in me&&i(14,nt=me.activeAdvert),"persistentAdvert"in me&&i(62,ot=me.persistentAdvert),"textColor"in me&&i(63,li=me.textColor),"backgroundColor"in me&&i(64,Ae=me.backgroundColor),"iconColor"in me&&i(65,Dt=me.iconColor),"logoIconEnabled"in me&&i(66,Ft=me.logoIconEnabled),"onEvent"in me&&i(15,Ot=me.onEvent),"videoIsBehind"in me&&i(16,Ut=me.videoIsBehind),"isVisible"in me&&i(0,jt=me.isVisible),"relativeY"in me&&i(1,ci=me.relativeY),"absoluteY"in me&&i(2,Kt=me.absoluteY)},t.$$.update=()=>{t.$$.dirty[0]&8&&i(22,n=Te==="small"),t.$$.dirty[0]&8&&i(26,a=Te==="standard"),t.$$.dirty[0]&8&&i(55,l=Te==="large"),t.$$.dirty[0]&8&&i(24,g=Te==="screen"),t.$$.dirty[0]&8&&i(19,p=Te==="video"),t.$$.dirty[1]&1073741824&&i(54,_=Rt==="playing"),t.$$.dirty[1]&1073741824,t.$$.dirty[1]&1073741824&&i(27,k=Rt==="stopped"),t.$$.dirty[0]&134234112&&i(25,T=nt&&!k),t.$$.dirty[0]&512&&i(67,C=Nt.length>1),t.$$.dirty[0]&131080&&i(30,U=Z1({playerStyle:Te,width:Yt})),t.$$.dirty[0]&1536&&i(29,V=Nt[mt]||{}),t.$$.dirty[0]&6144&&i(53,N=Zt/bt),t.$$.dirty[0]&33570816|t.$$.dirty[2]&2&&i(52,Q=T&&(nt==null?void 0:nt.textColor)||li),t.$$.dirty[0]&33570816|t.$$.dirty[2]&4&&i(51,W=T&&(nt==null?void 0:nt.backgroundColor)||Ae),t.$$.dirty[0]&33570816|t.$$.dirty[2]&8&&i(32,ue=T&&(nt==null?void 0:nt.iconColor)||Dt),t.$$.dirty[1]&134217728|t.$$.dirty[2]&32&&i(33,ie=xt==="auto"?C?"tracks":"segments":xt),t.$$.dirty[1]&4,t.$$.dirty[0]&524288|t.$$.dirty[1]&2&&i(50,be=p?"rgba(250, 250, 250, 0.8)":ue),t.$$.dirty[0]&1095237888&&i(31,Se=n||p&&yt?.8:g&&!U?2:1),t.$$.dirty[0]&151519232|t.$$.dirty[1]&1&&i(49,fe=Se*(g?1.5:p&&k?2:1)),t.$$.dirty[0]&1091043328&&i(48,pe=g&&!U?3:g?2:p&&!U?1.5:1),t.$$.dirty[0]&1091043328&&i(47,Z=g&&!U?2.5:g?1.75:p&&!U?2:p?1.5:1),t.$$.dirty[0]&1090519040&&i(46,L=g&&!U?"12px 0":g?"4px 0":"auto"),t.$$.dirty[0]&4194304|t.$$.dirty[1]&536870912&&i(45,le=ft==="auto"?n?"fit-content":"":ft),t.$$.dirty[0]&67109120&&i(69,z=yt==="auto"?a?"center":"right":yt),t.$$.dirty[0]&256|t.$$.dirty[2]&128&&i(21,Ke=yt?`fixed fixed-${z}`:""),t.$$.dirty[0]&71303424&&i(44,Ie=me=>yt&&Fv(me,{y:n||a?40:100})),t.$$.dirty[0]&1107296264|t.$$.dirty[2]&128&&i(20,Ee=J1({playerStyle:Te,position:z,isMobile:U,isAdvert:T})),t.$$.dirty[0]&671088640&&i(43,ke=k?V.imageUrl:null),t.$$.dirty[0]&704659456|t.$$.dirty[2]&1&&i(42,G=T&&nt.imageUrl||!k&&(ot==null?void 0:ot.imageUrl)||V.imageUrl),t.$$.dirty[0]&167788544|t.$$.dirty[2]&1&&i(41,X=T&&nt.clickThroughUrl||!k&&(ot==null?void 0:ot.clickThroughUrl)),t.$$.dirty[0]&4194560|t.$$.dirty[1]&536870912&&i(28,B=n&&yt&&ft==="auto"),t.$$.dirty[0]&4194304|t.$$.dirty[1]&536870912&&i(23,Ue=n&&(ft===0||ft==="0")),t.$$.dirty[0]&444858368&&i(40,De=Ue||B&&!T&&!k&&!mi),t.$$.dirty[0]&104857856&&i(39,q=yt&&!n&&!(a&&T)),t.$$.dirty[0]&62914816|t.$$.dirty[2]&16&&i(38,ve=Ft&&(!T||g)&&!(yt&&n)&&!Ue),t.$$.dirty[0]&32&&i(68,at=wt.split("-")),t.$$.dirty[0]&4194304|t.$$.dirty[2]&96&&i(37,Qe=(at[0]==="show"||at[0]==="auto"&&C)&&!n),t.$$.dirty[0]&4194304|t.$$.dirty[1]&268435456|t.$$.dirty[2]&32&&i(36,Et=(Xt==="show"||Xt==="auto"&&C)&&!n),t.$$.dirty[0]&3145736|t.$$.dirty[1]&1073741824&&i(35,Oe=`user-interface ${Te} ${Rt} ${Ke} ${Ee}`),t.$$.dirty[0]&256&&yt&&ct()},[jt,ci,Kt,Te,it,wt,Pt,Ht,yt,Nt,mt,bt,Zt,Jt,nt,Ot,Ut,Yt,mi,p,Ee,Ke,n,Ue,g,T,a,k,B,V,U,Se,ue,ie,Vt,Oe,Et,Qe,ve,q,De,X,G,ke,Ie,le,L,Z,pe,fe,be,W,Q,N,_,l,ct,di,xt,Xt,ft,Rt,ot,li,Ae,Dt,Ft,C,at,z,Be,fi,Qt,Je,pi]}class dl extends tt{constructor(e){super(),et(this,e,gy,hy,Ye,{playerStyle:3,callToAction:4,skipButtonStyle:58,playlistStyle:5,playlistToggle:59,downloadFormats:6,playerTitle:7,fixedPosition:8,fixedWidth:60,content:9,contentIndex:10,duration:11,currentTime:12,playbackState:61,playbackRate:13,activeAdvert:14,persistentAdvert:62,textColor:63,backgroundColor:64,iconColor:65,logoIconEnabled:66,onEvent:15,videoIsBehind:16,isVisible:0,relativeY:1,absoluteY:2},null,[-1,-1,-1])}get playerStyle(){return this.$$.ctx[3]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get callToAction(){return this.$$.ctx[4]}set callToAction(e){this.$$set({callToAction:e}),w()}get skipButtonStyle(){return this.$$.ctx[58]}set skipButtonStyle(e){this.$$set({skipButtonStyle:e}),w()}get playlistStyle(){return this.$$.ctx[5]}set playlistStyle(e){this.$$set({playlistStyle:e}),w()}get playlistToggle(){return this.$$.ctx[59]}set playlistToggle(e){this.$$set({playlistToggle:e}),w()}get downloadFormats(){return this.$$.ctx[6]}set downloadFormats(e){this.$$set({downloadFormats:e}),w()}get playerTitle(){return this.$$.ctx[7]}set playerTitle(e){this.$$set({playerTitle:e}),w()}get fixedPosition(){return this.$$.ctx[8]}set fixedPosition(e){this.$$set({fixedPosition:e}),w()}get fixedWidth(){return this.$$.ctx[60]}set fixedWidth(e){this.$$set({fixedWidth:e}),w()}get content(){return this.$$.ctx[9]}set content(e){this.$$set({content:e}),w()}get contentIndex(){return this.$$.ctx[10]}set contentIndex(e){this.$$set({contentIndex:e}),w()}get duration(){return this.$$.ctx[11]}set duration(e){this.$$set({duration:e}),w()}get currentTime(){return this.$$.ctx[12]}set currentTime(e){this.$$set({currentTime:e}),w()}get playbackState(){return this.$$.ctx[61]}set playbackState(e){this.$$set({playbackState:e}),w()}get playbackRate(){return this.$$.ctx[13]}set playbackRate(e){this.$$set({playbackRate:e}),w()}get activeAdvert(){return this.$$.ctx[14]}set activeAdvert(e){this.$$set({activeAdvert:e}),w()}get persistentAdvert(){return this.$$.ctx[62]}set persistentAdvert(e){this.$$set({persistentAdvert:e}),w()}get textColor(){return this.$$.ctx[63]}set textColor(e){this.$$set({textColor:e}),w()}get backgroundColor(){return this.$$.ctx[64]}set backgroundColor(e){this.$$set({backgroundColor:e}),w()}get iconColor(){return this.$$.ctx[65]}set iconColor(e){this.$$set({iconColor:e}),w()}get logoIconEnabled(){return this.$$.ctx[66]}set logoIconEnabled(e){this.$$set({logoIconEnabled:e}),w()}get onEvent(){return this.$$.ctx[15]}set onEvent(e){this.$$set({onEvent:e}),w()}get videoIsBehind(){return this.$$.ctx[16]}set videoIsBehind(e){this.$$set({videoIsBehind:e}),w()}get isVisible(){return this.$$.ctx[0]}set isVisible(e){this.$$set({isVisible:e}),w()}get relativeY(){return this.$$.ctx[1]}set relativeY(e){this.$$set({relativeY:e}),w()}get absoluteY(){return this.$$.ctx[2]}set absoluteY(e){this.$$set({absoluteY:e}),w()}}const X6="",vy=(t,e,i)=>rt(t,e,e==="style"?py(i):i),my=/;(?!([^()]*\([^()]*\))*[^()]*\))/,py=t=>t.split(my).map(e=>e+" !important").join(";");function _y(t){let e,i;const n=t[4].default,a=gs(n,t,t[3],null);return{c(){e=F("div"),a&&a.c(),vy(e,"class","external-widget svelte-18ldhih")},m(l,g){se(l,e,g),a&&a.m(e,null),t[5](e),i=!0},p(l,[g]){a&&a.p&&(!i||g&8)&&ms(a,n,l,l[3],i?vs(n,l[3],g,null):ps(l[3]),null)},i(l){i||(J(a,l),i=!0)},o(l){ae(a,l),i=!1},d(l){l&&te(e),a&&a.d(l),t[5](null)}}}function yy(t,e,i){let n,{$$slots:a={},$$scope:l}=e,{root:g=void 0}=e,p;function _(k){Ne[k?"unshift":"push"](()=>{p=k,i(0,p)})}return t.$$set=k=>{"root"in k&&i(1,g=k.root),"$$scope"in k&&i(3,l=k.$$scope)},t.$$.update=()=>{var k;t.$$.dirty&2&&i(2,n=typeof g=="string"?null:g),t.$$.dirty&5&&n&&p&&n.appendChild(p),t.$$.dirty&4&&((k=n==null?void 0:n.classList)==null||k.add("beyondwords-widget","bwp"))},[p,g,n,l,a,_]}class fl extends tt{constructor(e){super(),et(this,e,yy,_y,Ye,{root:1})}get root(){return this.$$.ctx[1]}set root(e){this.$$set({root:e}),w()}}const Z6="",ee=(t,e,i)=>rt(t,e,e==="style"?Sy(i):i),by=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Sy=t=>t.split(by).map(e=>e+" !important").join(";");function _c(t,e,i){const n=t.slice();return n[84]=e[i],n[86]=i,n}function yc(t,e,i){const n=t.slice();return n[84]=e[i],n[86]=i,n}function bc(t,e,i){const n=t.slice();return n[84]=e[i],n[86]=i,n}function ky(t,e,i){const n=t.slice();return n[89]=e[i],n}function Sc(t,e,i){const n=t.slice();return n[84]=e[i],n[86]=i,n}function kc(t){let e,i,n,a=t[84].placement+"",l,g;return{c(){e=F("option"),i=Le(t[86]),n=Le(" ("),l=Le(a),g=Le(")"),e.__value=t[86],e.value=e.__value},m(p,_){se(p,e,_),I(e,i),I(e,n),I(e,l),I(e,g)},p(p,_){_[1]&1024&&a!==(a=p[84].placement+"")&&gr(l,a)},d(p){p&&te(e)}}}function Ty(t){let e,i,n;return{c(){e=F("option"),i=Le(t[89]),n=Le("-oclock"),e.__value=t[89]+"-oclock",e.value=e.__value},m(a,l){se(a,e,l),I(e,i),I(e,n)},p:oe,d(a){a&&te(e)}}}function Tc(t){let e,i,n,a,l,g,p,_,k,T,C,U,V,N,Q,W,ue,ie,be,Se,fe,pe,Z,L,le,z,Ke,Ie,Ee,ke,G,X,B,Ue,De,q,ve,at,Qe,Et,Oe,Te,it,xt,wt,Xt,Pt,Ht,yt,ft,Nt,mt,bt,Zt,Rt,Jt,nt,ot,li,Ae,Dt,Ft,Ot,Ut,jt,ci,Kt,Yt,mi,Vt,ct,di,Be,fi,Qt,Je,pi,me,$t,hi,_i,wi,yi,Ei,Fe,Y,$,Me,_r,ji,Qr,si,yr,Ji,Qi,Gi,ur,xr,Ii,Ri,cr,wr,zi,Si,Hi,Di=t[39],ei=[];for(let H=0;H<Di.length;H+=1)ei[H]=Ec(bc(t,Di,H));let Ki=t[40],ti=[];for(let H=0;H<Ki.length;H+=1)ti[H]=Ac(yc(t,Ki,H));let br=t[41],ii=[];for(let H=0;H<br.length;H+=1)ii[H]=xc(_c(t,br,H));return{c(){e=F("br"),i=Ce(),n=F("strong"),n.textContent="Advanced settings:",a=Ce(),l=F("br"),g=F("br"),p=Ce(),_=F("div"),k=Le(`projectId:
|
|
29
29
|
`),T=F("input"),C=Ce(),U=F("div"),V=Le(`contentId:
|
|
30
30
|
`),N=F("input"),Q=Ce(),W=F("div"),ue=Le(`playlistId:
|
|
31
31
|
`),ie=F("input"),be=Ce(),Se=F("div"),fe=Le(`sourceId:
|
|
@@ -36,7 +36,7 @@ This context may be helpful:
|
|
|
36
36
|
`),it=F("select");for(let H=0;H<ei.length;H+=1)ei[H].c();xt=Ce(),wt=F("div"),Xt=Le(`introsOutrosIndex:
|
|
37
37
|
`),Pt=F("select"),Ht=F("option"),Ht.textContent="-1 (none)";for(let H=0;H<ti.length;H+=1)ti[H].c();yt=Ce(),ft=F("div"),Nt=Le(`persistentAdImage:
|
|
38
38
|
`),mt=F("select"),bt=F("option"),bt.textContent=`${!1}`,Zt=F("option"),Zt.textContent=`${!0}`,Rt=Ce(),Jt=F("div"),nt=Le(`persistentIndex:
|
|
39
|
-
`),ot=F("select"),li=F("option"),li.textContent="-1 (none)";for(let H=0;H<ii.length;H+=1)ii[H].c();
|
|
39
|
+
`),ot=F("select"),li=F("option"),li.textContent="-1 (none)";for(let H=0;H<ii.length;H+=1)ii[H].c();Ae=Ce(),Dt=F("div"),Ft=Le(`duration:
|
|
40
40
|
`),Ot=F("input"),Ut=Ce(),jt=F("div"),ci=Le(`currentTime:
|
|
41
41
|
`),Kt=F("input"),Yt=Ce(),mi=F("div"),Vt=Le(`playbackRate:
|
|
42
42
|
`),ct=F("input"),di=Ce(),Be=F("div"),fi=Le(`widgetTarget:
|
|
@@ -45,7 +45,7 @@ This context may be helpful:
|
|
|
45
45
|
`),Fe=F("select"),Y=F("option"),Y.textContent="personalized",$=F("option"),$.textContent="non-personalized",Me=F("option"),Me.textContent="under-the-age-of-consent",_r=Ce(),ji=F("div"),Qr=Le(`analyticsConsent:
|
|
46
46
|
`),si=F("select"),yr=F("option"),yr.textContent="allowed",Ji=F("option"),Ji.textContent="without-local-storage",Qi=F("option"),Qi.textContent="none",Gi=Ce(),ur=F("div"),xr=Le(`analyticsCustomUrl:
|
|
47
47
|
`),Ii=F("input"),Ri=Ce(),cr=F("div"),wr=Le(`analyticsTag:
|
|
48
|
-
`),zi=F("input"),ee(n,"class","svelte-g76q0j"),ee(T,"tabindex",-1),ee(T,"type","text"),ee(T,"class","svelte-g76q0j"),ee(_,"class","control svelte-g76q0j"),ee(N,"tabindex",-1),ee(N,"type","text"),ee(N,"class","svelte-g76q0j"),ee(U,"class","control svelte-g76q0j"),ee(ie,"tabindex",-1),ee(ie,"type","text"),ee(ie,"class","svelte-g76q0j"),ee(W,"class","control svelte-g76q0j"),ee(pe,"tabindex",-1),ee(pe,"type","text"),ee(pe,"class","svelte-g76q0j"),ee(Se,"class","control svelte-g76q0j"),ee(z,"tabindex",-1),ee(z,"type","text"),ee(z,"class","svelte-g76q0j"),ee(L,"class","control svelte-g76q0j"),G.__value=!1,G.value=G.__value,X.__value=!0,X.value=X.__value,ee(ke,"tabindex",-1),ee(ke,"class","svelte-g76q0j"),t[5]===void 0&&Wt(()=>t[67].call(ke)),ee(Ie,"class","control svelte-g76q0j"),ve.__value="auto",ve.value=ve.__value,at.__value="override",at.value=at.__value,Qe.__value="none",Qe.value=Qe.__value,ee(q,"tabindex",-1),ee(q,"class","svelte-g76q0j"),t[12]===void 0&&Wt(()=>t[68].call(q)),ee(Ue,"class","control svelte-g76q0j"),ee(it,"tabindex",-1),ee(it,"class","svelte-g76q0j"),t[13]===void 0&&Wt(()=>t[69].call(it)),ee(Oe,"class","control svelte-g76q0j"),Ht.__value=-1,Ht.value=Ht.__value,ee(Pt,"tabindex",-1),ee(Pt,"class","svelte-g76q0j"),t[14]===void 0&&Wt(()=>t[70].call(Pt)),ee(wt,"class","control svelte-g76q0j"),bt.__value=!1,bt.value=bt.__value,Zt.__value=!0,Zt.value=Zt.__value,ee(mt,"tabindex",-1),ee(mt,"class","svelte-g76q0j"),t[16]===void 0&&Wt(()=>t[71].call(mt)),ee(ft,"class","control svelte-g76q0j"),li.__value=-1,li.value=li.__value,ee(ot,"tabindex",-1),ee(ot,"class","svelte-g76q0j"),t[17]===void 0&&Wt(()=>t[72].call(ot)),ee(Jt,"class","control svelte-g76q0j"),ee(Ot,"tabindex",-1),ee(Ot,"type","text"),ee(Ot,"class","svelte-g76q0j"),ee(Dt,"class","control svelte-g76q0j"),ee(Kt,"tabindex",-1),ee(Kt,"type","text"),ee(Kt,"class","svelte-g76q0j"),ee(jt,"class","control svelte-g76q0j"),ee(ct,"tabindex",-1),ee(ct,"type","text"),ee(ct,"class","svelte-g76q0j"),ee(mi,"class","control svelte-g76q0j"),ee(Qt,"tabindex",-1),ee(Qt,"type","text"),ee(Qt,"class","svelte-g76q0j"),ee(Be,"class","control svelte-g76q0j"),hi.__value=!1,hi.value=hi.__value,_i.__value=!0,_i.value=_i.__value,ee($t,"tabindex",-1),ee($t,"class","svelte-g76q0j"),t[30]===void 0&&Wt(()=>t[77].call($t)),ee(pi,"class","control svelte-g76q0j"),Y.__value="personalized",Y.value=Y.__value,$.__value="non-personalized",$.value=$.__value,Me.__value="under-the-age-of-consent",Me.value=Me.__value,ee(Fe,"tabindex",-1),ee(Fe,"class","svelte-g76q0j"),t[35]===void 0&&Wt(()=>t[78].call(Fe)),ee(yi,"class","control svelte-g76q0j"),yr.__value="allowed",yr.value=yr.__value,Ji.__value="without-local-storage",Ji.value=Ji.__value,Qi.__value="none",Qi.value=Qi.__value,ee(si,"tabindex",-1),ee(si,"class","svelte-g76q0j"),t[36]===void 0&&Wt(()=>t[79].call(si)),ee(ji,"class","control svelte-g76q0j"),ee(Ii,"tabindex",-1),ee(Ii,"type","text"),ee(Ii,"class","svelte-g76q0j"),ee(ur,"class","control svelte-g76q0j"),ee(zi,"tabindex",-1),ee(zi,"type","text"),ee(zi,"class","svelte-g76q0j"),ee(cr,"class","control svelte-g76q0j")},m(H,_e){se(H,e,_e),se(H,i,_e),se(H,n,_e),se(H,a,_e),se(H,l,_e),se(H,g,_e),se(H,p,_e),se(H,_,_e),I(_,k),I(_,T),Tt(T,t[0]),se(H,C,_e),se(H,U,_e),I(U,V),I(U,N),Tt(N,t[1]),se(H,Q,_e),se(H,W,_e),I(W,ue),I(W,ie),Tt(ie,t[2]),se(H,be,_e),se(H,Se,_e),I(Se,fe),I(Se,pe),Tt(pe,t[3]),se(H,Z,_e),se(H,L,_e),I(L,le),I(L,z),Tt(z,t[4]),se(H,Ke,_e),se(H,Ie,_e),I(Ie,Ee),I(Ie,ke),I(ke,G),I(ke,X),lt(ke,t[5],!0),se(H,B,_e),se(H,Ue,_e),I(Ue,De),I(Ue,q),I(q,ve),I(q,at),I(q,Qe),lt(q,t[12],!0),se(H,Et,_e),se(H,Oe,_e),I(Oe,Te),I(Oe,it);for(let ye=0;ye<ei.length;ye+=1)ei[ye]&&ei[ye].m(it,null);lt(it,t[13],!0),se(H,xt,_e),se(H,wt,_e),I(wt,Xt),I(wt,Pt),I(Pt,Ht);for(let ye=0;ye<ti.length;ye+=1)ti[ye]&&ti[ye].m(Pt,null);lt(Pt,t[14],!0),se(H,yt,_e),se(H,ft,_e),I(ft,Nt),I(ft,mt),I(mt,bt),I(mt,Zt),lt(mt,t[16],!0),se(H,Rt,_e),se(H,Jt,_e),I(Jt,nt),I(Jt,ot),I(ot,li);for(let ye=0;ye<ii.length;ye+=1)ii[ye]&&ii[ye].m(ot,null);lt(ot,t[17],!0),se(H,
|
|
48
|
+
`),zi=F("input"),ee(n,"class","svelte-g76q0j"),ee(T,"tabindex",-1),ee(T,"type","text"),ee(T,"class","svelte-g76q0j"),ee(_,"class","control svelte-g76q0j"),ee(N,"tabindex",-1),ee(N,"type","text"),ee(N,"class","svelte-g76q0j"),ee(U,"class","control svelte-g76q0j"),ee(ie,"tabindex",-1),ee(ie,"type","text"),ee(ie,"class","svelte-g76q0j"),ee(W,"class","control svelte-g76q0j"),ee(pe,"tabindex",-1),ee(pe,"type","text"),ee(pe,"class","svelte-g76q0j"),ee(Se,"class","control svelte-g76q0j"),ee(z,"tabindex",-1),ee(z,"type","text"),ee(z,"class","svelte-g76q0j"),ee(L,"class","control svelte-g76q0j"),G.__value=!1,G.value=G.__value,X.__value=!0,X.value=X.__value,ee(ke,"tabindex",-1),ee(ke,"class","svelte-g76q0j"),t[5]===void 0&&Wt(()=>t[67].call(ke)),ee(Ie,"class","control svelte-g76q0j"),ve.__value="auto",ve.value=ve.__value,at.__value="override",at.value=at.__value,Qe.__value="none",Qe.value=Qe.__value,ee(q,"tabindex",-1),ee(q,"class","svelte-g76q0j"),t[12]===void 0&&Wt(()=>t[68].call(q)),ee(Ue,"class","control svelte-g76q0j"),ee(it,"tabindex",-1),ee(it,"class","svelte-g76q0j"),t[13]===void 0&&Wt(()=>t[69].call(it)),ee(Oe,"class","control svelte-g76q0j"),Ht.__value=-1,Ht.value=Ht.__value,ee(Pt,"tabindex",-1),ee(Pt,"class","svelte-g76q0j"),t[14]===void 0&&Wt(()=>t[70].call(Pt)),ee(wt,"class","control svelte-g76q0j"),bt.__value=!1,bt.value=bt.__value,Zt.__value=!0,Zt.value=Zt.__value,ee(mt,"tabindex",-1),ee(mt,"class","svelte-g76q0j"),t[16]===void 0&&Wt(()=>t[71].call(mt)),ee(ft,"class","control svelte-g76q0j"),li.__value=-1,li.value=li.__value,ee(ot,"tabindex",-1),ee(ot,"class","svelte-g76q0j"),t[17]===void 0&&Wt(()=>t[72].call(ot)),ee(Jt,"class","control svelte-g76q0j"),ee(Ot,"tabindex",-1),ee(Ot,"type","text"),ee(Ot,"class","svelte-g76q0j"),ee(Dt,"class","control svelte-g76q0j"),ee(Kt,"tabindex",-1),ee(Kt,"type","text"),ee(Kt,"class","svelte-g76q0j"),ee(jt,"class","control svelte-g76q0j"),ee(ct,"tabindex",-1),ee(ct,"type","text"),ee(ct,"class","svelte-g76q0j"),ee(mi,"class","control svelte-g76q0j"),ee(Qt,"tabindex",-1),ee(Qt,"type","text"),ee(Qt,"class","svelte-g76q0j"),ee(Be,"class","control svelte-g76q0j"),hi.__value=!1,hi.value=hi.__value,_i.__value=!0,_i.value=_i.__value,ee($t,"tabindex",-1),ee($t,"class","svelte-g76q0j"),t[30]===void 0&&Wt(()=>t[77].call($t)),ee(pi,"class","control svelte-g76q0j"),Y.__value="personalized",Y.value=Y.__value,$.__value="non-personalized",$.value=$.__value,Me.__value="under-the-age-of-consent",Me.value=Me.__value,ee(Fe,"tabindex",-1),ee(Fe,"class","svelte-g76q0j"),t[35]===void 0&&Wt(()=>t[78].call(Fe)),ee(yi,"class","control svelte-g76q0j"),yr.__value="allowed",yr.value=yr.__value,Ji.__value="without-local-storage",Ji.value=Ji.__value,Qi.__value="none",Qi.value=Qi.__value,ee(si,"tabindex",-1),ee(si,"class","svelte-g76q0j"),t[36]===void 0&&Wt(()=>t[79].call(si)),ee(ji,"class","control svelte-g76q0j"),ee(Ii,"tabindex",-1),ee(Ii,"type","text"),ee(Ii,"class","svelte-g76q0j"),ee(ur,"class","control svelte-g76q0j"),ee(zi,"tabindex",-1),ee(zi,"type","text"),ee(zi,"class","svelte-g76q0j"),ee(cr,"class","control svelte-g76q0j")},m(H,_e){se(H,e,_e),se(H,i,_e),se(H,n,_e),se(H,a,_e),se(H,l,_e),se(H,g,_e),se(H,p,_e),se(H,_,_e),I(_,k),I(_,T),Tt(T,t[0]),se(H,C,_e),se(H,U,_e),I(U,V),I(U,N),Tt(N,t[1]),se(H,Q,_e),se(H,W,_e),I(W,ue),I(W,ie),Tt(ie,t[2]),se(H,be,_e),se(H,Se,_e),I(Se,fe),I(Se,pe),Tt(pe,t[3]),se(H,Z,_e),se(H,L,_e),I(L,le),I(L,z),Tt(z,t[4]),se(H,Ke,_e),se(H,Ie,_e),I(Ie,Ee),I(Ie,ke),I(ke,G),I(ke,X),lt(ke,t[5],!0),se(H,B,_e),se(H,Ue,_e),I(Ue,De),I(Ue,q),I(q,ve),I(q,at),I(q,Qe),lt(q,t[12],!0),se(H,Et,_e),se(H,Oe,_e),I(Oe,Te),I(Oe,it);for(let ye=0;ye<ei.length;ye+=1)ei[ye]&&ei[ye].m(it,null);lt(it,t[13],!0),se(H,xt,_e),se(H,wt,_e),I(wt,Xt),I(wt,Pt),I(Pt,Ht);for(let ye=0;ye<ti.length;ye+=1)ti[ye]&&ti[ye].m(Pt,null);lt(Pt,t[14],!0),se(H,yt,_e),se(H,ft,_e),I(ft,Nt),I(ft,mt),I(mt,bt),I(mt,Zt),lt(mt,t[16],!0),se(H,Rt,_e),se(H,Jt,_e),I(Jt,nt),I(Jt,ot),I(ot,li);for(let ye=0;ye<ii.length;ye+=1)ii[ye]&&ii[ye].m(ot,null);lt(ot,t[17],!0),se(H,Ae,_e),se(H,Dt,_e),I(Dt,Ft),I(Dt,Ot),Tt(Ot,t[18]),se(H,Ut,_e),se(H,jt,_e),I(jt,ci),I(jt,Kt),Tt(Kt,t[19]),se(H,Yt,_e),se(H,mi,_e),I(mi,Vt),I(mi,ct),Tt(ct,t[21]),se(H,di,_e),se(H,Be,_e),I(Be,fi),I(Be,Qt),Tt(Qt,t[25]),se(H,Je,_e),se(H,pi,_e),I(pi,me),I(pi,$t),I($t,hi),I($t,_i),lt($t,t[30],!0),se(H,wi,_e),se(H,yi,_e),I(yi,Ei),I(yi,Fe),I(Fe,Y),I(Fe,$),I(Fe,Me),lt(Fe,t[35],!0),se(H,_r,_e),se(H,ji,_e),I(ji,Qr),I(ji,si),I(si,yr),I(si,Ji),I(si,Qi),lt(si,t[36],!0),se(H,Gi,_e),se(H,ur,_e),I(ur,xr),I(ur,Ii),Tt(Ii,t[37]),se(H,Ri,_e),se(H,cr,_e),I(cr,wr),I(cr,zi),Tt(zi,t[38]),Si||(Hi=[ge(T,"input",t[62]),ge(N,"input",t[63]),ge(ie,"input",t[64]),ge(pe,"input",t[65]),ge(z,"input",t[66]),ge(ke,"change",t[67]),ge(q,"change",t[68]),ge(it,"change",t[69]),ge(Pt,"change",t[70]),ge(mt,"change",t[71]),ge(ot,"change",t[72]),ge(Ot,"input",t[73]),ge(Kt,"input",t[74]),ge(ct,"input",t[75]),ge(Qt,"input",t[76]),ge($t,"change",t[77]),ge(Fe,"change",t[78]),ge(si,"change",t[79]),ge(Ii,"input",t[80]),ge(zi,"input",t[81])],Si=!0)},p(H,_e){if(_e[0]&1&&T.value!==H[0]&&Tt(T,H[0]),_e[0]&2&&N.value!==H[1]&&Tt(N,H[1]),_e[0]&4&&ie.value!==H[2]&&Tt(ie,H[2]),_e[0]&8&&pe.value!==H[3]&&Tt(pe,H[3]),_e[0]&16&&z.value!==H[4]&&Tt(z,H[4]),_e[0]&32&<(ke,H[5]),_e[0]&4096&<(q,H[12]),_e[1]&256){Di=H[39];let ye;for(ye=0;ye<Di.length;ye+=1){const st=bc(H,Di,ye);ei[ye]?ei[ye].p(st,_e):(ei[ye]=Ec(st),ei[ye].c(),ei[ye].m(it,null))}for(;ye<ei.length;ye+=1)ei[ye].d(1);ei.length=Di.length}if(_e[0]&8192&<(it,H[13]),_e[1]&512){Ki=H[40];let ye;for(ye=0;ye<Ki.length;ye+=1){const st=yc(H,Ki,ye);ti[ye]?ti[ye].p(st,_e):(ti[ye]=Ac(st),ti[ye].c(),ti[ye].m(Pt,null))}for(;ye<ti.length;ye+=1)ti[ye].d(1);ti.length=Ki.length}if(_e[0]&16384&<(Pt,H[14]),_e[0]&65536&<(mt,H[16]),_e[1]&1024){br=H[41];let ye;for(ye=0;ye<br.length;ye+=1){const st=_c(H,br,ye);ii[ye]?ii[ye].p(st,_e):(ii[ye]=xc(st),ii[ye].c(),ii[ye].m(ot,null))}for(;ye<ii.length;ye+=1)ii[ye].d(1);ii.length=br.length}_e[0]&131072&<(ot,H[17]),_e[0]&262144&&Ot.value!==H[18]&&Tt(Ot,H[18]),_e[0]&524288&&Kt.value!==H[19]&&Tt(Kt,H[19]),_e[0]&2097152&&ct.value!==H[21]&&Tt(ct,H[21]),_e[0]&33554432&&Qt.value!==H[25]&&Tt(Qt,H[25]),_e[0]&1073741824&<($t,H[30]),_e[1]&16&<(Fe,H[35]),_e[1]&32&<(si,H[36]),_e[1]&64&&Ii.value!==H[37]&&Tt(Ii,H[37]),_e[1]&128&&zi.value!==H[38]&&Tt(zi,H[38])},d(H){H&&te(e),H&&te(i),H&&te(n),H&&te(a),H&&te(l),H&&te(g),H&&te(p),H&&te(_),H&&te(C),H&&te(U),H&&te(Q),H&&te(W),H&&te(be),H&&te(Se),H&&te(Z),H&&te(L),H&&te(Ke),H&&te(Ie),H&&te(B),H&&te(Ue),H&&te(Et),H&&te(Oe),Ln(ei,H),H&&te(xt),H&&te(wt),Ln(ti,H),H&&te(yt),H&&te(ft),H&&te(Rt),H&&te(Jt),Ln(ii,H),H&&te(Ae),H&&te(Dt),H&&te(Ut),H&&te(jt),H&&te(Yt),H&&te(mi),H&&te(di),H&&te(Be),H&&te(Je),H&&te(pi),H&&te(wi),H&&te(yi),H&&te(_r),H&&te(ji),H&&te(Gi),H&&te(ur),H&&te(Ri),H&&te(cr),Si=!1,Mt(Hi)}}}function Ec(t){let e,i,n,a=t[84].title+"",l,g;return{c(){e=F("option"),i=Le(t[86]),n=Le(" ("),l=Le(a),g=Le(")"),e.__value=t[86],e.value=e.__value},m(p,_){se(p,e,_),I(e,i),I(e,n),I(e,l),I(e,g)},p(p,_){_[1]&256&&a!==(a=p[84].title+"")&&gr(l,a)},d(p){p&&te(e)}}}function Ac(t){let e,i,n,a=t[84].placement+"",l;return{c(){e=F("option"),i=Le(t[86]),n=Le(": "),l=Le(a),e.__value=t[86],e.value=e.__value},m(g,p){se(g,e,p),I(e,i),I(e,n),I(e,l)},p(g,p){p[1]&512&&a!==(a=g[84].placement+"")&&gr(l,a)},d(g){g&&te(e)}}}function xc(t){let e,i,n,a=t[84].placement+"",l;return{c(){e=F("option"),i=Le(t[86]),n=Le(": "),l=Le(a),e.__value=t[86],e.value=e.__value},m(g,p){se(g,e,p),I(e,i),I(e,n),I(e,l)},p(g,p){p[1]&1024&&a!==(a=g[84].placement+"")&&gr(l,a)},d(g){g&&te(e)}}}function Ey(t){let e,i,n;return{c(){e=F("a"),e.textContent="show advanced settings",ee(e,"tabindex",-1),ee(e,"href","#_"),ee(e,"class","svelte-g76q0j")},m(a,l){se(a,e,l),i||(n=ge(e,"click",t[83]),i=!0)},p:oe,d(a){a&&te(e),i=!1,n()}}}function Ay(t){let e,i,n;return{c(){e=F("a"),e.textContent="hide advanced settings",ee(e,"tabindex",-1),ee(e,"href","#_"),ee(e,"class","svelte-g76q0j")},m(a,l){se(a,e,l),i||(n=ge(e,"click",t[82]),i=!0)},p:oe,d(a){a&&te(e),i=!1,n()}}}function xy(t){let e,i,n,a,l,g,p,_,k,T,C,U,V,N,Q,W,ue,ie,be,Se,fe,pe,Z,L,le,z,Ke,Ie,Ee,ke,G,X,B,Ue,De,q,ve,at,Qe,Et,Oe,Te,it,xt,wt,Xt,Pt,Ht,yt,ft,Nt,mt,bt,Zt,Rt,Jt,nt,ot,li,Ae,Dt,Ft,Ot,Ut,jt,ci,Kt,Yt,mi,Vt,ct,di,Be,fi,Qt,Je,pi,me,$t,hi,_i,wi,yi,Ei,Fe,Y,$,Me,_r,ji,Qr,si,yr,Ji,Qi,Gi,ur,xr,Ii,Ri,cr,wr,zi,Si,Hi,Di,ei,Ki,ti,br,ii,H,_e,ye,st,Mr,Pr,$r,Ms,bn,Ns,Yi,en,Ai,tn,Cr,Sr,Wn,Sn,Fs,kr,jn,Nr,Us,as,os,Gn,Fr=t[41],Pi=[];for(let We=0;We<Fr.length;We+=1)Pi[We]=kc(Sc(t,Fr,We));let ya=[1,2,3,4,5,6,7,8,9,10,11,12],R=[];for(let We=0;We<12;We+=1)R[We]=Ty(ky(t,ya,We));let $i=t[42]&&Tc(t);function ba(We,Gt){return We[42]?Ay:Ey}let Vs=ba(t),Lr=Vs(t);return{c(){e=F("div"),i=F("div"),i.innerHTML=`<strong class="svelte-g76q0j">Player settings:</strong>
|
|
49
49
|
|
|
50
50
|
<a tabindex="-1" target="_blank" class="docs svelte-g76q0j" href="https://github.com/beyondwords-io/player/blob/main/doc/player-settings.md">view docs</a>`,n=Ce(),a=F("br"),l=Ce(),g=F("div"),p=Le(`playerStyle:
|
|
51
51
|
`),_=F("select"),k=F("option"),k.textContent="small",T=F("option"),T.textContent="standard",C=F("option"),C.textContent="large",U=F("option"),U.textContent="video",V=Ce(),N=F("div"),Q=Le(`playbackState:
|
|
@@ -55,7 +55,7 @@ This context may be helpful:
|
|
|
55
55
|
`),G=F("select"),X=F("option"),X.textContent="auto",B=F("option"),B.textContent="segments",Ue=F("option"),Ue.textContent="seconds",De=F("option"),De.textContent="seconds-15",q=F("option"),q.textContent="seconds-15-30",ve=F("option"),ve.textContent="tracks",at=Ce(),Qe=F("div"),Et=Le(`playlistStyle:
|
|
56
56
|
`),Oe=F("select"),Te=F("option"),Te.textContent="auto",it=F("option"),it.textContent="show",xt=F("option"),xt.textContent="show-3",wt=F("option"),wt.textContent="show-999",Xt=F("option"),Xt.textContent="hide",Pt=Ce(),Ht=F("div"),yt=Le(`playlistToggle:
|
|
57
57
|
`),ft=F("select"),Nt=F("option"),Nt.textContent="auto",mt=F("option"),mt.textContent="show",bt=F("option"),bt.textContent="hide",Zt=Ce(),Rt=F("div"),Jt=Le(`advertIndex:
|
|
58
|
-
`),nt=F("select"),ot=F("option"),ot.textContent="-1 (none)";for(let We=0;We<Pi.length;We+=1)Pi[We].c();li=Ce(),
|
|
58
|
+
`),nt=F("select"),ot=F("option"),ot.textContent="-1 (none)";for(let We=0;We<Pi.length;We+=1)Pi[We].c();li=Ce(),Ae=F("div"),Dt=Le(`widgetStyle:
|
|
59
59
|
`),Ft=F("select"),Ot=F("option"),Ot.textContent="small",Ut=F("option"),Ut.textContent="standard",jt=F("option"),jt.textContent="large",ci=F("option"),ci.textContent="video",Kt=Ce(),Yt=F("div"),mi=Le(`widgetPosition:
|
|
60
60
|
`),Vt=F("select"),ct=F("option"),ct.textContent="auto",di=F("option"),di.textContent="left",Be=F("option"),Be.textContent="center",fi=F("option"),fi.textContent="right",Qt=Ce(),Je=F("div"),pi=Le(`widgetWidth:
|
|
61
61
|
`),me=F("select"),$t=F("option"),$t.textContent="auto",hi=F("option"),hi.textContent="400px",_i=F("option"),_i.textContent="30rem",wi=F("option"),wi.textContent="fit-content",yi=F("option"),yi.textContent="initial",Ei=F("option"),Ei.textContent="0",Fe=Ce(),Y=F("div"),$=Le(`textColor:
|
|
@@ -66,9 +66,9 @@ This context may be helpful:
|
|
|
66
66
|
`),Si=F("select"),Hi=F("option"),Hi.textContent="all",Di=F("option"),Di.textContent="body",ei=F("option"),ei.textContent="none",Ki=F("option"),Ki.textContent="all-none",ti=F("option"),ti.textContent="none-all",br=Ce(),ii=F("div"),H=Le(`clickableSections:
|
|
67
67
|
`),_e=F("select"),ye=F("option"),ye.textContent="all",st=F("option"),st.textContent="body",Mr=F("option"),Mr.textContent="none",Pr=F("option"),Pr.textContent="all-none",$r=F("option"),$r.textContent="none-all",Ms=Ce(),bn=F("div"),Ns=Le(`segmentWidgetSections:
|
|
68
68
|
`),Yi=F("select"),en=F("option"),en.textContent="all",Ai=F("option"),Ai.textContent="body",tn=F("option"),tn.textContent="none",Cr=F("option"),Cr.textContent="all-none",Sr=F("option"),Sr.textContent="none-all",Wn=Ce(),Sn=F("div"),Fs=Le(`segmentWidgetPosition:
|
|
69
|
-
`),kr=F("select");for(let We=0;We<12;We+=1)R[We].c();jn=Ce(),$i&&$i.c(),Nr=Ce(),Us=F("br"),as=Ce(),Lr.c(),ee(i,"class","heading svelte-g76q0j"),k.__value="small",k.value=k.__value,T.__value="standard",T.value=T.__value,C.__value="large",C.value=C.__value,U.__value="video",U.value=U.__value,ee(_,"tabindex",-1),ee(_,"class","svelte-g76q0j"),t[6]===void 0&&Wt(()=>t[43].call(_)),ee(g,"class","control svelte-g76q0j"),ue.__value="stopped",ue.value=ue.__value,ie.__value="playing",ie.value=ie.__value,be.__value="paused",be.value=be.__value,ee(W,"tabindex",-1),ee(W,"class","svelte-g76q0j"),t[20]===void 0&&Wt(()=>t[44].call(W)),ee(N,"class","control svelte-g76q0j"),ee(Z,"tabindex",-1),ee(Z,"type","text"),ee(Z,"class","svelte-g76q0j"),ee(fe,"class","control svelte-g76q0j"),ee(Ke,"tabindex",-1),ee(Ke,"type","text"),ee(Ke,"class","svelte-g76q0j"),ee(le,"class","control svelte-g76q0j"),X.__value="auto",X.value=X.__value,B.__value="segments",B.value=B.__value,Ue.__value="seconds",Ue.value=Ue.__value,De.__value="seconds-15",De.value=De.__value,q.__value="seconds-15-30",q.value=q.__value,ve.__value="tracks",ve.value=ve.__value,ee(G,"tabindex",-1),ee(G,"class","svelte-g76q0j"),t[9]===void 0&&Wt(()=>t[47].call(G)),ee(Ee,"class","control svelte-g76q0j"),Te.__value="auto",Te.value=Te.__value,it.__value="show",it.value=it.__value,xt.__value="show-3",xt.value=xt.__value,wt.__value="show-999",wt.value=wt.__value,Xt.__value="hide",Xt.value=Xt.__value,ee(Oe,"tabindex",-1),ee(Oe,"class","svelte-g76q0j"),t[10]===void 0&&Wt(()=>t[48].call(Oe)),ee(Qe,"class","control svelte-g76q0j"),Nt.__value="auto",Nt.value=Nt.__value,mt.__value="show",mt.value=mt.__value,bt.__value="hide",bt.value=bt.__value,ee(ft,"tabindex",-1),ee(ft,"class","svelte-g76q0j"),t[11]===void 0&&Wt(()=>t[49].call(ft)),ee(Ht,"class","control svelte-g76q0j"),ot.__value=-1,ot.value=ot.__value,ee(nt,"tabindex",-1),ee(nt,"class","svelte-g76q0j"),t[15]===void 0&&Wt(()=>t[50].call(nt)),ee(Rt,"class","control svelte-g76q0j"),Ot.__value="small",Ot.value=Ot.__value,Ut.__value="standard",Ut.value=Ut.__value,jt.__value="large",jt.value=jt.__value,ci.__value="video",ci.value=ci.__value,ee(Ft,"tabindex",-1),ee(Ft,"class","svelte-g76q0j"),t[22]===void 0&&Wt(()=>t[51].call(Ft)),ee(Pe,"class","control svelte-g76q0j"),ct.__value="auto",ct.value=ct.__value,di.__value="left",di.value=di.__value,Be.__value="center",Be.value=Be.__value,fi.__value="right",fi.value=fi.__value,ee(Vt,"tabindex",-1),ee(Vt,"class","svelte-g76q0j"),t[23]===void 0&&Wt(()=>t[52].call(Vt)),ee(Yt,"class","control svelte-g76q0j"),$t.__value="auto",$t.value=$t.__value,hi.__value="400px",hi.value=hi.__value,_i.__value="30rem",_i.value=_i.__value,wi.__value="fit-content",wi.value=wi.__value,yi.__value="initial",yi.value=yi.__value,Ei.__value="0",Ei.value=Ei.__value,ee(me,"tabindex",-1),ee(me,"class","svelte-g76q0j"),t[24]===void 0&&Wt(()=>t[53].call(me)),ee(Je,"class","control svelte-g76q0j"),ee(Me,"tabindex",-1),ee(Me,"type","text"),ee(Me,"class","svelte-g76q0j"),ee(Y,"class","control svelte-g76q0j"),ee(si,"tabindex",-1),ee(si,"type","text"),ee(si,"class","svelte-g76q0j"),ee(ji,"class","control svelte-g76q0j"),ee(Gi,"tabindex",-1),ee(Gi,"type","text"),ee(Gi,"class","svelte-g76q0j"),ee(Ji,"class","control svelte-g76q0j"),ee(Ri,"tabindex",-1),ee(Ri,"type","text"),ee(Ri,"class","svelte-g76q0j"),ee(xr,"class","control svelte-g76q0j"),Hi.__value="all",Hi.value=Hi.__value,Di.__value="body",Di.value=Di.__value,ei.__value="none",ei.value=ei.__value,Ki.__value="all-none",Ki.value=Ki.__value,ti.__value="none-all",ti.value=ti.__value,ee(Si,"tabindex",-1),ee(Si,"class","svelte-g76q0j"),t[31]===void 0&&Wt(()=>t[58].call(Si)),ee(wr,"class","control svelte-g76q0j"),ye.__value="all",ye.value=ye.__value,st.__value="body",st.value=st.__value,Mr.__value="none",Mr.value=Mr.__value,Pr.__value="all-none",Pr.value=Pr.__value,$r.__value="none-all",$r.value=$r.__value,ee(_e,"tabindex",-1),ee(_e,"class","svelte-g76q0j"),t[32]===void 0&&Wt(()=>t[59].call(_e)),ee(ii,"class","control svelte-g76q0j"),en.__value="all",en.value=en.__value,Ai.__value="body",Ai.value=Ai.__value,tn.__value="none",tn.value=tn.__value,Cr.__value="all-none",Cr.value=Cr.__value,Sr.__value="none-all",Sr.value=Sr.__value,ee(Yi,"tabindex",-1),ee(Yi,"class","svelte-g76q0j"),t[33]===void 0&&Wt(()=>t[60].call(Yi)),ee(bn,"class","control svelte-g76q0j"),ee(kr,"tabindex",-1),ee(kr,"class","svelte-g76q0j"),t[34]===void 0&&Wt(()=>t[61].call(kr)),ee(Sn,"class","control svelte-g76q0j"),ee(e,"class","control-panel")},m(We,Gt){se(We,e,Gt),I(e,i),I(e,n),I(e,a),I(e,l),I(e,g),I(g,p),I(g,_),I(_,k),I(_,T),I(_,C),I(_,U),lt(_,t[6],!0),I(e,V),I(e,N),I(N,Q),I(N,W),I(W,ue),I(W,ie),I(W,be),lt(W,t[20],!0),I(e,Se),I(e,fe),I(fe,pe),I(fe,Z),Tt(Z,t[7]),I(e,L),I(e,le),I(le,z),I(le,Ke),Tt(Ke,t[8]),I(e,Ie),I(e,Ee),I(Ee,ke),I(Ee,G),I(G,X),I(G,B),I(G,Ue),I(G,De),I(G,q),I(G,ve),lt(G,t[9],!0),I(e,at),I(e,Qe),I(Qe,Et),I(Qe,Oe),I(Oe,Te),I(Oe,it),I(Oe,xt),I(Oe,wt),I(Oe,Xt),lt(Oe,t[10],!0),I(e,Pt),I(e,Ht),I(Ht,yt),I(Ht,ft),I(ft,Nt),I(ft,mt),I(ft,bt),lt(ft,t[11],!0),I(e,Zt),I(e,Rt),I(Rt,Jt),I(Rt,nt),I(nt,ot);for(let ai=0;ai<Pi.length;ai+=1)Pi[ai]&&Pi[ai].m(nt,null);lt(nt,t[15],!0),I(e,li),I(e,Pe),I(Pe,Dt),I(Pe,Ft),I(Ft,Ot),I(Ft,Ut),I(Ft,jt),I(Ft,ci),lt(Ft,t[22],!0),I(e,Kt),I(e,Yt),I(Yt,mi),I(Yt,Vt),I(Vt,ct),I(Vt,di),I(Vt,Be),I(Vt,fi),lt(Vt,t[23],!0),I(e,Qt),I(e,Je),I(Je,pi),I(Je,me),I(me,$t),I(me,hi),I(me,_i),I(me,wi),I(me,yi),I(me,Ei),lt(me,t[24],!0),I(e,Fe),I(e,Y),I(Y,$),I(Y,Me),Tt(Me,t[26]),I(e,_r),I(e,ji),I(ji,Qr),I(ji,si),Tt(si,t[27]),I(e,yr),I(e,Ji),I(Ji,Qi),I(Ji,Gi),Tt(Gi,t[28]),I(e,ur),I(e,xr),I(xr,Ii),I(xr,Ri),Tt(Ri,t[29]),I(e,cr),I(e,wr),I(wr,zi),I(wr,Si),I(Si,Hi),I(Si,Di),I(Si,ei),I(Si,Ki),I(Si,ti),lt(Si,t[31],!0),I(e,br),I(e,ii),I(ii,H),I(ii,_e),I(_e,ye),I(_e,st),I(_e,Mr),I(_e,Pr),I(_e,$r),lt(_e,t[32],!0),I(e,Ms),I(e,bn),I(bn,Ns),I(bn,Yi),I(Yi,en),I(Yi,Ai),I(Yi,tn),I(Yi,Cr),I(Yi,Sr),lt(Yi,t[33],!0),I(e,Wn),I(e,Sn),I(Sn,Fs),I(Sn,kr);for(let ai=0;ai<12;ai+=1)R[ai]&&R[ai].m(kr,null);lt(kr,t[34],!0),I(e,jn),$i&&$i.m(e,null),I(e,Nr),I(e,Us),I(e,as),Lr.m(e,null),os||(Gn=[ge(_,"change",t[43]),ge(W,"change",t[44]),ge(Z,"input",t[45]),ge(Ke,"input",t[46]),ge(G,"change",t[47]),ge(Oe,"change",t[48]),ge(ft,"change",t[49]),ge(nt,"change",t[50]),ge(Ft,"change",t[51]),ge(Vt,"change",t[52]),ge(me,"change",t[53]),ge(Me,"input",t[54]),ge(si,"input",t[55]),ge(Gi,"input",t[56]),ge(Ri,"input",t[57]),ge(Si,"change",t[58]),ge(_e,"change",t[59]),ge(Yi,"change",t[60]),ge(kr,"change",t[61])],os=!0)},p(We,Gt){if(Gt[0]&64&<(_,We[6]),Gt[0]&1048576&<(W,We[20]),Gt[0]&128&&Z.value!==We[7]&&Tt(Z,We[7]),Gt[0]&256&&Ke.value!==We[8]&&Tt(Ke,We[8]),Gt[0]&512&<(G,We[9]),Gt[0]&1024&<(Oe,We[10]),Gt[0]&2048&<(ft,We[11]),Gt[1]&1024){Fr=We[41];let ai;for(ai=0;ai<Fr.length;ai+=1){const ls=Sc(We,Fr,ai);Pi[ai]?Pi[ai].p(ls,Gt):(Pi[ai]=kc(ls),Pi[ai].c(),Pi[ai].m(nt,null))}for(;ai<Pi.length;ai+=1)Pi[ai].d(1);Pi.length=Fr.length}Gt[0]&32768&<(nt,We[15]),Gt[0]&4194304&<(Ft,We[22]),Gt[0]&8388608&<(Vt,We[23]),Gt[0]&16777216&<(me,We[24]),Gt[0]&67108864&&Me.value!==We[26]&&Tt(Me,We[26]),Gt[0]&134217728&&si.value!==We[27]&&Tt(si,We[27]),Gt[0]&268435456&&Gi.value!==We[28]&&Tt(Gi,We[28]),Gt[0]&536870912&&Ri.value!==We[29]&&Tt(Ri,We[29]),Gt[1]&1&<(Si,We[31]),Gt[1]&2&<(_e,We[32]),Gt[1]&4&<(Yi,We[33]),Gt[1]&8&<(kr,We[34]),We[42]?$i?$i.p(We,Gt):($i=Tc(We),$i.c(),$i.m(e,Nr)):$i&&($i.d(1),$i=null),Vs===(Vs=ba(We))&&Lr?Lr.p(We,Gt):(Lr.d(1),Lr=Vs(We),Lr&&(Lr.c(),Lr.m(e,null)))},i:oe,o:oe,d(We){We&&te(e),Ln(Pi,We),Ln(R,We),$i&&$i.d(),Lr.d(),os=!1,Mt(Gn)}}}function wy(t,e,i){let{projectId:n}=e,{contentId:a}=e,{playlistId:l}=e,{sourceId:g}=e,{sourceUrl:p}=e,{showUserInterface:_}=e,{playerStyle:k}=e,{playerTitle:T}=e,{callToAction:C}=e,{skipButtonStyle:U}=e,{playlistStyle:V}=e,{playlistToggle:N}=e,{mediaSession:Q}=e,{content:W}=e,{contentIndex:ue}=e,{introsOutros:ie}=e,{introsOutrosIndex:be}=e,{adverts:Se}=e,{advertIndex:fe}=e,{persistentAdImage:pe}=e,{persistentIndex:Z}=e,{duration:L}=e,{currentTime:le}=e,{playbackState:z}=e,{playbackRate:Ke}=e,{widgetStyle:Ie}=e,{widgetPosition:Ee}=e,{widgetWidth:ke}=e,{widgetTarget:G}=e,{textColor:X}=e,{backgroundColor:B}=e,{iconColor:Ue}=e,{highlightColor:De}=e,{logoIconEnabled:q}=e,{highlightSections:ve}=e,{clickableSections:at}=e,{segmentWidgetSections:Qe}=e,{segmentWidgetPosition:Et}=e,{advertConsent:Oe}=e,{analyticsConsent:Te}=e,{analyticsCustomUrl:it}=e,{analyticsTag:xt}=e,wt=!1;function Xt(){k=gi(this),i(6,k)}function Pt(){z=gi(this),i(20,z)}function Ht(){T=this.value,i(7,T)}function yt(){C=this.value,i(8,C)}function ft(){U=gi(this),i(9,U)}function Nt(){V=gi(this),i(10,V)}function mt(){N=gi(this),i(11,N)}function bt(){fe=gi(this),i(15,fe)}function Zt(){Ie=gi(this),i(22,Ie)}function Rt(){Ee=gi(this),i(23,Ee)}function Jt(){ke=gi(this),i(24,ke)}function nt(){X=this.value,i(26,X)}function ot(){B=this.value,i(27,B)}function li(){Ue=this.value,i(28,Ue)}function Pe(){De=this.value,i(29,De)}function Dt(){ve=gi(this),i(31,ve)}function Ft(){at=gi(this),i(32,at)}function Ot(){Qe=gi(this),i(33,Qe)}function Ut(){Et=gi(this),i(34,Et)}function jt(){n=this.value,i(0,n)}function ci(){a=this.value,i(1,a)}function Kt(){l=this.value,i(2,l)}function Yt(){g=this.value,i(3,g)}function mi(){p=this.value,i(4,p)}function Vt(){_=gi(this),i(5,_)}function ct(){Q=gi(this),i(12,Q)}function di(){ue=gi(this),i(13,ue)}function Be(){be=gi(this),i(14,be)}function fi(){pe=gi(this),i(16,pe)}function Qt(){Z=gi(this),i(17,Z)}function Je(){L=this.value,i(18,L)}function pi(){le=this.value,i(19,le)}function me(){Ke=this.value,i(21,Ke)}function $t(){G=this.value,i(25,G)}function hi(){q=gi(this),i(30,q)}function _i(){Oe=gi(this),i(35,Oe)}function wi(){Te=gi(this),i(36,Te)}function yi(){it=this.value,i(37,it)}function Ei(){xt=this.value,i(38,xt)}const Fe=()=>i(42,wt=!1),Y=()=>i(42,wt=!0);return t.$$set=$=>{"projectId"in $&&i(0,n=$.projectId),"contentId"in $&&i(1,a=$.contentId),"playlistId"in $&&i(2,l=$.playlistId),"sourceId"in $&&i(3,g=$.sourceId),"sourceUrl"in $&&i(4,p=$.sourceUrl),"showUserInterface"in $&&i(5,_=$.showUserInterface),"playerStyle"in $&&i(6,k=$.playerStyle),"playerTitle"in $&&i(7,T=$.playerTitle),"callToAction"in $&&i(8,C=$.callToAction),"skipButtonStyle"in $&&i(9,U=$.skipButtonStyle),"playlistStyle"in $&&i(10,V=$.playlistStyle),"playlistToggle"in $&&i(11,N=$.playlistToggle),"mediaSession"in $&&i(12,Q=$.mediaSession),"content"in $&&i(39,W=$.content),"contentIndex"in $&&i(13,ue=$.contentIndex),"introsOutros"in $&&i(40,ie=$.introsOutros),"introsOutrosIndex"in $&&i(14,be=$.introsOutrosIndex),"adverts"in $&&i(41,Se=$.adverts),"advertIndex"in $&&i(15,fe=$.advertIndex),"persistentAdImage"in $&&i(16,pe=$.persistentAdImage),"persistentIndex"in $&&i(17,Z=$.persistentIndex),"duration"in $&&i(18,L=$.duration),"currentTime"in $&&i(19,le=$.currentTime),"playbackState"in $&&i(20,z=$.playbackState),"playbackRate"in $&&i(21,Ke=$.playbackRate),"widgetStyle"in $&&i(22,Ie=$.widgetStyle),"widgetPosition"in $&&i(23,Ee=$.widgetPosition),"widgetWidth"in $&&i(24,ke=$.widgetWidth),"widgetTarget"in $&&i(25,G=$.widgetTarget),"textColor"in $&&i(26,X=$.textColor),"backgroundColor"in $&&i(27,B=$.backgroundColor),"iconColor"in $&&i(28,Ue=$.iconColor),"highlightColor"in $&&i(29,De=$.highlightColor),"logoIconEnabled"in $&&i(30,q=$.logoIconEnabled),"highlightSections"in $&&i(31,ve=$.highlightSections),"clickableSections"in $&&i(32,at=$.clickableSections),"segmentWidgetSections"in $&&i(33,Qe=$.segmentWidgetSections),"segmentWidgetPosition"in $&&i(34,Et=$.segmentWidgetPosition),"advertConsent"in $&&i(35,Oe=$.advertConsent),"analyticsConsent"in $&&i(36,Te=$.analyticsConsent),"analyticsCustomUrl"in $&&i(37,it=$.analyticsCustomUrl),"analyticsTag"in $&&i(38,xt=$.analyticsTag)},[n,a,l,g,p,_,k,T,C,U,V,N,Q,ue,be,fe,pe,Z,L,le,z,Ke,Ie,Ee,ke,G,X,B,Ue,De,q,ve,at,Qe,Et,Oe,Te,it,xt,W,ie,Se,wt,Xt,Pt,Ht,yt,ft,Nt,mt,bt,Zt,Rt,Jt,nt,ot,li,Pe,Dt,Ft,Ot,Ut,jt,ci,Kt,Yt,mi,Vt,ct,di,Be,fi,Qt,Je,pi,me,$t,hi,_i,wi,yi,Ei,Fe,Y]}class Py extends tt{constructor(e){super(),et(this,e,wy,xy,Ye,{projectId:0,contentId:1,playlistId:2,sourceId:3,sourceUrl:4,showUserInterface:5,playerStyle:6,playerTitle:7,callToAction:8,skipButtonStyle:9,playlistStyle:10,playlistToggle:11,mediaSession:12,content:39,contentIndex:13,introsOutros:40,introsOutrosIndex:14,adverts:41,advertIndex:15,persistentAdImage:16,persistentIndex:17,duration:18,currentTime:19,playbackState:20,playbackRate:21,widgetStyle:22,widgetPosition:23,widgetWidth:24,widgetTarget:25,textColor:26,backgroundColor:27,iconColor:28,highlightColor:29,logoIconEnabled:30,highlightSections:31,clickableSections:32,segmentWidgetSections:33,segmentWidgetPosition:34,advertConsent:35,analyticsConsent:36,analyticsCustomUrl:37,analyticsTag:38},null,[-1,-1,-1])}get projectId(){return this.$$.ctx[0]}set projectId(e){this.$$set({projectId:e}),w()}get contentId(){return this.$$.ctx[1]}set contentId(e){this.$$set({contentId:e}),w()}get playlistId(){return this.$$.ctx[2]}set playlistId(e){this.$$set({playlistId:e}),w()}get sourceId(){return this.$$.ctx[3]}set sourceId(e){this.$$set({sourceId:e}),w()}get sourceUrl(){return this.$$.ctx[4]}set sourceUrl(e){this.$$set({sourceUrl:e}),w()}get showUserInterface(){return this.$$.ctx[5]}set showUserInterface(e){this.$$set({showUserInterface:e}),w()}get playerStyle(){return this.$$.ctx[6]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get playerTitle(){return this.$$.ctx[7]}set playerTitle(e){this.$$set({playerTitle:e}),w()}get callToAction(){return this.$$.ctx[8]}set callToAction(e){this.$$set({callToAction:e}),w()}get skipButtonStyle(){return this.$$.ctx[9]}set skipButtonStyle(e){this.$$set({skipButtonStyle:e}),w()}get playlistStyle(){return this.$$.ctx[10]}set playlistStyle(e){this.$$set({playlistStyle:e}),w()}get playlistToggle(){return this.$$.ctx[11]}set playlistToggle(e){this.$$set({playlistToggle:e}),w()}get mediaSession(){return this.$$.ctx[12]}set mediaSession(e){this.$$set({mediaSession:e}),w()}get content(){return this.$$.ctx[39]}set content(e){this.$$set({content:e}),w()}get contentIndex(){return this.$$.ctx[13]}set contentIndex(e){this.$$set({contentIndex:e}),w()}get introsOutros(){return this.$$.ctx[40]}set introsOutros(e){this.$$set({introsOutros:e}),w()}get introsOutrosIndex(){return this.$$.ctx[14]}set introsOutrosIndex(e){this.$$set({introsOutrosIndex:e}),w()}get adverts(){return this.$$.ctx[41]}set adverts(e){this.$$set({adverts:e}),w()}get advertIndex(){return this.$$.ctx[15]}set advertIndex(e){this.$$set({advertIndex:e}),w()}get persistentAdImage(){return this.$$.ctx[16]}set persistentAdImage(e){this.$$set({persistentAdImage:e}),w()}get persistentIndex(){return this.$$.ctx[17]}set persistentIndex(e){this.$$set({persistentIndex:e}),w()}get duration(){return this.$$.ctx[18]}set duration(e){this.$$set({duration:e}),w()}get currentTime(){return this.$$.ctx[19]}set currentTime(e){this.$$set({currentTime:e}),w()}get playbackState(){return this.$$.ctx[20]}set playbackState(e){this.$$set({playbackState:e}),w()}get playbackRate(){return this.$$.ctx[21]}set playbackRate(e){this.$$set({playbackRate:e}),w()}get widgetStyle(){return this.$$.ctx[22]}set widgetStyle(e){this.$$set({widgetStyle:e}),w()}get widgetPosition(){return this.$$.ctx[23]}set widgetPosition(e){this.$$set({widgetPosition:e}),w()}get widgetWidth(){return this.$$.ctx[24]}set widgetWidth(e){this.$$set({widgetWidth:e}),w()}get widgetTarget(){return this.$$.ctx[25]}set widgetTarget(e){this.$$set({widgetTarget:e}),w()}get textColor(){return this.$$.ctx[26]}set textColor(e){this.$$set({textColor:e}),w()}get backgroundColor(){return this.$$.ctx[27]}set backgroundColor(e){this.$$set({backgroundColor:e}),w()}get iconColor(){return this.$$.ctx[28]}set iconColor(e){this.$$set({iconColor:e}),w()}get highlightColor(){return this.$$.ctx[29]}set highlightColor(e){this.$$set({highlightColor:e}),w()}get logoIconEnabled(){return this.$$.ctx[30]}set logoIconEnabled(e){this.$$set({logoIconEnabled:e}),w()}get highlightSections(){return this.$$.ctx[31]}set highlightSections(e){this.$$set({highlightSections:e}),w()}get clickableSections(){return this.$$.ctx[32]}set clickableSections(e){this.$$set({clickableSections:e}),w()}get segmentWidgetSections(){return this.$$.ctx[33]}set segmentWidgetSections(e){this.$$set({segmentWidgetSections:e}),w()}get segmentWidgetPosition(){return this.$$.ctx[34]}set segmentWidgetPosition(e){this.$$set({segmentWidgetPosition:e}),w()}get advertConsent(){return this.$$.ctx[35]}set advertConsent(e){this.$$set({advertConsent:e}),w()}get analyticsConsent(){return this.$$.ctx[36]}set analyticsConsent(e){this.$$set({analyticsConsent:e}),w()}get analyticsCustomUrl(){return this.$$.ctx[37]}set analyticsCustomUrl(e){this.$$set({analyticsCustomUrl:e}),w()}get analyticsTag(){return this.$$.ctx[38]}set analyticsTag(e){this.$$set({analyticsTag:e}),w()}}const Cy=(t,e,i)=>{Ry(t);const n=new Image;return n.setAttribute("crossorigin","anonymous"),new Promise((a,l)=>{n.addEventListener("load",Ly(n,e,i,a,l)),n.addEventListener("error",l),n.src=t})},Ly=(t,e,i,n,a)=>()=>{const l=document.createElement("canvas"),g=l.getContext("2d");l.width=e,l.height=i,g.drawImage(t,0,0,e,i),l.toBlob(Iy(t,e,i,n,a))},As={},Iy=(t,e,i,n,a)=>l=>{var p;l||a();const g=URL.createObjectURL(l);As[p=t.src]||(As[p]=[]),As[t.src].push(g),n({src:g,sizes:`${e}x${i}`,type:"image/png"})},Ry=t=>{Object.keys(As).filter(n=>n!==t).map(n=>As[n]).flat().forEach(n=>URL.revokeObjectURL(n))},Dy=(t,e,i)=>an(this,null,function*(){t=yield t;const n=t.innerHTML;return{src:`data:image/svg+xml,${encodeURIComponent(n)}`,sizes:`${e}x${i}`,type:"image/svg+xml"}}),Oy=(t,e,i)=>Mi(t,e,i,1),By=(t,e,i)=>rt(t,e,e==="style"?Ny(i):i),My=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Ny=t=>t.split(My).map(e=>e+" !important").join(";");function wc(t,e,i){const n=t.slice();return n[39]=e[i],n[40]=e,n[41]=i,n}function Pc(t){let e,i,n,a=t[41],l;i=new ec({props:{fill:t[2],color:t[1],scale:t[39]/18,zoom:.65}});const g=()=>t[36](e,a),p=()=>t[36](null,a);return{c(){e=F("div"),He(i.$$.fragment),n=Ce(),Oy(e,"display","none")},m(_,k){se(_,e,k),Ge(i,e,null),I(e,n),g(),l=!0},p(_,k){t=_;const T={};k[0]&4&&(T.fill=t[2]),k[0]&2&&(T.color=t[1]),i.$set(T),a!==t[41]&&(p(),a=t[41],g())},i(_){l||(J(i.$$.fragment,_),l=!0)},o(_){ae(i.$$.fragment,_),l=!1},d(_){_&&te(e),ze(i),p()}}}function Fy(t){let e,i,n=t[3],a=[];for(let g=0;g<n.length;g+=1)a[g]=Pc(wc(t,n,g));const l=g=>ae(a[g],1,1,()=>{a[g]=null});return{c(){e=F("div");for(let g=0;g<a.length;g+=1)a[g].c();By(e,"class","media-session")},m(g,p){se(g,e,p);for(let _=0;_<a.length;_+=1)a[_]&&a[_].m(e,null);i=!0},p(g,p){if(p[0]&15){n=g[3];let _;for(_=0;_<n.length;_+=1){const k=wc(g,n,_);a[_]?(a[_].p(k,p),J(a[_],1)):(a[_]=Pc(k),a[_].c(),J(a[_],1),a[_].m(e,null))}for(Lt(),_=n.length;_<a.length;_+=1)l(_);It()}},i(g){if(!i){for(let p=0;p<n.length;p+=1)J(a[p]);i=!0}},o(g){a=a.filter(Boolean);for(let p=0;p<a.length;p+=1)ae(a[p]);i=!1},d(g){g&&te(e),Ln(a,g)}}}function Uy(t,e,i){let n,a,l,g,p,_,k,T,C,U,V,N,Q,W,ue,ie,be,Se,fe,pe,Z;const L=[96,128,192,256,384,512],le=["hangup","nextslide","nexttrack","pause","play","previousslide","previoustrack","seekbackward","seekforward","seekto","skipad","stop","togglecamera","togglemicrophone"];let{content:z=[]}=e,{contentIndex:Ke=0}=e,{activeAdvert:Ie=void 0}=e,{persistentAdvert:Ee=void 0}=e,{duration:ke=0}=e,{playbackState:G="stopped"}=e,{skipButtonStyle:X="auto"}=e,{backgroundColor:B="#f5f5f5"}=e,{iconColor:Ue="black"}=e,{onEvent:De=()=>{}}=e,q=[],ve=new Set,at=L.map(()=>{}),Qe=L.map(()=>{});const Et=()=>i(15,ve=ve.add(W));function Oe(Te,it){Ne[Te?"unshift":"push"](()=>{at[it]=Te,i(0,at)})}return t.$$set=Te=>{"content"in Te&&i(4,z=Te.content),"contentIndex"in Te&&i(5,Ke=Te.contentIndex),"activeAdvert"in Te&&i(6,Ie=Te.activeAdvert),"persistentAdvert"in Te&&i(7,Ee=Te.persistentAdvert),"duration"in Te&&i(8,ke=Te.duration),"playbackState"in Te&&i(9,G=Te.playbackState),"skipButtonStyle"in Te&&i(10,X=Te.skipButtonStyle),"backgroundColor"in Te&&i(11,B=Te.backgroundColor),"iconColor"in Te&&i(12,Ue=Te.iconColor),"onEvent"in Te&&i(13,De=Te.onEvent)},t.$$.update=()=>{t.$$.dirty[0]&512&&i(33,n=G==="stopped"),t.$$.dirty[0]&64|t.$$.dirty[1]&4&&i(34,a=Ie&&!n),t.$$.dirty[0]&16&&i(35,l=z.length>1),t.$$.dirty[0]&48&&i(27,g=z[Ke]),t.$$.dirty[0]&1024|t.$$.dirty[1]&16&&i(19,p=X==="auto"?l?"tracks":"segments":X),t.$$.dirty[0]&524288&&i(21,_=parseFloat(p.split("-")[1]||10)),t.$$.dirty[0]&2621440&&i(18,k=parseFloat(p.split("-")[2]||_)),t.$$.dirty[0]&524288|t.$$.dirty[1]&8&&i(20,T=!a&&p!=="tracks"),t.$$.dirty[0]&524288|t.$$.dirty[1]&8&&i(17,C=!a&&p==="tracks"),t.$$.dirty[1]&8&&i(22,U=!a),t.$$.dirty[0]&2112|t.$$.dirty[1]&8&&i(2,V=a&&(Ie==null?void 0:Ie.backgroundColor)||B),t.$$.dirty[0]&4160|t.$$.dirty[1]&8&&i(1,N=a&&(Ie==null?void 0:Ie.iconColor)||Ue),t.$$.dirty[0]&7&&i(16,Qe=L.map((Te,it)=>Ru().then(()=>at[it]))),t.$$.dirty[0]&134217920|t.$$.dirty[1]&12&&i(32,Q=a&&Ie.imageUrl||!n&&(Ee==null?void 0:Ee.imageUrl)||(g==null?void 0:g.imageUrl)),t.$$.dirty[0]&32768|t.$$.dirty[1]&2&&i(28,W=ve.has(Q)?null:Q),t.$$.dirty[0]&268435456&&i(31,ue=W?L.map(Te=>Cy(W,Te,Te)):[]),t.$$.dirty[0]&268435456&&i(30,ie=W?[{src:W,sizes:"any"}]:[]),t.$$.dirty[0]&268500992&&i(29,be=W?[]:L.map((Te,it)=>Dy(Qe[it],Te,Te))),t.$$.dirty[0]&1610612736|t.$$.dirty[1]&1&&i(26,Se=Promise.all([...ue,...ie,...be])),t.$$.dirty[0]&134217728&&i(25,fe=(g==null?void 0:g.title)||""),t.$$.dirty[0]&67108864&&Se.then(Te=>i(14,q=Te)).catch(Et),t.$$.dirty[0]&58736640&&(navigator.mediaSession.metadata=new MediaMetadata({title:fe,artist:pe,album:Z,artwork:q})),t.$$.dirty[0]&8192&&navigator.mediaSession.setActionHandler("play",()=>{De(qe({type:"PressedPlay",description:"The play button was pressed.",initiatedBy:"media-session-api"}))}),t.$$.dirty[0]&8192&&navigator.mediaSession.setActionHandler("pause",()=>{De(qe({type:"PressedPause",description:"The pause button was pressed.",initiatedBy:"media-session-api"}))}),t.$$.dirty[0]&4202752&&navigator.mediaSession.setActionHandler("seekto",U?({seekTime:Te})=>{De(qe({type:"ScrubbedProgressBar",description:"The user pressed on the progress bar then dragged.",initiatedBy:"media-session-api",ratio:Math.max(0,Math.min(1,Te/ke))}))}:null),t.$$.dirty[0]&3678208&&navigator.mediaSession.setActionHandler("seekbackward",T?({seekOffset:Te})=>{De(qe(p==="seconds"||Te?{type:"PressedSeekBack",description:"The seek backward button was pressed.",initiatedBy:"media-session-api",seconds:Te||_}:{type:"PressedPrevSegment",description:"The previous segment button was pressed.",initiatedBy:"media-session-api"}))}:null),t.$$.dirty[0]&1843200&&navigator.mediaSession.setActionHandler("seekforward",T?({seekOffset:Te})=>{De(qe(p==="seconds"||Te?{type:"PressedSeekAhead",description:"The seek ahead button was pressed.",initiatedBy:"media-session-api",seconds:Te||k}:{type:"PressedNextSegment",description:"The next segment button was pressed.",initiatedBy:"media-session-api"}))}:null),t.$$.dirty[0]&139264&&navigator.mediaSession.setActionHandler("previoustrack",C?()=>{De(qe({type:"PressedPrevTrack",description:"The previous track button was pressed.",initiatedBy:"media-session-api"}))}:null),t.$$.dirty[0]&139264&&navigator.mediaSession.setActionHandler("nexttrack",C?()=>{De(qe({type:"PressedNextTrack",description:"The next track button was pressed.",initiatedBy:"media-session-api"}))}:null)},i(24,pe=""),i(23,Z=""),navigator.mediaSession.setByPlayer=!0,le.forEach(Te=>{try{navigator.mediaSession.setActionHandler(Te,null)}catch(it){}}),[at,N,V,L,z,Ke,Ie,Ee,ke,G,X,B,Ue,De,q,ve,Qe,C,k,p,T,_,U,Z,pe,fe,Se,g,W,be,ie,ue,Q,n,a,l,Oe]}class Vy extends tt{constructor(e){super(),et(this,e,Uy,Fy,Ye,{content:4,contentIndex:5,activeAdvert:6,persistentAdvert:7,duration:8,playbackState:9,skipButtonStyle:10,backgroundColor:11,iconColor:12,onEvent:13},null,[-1,-1])}get content(){return this.$$.ctx[4]}set content(e){this.$$set({content:e}),w()}get contentIndex(){return this.$$.ctx[5]}set contentIndex(e){this.$$set({contentIndex:e}),w()}get activeAdvert(){return this.$$.ctx[6]}set activeAdvert(e){this.$$set({activeAdvert:e}),w()}get persistentAdvert(){return this.$$.ctx[7]}set persistentAdvert(e){this.$$set({persistentAdvert:e}),w()}get duration(){return this.$$.ctx[8]}set duration(e){this.$$set({duration:e}),w()}get playbackState(){return this.$$.ctx[9]}set playbackState(e){this.$$set({playbackState:e}),w()}get skipButtonStyle(){return this.$$.ctx[10]}set skipButtonStyle(e){this.$$set({skipButtonStyle:e}),w()}get backgroundColor(){return this.$$.ctx[11]}set backgroundColor(e){this.$$set({backgroundColor:e}),w()}get iconColor(){return this.$$.ctx[12]}set iconColor(e){this.$$set({iconColor:e}),w()}get onEvent(){return this.$$.ctx[13]}set onEvent(e){this.$$set({onEvent:e}),w()}}const Cc=(t,e,i)=>rt(t,e,e==="style"?jy(i):i),Wy=/;(?!([^()]*\([^()]*\))*[^()]*\))/,jy=t=>t.split(Wy).map(e=>e+" !important").join(";");function Lc(t){let e,i,n,a;return{c(){e=F("script"),n=Ce(),a=F("script"),a.textContent=`window.dataLayer = window.dataLayer || [];
|
|
69
|
+
`),kr=F("select");for(let We=0;We<12;We+=1)R[We].c();jn=Ce(),$i&&$i.c(),Nr=Ce(),Us=F("br"),as=Ce(),Lr.c(),ee(i,"class","heading svelte-g76q0j"),k.__value="small",k.value=k.__value,T.__value="standard",T.value=T.__value,C.__value="large",C.value=C.__value,U.__value="video",U.value=U.__value,ee(_,"tabindex",-1),ee(_,"class","svelte-g76q0j"),t[6]===void 0&&Wt(()=>t[43].call(_)),ee(g,"class","control svelte-g76q0j"),ue.__value="stopped",ue.value=ue.__value,ie.__value="playing",ie.value=ie.__value,be.__value="paused",be.value=be.__value,ee(W,"tabindex",-1),ee(W,"class","svelte-g76q0j"),t[20]===void 0&&Wt(()=>t[44].call(W)),ee(N,"class","control svelte-g76q0j"),ee(Z,"tabindex",-1),ee(Z,"type","text"),ee(Z,"class","svelte-g76q0j"),ee(fe,"class","control svelte-g76q0j"),ee(Ke,"tabindex",-1),ee(Ke,"type","text"),ee(Ke,"class","svelte-g76q0j"),ee(le,"class","control svelte-g76q0j"),X.__value="auto",X.value=X.__value,B.__value="segments",B.value=B.__value,Ue.__value="seconds",Ue.value=Ue.__value,De.__value="seconds-15",De.value=De.__value,q.__value="seconds-15-30",q.value=q.__value,ve.__value="tracks",ve.value=ve.__value,ee(G,"tabindex",-1),ee(G,"class","svelte-g76q0j"),t[9]===void 0&&Wt(()=>t[47].call(G)),ee(Ee,"class","control svelte-g76q0j"),Te.__value="auto",Te.value=Te.__value,it.__value="show",it.value=it.__value,xt.__value="show-3",xt.value=xt.__value,wt.__value="show-999",wt.value=wt.__value,Xt.__value="hide",Xt.value=Xt.__value,ee(Oe,"tabindex",-1),ee(Oe,"class","svelte-g76q0j"),t[10]===void 0&&Wt(()=>t[48].call(Oe)),ee(Qe,"class","control svelte-g76q0j"),Nt.__value="auto",Nt.value=Nt.__value,mt.__value="show",mt.value=mt.__value,bt.__value="hide",bt.value=bt.__value,ee(ft,"tabindex",-1),ee(ft,"class","svelte-g76q0j"),t[11]===void 0&&Wt(()=>t[49].call(ft)),ee(Ht,"class","control svelte-g76q0j"),ot.__value=-1,ot.value=ot.__value,ee(nt,"tabindex",-1),ee(nt,"class","svelte-g76q0j"),t[15]===void 0&&Wt(()=>t[50].call(nt)),ee(Rt,"class","control svelte-g76q0j"),Ot.__value="small",Ot.value=Ot.__value,Ut.__value="standard",Ut.value=Ut.__value,jt.__value="large",jt.value=jt.__value,ci.__value="video",ci.value=ci.__value,ee(Ft,"tabindex",-1),ee(Ft,"class","svelte-g76q0j"),t[22]===void 0&&Wt(()=>t[51].call(Ft)),ee(Ae,"class","control svelte-g76q0j"),ct.__value="auto",ct.value=ct.__value,di.__value="left",di.value=di.__value,Be.__value="center",Be.value=Be.__value,fi.__value="right",fi.value=fi.__value,ee(Vt,"tabindex",-1),ee(Vt,"class","svelte-g76q0j"),t[23]===void 0&&Wt(()=>t[52].call(Vt)),ee(Yt,"class","control svelte-g76q0j"),$t.__value="auto",$t.value=$t.__value,hi.__value="400px",hi.value=hi.__value,_i.__value="30rem",_i.value=_i.__value,wi.__value="fit-content",wi.value=wi.__value,yi.__value="initial",yi.value=yi.__value,Ei.__value="0",Ei.value=Ei.__value,ee(me,"tabindex",-1),ee(me,"class","svelte-g76q0j"),t[24]===void 0&&Wt(()=>t[53].call(me)),ee(Je,"class","control svelte-g76q0j"),ee(Me,"tabindex",-1),ee(Me,"type","text"),ee(Me,"class","svelte-g76q0j"),ee(Y,"class","control svelte-g76q0j"),ee(si,"tabindex",-1),ee(si,"type","text"),ee(si,"class","svelte-g76q0j"),ee(ji,"class","control svelte-g76q0j"),ee(Gi,"tabindex",-1),ee(Gi,"type","text"),ee(Gi,"class","svelte-g76q0j"),ee(Ji,"class","control svelte-g76q0j"),ee(Ri,"tabindex",-1),ee(Ri,"type","text"),ee(Ri,"class","svelte-g76q0j"),ee(xr,"class","control svelte-g76q0j"),Hi.__value="all",Hi.value=Hi.__value,Di.__value="body",Di.value=Di.__value,ei.__value="none",ei.value=ei.__value,Ki.__value="all-none",Ki.value=Ki.__value,ti.__value="none-all",ti.value=ti.__value,ee(Si,"tabindex",-1),ee(Si,"class","svelte-g76q0j"),t[31]===void 0&&Wt(()=>t[58].call(Si)),ee(wr,"class","control svelte-g76q0j"),ye.__value="all",ye.value=ye.__value,st.__value="body",st.value=st.__value,Mr.__value="none",Mr.value=Mr.__value,Pr.__value="all-none",Pr.value=Pr.__value,$r.__value="none-all",$r.value=$r.__value,ee(_e,"tabindex",-1),ee(_e,"class","svelte-g76q0j"),t[32]===void 0&&Wt(()=>t[59].call(_e)),ee(ii,"class","control svelte-g76q0j"),en.__value="all",en.value=en.__value,Ai.__value="body",Ai.value=Ai.__value,tn.__value="none",tn.value=tn.__value,Cr.__value="all-none",Cr.value=Cr.__value,Sr.__value="none-all",Sr.value=Sr.__value,ee(Yi,"tabindex",-1),ee(Yi,"class","svelte-g76q0j"),t[33]===void 0&&Wt(()=>t[60].call(Yi)),ee(bn,"class","control svelte-g76q0j"),ee(kr,"tabindex",-1),ee(kr,"class","svelte-g76q0j"),t[34]===void 0&&Wt(()=>t[61].call(kr)),ee(Sn,"class","control svelte-g76q0j"),ee(e,"class","control-panel")},m(We,Gt){se(We,e,Gt),I(e,i),I(e,n),I(e,a),I(e,l),I(e,g),I(g,p),I(g,_),I(_,k),I(_,T),I(_,C),I(_,U),lt(_,t[6],!0),I(e,V),I(e,N),I(N,Q),I(N,W),I(W,ue),I(W,ie),I(W,be),lt(W,t[20],!0),I(e,Se),I(e,fe),I(fe,pe),I(fe,Z),Tt(Z,t[7]),I(e,L),I(e,le),I(le,z),I(le,Ke),Tt(Ke,t[8]),I(e,Ie),I(e,Ee),I(Ee,ke),I(Ee,G),I(G,X),I(G,B),I(G,Ue),I(G,De),I(G,q),I(G,ve),lt(G,t[9],!0),I(e,at),I(e,Qe),I(Qe,Et),I(Qe,Oe),I(Oe,Te),I(Oe,it),I(Oe,xt),I(Oe,wt),I(Oe,Xt),lt(Oe,t[10],!0),I(e,Pt),I(e,Ht),I(Ht,yt),I(Ht,ft),I(ft,Nt),I(ft,mt),I(ft,bt),lt(ft,t[11],!0),I(e,Zt),I(e,Rt),I(Rt,Jt),I(Rt,nt),I(nt,ot);for(let ai=0;ai<Pi.length;ai+=1)Pi[ai]&&Pi[ai].m(nt,null);lt(nt,t[15],!0),I(e,li),I(e,Ae),I(Ae,Dt),I(Ae,Ft),I(Ft,Ot),I(Ft,Ut),I(Ft,jt),I(Ft,ci),lt(Ft,t[22],!0),I(e,Kt),I(e,Yt),I(Yt,mi),I(Yt,Vt),I(Vt,ct),I(Vt,di),I(Vt,Be),I(Vt,fi),lt(Vt,t[23],!0),I(e,Qt),I(e,Je),I(Je,pi),I(Je,me),I(me,$t),I(me,hi),I(me,_i),I(me,wi),I(me,yi),I(me,Ei),lt(me,t[24],!0),I(e,Fe),I(e,Y),I(Y,$),I(Y,Me),Tt(Me,t[26]),I(e,_r),I(e,ji),I(ji,Qr),I(ji,si),Tt(si,t[27]),I(e,yr),I(e,Ji),I(Ji,Qi),I(Ji,Gi),Tt(Gi,t[28]),I(e,ur),I(e,xr),I(xr,Ii),I(xr,Ri),Tt(Ri,t[29]),I(e,cr),I(e,wr),I(wr,zi),I(wr,Si),I(Si,Hi),I(Si,Di),I(Si,ei),I(Si,Ki),I(Si,ti),lt(Si,t[31],!0),I(e,br),I(e,ii),I(ii,H),I(ii,_e),I(_e,ye),I(_e,st),I(_e,Mr),I(_e,Pr),I(_e,$r),lt(_e,t[32],!0),I(e,Ms),I(e,bn),I(bn,Ns),I(bn,Yi),I(Yi,en),I(Yi,Ai),I(Yi,tn),I(Yi,Cr),I(Yi,Sr),lt(Yi,t[33],!0),I(e,Wn),I(e,Sn),I(Sn,Fs),I(Sn,kr);for(let ai=0;ai<12;ai+=1)R[ai]&&R[ai].m(kr,null);lt(kr,t[34],!0),I(e,jn),$i&&$i.m(e,null),I(e,Nr),I(e,Us),I(e,as),Lr.m(e,null),os||(Gn=[ge(_,"change",t[43]),ge(W,"change",t[44]),ge(Z,"input",t[45]),ge(Ke,"input",t[46]),ge(G,"change",t[47]),ge(Oe,"change",t[48]),ge(ft,"change",t[49]),ge(nt,"change",t[50]),ge(Ft,"change",t[51]),ge(Vt,"change",t[52]),ge(me,"change",t[53]),ge(Me,"input",t[54]),ge(si,"input",t[55]),ge(Gi,"input",t[56]),ge(Ri,"input",t[57]),ge(Si,"change",t[58]),ge(_e,"change",t[59]),ge(Yi,"change",t[60]),ge(kr,"change",t[61])],os=!0)},p(We,Gt){if(Gt[0]&64&<(_,We[6]),Gt[0]&1048576&<(W,We[20]),Gt[0]&128&&Z.value!==We[7]&&Tt(Z,We[7]),Gt[0]&256&&Ke.value!==We[8]&&Tt(Ke,We[8]),Gt[0]&512&<(G,We[9]),Gt[0]&1024&<(Oe,We[10]),Gt[0]&2048&<(ft,We[11]),Gt[1]&1024){Fr=We[41];let ai;for(ai=0;ai<Fr.length;ai+=1){const ls=Sc(We,Fr,ai);Pi[ai]?Pi[ai].p(ls,Gt):(Pi[ai]=kc(ls),Pi[ai].c(),Pi[ai].m(nt,null))}for(;ai<Pi.length;ai+=1)Pi[ai].d(1);Pi.length=Fr.length}Gt[0]&32768&<(nt,We[15]),Gt[0]&4194304&<(Ft,We[22]),Gt[0]&8388608&<(Vt,We[23]),Gt[0]&16777216&<(me,We[24]),Gt[0]&67108864&&Me.value!==We[26]&&Tt(Me,We[26]),Gt[0]&134217728&&si.value!==We[27]&&Tt(si,We[27]),Gt[0]&268435456&&Gi.value!==We[28]&&Tt(Gi,We[28]),Gt[0]&536870912&&Ri.value!==We[29]&&Tt(Ri,We[29]),Gt[1]&1&<(Si,We[31]),Gt[1]&2&<(_e,We[32]),Gt[1]&4&<(Yi,We[33]),Gt[1]&8&<(kr,We[34]),We[42]?$i?$i.p(We,Gt):($i=Tc(We),$i.c(),$i.m(e,Nr)):$i&&($i.d(1),$i=null),Vs===(Vs=ba(We))&&Lr?Lr.p(We,Gt):(Lr.d(1),Lr=Vs(We),Lr&&(Lr.c(),Lr.m(e,null)))},i:oe,o:oe,d(We){We&&te(e),Ln(Pi,We),Ln(R,We),$i&&$i.d(),Lr.d(),os=!1,Mt(Gn)}}}function wy(t,e,i){let{projectId:n}=e,{contentId:a}=e,{playlistId:l}=e,{sourceId:g}=e,{sourceUrl:p}=e,{showUserInterface:_}=e,{playerStyle:k}=e,{playerTitle:T}=e,{callToAction:C}=e,{skipButtonStyle:U}=e,{playlistStyle:V}=e,{playlistToggle:N}=e,{mediaSession:Q}=e,{content:W}=e,{contentIndex:ue}=e,{introsOutros:ie}=e,{introsOutrosIndex:be}=e,{adverts:Se}=e,{advertIndex:fe}=e,{persistentAdImage:pe}=e,{persistentIndex:Z}=e,{duration:L}=e,{currentTime:le}=e,{playbackState:z}=e,{playbackRate:Ke}=e,{widgetStyle:Ie}=e,{widgetPosition:Ee}=e,{widgetWidth:ke}=e,{widgetTarget:G}=e,{textColor:X}=e,{backgroundColor:B}=e,{iconColor:Ue}=e,{highlightColor:De}=e,{logoIconEnabled:q}=e,{highlightSections:ve}=e,{clickableSections:at}=e,{segmentWidgetSections:Qe}=e,{segmentWidgetPosition:Et}=e,{advertConsent:Oe}=e,{analyticsConsent:Te}=e,{analyticsCustomUrl:it}=e,{analyticsTag:xt}=e,wt=!1;function Xt(){k=gi(this),i(6,k)}function Pt(){z=gi(this),i(20,z)}function Ht(){T=this.value,i(7,T)}function yt(){C=this.value,i(8,C)}function ft(){U=gi(this),i(9,U)}function Nt(){V=gi(this),i(10,V)}function mt(){N=gi(this),i(11,N)}function bt(){fe=gi(this),i(15,fe)}function Zt(){Ie=gi(this),i(22,Ie)}function Rt(){Ee=gi(this),i(23,Ee)}function Jt(){ke=gi(this),i(24,ke)}function nt(){X=this.value,i(26,X)}function ot(){B=this.value,i(27,B)}function li(){Ue=this.value,i(28,Ue)}function Ae(){De=this.value,i(29,De)}function Dt(){ve=gi(this),i(31,ve)}function Ft(){at=gi(this),i(32,at)}function Ot(){Qe=gi(this),i(33,Qe)}function Ut(){Et=gi(this),i(34,Et)}function jt(){n=this.value,i(0,n)}function ci(){a=this.value,i(1,a)}function Kt(){l=this.value,i(2,l)}function Yt(){g=this.value,i(3,g)}function mi(){p=this.value,i(4,p)}function Vt(){_=gi(this),i(5,_)}function ct(){Q=gi(this),i(12,Q)}function di(){ue=gi(this),i(13,ue)}function Be(){be=gi(this),i(14,be)}function fi(){pe=gi(this),i(16,pe)}function Qt(){Z=gi(this),i(17,Z)}function Je(){L=this.value,i(18,L)}function pi(){le=this.value,i(19,le)}function me(){Ke=this.value,i(21,Ke)}function $t(){G=this.value,i(25,G)}function hi(){q=gi(this),i(30,q)}function _i(){Oe=gi(this),i(35,Oe)}function wi(){Te=gi(this),i(36,Te)}function yi(){it=this.value,i(37,it)}function Ei(){xt=this.value,i(38,xt)}const Fe=()=>i(42,wt=!1),Y=()=>i(42,wt=!0);return t.$$set=$=>{"projectId"in $&&i(0,n=$.projectId),"contentId"in $&&i(1,a=$.contentId),"playlistId"in $&&i(2,l=$.playlistId),"sourceId"in $&&i(3,g=$.sourceId),"sourceUrl"in $&&i(4,p=$.sourceUrl),"showUserInterface"in $&&i(5,_=$.showUserInterface),"playerStyle"in $&&i(6,k=$.playerStyle),"playerTitle"in $&&i(7,T=$.playerTitle),"callToAction"in $&&i(8,C=$.callToAction),"skipButtonStyle"in $&&i(9,U=$.skipButtonStyle),"playlistStyle"in $&&i(10,V=$.playlistStyle),"playlistToggle"in $&&i(11,N=$.playlistToggle),"mediaSession"in $&&i(12,Q=$.mediaSession),"content"in $&&i(39,W=$.content),"contentIndex"in $&&i(13,ue=$.contentIndex),"introsOutros"in $&&i(40,ie=$.introsOutros),"introsOutrosIndex"in $&&i(14,be=$.introsOutrosIndex),"adverts"in $&&i(41,Se=$.adverts),"advertIndex"in $&&i(15,fe=$.advertIndex),"persistentAdImage"in $&&i(16,pe=$.persistentAdImage),"persistentIndex"in $&&i(17,Z=$.persistentIndex),"duration"in $&&i(18,L=$.duration),"currentTime"in $&&i(19,le=$.currentTime),"playbackState"in $&&i(20,z=$.playbackState),"playbackRate"in $&&i(21,Ke=$.playbackRate),"widgetStyle"in $&&i(22,Ie=$.widgetStyle),"widgetPosition"in $&&i(23,Ee=$.widgetPosition),"widgetWidth"in $&&i(24,ke=$.widgetWidth),"widgetTarget"in $&&i(25,G=$.widgetTarget),"textColor"in $&&i(26,X=$.textColor),"backgroundColor"in $&&i(27,B=$.backgroundColor),"iconColor"in $&&i(28,Ue=$.iconColor),"highlightColor"in $&&i(29,De=$.highlightColor),"logoIconEnabled"in $&&i(30,q=$.logoIconEnabled),"highlightSections"in $&&i(31,ve=$.highlightSections),"clickableSections"in $&&i(32,at=$.clickableSections),"segmentWidgetSections"in $&&i(33,Qe=$.segmentWidgetSections),"segmentWidgetPosition"in $&&i(34,Et=$.segmentWidgetPosition),"advertConsent"in $&&i(35,Oe=$.advertConsent),"analyticsConsent"in $&&i(36,Te=$.analyticsConsent),"analyticsCustomUrl"in $&&i(37,it=$.analyticsCustomUrl),"analyticsTag"in $&&i(38,xt=$.analyticsTag)},[n,a,l,g,p,_,k,T,C,U,V,N,Q,ue,be,fe,pe,Z,L,le,z,Ke,Ie,Ee,ke,G,X,B,Ue,De,q,ve,at,Qe,Et,Oe,Te,it,xt,W,ie,Se,wt,Xt,Pt,Ht,yt,ft,Nt,mt,bt,Zt,Rt,Jt,nt,ot,li,Ae,Dt,Ft,Ot,Ut,jt,ci,Kt,Yt,mi,Vt,ct,di,Be,fi,Qt,Je,pi,me,$t,hi,_i,wi,yi,Ei,Fe,Y]}class Py extends tt{constructor(e){super(),et(this,e,wy,xy,Ye,{projectId:0,contentId:1,playlistId:2,sourceId:3,sourceUrl:4,showUserInterface:5,playerStyle:6,playerTitle:7,callToAction:8,skipButtonStyle:9,playlistStyle:10,playlistToggle:11,mediaSession:12,content:39,contentIndex:13,introsOutros:40,introsOutrosIndex:14,adverts:41,advertIndex:15,persistentAdImage:16,persistentIndex:17,duration:18,currentTime:19,playbackState:20,playbackRate:21,widgetStyle:22,widgetPosition:23,widgetWidth:24,widgetTarget:25,textColor:26,backgroundColor:27,iconColor:28,highlightColor:29,logoIconEnabled:30,highlightSections:31,clickableSections:32,segmentWidgetSections:33,segmentWidgetPosition:34,advertConsent:35,analyticsConsent:36,analyticsCustomUrl:37,analyticsTag:38},null,[-1,-1,-1])}get projectId(){return this.$$.ctx[0]}set projectId(e){this.$$set({projectId:e}),w()}get contentId(){return this.$$.ctx[1]}set contentId(e){this.$$set({contentId:e}),w()}get playlistId(){return this.$$.ctx[2]}set playlistId(e){this.$$set({playlistId:e}),w()}get sourceId(){return this.$$.ctx[3]}set sourceId(e){this.$$set({sourceId:e}),w()}get sourceUrl(){return this.$$.ctx[4]}set sourceUrl(e){this.$$set({sourceUrl:e}),w()}get showUserInterface(){return this.$$.ctx[5]}set showUserInterface(e){this.$$set({showUserInterface:e}),w()}get playerStyle(){return this.$$.ctx[6]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get playerTitle(){return this.$$.ctx[7]}set playerTitle(e){this.$$set({playerTitle:e}),w()}get callToAction(){return this.$$.ctx[8]}set callToAction(e){this.$$set({callToAction:e}),w()}get skipButtonStyle(){return this.$$.ctx[9]}set skipButtonStyle(e){this.$$set({skipButtonStyle:e}),w()}get playlistStyle(){return this.$$.ctx[10]}set playlistStyle(e){this.$$set({playlistStyle:e}),w()}get playlistToggle(){return this.$$.ctx[11]}set playlistToggle(e){this.$$set({playlistToggle:e}),w()}get mediaSession(){return this.$$.ctx[12]}set mediaSession(e){this.$$set({mediaSession:e}),w()}get content(){return this.$$.ctx[39]}set content(e){this.$$set({content:e}),w()}get contentIndex(){return this.$$.ctx[13]}set contentIndex(e){this.$$set({contentIndex:e}),w()}get introsOutros(){return this.$$.ctx[40]}set introsOutros(e){this.$$set({introsOutros:e}),w()}get introsOutrosIndex(){return this.$$.ctx[14]}set introsOutrosIndex(e){this.$$set({introsOutrosIndex:e}),w()}get adverts(){return this.$$.ctx[41]}set adverts(e){this.$$set({adverts:e}),w()}get advertIndex(){return this.$$.ctx[15]}set advertIndex(e){this.$$set({advertIndex:e}),w()}get persistentAdImage(){return this.$$.ctx[16]}set persistentAdImage(e){this.$$set({persistentAdImage:e}),w()}get persistentIndex(){return this.$$.ctx[17]}set persistentIndex(e){this.$$set({persistentIndex:e}),w()}get duration(){return this.$$.ctx[18]}set duration(e){this.$$set({duration:e}),w()}get currentTime(){return this.$$.ctx[19]}set currentTime(e){this.$$set({currentTime:e}),w()}get playbackState(){return this.$$.ctx[20]}set playbackState(e){this.$$set({playbackState:e}),w()}get playbackRate(){return this.$$.ctx[21]}set playbackRate(e){this.$$set({playbackRate:e}),w()}get widgetStyle(){return this.$$.ctx[22]}set widgetStyle(e){this.$$set({widgetStyle:e}),w()}get widgetPosition(){return this.$$.ctx[23]}set widgetPosition(e){this.$$set({widgetPosition:e}),w()}get widgetWidth(){return this.$$.ctx[24]}set widgetWidth(e){this.$$set({widgetWidth:e}),w()}get widgetTarget(){return this.$$.ctx[25]}set widgetTarget(e){this.$$set({widgetTarget:e}),w()}get textColor(){return this.$$.ctx[26]}set textColor(e){this.$$set({textColor:e}),w()}get backgroundColor(){return this.$$.ctx[27]}set backgroundColor(e){this.$$set({backgroundColor:e}),w()}get iconColor(){return this.$$.ctx[28]}set iconColor(e){this.$$set({iconColor:e}),w()}get highlightColor(){return this.$$.ctx[29]}set highlightColor(e){this.$$set({highlightColor:e}),w()}get logoIconEnabled(){return this.$$.ctx[30]}set logoIconEnabled(e){this.$$set({logoIconEnabled:e}),w()}get highlightSections(){return this.$$.ctx[31]}set highlightSections(e){this.$$set({highlightSections:e}),w()}get clickableSections(){return this.$$.ctx[32]}set clickableSections(e){this.$$set({clickableSections:e}),w()}get segmentWidgetSections(){return this.$$.ctx[33]}set segmentWidgetSections(e){this.$$set({segmentWidgetSections:e}),w()}get segmentWidgetPosition(){return this.$$.ctx[34]}set segmentWidgetPosition(e){this.$$set({segmentWidgetPosition:e}),w()}get advertConsent(){return this.$$.ctx[35]}set advertConsent(e){this.$$set({advertConsent:e}),w()}get analyticsConsent(){return this.$$.ctx[36]}set analyticsConsent(e){this.$$set({analyticsConsent:e}),w()}get analyticsCustomUrl(){return this.$$.ctx[37]}set analyticsCustomUrl(e){this.$$set({analyticsCustomUrl:e}),w()}get analyticsTag(){return this.$$.ctx[38]}set analyticsTag(e){this.$$set({analyticsTag:e}),w()}}const Cy=(t,e,i)=>{Ry(t);const n=new Image;return n.setAttribute("crossorigin","anonymous"),new Promise((a,l)=>{n.addEventListener("load",Ly(n,e,i,a,l)),n.addEventListener("error",l),n.src=t})},Ly=(t,e,i,n,a)=>()=>{const l=document.createElement("canvas"),g=l.getContext("2d");l.width=e,l.height=i,g.drawImage(t,0,0,e,i),l.toBlob(Iy(t,e,i,n,a))},As={},Iy=(t,e,i,n,a)=>l=>{var p;l||a();const g=URL.createObjectURL(l);As[p=t.src]||(As[p]=[]),As[t.src].push(g),n({src:g,sizes:`${e}x${i}`,type:"image/png"})},Ry=t=>{Object.keys(As).filter(n=>n!==t).map(n=>As[n]).flat().forEach(n=>URL.revokeObjectURL(n))},Dy=(t,e,i)=>an(this,null,function*(){t=yield t;const n=t.innerHTML;return{src:`data:image/svg+xml,${encodeURIComponent(n)}`,sizes:`${e}x${i}`,type:"image/svg+xml"}}),Oy=(t,e,i)=>Mi(t,e,i,1),By=(t,e,i)=>rt(t,e,e==="style"?Ny(i):i),My=/;(?!([^()]*\([^()]*\))*[^()]*\))/,Ny=t=>t.split(My).map(e=>e+" !important").join(";");function wc(t,e,i){const n=t.slice();return n[39]=e[i],n[40]=e,n[41]=i,n}function Pc(t){let e,i,n,a=t[41],l;i=new ec({props:{fill:t[2],color:t[1],scale:t[39]/18,zoom:.65}});const g=()=>t[36](e,a),p=()=>t[36](null,a);return{c(){e=F("div"),He(i.$$.fragment),n=Ce(),Oy(e,"display","none")},m(_,k){se(_,e,k),Ge(i,e,null),I(e,n),g(),l=!0},p(_,k){t=_;const T={};k[0]&4&&(T.fill=t[2]),k[0]&2&&(T.color=t[1]),i.$set(T),a!==t[41]&&(p(),a=t[41],g())},i(_){l||(J(i.$$.fragment,_),l=!0)},o(_){ae(i.$$.fragment,_),l=!1},d(_){_&&te(e),ze(i),p()}}}function Fy(t){let e,i,n=t[3],a=[];for(let g=0;g<n.length;g+=1)a[g]=Pc(wc(t,n,g));const l=g=>ae(a[g],1,1,()=>{a[g]=null});return{c(){e=F("div");for(let g=0;g<a.length;g+=1)a[g].c();By(e,"class","media-session")},m(g,p){se(g,e,p);for(let _=0;_<a.length;_+=1)a[_]&&a[_].m(e,null);i=!0},p(g,p){if(p[0]&15){n=g[3];let _;for(_=0;_<n.length;_+=1){const k=wc(g,n,_);a[_]?(a[_].p(k,p),J(a[_],1)):(a[_]=Pc(k),a[_].c(),J(a[_],1),a[_].m(e,null))}for(Lt(),_=n.length;_<a.length;_+=1)l(_);It()}},i(g){if(!i){for(let p=0;p<n.length;p+=1)J(a[p]);i=!0}},o(g){a=a.filter(Boolean);for(let p=0;p<a.length;p+=1)ae(a[p]);i=!1},d(g){g&&te(e),Ln(a,g)}}}function Uy(t,e,i){let n,a,l,g,p,_,k,T,C,U,V,N,Q,W,ue,ie,be,Se,fe,pe,Z;const L=[96,128,192,256,384,512],le=["hangup","nextslide","nexttrack","pause","play","previousslide","previoustrack","seekbackward","seekforward","seekto","skipad","stop","togglecamera","togglemicrophone"];let{content:z=[]}=e,{contentIndex:Ke=0}=e,{activeAdvert:Ie=void 0}=e,{persistentAdvert:Ee=void 0}=e,{duration:ke=0}=e,{playbackState:G="stopped"}=e,{skipButtonStyle:X="auto"}=e,{backgroundColor:B="#f5f5f5"}=e,{iconColor:Ue="black"}=e,{onEvent:De=()=>{}}=e,q=[],ve=new Set,at=L.map(()=>{}),Qe=L.map(()=>{});const Et=()=>i(15,ve=ve.add(W));function Oe(Te,it){Ne[Te?"unshift":"push"](()=>{at[it]=Te,i(0,at)})}return t.$$set=Te=>{"content"in Te&&i(4,z=Te.content),"contentIndex"in Te&&i(5,Ke=Te.contentIndex),"activeAdvert"in Te&&i(6,Ie=Te.activeAdvert),"persistentAdvert"in Te&&i(7,Ee=Te.persistentAdvert),"duration"in Te&&i(8,ke=Te.duration),"playbackState"in Te&&i(9,G=Te.playbackState),"skipButtonStyle"in Te&&i(10,X=Te.skipButtonStyle),"backgroundColor"in Te&&i(11,B=Te.backgroundColor),"iconColor"in Te&&i(12,Ue=Te.iconColor),"onEvent"in Te&&i(13,De=Te.onEvent)},t.$$.update=()=>{t.$$.dirty[0]&512&&i(33,n=G==="stopped"),t.$$.dirty[0]&64|t.$$.dirty[1]&4&&i(34,a=Ie&&!n),t.$$.dirty[0]&16&&i(35,l=z.length>1),t.$$.dirty[0]&48&&i(27,g=z[Ke]),t.$$.dirty[0]&1024|t.$$.dirty[1]&16&&i(19,p=X==="auto"?l?"tracks":"segments":X),t.$$.dirty[0]&524288&&i(21,_=parseFloat(p.split("-")[1]||10)),t.$$.dirty[0]&2621440&&i(18,k=parseFloat(p.split("-")[2]||_)),t.$$.dirty[0]&524288|t.$$.dirty[1]&8&&i(20,T=!a&&p!=="tracks"),t.$$.dirty[0]&524288|t.$$.dirty[1]&8&&i(17,C=!a&&p==="tracks"),t.$$.dirty[1]&8&&i(22,U=!a),t.$$.dirty[0]&2112|t.$$.dirty[1]&8&&i(2,V=a&&(Ie==null?void 0:Ie.backgroundColor)||B),t.$$.dirty[0]&4160|t.$$.dirty[1]&8&&i(1,N=a&&(Ie==null?void 0:Ie.iconColor)||Ue),t.$$.dirty[0]&7&&i(16,Qe=L.map((Te,it)=>Ru().then(()=>at[it]))),t.$$.dirty[0]&134217920|t.$$.dirty[1]&12&&i(32,Q=a&&Ie.imageUrl||!n&&(Ee==null?void 0:Ee.imageUrl)||(g==null?void 0:g.imageUrl)),t.$$.dirty[0]&32768|t.$$.dirty[1]&2&&i(28,W=ve.has(Q)?null:Q),t.$$.dirty[0]&268435456&&i(31,ue=W?L.map(Te=>Cy(W,Te,Te)):[]),t.$$.dirty[0]&268435456&&i(30,ie=W?[{src:W,sizes:"any"}]:[]),t.$$.dirty[0]&268500992&&i(29,be=W?[]:L.map((Te,it)=>Dy(Qe[it],Te,Te))),t.$$.dirty[0]&1610612736|t.$$.dirty[1]&1&&i(26,Se=Promise.all([...ue,...ie,...be])),t.$$.dirty[0]&134217728&&i(25,fe=(g==null?void 0:g.title)||""),t.$$.dirty[0]&67108864&&Se.then(Te=>i(14,q=Te)).catch(Et),t.$$.dirty[0]&58736640&&(navigator.mediaSession.metadata=new MediaMetadata({title:fe,artist:pe,album:Z,artwork:q})),t.$$.dirty[0]&8192&&navigator.mediaSession.setActionHandler("play",()=>{De(qe({type:"PressedPlay",description:"The play button was pressed.",initiatedBy:"media-session-api"}))}),t.$$.dirty[0]&8192&&navigator.mediaSession.setActionHandler("pause",()=>{De(qe({type:"PressedPause",description:"The pause button was pressed.",initiatedBy:"media-session-api"}))}),t.$$.dirty[0]&4202752&&navigator.mediaSession.setActionHandler("seekto",U?({seekTime:Te})=>{De(qe({type:"ScrubbedProgressBar",description:"The user pressed on the progress bar then dragged.",initiatedBy:"media-session-api",ratio:Math.max(0,Math.min(1,Te/ke))}))}:null),t.$$.dirty[0]&3678208&&navigator.mediaSession.setActionHandler("seekbackward",T?({seekOffset:Te})=>{De(qe(p==="seconds"||Te?{type:"PressedSeekBack",description:"The seek backward button was pressed.",initiatedBy:"media-session-api",seconds:Te||_}:{type:"PressedPrevSegment",description:"The previous segment button was pressed.",initiatedBy:"media-session-api"}))}:null),t.$$.dirty[0]&1843200&&navigator.mediaSession.setActionHandler("seekforward",T?({seekOffset:Te})=>{De(qe(p==="seconds"||Te?{type:"PressedSeekAhead",description:"The seek ahead button was pressed.",initiatedBy:"media-session-api",seconds:Te||k}:{type:"PressedNextSegment",description:"The next segment button was pressed.",initiatedBy:"media-session-api"}))}:null),t.$$.dirty[0]&139264&&navigator.mediaSession.setActionHandler("previoustrack",C?()=>{De(qe({type:"PressedPrevTrack",description:"The previous track button was pressed.",initiatedBy:"media-session-api"}))}:null),t.$$.dirty[0]&139264&&navigator.mediaSession.setActionHandler("nexttrack",C?()=>{De(qe({type:"PressedNextTrack",description:"The next track button was pressed.",initiatedBy:"media-session-api"}))}:null)},i(24,pe=""),i(23,Z=""),navigator.mediaSession.setByPlayer=!0,le.forEach(Te=>{try{navigator.mediaSession.setActionHandler(Te,null)}catch(it){}}),[at,N,V,L,z,Ke,Ie,Ee,ke,G,X,B,Ue,De,q,ve,Qe,C,k,p,T,_,U,Z,pe,fe,Se,g,W,be,ie,ue,Q,n,a,l,Oe]}class Vy extends tt{constructor(e){super(),et(this,e,Uy,Fy,Ye,{content:4,contentIndex:5,activeAdvert:6,persistentAdvert:7,duration:8,playbackState:9,skipButtonStyle:10,backgroundColor:11,iconColor:12,onEvent:13},null,[-1,-1])}get content(){return this.$$.ctx[4]}set content(e){this.$$set({content:e}),w()}get contentIndex(){return this.$$.ctx[5]}set contentIndex(e){this.$$set({contentIndex:e}),w()}get activeAdvert(){return this.$$.ctx[6]}set activeAdvert(e){this.$$set({activeAdvert:e}),w()}get persistentAdvert(){return this.$$.ctx[7]}set persistentAdvert(e){this.$$set({persistentAdvert:e}),w()}get duration(){return this.$$.ctx[8]}set duration(e){this.$$set({duration:e}),w()}get playbackState(){return this.$$.ctx[9]}set playbackState(e){this.$$set({playbackState:e}),w()}get skipButtonStyle(){return this.$$.ctx[10]}set skipButtonStyle(e){this.$$set({skipButtonStyle:e}),w()}get backgroundColor(){return this.$$.ctx[11]}set backgroundColor(e){this.$$set({backgroundColor:e}),w()}get iconColor(){return this.$$.ctx[12]}set iconColor(e){this.$$set({iconColor:e}),w()}get onEvent(){return this.$$.ctx[13]}set onEvent(e){this.$$set({onEvent:e}),w()}}const Cc=(t,e,i)=>rt(t,e,e==="style"?jy(i):i),Wy=/;(?!([^()]*\([^()]*\))*[^()]*\))/,jy=t=>t.split(Wy).map(e=>e+" !important").join(";");function Lc(t){let e,i,n,a;return{c(){e=F("script"),n=Ce(),a=F("script"),a.textContent=`window.dataLayer = window.dataLayer || [];
|
|
70
70
|
function gtag() { dataLayer.push(arguments); }
|
|
71
|
-
gtag("js", new Date());`,e.async=!0,Rr(e.src,i="https://www.googletagmanager.com/gtag/js?id="+t[0])||Cc(e,"src",i)},m(l,g){se(l,e,g),se(l,n,g),se(l,a,g)},p(l,g){g&1&&!Rr(e.src,i="https://www.googletagmanager.com/gtag/js?id="+l[0])&&Cc(e,"src",i)},d(l){l&&te(e),l&&te(n),l&&te(a)}}}function Gy(t){let e,i=!t[1]&&Lc(t);return{c(){i&&i.c(),e=Zn()},m(n,a){i&&i.m(document.head,null),I(document.head,e)},p(n,[a]){n[1]?i&&(i.d(1),i=null):i?i.p(n,a):(i=Lc(n),i.c(),i.m(e.parentNode,e))},i:oe,o:oe,d(n){i&&i.d(n),te(e)}}}function zy(t,e,i){let n,{analyticsTag:a}=e;return t.$$set=l=>{"analyticsTag"in l&&i(0,a=l.analyticsTag)},i(1,n=window.gtag),[a,n]}class Hy extends tt{constructor(e){super(),et(this,e,zy,Gy,Ye,{analyticsTag:0})}get analyticsTag(){return this.$$.ctx[0]}set analyticsTag(e){this.$$set({analyticsTag:e}),w()}}const J6="";class Ky extends tt{constructor(e){super(),et(this,e,null,null,Ye,{})}}class hl{constructor(e,i){ht(this,da);ht(this,vo);this.onSelected=e,this.onDeselected=i,this.consumers={}}addInterest(e,i,...n){var l;(l=this.consumers)[e]||(l[e]=[]);const a=this.consumers[e].slice(-1)[0];this.consumers[e].push({consumerId:i,args:n}),!(a&&ce(this,da,pu).call(this,n,a.args))&&(a&&this.onDeselected(e,...a.args),this.onSelected(e,...n))}removeInterest(e,i){var g;(g=this.consumers)[e]||(g[e]=[]);const n=this.consumers[e].slice(-1)[0];if(ce(this,vo,fh).call(this,this.consumers[e],p=>p.consumerId===i),!(n&&i===n.consumerId))return;const l=this.consumers[e].slice(-1)[0];l&&ce(this,da,pu).call(this,n.args,l.args)||(this.onDeselected(e,...n.args),l&&this.onSelected(e,...l.args))}}da=new WeakSet,pu=function(e,i){return e.length===i.length&&e.every((n,a)=>n===i[a])},vo=new WeakSet,fh=function(e,i){for(let n=e.length-1;n>=0;n-=1)if(i(e[n])){e.splice(n,1);return}};const Js=(t,e,i)=>{let[n,a]=i.split("-");n||(n="none"),a||(a=n);const l=t==="current"?n:a;return l==="all"||l==="body"&&(e==null?void 0:e.section)==="body"},On="data-beyondwords-marker",Ic=t=>["beyondwords-highlight","bwp",`marker-${t}`],fn=class fn{update(e,i,n,a){const l=Js(e,i,n),g=this[`prev${e}`],p=l?i==null?void 0:i.marker:null;p&&jr(fn,fa).addInterest(p,this,a),g&&jr(fn,fa).removeInterest(g,this),this[`prev${e}`]=p}};fa=new WeakMap,mo=new WeakSet,hh=function(e,i){const n=document.querySelectorAll(`[${On}="${e}"]`);for(const a of n){const l=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1);let g;for(;g=l.nextNode();){if(/^\s*$/.test(g.nodeValue))continue;g.parentNode.nodeName.toLowerCase()==="a"&&(g=g.parentNode);const k=document.createElement("mark");k.classList.add(...Ic(e)),k.style.background=i,g.parentNode.insertBefore(k,g),k.appendChild(g)}}},po=new WeakSet,gh=function(e){const i=document.querySelectorAll(`[${On}="${e}"]`);for(const n of i){const a=n.querySelectorAll(`mark.${Ic(e)}`);for(const l of a)for(const g of l.childNodes)l.parentNode.insertBefore(g,l),l.remove()}},ht(fn,mo),ht(fn,po),ht(fn,fa,new hl(ce(fn,mo,hh),ce(fn,po,gh)));let gl=fn;const Rc=["beyondwords-clickable","bwp"],hn=class hn{update(e,i){const n=Js("hovered",e,i),a=this.previous,l=n?e==null?void 0:e.marker:null;l&&jr(hn,ha).addInterest(l,this),a&&jr(hn,ha).removeInterest(a,this),this.previous=l}};ha=new WeakMap,_o=new WeakSet,vh=function(e){const i=document.querySelectorAll(`[${On}="${e}"]`);for(const n of i)n.classList.add(...Rc)},yo=new WeakSet,mh=function(e){const i=document.querySelectorAll(`[${On}="${e}"]`);for(const n of i)Dc(n,Rc)},ht(hn,_o),ht(hn,yo),ht(hn,ha,new hl(ce(hn,_o,vh),ce(hn,yo,mh)));let vl=hn;const Dc=(t,e)=>{if(!t)return;const a=[...t.classList].filter(l=>!e.includes(l)).some(l=>l.startsWith("beyondwords-"))?e.filter(l=>l!=="bwp"):e;t.classList.remove(...a)},Oc=(t,e,i)=>["beyondwords-widget","bwp",`marker-${t}`,`position-${e}`,`for-${i}-player`],Bc=["beyondwords-relative","bwp"],gn=class gn{constructor(e){this.onUpdate=e,this.containers=[]}update(e,i,n,a){const l=i.includes("all")||i.includes("body"),g=this.previous,p=(e==null?void 0:e.marker)||l&&(g==null?void 0:g.marker);p&&jr(gn,ga).addInterest(p,this,this,n,a),g&&jr(gn,ga).removeInterest(g,this),this.previous=p}reset(){this.update(null,"none")}};ga=new WeakMap,bo=new WeakSet,ph=function(e,i,n,a){const l=document.querySelector(`[${On}="${e}"]`),g=document.createElement("div");["2-oclock","3-oclock","4-oclock","8-oclock","9-oclock","10-oclock"].includes(n)&&l.classList.add(...Bc),g.classList.add(...Oc(e,n,a)),["11-oclock","12-oclock","1-oclock"].includes(n)?l.insertBefore(g,l.firstChild):l.appendChild(g),i.containers.push(g),i.onUpdate(i.containers)},So=new WeakSet,_h=function(e,i,n,a){const l=Oc(e,n,a);for(let g=0;g<i.containers.length;g+=1){if(!l.every(k=>i.containers[g].classList.contains(k)))continue;const _=i.containers[g].parentNode;Dc(_,Bc),i.containers[g].remove(),i.containers.splice(g,1),g-=1}i.onUpdate(i.containers)},ht(gn,bo),ht(gn,So),ht(gn,ga,new hl(ce(gn,bo,ph),ce(gn,So,_h)));let ml=gn;const Yy=()=>qe({type:"IdentifiersChanged",description:"The Player's content identifiers changed.",initiatedBy:"browser"}),Qn=(i,...n)=>an(this,[i,...n],function*(t,e={}){const a=yield fetch(t,e).catch(()=>{}),l=yield a==null?void 0:a.json().catch(()=>{});return(a==null?void 0:a.status)!==200&&rr(`Failed to fetch ${t}`,ni(de({},e),{responseStatus:a==null?void 0:a.status,responseJson:l})),l}),qy=(t,e)=>Qn(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e,(i,n)=>n===void 0?null:n)});class Xy{constructor(e,i,n){ht(this,ko);this.baseUrl=ce(this,ko,yh).call(this,e),this.projectId=i,this.writeToken=n}getWebSocketToken(){return an(this,null,function*(){const e={Authorization:`Token token=${this.writeToken}`},{token:i}=yield Qn(`https://${this.baseUrl}/api/v4/token/ws`,{headers:e});this.webSocketToken=i})}establishConnection(e,i){return an(this,null,function*(){const n=`wss://${this.baseUrl}/cable?token=${this.webSocketToken}`,a="actioncable-v1-json";this.webSocket=new WebSocket(n,a),this.webSocket.onmessage=l=>e(JSON.parse(l.data)),this.webSocket.onerror=i,yield new Promise(l=>this.webSocket.onopen=l)})}subscribeToStatusChanges(){const e=JSON.stringify({channel:"Api::V1::ProjectChannel",id:this.projectId}),i=JSON.stringify({command:"subscribe",identifier:e});this.webSocket.send(i)}destroy(){this.webSocketToken=null,this.webSocket&&(this.webSocket.onmessage=()=>{},this.webSocket.onerror=()=>{},this.webSocket.close(),this.webSocket=null)}}ko=new WeakSet,yh=function(e){return e.includes("staging")?"app.staging-beyondwords.io":"app.beyondwords.io"};let $n;const Zy=(t,e,i,n)=>an(this,null,function*(){!t||!e||!i||($n==null||$n.destroy(),$n=new Xy(t,e,i),yield $n.getWebSocketToken(),yield $n.establishConnection(Jy(n),eb),yield $n.subscribeToStatusChanges())}),Jy=t=>e=>{var a,l;((l=(a=e==null?void 0:e.message)==null?void 0:a.result)==null?void 0:l.action)==="podcast_state_updated"&&Qy(e,t),e.type==="reject_subscription"&&$y(e)},Qy=(t,e)=>{const i=t.message.result;e(qe({type:"ContentStatusChanged",description:"The processing status of a content item within the project changed.",initiatedBy:"websocket",contentId:i.content_id,legacyId:i.legacy_id,sourceId:i.source_id,sourceUrl:i.source_url,contentStatus:i.state}))},$y=t=>{rr("The WebSocket status change subscription was rejected.",{webSocketEvent:t})},eb=t=>{rr("Unexpected WebSocket error.",{error:t})},Mc=t=>{if(!t())return new Promise(e=>{setInterval(()=>t()&&e(),10)})},Qs=t=>{const i=Object.keys(t.$$.props).filter(n=>!tb.has(n)).map(n=>[n,t[n]]);return Object.fromEntries(i)},tb=new Set(["addEventListener","removeEventListener","mediaElement","userInterface","widgetInterface","controller"]),Nc=(t,e)=>{const i=new Set([...Object.keys(t),...Object.keys(e)]),n={};for(const a of i){const l=t[a],g=e[a];l!==g&&(n[a]={previousValue:l,currentValue:g})}return n};let $s=-1;const Fc=[],ib=(t,e,i)=>an(this,null,function*(){yield Mc(()=>e.player);const n=e.player,a=rb(n.contentIndex,i,t);a>$s&&nb(n,$s,a,t),a<$s&&sb(n,$s,a),$s=a}),rb=(t,e,i)=>{const n=i.findIndex(l=>l[0]===t&&l[1]>e||l[0]>t);return n===-1?i.length-1:n-1},nb=(t,e,i,n)=>{for(let a=e+1;a<=i;a+=1){const l=Qs(t);n[a][2](t);const g=Qs(t),p=Nc(l,g);Fc.push(p)}},sb=(t,e,i)=>{for(let n=e;n>i;n-=1){const a=Fc.pop();for(const[l,g]of Object.entries(a))t[l]=g.previousValue}},ab=t=>t?ob(t)?{newTarget:ub(t),showUserInterface:!0}:typeof t=="string"?{newTarget:pl(t),showUserInterface:!0}:{newTarget:t,showUserInterface:!0}:{newTarget:lb(),showUserInterface:!1},ob=t=>typeof t=="object"&&t.nodeName.toLowerCase()==="script",lb=()=>{const t=document.createElement("div");return document.body.appendChild(t),t},ub=t=>{const e=document.createElement("div");return t.parentNode.insertBefore(e,t.nextSibling),e},pl=(t,e="player")=>{if(typeof t!="string")return t;const i=document.querySelectorAll(t);return i.length===0&&rr(`Failed to initialize ${e} because the target could not be found.`,{target:t,elements:i}),i.length>1&&rr(`Failed to initialize ${e} because the target is ambiguous. (${i.length} elements match)`,{target:t,elements:i}),i[0]};function Uc(t,e,i){const n=t.slice();return n[139]=e[i],n}function Vc(t){let e,i,n={onEvent:t[53],playerStyle:t[59],callToAction:t[23],skipButtonStyle:t[24],playlistStyle:t[25],playlistToggle:t[26],downloadFormats:t[47],playerTitle:t[22],content:t[48],contentIndex:t[7],duration:t[29],currentTime:t[11],playbackState:t[30],playbackRate:t[31],activeAdvert:t[56],persistentAdvert:t[62],textColor:t[34],backgroundColor:t[35],iconColor:t[36],logoIconEnabled:t[37],videoIsBehind:t[61]};return e=new dl({props:n}),t[92](e),{c(){He(e.$$.fragment)},m(a,l){Ge(e,a,l),i=!0},p(a,l){const g={};l[1]&268435456&&(g.playerStyle=a[59]),l[0]&8388608&&(g.callToAction=a[23]),l[0]&16777216&&(g.skipButtonStyle=a[24]),l[0]&33554432&&(g.playlistStyle=a[25]),l[0]&67108864&&(g.playlistToggle=a[26]),l[1]&65536&&(g.downloadFormats=a[47]),l[0]&4194304&&(g.playerTitle=a[22]),l[1]&131072&&(g.content=a[48]),l[0]&128&&(g.contentIndex=a[7]),l[0]&536870912&&(g.duration=a[29]),l[0]&2048&&(g.currentTime=a[11]),l[0]&1073741824&&(g.playbackState=a[30]),l[1]&1&&(g.playbackRate=a[31]),l[1]&33554432&&(g.activeAdvert=a[56]),l[2]&1&&(g.persistentAdvert=a[62]),l[1]&8&&(g.textColor=a[34]),l[1]&16&&(g.backgroundColor=a[35]),l[1]&32&&(g.iconColor=a[36]),l[1]&64&&(g.logoIconEnabled=a[37]),l[1]&1073741824&&(g.videoIsBehind=a[61]),e.$set(g)},i(a){i||(J(e.$$.fragment,a),i=!0)},o(a){ae(e.$$.fragment,a),i=!1},d(a){t[92](null),ze(e,a)}}}function Wc(t){let e,i;return e=new fl({props:{root:t[13],$$slots:{default:[cb]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&8192&&(l.root=n[13]),a[0]&1639987328|a[1]&167977087|a[2]&1|a[4]&262144&&(l.$$scope={dirty:a,ctx:n}),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function cb(t){let e,i,n={onEvent:t[53],playerStyle:t[12],callToAction:t[23],skipButtonStyle:t[24],playlistStyle:"hide",playlistToggle:"hide",downloadFormats:t[47],playerTitle:t[22],fixedPosition:!t[13]&&t[32],fixedWidth:t[33],content:t[48],contentIndex:t[7],duration:t[29],currentTime:t[11],playbackState:t[30],playbackRate:t[31],activeAdvert:t[56],persistentAdvert:t[62],textColor:t[34],backgroundColor:t[35],iconColor:t[36],logoIconEnabled:t[37],videoIsBehind:t[58]};return e=new dl({props:n}),t[93](e),{c(){He(e.$$.fragment)},m(a,l){Ge(e,a,l),i=!0},p(a,l){const g={};l[0]&4096&&(g.playerStyle=a[12]),l[0]&8388608&&(g.callToAction=a[23]),l[0]&16777216&&(g.skipButtonStyle=a[24]),l[1]&65536&&(g.downloadFormats=a[47]),l[0]&4194304&&(g.playerTitle=a[22]),l[0]&8192|l[1]&2&&(g.fixedPosition=!a[13]&&a[32]),l[1]&4&&(g.fixedWidth=a[33]),l[1]&131072&&(g.content=a[48]),l[0]&128&&(g.contentIndex=a[7]),l[0]&536870912&&(g.duration=a[29]),l[0]&2048&&(g.currentTime=a[11]),l[0]&1073741824&&(g.playbackState=a[30]),l[1]&1&&(g.playbackRate=a[31]),l[1]&33554432&&(g.activeAdvert=a[56]),l[2]&1&&(g.persistentAdvert=a[62]),l[1]&8&&(g.textColor=a[34]),l[1]&16&&(g.backgroundColor=a[35]),l[1]&32&&(g.iconColor=a[36]),l[1]&64&&(g.logoIconEnabled=a[37]),l[1]&134217728&&(g.videoIsBehind=a[58]),e.$set(g)},i(a){i||(J(e.$$.fragment,a),i=!0)},o(a){ae(e.$$.fragment,a),i=!1},d(a){t[93](null),ze(e,a)}}}function db(t){let e,i;return e=new dl({props:{onEvent:t[94],playerStyle:"small",fixedWidth:0,logoIconEnabled:!1,content:t[48],contentIndex:t[7],duration:t[29],currentTime:t[60]?t[11]:t[54].startTime,playbackState:t[60]?t[30]:"paused",activeAdvert:t[56],persistentAdvert:t[62],textColor:t[34],backgroundColor:t[35],iconColor:t[36]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[1]&75497472&&(l.onEvent=n[94]),a[1]&131072&&(l.content=n[48]),a[0]&128&&(l.contentIndex=n[7]),a[0]&536870912&&(l.duration=n[29]),a[0]&2048|a[1]&545259520&&(l.currentTime=n[60]?n[11]:n[54].startTime),a[0]&1073741824|a[1]&536870912&&(l.playbackState=n[60]?n[30]:"paused"),a[1]&33554432&&(l.activeAdvert=n[56]),a[2]&1&&(l.persistentAdvert=n[62]),a[1]&8&&(l.textColor=n[34]),a[1]&16&&(l.backgroundColor=n[35]),a[1]&32&&(l.iconColor=n[36]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function jc(t,e){let i,n,a;return n=new fl({props:{root:e[139],$$slots:{default:[db]},$$scope:{ctx:e}}}),{key:t,first:null,c(){i=Zn(),He(n.$$.fragment),this.first=i},m(l,g){se(l,i,g),Ge(n,l,g),a=!0},p(l,g){e=l;const p={};g[1]&32768&&(p.root=e[139]),g[0]&1610614912|g[1]&646053944|g[2]&1|g[4]&262144&&(p.$$scope={dirty:g,ctx:e}),n.$set(p)},i(l){a||(J(n.$$.fragment,l),a=!0)},o(l){ae(n.$$.fragment,l),a=!1},d(l){l&&te(i),ze(n,l)}}}function Gc(t){let e,i;return e=new fl({props:{root:t[21],$$slots:{default:[fb]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&2097152&&(l.root=n[21]),a[0]&2145386495|a[1]&919551|a[4]&262144&&(l.$$scope={dirty:a,ctx:n}),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function fb(t){let e,i,n,a,l,g,p,_,k,T,C,U,V,N,Q,W,ue,ie,be,Se,fe,pe,Z,L,le,z,Ke,Ie,Ee,ke,G,X,B,Ue,De,q,ve,at,Qe,Et,Oe,Te,it;function xt(Y){t[95](Y)}function wt(Y){t[96](Y)}function Xt(Y){t[97](Y)}function Pt(Y){t[98](Y)}function Ht(Y){t[99](Y)}function yt(Y){t[100](Y)}function ft(Y){t[101](Y)}function Nt(Y){t[102](Y)}function mt(Y){t[103](Y)}function bt(Y){t[104](Y)}function Zt(Y){t[105](Y)}function Rt(Y){t[106](Y)}function Jt(Y){t[107](Y)}function nt(Y){t[108](Y)}function ot(Y){t[109](Y)}function li(Y){t[110](Y)}function Pe(Y){t[111](Y)}function Dt(Y){t[112](Y)}function Ft(Y){t[113](Y)}function Ot(Y){t[114](Y)}function Ut(Y){t[115](Y)}function jt(Y){t[116](Y)}function ci(Y){t[117](Y)}function Kt(Y){t[118](Y)}function Yt(Y){t[119](Y)}function mi(Y){t[120](Y)}function Vt(Y){t[121](Y)}function ct(Y){t[122](Y)}function di(Y){t[123](Y)}function Be(Y){t[124](Y)}function fi(Y){t[125](Y)}function Qt(Y){t[126](Y)}function Je(Y){t[127](Y)}function pi(Y){t[128](Y)}function me(Y){t[129](Y)}function $t(Y){t[130](Y)}function hi(Y){t[131](Y)}function _i(Y){t[132](Y)}function wi(Y){t[133](Y)}function yi(Y){t[134](Y)}function Ei(Y){t[135](Y)}let Fe={content:t[48],introsOutros:t[49],adverts:t[50]};return t[0]!==void 0&&(Fe.projectId=t[0]),t[1]!==void 0&&(Fe.contentId=t[1]),t[2]!==void 0&&(Fe.playlistId=t[2]),t[3]!==void 0&&(Fe.sourceId=t[3]),t[4]!==void 0&&(Fe.sourceUrl=t[4]),t[5]!==void 0&&(Fe.showUserInterface=t[5]),t[6]!==void 0&&(Fe.playerStyle=t[6]),t[22]!==void 0&&(Fe.playerTitle=t[22]),t[23]!==void 0&&(Fe.callToAction=t[23]),t[24]!==void 0&&(Fe.skipButtonStyle=t[24]),t[25]!==void 0&&(Fe.playlistStyle=t[25]),t[26]!==void 0&&(Fe.playlistToggle=t[26]),t[27]!==void 0&&(Fe.mediaSession=t[27]),t[7]!==void 0&&(Fe.contentIndex=t[7]),t[8]!==void 0&&(Fe.introsOutrosIndex=t[8]),t[9]!==void 0&&(Fe.advertIndex=t[9]),t[28]!==void 0&&(Fe.persistentAdImage=t[28]),t[10]!==void 0&&(Fe.persistentIndex=t[10]),t[29]!==void 0&&(Fe.duration=t[29]),t[11]!==void 0&&(Fe.currentTime=t[11]),t[30]!==void 0&&(Fe.playbackState=t[30]),t[31]!==void 0&&(Fe.playbackRate=t[31]),t[12]!==void 0&&(Fe.widgetStyle=t[12]),t[32]!==void 0&&(Fe.widgetPosition=t[32]),t[33]!==void 0&&(Fe.widgetWidth=t[33]),t[13]!==void 0&&(Fe.widgetTarget=t[13]),t[34]!==void 0&&(Fe.textColor=t[34]),t[35]!==void 0&&(Fe.backgroundColor=t[35]),t[36]!==void 0&&(Fe.iconColor=t[36]),t[14]!==void 0&&(Fe.highlightColor=t[14]),t[37]!==void 0&&(Fe.logoIconEnabled=t[37]),t[15]!==void 0&&(Fe.highlightSections=t[15]),t[16]!==void 0&&(Fe.clickableSections=t[16]),t[17]!==void 0&&(Fe.segmentWidgetSections=t[17]),t[18]!==void 0&&(Fe.segmentWidgetPosition=t[18]),t[19]!==void 0&&(Fe.currentSegment=t[19]),t[20]!==void 0&&(Fe.hoveredSegment=t[20]),t[38]!==void 0&&(Fe.advertConsent=t[38]),t[39]!==void 0&&(Fe.analyticsConsent=t[39]),t[40]!==void 0&&(Fe.analyticsCustomUrl=t[40]),t[41]!==void 0&&(Fe.analyticsTag=t[41]),e=new Py({props:Fe}),Ne.push(()=>Ze(e,"projectId",xt)),Ne.push(()=>Ze(e,"contentId",wt)),Ne.push(()=>Ze(e,"playlistId",Xt)),Ne.push(()=>Ze(e,"sourceId",Pt)),Ne.push(()=>Ze(e,"sourceUrl",Ht)),Ne.push(()=>Ze(e,"showUserInterface",yt)),Ne.push(()=>Ze(e,"playerStyle",ft)),Ne.push(()=>Ze(e,"playerTitle",Nt)),Ne.push(()=>Ze(e,"callToAction",mt)),Ne.push(()=>Ze(e,"skipButtonStyle",bt)),Ne.push(()=>Ze(e,"playlistStyle",Zt)),Ne.push(()=>Ze(e,"playlistToggle",Rt)),Ne.push(()=>Ze(e,"mediaSession",Jt)),Ne.push(()=>Ze(e,"contentIndex",nt)),Ne.push(()=>Ze(e,"introsOutrosIndex",ot)),Ne.push(()=>Ze(e,"advertIndex",li)),Ne.push(()=>Ze(e,"persistentAdImage",Pe)),Ne.push(()=>Ze(e,"persistentIndex",Dt)),Ne.push(()=>Ze(e,"duration",Ft)),Ne.push(()=>Ze(e,"currentTime",Ot)),Ne.push(()=>Ze(e,"playbackState",Ut)),Ne.push(()=>Ze(e,"playbackRate",jt)),Ne.push(()=>Ze(e,"widgetStyle",ci)),Ne.push(()=>Ze(e,"widgetPosition",Kt)),Ne.push(()=>Ze(e,"widgetWidth",Yt)),Ne.push(()=>Ze(e,"widgetTarget",mi)),Ne.push(()=>Ze(e,"textColor",Vt)),Ne.push(()=>Ze(e,"backgroundColor",ct)),Ne.push(()=>Ze(e,"iconColor",di)),Ne.push(()=>Ze(e,"highlightColor",Be)),Ne.push(()=>Ze(e,"logoIconEnabled",fi)),Ne.push(()=>Ze(e,"highlightSections",Qt)),Ne.push(()=>Ze(e,"clickableSections",Je)),Ne.push(()=>Ze(e,"segmentWidgetSections",pi)),Ne.push(()=>Ze(e,"segmentWidgetPosition",me)),Ne.push(()=>Ze(e,"currentSegment",$t)),Ne.push(()=>Ze(e,"hoveredSegment",hi)),Ne.push(()=>Ze(e,"advertConsent",_i)),Ne.push(()=>Ze(e,"analyticsConsent",wi)),Ne.push(()=>Ze(e,"analyticsCustomUrl",yi)),Ne.push(()=>Ze(e,"analyticsTag",Ei)),{c(){He(e.$$.fragment)},m(Y,$){Ge(e,Y,$),it=!0},p(Y,$){const Me={};$[1]&131072&&(Me.content=Y[48]),$[1]&262144&&(Me.introsOutros=Y[49]),$[1]&524288&&(Me.adverts=Y[50]),!i&&$[0]&1&&(i=!0,Me.projectId=Y[0],Xe(()=>i=!1)),!n&&$[0]&2&&(n=!0,Me.contentId=Y[1],Xe(()=>n=!1)),!a&&$[0]&4&&(a=!0,Me.playlistId=Y[2],Xe(()=>a=!1)),!l&&$[0]&8&&(l=!0,Me.sourceId=Y[3],Xe(()=>l=!1)),!g&&$[0]&16&&(g=!0,Me.sourceUrl=Y[4],Xe(()=>g=!1)),!p&&$[0]&32&&(p=!0,Me.showUserInterface=Y[5],Xe(()=>p=!1)),!_&&$[0]&64&&(_=!0,Me.playerStyle=Y[6],Xe(()=>_=!1)),!k&&$[0]&4194304&&(k=!0,Me.playerTitle=Y[22],Xe(()=>k=!1)),!T&&$[0]&8388608&&(T=!0,Me.callToAction=Y[23],Xe(()=>T=!1)),!C&&$[0]&16777216&&(C=!0,Me.skipButtonStyle=Y[24],Xe(()=>C=!1)),!U&&$[0]&33554432&&(U=!0,Me.playlistStyle=Y[25],Xe(()=>U=!1)),!V&&$[0]&67108864&&(V=!0,Me.playlistToggle=Y[26],Xe(()=>V=!1)),!N&&$[0]&134217728&&(N=!0,Me.mediaSession=Y[27],Xe(()=>N=!1)),!Q&&$[0]&128&&(Q=!0,Me.contentIndex=Y[7],Xe(()=>Q=!1)),!W&&$[0]&256&&(W=!0,Me.introsOutrosIndex=Y[8],Xe(()=>W=!1)),!ue&&$[0]&512&&(ue=!0,Me.advertIndex=Y[9],Xe(()=>ue=!1)),!ie&&$[0]&268435456&&(ie=!0,Me.persistentAdImage=Y[28],Xe(()=>ie=!1)),!be&&$[0]&1024&&(be=!0,Me.persistentIndex=Y[10],Xe(()=>be=!1)),!Se&&$[0]&536870912&&(Se=!0,Me.duration=Y[29],Xe(()=>Se=!1)),!fe&&$[0]&2048&&(fe=!0,Me.currentTime=Y[11],Xe(()=>fe=!1)),!pe&&$[0]&1073741824&&(pe=!0,Me.playbackState=Y[30],Xe(()=>pe=!1)),!Z&&$[1]&1&&(Z=!0,Me.playbackRate=Y[31],Xe(()=>Z=!1)),!L&&$[0]&4096&&(L=!0,Me.widgetStyle=Y[12],Xe(()=>L=!1)),!le&&$[1]&2&&(le=!0,Me.widgetPosition=Y[32],Xe(()=>le=!1)),!z&&$[1]&4&&(z=!0,Me.widgetWidth=Y[33],Xe(()=>z=!1)),!Ke&&$[0]&8192&&(Ke=!0,Me.widgetTarget=Y[13],Xe(()=>Ke=!1)),!Ie&&$[1]&8&&(Ie=!0,Me.textColor=Y[34],Xe(()=>Ie=!1)),!Ee&&$[1]&16&&(Ee=!0,Me.backgroundColor=Y[35],Xe(()=>Ee=!1)),!ke&&$[1]&32&&(ke=!0,Me.iconColor=Y[36],Xe(()=>ke=!1)),!G&&$[0]&16384&&(G=!0,Me.highlightColor=Y[14],Xe(()=>G=!1)),!X&&$[1]&64&&(X=!0,Me.logoIconEnabled=Y[37],Xe(()=>X=!1)),!B&&$[0]&32768&&(B=!0,Me.highlightSections=Y[15],Xe(()=>B=!1)),!Ue&&$[0]&65536&&(Ue=!0,Me.clickableSections=Y[16],Xe(()=>Ue=!1)),!De&&$[0]&131072&&(De=!0,Me.segmentWidgetSections=Y[17],Xe(()=>De=!1)),!q&&$[0]&262144&&(q=!0,Me.segmentWidgetPosition=Y[18],Xe(()=>q=!1)),!ve&&$[0]&524288&&(ve=!0,Me.currentSegment=Y[19],Xe(()=>ve=!1)),!at&&$[0]&1048576&&(at=!0,Me.hoveredSegment=Y[20],Xe(()=>at=!1)),!Qe&&$[1]&128&&(Qe=!0,Me.advertConsent=Y[38],Xe(()=>Qe=!1)),!Et&&$[1]&256&&(Et=!0,Me.analyticsConsent=Y[39],Xe(()=>Et=!1)),!Oe&&$[1]&512&&(Oe=!0,Me.analyticsCustomUrl=Y[40],Xe(()=>Oe=!1)),!Te&&$[1]&1024&&(Te=!0,Me.analyticsTag=Y[41],Xe(()=>Te=!1)),e.$set(Me)},i(Y){it||(J(e.$$.fragment,Y),it=!0)},o(Y){ae(e.$$.fragment,Y),it=!1},d(Y){ze(e,Y)}}}function zc(t){let e,i;return e=new Vy({props:{onEvent:t[53],content:t[48],contentIndex:t[7],activeAdvert:t[56],persistentAdvert:t[62],duration:t[29],playbackState:t[30],skipButtonStyle:t[24],backgroundColor:t[35],iconColor:t[36]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[1]&131072&&(l.content=n[48]),a[0]&128&&(l.contentIndex=n[7]),a[1]&33554432&&(l.activeAdvert=n[56]),a[2]&1&&(l.persistentAdvert=n[62]),a[0]&536870912&&(l.duration=n[29]),a[0]&1073741824&&(l.playbackState=n[30]),a[0]&16777216&&(l.skipButtonStyle=n[24]),a[1]&16&&(l.backgroundColor=n[35]),a[1]&32&&(l.iconColor=n[36]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function Hc(t){let e,i;return e=new Hy({props:{analyticsTag:t[41]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[1]&1024&&(l.analyticsTag=n[41]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function hb(t){let e,i,n,a,l,g,p,_,k,T=[],C=new Map,U,V,N,Q,W,ue;function ie(G){t[87](G)}function be(G){t[88](G)}function Se(G){t[89](G)}function fe(G){t[90](G)}function pe(G){t[91](G)}let Z={onEvent:t[53],content:t[48],contentIndex:t[7],introOrOutro:t[55],activeAdvert:t[56],advertConsent:t[38],videoBehindWidget:t[58],videoBehindStatic:t[61],widgetPosition:t[32],widgetWidth:t[33]};t[30]!==void 0&&(Z.playbackState=t[30]),t[29]!==void 0&&(Z.duration=t[29]),t[11]!==void 0&&(Z.currentTime=t[11]),t[31]!==void 0&&(Z.playbackRate=t[31]),t[45]!==void 0&&(Z.prevPercentage=t[45]),e=new Mv({props:Z}),t[86](e),Ne.push(()=>Ze(e,"playbackState",ie)),Ne.push(()=>Ze(e,"duration",be)),Ne.push(()=>Ze(e,"currentTime",Se)),Ne.push(()=>Ze(e,"playbackRate",fe)),Ne.push(()=>Ze(e,"prevPercentage",pe));let L=t[5]&&Vc(t),le=(t[51]||t[13])&&Wc(t),z=t[46];const Ke=G=>G[139];for(let G=0;G<z.length;G+=1){let X=Uc(t,z,G),B=Ke(X);C.set(B,T[G]=jc(B,X))}let Ie=t[21]&&Gc(t),Ee=t[52]&&zc(t),ke=t[41]&&Hc(t);return W=new Ky({}),{c(){He(e.$$.fragment),p=Ce(),L&&L.c(),_=Ce(),le&&le.c(),k=Ce();for(let G=0;G<T.length;G+=1)T[G].c();U=Ce(),Ie&&Ie.c(),V=Ce(),Ee&&Ee.c(),N=Ce(),ke&&ke.c(),Q=Ce(),He(W.$$.fragment)},m(G,X){Ge(e,G,X),se(G,p,X),L&&L.m(G,X),se(G,_,X),le&&le.m(G,X),se(G,k,X);for(let B=0;B<T.length;B+=1)T[B]&&T[B].m(G,X);se(G,U,X),Ie&&Ie.m(G,X),se(G,V,X),Ee&&Ee.m(G,X),se(G,N,X),ke&&ke.m(G,X),se(G,Q,X),Ge(W,G,X),ue=!0},p(G,X){const B={};X[1]&131072&&(B.content=G[48]),X[0]&128&&(B.contentIndex=G[7]),X[1]&16777216&&(B.introOrOutro=G[55]),X[1]&33554432&&(B.activeAdvert=G[56]),X[1]&128&&(B.advertConsent=G[38]),X[1]&134217728&&(B.videoBehindWidget=G[58]),X[1]&1073741824&&(B.videoBehindStatic=G[61]),X[1]&2&&(B.widgetPosition=G[32]),X[1]&4&&(B.widgetWidth=G[33]),!i&&X[0]&1073741824&&(i=!0,B.playbackState=G[30],Xe(()=>i=!1)),!n&&X[0]&536870912&&(n=!0,B.duration=G[29],Xe(()=>n=!1)),!a&&X[0]&2048&&(a=!0,B.currentTime=G[11],Xe(()=>a=!1)),!l&&X[1]&1&&(l=!0,B.playbackRate=G[31],Xe(()=>l=!1)),!g&&X[1]&16384&&(g=!0,B.prevPercentage=G[45],Xe(()=>g=!1)),e.$set(B),G[5]?L?(L.p(G,X),X[0]&32&&J(L,1)):(L=Vc(G),L.c(),J(L,1),L.m(_.parentNode,_)):L&&(Lt(),ae(L,1,1,()=>{L=null}),It()),G[51]||G[13]?le?(le.p(G,X),X[0]&8192|X[1]&1048576&&J(le,1)):(le=Wc(G),le.c(),J(le,1),le.m(k.parentNode,k)):le&&(Lt(),ae(le,1,1,()=>{le=null}),It()),X[0]&1610614912|X[1]&650281016|X[2]&1&&(z=G[46],Lt(),T=Qh(T,X,Ke,1,G,z,C,U.parentNode,Jh,jc,U,Uc),It()),G[21]?Ie?(Ie.p(G,X),X[0]&2097152&&J(Ie,1)):(Ie=Gc(G),Ie.c(),J(Ie,1),Ie.m(V.parentNode,V)):Ie&&(Lt(),ae(Ie,1,1,()=>{Ie=null}),It()),G[52]?Ee?(Ee.p(G,X),X[1]&2097152&&J(Ee,1)):(Ee=zc(G),Ee.c(),J(Ee,1),Ee.m(N.parentNode,N)):Ee&&(Lt(),ae(Ee,1,1,()=>{Ee=null}),It()),G[41]?ke?(ke.p(G,X),X[1]&1024&&J(ke,1)):(ke=Hc(G),ke.c(),J(ke,1),ke.m(Q.parentNode,Q)):ke&&(Lt(),ae(ke,1,1,()=>{ke=null}),It())},i(G){if(!ue){J(e.$$.fragment,G),J(L),J(le);for(let X=0;X<z.length;X+=1)J(T[X]);J(Ie),J(Ee),J(ke),J(W.$$.fragment,G),ue=!0}},o(G){ae(e.$$.fragment,G),ae(L),ae(le);for(let X=0;X<T.length;X+=1)ae(T[X]);ae(Ie),ae(Ee),ae(ke),ae(W.$$.fragment,G),ue=!1},d(G){t[86](null),ze(e,G),G&&te(p),L&&L.d(G),G&&te(_),le&&le.d(G),G&&te(k);for(let X=0;X<T.length;X+=1)T[X].d(G);G&&te(U),Ie&&Ie.d(G),G&&te(V),Ee&&Ee.d(G),G&&te(N),ke&&ke.d(G),G&&te(Q),ze(W,G)}}}function gb(t,e,i){let n,a,l,g,p,_,k,T,C,U,V,N,Q,{playerApiUrl:W="https://api.beyondwords.io/v1/projects/{id}/player"}=e,{projectId:ue=void 0}=e,{contentId:ie=void 0}=e,{playlistId:be=void 0}=e,{sourceId:Se=void 0}=e,{sourceUrl:fe=void 0}=e,{playlist:pe=[]}=e,{showUserInterface:Z=!0}=e,{playerStyle:L="standard"}=e,{playerTitle:le=void 0}=e,{callToAction:z=void 0}=e,{skipButtonStyle:Ke="auto"}=e,{playlistStyle:Ie="auto-5-4"}=e,{playlistToggle:Ee="auto"}=e,{downloadFormats:ke=[]}=e,{mediaSession:G="auto"}=e,{content:X=[]}=e,{contentIndex:B=0}=e,{introsOutros:Ue=[]}=e,{introsOutrosIndex:De=-1}=e,{adverts:q=[]}=e,{advertIndex:ve=-1}=e,{persistentAdImage:at=!1}=e,{persistentIndex:Qe=-1}=e,{duration:Et=0}=e,{currentTime:Oe=0}=e,{playbackState:Te="stopped"}=e,{playbackRate:it=1}=e,{widgetStyle:xt="standard"}=e,{widgetPosition:wt="auto"}=e,{widgetWidth:Xt="auto"}=e,{widgetTarget:Pt=void 0}=e,{textColor:Ht="#111"}=e,{backgroundColor:yt="#f5f5f5"}=e,{iconColor:ft="rgba(0, 0, 0, 0.8)"}=e,{highlightColor:Nt="#eee"}=e,{logoIconEnabled:mt=!0}=e,{highlightSections:bt="all"}=e,{clickableSections:Zt="all"}=e,{segmentWidgetSections:Rt="body"}=e,{segmentWidgetPosition:Jt="7-oclock"}=e,{currentSegment:nt=void 0}=e,{hoveredSegment:ot=void 0}=e,{loadedMedia:li=void 0}=e,{advertConsent:Pe="personalized"}=e,{analyticsConsent:Dt="allowed"}=e,{analyticsCustomUrl:Ft=void 0}=e,{analyticsTag:Ot=void 0}=e,{writeToken:Ut=void 0}=e,{captureErrors:jt=!0}=e,{onError:ci=()=>{}}=e,{transitions:Kt=[]}=e,{controlPanel:Yt=void 0}=e;const mi=(...R)=>me.addEventListener(...R),Vt=(...R)=>me.removeEventListener(...R);let{initialProps:ct={}}=e,{showBottomWidget:di=!1}=e,{showMediaSession:Be=!1}=e,{isFullScreen:fi=!1}=e,{mediaElement:Qt=void 0}=e,{userInterface:Je=void 0}=e,{widgetInterface:pi=void 0}=e,{controller:me=void 0}=e,{analyticsUrl:$t=void 0}=e,{analyticsId:hi=void 0}=e,{listenSessionId:_i=void 0}=e,{sessionCreatedAt:wi=void 0}=e,{isNewListen:yi=!1}=e,{prevPercentage:Ei=0}=e,{segmentWidgets:Fe=[]}=e,{segmentContainers:Y=new ml(R=>i(46,Fe=R))}=e,{segmentClickables:$=new vl}=e,{segmentHighlights:Me=new gl}=e;const _r=R=>me.processEvent(de({emittedFrom:p},R)),ji=()=>i(84,T=ot);function Qr(R){Ne[R?"unshift":"push"](()=>{Qt=R,i(42,Qt)})}function si(R){Te=R,i(30,Te)}function yr(R){Et=R,i(29,Et)}function Ji(R){Oe=R,i(11,Oe)}function Qi(R){it=R,i(31,it)}function Gi(R){Ei=R,i(45,Ei)}function ur(R){Ne[R?"unshift":"push"](()=>{Je=R,i(43,Je)})}function xr(R){Ne[R?"unshift":"push"](()=>{pi=R,i(44,pi)})}const Ii=R=>_r(ni(de({},R),{emittedFrom:"segment-widget",widgetSegment:V,widgetIsCurrent:N}));function Ri(R){ue=R,i(0,ue)}function cr(R){ie=R,i(1,ie)}function wr(R){be=R,i(2,be)}function zi(R){Se=R,i(3,Se)}function Si(R){fe=R,i(4,fe)}function Hi(R){Z=R,i(5,Z)}function Di(R){L=R,i(6,L)}function ei(R){le=R,i(22,le)}function Ki(R){z=R,i(23,z)}function ti(R){Ke=R,i(24,Ke)}function br(R){Ie=R,i(25,Ie)}function ii(R){Ee=R,i(26,Ee)}function H(R){G=R,i(27,G)}function _e(R){B=R,i(7,B)}function ye(R){De=R,i(8,De)}function st(R){ve=R,i(9,ve)}function Mr(R){at=R,i(28,at)}function Pr(R){Qe=R,i(10,Qe)}function $r(R){Et=R,i(29,Et)}function Ms(R){Oe=R,i(11,Oe)}function bn(R){Te=R,i(30,Te)}function Ns(R){it=R,i(31,it)}function Yi(R){xt=R,i(12,xt)}function en(R){wt=R,i(32,wt)}function Ai(R){Xt=R,i(33,Xt)}function tn(R){Pt=R,i(13,Pt)}function Cr(R){Ht=R,i(34,Ht)}function Sr(R){yt=R,i(35,yt)}function Wn(R){ft=R,i(36,ft)}function Sn(R){Nt=R,i(14,Nt)}function Fs(R){mt=R,i(37,mt)}function kr(R){bt=R,i(15,bt)}function jn(R){Zt=R,i(16,Zt)}function Nr(R){Rt=R,i(17,Rt)}function Us(R){Jt=R,i(18,Jt)}function as(R){nt=R,i(19,nt)}function os(R){ot=R,i(20,ot)}function Gn(R){Pe=R,i(38,Pe)}function Fr(R){Dt=R,i(39,Dt)}function Pi(R){Ft=R,i(40,Ft)}function ya(R){Ot=R,i(41,Ot)}return t.$$set=R=>{"playerApiUrl"in R&&i(63,W=R.playerApiUrl),"projectId"in R&&i(0,ue=R.projectId),"contentId"in R&&i(1,ie=R.contentId),"playlistId"in R&&i(2,be=R.playlistId),"sourceId"in R&&i(3,Se=R.sourceId),"sourceUrl"in R&&i(4,fe=R.sourceUrl),"playlist"in R&&i(64,pe=R.playlist),"showUserInterface"in R&&i(5,Z=R.showUserInterface),"playerStyle"in R&&i(6,L=R.playerStyle),"playerTitle"in R&&i(22,le=R.playerTitle),"callToAction"in R&&i(23,z=R.callToAction),"skipButtonStyle"in R&&i(24,Ke=R.skipButtonStyle),"playlistStyle"in R&&i(25,Ie=R.playlistStyle),"playlistToggle"in R&&i(26,Ee=R.playlistToggle),"downloadFormats"in R&&i(47,ke=R.downloadFormats),"mediaSession"in R&&i(27,G=R.mediaSession),"content"in R&&i(48,X=R.content),"contentIndex"in R&&i(7,B=R.contentIndex),"introsOutros"in R&&i(49,Ue=R.introsOutros),"introsOutrosIndex"in R&&i(8,De=R.introsOutrosIndex),"adverts"in R&&i(50,q=R.adverts),"advertIndex"in R&&i(9,ve=R.advertIndex),"persistentAdImage"in R&&i(28,at=R.persistentAdImage),"persistentIndex"in R&&i(10,Qe=R.persistentIndex),"duration"in R&&i(29,Et=R.duration),"currentTime"in R&&i(11,Oe=R.currentTime),"playbackState"in R&&i(30,Te=R.playbackState),"playbackRate"in R&&i(31,it=R.playbackRate),"widgetStyle"in R&&i(12,xt=R.widgetStyle),"widgetPosition"in R&&i(32,wt=R.widgetPosition),"widgetWidth"in R&&i(33,Xt=R.widgetWidth),"widgetTarget"in R&&i(13,Pt=R.widgetTarget),"textColor"in R&&i(34,Ht=R.textColor),"backgroundColor"in R&&i(35,yt=R.backgroundColor),"iconColor"in R&&i(36,ft=R.iconColor),"highlightColor"in R&&i(14,Nt=R.highlightColor),"logoIconEnabled"in R&&i(37,mt=R.logoIconEnabled),"highlightSections"in R&&i(15,bt=R.highlightSections),"clickableSections"in R&&i(16,Zt=R.clickableSections),"segmentWidgetSections"in R&&i(17,Rt=R.segmentWidgetSections),"segmentWidgetPosition"in R&&i(18,Jt=R.segmentWidgetPosition),"currentSegment"in R&&i(19,nt=R.currentSegment),"hoveredSegment"in R&&i(20,ot=R.hoveredSegment),"loadedMedia"in R&&i(65,li=R.loadedMedia),"advertConsent"in R&&i(38,Pe=R.advertConsent),"analyticsConsent"in R&&i(39,Dt=R.analyticsConsent),"analyticsCustomUrl"in R&&i(40,Ft=R.analyticsCustomUrl),"analyticsTag"in R&&i(41,Ot=R.analyticsTag),"writeToken"in R&&i(66,Ut=R.writeToken),"captureErrors"in R&&i(67,jt=R.captureErrors),"onError"in R&&i(68,ci=R.onError),"transitions"in R&&i(69,Kt=R.transitions),"controlPanel"in R&&i(21,Yt=R.controlPanel),"initialProps"in R&&i(72,ct=R.initialProps),"showBottomWidget"in R&&i(51,di=R.showBottomWidget),"showMediaSession"in R&&i(52,Be=R.showMediaSession),"isFullScreen"in R&&i(73,fi=R.isFullScreen),"mediaElement"in R&&i(42,Qt=R.mediaElement),"userInterface"in R&&i(43,Je=R.userInterface),"widgetInterface"in R&&i(44,pi=R.widgetInterface),"controller"in R&&i(74,me=R.controller),"analyticsUrl"in R&&i(75,$t=R.analyticsUrl),"analyticsId"in R&&i(76,hi=R.analyticsId),"listenSessionId"in R&&i(77,_i=R.listenSessionId),"sessionCreatedAt"in R&&i(78,wi=R.sessionCreatedAt),"isNewListen"in R&&i(79,yi=R.isNewListen),"prevPercentage"in R&&i(45,Ei=R.prevPercentage),"segmentWidgets"in R&&i(46,Fe=R.segmentWidgets),"segmentContainers"in R&&i(80,Y=R.segmentContainers),"segmentClickables"in R&&i(81,$=R.segmentClickables),"segmentHighlights"in R&&i(82,Me=R.segmentHighlights)},t.$$.update=()=>{t.$$.dirty[0]&256|t.$$.dirty[1]&262144&&i(55,n=Ue[De]),t.$$.dirty[0]&512|t.$$.dirty[1]&524288&&i(56,a=q[ve]),t.$$.dirty[0]&1024|t.$$.dirty[1]&524288&&i(62,l=q[Qe]),t.$$.dirty[0]&128|t.$$.dirty[1]&131072&&X[B],t.$$.dirty[0]&64|t.$$.dirty[2]&2048&&i(59,g=fi?"video":L),t.$$.dirty[0]&4096|t.$$.dirty[1]&1048576|t.$$.dirty[2]&2048&&i(58,_=di&&xt==="video"&&!fi),t.$$.dirty[1]&134217728&&(p=_?"bottom-widget":"inline-player"),t.$$.dirty[0]&8192&&i(13,Pt=pl(Pt,"widget")),t.$$.dirty[0]&2097152&&i(21,Yt=pl(Yt,"control panel")),t.$$.dirty[0]&32|t.$$.dirty[1]&402653184&&i(61,k=Z&&g==="video"&&!_),t.$$.dirty[0]&31|t.$$.dirty[2]&4&&_r(Yy()),t.$$.dirty[0]&1|t.$$.dirty[2]&18&&Zy(W,ue,Ut,R=>_r(R)),t.$$.dirty[0]&1048576|t.$$.dirty[2]&4194304&&i(84,T=ot||T),t.$$.dirty[0]&655360&&i(83,C=Js("current",nt,Rt)),t.$$.dirty[0]&524288|t.$$.dirty[2]&2097152&&C&&ji(),t.$$.dirty[0]&131072|t.$$.dirty[2]&4194304&&i(85,U=Js("hovered",T,Rt)),t.$$.dirty[0]&524288|t.$$.dirty[2]&14680064&&i(54,V=U&&T||C&&nt),t.$$.dirty[0]&524288|t.$$.dirty[1]&8388608&&i(57,N=(V==null?void 0:V.marker)===(nt==null?void 0:nt.marker)),t.$$.dirty[1]&117440512&&i(60,Q=N||a||n),t.$$.dirty[0]&393280|t.$$.dirty[1]&8388608|t.$$.dirty[2]&262144&&Y.update(V,Rt,Jt,L),t.$$.dirty[0]&1114112|t.$$.dirty[2]&524288&&$.update(ot,Zt),t.$$.dirty[0]&573440|t.$$.dirty[2]&1048576&&Me.update("current",nt,bt,Nt),t.$$.dirty[0]&1097728|t.$$.dirty[2]&1048576&&Me.update("hovered",ot,bt,Nt),t.$$.dirty[0]&2048|t.$$.dirty[2]&4224&&ib(Kt,me,Oe)},[ue,ie,be,Se,fe,Z,L,B,De,ve,Qe,Oe,xt,Pt,Nt,bt,Zt,Rt,Jt,nt,ot,Yt,le,z,Ke,Ie,Ee,G,at,Et,Te,it,wt,Xt,Ht,yt,ft,mt,Pe,Dt,Ft,Ot,Qt,Je,pi,Ei,Fe,ke,X,Ue,q,di,Be,_r,V,n,a,N,_,g,Q,k,l,W,pe,li,Ut,jt,ci,Kt,mi,Vt,ct,fi,me,$t,hi,_i,wi,yi,Y,$,Me,C,T,U,Qr,si,yr,Ji,Qi,Gi,ur,xr,Ii,Ri,cr,wr,zi,Si,Hi,Di,ei,Ki,ti,br,ii,H,_e,ye,st,Mr,Pr,$r,Ms,bn,Ns,Yi,en,Ai,tn,Cr,Sr,Wn,Sn,Fs,kr,jn,Nr,Us,as,os,Gn,Fr,Pi,ya]}let vb=class extends tt{constructor(e){super(),et(this,e,gb,hb,Ye,{playerApiUrl:63,projectId:0,contentId:1,playlistId:2,sourceId:3,sourceUrl:4,playlist:64,showUserInterface:5,playerStyle:6,playerTitle:22,callToAction:23,skipButtonStyle:24,playlistStyle:25,playlistToggle:26,downloadFormats:47,mediaSession:27,content:48,contentIndex:7,introsOutros:49,introsOutrosIndex:8,adverts:50,advertIndex:9,persistentAdImage:28,persistentIndex:10,duration:29,currentTime:11,playbackState:30,playbackRate:31,widgetStyle:12,widgetPosition:32,widgetWidth:33,widgetTarget:13,textColor:34,backgroundColor:35,iconColor:36,highlightColor:14,logoIconEnabled:37,highlightSections:15,clickableSections:16,segmentWidgetSections:17,segmentWidgetPosition:18,currentSegment:19,hoveredSegment:20,loadedMedia:65,advertConsent:38,analyticsConsent:39,analyticsCustomUrl:40,analyticsTag:41,writeToken:66,captureErrors:67,onError:68,transitions:69,controlPanel:21,addEventListener:70,removeEventListener:71,initialProps:72,showBottomWidget:51,showMediaSession:52,isFullScreen:73,mediaElement:42,userInterface:43,widgetInterface:44,controller:74,analyticsUrl:75,analyticsId:76,listenSessionId:77,sessionCreatedAt:78,isNewListen:79,prevPercentage:45,segmentWidgets:46,segmentContainers:80,segmentClickables:81,segmentHighlights:82,onEvent:53},null,[-1,-1,-1,-1,-1])}get playerApiUrl(){return this.$$.ctx[63]}set playerApiUrl(e){this.$$set({playerApiUrl:e}),w()}get projectId(){return this.$$.ctx[0]}set projectId(e){this.$$set({projectId:e}),w()}get contentId(){return this.$$.ctx[1]}set contentId(e){this.$$set({contentId:e}),w()}get playlistId(){return this.$$.ctx[2]}set playlistId(e){this.$$set({playlistId:e}),w()}get sourceId(){return this.$$.ctx[3]}set sourceId(e){this.$$set({sourceId:e}),w()}get sourceUrl(){return this.$$.ctx[4]}set sourceUrl(e){this.$$set({sourceUrl:e}),w()}get playlist(){return this.$$.ctx[64]}set playlist(e){this.$$set({playlist:e}),w()}get showUserInterface(){return this.$$.ctx[5]}set showUserInterface(e){this.$$set({showUserInterface:e}),w()}get playerStyle(){return this.$$.ctx[6]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get playerTitle(){return this.$$.ctx[22]}set playerTitle(e){this.$$set({playerTitle:e}),w()}get callToAction(){return this.$$.ctx[23]}set callToAction(e){this.$$set({callToAction:e}),w()}get skipButtonStyle(){return this.$$.ctx[24]}set skipButtonStyle(e){this.$$set({skipButtonStyle:e}),w()}get playlistStyle(){return this.$$.ctx[25]}set playlistStyle(e){this.$$set({playlistStyle:e}),w()}get playlistToggle(){return this.$$.ctx[26]}set playlistToggle(e){this.$$set({playlistToggle:e}),w()}get downloadFormats(){return this.$$.ctx[47]}set downloadFormats(e){this.$$set({downloadFormats:e}),w()}get mediaSession(){return this.$$.ctx[27]}set mediaSession(e){this.$$set({mediaSession:e}),w()}get content(){return this.$$.ctx[48]}set content(e){this.$$set({content:e}),w()}get contentIndex(){return this.$$.ctx[7]}set contentIndex(e){this.$$set({contentIndex:e}),w()}get introsOutros(){return this.$$.ctx[49]}set introsOutros(e){this.$$set({introsOutros:e}),w()}get introsOutrosIndex(){return this.$$.ctx[8]}set introsOutrosIndex(e){this.$$set({introsOutrosIndex:e}),w()}get adverts(){return this.$$.ctx[50]}set adverts(e){this.$$set({adverts:e}),w()}get advertIndex(){return this.$$.ctx[9]}set advertIndex(e){this.$$set({advertIndex:e}),w()}get persistentAdImage(){return this.$$.ctx[28]}set persistentAdImage(e){this.$$set({persistentAdImage:e}),w()}get persistentIndex(){return this.$$.ctx[10]}set persistentIndex(e){this.$$set({persistentIndex:e}),w()}get duration(){return this.$$.ctx[29]}set duration(e){this.$$set({duration:e}),w()}get currentTime(){return this.$$.ctx[11]}set currentTime(e){this.$$set({currentTime:e}),w()}get playbackState(){return this.$$.ctx[30]}set playbackState(e){this.$$set({playbackState:e}),w()}get playbackRate(){return this.$$.ctx[31]}set playbackRate(e){this.$$set({playbackRate:e}),w()}get widgetStyle(){return this.$$.ctx[12]}set widgetStyle(e){this.$$set({widgetStyle:e}),w()}get widgetPosition(){return this.$$.ctx[32]}set widgetPosition(e){this.$$set({widgetPosition:e}),w()}get widgetWidth(){return this.$$.ctx[33]}set widgetWidth(e){this.$$set({widgetWidth:e}),w()}get widgetTarget(){return this.$$.ctx[13]}set widgetTarget(e){this.$$set({widgetTarget:e}),w()}get textColor(){return this.$$.ctx[34]}set textColor(e){this.$$set({textColor:e}),w()}get backgroundColor(){return this.$$.ctx[35]}set backgroundColor(e){this.$$set({backgroundColor:e}),w()}get iconColor(){return this.$$.ctx[36]}set iconColor(e){this.$$set({iconColor:e}),w()}get highlightColor(){return this.$$.ctx[14]}set highlightColor(e){this.$$set({highlightColor:e}),w()}get logoIconEnabled(){return this.$$.ctx[37]}set logoIconEnabled(e){this.$$set({logoIconEnabled:e}),w()}get highlightSections(){return this.$$.ctx[15]}set highlightSections(e){this.$$set({highlightSections:e}),w()}get clickableSections(){return this.$$.ctx[16]}set clickableSections(e){this.$$set({clickableSections:e}),w()}get segmentWidgetSections(){return this.$$.ctx[17]}set segmentWidgetSections(e){this.$$set({segmentWidgetSections:e}),w()}get segmentWidgetPosition(){return this.$$.ctx[18]}set segmentWidgetPosition(e){this.$$set({segmentWidgetPosition:e}),w()}get currentSegment(){return this.$$.ctx[19]}set currentSegment(e){this.$$set({currentSegment:e}),w()}get hoveredSegment(){return this.$$.ctx[20]}set hoveredSegment(e){this.$$set({hoveredSegment:e}),w()}get loadedMedia(){return this.$$.ctx[65]}set loadedMedia(e){this.$$set({loadedMedia:e}),w()}get advertConsent(){return this.$$.ctx[38]}set advertConsent(e){this.$$set({advertConsent:e}),w()}get analyticsConsent(){return this.$$.ctx[39]}set analyticsConsent(e){this.$$set({analyticsConsent:e}),w()}get analyticsCustomUrl(){return this.$$.ctx[40]}set analyticsCustomUrl(e){this.$$set({analyticsCustomUrl:e}),w()}get analyticsTag(){return this.$$.ctx[41]}set analyticsTag(e){this.$$set({analyticsTag:e}),w()}get writeToken(){return this.$$.ctx[66]}set writeToken(e){this.$$set({writeToken:e}),w()}get captureErrors(){return this.$$.ctx[67]}set captureErrors(e){this.$$set({captureErrors:e}),w()}get onError(){return this.$$.ctx[68]}set onError(e){this.$$set({onError:e}),w()}get transitions(){return this.$$.ctx[69]}set transitions(e){this.$$set({transitions:e}),w()}get controlPanel(){return this.$$.ctx[21]}set controlPanel(e){this.$$set({controlPanel:e}),w()}get addEventListener(){return this.$$.ctx[70]}get removeEventListener(){return this.$$.ctx[71]}get initialProps(){return this.$$.ctx[72]}set initialProps(e){this.$$set({initialProps:e}),w()}get showBottomWidget(){return this.$$.ctx[51]}set showBottomWidget(e){this.$$set({showBottomWidget:e}),w()}get showMediaSession(){return this.$$.ctx[52]}set showMediaSession(e){this.$$set({showMediaSession:e}),w()}get isFullScreen(){return this.$$.ctx[73]}set isFullScreen(e){this.$$set({isFullScreen:e}),w()}get mediaElement(){return this.$$.ctx[42]}set mediaElement(e){this.$$set({mediaElement:e}),w()}get userInterface(){return this.$$.ctx[43]}set userInterface(e){this.$$set({userInterface:e}),w()}get widgetInterface(){return this.$$.ctx[44]}set widgetInterface(e){this.$$set({widgetInterface:e}),w()}get controller(){return this.$$.ctx[74]}set controller(e){this.$$set({controller:e}),w()}get analyticsUrl(){return this.$$.ctx[75]}set analyticsUrl(e){this.$$set({analyticsUrl:e}),w()}get analyticsId(){return this.$$.ctx[76]}set analyticsId(e){this.$$set({analyticsId:e}),w()}get listenSessionId(){return this.$$.ctx[77]}set listenSessionId(e){this.$$set({listenSessionId:e}),w()}get sessionCreatedAt(){return this.$$.ctx[78]}set sessionCreatedAt(e){this.$$set({sessionCreatedAt:e}),w()}get isNewListen(){return this.$$.ctx[79]}set isNewListen(e){this.$$set({isNewListen:e}),w()}get prevPercentage(){return this.$$.ctx[45]}set prevPercentage(e){this.$$set({prevPercentage:e}),w()}get segmentWidgets(){return this.$$.ctx[46]}set segmentWidgets(e){this.$$set({segmentWidgets:e}),w()}get segmentContainers(){return this.$$.ctx[80]}set segmentContainers(e){this.$$set({segmentContainers:e}),w()}get segmentClickables(){return this.$$.ctx[81]}set segmentClickables(e){this.$$set({segmentClickables:e}),w()}get segmentHighlights(){return this.$$.ctx[82]}set segmentHighlights(e){this.$$set({segmentHighlights:e}),w()}get onEvent(){return this.$$.ctx[53]}};class mb{constructor(e,i){this.baseUrl=e==null?void 0:e.replace("{id}",i)}byContentId(e){return Qn(`${this.baseUrl}/by_content_id/${e}`)}byPlaylistId(e){return Qn(`${this.baseUrl}/by_playlist_id/${e}`)}bySourceId(e){return Qn(`${this.baseUrl}/by_source_id/${e}`)}bySourceUrl(e){return Qn(`${this.baseUrl}/by_source_url/${e}`)}byIdentifiers(e){return Qn(`${this.baseUrl}/by_identifiers/${encodeURIComponent(JSON.stringify(e))}`)}}const _l=t=>typeof t!="object"||t===null?t:Array.isArray(t)?t.map(_l):Object.fromEntries(Object.entries(t).map(([e,i])=>[e.replace(/([A-Z])/g,n=>`_${n.toLowerCase()}`),_l(i)])),Kc=t=>t==="dark"||t==="auto"&&pb()?"dark":"light",pb=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,Yc=t=>an(this,null,function*(){const e=new mb(t.playerApiUrl,t.projectId);if(!t.playerApiUrl||!t.projectId)return;const i=_b(t);if(i.length===0)return;const n=yield yb(e,i).catch(()=>{});if(!(n!=null&&n.content)){bb(t);return}Sb(t,n)}),_b=t=>{const e=[];return t.contentId&&e.push({content_id:t.contentId}),t.playlistId&&e.push({playlist_id:t.playlistId}),t.sourceId&&e.push({source_id:t.sourceId}),t.sourceUrl&&e.push({source_url:t.sourceUrl}),t.playlist&&e.push(..._l(t.playlist)),[...new Set(e.map(JSON.stringify))].map(JSON.parse)},yb=(t,e)=>{const i=e[0];if(e.length>1)return t.byIdentifiers(e);if(i.content_id)return t.byContentId(i.content_id);if(i.playlist_id)return t.byPlaylistId(i.playlist_id);if(i.source_id)return t.bySourceId(i.source_id);if(i.source_url)return t.bySourceUrl(i.source_url)},bb=t=>{qc(t),Xc(t),Zc(t),t.onEvent(qe({type:"NoContentAvailable",description:"No published and processed content is available for the identifiers.",initiatedBy:"browser"}))},Sb=(t,e)=>{var a;const i=Kc(e.settings.theme),n=e.settings[`${i}_theme`];qc(t),Xc(t,e),Zc(t,e),At(t,"playerStyle",e.settings.player_style),At(t,"playerTitle",((a=e.playlist)==null?void 0:a.title)||e.settings.player_title),At(t,"callToAction",e.settings.call_to_action==="Listen to this article"?null:e.settings.call_to_action),At(t,"skipButtonStyle",e.settings.skip_button_style),At(t,"downloadFormats",e.settings.download_button_enabled?["mp3"]:[]),At(t,"introsOutros",kb(e.settings)),At(t,"persistentAdImage",e.settings.persistent_ad_image),At(t,"widgetStyle",e.settings.widget_style),At(t,"widgetPosition",e.settings.widget_position),At(t,"textColor",n.text_color),At(t,"backgroundColor",n.background_color),At(t,"iconColor",n.icon_color),At(t,"highlightColor",n.highlight_color),At(t,"logoIconEnabled",e.settings.logo_icon_enabled),At(t,"highlightSections",e.settings.segment_playback_enabled?"all":"none"),At(t,"clickableSections",e.settings.segment_playback_enabled?"all":"none"),At(t,"segmentWidgetSections",(e.settings.segment_playback_enabled,"none")),At(t,"analyticsConsent",Tb(e.settings)),At(t,"analyticsCustomUrl",e.settings.analytics_custom_url),At(t,"analyticsTag",e.settings.analytics_tag),At(t,"analyticsUrl",e.settings.analytics_url),At(t,"analyticsId",e.settings.analytics_id)},qc=t=>{At(t,"contentIndex",0),At(t,"introsOutrosIndex",-1),At(t,"advertIndex",-1),At(t,"persistentIndex",-1),At(t,"duration",0),At(t,"currentTime",0),At(t,"playbackState","stopped"),At(t,"currentSegment",void 0),At(t,"hoveredSegment",void 0)},Xc=(t,e)=>{var a;const i=(a=e==null?void 0:e.settings)==null?void 0:a.image_enabled,n=(e==null?void 0:e.content)||[];At(t,"content",n.map(l=>{var g;return{id:l.id,title:l.title,imageUrl:i&&(((g=e.playlist)==null?void 0:g.image_url)||e.settings.image_url||l.image_url),sourceId:l.source_id,sourceUrl:l.source_url,adsEnabled:l.ads_enabled,duration:l.audio[0]?l.audio[0].duration/1e3:0,audio:l.audio.map(p=>({id:p.id,url:p.url,contentType:p.content_type})),video:l.video.map(p=>({id:p.id,url:p.url,contentType:p.content_type})),segments:l.segments.map(p=>({marker:p.marker,section:p.section,startTime:p.start_time?p.start_time/1e3:0,duration:p.duration?p.duration/1e3:0}))}}))},Zc=(t,e)=>{var a;const i=(a=e==null?void 0:e.settings)==null?void 0:a.image_enabled,n=(e==null?void 0:e.ads)||[];At(t,"adverts",n.map(l=>{const g=l.type==="vast",p=Kc(l.theme),_=l[`${p}_theme`];return{id:l.id,type:l.type,placement:l.placement,vastUrl:g?l.vast_url:null,clickThroughUrl:g?null:l.click_through_url,imageUrl:i&&l.image_url,textColor:_==null?void 0:_.text_color,backgroundColor:_==null?void 0:_.background_color,iconColor:_==null?void 0:_.icon_color,audio:g?[]:(l.audio||l.media).map(k=>({id:k.id,url:k.url,contentType:k.content_type})),video:g?[]:(l.video||[]).map(k=>({id:k.id,url:k.url,contentType:k.content_type}))}}))},At=(t,e,i)=>{typeof t.initialProps[e]!="undefined"||(t[e]=i)},kb=({intro_outro_enabled:t,intro_url:e,outro_url:i})=>{if(!t)return[];const n=[];return e&&n.push({placement:"pre-roll",audio:[{url:e}],video:[]}),i&&n.push({placement:"post-roll",audio:[{url:i}],video:[]}),n},Tb=({analytics_enabled:t,analytics_uuid_enabled:e})=>t?e?"allowed":"without-local-storage":"none",Eb=(t,e)=>an(this,null,function*(){const n=yield(yield fetch(t)).blob(),a=URL.createObjectURL(n),l=document.createElement("a");document.body.append(l),l.href=a,l.setAttribute("download",e),l.setAttribute("target","_blank"),l.click(),l.remove()}),Ha={vastUrls:new Set,mediaSources:new Set},Ab=t=>{t.vastUrl&&Ha.vastUrls.add(t.vastUrl);for(const e of[...t.audio||[],...t.video||[]])Ha.mediaSources.add(e.url)},Jc=t=>{if(t.vastUrl&&Ha.vastUrls.has(t.vastUrl))return!0;for(const e of[...t.audio||[],...t.video||[]])if(Ha.mediaSources.has(e.url))return!0;return!1},Qc=new Set,xb=t=>{[...t.audio||[],...t.video||[]].forEach(i=>Qc.add(i.url))},wb=t=>[...t.audio||[],...t.video||[]].some(i=>Qc.has(i.url)),Pb=({introsOutrosIndex:t,adverts:e,advertIndex:i,content:n=[],contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:p,errored:_}={})=>{var N;const k=e&&e[i];e:if(k){if(_){Ab(k);break e}if(p)return xb(k),-1;if(!p)return i}if(!((N=n[a])!=null&&N.adsEnabled)||t!==-1)return-1;const T=Lb({content:n,contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:p});let C=-1,U=-1/0,V=-1/0;for(const[Q,W]of e.entries()){if(wb(W)||Jc(W)||!T.has(W.placement))continue;const ue=Cb[W.type]||0;if(ue<U)continue;const ie=Math.random();ue===U&&ie<V||(C=Q,U=ue,V=ie)}return C},Cb={vast:1,custom:0},Lb=({content:t,contentIndex:e,currentTime:i,atTheStart:n,atTheEnd:a})=>{const l=e===0,g=e===t.length-1,p=t.length>1,_=p&&n&&!l,k=t[e].segments,T=k[k.length-1],C=p?null:Ob(k),U=k[C],V=U&&i>U.startTime,N=T?T.startTime+T.duration:0,Q=i>N-Rb,W=new Set;return n&&W.add("pre-roll"),V&&!Q&&W.add("mid-roll"),_&&W.add("mid-roll"),a&&g&&W.add("post-roll"),_&&W.add("post-roll"),W},Ib=2*60,Rb=10,Db=.5,Ob=t=>{const e=t[t.length-1];if(!e)return;const i=e.startTime+e.duration;if(i<Ib)return;const n=i/2,a=nl(t,i/2),p=t[a].startTime>=n-Db?a:a+1;if(p!==t.length)return p},Bb=(t,e,i,n)=>{let a=-1,l=-1/0,g=-1/0;for(const[p,_]of(n||[]).entries()){if(!t||Jc(_)||_.type==="vast")continue;const k=Nb(p,e,i);if(k<l)continue;const T=Mb[_.placement]||0;k===l&&T<g||(a=p,l=k,g=T)}return a},Mb={"pre-roll":2,"mid-roll":1},Nb=(t,e,i)=>t===i?2:t===e?1:0,$c={mediaSources:new Set},Fb=t=>{for(const e of[...t.audio||[],t.video||[]])$c.mediaSources.add(e.url)},Ub=t=>{for(const e of[...t.audio||[],t.video||[]])if($c.mediaSources.has(e.url))return!0;return!1},ed=new Set,Vb=t=>{[...t.audio||[],...t.video||[]].forEach(i=>ed.add(i.url))},Wb=t=>[...t.audio||[],...t.video||[]].some(i=>ed.has(i.url)),jb=({introsOutros:t=[],introsOutrosIndex:e,advertIndex:i,content:n,contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:p,errored:_})=>{const k=t[e];e:if(k){if(_){Fb(k);break e}if(p)return Vb(k),-1;if(!p)return e}if(i!==-1)return-1;const T=Gb({content:n,contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:p});let C=-1,U=-1/0,V=-1/0;for(const[N,Q]of t.entries()){if(Ub(Q)||!T.has(Q.placement))continue;const W=Wb(Q)?1:0;if(W<U)continue;const ue=Math.random();W===U&&ue<V||(C=N,U=W,V=ue)}return C},Gb=({content:t,contentIndex:e,currentTime:i,atTheStart:n,atTheEnd:a})=>{const l=new Set,g=n&&e===0&&i===0,p=a&&e===t.length-1;return g&&l.add("pre-roll"),p&&l.add("post-roll"),l},zb=t=>{if(!navigator.mediaSession)return;const e=t.instances().some(l=>l.mediaSession==="override");if(Yb()&&!e)return;let i,n=-1/0,a=-1/0;for(const l of t.instances()){if(l.mediaSession==="none")continue;const g=Hb[l.playbackState]||0;if(g<n)continue;const p=Kb[l.showMediaSession]||0;g===n&&p<a||(i=l,n=g,a=p)}for(const l of t.instances())l.showMediaSession=l===i;return i},Hb={playing:1,paused:0,stopped:0},Kb={true:1,false:0},Yb=()=>{const t=navigator.mediaSession.metadata;if(!t||navigator.mediaSession.setByPlayer)return!1;const{title:e,artist:i,album:n,artwork:a}=t;return e||i||n||(a==null?void 0:a.length)},qb=t=>{let e=!1,i,n=-1/0,a=-1/0;for(const l of t.instances()){if(!l.userInterface||l.widgetTarget||!cl(l.widgetStyle))continue;if(l.userInterface.isVisible){e=!0;continue}if(!(l.userInterface.relativeY<0))continue;const k=Xb[l.playbackState]||0;if(k<n)continue;const T=l.userInterface.absoluteY;k===n&&T<a||(i=l,n=k,a=T)}e&&n===0&&(i=null);for(const l of t.instances())l.showBottomWidget=l===i},Xb={playing:2,paused:1,stopped:0};class Zb{constructor(e,i){ht(this,To);ht(this,Eo);ht(this,va);ht(this,Ao);ht(this,xo);ht(this,Br);ht(this,vn);ht(this,lr);ht(this,wo);ht(this,ns);ht(this,mn);ht(this,Po);ht(this,ma);ht(this,Zr);ht(this,pa);ht(this,pn);ht(this,Li);ht(this,_n);ht(this,Jr);ht(this,Co);ht(this,Lo);ht(this,ss);ht(this,_a);ht(this,Io);ht(this,Ro);ht(this,Do);ht(this,Oo);this.player=e,this.PlayerClass=i,this.eventListeners={"<any>":{}}}addEventListener(e,i){e==="<any>"||this[`handle${e}`]||rr(`Cannot add listener for unknown event type '${e}'.`);const a=`listener-handle-${Ia()}`;return this.eventListeners[e]=this.eventListeners[e]||{},this.eventListeners[e][a]=i,a}removeEventListener(e,i){this.eventListeners[e]=this.eventListeners[e]||{},delete this.eventListeners[e][i]}processEvent(e){return an(this,null,function*(){yield Mc(()=>this.player),cg(e);const i=this[`handle${e.type}`],n=Qs(this.player);ce(this,To,bh).call(this,e)?e.status="ignored-due-to-advert":ce(this,Eo,Sh).call(this,e)?e.status="ignored-due-to-scrubbing":i?(yield i.call(this,e),ce(this,Co,xh).call(this),ce(this,Lo,wh).call(this),e.status="handled"):rr("No handler function for event.",e);const a=Qs(this.player);e.changedProps=Nc(n,a),e.processedAt=new Date().toISOString(),dg(e),ce(this,va,_u).call(this,e.type,e),ce(this,va,_u).call(this,"<any>",e)})}handlePressedChangeSpeed(){ce(this,Zr,qn).call(this,e=>e+1,{cycle:!0})}handlePressedEnterOnChangeSpeed(){ce(this,Zr,qn).call(this,e=>e+1,{cycle:!0})}handlePressedSpaceOnChangeSpeed(){ce(this,Zr,qn).call(this,e=>e+1,{cycle:!0})}handlePressedUpOnChangeSpeed(){ce(this,Zr,qn).call(this,e=>e+1)}handlePressedRightOnChangeSpeed(){ce(this,Zr,qn).call(this,e=>e+1)}handlePressedDownOnChangeSpeed(){ce(this,Zr,qn).call(this,e=>e-1)}handlePressedLeftOnChangeSpeed(){ce(this,Zr,qn).call(this,e=>e-1)}handlePressedPrevSegment(){ce(this,pa,bu).call(this,e=>e-1)}handlePressedNextSegment(){ce(this,pa,bu).call(this,e=>e+1)}handlePressedSeekBack({seconds:e}){ce(this,Li,ir).call(this,i=>i-e)}handlePressedSeekAhead({seconds:e}){ce(this,Li,ir).call(this,i=>i+e)}handlePressedPrevTrack(){ce(this,pn,fs).call(this,e=>e-1)}handlePressedNextTrack(){ce(this,pn,fs).call(this,e=>e+1)}handlePressedAdvertLink(){}handlePressedAdvertButton(){}handlePressedAdvertImage(){}handlePressedAdvertVideo(){}handlePressedBeyondWords(){}handlePressedSourceUrl(){}handleDurationUpdated(){}handleMediaLoaded({loadedMedia:e}){this.player.loadedMedia=e}handleCurrentTimeUpdated(){!this.midrollPlayed&&ce(this,Jr,Xn).call(this)}handlePlaybackPaused(){}handlePlaybackRateUpdated(){}handleVisibilityChanged(){qb(this.PlayerClass)}handlePressedVideoBackground(){ce(this,mn,ds).call(this)}handlePressedEnterOnProgressBar(){ce(this,mn,ds).call(this)}handlePressedSpaceOnProgressBar(){ce(this,mn,ds).call(this)}handlePressedEnterOnProgressCircle(){ce(this,mn,ds).call(this)}handlePressedSpaceOnProgressCircle(){ce(this,mn,ds).call(this)}handlePressedLeftOnProgressBar(){ce(this,Li,ir).call(this,e=>e-5)}handlePressedRightOnProgressBar(){ce(this,Li,ir).call(this,e=>e+5)}handlePressedLeftOnProgressCircle(){ce(this,Li,ir).call(this,e=>e-5)}handlePressedRightOnProgressCircle(){ce(this,Li,ir).call(this,e=>e+5)}handlePressedProgressBar({ratio:e}){this.preScrubState=this.player.playbackState,ce(this,Po,Ah).call(this),ce(this,Li,ir).call(this,(i,n)=>e*n),e!==0&&(this.segmentPlayed=!0)}handleScrubbedProgressBar({ratio:e}){ce(this,Li,ir).call(this,(i,n)=>e*n),e!==0&&(this.segmentPlayed=!0)}handleFinishedScrubbingProgressBar(){this.player.playbackState=this.preScrubState,delete this.preScrubState}handleIdentifiersChanged(){Yc(this.player).then(()=>{ce(this,_n,hs).call(this,{atTheStart:!0}),ce(this,Jr,Xn).call(this,{atTheStart:!0})})}handleNoContentAvailable({description:e}){console.warn(`BeyondWords.Player: ${e}`)}handlePressedPlay({emittedFrom:e,widgetSegment:i,widgetIsCurrent:n}){e==="segment-widget"&&!n?ce(this,ma,yu).call(this,i):this.player.playbackState="playing"}handlePressedPause(){this.player.playbackState="paused"}handlePlaybackPlaying(){this.PlayerClass.instances().filter(n=>n!==this.player).filter(n=>n.playbackState==="playing").forEach(n=>n.playbackState="paused"),zb(this.PlayerClass)}handlePlaybackEnded(){ce(this,wo,Eh).call(this)&&(this.midrollPlayed=!0),this.segmentPlayed=!1;const e=ce(this,Br,Pn).call(this),i=ce(this,lr,Ir).call(this);ce(this,Jr,Xn).call(this,{atTheEnd:!0,wasIntro:e}),!i&&(ce(this,_n,hs).call(this,{atTheEnd:!0}),!e&&(ce(this,vn,cs).call(this)||ce(this,lr,Ir).call(this)||ce(this,pn,fs).call(this,n=>n+1)))}handlePlaybackNotAllowed({description:e}){console.warn(`BeyondWords.Player: ${e}`);const i=this.player.contentIndex===0&&this.player.currentTime===0;this.player.playbackState=i?"stopped":"paused"}handlePlaybackErrored({mediaType:e,errorMessage:i}){console.warn(`BeyondWords.Player: ${e} playback error: ${i}`),ce(this,Br,Pn).call(this)||ce(this,vn,cs).call(this)?ce(this,_n,hs).call(this,{errored:!0}):ce(this,lr,Ir).call(this)?ce(this,Jr,Xn).call(this,{errored:!0}):this.handlePlaybackEnded()}handlePressedMaximize(){sc()?ty():ey(this.player.target)}handleFullScreenModeUpdated(){const e=sc()===this.player.target,i=e?"add":"remove";this.player.isFullScreen=e,this.player.target.classList[i]("maximized")}handlePressedPlaylistItem({index:e}){ce(this,pn,fs).call(this,()=>e),this.player.playbackState="playing"}handlePressedTogglePlaylist(){const e=this.player.playlistStyle.split("-"),i=this.player.content.length>1,n=e[0]==="show"||e[0]==="auto"&&i;e[0]=n?"hide":"show",this.player.playlistStyle=e.join("-")}handlePressedDownload({contentIndex:e,audioIndex:i,videoIndex:n}){var T,C;const a=this.player.content[e],l=(T=a.audio)==null?void 0:T[i],g=(C=a.video)==null?void 0:C[n],p=(l||g).url,_=p.split(".").pop(),k=`${a.title}.${_}`;return Eb(p,k)}handlePressedCloseWidget(){for(const e of this.PlayerClass.instances())e.playbackState="paused",e.widgetStyle="closed-by-user"}handleContentStatusChanged({contentId:e,legacyId:i,sourceId:n,sourceUrl:a,contentStatus:l}){l==="processed"&&this.player.playbackState==="stopped"&&this.player.contentIndex===0&&this.player.currentTime===0&&ce(this,Do,Lh).call(this,{contentId:e,legacyId:i,sourceId:n,sourceUrl:a})&&Yc(this.player).then(()=>{ce(this,_n,hs).call(this,{atTheStart:!0}),ce(this,Jr,Xn).call(this,{atTheStart:!0})})}handleCurrentSegmentUpdated({segment:e,segmentIndex:i,contentIndex:n}){var a;ce(this,ns,Ta).call(this)?this.player.currentSegment=ni(de({},e),{segmentIndex:i,contentIndex:n}):this.segmentPlayed||((a=this.player.segmentContainers)==null||a.reset(),this.player.currentSegment=null)}handleHoveredSegmentUpdated({segment:e,segmentIndex:i,contentIndex:n}){e?this.player.hoveredSegment=ni(de({},e),{segmentIndex:i,contentIndex:n}):this.player.hoveredSegment=null}handlePressedSegment({segment:e,segmentIndex:i,contentIndex:n}){if(!Js("hovered",e,this.player.clickableSections))return;if(!ce(this,Oo,Ih).call(this,{contentIndex:n,segmentIndex:i})&&!ce(this,lr,Ir).call(this)){ce(this,mn,ds).call(this);return}n!==this.player.contentIndex&&ce(this,pn,fs).call(this,()=>n),ce(this,ma,yu).call(this,de({segmentIndex:i,contentIndex:n},e))}}To=new WeakSet,bh=function({type:e}){return ce(this,lr,Ir).call(this)&&(e.includes("ChangeSpeed")||e.includes("PrevSegment")||e.includes("NextSegment")||e.includes("SeekBack")||e.includes("SeekAhead")||e.includes("Progress")&&!e.includes("Space")&&!e.includes("Enter"))},Eo=new WeakSet,Sh=function({type:e}){return this.preScrubState&&(e.includes("CurrentTimeUpdated")||e.includes("PlaybackEnded"))},va=new WeakSet,_u=function(e,i){const n=this.eventListeners[e]||{};Object.values(n).forEach(a=>a(i))},Ao=new WeakSet,kh=function(){return this.player.introsOutros.some(e=>e.placement==="pre-roll")},xo=new WeakSet,Th=function(){return this.player.introsOutros.some(e=>e.placement==="post-roll")},Br=new WeakSet,Pn=function(e=this.player.introsOutrosIndex){var i,n,a;return((a=(n=(i=this.player)==null?void 0:i.introsOutros)==null?void 0:n[e])==null?void 0:a.placement)==="pre-roll"},vn=new WeakSet,cs=function(e=this.player.introsOutrosIndex){var i,n,a;return((a=(n=(i=this.player)==null?void 0:i.introsOutros)==null?void 0:n[e])==null?void 0:a.placement)==="post-roll"},lr=new WeakSet,Ir=function(){return this.player.advertIndex!==-1},wo=new WeakSet,Eh=function(){var e;return((e=this.player.adverts[this.player.advertIndex])==null?void 0:e.placement)==="mid-roll"},ns=new WeakSet,Ta=function(){return!ce(this,Br,Pn).call(this)&&!ce(this,vn,cs).call(this)&&!ce(this,lr,Ir).call(this)},mn=new WeakSet,ds=function(){this.player.playbackState==="playing"?this.player.playbackState="paused":this.player.playbackState="playing"},Po=new WeakSet,Ah=function(){this.player.playbackState==="playing"&&(this.player.playbackState="paused")},ma=new WeakSet,yu=function(a){var l=a,{segmentIndex:e,contentIndex:i}=l,n=vu(l,["segmentIndex","contentIndex"]);ce(this,Li,ir).call(this,()=>n.startTime,i),this.player.currentSegment=de({segmentIndex:e,contentIndex:i},n),this.player.playbackState="playing",this.segmentPlayed=!0},Zr=new WeakSet,qn=function(e,{cycle:i}={}){const n=[.5,.6,.7,.8,.9,1,1.1,1.2,1.3,1.4,1.5,2,2.5,3],a=n.length-1,l=n.indexOf(this.player.playbackRate),g=e(l);let p;i?p=g%n.length:p=Math.max(0,Math.min(a,g)),this.player.playbackRate=n[p]||1},pa=new WeakSet,bu=function(e){const i=this.player.content[this.player.contentIndex].segments,n=nl(i,this.player.currentTime),a=e(n);ce(this,Br,Pn).call(this)&&a>=0?this.handlePlaybackEnded():ce(this,vn,cs).call(this)&&a<0?(ce(this,ss,Ea).call(this,-1),ce(this,Li,ir).call(this,()=>{var l;return((l=i[i.length-1])==null?void 0:l.startTime)||.01}),this.player.playbackState="playing"):ce(this,ns,Ta).call(this)&&a<0&&ce(this,Ao,kh).call(this)?(ce(this,Li,ir).call(this,()=>0),ce(this,_n,hs).call(this,{atTheStart:!0})):ce(this,ns,Ta).call(this)&&a===i.length&&ce(this,xo,Th).call(this)?ce(this,Li,ir).call(this,()=>this.player.duration-.01):ce(this,ns,Ta).call(this)&&a>=0&&a<i.length&&ce(this,Li,ir).call(this,()=>i[a].startTime)},pn=new WeakSet,fs=function(e){const i=e(this.player.contentIndex),n=i<0||i>=this.player.content.length;n?(this.player.playbackState="stopped",ce(this,Li,ir).call(this,()=>0)):(this.player.contentIndex=i,ce(this,lr,Ir).call(this)||(ce(this,Li,ir).call(this,()=>0),this.midrollPlayed=!1)),ce(this,ss,Ea).call(this,-1),ce(this,_n,hs).call(this,{atTheStart:!0}),n||ce(this,Jr,Xn).call(this,{atTheStart:!0})},Li=new WeakSet,ir=function(e,i){if(ce(this,lr,Ir).call(this))this.prevTime=e(),this.prevContent=i;else{const n=this.player.duration||0;this.player.currentTime=e(this.player.currentTime,n)}},_n=new WeakSet,hs=function({atTheStart:e,atTheEnd:i,errored:n}={}){const{content:a,introsOutros:l,currentTime:g}=this.player,p=typeof this.nextIntroOutro!="undefined"?this.nextIntroOutro:this.player.introsOutrosIndex,_=typeof this.nextAdvert!="undefined"?this.nextAdvert:this.player.advertIndex,k=typeof this.prevContent!="undefined"?this.prevContent:this.player.contentIndex;ce(this,ss,Ea).call(this,jb({introsOutros:l,introsOutrosIndex:p,advertIndex:_,content:a,contentIndex:k,currentTime:g,atTheStart:e,atTheEnd:i,errored:n}))},Jr=new WeakSet,Xn=function({atTheStart:e,atTheEnd:i,wasIntro:n,errored:a}={}){const{adverts:l,content:g,currentTime:p}=this.player;let _=typeof this.nextIntroOutro!="undefined"?this.nextIntroOutro:this.player.introsOutrosIndex;const k=typeof this.nextAdvert!="undefined"?this.nextAdvert:this.player.advertIndex,T=typeof this.prevContent!="undefined"?this.prevContent:this.player.contentIndex;n&&(e=!0,i=!1,_=-1),ce(this,_a,Su).call(this,Pb({introsOutrosIndex:_,adverts:l,advertIndex:k,content:g,contentIndex:T,currentTime:p,atTheStart:e,atTheEnd:i,errored:a}));const C=this.player.persistentAdImage,U=this.player.persistentIndex;this.player.persistentIndex=Bb(C,U,k,l)},Co=new WeakSet,xh=function(){this.player.playbackState==="playing"&&typeof this.nextIntroOutro!="undefined"&&(ce(this,ss,Ea).call(this,this.nextIntroOutro),delete this.nextIntroOutro)},Lo=new WeakSet,wh=function(){this.player.playbackState==="playing"&&typeof this.nextAdvert!="undefined"&&(ce(this,_a,Su).call(this,this.nextAdvert),delete this.nextAdvert)},ss=new WeakSet,Ea=function(e){if(this.player.playbackState!=="playing"&&e!==-1){this.nextIntroOutro=e;return}else delete this.nextIntroOutro;if(!(this.player.contentIndex===0&&this.player.currentTime===0)&&ce(this,Br,Pn).call(this,e)){this.player.introsOutrosIndex=-1,ce(this,Jr,Xn).call(this,{atTheStart:!0});return}const l=ce(this,Br,Pn).call(this),g=ce(this,vn,cs).call(this);this.player.introsOutrosIndex=e;const p=l&&!ce(this,Br,Pn).call(this),_=g&&!ce(this,vn,cs).call(this);p&&(this.player.currentTime=0),_&&ce(this,pn,fs).call(this,()=>1/0)},_a=new WeakSet,Su=function(e){if(this.player.playbackState!=="playing"&&e!==-1){this.nextAdvert=e;return}else delete this.nextAdvert;const n=ce(this,lr,Ir).call(this);this.player.advertIndex=e;const a=!n&&ce(this,lr,Ir).call(this),l=n&&!ce(this,lr,Ir).call(this);a&&ce(this,Io,Ph).call(this),l&&ce(this,Ro,Ch).call(this)},Io=new WeakSet,Ph=function(){ce(this,Br,Pn).call(this)||(this.prevTime=this.player.currentTime),this.prevRate=this.player.playbackRate,this.prevContent=this.player.contentIndex,this.player.currentTime=0,this.player.playbackRate=1},Ro=new WeakSet,Ch=function(){this.player.playbackRate=this.prevRate||1,this.player.contentIndex!==this.prevContent||(this.player.currentTime=this.prevTime),delete this.prevTime,delete this.prevRate,delete this.prevContent},Do=new WeakSet,Lh=function({contentId:e,legacyId:i,sourceId:n,sourceUrl:a}){var l,g,p,_;return this.player.contentId===e||this.player.contentId===i||this.player.sourceId===n||this.player.sourceUrl===a||((l=this.player.playlist)==null?void 0:l.some(k=>k.contentId===e))||((g=this.player.playlist)==null?void 0:g.some(k=>k.contentId===i))||((p=this.player.playlist)==null?void 0:p.some(k=>k.sourceId===n))||((_=this.player.playlist)==null?void 0:_.some(k=>k.sourceUrl===a))},Oo=new WeakSet,Ih=function({contentIndex:e,segmentIndex:i}){var n,a;return((n=this.player.currentSegment)==null?void 0:n.contentIndex)!==e||((a=this.player.currentSegment)==null?void 0:a.segmentIndex)!==i};var ea="<unknown>";function td(t){var e=t.split(`
|
|
71
|
+
gtag("js", new Date());`,e.async=!0,Rr(e.src,i="https://www.googletagmanager.com/gtag/js?id="+t[0])||Cc(e,"src",i)},m(l,g){se(l,e,g),se(l,n,g),se(l,a,g)},p(l,g){g&1&&!Rr(e.src,i="https://www.googletagmanager.com/gtag/js?id="+l[0])&&Cc(e,"src",i)},d(l){l&&te(e),l&&te(n),l&&te(a)}}}function Gy(t){let e,i=!t[1]&&Lc(t);return{c(){i&&i.c(),e=Zn()},m(n,a){i&&i.m(document.head,null),I(document.head,e)},p(n,[a]){n[1]?i&&(i.d(1),i=null):i?i.p(n,a):(i=Lc(n),i.c(),i.m(e.parentNode,e))},i:oe,o:oe,d(n){i&&i.d(n),te(e)}}}function zy(t,e,i){let n,{analyticsTag:a}=e;return t.$$set=l=>{"analyticsTag"in l&&i(0,a=l.analyticsTag)},i(1,n=window.gtag),[a,n]}class Hy extends tt{constructor(e){super(),et(this,e,zy,Gy,Ye,{analyticsTag:0})}get analyticsTag(){return this.$$.ctx[0]}set analyticsTag(e){this.$$set({analyticsTag:e}),w()}}const J6="";class Ky extends tt{constructor(e){super(),et(this,e,null,null,Ye,{})}}class hl{constructor(e,i){ht(this,da);ht(this,vo);this.onSelected=e,this.onDeselected=i,this.consumers={}}addInterest(e,i,...n){var l;(l=this.consumers)[e]||(l[e]=[]);const a=this.consumers[e].slice(-1)[0];this.consumers[e].push({consumerId:i,args:n}),!(a&&ce(this,da,pu).call(this,n,a.args))&&(a&&this.onDeselected(e,...a.args),this.onSelected(e,...n))}removeInterest(e,i){var g;(g=this.consumers)[e]||(g[e]=[]);const n=this.consumers[e].slice(-1)[0];if(ce(this,vo,fh).call(this,this.consumers[e],p=>p.consumerId===i),!(n&&i===n.consumerId))return;const l=this.consumers[e].slice(-1)[0];l&&ce(this,da,pu).call(this,n.args,l.args)||(this.onDeselected(e,...n.args),l&&this.onSelected(e,...l.args))}}da=new WeakSet,pu=function(e,i){return e.length===i.length&&e.every((n,a)=>n===i[a])},vo=new WeakSet,fh=function(e,i){for(let n=e.length-1;n>=0;n-=1)if(i(e[n])){e.splice(n,1);return}};const Js=(t,e,i)=>{let[n,a]=i.split("-");n||(n="none"),a||(a=n);const l=t==="current"?n:a;return l==="all"||l==="body"&&(e==null?void 0:e.section)==="body"},On="data-beyondwords-marker",Ic=t=>["beyondwords-highlight","bwp",`marker-${t}`],fn=class fn{update(e,i,n,a){const l=Js(e,i,n),g=this[`prev${e}`],p=l?i==null?void 0:i.marker:null;p&&jr(fn,fa).addInterest(p,this,a),g&&jr(fn,fa).removeInterest(g,this),this[`prev${e}`]=p}};fa=new WeakMap,mo=new WeakSet,hh=function(e,i){const n=document.querySelectorAll(`[${On}="${e}"]`);for(const a of n){const l=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1);let g;for(;g=l.nextNode();){if(/^\s*$/.test(g.nodeValue))continue;g.parentNode.nodeName.toLowerCase()==="a"&&(g=g.parentNode);const k=document.createElement("mark");k.classList.add(...Ic(e)),k.style.background=i,g.parentNode.insertBefore(k,g),k.appendChild(g)}}},po=new WeakSet,gh=function(e){const i=document.querySelectorAll(`[${On}="${e}"]`);for(const n of i){const a=n.querySelectorAll(`mark.${Ic(e)}`);for(const l of a)for(const g of l.childNodes)l.parentNode.insertBefore(g,l),l.remove()}},ht(fn,mo),ht(fn,po),ht(fn,fa,new hl(ce(fn,mo,hh),ce(fn,po,gh)));let gl=fn;const Rc=["beyondwords-clickable","bwp"],hn=class hn{update(e,i){const n=Js("hovered",e,i),a=this.previous,l=n?e==null?void 0:e.marker:null;l&&jr(hn,ha).addInterest(l,this),a&&jr(hn,ha).removeInterest(a,this),this.previous=l}};ha=new WeakMap,_o=new WeakSet,vh=function(e){const i=document.querySelectorAll(`[${On}="${e}"]`);for(const n of i)n.classList.add(...Rc)},yo=new WeakSet,mh=function(e){const i=document.querySelectorAll(`[${On}="${e}"]`);for(const n of i)Dc(n,Rc)},ht(hn,_o),ht(hn,yo),ht(hn,ha,new hl(ce(hn,_o,vh),ce(hn,yo,mh)));let vl=hn;const Dc=(t,e)=>{if(!t)return;const a=[...t.classList].filter(l=>!e.includes(l)).some(l=>l.startsWith("beyondwords-"))?e.filter(l=>l!=="bwp"):e;t.classList.remove(...a)},Oc=(t,e,i)=>["beyondwords-widget","bwp",`marker-${t}`,`position-${e}`,`for-${i}-player`],Bc=["beyondwords-relative","bwp"],gn=class gn{constructor(e){this.onUpdate=e,this.containers=[]}update(e,i,n,a){const l=i.includes("all")||i.includes("body"),g=this.previous,p=(e==null?void 0:e.marker)||l&&(g==null?void 0:g.marker);p&&jr(gn,ga).addInterest(p,this,this,n,a),g&&jr(gn,ga).removeInterest(g,this),this.previous=p}reset(){this.update(null,"none")}};ga=new WeakMap,bo=new WeakSet,ph=function(e,i,n,a){const l=document.querySelector(`[${On}="${e}"]`),g=document.createElement("div");["2-oclock","3-oclock","4-oclock","8-oclock","9-oclock","10-oclock"].includes(n)&&l.classList.add(...Bc),g.classList.add(...Oc(e,n,a)),["11-oclock","12-oclock","1-oclock"].includes(n)?l.insertBefore(g,l.firstChild):l.appendChild(g),i.containers.push(g),i.onUpdate(i.containers)},So=new WeakSet,_h=function(e,i,n,a){const l=Oc(e,n,a);for(let g=0;g<i.containers.length;g+=1){if(!l.every(k=>i.containers[g].classList.contains(k)))continue;const _=i.containers[g].parentNode;Dc(_,Bc),i.containers[g].remove(),i.containers.splice(g,1),g-=1}i.onUpdate(i.containers)},ht(gn,bo),ht(gn,So),ht(gn,ga,new hl(ce(gn,bo,ph),ce(gn,So,_h)));let ml=gn;const Yy=()=>qe({type:"IdentifiersChanged",description:"The Player's content identifiers changed.",initiatedBy:"browser"}),Qn=(i,...n)=>an(this,[i,...n],function*(t,e={}){const a=yield fetch(t,e).catch(()=>{}),l=yield a==null?void 0:a.json().catch(()=>{});return(a==null?void 0:a.status)!==200&&rr(`Failed to fetch ${t}`,ni(de({},e),{responseStatus:a==null?void 0:a.status,responseJson:l})),l}),qy=(t,e)=>Qn(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e,(i,n)=>n===void 0?null:n)});class Xy{constructor(e,i,n){ht(this,ko);this.baseUrl=ce(this,ko,yh).call(this,e),this.projectId=i,this.writeToken=n}getWebSocketToken(){return an(this,null,function*(){const e={Authorization:`Token token=${this.writeToken}`},{token:i}=yield Qn(`https://${this.baseUrl}/api/v4/token/ws`,{headers:e});this.webSocketToken=i})}establishConnection(e,i){return an(this,null,function*(){const n=`wss://${this.baseUrl}/cable?token=${this.webSocketToken}`,a="actioncable-v1-json";this.webSocket=new WebSocket(n,a),this.webSocket.onmessage=l=>e(JSON.parse(l.data)),this.webSocket.onerror=i,yield new Promise(l=>this.webSocket.onopen=l)})}subscribeToStatusChanges(){const e=JSON.stringify({channel:"Api::V1::ProjectChannel",id:this.projectId}),i=JSON.stringify({command:"subscribe",identifier:e});this.webSocket.send(i)}destroy(){this.webSocketToken=null,this.webSocket&&(this.webSocket.onmessage=()=>{},this.webSocket.onerror=()=>{},this.webSocket.close(),this.webSocket=null)}}ko=new WeakSet,yh=function(e){return e.includes("staging")?"app.staging-beyondwords.io":"app.beyondwords.io"};let $n;const Zy=(t,e,i,n)=>an(this,null,function*(){!t||!e||!i||($n==null||$n.destroy(),$n=new Xy(t,e,i),yield $n.getWebSocketToken(),yield $n.establishConnection(Jy(n),eb),yield $n.subscribeToStatusChanges())}),Jy=t=>e=>{var a,l;((l=(a=e==null?void 0:e.message)==null?void 0:a.result)==null?void 0:l.action)==="podcast_state_updated"&&Qy(e,t),e.type==="reject_subscription"&&$y(e)},Qy=(t,e)=>{const i=t.message.result;e(qe({type:"ContentStatusChanged",description:"The processing status of a content item within the project changed.",initiatedBy:"websocket",contentId:i.content_id,legacyId:i.legacy_id,sourceId:i.source_id,sourceUrl:i.source_url,contentStatus:i.state}))},$y=t=>{rr("The WebSocket status change subscription was rejected.",{webSocketEvent:t})},eb=t=>{rr("Unexpected WebSocket error.",{error:t})},Mc=t=>{if(!t())return new Promise(e=>{setInterval(()=>t()&&e(),10)})},Qs=t=>{const i=Object.keys(t.$$.props).filter(n=>!tb.has(n)).map(n=>[n,t[n]]);return Object.fromEntries(i)},tb=new Set(["addEventListener","removeEventListener","mediaElement","userInterface","widgetInterface","controller"]),Nc=(t,e)=>{const i=new Set([...Object.keys(t),...Object.keys(e)]),n={};for(const a of i){const l=t[a],g=e[a];l!==g&&(n[a]={previousValue:l,currentValue:g})}return n};let $s=-1;const Fc=[],ib=(t,e,i)=>an(this,null,function*(){yield Mc(()=>e.player);const n=e.player,a=rb(n.contentIndex,i,t);a>$s&&nb(n,$s,a,t),a<$s&&sb(n,$s,a),$s=a}),rb=(t,e,i)=>{const n=i.findIndex(l=>l[0]===t&&l[1]>e||l[0]>t);return n===-1?i.length-1:n-1},nb=(t,e,i,n)=>{for(let a=e+1;a<=i;a+=1){const l=Qs(t);n[a][2](t);const g=Qs(t),p=Nc(l,g);Fc.push(p)}},sb=(t,e,i)=>{for(let n=e;n>i;n-=1){const a=Fc.pop();for(const[l,g]of Object.entries(a))t[l]=g.previousValue}},ab=t=>t?ob(t)?{newTarget:ub(t),showUserInterface:!0}:typeof t=="string"?{newTarget:pl(t),showUserInterface:!0}:{newTarget:t,showUserInterface:!0}:{newTarget:lb(),showUserInterface:!1},ob=t=>typeof t=="object"&&t.nodeName.toLowerCase()==="script",lb=()=>{const t=document.createElement("div");return document.body.appendChild(t),t},ub=t=>{const e=document.createElement("div");return t.parentNode.insertBefore(e,t.nextSibling),e},pl=(t,e="player")=>{if(typeof t!="string")return t;const i=document.querySelectorAll(t);return i.length===0&&rr(`Failed to initialize ${e} because the target could not be found.`,{target:t,elements:i}),i.length>1&&rr(`Failed to initialize ${e} because the target is ambiguous. (${i.length} elements match)`,{target:t,elements:i}),i[0]};function Uc(t,e,i){const n=t.slice();return n[139]=e[i],n}function Vc(t){let e,i,n={onEvent:t[53],playerStyle:t[59],callToAction:t[23],skipButtonStyle:t[24],playlistStyle:t[25],playlistToggle:t[26],downloadFormats:t[47],playerTitle:t[22],content:t[48],contentIndex:t[7],duration:t[29],currentTime:t[11],playbackState:t[30],playbackRate:t[31],activeAdvert:t[56],persistentAdvert:t[62],textColor:t[34],backgroundColor:t[35],iconColor:t[36],logoIconEnabled:t[37],videoIsBehind:t[61]};return e=new dl({props:n}),t[92](e),{c(){He(e.$$.fragment)},m(a,l){Ge(e,a,l),i=!0},p(a,l){const g={};l[1]&268435456&&(g.playerStyle=a[59]),l[0]&8388608&&(g.callToAction=a[23]),l[0]&16777216&&(g.skipButtonStyle=a[24]),l[0]&33554432&&(g.playlistStyle=a[25]),l[0]&67108864&&(g.playlistToggle=a[26]),l[1]&65536&&(g.downloadFormats=a[47]),l[0]&4194304&&(g.playerTitle=a[22]),l[1]&131072&&(g.content=a[48]),l[0]&128&&(g.contentIndex=a[7]),l[0]&536870912&&(g.duration=a[29]),l[0]&2048&&(g.currentTime=a[11]),l[0]&1073741824&&(g.playbackState=a[30]),l[1]&1&&(g.playbackRate=a[31]),l[1]&33554432&&(g.activeAdvert=a[56]),l[2]&1&&(g.persistentAdvert=a[62]),l[1]&8&&(g.textColor=a[34]),l[1]&16&&(g.backgroundColor=a[35]),l[1]&32&&(g.iconColor=a[36]),l[1]&64&&(g.logoIconEnabled=a[37]),l[1]&1073741824&&(g.videoIsBehind=a[61]),e.$set(g)},i(a){i||(J(e.$$.fragment,a),i=!0)},o(a){ae(e.$$.fragment,a),i=!1},d(a){t[92](null),ze(e,a)}}}function Wc(t){let e,i;return e=new fl({props:{root:t[13],$$slots:{default:[cb]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&8192&&(l.root=n[13]),a[0]&1639987328|a[1]&167977087|a[2]&1|a[4]&262144&&(l.$$scope={dirty:a,ctx:n}),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function cb(t){let e,i,n={onEvent:t[53],playerStyle:t[12],callToAction:t[23],skipButtonStyle:t[24],playlistStyle:"hide",playlistToggle:"hide",downloadFormats:t[47],playerTitle:t[22],fixedPosition:!t[13]&&t[32],fixedWidth:t[33],content:t[48],contentIndex:t[7],duration:t[29],currentTime:t[11],playbackState:t[30],playbackRate:t[31],activeAdvert:t[56],persistentAdvert:t[62],textColor:t[34],backgroundColor:t[35],iconColor:t[36],logoIconEnabled:t[37],videoIsBehind:t[58]};return e=new dl({props:n}),t[93](e),{c(){He(e.$$.fragment)},m(a,l){Ge(e,a,l),i=!0},p(a,l){const g={};l[0]&4096&&(g.playerStyle=a[12]),l[0]&8388608&&(g.callToAction=a[23]),l[0]&16777216&&(g.skipButtonStyle=a[24]),l[1]&65536&&(g.downloadFormats=a[47]),l[0]&4194304&&(g.playerTitle=a[22]),l[0]&8192|l[1]&2&&(g.fixedPosition=!a[13]&&a[32]),l[1]&4&&(g.fixedWidth=a[33]),l[1]&131072&&(g.content=a[48]),l[0]&128&&(g.contentIndex=a[7]),l[0]&536870912&&(g.duration=a[29]),l[0]&2048&&(g.currentTime=a[11]),l[0]&1073741824&&(g.playbackState=a[30]),l[1]&1&&(g.playbackRate=a[31]),l[1]&33554432&&(g.activeAdvert=a[56]),l[2]&1&&(g.persistentAdvert=a[62]),l[1]&8&&(g.textColor=a[34]),l[1]&16&&(g.backgroundColor=a[35]),l[1]&32&&(g.iconColor=a[36]),l[1]&64&&(g.logoIconEnabled=a[37]),l[1]&134217728&&(g.videoIsBehind=a[58]),e.$set(g)},i(a){i||(J(e.$$.fragment,a),i=!0)},o(a){ae(e.$$.fragment,a),i=!1},d(a){t[93](null),ze(e,a)}}}function db(t){let e,i;return e=new dl({props:{onEvent:t[94],playerStyle:"small",fixedWidth:0,logoIconEnabled:!1,content:t[48],contentIndex:t[7],duration:t[29],currentTime:t[60]?t[11]:t[54].startTime,playbackState:t[60]?t[30]:"paused",activeAdvert:t[56],persistentAdvert:t[62],textColor:t[34],backgroundColor:t[35],iconColor:t[36]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[1]&75497472&&(l.onEvent=n[94]),a[1]&131072&&(l.content=n[48]),a[0]&128&&(l.contentIndex=n[7]),a[0]&536870912&&(l.duration=n[29]),a[0]&2048|a[1]&545259520&&(l.currentTime=n[60]?n[11]:n[54].startTime),a[0]&1073741824|a[1]&536870912&&(l.playbackState=n[60]?n[30]:"paused"),a[1]&33554432&&(l.activeAdvert=n[56]),a[2]&1&&(l.persistentAdvert=n[62]),a[1]&8&&(l.textColor=n[34]),a[1]&16&&(l.backgroundColor=n[35]),a[1]&32&&(l.iconColor=n[36]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function jc(t,e){let i,n,a;return n=new fl({props:{root:e[139],$$slots:{default:[db]},$$scope:{ctx:e}}}),{key:t,first:null,c(){i=Zn(),He(n.$$.fragment),this.first=i},m(l,g){se(l,i,g),Ge(n,l,g),a=!0},p(l,g){e=l;const p={};g[1]&32768&&(p.root=e[139]),g[0]&1610614912|g[1]&646053944|g[2]&1|g[4]&262144&&(p.$$scope={dirty:g,ctx:e}),n.$set(p)},i(l){a||(J(n.$$.fragment,l),a=!0)},o(l){ae(n.$$.fragment,l),a=!1},d(l){l&&te(i),ze(n,l)}}}function Gc(t){let e,i;return e=new fl({props:{root:t[21],$$slots:{default:[fb]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[0]&2097152&&(l.root=n[21]),a[0]&2145386495|a[1]&919551|a[4]&262144&&(l.$$scope={dirty:a,ctx:n}),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function fb(t){let e,i,n,a,l,g,p,_,k,T,C,U,V,N,Q,W,ue,ie,be,Se,fe,pe,Z,L,le,z,Ke,Ie,Ee,ke,G,X,B,Ue,De,q,ve,at,Qe,Et,Oe,Te,it;function xt(Y){t[95](Y)}function wt(Y){t[96](Y)}function Xt(Y){t[97](Y)}function Pt(Y){t[98](Y)}function Ht(Y){t[99](Y)}function yt(Y){t[100](Y)}function ft(Y){t[101](Y)}function Nt(Y){t[102](Y)}function mt(Y){t[103](Y)}function bt(Y){t[104](Y)}function Zt(Y){t[105](Y)}function Rt(Y){t[106](Y)}function Jt(Y){t[107](Y)}function nt(Y){t[108](Y)}function ot(Y){t[109](Y)}function li(Y){t[110](Y)}function Ae(Y){t[111](Y)}function Dt(Y){t[112](Y)}function Ft(Y){t[113](Y)}function Ot(Y){t[114](Y)}function Ut(Y){t[115](Y)}function jt(Y){t[116](Y)}function ci(Y){t[117](Y)}function Kt(Y){t[118](Y)}function Yt(Y){t[119](Y)}function mi(Y){t[120](Y)}function Vt(Y){t[121](Y)}function ct(Y){t[122](Y)}function di(Y){t[123](Y)}function Be(Y){t[124](Y)}function fi(Y){t[125](Y)}function Qt(Y){t[126](Y)}function Je(Y){t[127](Y)}function pi(Y){t[128](Y)}function me(Y){t[129](Y)}function $t(Y){t[130](Y)}function hi(Y){t[131](Y)}function _i(Y){t[132](Y)}function wi(Y){t[133](Y)}function yi(Y){t[134](Y)}function Ei(Y){t[135](Y)}let Fe={content:t[48],introsOutros:t[49],adverts:t[50]};return t[0]!==void 0&&(Fe.projectId=t[0]),t[1]!==void 0&&(Fe.contentId=t[1]),t[2]!==void 0&&(Fe.playlistId=t[2]),t[3]!==void 0&&(Fe.sourceId=t[3]),t[4]!==void 0&&(Fe.sourceUrl=t[4]),t[5]!==void 0&&(Fe.showUserInterface=t[5]),t[6]!==void 0&&(Fe.playerStyle=t[6]),t[22]!==void 0&&(Fe.playerTitle=t[22]),t[23]!==void 0&&(Fe.callToAction=t[23]),t[24]!==void 0&&(Fe.skipButtonStyle=t[24]),t[25]!==void 0&&(Fe.playlistStyle=t[25]),t[26]!==void 0&&(Fe.playlistToggle=t[26]),t[27]!==void 0&&(Fe.mediaSession=t[27]),t[7]!==void 0&&(Fe.contentIndex=t[7]),t[8]!==void 0&&(Fe.introsOutrosIndex=t[8]),t[9]!==void 0&&(Fe.advertIndex=t[9]),t[28]!==void 0&&(Fe.persistentAdImage=t[28]),t[10]!==void 0&&(Fe.persistentIndex=t[10]),t[29]!==void 0&&(Fe.duration=t[29]),t[11]!==void 0&&(Fe.currentTime=t[11]),t[30]!==void 0&&(Fe.playbackState=t[30]),t[31]!==void 0&&(Fe.playbackRate=t[31]),t[12]!==void 0&&(Fe.widgetStyle=t[12]),t[32]!==void 0&&(Fe.widgetPosition=t[32]),t[33]!==void 0&&(Fe.widgetWidth=t[33]),t[13]!==void 0&&(Fe.widgetTarget=t[13]),t[34]!==void 0&&(Fe.textColor=t[34]),t[35]!==void 0&&(Fe.backgroundColor=t[35]),t[36]!==void 0&&(Fe.iconColor=t[36]),t[14]!==void 0&&(Fe.highlightColor=t[14]),t[37]!==void 0&&(Fe.logoIconEnabled=t[37]),t[15]!==void 0&&(Fe.highlightSections=t[15]),t[16]!==void 0&&(Fe.clickableSections=t[16]),t[17]!==void 0&&(Fe.segmentWidgetSections=t[17]),t[18]!==void 0&&(Fe.segmentWidgetPosition=t[18]),t[19]!==void 0&&(Fe.currentSegment=t[19]),t[20]!==void 0&&(Fe.hoveredSegment=t[20]),t[38]!==void 0&&(Fe.advertConsent=t[38]),t[39]!==void 0&&(Fe.analyticsConsent=t[39]),t[40]!==void 0&&(Fe.analyticsCustomUrl=t[40]),t[41]!==void 0&&(Fe.analyticsTag=t[41]),e=new Py({props:Fe}),Ne.push(()=>Ze(e,"projectId",xt)),Ne.push(()=>Ze(e,"contentId",wt)),Ne.push(()=>Ze(e,"playlistId",Xt)),Ne.push(()=>Ze(e,"sourceId",Pt)),Ne.push(()=>Ze(e,"sourceUrl",Ht)),Ne.push(()=>Ze(e,"showUserInterface",yt)),Ne.push(()=>Ze(e,"playerStyle",ft)),Ne.push(()=>Ze(e,"playerTitle",Nt)),Ne.push(()=>Ze(e,"callToAction",mt)),Ne.push(()=>Ze(e,"skipButtonStyle",bt)),Ne.push(()=>Ze(e,"playlistStyle",Zt)),Ne.push(()=>Ze(e,"playlistToggle",Rt)),Ne.push(()=>Ze(e,"mediaSession",Jt)),Ne.push(()=>Ze(e,"contentIndex",nt)),Ne.push(()=>Ze(e,"introsOutrosIndex",ot)),Ne.push(()=>Ze(e,"advertIndex",li)),Ne.push(()=>Ze(e,"persistentAdImage",Ae)),Ne.push(()=>Ze(e,"persistentIndex",Dt)),Ne.push(()=>Ze(e,"duration",Ft)),Ne.push(()=>Ze(e,"currentTime",Ot)),Ne.push(()=>Ze(e,"playbackState",Ut)),Ne.push(()=>Ze(e,"playbackRate",jt)),Ne.push(()=>Ze(e,"widgetStyle",ci)),Ne.push(()=>Ze(e,"widgetPosition",Kt)),Ne.push(()=>Ze(e,"widgetWidth",Yt)),Ne.push(()=>Ze(e,"widgetTarget",mi)),Ne.push(()=>Ze(e,"textColor",Vt)),Ne.push(()=>Ze(e,"backgroundColor",ct)),Ne.push(()=>Ze(e,"iconColor",di)),Ne.push(()=>Ze(e,"highlightColor",Be)),Ne.push(()=>Ze(e,"logoIconEnabled",fi)),Ne.push(()=>Ze(e,"highlightSections",Qt)),Ne.push(()=>Ze(e,"clickableSections",Je)),Ne.push(()=>Ze(e,"segmentWidgetSections",pi)),Ne.push(()=>Ze(e,"segmentWidgetPosition",me)),Ne.push(()=>Ze(e,"currentSegment",$t)),Ne.push(()=>Ze(e,"hoveredSegment",hi)),Ne.push(()=>Ze(e,"advertConsent",_i)),Ne.push(()=>Ze(e,"analyticsConsent",wi)),Ne.push(()=>Ze(e,"analyticsCustomUrl",yi)),Ne.push(()=>Ze(e,"analyticsTag",Ei)),{c(){He(e.$$.fragment)},m(Y,$){Ge(e,Y,$),it=!0},p(Y,$){const Me={};$[1]&131072&&(Me.content=Y[48]),$[1]&262144&&(Me.introsOutros=Y[49]),$[1]&524288&&(Me.adverts=Y[50]),!i&&$[0]&1&&(i=!0,Me.projectId=Y[0],Xe(()=>i=!1)),!n&&$[0]&2&&(n=!0,Me.contentId=Y[1],Xe(()=>n=!1)),!a&&$[0]&4&&(a=!0,Me.playlistId=Y[2],Xe(()=>a=!1)),!l&&$[0]&8&&(l=!0,Me.sourceId=Y[3],Xe(()=>l=!1)),!g&&$[0]&16&&(g=!0,Me.sourceUrl=Y[4],Xe(()=>g=!1)),!p&&$[0]&32&&(p=!0,Me.showUserInterface=Y[5],Xe(()=>p=!1)),!_&&$[0]&64&&(_=!0,Me.playerStyle=Y[6],Xe(()=>_=!1)),!k&&$[0]&4194304&&(k=!0,Me.playerTitle=Y[22],Xe(()=>k=!1)),!T&&$[0]&8388608&&(T=!0,Me.callToAction=Y[23],Xe(()=>T=!1)),!C&&$[0]&16777216&&(C=!0,Me.skipButtonStyle=Y[24],Xe(()=>C=!1)),!U&&$[0]&33554432&&(U=!0,Me.playlistStyle=Y[25],Xe(()=>U=!1)),!V&&$[0]&67108864&&(V=!0,Me.playlistToggle=Y[26],Xe(()=>V=!1)),!N&&$[0]&134217728&&(N=!0,Me.mediaSession=Y[27],Xe(()=>N=!1)),!Q&&$[0]&128&&(Q=!0,Me.contentIndex=Y[7],Xe(()=>Q=!1)),!W&&$[0]&256&&(W=!0,Me.introsOutrosIndex=Y[8],Xe(()=>W=!1)),!ue&&$[0]&512&&(ue=!0,Me.advertIndex=Y[9],Xe(()=>ue=!1)),!ie&&$[0]&268435456&&(ie=!0,Me.persistentAdImage=Y[28],Xe(()=>ie=!1)),!be&&$[0]&1024&&(be=!0,Me.persistentIndex=Y[10],Xe(()=>be=!1)),!Se&&$[0]&536870912&&(Se=!0,Me.duration=Y[29],Xe(()=>Se=!1)),!fe&&$[0]&2048&&(fe=!0,Me.currentTime=Y[11],Xe(()=>fe=!1)),!pe&&$[0]&1073741824&&(pe=!0,Me.playbackState=Y[30],Xe(()=>pe=!1)),!Z&&$[1]&1&&(Z=!0,Me.playbackRate=Y[31],Xe(()=>Z=!1)),!L&&$[0]&4096&&(L=!0,Me.widgetStyle=Y[12],Xe(()=>L=!1)),!le&&$[1]&2&&(le=!0,Me.widgetPosition=Y[32],Xe(()=>le=!1)),!z&&$[1]&4&&(z=!0,Me.widgetWidth=Y[33],Xe(()=>z=!1)),!Ke&&$[0]&8192&&(Ke=!0,Me.widgetTarget=Y[13],Xe(()=>Ke=!1)),!Ie&&$[1]&8&&(Ie=!0,Me.textColor=Y[34],Xe(()=>Ie=!1)),!Ee&&$[1]&16&&(Ee=!0,Me.backgroundColor=Y[35],Xe(()=>Ee=!1)),!ke&&$[1]&32&&(ke=!0,Me.iconColor=Y[36],Xe(()=>ke=!1)),!G&&$[0]&16384&&(G=!0,Me.highlightColor=Y[14],Xe(()=>G=!1)),!X&&$[1]&64&&(X=!0,Me.logoIconEnabled=Y[37],Xe(()=>X=!1)),!B&&$[0]&32768&&(B=!0,Me.highlightSections=Y[15],Xe(()=>B=!1)),!Ue&&$[0]&65536&&(Ue=!0,Me.clickableSections=Y[16],Xe(()=>Ue=!1)),!De&&$[0]&131072&&(De=!0,Me.segmentWidgetSections=Y[17],Xe(()=>De=!1)),!q&&$[0]&262144&&(q=!0,Me.segmentWidgetPosition=Y[18],Xe(()=>q=!1)),!ve&&$[0]&524288&&(ve=!0,Me.currentSegment=Y[19],Xe(()=>ve=!1)),!at&&$[0]&1048576&&(at=!0,Me.hoveredSegment=Y[20],Xe(()=>at=!1)),!Qe&&$[1]&128&&(Qe=!0,Me.advertConsent=Y[38],Xe(()=>Qe=!1)),!Et&&$[1]&256&&(Et=!0,Me.analyticsConsent=Y[39],Xe(()=>Et=!1)),!Oe&&$[1]&512&&(Oe=!0,Me.analyticsCustomUrl=Y[40],Xe(()=>Oe=!1)),!Te&&$[1]&1024&&(Te=!0,Me.analyticsTag=Y[41],Xe(()=>Te=!1)),e.$set(Me)},i(Y){it||(J(e.$$.fragment,Y),it=!0)},o(Y){ae(e.$$.fragment,Y),it=!1},d(Y){ze(e,Y)}}}function zc(t){let e,i;return e=new Vy({props:{onEvent:t[53],content:t[48],contentIndex:t[7],activeAdvert:t[56],persistentAdvert:t[62],duration:t[29],playbackState:t[30],skipButtonStyle:t[24],backgroundColor:t[35],iconColor:t[36]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[1]&131072&&(l.content=n[48]),a[0]&128&&(l.contentIndex=n[7]),a[1]&33554432&&(l.activeAdvert=n[56]),a[2]&1&&(l.persistentAdvert=n[62]),a[0]&536870912&&(l.duration=n[29]),a[0]&1073741824&&(l.playbackState=n[30]),a[0]&16777216&&(l.skipButtonStyle=n[24]),a[1]&16&&(l.backgroundColor=n[35]),a[1]&32&&(l.iconColor=n[36]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function Hc(t){let e,i;return e=new Hy({props:{analyticsTag:t[41]}}),{c(){He(e.$$.fragment)},m(n,a){Ge(e,n,a),i=!0},p(n,a){const l={};a[1]&1024&&(l.analyticsTag=n[41]),e.$set(l)},i(n){i||(J(e.$$.fragment,n),i=!0)},o(n){ae(e.$$.fragment,n),i=!1},d(n){ze(e,n)}}}function hb(t){let e,i,n,a,l,g,p,_,k,T=[],C=new Map,U,V,N,Q,W,ue;function ie(G){t[87](G)}function be(G){t[88](G)}function Se(G){t[89](G)}function fe(G){t[90](G)}function pe(G){t[91](G)}let Z={onEvent:t[53],content:t[48],contentIndex:t[7],introOrOutro:t[55],activeAdvert:t[56],advertConsent:t[38],videoBehindWidget:t[58],videoBehindStatic:t[61],widgetPosition:t[32],widgetWidth:t[33]};t[30]!==void 0&&(Z.playbackState=t[30]),t[29]!==void 0&&(Z.duration=t[29]),t[11]!==void 0&&(Z.currentTime=t[11]),t[31]!==void 0&&(Z.playbackRate=t[31]),t[45]!==void 0&&(Z.prevPercentage=t[45]),e=new Mv({props:Z}),t[86](e),Ne.push(()=>Ze(e,"playbackState",ie)),Ne.push(()=>Ze(e,"duration",be)),Ne.push(()=>Ze(e,"currentTime",Se)),Ne.push(()=>Ze(e,"playbackRate",fe)),Ne.push(()=>Ze(e,"prevPercentage",pe));let L=t[5]&&Vc(t),le=(t[51]||t[13])&&Wc(t),z=t[46];const Ke=G=>G[139];for(let G=0;G<z.length;G+=1){let X=Uc(t,z,G),B=Ke(X);C.set(B,T[G]=jc(B,X))}let Ie=t[21]&&Gc(t),Ee=t[52]&&zc(t),ke=t[41]&&Hc(t);return W=new Ky({}),{c(){He(e.$$.fragment),p=Ce(),L&&L.c(),_=Ce(),le&&le.c(),k=Ce();for(let G=0;G<T.length;G+=1)T[G].c();U=Ce(),Ie&&Ie.c(),V=Ce(),Ee&&Ee.c(),N=Ce(),ke&&ke.c(),Q=Ce(),He(W.$$.fragment)},m(G,X){Ge(e,G,X),se(G,p,X),L&&L.m(G,X),se(G,_,X),le&&le.m(G,X),se(G,k,X);for(let B=0;B<T.length;B+=1)T[B]&&T[B].m(G,X);se(G,U,X),Ie&&Ie.m(G,X),se(G,V,X),Ee&&Ee.m(G,X),se(G,N,X),ke&&ke.m(G,X),se(G,Q,X),Ge(W,G,X),ue=!0},p(G,X){const B={};X[1]&131072&&(B.content=G[48]),X[0]&128&&(B.contentIndex=G[7]),X[1]&16777216&&(B.introOrOutro=G[55]),X[1]&33554432&&(B.activeAdvert=G[56]),X[1]&128&&(B.advertConsent=G[38]),X[1]&134217728&&(B.videoBehindWidget=G[58]),X[1]&1073741824&&(B.videoBehindStatic=G[61]),X[1]&2&&(B.widgetPosition=G[32]),X[1]&4&&(B.widgetWidth=G[33]),!i&&X[0]&1073741824&&(i=!0,B.playbackState=G[30],Xe(()=>i=!1)),!n&&X[0]&536870912&&(n=!0,B.duration=G[29],Xe(()=>n=!1)),!a&&X[0]&2048&&(a=!0,B.currentTime=G[11],Xe(()=>a=!1)),!l&&X[1]&1&&(l=!0,B.playbackRate=G[31],Xe(()=>l=!1)),!g&&X[1]&16384&&(g=!0,B.prevPercentage=G[45],Xe(()=>g=!1)),e.$set(B),G[5]?L?(L.p(G,X),X[0]&32&&J(L,1)):(L=Vc(G),L.c(),J(L,1),L.m(_.parentNode,_)):L&&(Lt(),ae(L,1,1,()=>{L=null}),It()),G[51]||G[13]?le?(le.p(G,X),X[0]&8192|X[1]&1048576&&J(le,1)):(le=Wc(G),le.c(),J(le,1),le.m(k.parentNode,k)):le&&(Lt(),ae(le,1,1,()=>{le=null}),It()),X[0]&1610614912|X[1]&650281016|X[2]&1&&(z=G[46],Lt(),T=Qh(T,X,Ke,1,G,z,C,U.parentNode,Jh,jc,U,Uc),It()),G[21]?Ie?(Ie.p(G,X),X[0]&2097152&&J(Ie,1)):(Ie=Gc(G),Ie.c(),J(Ie,1),Ie.m(V.parentNode,V)):Ie&&(Lt(),ae(Ie,1,1,()=>{Ie=null}),It()),G[52]?Ee?(Ee.p(G,X),X[1]&2097152&&J(Ee,1)):(Ee=zc(G),Ee.c(),J(Ee,1),Ee.m(N.parentNode,N)):Ee&&(Lt(),ae(Ee,1,1,()=>{Ee=null}),It()),G[41]?ke?(ke.p(G,X),X[1]&1024&&J(ke,1)):(ke=Hc(G),ke.c(),J(ke,1),ke.m(Q.parentNode,Q)):ke&&(Lt(),ae(ke,1,1,()=>{ke=null}),It())},i(G){if(!ue){J(e.$$.fragment,G),J(L),J(le);for(let X=0;X<z.length;X+=1)J(T[X]);J(Ie),J(Ee),J(ke),J(W.$$.fragment,G),ue=!0}},o(G){ae(e.$$.fragment,G),ae(L),ae(le);for(let X=0;X<T.length;X+=1)ae(T[X]);ae(Ie),ae(Ee),ae(ke),ae(W.$$.fragment,G),ue=!1},d(G){t[86](null),ze(e,G),G&&te(p),L&&L.d(G),G&&te(_),le&&le.d(G),G&&te(k);for(let X=0;X<T.length;X+=1)T[X].d(G);G&&te(U),Ie&&Ie.d(G),G&&te(V),Ee&&Ee.d(G),G&&te(N),ke&&ke.d(G),G&&te(Q),ze(W,G)}}}function gb(t,e,i){let n,a,l,g,p,_,k,T,C,U,V,N,Q,{playerApiUrl:W="https://api.beyondwords.io/v1/projects/{id}/player"}=e,{projectId:ue=void 0}=e,{contentId:ie=void 0}=e,{playlistId:be=void 0}=e,{sourceId:Se=void 0}=e,{sourceUrl:fe=void 0}=e,{playlist:pe=[]}=e,{showUserInterface:Z=!0}=e,{playerStyle:L="standard"}=e,{playerTitle:le=void 0}=e,{callToAction:z=void 0}=e,{skipButtonStyle:Ke="auto"}=e,{playlistStyle:Ie="auto-5-4"}=e,{playlistToggle:Ee="auto"}=e,{downloadFormats:ke=[]}=e,{mediaSession:G="auto"}=e,{content:X=[]}=e,{contentIndex:B=0}=e,{introsOutros:Ue=[]}=e,{introsOutrosIndex:De=-1}=e,{adverts:q=[]}=e,{advertIndex:ve=-1}=e,{persistentAdImage:at=!1}=e,{persistentIndex:Qe=-1}=e,{duration:Et=0}=e,{currentTime:Oe=0}=e,{playbackState:Te="stopped"}=e,{playbackRate:it=1}=e,{widgetStyle:xt="standard"}=e,{widgetPosition:wt="auto"}=e,{widgetWidth:Xt="auto"}=e,{widgetTarget:Pt=void 0}=e,{textColor:Ht="#111"}=e,{backgroundColor:yt="#f5f5f5"}=e,{iconColor:ft="rgba(0, 0, 0, 0.8)"}=e,{highlightColor:Nt="#eee"}=e,{logoIconEnabled:mt=!0}=e,{highlightSections:bt="all"}=e,{clickableSections:Zt="all"}=e,{segmentWidgetSections:Rt="body"}=e,{segmentWidgetPosition:Jt="7-oclock"}=e,{currentSegment:nt=void 0}=e,{hoveredSegment:ot=void 0}=e,{loadedMedia:li=void 0}=e,{advertConsent:Ae="personalized"}=e,{analyticsConsent:Dt="allowed"}=e,{analyticsCustomUrl:Ft=void 0}=e,{analyticsTag:Ot=void 0}=e,{writeToken:Ut=void 0}=e,{captureErrors:jt=!0}=e,{onError:ci=()=>{}}=e,{transitions:Kt=[]}=e,{controlPanel:Yt=void 0}=e;const mi=(...R)=>me.addEventListener(...R),Vt=(...R)=>me.removeEventListener(...R);let{initialProps:ct={}}=e,{showBottomWidget:di=!1}=e,{showMediaSession:Be=!1}=e,{isFullScreen:fi=!1}=e,{mediaElement:Qt=void 0}=e,{userInterface:Je=void 0}=e,{widgetInterface:pi=void 0}=e,{controller:me=void 0}=e,{analyticsUrl:$t=void 0}=e,{analyticsId:hi=void 0}=e,{listenSessionId:_i=void 0}=e,{sessionCreatedAt:wi=void 0}=e,{isNewListen:yi=!1}=e,{prevPercentage:Ei=0}=e,{segmentWidgets:Fe=[]}=e,{segmentContainers:Y=new ml(R=>i(46,Fe=R))}=e,{segmentClickables:$=new vl}=e,{segmentHighlights:Me=new gl}=e;const _r=R=>me.processEvent(de({emittedFrom:p},R)),ji=()=>i(84,T=ot);function Qr(R){Ne[R?"unshift":"push"](()=>{Qt=R,i(42,Qt)})}function si(R){Te=R,i(30,Te)}function yr(R){Et=R,i(29,Et)}function Ji(R){Oe=R,i(11,Oe)}function Qi(R){it=R,i(31,it)}function Gi(R){Ei=R,i(45,Ei)}function ur(R){Ne[R?"unshift":"push"](()=>{Je=R,i(43,Je)})}function xr(R){Ne[R?"unshift":"push"](()=>{pi=R,i(44,pi)})}const Ii=R=>_r(ni(de({},R),{emittedFrom:"segment-widget",widgetSegment:V,widgetIsCurrent:N}));function Ri(R){ue=R,i(0,ue)}function cr(R){ie=R,i(1,ie)}function wr(R){be=R,i(2,be)}function zi(R){Se=R,i(3,Se)}function Si(R){fe=R,i(4,fe)}function Hi(R){Z=R,i(5,Z)}function Di(R){L=R,i(6,L)}function ei(R){le=R,i(22,le)}function Ki(R){z=R,i(23,z)}function ti(R){Ke=R,i(24,Ke)}function br(R){Ie=R,i(25,Ie)}function ii(R){Ee=R,i(26,Ee)}function H(R){G=R,i(27,G)}function _e(R){B=R,i(7,B)}function ye(R){De=R,i(8,De)}function st(R){ve=R,i(9,ve)}function Mr(R){at=R,i(28,at)}function Pr(R){Qe=R,i(10,Qe)}function $r(R){Et=R,i(29,Et)}function Ms(R){Oe=R,i(11,Oe)}function bn(R){Te=R,i(30,Te)}function Ns(R){it=R,i(31,it)}function Yi(R){xt=R,i(12,xt)}function en(R){wt=R,i(32,wt)}function Ai(R){Xt=R,i(33,Xt)}function tn(R){Pt=R,i(13,Pt)}function Cr(R){Ht=R,i(34,Ht)}function Sr(R){yt=R,i(35,yt)}function Wn(R){ft=R,i(36,ft)}function Sn(R){Nt=R,i(14,Nt)}function Fs(R){mt=R,i(37,mt)}function kr(R){bt=R,i(15,bt)}function jn(R){Zt=R,i(16,Zt)}function Nr(R){Rt=R,i(17,Rt)}function Us(R){Jt=R,i(18,Jt)}function as(R){nt=R,i(19,nt)}function os(R){ot=R,i(20,ot)}function Gn(R){Ae=R,i(38,Ae)}function Fr(R){Dt=R,i(39,Dt)}function Pi(R){Ft=R,i(40,Ft)}function ya(R){Ot=R,i(41,Ot)}return t.$$set=R=>{"playerApiUrl"in R&&i(63,W=R.playerApiUrl),"projectId"in R&&i(0,ue=R.projectId),"contentId"in R&&i(1,ie=R.contentId),"playlistId"in R&&i(2,be=R.playlistId),"sourceId"in R&&i(3,Se=R.sourceId),"sourceUrl"in R&&i(4,fe=R.sourceUrl),"playlist"in R&&i(64,pe=R.playlist),"showUserInterface"in R&&i(5,Z=R.showUserInterface),"playerStyle"in R&&i(6,L=R.playerStyle),"playerTitle"in R&&i(22,le=R.playerTitle),"callToAction"in R&&i(23,z=R.callToAction),"skipButtonStyle"in R&&i(24,Ke=R.skipButtonStyle),"playlistStyle"in R&&i(25,Ie=R.playlistStyle),"playlistToggle"in R&&i(26,Ee=R.playlistToggle),"downloadFormats"in R&&i(47,ke=R.downloadFormats),"mediaSession"in R&&i(27,G=R.mediaSession),"content"in R&&i(48,X=R.content),"contentIndex"in R&&i(7,B=R.contentIndex),"introsOutros"in R&&i(49,Ue=R.introsOutros),"introsOutrosIndex"in R&&i(8,De=R.introsOutrosIndex),"adverts"in R&&i(50,q=R.adverts),"advertIndex"in R&&i(9,ve=R.advertIndex),"persistentAdImage"in R&&i(28,at=R.persistentAdImage),"persistentIndex"in R&&i(10,Qe=R.persistentIndex),"duration"in R&&i(29,Et=R.duration),"currentTime"in R&&i(11,Oe=R.currentTime),"playbackState"in R&&i(30,Te=R.playbackState),"playbackRate"in R&&i(31,it=R.playbackRate),"widgetStyle"in R&&i(12,xt=R.widgetStyle),"widgetPosition"in R&&i(32,wt=R.widgetPosition),"widgetWidth"in R&&i(33,Xt=R.widgetWidth),"widgetTarget"in R&&i(13,Pt=R.widgetTarget),"textColor"in R&&i(34,Ht=R.textColor),"backgroundColor"in R&&i(35,yt=R.backgroundColor),"iconColor"in R&&i(36,ft=R.iconColor),"highlightColor"in R&&i(14,Nt=R.highlightColor),"logoIconEnabled"in R&&i(37,mt=R.logoIconEnabled),"highlightSections"in R&&i(15,bt=R.highlightSections),"clickableSections"in R&&i(16,Zt=R.clickableSections),"segmentWidgetSections"in R&&i(17,Rt=R.segmentWidgetSections),"segmentWidgetPosition"in R&&i(18,Jt=R.segmentWidgetPosition),"currentSegment"in R&&i(19,nt=R.currentSegment),"hoveredSegment"in R&&i(20,ot=R.hoveredSegment),"loadedMedia"in R&&i(65,li=R.loadedMedia),"advertConsent"in R&&i(38,Ae=R.advertConsent),"analyticsConsent"in R&&i(39,Dt=R.analyticsConsent),"analyticsCustomUrl"in R&&i(40,Ft=R.analyticsCustomUrl),"analyticsTag"in R&&i(41,Ot=R.analyticsTag),"writeToken"in R&&i(66,Ut=R.writeToken),"captureErrors"in R&&i(67,jt=R.captureErrors),"onError"in R&&i(68,ci=R.onError),"transitions"in R&&i(69,Kt=R.transitions),"controlPanel"in R&&i(21,Yt=R.controlPanel),"initialProps"in R&&i(72,ct=R.initialProps),"showBottomWidget"in R&&i(51,di=R.showBottomWidget),"showMediaSession"in R&&i(52,Be=R.showMediaSession),"isFullScreen"in R&&i(73,fi=R.isFullScreen),"mediaElement"in R&&i(42,Qt=R.mediaElement),"userInterface"in R&&i(43,Je=R.userInterface),"widgetInterface"in R&&i(44,pi=R.widgetInterface),"controller"in R&&i(74,me=R.controller),"analyticsUrl"in R&&i(75,$t=R.analyticsUrl),"analyticsId"in R&&i(76,hi=R.analyticsId),"listenSessionId"in R&&i(77,_i=R.listenSessionId),"sessionCreatedAt"in R&&i(78,wi=R.sessionCreatedAt),"isNewListen"in R&&i(79,yi=R.isNewListen),"prevPercentage"in R&&i(45,Ei=R.prevPercentage),"segmentWidgets"in R&&i(46,Fe=R.segmentWidgets),"segmentContainers"in R&&i(80,Y=R.segmentContainers),"segmentClickables"in R&&i(81,$=R.segmentClickables),"segmentHighlights"in R&&i(82,Me=R.segmentHighlights)},t.$$.update=()=>{t.$$.dirty[0]&256|t.$$.dirty[1]&262144&&i(55,n=Ue[De]),t.$$.dirty[0]&512|t.$$.dirty[1]&524288&&i(56,a=q[ve]),t.$$.dirty[0]&1024|t.$$.dirty[1]&524288&&i(62,l=q[Qe]),t.$$.dirty[0]&128|t.$$.dirty[1]&131072&&X[B],t.$$.dirty[0]&64|t.$$.dirty[2]&2048&&i(59,g=fi?"video":L),t.$$.dirty[0]&4096|t.$$.dirty[1]&1048576|t.$$.dirty[2]&2048&&i(58,_=di&&xt==="video"&&!fi),t.$$.dirty[1]&134217728&&(p=_?"bottom-widget":"inline-player"),t.$$.dirty[0]&8192&&i(13,Pt=pl(Pt,"widget")),t.$$.dirty[0]&2097152&&i(21,Yt=pl(Yt,"control panel")),t.$$.dirty[0]&32|t.$$.dirty[1]&402653184&&i(61,k=Z&&g==="video"&&!_),t.$$.dirty[0]&31|t.$$.dirty[2]&4&&_r(Yy()),t.$$.dirty[0]&1|t.$$.dirty[2]&18&&Zy(W,ue,Ut,R=>_r(R)),t.$$.dirty[0]&1048576|t.$$.dirty[2]&4194304&&i(84,T=ot||T),t.$$.dirty[0]&655360&&i(83,C=Js("current",nt,Rt)),t.$$.dirty[0]&524288|t.$$.dirty[2]&2097152&&C&&ji(),t.$$.dirty[0]&131072|t.$$.dirty[2]&4194304&&i(85,U=Js("hovered",T,Rt)),t.$$.dirty[0]&524288|t.$$.dirty[2]&14680064&&i(54,V=U&&T||C&&nt),t.$$.dirty[0]&524288|t.$$.dirty[1]&8388608&&i(57,N=(V==null?void 0:V.marker)===(nt==null?void 0:nt.marker)),t.$$.dirty[1]&117440512&&i(60,Q=N||a||n),t.$$.dirty[0]&393280|t.$$.dirty[1]&8388608|t.$$.dirty[2]&262144&&Y.update(V,Rt,Jt,L),t.$$.dirty[0]&1114112|t.$$.dirty[2]&524288&&$.update(ot,Zt),t.$$.dirty[0]&573440|t.$$.dirty[2]&1048576&&Me.update("current",nt,bt,Nt),t.$$.dirty[0]&1097728|t.$$.dirty[2]&1048576&&Me.update("hovered",ot,bt,Nt),t.$$.dirty[0]&2048|t.$$.dirty[2]&4224&&ib(Kt,me,Oe)},[ue,ie,be,Se,fe,Z,L,B,De,ve,Qe,Oe,xt,Pt,Nt,bt,Zt,Rt,Jt,nt,ot,Yt,le,z,Ke,Ie,Ee,G,at,Et,Te,it,wt,Xt,Ht,yt,ft,mt,Ae,Dt,Ft,Ot,Qt,Je,pi,Ei,Fe,ke,X,Ue,q,di,Be,_r,V,n,a,N,_,g,Q,k,l,W,pe,li,Ut,jt,ci,Kt,mi,Vt,ct,fi,me,$t,hi,_i,wi,yi,Y,$,Me,C,T,U,Qr,si,yr,Ji,Qi,Gi,ur,xr,Ii,Ri,cr,wr,zi,Si,Hi,Di,ei,Ki,ti,br,ii,H,_e,ye,st,Mr,Pr,$r,Ms,bn,Ns,Yi,en,Ai,tn,Cr,Sr,Wn,Sn,Fs,kr,jn,Nr,Us,as,os,Gn,Fr,Pi,ya]}let vb=class extends tt{constructor(e){super(),et(this,e,gb,hb,Ye,{playerApiUrl:63,projectId:0,contentId:1,playlistId:2,sourceId:3,sourceUrl:4,playlist:64,showUserInterface:5,playerStyle:6,playerTitle:22,callToAction:23,skipButtonStyle:24,playlistStyle:25,playlistToggle:26,downloadFormats:47,mediaSession:27,content:48,contentIndex:7,introsOutros:49,introsOutrosIndex:8,adverts:50,advertIndex:9,persistentAdImage:28,persistentIndex:10,duration:29,currentTime:11,playbackState:30,playbackRate:31,widgetStyle:12,widgetPosition:32,widgetWidth:33,widgetTarget:13,textColor:34,backgroundColor:35,iconColor:36,highlightColor:14,logoIconEnabled:37,highlightSections:15,clickableSections:16,segmentWidgetSections:17,segmentWidgetPosition:18,currentSegment:19,hoveredSegment:20,loadedMedia:65,advertConsent:38,analyticsConsent:39,analyticsCustomUrl:40,analyticsTag:41,writeToken:66,captureErrors:67,onError:68,transitions:69,controlPanel:21,addEventListener:70,removeEventListener:71,initialProps:72,showBottomWidget:51,showMediaSession:52,isFullScreen:73,mediaElement:42,userInterface:43,widgetInterface:44,controller:74,analyticsUrl:75,analyticsId:76,listenSessionId:77,sessionCreatedAt:78,isNewListen:79,prevPercentage:45,segmentWidgets:46,segmentContainers:80,segmentClickables:81,segmentHighlights:82,onEvent:53},null,[-1,-1,-1,-1,-1])}get playerApiUrl(){return this.$$.ctx[63]}set playerApiUrl(e){this.$$set({playerApiUrl:e}),w()}get projectId(){return this.$$.ctx[0]}set projectId(e){this.$$set({projectId:e}),w()}get contentId(){return this.$$.ctx[1]}set contentId(e){this.$$set({contentId:e}),w()}get playlistId(){return this.$$.ctx[2]}set playlistId(e){this.$$set({playlistId:e}),w()}get sourceId(){return this.$$.ctx[3]}set sourceId(e){this.$$set({sourceId:e}),w()}get sourceUrl(){return this.$$.ctx[4]}set sourceUrl(e){this.$$set({sourceUrl:e}),w()}get playlist(){return this.$$.ctx[64]}set playlist(e){this.$$set({playlist:e}),w()}get showUserInterface(){return this.$$.ctx[5]}set showUserInterface(e){this.$$set({showUserInterface:e}),w()}get playerStyle(){return this.$$.ctx[6]}set playerStyle(e){this.$$set({playerStyle:e}),w()}get playerTitle(){return this.$$.ctx[22]}set playerTitle(e){this.$$set({playerTitle:e}),w()}get callToAction(){return this.$$.ctx[23]}set callToAction(e){this.$$set({callToAction:e}),w()}get skipButtonStyle(){return this.$$.ctx[24]}set skipButtonStyle(e){this.$$set({skipButtonStyle:e}),w()}get playlistStyle(){return this.$$.ctx[25]}set playlistStyle(e){this.$$set({playlistStyle:e}),w()}get playlistToggle(){return this.$$.ctx[26]}set playlistToggle(e){this.$$set({playlistToggle:e}),w()}get downloadFormats(){return this.$$.ctx[47]}set downloadFormats(e){this.$$set({downloadFormats:e}),w()}get mediaSession(){return this.$$.ctx[27]}set mediaSession(e){this.$$set({mediaSession:e}),w()}get content(){return this.$$.ctx[48]}set content(e){this.$$set({content:e}),w()}get contentIndex(){return this.$$.ctx[7]}set contentIndex(e){this.$$set({contentIndex:e}),w()}get introsOutros(){return this.$$.ctx[49]}set introsOutros(e){this.$$set({introsOutros:e}),w()}get introsOutrosIndex(){return this.$$.ctx[8]}set introsOutrosIndex(e){this.$$set({introsOutrosIndex:e}),w()}get adverts(){return this.$$.ctx[50]}set adverts(e){this.$$set({adverts:e}),w()}get advertIndex(){return this.$$.ctx[9]}set advertIndex(e){this.$$set({advertIndex:e}),w()}get persistentAdImage(){return this.$$.ctx[28]}set persistentAdImage(e){this.$$set({persistentAdImage:e}),w()}get persistentIndex(){return this.$$.ctx[10]}set persistentIndex(e){this.$$set({persistentIndex:e}),w()}get duration(){return this.$$.ctx[29]}set duration(e){this.$$set({duration:e}),w()}get currentTime(){return this.$$.ctx[11]}set currentTime(e){this.$$set({currentTime:e}),w()}get playbackState(){return this.$$.ctx[30]}set playbackState(e){this.$$set({playbackState:e}),w()}get playbackRate(){return this.$$.ctx[31]}set playbackRate(e){this.$$set({playbackRate:e}),w()}get widgetStyle(){return this.$$.ctx[12]}set widgetStyle(e){this.$$set({widgetStyle:e}),w()}get widgetPosition(){return this.$$.ctx[32]}set widgetPosition(e){this.$$set({widgetPosition:e}),w()}get widgetWidth(){return this.$$.ctx[33]}set widgetWidth(e){this.$$set({widgetWidth:e}),w()}get widgetTarget(){return this.$$.ctx[13]}set widgetTarget(e){this.$$set({widgetTarget:e}),w()}get textColor(){return this.$$.ctx[34]}set textColor(e){this.$$set({textColor:e}),w()}get backgroundColor(){return this.$$.ctx[35]}set backgroundColor(e){this.$$set({backgroundColor:e}),w()}get iconColor(){return this.$$.ctx[36]}set iconColor(e){this.$$set({iconColor:e}),w()}get highlightColor(){return this.$$.ctx[14]}set highlightColor(e){this.$$set({highlightColor:e}),w()}get logoIconEnabled(){return this.$$.ctx[37]}set logoIconEnabled(e){this.$$set({logoIconEnabled:e}),w()}get highlightSections(){return this.$$.ctx[15]}set highlightSections(e){this.$$set({highlightSections:e}),w()}get clickableSections(){return this.$$.ctx[16]}set clickableSections(e){this.$$set({clickableSections:e}),w()}get segmentWidgetSections(){return this.$$.ctx[17]}set segmentWidgetSections(e){this.$$set({segmentWidgetSections:e}),w()}get segmentWidgetPosition(){return this.$$.ctx[18]}set segmentWidgetPosition(e){this.$$set({segmentWidgetPosition:e}),w()}get currentSegment(){return this.$$.ctx[19]}set currentSegment(e){this.$$set({currentSegment:e}),w()}get hoveredSegment(){return this.$$.ctx[20]}set hoveredSegment(e){this.$$set({hoveredSegment:e}),w()}get loadedMedia(){return this.$$.ctx[65]}set loadedMedia(e){this.$$set({loadedMedia:e}),w()}get advertConsent(){return this.$$.ctx[38]}set advertConsent(e){this.$$set({advertConsent:e}),w()}get analyticsConsent(){return this.$$.ctx[39]}set analyticsConsent(e){this.$$set({analyticsConsent:e}),w()}get analyticsCustomUrl(){return this.$$.ctx[40]}set analyticsCustomUrl(e){this.$$set({analyticsCustomUrl:e}),w()}get analyticsTag(){return this.$$.ctx[41]}set analyticsTag(e){this.$$set({analyticsTag:e}),w()}get writeToken(){return this.$$.ctx[66]}set writeToken(e){this.$$set({writeToken:e}),w()}get captureErrors(){return this.$$.ctx[67]}set captureErrors(e){this.$$set({captureErrors:e}),w()}get onError(){return this.$$.ctx[68]}set onError(e){this.$$set({onError:e}),w()}get transitions(){return this.$$.ctx[69]}set transitions(e){this.$$set({transitions:e}),w()}get controlPanel(){return this.$$.ctx[21]}set controlPanel(e){this.$$set({controlPanel:e}),w()}get addEventListener(){return this.$$.ctx[70]}get removeEventListener(){return this.$$.ctx[71]}get initialProps(){return this.$$.ctx[72]}set initialProps(e){this.$$set({initialProps:e}),w()}get showBottomWidget(){return this.$$.ctx[51]}set showBottomWidget(e){this.$$set({showBottomWidget:e}),w()}get showMediaSession(){return this.$$.ctx[52]}set showMediaSession(e){this.$$set({showMediaSession:e}),w()}get isFullScreen(){return this.$$.ctx[73]}set isFullScreen(e){this.$$set({isFullScreen:e}),w()}get mediaElement(){return this.$$.ctx[42]}set mediaElement(e){this.$$set({mediaElement:e}),w()}get userInterface(){return this.$$.ctx[43]}set userInterface(e){this.$$set({userInterface:e}),w()}get widgetInterface(){return this.$$.ctx[44]}set widgetInterface(e){this.$$set({widgetInterface:e}),w()}get controller(){return this.$$.ctx[74]}set controller(e){this.$$set({controller:e}),w()}get analyticsUrl(){return this.$$.ctx[75]}set analyticsUrl(e){this.$$set({analyticsUrl:e}),w()}get analyticsId(){return this.$$.ctx[76]}set analyticsId(e){this.$$set({analyticsId:e}),w()}get listenSessionId(){return this.$$.ctx[77]}set listenSessionId(e){this.$$set({listenSessionId:e}),w()}get sessionCreatedAt(){return this.$$.ctx[78]}set sessionCreatedAt(e){this.$$set({sessionCreatedAt:e}),w()}get isNewListen(){return this.$$.ctx[79]}set isNewListen(e){this.$$set({isNewListen:e}),w()}get prevPercentage(){return this.$$.ctx[45]}set prevPercentage(e){this.$$set({prevPercentage:e}),w()}get segmentWidgets(){return this.$$.ctx[46]}set segmentWidgets(e){this.$$set({segmentWidgets:e}),w()}get segmentContainers(){return this.$$.ctx[80]}set segmentContainers(e){this.$$set({segmentContainers:e}),w()}get segmentClickables(){return this.$$.ctx[81]}set segmentClickables(e){this.$$set({segmentClickables:e}),w()}get segmentHighlights(){return this.$$.ctx[82]}set segmentHighlights(e){this.$$set({segmentHighlights:e}),w()}get onEvent(){return this.$$.ctx[53]}};class mb{constructor(e,i){this.baseUrl=e==null?void 0:e.replace("{id}",i)}byContentId(e){return Qn(`${this.baseUrl}/by_content_id/${e}`)}byPlaylistId(e){return Qn(`${this.baseUrl}/by_playlist_id/${e}`)}bySourceId(e){return Qn(`${this.baseUrl}/by_source_id/${e}`)}bySourceUrl(e){return Qn(`${this.baseUrl}/by_source_url/${e}`)}byIdentifiers(e){return Qn(`${this.baseUrl}/by_identifiers/${encodeURIComponent(JSON.stringify(e))}`)}}const _l=t=>typeof t!="object"||t===null?t:Array.isArray(t)?t.map(_l):Object.fromEntries(Object.entries(t).map(([e,i])=>[e.replace(/([A-Z])/g,n=>`_${n.toLowerCase()}`),_l(i)])),Kc=t=>t==="dark"||t==="auto"&&pb()?"dark":"light",pb=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,Yc=t=>an(this,null,function*(){const e=new mb(t.playerApiUrl,t.projectId);if(!t.playerApiUrl||!t.projectId)return;const i=_b(t);if(i.length===0)return;const n=yield yb(e,i).catch(()=>{});if(!(n!=null&&n.content)){bb(t);return}Sb(t,n)}),_b=t=>{const e=[];return t.contentId&&e.push({content_id:t.contentId}),t.playlistId&&e.push({playlist_id:t.playlistId}),t.sourceId&&e.push({source_id:t.sourceId}),t.sourceUrl&&e.push({source_url:t.sourceUrl}),t.playlist&&e.push(..._l(t.playlist)),[...new Set(e.map(JSON.stringify))].map(JSON.parse)},yb=(t,e)=>{const i=e[0];if(e.length>1)return t.byIdentifiers(e);if(i.content_id)return t.byContentId(i.content_id);if(i.playlist_id)return t.byPlaylistId(i.playlist_id);if(i.source_id)return t.bySourceId(i.source_id);if(i.source_url)return t.bySourceUrl(i.source_url)},bb=t=>{qc(t),Xc(t),Zc(t),t.onEvent(qe({type:"NoContentAvailable",description:"No published and processed content is available for the identifiers.",initiatedBy:"browser"}))},Sb=(t,e)=>{var a;const i=Kc(e.settings.theme),n=e.settings[`${i}_theme`];qc(t),Xc(t,e),Zc(t,e),At(t,"playerStyle",e.settings.player_style),At(t,"playerTitle",((a=e.playlist)==null?void 0:a.title)||e.settings.player_title),At(t,"callToAction",e.settings.call_to_action==="Listen to this article"?null:e.settings.call_to_action),At(t,"skipButtonStyle",e.settings.skip_button_style),At(t,"downloadFormats",e.settings.download_button_enabled?["mp3"]:[]),At(t,"introsOutros",kb(e.settings)),At(t,"persistentAdImage",e.settings.persistent_ad_image),At(t,"widgetStyle",e.settings.widget_style),At(t,"widgetPosition",e.settings.widget_position),At(t,"textColor",n.text_color),At(t,"backgroundColor",n.background_color),At(t,"iconColor",n.icon_color),At(t,"highlightColor",n.highlight_color),At(t,"logoIconEnabled",e.settings.logo_icon_enabled),At(t,"highlightSections",e.settings.segment_playback_enabled?"all":"none"),At(t,"clickableSections",e.settings.segment_playback_enabled?"all":"none"),At(t,"segmentWidgetSections",(e.settings.segment_playback_enabled,"none")),At(t,"analyticsConsent",Tb(e.settings)),At(t,"analyticsCustomUrl",e.settings.analytics_custom_url),At(t,"analyticsTag",e.settings.analytics_tag),At(t,"analyticsUrl",e.settings.analytics_url),At(t,"analyticsId",e.settings.analytics_id)},qc=t=>{At(t,"contentIndex",0),At(t,"introsOutrosIndex",-1),At(t,"advertIndex",-1),At(t,"persistentIndex",-1),At(t,"duration",0),At(t,"currentTime",0),At(t,"playbackState","stopped"),At(t,"currentSegment",void 0),At(t,"hoveredSegment",void 0)},Xc=(t,e)=>{var a;const i=(a=e==null?void 0:e.settings)==null?void 0:a.image_enabled,n=(e==null?void 0:e.content)||[];At(t,"content",n.map(l=>{var g;return{id:l.id,title:l.title,imageUrl:i&&(((g=e.playlist)==null?void 0:g.image_url)||e.settings.image_url||l.image_url),sourceId:l.source_id,sourceUrl:l.source_url,adsEnabled:l.ads_enabled,duration:l.audio[0]?l.audio[0].duration/1e3:0,audio:l.audio.map(p=>({id:p.id,url:p.url,contentType:p.content_type})),video:l.video.map(p=>({id:p.id,url:p.url,contentType:p.content_type})),segments:l.segments.map(p=>({marker:p.marker,section:p.section,startTime:p.start_time?p.start_time/1e3:0,duration:p.duration?p.duration/1e3:0}))}}))},Zc=(t,e)=>{var a;const i=(a=e==null?void 0:e.settings)==null?void 0:a.image_enabled,n=(e==null?void 0:e.ads)||[];At(t,"adverts",n.map(l=>{const g=l.type==="vast",p=Kc(l.theme),_=l[`${p}_theme`];return{id:l.id,type:l.type,placement:l.placement,vastUrl:g?l.vast_url:null,clickThroughUrl:g?null:l.click_through_url,imageUrl:i&&l.image_url,textColor:_==null?void 0:_.text_color,backgroundColor:_==null?void 0:_.background_color,iconColor:_==null?void 0:_.icon_color,audio:g?[]:(l.audio||l.media).map(k=>({id:k.id,url:k.url,contentType:k.content_type})),video:g?[]:(l.video||[]).map(k=>({id:k.id,url:k.url,contentType:k.content_type}))}}))},At=(t,e,i)=>{typeof t.initialProps[e]!="undefined"||(t[e]=i)},kb=({intro_outro_enabled:t,intro_url:e,outro_url:i})=>{if(!t)return[];const n=[];return e&&n.push({placement:"pre-roll",audio:[{url:e}],video:[]}),i&&n.push({placement:"post-roll",audio:[{url:i}],video:[]}),n},Tb=({analytics_enabled:t,analytics_uuid_enabled:e})=>t?e?"allowed":"without-local-storage":"none",Eb=(t,e)=>an(this,null,function*(){const n=yield(yield fetch(t)).blob(),a=URL.createObjectURL(n),l=document.createElement("a");document.body.append(l),l.href=a,l.setAttribute("download",e),l.setAttribute("target","_blank"),l.click(),l.remove()}),Ha={vastUrls:new Set,mediaSources:new Set},Ab=t=>{t.vastUrl&&Ha.vastUrls.add(t.vastUrl);for(const e of[...t.audio||[],...t.video||[]])Ha.mediaSources.add(e.url)},Jc=t=>{if(t.vastUrl&&Ha.vastUrls.has(t.vastUrl))return!0;for(const e of[...t.audio||[],...t.video||[]])if(Ha.mediaSources.has(e.url))return!0;return!1},Qc=new Set,xb=t=>{[...t.audio||[],...t.video||[]].forEach(i=>Qc.add(i.url))},wb=t=>[...t.audio||[],...t.video||[]].some(i=>Qc.has(i.url)),Pb=({introsOutrosIndex:t,adverts:e,advertIndex:i,content:n=[],contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:p,errored:_}={})=>{var N;const k=e&&e[i];e:if(k){if(_){Ab(k);break e}if(p)return xb(k),-1;if(!p)return i}if(!((N=n[a])!=null&&N.adsEnabled)||t!==-1)return-1;const T=Lb({content:n,contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:p});let C=-1,U=-1/0,V=-1/0;for(const[Q,W]of e.entries()){if(wb(W)||Jc(W)||!T.has(W.placement))continue;const ue=Cb[W.type]||0;if(ue<U)continue;const ie=Math.random();ue===U&&ie<V||(C=Q,U=ue,V=ie)}return C},Cb={vast:1,custom:0},Lb=({content:t,contentIndex:e,currentTime:i,atTheStart:n,atTheEnd:a})=>{const l=e===0,g=e===t.length-1,p=t.length>1,_=p&&n&&!l,k=t[e].segments,T=k[k.length-1],C=p?null:Ob(k),U=k[C],V=U&&i>U.startTime,N=T?T.startTime+T.duration:0,Q=i>N-Rb,W=new Set;return n&&W.add("pre-roll"),V&&!Q&&W.add("mid-roll"),_&&W.add("mid-roll"),a&&g&&W.add("post-roll"),_&&W.add("post-roll"),W},Ib=2*60,Rb=10,Db=.5,Ob=t=>{const e=t[t.length-1];if(!e)return;const i=e.startTime+e.duration;if(i<Ib)return;const n=i/2,a=nl(t,i/2),p=t[a].startTime>=n-Db?a:a+1;if(p!==t.length)return p},Bb=(t,e,i,n)=>{let a=-1,l=-1/0,g=-1/0;for(const[p,_]of(n||[]).entries()){if(!t||Jc(_)||_.type==="vast")continue;const k=Nb(p,e,i);if(k<l)continue;const T=Mb[_.placement]||0;k===l&&T<g||(a=p,l=k,g=T)}return a},Mb={"pre-roll":2,"mid-roll":1},Nb=(t,e,i)=>t===i?2:t===e?1:0,$c={mediaSources:new Set},Fb=t=>{for(const e of[...t.audio||[],t.video||[]])$c.mediaSources.add(e.url)},Ub=t=>{for(const e of[...t.audio||[],t.video||[]])if($c.mediaSources.has(e.url))return!0;return!1},ed=new Set,Vb=t=>{[...t.audio||[],...t.video||[]].forEach(i=>ed.add(i.url))},Wb=t=>[...t.audio||[],...t.video||[]].some(i=>ed.has(i.url)),jb=({introsOutros:t=[],introsOutrosIndex:e,advertIndex:i,content:n,contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:p,errored:_})=>{const k=t[e];e:if(k){if(_){Fb(k);break e}if(p)return Vb(k),-1;if(!p)return e}if(i!==-1)return-1;const T=Gb({content:n,contentIndex:a,currentTime:l,atTheStart:g,atTheEnd:p});let C=-1,U=-1/0,V=-1/0;for(const[N,Q]of t.entries()){if(Ub(Q)||!T.has(Q.placement))continue;const W=Wb(Q)?1:0;if(W<U)continue;const ue=Math.random();W===U&&ue<V||(C=N,U=W,V=ue)}return C},Gb=({content:t,contentIndex:e,currentTime:i,atTheStart:n,atTheEnd:a})=>{const l=new Set,g=n&&e===0&&i===0,p=a&&e===t.length-1;return g&&l.add("pre-roll"),p&&l.add("post-roll"),l},zb=t=>{if(!navigator.mediaSession)return;const e=t.instances().some(l=>l.mediaSession==="override");if(Yb()&&!e)return;let i,n=-1/0,a=-1/0;for(const l of t.instances()){if(l.mediaSession==="none")continue;const g=Hb[l.playbackState]||0;if(g<n)continue;const p=Kb[l.showMediaSession]||0;g===n&&p<a||(i=l,n=g,a=p)}for(const l of t.instances())l.showMediaSession=l===i;return i},Hb={playing:1,paused:0,stopped:0},Kb={true:1,false:0},Yb=()=>{const t=navigator.mediaSession.metadata;if(!t||navigator.mediaSession.setByPlayer)return!1;const{title:e,artist:i,album:n,artwork:a}=t;return e||i||n||(a==null?void 0:a.length)},qb=t=>{let e=!1,i,n=-1/0,a=-1/0;for(const l of t.instances()){if(!l.userInterface||l.widgetTarget||!cl(l.widgetStyle))continue;if(l.userInterface.isVisible){e=!0;continue}if(!(l.userInterface.relativeY<0))continue;const k=Xb[l.playbackState]||0;if(k<n)continue;const T=l.userInterface.absoluteY;k===n&&T<a||(i=l,n=k,a=T)}e&&n===0&&(i=null);for(const l of t.instances())l.showBottomWidget=l===i},Xb={playing:2,paused:1,stopped:0};class Zb{constructor(e,i){ht(this,To);ht(this,Eo);ht(this,va);ht(this,Ao);ht(this,xo);ht(this,Br);ht(this,vn);ht(this,lr);ht(this,wo);ht(this,ns);ht(this,mn);ht(this,Po);ht(this,ma);ht(this,Zr);ht(this,pa);ht(this,pn);ht(this,Li);ht(this,_n);ht(this,Jr);ht(this,Co);ht(this,Lo);ht(this,ss);ht(this,_a);ht(this,Io);ht(this,Ro);ht(this,Do);ht(this,Oo);this.player=e,this.PlayerClass=i,this.eventListeners={"<any>":{}}}addEventListener(e,i){e==="<any>"||this[`handle${e}`]||rr(`Cannot add listener for unknown event type '${e}'.`);const a=`listener-handle-${Ia()}`;return this.eventListeners[e]=this.eventListeners[e]||{},this.eventListeners[e][a]=i,a}removeEventListener(e,i){this.eventListeners[e]=this.eventListeners[e]||{},delete this.eventListeners[e][i]}processEvent(e){return an(this,null,function*(){yield Mc(()=>this.player),cg(e);const i=this[`handle${e.type}`],n=Qs(this.player);ce(this,To,bh).call(this,e)?e.status="ignored-due-to-advert":ce(this,Eo,Sh).call(this,e)?e.status="ignored-due-to-scrubbing":i?(yield i.call(this,e),ce(this,Co,xh).call(this),ce(this,Lo,wh).call(this),e.status="handled"):rr("No handler function for event.",e);const a=Qs(this.player);e.changedProps=Nc(n,a),e.processedAt=new Date().toISOString(),dg(e),ce(this,va,_u).call(this,e.type,e),ce(this,va,_u).call(this,"<any>",e)})}handlePressedChangeSpeed(){ce(this,Zr,qn).call(this,e=>e+1,{cycle:!0})}handlePressedEnterOnChangeSpeed(){ce(this,Zr,qn).call(this,e=>e+1,{cycle:!0})}handlePressedSpaceOnChangeSpeed(){ce(this,Zr,qn).call(this,e=>e+1,{cycle:!0})}handlePressedUpOnChangeSpeed(){ce(this,Zr,qn).call(this,e=>e+1)}handlePressedRightOnChangeSpeed(){ce(this,Zr,qn).call(this,e=>e+1)}handlePressedDownOnChangeSpeed(){ce(this,Zr,qn).call(this,e=>e-1)}handlePressedLeftOnChangeSpeed(){ce(this,Zr,qn).call(this,e=>e-1)}handlePressedPrevSegment(){ce(this,pa,bu).call(this,e=>e-1)}handlePressedNextSegment(){ce(this,pa,bu).call(this,e=>e+1)}handlePressedSeekBack({seconds:e}){ce(this,Li,ir).call(this,i=>i-e)}handlePressedSeekAhead({seconds:e}){ce(this,Li,ir).call(this,i=>i+e)}handlePressedPrevTrack(){ce(this,pn,fs).call(this,e=>e-1)}handlePressedNextTrack(){ce(this,pn,fs).call(this,e=>e+1)}handlePressedAdvertLink(){}handlePressedAdvertButton(){}handlePressedAdvertImage(){}handlePressedAdvertVideo(){}handlePressedBeyondWords(){}handlePressedSourceUrl(){}handleDurationUpdated(){}handleMediaLoaded({loadedMedia:e}){this.player.loadedMedia=e}handlePlaybackRateUpdated(){}handleVisibilityChanged(){qb(this.PlayerClass)}handlePressedVideoBackground(){ce(this,mn,ds).call(this)}handlePressedEnterOnProgressBar(){ce(this,mn,ds).call(this)}handlePressedSpaceOnProgressBar(){ce(this,mn,ds).call(this)}handlePressedEnterOnProgressCircle(){ce(this,mn,ds).call(this)}handlePressedSpaceOnProgressCircle(){ce(this,mn,ds).call(this)}handlePressedLeftOnProgressBar(){ce(this,Li,ir).call(this,e=>e-5)}handlePressedRightOnProgressBar(){ce(this,Li,ir).call(this,e=>e+5)}handlePressedLeftOnProgressCircle(){ce(this,Li,ir).call(this,e=>e-5)}handlePressedRightOnProgressCircle(){ce(this,Li,ir).call(this,e=>e+5)}handlePressedProgressBar({ratio:e}){this.preScrubState=this.player.playbackState,ce(this,Po,Ah).call(this),ce(this,Li,ir).call(this,(i,n)=>e*n),e!==0&&(this.segmentPlayed=!0)}handleScrubbedProgressBar({ratio:e}){ce(this,Li,ir).call(this,(i,n)=>e*n),e!==0&&(this.segmentPlayed=!0)}handleFinishedScrubbingProgressBar(){this.player.playbackState=this.preScrubState,delete this.preScrubState}handleIdentifiersChanged(){Yc(this.player).then(()=>{ce(this,_n,hs).call(this,{atTheStart:!0}),ce(this,Jr,Xn).call(this,{atTheStart:!0})})}handleNoContentAvailable({description:e}){console.warn(`BeyondWords.Player: ${e}`)}handlePressedPlay({emittedFrom:e,widgetSegment:i,widgetIsCurrent:n}){e==="segment-widget"&&!n?ce(this,ma,yu).call(this,i):this.player.playbackState="playing"}handlePressedPause(){this.player.playbackState="paused"}handlePlaybackPlaying(){this.PlayerClass.instances().filter(n=>n!==this.player).filter(n=>n.playbackState==="playing").forEach(n=>n.playbackState="paused"),zb(this.PlayerClass)}handlePlaybackPaused(){const e=this.player.playbackState==="playing",i=this.player.currentTime>=this.player.duration;e&&!i&&(this.player.playbackState="paused")}handleCurrentTimeUpdated(){this.midrollPlayed||ce(this,Jr,Xn).call(this);const e=this.player.currentTime<=0,i=this.player.currentTime>=this.player.duration,n=this.player.mediaElement.video.paused;!e&&!i&&!n&&(this.player.playbackState="playing")}handlePlaybackEnded(){ce(this,wo,Eh).call(this)&&(this.midrollPlayed=!0),this.segmentPlayed=!1;const e=ce(this,Br,Pn).call(this),i=ce(this,lr,Ir).call(this);ce(this,Jr,Xn).call(this,{atTheEnd:!0,wasIntro:e}),!i&&(ce(this,_n,hs).call(this,{atTheEnd:!0}),!e&&(ce(this,vn,cs).call(this)||ce(this,lr,Ir).call(this)||ce(this,pn,fs).call(this,n=>n+1)))}handlePlaybackNotAllowed({description:e}){console.warn(`BeyondWords.Player: ${e}`);const i=this.player.contentIndex<=0&&this.player.currentTime<=0;this.player.playbackState=i?"stopped":"paused"}handlePlaybackErrored({mediaType:e,errorMessage:i}){console.warn(`BeyondWords.Player: ${e} playback error: ${i}`),ce(this,Br,Pn).call(this)||ce(this,vn,cs).call(this)?ce(this,_n,hs).call(this,{errored:!0}):ce(this,lr,Ir).call(this)?ce(this,Jr,Xn).call(this,{errored:!0}):this.handlePlaybackEnded()}handlePressedMaximize(){sc()?ty():ey(this.player.target)}handleFullScreenModeUpdated(){const e=sc()===this.player.target,i=e?"add":"remove";this.player.isFullScreen=e,this.player.target.classList[i]("maximized")}handlePressedPlaylistItem({index:e}){ce(this,pn,fs).call(this,()=>e),this.player.playbackState="playing"}handlePressedTogglePlaylist(){const e=this.player.playlistStyle.split("-"),i=this.player.content.length>1,n=e[0]==="show"||e[0]==="auto"&&i;e[0]=n?"hide":"show",this.player.playlistStyle=e.join("-")}handlePressedDownload({contentIndex:e,audioIndex:i,videoIndex:n}){var T,C;const a=this.player.content[e],l=(T=a.audio)==null?void 0:T[i],g=(C=a.video)==null?void 0:C[n],p=(l||g).url,_=p.split(".").pop(),k=`${a.title}.${_}`;return Eb(p,k)}handlePressedCloseWidget(){for(const e of this.PlayerClass.instances())e.playbackState="paused",e.widgetStyle="closed-by-user"}handleContentStatusChanged({contentId:e,legacyId:i,sourceId:n,sourceUrl:a,contentStatus:l}){l==="processed"&&this.player.playbackState==="stopped"&&this.player.contentIndex===0&&this.player.currentTime===0&&ce(this,Do,Lh).call(this,{contentId:e,legacyId:i,sourceId:n,sourceUrl:a})&&Yc(this.player).then(()=>{ce(this,_n,hs).call(this,{atTheStart:!0}),ce(this,Jr,Xn).call(this,{atTheStart:!0})})}handleCurrentSegmentUpdated({segment:e,segmentIndex:i,contentIndex:n}){var a;ce(this,ns,Ta).call(this)?this.player.currentSegment=ni(de({},e),{segmentIndex:i,contentIndex:n}):this.segmentPlayed||((a=this.player.segmentContainers)==null||a.reset(),this.player.currentSegment=null)}handleHoveredSegmentUpdated({segment:e,segmentIndex:i,contentIndex:n}){e?this.player.hoveredSegment=ni(de({},e),{segmentIndex:i,contentIndex:n}):this.player.hoveredSegment=null}handlePressedSegment({segment:e,segmentIndex:i,contentIndex:n}){if(!Js("hovered",e,this.player.clickableSections))return;if(!ce(this,Oo,Ih).call(this,{contentIndex:n,segmentIndex:i})&&!ce(this,lr,Ir).call(this)){ce(this,mn,ds).call(this);return}n!==this.player.contentIndex&&ce(this,pn,fs).call(this,()=>n),ce(this,ma,yu).call(this,de({segmentIndex:i,contentIndex:n},e))}}To=new WeakSet,bh=function({type:e}){return ce(this,lr,Ir).call(this)&&(e.includes("ChangeSpeed")||e.includes("PrevSegment")||e.includes("NextSegment")||e.includes("SeekBack")||e.includes("SeekAhead")||e.includes("Progress")&&!e.includes("Space")&&!e.includes("Enter"))},Eo=new WeakSet,Sh=function({type:e}){return this.preScrubState&&(e.includes("CurrentTimeUpdated")||e.includes("PlaybackEnded"))},va=new WeakSet,_u=function(e,i){const n=this.eventListeners[e]||{};Object.values(n).forEach(a=>a(i))},Ao=new WeakSet,kh=function(){return this.player.introsOutros.some(e=>e.placement==="pre-roll")},xo=new WeakSet,Th=function(){return this.player.introsOutros.some(e=>e.placement==="post-roll")},Br=new WeakSet,Pn=function(e=this.player.introsOutrosIndex){var i,n,a;return((a=(n=(i=this.player)==null?void 0:i.introsOutros)==null?void 0:n[e])==null?void 0:a.placement)==="pre-roll"},vn=new WeakSet,cs=function(e=this.player.introsOutrosIndex){var i,n,a;return((a=(n=(i=this.player)==null?void 0:i.introsOutros)==null?void 0:n[e])==null?void 0:a.placement)==="post-roll"},lr=new WeakSet,Ir=function(){return this.player.advertIndex!==-1},wo=new WeakSet,Eh=function(){var e;return((e=this.player.adverts[this.player.advertIndex])==null?void 0:e.placement)==="mid-roll"},ns=new WeakSet,Ta=function(){return!ce(this,Br,Pn).call(this)&&!ce(this,vn,cs).call(this)&&!ce(this,lr,Ir).call(this)},mn=new WeakSet,ds=function(){this.player.playbackState==="playing"?this.player.playbackState="paused":this.player.playbackState="playing"},Po=new WeakSet,Ah=function(){this.player.playbackState==="playing"&&(this.player.playbackState="paused")},ma=new WeakSet,yu=function(a){var l=a,{segmentIndex:e,contentIndex:i}=l,n=vu(l,["segmentIndex","contentIndex"]);ce(this,Li,ir).call(this,()=>n.startTime,i),this.player.currentSegment=de({segmentIndex:e,contentIndex:i},n),this.player.playbackState="playing",this.segmentPlayed=!0},Zr=new WeakSet,qn=function(e,{cycle:i}={}){const n=[.5,.6,.7,.8,.9,1,1.1,1.2,1.3,1.4,1.5,2,2.5,3],a=n.length-1,l=n.indexOf(this.player.playbackRate),g=e(l);let p;i?p=g%n.length:p=Math.max(0,Math.min(a,g)),this.player.playbackRate=n[p]||1},pa=new WeakSet,bu=function(e){const i=this.player.content[this.player.contentIndex].segments,n=nl(i,this.player.currentTime),a=e(n);ce(this,Br,Pn).call(this)&&a>=0?this.handlePlaybackEnded():ce(this,vn,cs).call(this)&&a<0?(ce(this,ss,Ea).call(this,-1),ce(this,Li,ir).call(this,()=>{var l;return((l=i[i.length-1])==null?void 0:l.startTime)||.01}),this.player.playbackState="playing"):ce(this,ns,Ta).call(this)&&a<0&&ce(this,Ao,kh).call(this)?(ce(this,Li,ir).call(this,()=>0),ce(this,_n,hs).call(this,{atTheStart:!0})):ce(this,ns,Ta).call(this)&&a===i.length&&ce(this,xo,Th).call(this)?ce(this,Li,ir).call(this,()=>this.player.duration-.01):ce(this,ns,Ta).call(this)&&a>=0&&a<i.length&&ce(this,Li,ir).call(this,()=>i[a].startTime)},pn=new WeakSet,fs=function(e){const i=e(this.player.contentIndex),n=i<0||i>=this.player.content.length;n?(this.player.playbackState="stopped",ce(this,Li,ir).call(this,()=>0)):(this.player.contentIndex=i,ce(this,lr,Ir).call(this)||(ce(this,Li,ir).call(this,()=>0),this.midrollPlayed=!1)),ce(this,ss,Ea).call(this,-1),ce(this,_n,hs).call(this,{atTheStart:!0}),n||ce(this,Jr,Xn).call(this,{atTheStart:!0})},Li=new WeakSet,ir=function(e,i){if(ce(this,lr,Ir).call(this))this.prevTime=e(),this.prevContent=i;else{const n=this.player.duration||0;this.player.currentTime=e(this.player.currentTime,n)}},_n=new WeakSet,hs=function({atTheStart:e,atTheEnd:i,errored:n}={}){const{content:a,introsOutros:l,currentTime:g}=this.player,p=typeof this.nextIntroOutro!="undefined"?this.nextIntroOutro:this.player.introsOutrosIndex,_=typeof this.nextAdvert!="undefined"?this.nextAdvert:this.player.advertIndex,k=typeof this.prevContent!="undefined"?this.prevContent:this.player.contentIndex;ce(this,ss,Ea).call(this,jb({introsOutros:l,introsOutrosIndex:p,advertIndex:_,content:a,contentIndex:k,currentTime:g,atTheStart:e,atTheEnd:i,errored:n}))},Jr=new WeakSet,Xn=function({atTheStart:e,atTheEnd:i,wasIntro:n,errored:a}={}){const{adverts:l,content:g,currentTime:p}=this.player;let _=typeof this.nextIntroOutro!="undefined"?this.nextIntroOutro:this.player.introsOutrosIndex;const k=typeof this.nextAdvert!="undefined"?this.nextAdvert:this.player.advertIndex,T=typeof this.prevContent!="undefined"?this.prevContent:this.player.contentIndex;n&&(e=!0,i=!1,_=-1),ce(this,_a,Su).call(this,Pb({introsOutrosIndex:_,adverts:l,advertIndex:k,content:g,contentIndex:T,currentTime:p,atTheStart:e,atTheEnd:i,errored:a}));const C=this.player.persistentAdImage,U=this.player.persistentIndex;this.player.persistentIndex=Bb(C,U,k,l)},Co=new WeakSet,xh=function(){this.player.playbackState==="playing"&&typeof this.nextIntroOutro!="undefined"&&(ce(this,ss,Ea).call(this,this.nextIntroOutro),delete this.nextIntroOutro)},Lo=new WeakSet,wh=function(){this.player.playbackState==="playing"&&typeof this.nextAdvert!="undefined"&&(ce(this,_a,Su).call(this,this.nextAdvert),delete this.nextAdvert)},ss=new WeakSet,Ea=function(e){if(this.player.playbackState!=="playing"&&e!==-1){this.nextIntroOutro=e;return}else delete this.nextIntroOutro;if(!(this.player.contentIndex<=0&&this.player.currentTime<=0)&&ce(this,Br,Pn).call(this,e)){this.player.introsOutrosIndex=-1,ce(this,Jr,Xn).call(this,{atTheStart:!0});return}const l=ce(this,Br,Pn).call(this),g=ce(this,vn,cs).call(this);this.player.introsOutrosIndex=e;const p=l&&!ce(this,Br,Pn).call(this),_=g&&!ce(this,vn,cs).call(this);p&&(this.player.currentTime=0),_&&ce(this,pn,fs).call(this,()=>1/0)},_a=new WeakSet,Su=function(e){if(this.player.playbackState!=="playing"&&e!==-1){this.nextAdvert=e;return}else delete this.nextAdvert;const n=ce(this,lr,Ir).call(this);this.player.advertIndex=e;const a=!n&&ce(this,lr,Ir).call(this),l=n&&!ce(this,lr,Ir).call(this);a&&ce(this,Io,Ph).call(this),l&&ce(this,Ro,Ch).call(this)},Io=new WeakSet,Ph=function(){ce(this,Br,Pn).call(this)||(this.prevTime=this.player.currentTime),this.prevRate=this.player.playbackRate,this.prevContent=this.player.contentIndex,this.player.currentTime=0,this.player.playbackRate=1},Ro=new WeakSet,Ch=function(){this.player.playbackRate=this.prevRate||1,this.player.contentIndex!==this.prevContent||(this.player.currentTime=this.prevTime),delete this.prevTime,delete this.prevRate,delete this.prevContent},Do=new WeakSet,Lh=function({contentId:e,legacyId:i,sourceId:n,sourceUrl:a}){var l,g,p,_;return this.player.contentId===e||this.player.contentId===i||this.player.sourceId===n||this.player.sourceUrl===a||((l=this.player.playlist)==null?void 0:l.some(k=>k.contentId===e))||((g=this.player.playlist)==null?void 0:g.some(k=>k.contentId===i))||((p=this.player.playlist)==null?void 0:p.some(k=>k.sourceId===n))||((_=this.player.playlist)==null?void 0:_.some(k=>k.sourceUrl===a))},Oo=new WeakSet,Ih=function({contentIndex:e,segmentIndex:i}){var n,a;return((n=this.player.currentSegment)==null?void 0:n.contentIndex)!==e||((a=this.player.currentSegment)==null?void 0:a.segmentIndex)!==i};var ea="<unknown>";function td(t){var e=t.split(`
|
|
72
72
|
`);return e.reduce(function(i,n){var a=$b(n)||tS(n)||nS(n)||lS(n)||aS(n);return a&&i.push(a),i},[])}var Jb=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Qb=/\((\S*)(?::(\d+))(?::(\d+))\)/;function $b(t){var e=Jb.exec(t);if(!e)return null;var i=e[2]&&e[2].indexOf("native")===0,n=e[2]&&e[2].indexOf("eval")===0,a=Qb.exec(e[2]);return n&&a!=null&&(e[2]=a[1],e[3]=a[2],e[4]=a[3]),{file:i?null:e[2],methodName:e[1]||ea,arguments:i?[e[2]]:[],lineNumber:e[3]?+e[3]:null,column:e[4]?+e[4]:null}}var eS=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function tS(t){var e=eS.exec(t);return e?{file:e[2],methodName:e[1]||ea,arguments:[],lineNumber:+e[3],column:e[4]?+e[4]:null}:null}var iS=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,rS=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function nS(t){var e=iS.exec(t);if(!e)return null;var i=e[3]&&e[3].indexOf(" > eval")>-1,n=rS.exec(e[3]);return i&&n!=null&&(e[3]=n[1],e[4]=n[2],e[5]=null),{file:e[3],methodName:e[1]||ea,arguments:e[2]?e[2].split(","):[],lineNumber:e[4]?+e[4]:null,column:e[5]?+e[5]:null}}var sS=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function aS(t){var e=sS.exec(t);return e?{file:e[3],methodName:e[1]||ea,arguments:[],lineNumber:+e[4],column:e[5]?+e[5]:null}:null}var oS=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function lS(t){var e=oS.exec(t);return e?{file:e[2],methodName:e[1]||ea,arguments:[],lineNumber:+e[3],column:e[4]?+e[4]:null}:null}let id=!1,yl,bl;const uS=({onError:t})=>{if(!t||id)return;id=!0;const e=rd(new Error),i=e==null?void 0:e.match(/setErrorHandler/);yl=window.onerror,bl=window.onunhandledrejection,window.onerror=(n,a,l,g,p)=>{var C;const _=a===e,k=(C=p==null?void 0:p.message)==null?void 0:C.match(/request was interrupted/);if((i||_||k)&&t(p))return!0;yl&&yl(n,a,l,g,p)},window.onunhandledrejection=n=>{var _;const a=n.reason,l=rd(a)===e,g=(_=a==null?void 0:a.message)==null?void 0:_.match(/request was interrupted/);if((i||l||g)&&t(a)){n.preventDefault();return}bl&&bl(n)}},rd=t=>{var e;return(e=td((t==null?void 0:t.stack)||"")[0])==null?void 0:e.file},cS=()=>{typeof window=="undefined"&&rr(["Trying to initialize BeyondWords.Player in a server context but this is unsupported.","Please only initialize the player in a context where the global window object is available.","For example, by initializing the player inside a useEffect hook in a React application."])},nd=Object.prototype.toString;function sd(t){switch(nd.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Ps(t,Error)}}function xs(t,e){return nd.call(t)===`[object ${e}]`}function Sl(t){return xs(t,"ErrorEvent")}function ad(t){return xs(t,"DOMError")}function dS(t){return xs(t,"DOMException")}function es(t){return xs(t,"String")}function od(t){return t===null||typeof t!="object"&&typeof t!="function"}function ws(t){return xs(t,"Object")}function Ka(t){return typeof Event!="undefined"&&Ps(t,Event)}function fS(t){return typeof Element!="undefined"&&Ps(t,Element)}function hS(t){return xs(t,"RegExp")}function kl(t){return!!(t&&t.then&&typeof t.then=="function")}function gS(t){return ws(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function vS(t){return typeof t=="number"&&t!==t}function Ps(t,e){try{return t instanceof e}catch(i){return!1}}function Ya(t){return t&&t.Math==Math?t:void 0}const Ar=typeof globalThis=="object"&&Ya(globalThis)||typeof window=="object"&&Ya(window)||typeof self=="object"&&Ya(self)||typeof global=="object"&&Ya(global)||function(){return this}()||{};function ta(){return Ar}function Tl(t,e,i){const n=i||Ar,a=n.__SENTRY__=n.__SENTRY__||{};return a[t]||(a[t]=e())}const qa=ta(),mS=80;function El(t,e={}){try{let i=t;const n=5,a=[];let l=0,g=0;const p=" > ",_=p.length;let k;const T=Array.isArray(e)?e:e.keyAttrs,C=!Array.isArray(e)&&e.maxStringLength||mS;for(;i&&l++<n&&(k=pS(i,T),!(k==="html"||l>1&&g+a.length*_+k.length>=C));)a.push(k),g+=k.length,i=i.parentNode;return a.reverse().join(p)}catch(i){return"<unknown>"}}function pS(t,e){const i=t,n=[];let a,l,g,p,_;if(!i||!i.tagName)return"";n.push(i.tagName.toLowerCase());const k=e&&e.length?e.filter(C=>i.getAttribute(C)).map(C=>[C,i.getAttribute(C)]):null;if(k&&k.length)k.forEach(C=>{n.push(`[${C[0]}="${C[1]}"]`)});else if(i.id&&n.push(`#${i.id}`),a=i.className,a&&es(a))for(l=a.split(/\s+/),_=0;_<l.length;_++)n.push(`.${l[_]}`);const T=["aria-label","type","name","title","alt"];for(_=0;_<T.length;_++)g=T[_],p=i.getAttribute(g),p&&n.push(`[${g}="${p}"]`);return n.join("")}function _S(){try{return qa.document.location.href}catch(t){return""}}function yS(t){return qa.document&&qa.document.querySelector?qa.document.querySelector(t):null}const bS="Sentry Logger ",Xa=["debug","info","warn","error","log","assert","trace"];function ld(t){if(!("console"in Ar))return t();const e=Ar.console,i={};Xa.forEach(n=>{const a=e[n]&&e[n].__sentry_original__;n in e&&a&&(i[n]=e[n],e[n]=a)});try{return t()}finally{Object.keys(i).forEach(n=>{e[n]=i[n]})}}function ud(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1}};return typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__?Xa.forEach(i=>{e[i]=(...n)=>{t&&ld(()=>{Ar.console[i](`${bS}[${i}]:`,...n)})}}):Xa.forEach(i=>{e[i]=()=>{}}),e}let ut;typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__?ut=Tl("logger",ud):ut=ud();const SS=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function kS(t){return t==="http"||t==="https"}function Za(t,e=!1){const{host:i,path:n,pass:a,port:l,projectId:g,protocol:p,publicKey:_}=t;return`${p}://${_}${e&&a?`:${a}`:""}@${i}${l?`:${l}`:""}/${n&&`${n}/`}${g}`}function TS(t){const e=SS.exec(t);if(!e){console.error(`Invalid Sentry Dsn: ${t}`);return}const[i,n,a="",l,g="",p]=e.slice(1);let _="",k=p;const T=k.split("/");if(T.length>1&&(_=T.slice(0,-1).join("/"),k=T.pop()),k){const C=k.match(/^\d+/);C&&(k=C[0])}return cd({host:l,pass:a,path:_,projectId:k,port:g,protocol:i,publicKey:n})}function cd(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function ES(t){if(!(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__))return!0;const{port:e,projectId:i,protocol:n}=t;return["protocol","publicKey","host","projectId"].find(g=>t[g]?!1:(ut.error(`Invalid Sentry Dsn: ${g} missing`),!0))?!1:i.match(/^\d+$/)?kS(n)?e&&isNaN(parseInt(e,10))?(ut.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(ut.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(ut.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),!1)}function AS(t){const e=typeof t=="string"?TS(t):cd(t);if(!(!e||!ES(e)))return e}class Dr extends Error{constructor(e,i="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=i}}function ia(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function dd(t,e){if(!Array.isArray(t))return"";const i=[];for(let n=0;n<t.length;n++){const a=t[n];try{i.push(String(a))}catch(l){i.push("[value cannot be serialized]")}}return i.join(e)}function xS(t,e,i=!1){return es(t)?hS(e)?e.test(t):es(e)?i?t===e:t.includes(e):!1:!1}function Ja(t,e=[],i=!1){return e.some(n=>xS(t,n,i))}function Wi(t,e,i){if(!(e in t))return;const n=t[e],a=i(n);if(typeof a=="function")try{fd(a,n)}catch(l){}t[e]=a}function Al(t,e,i){Object.defineProperty(t,e,{value:i,writable:!0,configurable:!0})}function fd(t,e){const i=e.prototype||{};t.prototype=e.prototype=i,Al(t,"__sentry_original__",e)}function xl(t){return t.__sentry_original__}function wS(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function hd(t){if(sd(t))return de({message:t.message,name:t.name,stack:t.stack},vd(t));if(Ka(t)){const e=de({type:t.type,target:gd(t.target),currentTarget:gd(t.currentTarget)},vd(t));return typeof CustomEvent!="undefined"&&Ps(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function gd(t){try{return fS(t)?El(t):Object.prototype.toString.call(t)}catch(e){return"<unknown>"}}function vd(t){if(typeof t=="object"&&t!==null){const e={};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}else return{}}function PS(t,e=40){const i=Object.keys(hd(t));if(i.sort(),!i.length)return"[object has no keys]";if(i[0].length>=e)return ia(i[0],e);for(let n=i.length;n>0;n--){const a=i.slice(0,n).join(", ");if(!(a.length>e))return n===i.length?a:ia(a,e)}return""}function wl(t){return Pl(t,new Map)}function Pl(t,e){if(ws(t)){const i=e.get(t);if(i!==void 0)return i;const n={};e.set(t,n);for(const a of Object.keys(t))typeof t[a]!="undefined"&&(n[a]=Pl(t[a],e));return n}if(Array.isArray(t)){const i=e.get(t);if(i!==void 0)return i;const n=[];return e.set(t,n),t.forEach(a=>{n.push(Pl(a,e))}),n}return t}const md=50,pd=/\(error: (.*)\)/;function _d(...t){const e=t.sort((i,n)=>i[0]-n[0]).map(i=>i[1]);return(i,n=0)=>{const a=[],l=i.split(`
|
|
73
73
|
`);for(let g=n;g<l.length;g++){const p=l[g];if(p.length>1024)continue;const _=pd.test(p)?p.replace(pd,"$1"):p;if(!_.match(/\S*Error: /)){for(const k of e){const T=k(_);if(T){a.push(T);break}}if(a.length>=md)break}}return LS(a)}}function CS(t){return Array.isArray(t)?_d(...t):t}function LS(t){if(!t.length)return[];const e=t.slice(0,md),i=e[e.length-1].function;i&&/sentryWrapped/.test(i)&&e.pop(),e.reverse();const n=e[e.length-1].function;return n&&/captureMessage|captureException/.test(n)&&e.pop(),e.map(a=>ni(de({},a),{filename:a.filename||e[e.length-1].filename,function:a.function||"?"}))}const Cl="<anonymous>";function Bn(t){try{return!t||typeof t!="function"?Cl:t.name||Cl}catch(e){return Cl}}const Ll=ta();function yd(){if(!("fetch"in Ll))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}function Il(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function IS(){if(!yd())return!1;if(Il(Ll.fetch))return!0;let t=!1;const e=Ll.document;if(e&&typeof e.createElement=="function")try{const i=e.createElement("iframe");i.hidden=!0,e.head.appendChild(i),i.contentWindow&&i.contentWindow.fetch&&(t=Il(i.contentWindow.fetch)),e.head.removeChild(i)}catch(i){(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ut.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return t}const Qa=ta();function RS(){const t=Qa.chrome,e=t&&t.app&&t.app.runtime,i="history"in Qa&&!!Qa.history.pushState&&!!Qa.history.replaceState;return!e&&i}const oi=ta(),ra="__sentry_xhr_v2__",na={},bd={};function DS(t){if(!bd[t])switch(bd[t]=!0,t){case"console":OS();break;case"dom":jS();break;case"xhr":NS();break;case"fetch":BS();break;case"history":FS();break;case"error":GS();break;case"unhandledrejection":zS();break;default:(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ut.warn("unknown instrumentation type:",t);return}}function Mn(t,e){na[t]=na[t]||[],na[t].push(e),DS(t)}function Or(t,e){if(!(!t||!na[t]))for(const i of na[t]||[])try{i(e)}catch(n){(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ut.error(`Error while triggering instrumentation handler.
|
|
74
74
|
Type: ${t}
|
|
@@ -87,5 +87,5 @@ Event: ${Nn(t)}.
|
|
|
87
87
|
Url: ${uo(t)}`),!0):eT(t,e.allowUrls)?!1:((typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ut.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
88
88
|
Event: ${Nn(t)}.
|
|
89
89
|
Url: ${uo(t)}`),!0)}function Jk(t,e){return t.type||!e||!e.length?!1:tT(t).some(i=>Ja(i,e))}function Qk(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;const i=t.transaction;return i?Ja(i,e):!1}function $k(t,e){if(!e||!e.length)return!1;const i=uo(t);return i?Ja(i,e):!1}function eT(t,e){if(!e||!e.length)return!0;const i=uo(t);return i?Ja(i,e):!0}function tT(t){if(t.message)return[t.message];if(t.exception){const{values:e}=t.exception;try{const{type:i="",value:n=""}=e&&e[e.length-1]||{};return[`${n}`,`${i}: ${n}`]}catch(i){return(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ut.error(`Cannot extract message for event ${Nn(t)}`),[]}}return[]}function iT(t){try{return t.exception.values[0].type==="SentryError"}catch(e){}return!1}function rT(t=[]){for(let e=t.length-1;e>=0;e--){const i=t[e];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null}function uo(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(i){}return e?rT(e):null}catch(e){return(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ut.error(`Cannot extract url for event ${Nn(t)}`),null}}const qt=Ar;let Vl=0;function Xd(){return Vl>0}function nT(){Vl++,setTimeout(()=>{Vl--})}function Rs(t,e={},i){if(typeof t!="function")return t;try{const a=t.__sentry_wrapped__;if(a)return a;if(xl(t))return t}catch(a){return t}const n=function(){const a=Array.prototype.slice.call(arguments);try{i&&typeof i=="function"&&i.apply(this,arguments);const l=a.map(g=>Rs(g,e));return t.apply(this,l)}catch(l){throw nT(),Ek(g=>{g.addEventProcessor(p=>(e.mechanism&&(Dl(p,void 0,void 0),sa(p,e.mechanism)),p.extra=ni(de({},p.extra),{arguments:a}),p)),Ud(l)}),l}};try{for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(n[a]=t[a])}catch(a){}fd(n,t),Al(t,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return t.name}})}catch(a){}return n}function Zd(t,e){const i=jl(t,e),n={type:e&&e.name,value:lT(e)};return i.length&&(n.stacktrace={frames:i}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function sT(t,e,i,n){const l=Ci().getClient(),g=l&&l.getOptions().normalizeDepth,p={exception:{values:[{type:Ka(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:dT(e,{isUnhandledRejection:n})}]},extra:{__serialized__:xd(e,g)}};if(i){const _=jl(t,i);_.length&&(p.exception.values[0].stacktrace={frames:_})}return p}function Wl(t,e){return{exception:{values:[Zd(t,e)]}}}function jl(t,e){const i=e.stacktrace||e.stack||"",n=oT(e);try{return t(i,n)}catch(a){}return[]}const aT=/Minified React error #\d+;/i;function oT(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(aT.test(t.message))return 1}return 0}function lT(t){const e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function uT(t,e,i,n){const a=i&&i.syntheticException||void 0,l=Gl(t,e,a,n);return sa(l),l.level="error",i&&i.event_id&&(l.event_id=i.event_id),ts(l)}function cT(t,e,i="info",n,a){const l=n&&n.syntheticException||void 0,g=zl(t,e,l,a);return g.level=i,n&&n.event_id&&(g.event_id=n.event_id),ts(g)}function Gl(t,e,i,n,a){let l;if(Sl(e)&&e.error)return Wl(t,e.error);if(ad(e)||dS(e)){const g=e;if("stack"in e)l=Wl(t,e);else{const p=g.name||(ad(g)?"DOMError":"DOMException"),_=g.message?`${p}: ${g.message}`:p;l=zl(t,_,i,n),Dl(l,_)}return"code"in g&&(l.tags=ni(de({},l.tags),{"DOMException.code":`${g.code}`})),l}return sd(e)?Wl(t,e):ws(e)||Ka(e)?(l=sT(t,e,i,a),sa(l,{synthetic:!0}),l):(l=zl(t,e,i,n),Dl(l,`${e}`,void 0),sa(l,{synthetic:!0}),l)}function zl(t,e,i,n){const a={message:e};if(n&&i){const l=jl(t,i);l.length&&(a.exception={values:[{value:e,stacktrace:{frames:l}}]})}return a}function dT(t,{isUnhandledRejection:e}){const i=PS(t),n=e?"promise rejection":"exception";return Sl(t)?`Event \`ErrorEvent\` captured as ${n} with message \`${t.message}\``:Ka(t)?`Event \`${fT(t)}\` (type=${t.type}) captured as ${n}`:`Object captured as ${n} with keys: ${i}`}function fT(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch(e){}}const co=1024,Jd="Breadcrumbs";class la{static __initStatic(){this.id=Jd}__init(){this.name=la.id}constructor(e){la.prototype.__init.call(this),this.options=de({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e)}setupOnce(){this.options.console&&Mn("console",gT),this.options.dom&&Mn("dom",hT(this.options.dom)),this.options.xhr&&Mn("xhr",vT),this.options.fetch&&Mn("fetch",mT),this.options.history&&Mn("history",pT)}addSentryBreadcrumb(e){this.options.sentry&&Ci().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:Nn(e)},{event:e})}}la.__initStatic();function hT(t){function e(i){let n,a=typeof t=="object"?t.serializeAttribute:void 0,l=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;l&&l>co&&((typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ut.warn(`\`dom.maxStringLength\` cannot exceed ${co}, but a value of ${l} was configured. Sentry will use ${co} instead.`),l=co),typeof a=="string"&&(a=[a]);try{const g=i.event;n=_T(g)?El(g.target,{keyAttrs:a,maxStringLength:l}):El(g,{keyAttrs:a,maxStringLength:l})}catch(g){n="<unknown>"}n.length!==0&&Ci().addBreadcrumb({category:`ui.${i.name}`,message:n},{event:i.event,name:i.name,global:i.global})}return e}function gT(t){for(let i=0;i<t.args.length;i++)if(t.args[i]==="ref=Ref<"){t.args[i+1]="viewRef";break}const e={category:"console",data:{arguments:t.args,logger:"console"},level:ik(t.level),message:dd(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${dd(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;Ci().addBreadcrumb(e,{input:t.args,level:t.level})}function vT(t){const{startTimestamp:e,endTimestamp:i}=t,n=t.xhr[ra];if(!e||!i||!n)return;const{method:a,url:l,status_code:g,body:p}=n,_={method:a,url:l,status_code:g},k={xhr:t.xhr,input:p,startTimestamp:e,endTimestamp:i};Ci().addBreadcrumb({category:"xhr",data:_,type:"http"},k)}function mT(t){const{startTimestamp:e,endTimestamp:i}=t;if(i&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){const n=t.fetchData,a={data:t.error,input:t.args,startTimestamp:e,endTimestamp:i};Ci().addBreadcrumb({category:"fetch",data:n,level:"error",type:"http"},a)}else{const n=ni(de({},t.fetchData),{status_code:t.response&&t.response.status}),a={input:t.args,response:t.response,startTimestamp:e,endTimestamp:i};Ci().addBreadcrumb({category:"fetch",data:n,type:"http"},a)}}function pT(t){let e=t.from,i=t.to;const n=Bl(qt.location.href);let a=Bl(e);const l=Bl(i);a.path||(a=n),n.protocol===l.protocol&&n.host===l.host&&(i=l.relative),n.protocol===a.protocol&&n.host===a.host&&(e=a.relative),Ci().addBreadcrumb({category:"navigation",data:{from:e,to:i}})}function _T(t){return!!t&&!!t.target}function yT(t,{metadata:e,tunnel:i,dsn:n}){const a=de(de({event_id:t.event_id,sent_at:new Date().toISOString()},e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}}),!!i&&!!n&&{dsn:Za(n)}),l=bT(t);return aa(a,[l])}function bT(t){return[{type:"user_report"},t]}class ST extends rs{constructor(e){const i=qt.SENTRY_SDK_SOURCE||YS();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${i}:@sentry/browser`,version:lo}],version:lo},super(e),e.sendClientReports&&qt.document&&qt.document.addEventListener("visibilitychange",()=>{qt.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,i){return uT(this._options.stackParser,e,i,this._options.attachStacktrace)}eventFromMessage(e,i="info",n){return cT(this._options.stackParser,e,i,n,this._options.attachStacktrace)}sendEvent(e,i){const n=this.getIntegrationById(Jd);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(e),super.sendEvent(e,i)}captureUserFeedback(e){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ut.warn("SDK not enabled, will not capture user feedback.");return}const i=yT(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(i)}_prepareEvent(e,i,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,i,n)}_flushOutcomes(){const e=this._clearOutcomes();if(e.length===0){(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ut.log("No outcomes to send");return}if(!this._dsn){(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ut.log("No dsn provided, will not send outcomes");return}(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ut.log("Sending outcomes:",e);const i=dk(e,this._options.tunnel&&Za(this._dsn));this._sendEnvelope(i)}}let ua;function kT(){if(ua)return ua;if(Il(qt.fetch))return ua=qt.fetch.bind(qt);const t=qt.document;let e=qt.fetch;if(t&&typeof t.createElement=="function")try{const i=t.createElement("iframe");i.hidden=!0,t.head.appendChild(i);const n=i.contentWindow;n&&n.fetch&&(e=n.fetch),t.head.removeChild(i)}catch(i){(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ut.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return ua=e.bind(qt)}function TT(){ua=void 0}function ET(t,e=kT()){let i=0,n=0;function a(l){const g=l.body.length;i+=g,n++;const p=de({body:l.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:i<=6e4&&n<15},t.fetchOptions);try{return e(t.url,p).then(_=>(i-=g,n--,{statusCode:_.status,headers:{"x-sentry-rate-limits":_.headers.get("X-Sentry-Rate-Limits"),"retry-after":_.headers.get("Retry-After")}}))}catch(_){return TT(),i-=g,n--,no(_)}}return Kd(t,a)}const AT=4;function xT(t){function e(i){return new nr((n,a)=>{const l=new XMLHttpRequest;l.onerror=a,l.onreadystatechange=()=>{l.readyState===AT&&n({statusCode:l.status,headers:{"x-sentry-rate-limits":l.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":l.getResponseHeader("Retry-After")}})},l.open("POST",t.url);for(const g in t.headers)Object.prototype.hasOwnProperty.call(t.headers,g)&&l.setRequestHeader(g,t.headers[g]);l.send(i.body)})}return Kd(t,e)}const fo="?",wT=30,PT=40,CT=50;function Hl(t,e,i,n){const a={filename:t,function:e,in_app:!0};return i!==void 0&&(a.lineno=i),n!==void 0&&(a.colno=n),a}const LT=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,IT=/\((\S*)(?::(\d+))(?::(\d+))\)/,RT=[wT,t=>{const e=LT.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){const l=IT.exec(e[2]);l&&(e[2]=l[1],e[3]=l[2],e[4]=l[3])}const[n,a]=Qd(e[1]||fo,e[2]);return Hl(a,n,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],DT=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,OT=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,BT=[CT,t=>{const e=DT.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const l=OT.exec(e[3]);l&&(e[1]=e[1]||"eval",e[3]=l[1],e[4]=l[2],e[5]="")}let n=e[3],a=e[1]||fo;return[a,n]=Qd(a,n),Hl(n,a,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],MT=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,NT=_d(...[RT,BT,[PT,t=>{const e=MT.exec(t);return e?Hl(e[2],e[1]||fo,+e[3],e[4]?+e[4]:void 0):void 0}]]),Qd=(t,e)=>{const i=t.indexOf("safari-extension")!==-1,n=t.indexOf("safari-web-extension")!==-1;return i||n?[t.indexOf("@")!==-1?t.split("@")[0]:fo,i?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};class Un{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=Un.id}__init2(){this._installFunc={onerror:FT,onunhandledrejection:UT}}constructor(e){Un.prototype.__init.call(this),Un.prototype.__init2.call(this),this._options=de({onerror:!0,onunhandledrejection:!0},e)}setupOnce(){Error.stackTraceLimit=50;const e=this._options;for(const i in e){const n=this._installFunc[i];n&&e[i]&&(jT(i),n(),this._installFunc[i]=void 0)}}}Un.__initStatic();function FT(){Mn("error",t=>{const[e,i,n]=tf();if(!e.getIntegration(Un))return;const{msg:a,url:l,line:g,column:p,error:_}=t;if(Xd()||_&&_.__sentry_own_request__)return;const k=_===void 0&&es(a)?WT(a,l,g,p):$d(Gl(i,_||a,void 0,n,!1),l,g,p);k.level="error",ef(e,_,k,"onerror")})}function UT(){Mn("unhandledrejection",t=>{const[e,i,n]=tf();if(!e.getIntegration(Un))return;let a=t;try{"reason"in t?a=t.reason:"detail"in t&&"reason"in t.detail&&(a=t.detail.reason)}catch(g){}if(Xd()||a&&a.__sentry_own_request__)return!0;const l=od(a)?VT(a):Gl(i,a,void 0,n,!0);l.level="error",ef(e,a,l,"onunhandledrejection")})}function VT(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function WT(t,e,i,n){const a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let l=Sl(t)?t.message:t,g="Error";const p=l.match(a);return p&&(g=p[1],l=p[2]),$d({exception:{values:[{type:g,value:l}]}},e,i,n)}function $d(t,e,i,n){const a=t.exception=t.exception||{},l=a.values=a.values||[],g=l[0]=l[0]||{},p=g.stacktrace=g.stacktrace||{},_=p.frames=p.frames||[],k=isNaN(parseInt(n,10))?void 0:n,T=isNaN(parseInt(i,10))?void 0:i,C=es(e)&&e.length>0?e:_S();return _.length===0&&_.push({colno:k,filename:C,function:"?",in_app:!0,lineno:T}),t}function jT(t){(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ut.log(`Global Handler attached: ${t}`)}function ef(t,e,i,n){sa(i,{handled:!1,type:n}),t.captureEvent(i,{originalException:e})}function tf(){const t=Ci(),e=t.getClient(),i=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,i.stackParser,i.attachStacktrace]}const GT=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class ca{static __initStatic(){this.id="TryCatch"}__init(){this.name=ca.id}constructor(e){ca.prototype.__init.call(this),this._options=de({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e)}setupOnce(){this._options.setTimeout&&Wi(qt,"setTimeout",rf),this._options.setInterval&&Wi(qt,"setInterval",rf),this._options.requestAnimationFrame&&Wi(qt,"requestAnimationFrame",zT),this._options.XMLHttpRequest&&"XMLHttpRequest"in qt&&Wi(XMLHttpRequest.prototype,"send",HT);const e=this._options.eventTarget;e&&(Array.isArray(e)?e:GT).forEach(KT)}}ca.__initStatic();function rf(t){return function(...e){const i=e[0];return e[0]=Rs(i,{mechanism:{data:{function:Bn(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function zT(t){return function(e){return t.apply(this,[Rs(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Bn(t)},handled:!0,type:"instrument"}})])}}function HT(t){return function(...e){const i=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in i&&typeof i[a]=="function"&&Wi(i,a,function(l){const g={mechanism:{data:{function:a,handler:Bn(l)},handled:!0,type:"instrument"}},p=xl(l);return p&&(g.mechanism.data.handler=Bn(p)),Rs(l,g)})}),t.apply(this,e)}}function KT(t){const e=qt,i=e[t]&&e[t].prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(Wi(i,"addEventListener",function(n){return function(a,l,g){try{typeof l.handleEvent=="function"&&(l.handleEvent=Rs(l.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Bn(l),target:t},handled:!0,type:"instrument"}}))}catch(p){}return n.apply(this,[a,Rs(l,{mechanism:{data:{function:"addEventListener",handler:Bn(l),target:t},handled:!0,type:"instrument"}}),g])}}),Wi(i,"removeEventListener",function(n){return function(a,l,g){const p=l;try{const _=p&&p.__sentry_wrapped__;_&&n.call(this,a,_,g)}catch(_){}return n.call(this,a,p,g)}}))}const YT="cause",qT=5;class Ds{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=Ds.id}constructor(e={}){Ds.prototype.__init.call(this),this._key=e.key||YT,this._limit=e.limit||qT}setupOnce(){const e=Ci().getClient();e&&ao((i,n)=>{const a=Ci().getIntegration(Ds);return a?XT(e.getOptions().stackParser,a._key,a._limit,i,n):i})}}Ds.__initStatic();function XT(t,e,i,n,a){if(!n.exception||!n.exception.values||!a||!Ps(a.originalException,Error))return n;const l=nf(t,i,a.originalException,e);return n.exception.values=[...l,...n.exception.values],n}function nf(t,e,i,n,a=[]){if(!Ps(i[n],Error)||a.length+1>=e)return a;const l=Zd(t,i[n]);return nf(t,e,i[n],n,[l,...a])}class Os{constructor(){Os.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=Os.id}setupOnce(){ao(e=>{if(Ci().getIntegration(Os)){if(!qt.navigator&&!qt.location&&!qt.document)return e;const i=e.request&&e.request.url||qt.location&&qt.location.href,{referrer:n}=qt.document||{},{userAgent:a}=qt.navigator||{},l=de(de(de({},e.request&&e.request.headers),n&&{Referer:n}),a&&{"User-Agent":a}),g=ni(de(de({},e.request),i&&{url:i}),{headers:l});return ni(de({},e),{request:g})}return e})}}Os.__initStatic();class Bs{constructor(){Bs.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=Bs.id}setupOnce(e,i){const n=a=>{if(a.type)return a;const l=i().getIntegration(Bs);if(l){try{if(ZT(a,l._previousEvent))return(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ut.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(g){return l._previousEvent=a}return l._previousEvent=a}return a};n.id=this.name,e(n)}}Bs.__initStatic();function ZT(t,e){return e?!!(JT(t,e)||QT(t,e)):!1}function JT(t,e){const i=t.message,n=e.message;return!(!i&&!n||i&&!n||!i&&n||i!==n||!af(t,e)||!sf(t,e))}function QT(t,e){const i=of(e),n=of(t);return!(!i||!n||i.type!==n.type||i.value!==n.value||!af(t,e)||!sf(t,e))}function sf(t,e){let i=lf(t),n=lf(e);if(!i&&!n)return!0;if(i&&!n||!i&&n||(i=i,n=n,n.length!==i.length))return!1;for(let a=0;a<n.length;a++){const l=n[a],g=i[a];if(l.filename!==g.filename||l.lineno!==g.lineno||l.colno!==g.colno||l.function!==g.function)return!1}return!0}function af(t,e){let i=t.fingerprint,n=e.fingerprint;if(!i&&!n)return!0;if(i&&!n||!i&&n)return!1;i=i,n=n;try{return i.join("")===n.join("")}catch(a){return!1}}function of(t){return t.exception&&t.exception.values&&t.exception.values[0]}function lf(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(i){return}}const $T=[new Is,new oa,new ca,new la,new Un,new Ds,new Bs,new Os];function e2(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=$T),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),qt.SENTRY_RELEASE&&qt.SENTRY_RELEASE.id&&(t.release=qt.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);const e=ni(de({},t),{stackParser:CS(t.stackParser||NT),integrations:Ok(t),transport:t.transport||(yd()?ET:xT)});Hk(ST,e),t.autoSessionTracking&&t2()}function uf(t){t.startSession({ignoreDuration:!0}),t.captureSession()}function t2(){if(typeof qt.document=="undefined"){(typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__)&&ut.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}const t=Ci();t.captureSession&&(uf(t),Mn("history",({from:e,to:i})=>{e===void 0||e===i||uf(Ci())}))}function i2(t){t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.svelte",packages:[{name:"npm:@sentry/svelte",version:lo}],version:lo},e2(t),r2()}function r2(){let t;const e=i=>(t===void 0&&(t=n2()),t&&(i.modules=de({svelteKit:"latest"},i.modules)),i);e.id="svelteKitProcessor",ao(e)}function n2(){return yS("div#svelte-announcer")!==null}let cf=!1;const s2=({captureErrors:t})=>{if(!(t!==!1)||cf)return;cf=!0;const i=df(new Error),n=i==null?void 0:i.match(/initializeSentry/);i2(ni(de({},i?{}:{defaultIntegrations:!1}),{dsn:"https://ea2f0f2a070b4934994dc8543b8d16e1@o271781.ingest.sentry.io/4504853792882688",environment:n?"development":"production",release:Jo,beforeSend(l,{originalException:g}){var C;const _=df(g)===i,k=(C=g==null?void 0:g.message)==null?void 0:C.match(/request was interrupted/);if(n||_||k)return a2(l)}})),!i&&Ud(new Error(["Unable to determine the filename of the BeyondWords player script.","We therefore can't filter errors to only those originating from the player.","To avoid receiving unrelated errors from publishers, Sentry has been disabled."].join(`
|
|
90
|
-
`)))},df=t=>{var e;return(e=td((t==null?void 0:t.stack)||"")[0])==null?void 0:e.file},a2=t=>{var i,n;const e=((n=(i=window.BeyondWords)==null?void 0:i.Player)==null?void 0:n.instances())||[];for(const[a,l]of e.entries()){const g=`BeyondWords.Player.instances()[${a}]`;t.contexts=t.contexts||{},t.contexts[g]=Qs(l)}return t};let ff=!1;const o2=()=>{ff||(ff=!0,addEventListener("mousedown",l2),addEventListener("click",u2),addEventListener("mousemove",c2))},l2=t=>{vf=t.pageX,mf=t.pageY},u2=t=>{var i;if(t.defaultPrevented||d2(t)||t.button!==0)return;const e=(i=hf(t.target))==null?void 0:i.getAttribute(On);if(e)for(const n of BeyondWords.Player.instances()){const{segment:a,contentIndex:l,segmentIndex:g}=gf(n,e);a&&n.onEvent(qe({type:"PressedSegment",description:"The user pressed on a segment in the article.",initiatedBy:"user",emittedFrom:"segment",segment:a,contentIndex:l,segmentIndex:g}))}},c2=t=>{var n;const e=document.elementFromPoint(t.clientX,t.clientY),i=(n=hf(e))==null?void 0:n.getAttribute(On);for(const[a,l]of BeyondWords.Player.instances().entries()){const{segment:g,contentIndex:p,segmentIndex:_}=gf(l,i);f2(a,p,_)&&l.onEvent(qe({type:"HoveredSegmentUpdated",description:"The user hovered over a different segment in the article.",initiatedBy:"user",emittedFrom:"segment",segment:g,contentIndex:p,segmentIndex:_}))}},hf=t=>{for(;t&&t.hasAttribute;){if(t.hasAttribute(On))return t;if(t.onclick||t.onmousedown||t.nodeName.toLowerCase()==="a")return;t=t.parentNode}},gf=(t,e)=>{if(!e)return{};let i={},n=-1/0;for(const[a,l]of(t.content||[]).entries())for(const[g,p]of(l.segments||[]).entries()){if(e!==p.marker)continue;const _=t.contentIndex===a?1:0;_<n||_===n&&(i!=null&&i.segment)||(i={contentIndex:a,segmentIndex:g,segment:p},n=_)}return i};let vf,mf;const d2=t=>{const e=t.pageX-vf,i=t.pageY-mf;return Math.sqrt(e*e+i*i)>5},ho={},f2=(t,e,i)=>{ho[t]||(ho[t]={});const n=ho[t];return n.contentIndex===e&&n.segmentIndex===i?!1:(n.contentIndex=e,n.segmentIndex=i,!0)};class Kl{constructor(e){this.analyticsSink=e}sendToCustomAnalytics(e){return qy(this.analyticsSink,e)}sendToGoogleAnalytics(e,i){window.gtag("event",e,ni(de({},i),{send_to:this.analyticsSink}))}}const h2=(t,e)=>{const i=g2(t,e.type);if(!i)return;const n=v2(t,i);fg(n),t.analyticsUrl&&t.analyticsConsent!=="none"&&new Kl(t.analyticsUrl).sendToCustomAnalytics(n),t.analyticsCustomUrl&&t.analyticsConsent!=="none"&&new Kl(t.analyticsCustomUrl).sendToCustomAnalytics(n),t.analyticsTag&&new Kl(t.analyticsTag).sendToGoogleAnalytics(m2(n),n)},g2=(t,e)=>{if(!t.listenSessionId&&t.duration)return"load";if(e==="PlaybackPlaying"&&p2(t)&&(t.isNewListen=!0),e==="CurrentTimeUpdated"&&t.isNewListen)return t.isNewListen=!1,"play";if(e==="CurrentTimeUpdated"&&_2(t))return"play_progress";if(e.startsWith("PressedAdvert"))return"ad_link_click"},v2=(t,e)=>{var g;t.listenSessionId||(t.listenSessionId=Ia()),t.sessionCreatedAt||(t.sessionCreatedAt=Date.now());const i=["without-local-storage","none"].includes(t.analyticsConsent);i||localStorage.beyondwords||(localStorage.beyondwords=JSON.stringify(Ia()));const n=t.adverts[t.advertIndex],a=t.content[t.contentIndex],l=t.currentTime/t.duration*100;return{event_type:e,device_type:y2(),media_type:n?"ad":"content",project_id:t.projectId,content_id:a==null?void 0:a.id,source_id:a==null?void 0:a.sourceId,analytics_id:t.analyticsId,ad_id:n==null?void 0:n.id,media_id:(g=t.loadedMedia)==null?void 0:g.id,local_storage_id:i?null:JSON.parse(localStorage.beyondwords),listen_session_id:t.listenSessionId,session_created_at:t.sessionCreatedAt,duration:t.duration,listen_length_seconds:t.currentTime,listen_length_percent:Math.max(0,Math.min(100,l)),speed:t.playbackRate,location:window.location.href,referrer:document.referrer,player_version:"1",player_npm_version:Jo}},m2=({event_type:t,listen_length_percent:e})=>{const i=Math.floor(e/10)*10;if(t==="load")return"Load";if(t==="play")return"Play";if(t==="play_progress"&&i===100)return"Complete";if(t==="play_progress")return`${i}% listened`;if(t==="ad_link_click")return"Advert Click"},p2=t=>{var n,a;let e=!1;if(t.advertIndex!==-1){const l=((n=t.adverts[t.advertIndex])==null?void 0:n.id)||t.advertIndex;e=l!==t.prevAdvertId,t.prevAdvertId=l}else{const l=((a=t.content[t.contentIndex])==null?void 0:a.id)||t.contentIndex;e=l!==t.prevContentId,t.prevContentId=l}return e},_2=t=>{if(t.introsOutrosIndex!==-1)return;const e=t.prevPercentage+10,i=t.currentTime/t.duration*100;if(i>=e)return t.prevPercentage=Math.floor(i/10)*10,!0},y2=()=>pf(499)?"phone":pf(999)?"tablet":"desktop",pf=t=>window.matchMedia&&window.matchMedia(`only screen and (max-device-width: ${t}px)`).matches,yn=class yn extends vb{constructor(n){var a=n,{target:e}=a,i=vu(a,["target"]);cS(),uS(i),s2(i),o2();const{newTarget:l,showUserInterface:g}=ab(e);l.classList.add("beyondwords-player","bwp");const p=new Zb(null,yn);p.addEventListener("<any>",k=>h2(this,k));const _=de({showUserInterface:g},i);super({target:l,props:ni(de({controller:p},_),{initialProps:_})}),p.player=this,jr(yn,Vn).push(this)}static get version(){return Jo}static instances(){return[...jr(yn,Vn)]}static destroyAll(){jr(yn,Vn).forEach(e=>e.destroy())}destroy(){this.$destroy(),dh(yn,Vn,jr(yn,Vn).filter(e=>e!==this))}get target(){return this.$$.root}set target(e){rr(["Unable to change the player's target after initialization.","Call player.destroy() and initialize a new player, instead.","","Alternatively, you can show or hide the player with:","player.showUserInterface = <bool>"])}};Vn=new WeakMap,ht(yn,Vn,[]);let go=yn;return typeof window!="undefined"&&(window.BeyondWords||(window.BeyondWords={}),(_f=window.BeyondWords).Player||(_f.Player=go)),{Player:go}});
|
|
90
|
+
`)))},df=t=>{var e;return(e=td((t==null?void 0:t.stack)||"")[0])==null?void 0:e.file},a2=t=>{var i,n;const e=((n=(i=window.BeyondWords)==null?void 0:i.Player)==null?void 0:n.instances())||[];for(const[a,l]of e.entries()){const g=`BeyondWords.Player.instances()[${a}]`;t.contexts=t.contexts||{},t.contexts[g]=Qs(l)}return t};let ff=!1;const o2=()=>{ff||(ff=!0,addEventListener("mousedown",l2),addEventListener("click",u2),addEventListener("mousemove",c2))},l2=t=>{vf=t.pageX,mf=t.pageY},u2=t=>{var i;if(t.defaultPrevented||d2(t)||t.button!==0)return;const e=(i=hf(t.target))==null?void 0:i.getAttribute(On);if(e)for(const n of BeyondWords.Player.instances()){const{segment:a,contentIndex:l,segmentIndex:g}=gf(n,e);a&&n.onEvent(qe({type:"PressedSegment",description:"The user pressed on a segment in the article.",initiatedBy:"user",emittedFrom:"segment",segment:a,contentIndex:l,segmentIndex:g}))}},c2=t=>{var n;const e=document.elementFromPoint(t.clientX,t.clientY),i=(n=hf(e))==null?void 0:n.getAttribute(On);for(const[a,l]of BeyondWords.Player.instances().entries()){const{segment:g,contentIndex:p,segmentIndex:_}=gf(l,i);f2(a,p,_)&&l.onEvent(qe({type:"HoveredSegmentUpdated",description:"The user hovered over a different segment in the article.",initiatedBy:"user",emittedFrom:"segment",segment:g,contentIndex:p,segmentIndex:_}))}},hf=t=>{for(;t&&t.hasAttribute;){if(t.hasAttribute(On))return t;if(t.onclick||t.onmousedown||t.nodeName.toLowerCase()==="a")return;t=t.parentNode}},gf=(t,e)=>{if(!e)return{};let i={},n=-1/0;for(const[a,l]of(t.content||[]).entries())for(const[g,p]of(l.segments||[]).entries()){if(e!==p.marker)continue;const _=t.contentIndex===a?1:0;_<n||_===n&&(i!=null&&i.segment)||(i={contentIndex:a,segmentIndex:g,segment:p},n=_)}return i};let vf,mf;const d2=t=>{const e=t.pageX-vf,i=t.pageY-mf;return Math.sqrt(e*e+i*i)>5},ho={},f2=(t,e,i)=>{ho[t]||(ho[t]={});const n=ho[t];return n.contentIndex===e&&n.segmentIndex===i?!1:(n.contentIndex=e,n.segmentIndex=i,!0)};class Kl{constructor(e){this.analyticsSink=e}sendToCustomAnalytics(e){return qy(this.analyticsSink,e)}sendToGoogleAnalytics(e,i){window.gtag("event",e,ni(de({},i),{send_to:this.analyticsSink}))}}const h2=(t,e)=>{const i=g2(t,e.type);if(!i)return;const n=v2(t,i);fg(n),t.analyticsUrl&&t.analyticsConsent!=="none"&&new Kl(t.analyticsUrl).sendToCustomAnalytics(n),t.analyticsCustomUrl&&t.analyticsConsent!=="none"&&new Kl(t.analyticsCustomUrl).sendToCustomAnalytics(n),t.analyticsTag&&new Kl(t.analyticsTag).sendToGoogleAnalytics(m2(n),n)},g2=(t,e)=>{if(!t.listenSessionId&&t.duration)return"load";if(e==="PlaybackPlaying"&&p2(t)&&(t.isNewListen=!0),e==="CurrentTimeUpdated"&&t.isNewListen)return t.isNewListen=!1,"play";if(e==="CurrentTimeUpdated"&&_2(t))return"play_progress";if(e.startsWith("PressedAdvert"))return"ad_link_click"},v2=(t,e)=>{var g;t.listenSessionId||(t.listenSessionId=Ia()),t.sessionCreatedAt||(t.sessionCreatedAt=Date.now());const i=["without-local-storage","none"].includes(t.analyticsConsent);i||localStorage.beyondwords||(localStorage.beyondwords=JSON.stringify(Ia()));const n=t.adverts[t.advertIndex],a=t.content[t.contentIndex],l=t.duration?t.currentTime/t.duration*100:0;return{event_type:e,device_type:y2(),media_type:n?"ad":"content",project_id:t.projectId,content_id:a==null?void 0:a.id,source_id:a==null?void 0:a.sourceId,analytics_id:t.analyticsId,ad_id:n==null?void 0:n.id,media_id:(g=t.loadedMedia)==null?void 0:g.id,local_storage_id:i?null:JSON.parse(localStorage.beyondwords),listen_session_id:t.listenSessionId,session_created_at:t.sessionCreatedAt,duration:t.duration,listen_length_seconds:t.currentTime,listen_length_percent:Math.max(0,Math.min(100,l)),speed:t.playbackRate,location:window.location.href,referrer:document.referrer,player_version:"1",player_npm_version:Jo}},m2=({event_type:t,listen_length_percent:e})=>{const i=Math.floor(e/10)*10;if(t==="load")return"Load";if(t==="play")return"Play";if(t==="play_progress"&&i===100)return"Complete";if(t==="play_progress")return`${i}% listened`;if(t==="ad_link_click")return"Advert Click"},p2=t=>{var n,a;let e=!1;if(t.advertIndex!==-1){const l=((n=t.adverts[t.advertIndex])==null?void 0:n.id)||t.advertIndex;e=l!==t.prevAdvertId,t.prevAdvertId=l}else{const l=((a=t.content[t.contentIndex])==null?void 0:a.id)||t.contentIndex;e=l!==t.prevContentId,t.prevContentId=l}return e},_2=t=>{if(t.introsOutrosIndex!==-1)return;const e=t.prevPercentage+10,i=t.currentTime/t.duration*100;if(i>=e)return t.prevPercentage=Math.floor(i/10)*10,!0},y2=()=>pf(499)?"phone":pf(999)?"tablet":"desktop",pf=t=>window.matchMedia&&window.matchMedia(`only screen and (max-device-width: ${t}px)`).matches,yn=class yn extends vb{constructor(n){var a=n,{target:e}=a,i=vu(a,["target"]);cS(),uS(i),s2(i),o2();const{newTarget:l,showUserInterface:g}=ab(e);l.classList.add("beyondwords-player","bwp");const p=new Zb(null,yn);p.addEventListener("<any>",k=>h2(this,k));const _=de({showUserInterface:g},i);super({target:l,props:ni(de({controller:p},_),{initialProps:_})}),p.player=this,jr(yn,Vn).push(this)}static get version(){return Jo}static instances(){return[...jr(yn,Vn)]}static destroyAll(){jr(yn,Vn).forEach(e=>e.destroy())}destroy(){this.$destroy(),dh(yn,Vn,jr(yn,Vn).filter(e=>e!==this))}get target(){return this.$$.root}set target(e){rr(["Unable to change the player's target after initialization.","Call player.destroy() and initialize a new player, instead.","","Alternatively, you can show or hide the player with:","player.showUserInterface = <bool>"])}};Vn=new WeakMap,ht(yn,Vn,[]);let go=yn;return typeof window!="undefined"&&(window.BeyondWords||(window.BeyondWords={}),(_f=window.BeyondWords).Player||(_f.Player=go)),{Player:go}});
|
|
91
91
|
//# sourceMappingURL=umd.js.map
|