1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./B2WH9h9e.js","./BQkmyumQ.js"])))=>i.map(i=>d[i]); 2import{r as At}from"./CfSZB2vO.js";var Yl="modulepreload",Xl=function(t,e){return new URL(t,e).href},Er={},ut=function(e,i,s){let n=Promise.resolve();if(i&&i.length>0){let h=function(d){return Promise.all(d.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))},c=function(d){return import.meta.resolve?import.meta.resolve(d):new URL(d,import.meta.url).href};const a=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),l=o?.nonce||o?.getAttribute("nonce");n=h(i.map(d=>{if(d=Xl(d,s),d=c(d),d in Er)return;Er[d]=!0;const p=d.endsWith(".css");for(let v=a.length-1;v>=0;v--){const b=a[v];if(b.href===d&&(!p||b.rel==="stylesheet"))return}const m=document.createElement("link");if(m.rel=p?"stylesheet":Yl,p||(m.as="script"),m.crossOrigin="",m.href=d,l&&m.setAttribute("nonce",l),document.head.appendChild(m),p)return new Promise((v,b)=>{m.addEventListener("load",v),m.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${d}`)))})}))}function r(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return n.then(a=>{for(const o of a||[])o.status==="rejected"&&r(o.reason);return e().catch(r)})},Ft=Symbol(0),Yi=!1,un=!1,Rt=null,He=null,It=null,xt=0,Ne=[],kn={},Jl=()=>{},Qe=0,Aa=1,Xi=2,ys=3;function tc(){Yi=!0,queueMicrotask(La)}function La(){if(!Ne.length){Yi=!1;return}un=!0;for(let t=0;t<Ne.length;t++)Ne[t].$st!==Qe&&ec(Ne[t]);Ne=[],Yi=!1,un=!1}function ec(t){let e=[t];for(;t=t[Ft];)t.$e&&t.$st!==Qe&&e.push(t);for(let i=e.length-1;i>=0;i--)Ln(e[i])}function ic(t){const e=le();return Ti(e,t.length?t.bind(null,Ge.bind(e)):t,null)}function y(t){return Ti(Rt,t,null)}function Be(t){return Ti(null,t,null)}function Nt(){un||La()}function vs(){return Rt}function lt(t,e){try{return Ti(e,t,null)}catch(i){Sn(e,i);return}}function Ma(t,e=Rt){return e?.$cx[t]}function sc(t,e,i=Rt){i&&(i.$cx={...i.$cx,[t]:e})}function E(t){if(!t||!Rt)return t||Jl;const e=Rt;return e.$d?Array.isArray(e.$d)?e.$d.push(t):e.$d=[e.$d,t]:e.$d=t,function(){e.$st!==ys&&(t.call(null),bs(e.$d)?e.$d=null:Array.isArray(e.$d)&&e.$d.splice(e.$d.indexOf(t),1))}}function Ge(t=!0){if(this.$st!==ys){if(this.$h)if(Array.isArray(this.$h))for(let e=this.$h.length-1;e>=0;e--)Ge.call(this.$h[e]);else Ge.call(this.$h);if(t){const e=this[Ft];e&&(Array.isArray(e.$h)?e.$h.splice(e.$h.indexOf(this),1):e.$h=null),nc(this)}}}function nc(t){t.$st=ys,t.$d&&_a(t),t.$s&&hn(t,0),t[Ft]=null,t.$s=null,t.$o=null,t.$h=null,t.$cx=kn,t.$eh=null}function _a(t){try{if(Array.isArray(t.$d))for(let e=t.$d.length-1;e>=0;e--){const i=t.$d[e];i.call(i)}else t.$d.call(t.$d);t.$d=null}catch(e){Sn(t,e)}}function Ti(t,e,i){const s=Rt,n=He;Rt=t,He=i;try{return e.call(t)}finally{Rt=s,He=n}}function Sn(t,e){if(!t||!t.$eh)throw e;let i=0,s=t.$eh.length,n=e;for(i=0;i<s;i++)try{t.$eh[i](n);break}catch(r){n=r}if(i===s)throw n}function xn(){return this.$st===ys?this.$v:(He&&!this.$e&&(!It&&He.$s&&He.$s[xt]==this?xt++:It?It.push(this):It=[this]),this.$c&&Ln(this),this.$v)}function Ia(t){const e=bs(t)?t(this.$v):t;if(this.$ch(this.$v,e)&&(this.$v=e,this.$o))for(let i=0;i<this.$o.length;i++)Ra(this.$o[i],Xi);return this.$v}var Pn=function(){this[Ft]=null,this.$h=null,Rt&&Rt.append(this)},Ie=Pn.prototype;Ie.$cx=kn;Ie.$eh=null;Ie.$c=null;Ie.$d=null;Ie.append=function(t){t[Ft]=this,this.$h?Array.isArray(this.$h)?this.$h.push(t):this.$h=[this.$h,t]:this.$h=t,t.$cx=t.$cx===kn?this.$cx:{...this.$cx,...t.$cx},this.$eh&&(t.$eh=t.$eh?[...t.$eh,...this.$eh]:this.$eh)};Ie.dispose=function(){Ge.call(this)};function le(){return new Pn}var Va=function(e,i,s){Pn.call(this),this.$st=i?Xi:Qe,this.$i=!1,this.$e=!1,this.$s=null,this.$o=null,this.$v=e,i&&(this.$c=i),s&&s.dirty&&(this.$ch=s.dirty)},En=Va.prototype;Object.setPrototypeOf(En,Ie);En.$ch=rc;En.call=xn;function An(t,e,i){return new Va(t,e,i)}function rc(t,e){return t!==e}function bs(t){return typeof t=="function"}function Ln(t){if(t.$st===Aa)for(let e=0;e<t.$s.length&&(Ln(t.$s[e]),t.$st!==Xi);e++);t.$st===Xi?Da(t):t.$st=Qe}function ac(t){t.$h&&Ge.call(t,!1),t.$d&&_a(t),t.$eh=t[Ft]?t[Ft].$eh:null}function Da(t){let e=It,i=xt;It=null,xt=0;try{ac(t);const s=Ti(t,t.$c,t);Ar(t),!t.$e&&t.$i?Ia.call(t,s):(t.$v=s,t.$i=!0)}catch(s){Ar(t),Sn(t,s)}finally{It=e,xt=i,t.$st=Qe}}function Ar(t){if(It){if(t.$s&&hn(t,xt),t.$s&&xt>0){t.$s.length=xt+It.length;for(let i=0;i<It.length;i++)t.$s[xt+i]=It[i]}else t.$s=It;let e;for(let i=xt;i<t.$s.length;i++)e=t.$s[i],e.$o?e.$o.push(t):e.$o=[t]}else t.$s&&xt<t.$s.length&&(hn(t,xt),t.$s.length=xt)}function Ra(t,e){if(!(t.$st>=e)&&(t.$e&&t.$st===Qe&&(Ne.push(t),Yi||tc()),t.$st=e,t.$o))for(let i=0;i<t.$o.length;i++)Ra(t.$o[i],Aa)}function hn(t,e){let i,s;for(let n=e;n<t.$s.length;n++)i=t.$s[n],i.$o&&(s=i.$o.indexOf(t),i.$o[s]=i.$o[i.$o.length-1],i.$o.pop())}function C(t,e){const i=An(t,null,e),s=xn.bind(i);return s[Ft]=!0,s.set=Ia.bind(i),s}function oc(t){return bs(t)&&Ft in t}function F(t,e){const i=An(e?.initial,t,e),s=xn.bind(i);return s[Ft]=!0,s}function lc(t,e){const i=An(null,function(){let n=t();return bs(n)&&E(n),null},void 0);return i.$e=!0,Da(i),Ge.bind(i,!0)}function cc(t){return oc(t)&&"set"in t}function Ue(...t){}function Ht(t){return t===null}function ct(t){return typeof t>"u"}function Oa(t){return Ht(t)||ct(t)}function qa(t){return t?.constructor===Object}function it(t){return typeof t=="number"&&!Number.isNaN(t)}function w(t){return typeof t=="string"}function gi(t){return typeof t=="boolean"}function ft(t){return typeof t=="function"}function Q(t){return Array.isArray(t)}var u=lc,uc=Event,Na=Symbol("DOM_EVENT"),I=class extends uc{get trigger(){return this.triggers.source}get originEvent(){return this.triggers.origin}get isOriginTrusted(){return this.triggers.origin?.isTrusted??!1}constructor(t,...e){super(t,e[0]),this[Na]=!0,this.triggers=new hc,this.detail=e[0]?.detail;const i=e[0]?.trigger;i&&this.triggers.add(i)}},hc=class{constructor(){this.chain=[]}get source(){return this.chain[0]}get origin(){return this.chain[this.chain.length-1]}add(t){this.chain.push(t),dc(t)&&this.chain.push(...t.triggers)}remove(t){return this.chain.splice(this.chain.indexOf(t),1)[0]}has(t){return this.chain.some(e=>e===t)}hasType(t){return!!this.findType(t)}findType(t){return this.chain.find(e=>e.type===t)}walk(t){for(const e of this.chain){const i=t(e);if(i)return[e,i]}}[Symbol.iterator](){return this.chain.values()}};function dc(t){return!!t?.[Na]}
2var Ha=class extends EventTarget{addEventListener(t,e,i){return super.addEventListener(t,e,i)}removeEventListener(t,e,i){return super.removeEventListener(t,e,i)}};function O(t,e,i,s){return t.addEventListener(e,i,s),E(()=>t.removeEventListener(e,i,s))}var B=class{#t;#e;get signal(){return this.#e.signal}constructor(t){this.#t=t,this.#e=new AbortController,E(this.abort.bind(this))}add(t,e,i){if(this.signal.aborted)throw Error("aborted");return this.#t.addEventListener(t,e,{...i,signal:i?.signal?pc(this.signal,i.signal):this.signal}),this}remove(t,e){return this.#t.removeEventListener(t,e),this}abort(t){this.#e.abort(t)}};function pc(...t){const e=new AbortController,i={signal:e.signal};function s(n){e.abort(n.target.reason)}for(const n of t){if(n.aborted){e.abort(n.reason);break}n.addEventListener("abort",s,i)}return e.signal}function Lr(t){return!!t?.type.startsWith("pointer")}function ai(t){return!!t?.type.startsWith("touch")}function fc(t){return/^(click|mouse)/.test(t?.type??"")}function ze(t){return!!t?.type.startsWith("key")}function mc(t){return ze(t)&&t.key==="Enter"}function ki(t){return ze(t)&&(t.key==="Enter"||t.key===" ")}function Fa(t){return t instanceof Node}function $(t,e,i){if(t)if(!i&&i!==""&&i!==0)t.removeAttribute(e);else{const s=i===!0?"":i+"";t.getAttribute(e)!==s&&t.setAttribute(e,s)}else return}function bt(t,e,i){if(t)!i&&i!==0?t.style.removeProperty(e):t.style.setProperty(e,i+"");else return}function dn(t,e,i){t.classList[i?"add":"remove"](e)}function Ji(t){return ft(t)?t():t}function Ut(t){return{id:Symbol(),provide:t}}function mt(t,e,i=vs()){const s=!ct(e);sc(t.id,s?e:t.provide?.(),i)}function W(t){return Ma(t.id)}function Et(t){return!ct(Ma(t.id))}var ci=Symbol(0),ui=Symbol(0),Ba=Symbol(0),Us={},gc=class{#t;#e;#i;#s;constructor(t,e,i){this[Ba]=null,this.$el=C(null),this.el=null,this.scope=null,this.attachScope=null,this.connectScope=null,this.component=null,this.destroyed=!1,this.props=Us,this.attrs=null,this.styles=null,this.#t=[],this.#e=[],this.#i=[],this.#s=[],this.scope=e,i?.scope&&i.scope.append(e);let s=t.state,n=t.props;if(s&&(this.$state=s.create(),this.state=new Proxy(this.$state,{get:(r,a)=>this.$state[a]()}),mt(s,this.$state)),n&&(this.props=yc(n),i?.props))for(const r of Object.keys(i.props))this.props[r]?.set(i.props[r]);E(this.destroy.bind(this))}setup(){lt(()=>{for(const t of this.#t)t()},this.scope)}attach(t){this.el||(this.el=t,this.$el.set(t),lt(()=>{this.attachScope=le(),lt(()=>{for(const e of this.#e)e(this.el);this.#n(),this.#r()},this.attachScope)},this.scope),t.dispatchEvent(new Event("attached")))}detach(){this.attachScope?.dispose(),this.attachScope=null,this.connectScope=null,this.el=null,this.$el.set(null)}connect(){!this.el||!this.attachScope||!this.#i.length||lt(()=>{this.connectScope=le(),lt(()=>{for(const t of this.#i)t(this.el)},this.connectScope)},this.attachScope)}disconnect(){this.connectScope?.dispose(),this.connectScope=null}destroy(){if(this.destroyed)return;this.destroyed=!0,lt(()=>{for(const e of this.#s)e(this.el)},this.scope);const t=this.el;this.detach(),this.scope.dispose(),this.#t.length=0,this.#e.length=0,this.#i.length=0,this.#s.length=0,this.component=null,this.attrs=null,this.styles=null,this.props=Us,this.scope=null,this.state=Us,this.$state=null,t&&delete t.$}addHooks(t){t.onSetup&&this.#t.push(t.onSetup.bind(t)),t.onAttach&&this.#e.push(t.onAttach.bind(t)),t.onConnect&&this.#i.push(t.onConnect.bind(t)),t.onDestroy&&this.#s.push(t.onDestroy.bind(t))}#n(){if(this.attrs)for(const t of Object.keys(this.attrs))ft(this.attrs[t])?u(this.#a.bind(this,t)):$(this.el,t,this.attrs[t])}#r(){if(this.styles)for(const t of Object.keys(this.styles))ft(this.styles[t])?u(this.#l.bind(this,t)):bt(this.el,t,this.styles[t])}#a(t){$(this.el,t,this.attrs[t].call(this.component))}#l(t){bt(this.el,t,this.styles[t].call(this.component))}};function yc(t){const e={};for(const i of Object.keys(t)){const s=t[i];e[i]=C(s,s)}return e}var hi={$$:null};function vc(t,e){return ic(()=>{hi.$$=new gc(t,vs(),e);const i=new t;return hi.$$.component=i,hi.$$=null,i})}
2var Dt=class extends EventTarget{get el(){return this.$$.el}get $el(){return this.$$.$el()}get scope(){return this.$$.scope}get attachScope(){return this.$$.attachScope}get connectScope(){return this.$$.connectScope}get $props(){return this.$$.props}get $state(){return this.$$.$state}get state(){return this.$$.state}constructor(){super(),hi.$$&&this.attach(hi)}attach({$$:t}){return this.$$=t,t.addHooks(this),this}addEventListener(t,e,i){this.listen(t,e,i)}removeEventListener(t,e,i){this.el?.removeEventListener(t,e,i)}setAttributes(t){this.$$.attrs||(this.$$.attrs={}),Object.assign(this.$$.attrs,t)}setStyles(t){this.$$.styles||(this.$$.styles={}),Object.assign(this.$$.styles,t)}setCSSVars(t){this.setStyles(t)}createEvent(t,...e){return new I(t,e[0])}dispatch(t,...e){if(!this.el)return!1;const i=t instanceof Event?t:new I(t,e[0]);return Object.defineProperty(i,"target",{get:()=>this.$$.component}),Be(()=>(this.$$[Ba]?.(i),this.el.dispatchEvent(i)))}dispatchEvent(t){return this.dispatch(t)}listen(t,e,i){return this.el?O(this.el,t,e,i):Ue}},x=class extends Dt{subscribe(t){return lt(()=>u(()=>t(this.state)),this.$$.scope)}destroy(){this.$$.destroy()}};function V(t,e,i){t[ci]||(t[ci]=new Set),t[ci].add(e)}function X(t,e,i){t[ui]||(t[ui]=new Set),t[ui].add(e)}var de=class{#t;constructor(t){this.id=Symbol(0),this.record=t,this.#t=Object.getOwnPropertyDescriptors(t)}create(){const t={},e=new Proxy(t,{get:(i,s)=>t[s]()});for(const i of Object.keys(this.record)){const s=this.#t[i].get;t[i]=s?F(s.bind(e)):C(this.record[i])}return t}reset(t,e){for(const i of Object.keys(t))!this.#t[i].get&&(!e||e(i))&&t[i].set(this.record[i])}};function Ye(t){return W(t)}function bc(t,e){for(const i of t)i(e)}function Xt(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Cc(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function Mn(t){return t.charAt(0).toUpperCase()+t.slice(1)}function ts(t){return t?"true":"false"}function $c(){const t=new Set;return{add(...e){for(const i of e)t.add(i)},empty(){for(const e of t)e();t.clear()}}}function es(t){return Object.keys(t)}function We(){let t,e;return{promise:new Promise((i,s)=>{t=i,e=s}),resolve:t,reject:e}}function wc(t){return new Promise(e=>setTimeout(e,t))}function Jt(t){let e=-1,i;function s(...n){i=n,!(e>=0)&&(e=window.requestAnimationFrame(()=>{t.apply(this,i),e=-1,i=void 0}))}return s}var Tc=typeof window<"u"?"requestIdleCallback"in window?window.requestIdleCallback:t=>window.setTimeout(t,1):Ue;function kc(t,e){return new Promise(i=>{Tc(s=>{t?.(s),i()},e)})}var Ve=Sc;function Sc(t,e,i){var s=null,n=null,r=i&&i.leading,a=i&&i.trailing;r==null&&(r=!0),a==null&&(a=!r),r==!0&&(a=!1);var o=function(){s&&(clearTimeout(s),s=null)},l=function(){var c=n;o(),c&&c()},h=function(){var c=r&&!s,d=this,p=arguments;if(n=function(){return t.apply(d,p)},s||(s=setTimeout(function(){if(s=null,a)return n()},e)),c)return c=!1,n()};return h.cancel=o,h.flush=l,h}var _n=xc;function xc(t,e,i){var s=null,n=null,r=function(){s&&(clearTimeout(s),n=null,s=null)},a=function(){var l=n;r(),l&&l()},o=function(){if(!e)return t.apply(this,arguments);var l=this,h=arguments,c=i&&!s;
2if(r(),n=function(){t.apply(l,h)},s=setTimeout(function(){if(s=null,!c){var d=n;return n=null,d()}},e),c)return n()};return o.cancel=r,o.flush=a,o}var Mr=t=>typeof t=="object"&&t!=null&&t.nodeType===1,_r=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",Ni=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const i=getComputedStyle(t,null);return _r(i.overflowY,e)||_r(i.overflowX,e)||(s=>{const n=(r=>{if(!r.ownerDocument||!r.ownerDocument.defaultView)return null;try{return r.ownerDocument.defaultView.frameElement}catch{return null}})(s);return!!n&&(n.clientHeight<s.scrollHeight||n.clientWidth<s.scrollWidth)})(t)}return!1},Hi=(t,e,i,s,n,r,a,o)=>r<t&&a>e||r>t&&a<e?0:r<=t&&o<=i||a>=e&&o>=i?r-t-s:a>e&&o<i||r<t&&o>i?a-e+n:0,Pc=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},Ec=(t,e)=>{var i,s,n,r;if(typeof document>"u")return[];const{scrollMode:a,block:o,inline:l,boundary:h,skipOverflowHiddenElements:c}=e,d=typeof h=="function"?h:wt=>wt!==h;if(!Mr(t))throw new TypeError("Invalid target");const p=document.scrollingElement||document.documentElement,m=[];let v=t;for(;Mr(v)&&d(v);){if(v=Pc(v),v===p){m.push(v);break}v!=null&&v===document.body&&Ni(v)&&!Ni(document.documentElement)||v!=null&&Ni(v,c)&&m.push(v)}const b=(s=(i=window.visualViewport)==null?void 0:i.width)!=null?s:innerWidth,A=(r=(n=window.visualViewport)==null?void 0:n.height)!=null?r:innerHeight,{scrollX:D,scrollY:R}=window,{height:q,width:H,top:tt,right:j,bottom:Lt,left:yt}=t.getBoundingClientRect(),{top:$t,right:pt,bottom:Mt,left:se}=(wt=>{const N=window.getComputedStyle(wt);return{top:parseFloat(N.scrollMarginTop)||0,right:parseFloat(N.scrollMarginRight)||0,bottom:parseFloat(N.scrollMarginBottom)||0,left:parseFloat(N.scrollMarginLeft)||0}})(t);let st=o==="start"||o==="nearest"?tt-$t:o==="end"?Lt+Mt:tt+q/2-$t+Mt,J=l==="center"?yt+H/2-se+pt:l==="end"?j+pt:yt-se;const ye=[];for(let wt=0;wt<m.length;wt++){const N=m[wt],{height:Tt,width:kt,top:qe,right:Hs,bottom:Fs,left:Mi}=N.getBoundingClientRect();if(a==="if-needed"&&tt>=0&&yt>=0&&Lt<=A&&j<=b&&(N===p&&!Ni(N)||tt>=qe&&Lt<=Fs&&yt>=Mi&&j<=Hs))return ye;const _i=getComputedStyle(N),Ii=parseInt(_i.borderLeftWidth,10),Vi=parseInt(_i.borderTopWidth,10),Di=parseInt(_i.borderRightWidth,10),Ri=parseInt(_i.borderBottomWidth,10);let ne=0,re=0;const Oi="offsetWidth"in N?N.offsetWidth-N.clientWidth-Ii-Di:0,qi="offsetHeight"in N?N.offsetHeight-N.clientHeight-Vi-Ri:0,Bs="offsetWidth"in N?N.offsetWidth===0?0:kt/N.offsetWidth:0,Gs="offsetHeight"in N?N.offsetHeight===0?0:Tt/N.offsetHeight:0;if(p===N)ne=o==="start"?st:o==="end"?st-A:o==="nearest"?Hi(R,R+A,A,Vi,Ri,R+st,R+st+q,q):st-A/2,re=l==="start"?J:l==="center"?J-b/2:l==="end"?J-b:Hi(D,D+b,b,Ii,Di,D+J,D+J+H,H),ne=Math.max(0,ne+R),re=Math.max(0,re+D);else{ne=o==="start"?st-qe-Vi:o==="end"?st-Fs+Ri+qi:o==="nearest"?Hi(qe,Fs,Tt,Vi,Ri+qi,st,st+q,q):st-(qe+Tt/2)+qi/2,re=l==="start"?J-Mi-Ii:l==="center"?J-(Mi+kt/2)+Oi/2:l==="end"?J-Hs+Di+Oi:Hi(Mi,Hs,kt,Ii,Di+Oi,J,J+H,H);const{scrollLeft:xr,scrollTop:Pr}=N;ne=Gs===0?0:Math.max(0,Math.min(Pr+ne/Gs,N.scrollHeight-Tt/Gs+qi)),re=Bs===0?0:Math.max(0,Math.min(xr+re/Bs,N.scrollWidth-kt/Bs+Oi)),st+=Pr-ne,J+=xr-re}ye.push({el:N,top:ne,left:re})}return ye},Ws=t=>t===null?"":t+"",Ac=t=>t===null?null:t+"",Lc=t=>t===null?0:Number(t),Ga=t=>t!==null,Mc=()=>null,_c=t=>t===null?[]:JSON.parse(t),Ic=t=>t===null?{}:JSON.parse(t);function Vc(t){if(t===null)return Ac;switch(typeof t){case"undefined":return Ws;case"string":return Ws;case"boolean":return Ga;case"number":return Lc;case"function":return Mc;case"object":return Q(t)?_c:Ic;default:return Ws}}var ae=Symbol(0),Ua=Symbol(0),xe=Symbol(0),oi=Symbol(0);function S(t,e){class i extends t{static{this[ae]=null}static get observedAttributes(){if(!this[ae]&&e.props){const n=new Map;for(const r of Object.keys(e.props)){let a=this.attrs?.[r],o=w(a)?a:a&&a?.attr;o!==!1&&(o||(o=Xt(r)),n.set(o,{prop:r,converter:a&&!w(a)&&a?.converter||Vc(e.props[r])}))}this[ae]=n}return this[ae]?Array.from(this[ae].keys()):[]}get scope(){return this.$.$$.scope}get attachScope(){return this.$.$$.attachScope}get connectScope(){return this.$.$$.connectScope}get $props(){return this.$.$$.props}get $state(){return this.$.$$.$state}get state(){return this.$.state}constructor(...n){if(super(...n),this[xe]=0,this[oi]=null,this.keepAlive=!1,this.forwardKeepAlive=!0,this.$=lt(()=>vc(e),null),this.$.$$.addHooks(this),e.props){const r=this.$props,a=Object.getOwnPropertyDescriptors(this);for(const o of Object.keys(a))o in e.props&&(r[o].set(this[o]),delete this[o])}}attributeChangedCallback(n,r,a){const o=this.constructor;if(!o[ae]){super.attributeChangedCallback?.(n,r,a);return}const l=o[ae].get(n);l&&(this[l.prop]=l.converter(a))}connectedCallback(){const n=this.$?.$$;if(!n||n.destroyed)return;if(this[xe]!==2){Rc.call(this);return}if(!this.isConnected)return;this.hasAttribute("keep-alive")&&(this.keepAlive=!0),n.connect(),Q(this[oi])&&bc(this[oi],this),this[oi]=null;const r=super.connectedCallback;r&<(()=>r.call(this),this.connectScope)}disconnectedCallback(){const n=this.$?.$$;if(!n||n.destroyed)return;n.disconnect();const r=super.disconnectedCallback;r&&r.call(this),!this.keepAlive&&!this.hasAttribute("keep-alive")&&setTimeout(()=>{requestAnimationFrame(()=>{this.isConnected||n.destroy()})}
2,0)}[Ua](){const n=this.$.$$,r=this.constructor;if(n.destroyed)return;const a=r[ae];if(a)for(const o of this.attributes){let l=a.get(o.name);l&&l.converter&&n.props[l.prop].set(l.converter(this.getAttribute(o.name)))}n.setup(),n.attach(this),this[xe]=2,this.connectedCallback()}subscribe(n){return this.$.subscribe(n)}destroy(){this.disconnectedCallback(),this.$.destroy()}}return Dc(i,e),i}function Dc(t,e){const i=t.prototype,s=e.prototype;if(e.props)for(const n of Object.keys(e.props))Object.defineProperty(i,n,{enumerable:!0,configurable:!0,get(){return this.$props[n]()},set(r){this.$props[n].set(r)}});if(s[ci])for(const n of s[ci])Object.defineProperty(i,n,{enumerable:!0,configurable:!0,get(){return this.$[n]},set(r){this.$[n]=r}});if(s[ui])for(const n of s[ui])i[n]=function(...r){return this.$[n](...r)}}function Rc(){if(this[xe]!==0)return;this[xe]=1;const t=qc(this),e=t&&window.customElements.get(t.localName),i=t&&t[xe]===2;if(t&&(!e||!i)){Oc.call(this,t);return}Wa.call(this,t)}async function Oc(t){await window.customElements.whenDefined(t.localName),t[xe]!==2&&await new Promise(e=>(t[oi]??=[]).push(e)),Wa.call(this,t)}function Wa(t){if(this.isConnected){if(t){t.keepAlive&&t.forwardKeepAlive&&(this.keepAlive=!0,this.setAttribute("keep-alive",""));const e=this.$.$$.scope;e&&t.$.$$.attachScope.append(e)}this[Ua]()}}function qc(t){let e=t.parentNode,i=t.localName.split("-",1)[0]+"-";for(;e;){if(e.nodeType===1&&e.localName.startsWith(i))return e;e=e.parentNode}return null}function k(t,e=!1){(e||!window.customElements.get(t.tagName))&&window.customElements.define(t.tagName,t)}var Nc='<path fill-rule="evenodd" clip-rule="evenodd" d="M15.0007 28.7923C15.0007 29.0152 14.9774 29.096 14.9339 29.1775C14.8903 29.259 14.8263 29.323 14.7449 29.3665C14.6634 29.4101 14.5826 29.4333 14.3597 29.4333H12.575C12.3521 29.4333 12.2713 29.4101 12.1898 29.3665C12.1083 29.323 12.0443 29.259 12.0008 29.1775C11.9572 29.096 11.934 29.0152 11.934 28.7923V12.2993L5.97496 12.3C5.75208 12.3 5.67125 12.2768 5.58977 12.2332C5.50829 12.1896 5.44434 12.1257 5.40077 12.0442C5.35719 11.9627 5.33398 11.8819 5.33398 11.659V9.87429C5.33398 9.65141 5.35719 9.57059 5.40077 9.48911C5.44434 9.40762 5.50829 9.34368 5.58977 9.3001C5.67125 9.25652 5.75208 9.23332 5.97496 9.23332H26.0263C26.2492 9.23332 26.33 9.25652 26.4115 9.3001C26.493 9.34368 26.557 9.40762 26.6005 9.48911C26.6441 9.57059 26.6673 9.65141 26.6673 9.87429V11.659C26.6673 11.8819 26.6441 11.9627 26.6005 12.0442C26.557 12.1257 26.493 12.1896 26.4115 12.2332C26.33 12.2768 26.2492 12.3 26.0263 12.3L20.067 12.2993L20.0673 28.7923C20.0673 29.0152 20.0441 29.096 20.0005 29.1775C19.957 29.259 19.893 29.323 19.8115 29.3665C19.73 29.4101 19.6492 29.4333 19.4263 29.4333H17.6416C17.4187 29.4333 17.3379 29.4101 17.2564 29.3665C17.175 29.323 17.111 29.259 17.0674 29.1775C17.0239 29.096 17.0007 29.0152 17.0007 28.7923L17 22.7663H15L15.0007 28.7923Z" fill="currentColor"/> <path d="M16.0007 7.89998C17.4734 7.89998 18.6673 6.70608 18.6673 5.23332C18.6673 3.76056 17.4734 2.56665 16.0007 2.56665C14.5279 2.56665 13.334 3.76056 13.334 5.23332C13.334 6.70608 14.5279 7.89998 16.0007 7.89998Z" fill="currentColor"/>',Hc='<path d="M5.33334 6.00001C5.33334 5.63182 5.63181 5.33334 6 5.33334H26C26.3682 5.33334 26.6667 5.63182 26.6667 6.00001V20.6667C26.6667 21.0349 26.3682 21.3333 26 21.3333H23.7072C23.4956 21.3333 23.2966 21.233 23.171 21.0628L22.1859 19.7295C21.8607 19.2894 22.1749 18.6667 22.7221 18.6667H23.3333C23.7015 18.6667 24 18.3682 24 18V8.66668C24 8.29849 23.7015 8.00001 23.3333 8.00001H8.66667C8.29848 8.00001 8 8.29849 8 8.66668V18C8 18.3682 8.29848 18.6667 8.66667 18.6667H9.29357C9.84072 18.6667 10.1549 19.2894 9.82976 19.7295L8.84467 21.0628C8.71898 21.233 8.52 21.3333 8.30848 21.3333H6C5.63181 21.3333 5.33334 21.0349 5.33334 20.6667V6.00001Z" fill="currentColor"/> <path d="M8.78528 25.6038C8.46013 26.0439 8.77431 26.6667 9.32147 26.6667L22.6785 26.6667C23.2256 26.6667 23.5398 26.0439 23.2146 25.6038L16.5358 16.5653C16.2693 16.2046 15.73 16.2047 15.4635 16.5653L8.78528 25.6038Z" fill="currentColor"/>',Fc='<path d="M17.4853 18.9093C17.4853 19.0281 17.6289 19.0875 17.7129 19.0035L22.4185 14.2979C22.6788 14.0376 23.1009 14.0376 23.3613 14.2979L24.7755 15.7122C25.0359 15.9725 25.0359 16.3946 24.7755 16.655L16.2902 25.1403C16.0299 25.4006 15.6078 25.4006 15.3474 25.1403L13.9332 23.726L13.9319 23.7247L6.86189 16.6547C6.60154 16.3944 6.60154 15.9723 6.86189 15.7119L8.2761 14.2977C8.53645 14.0373 8.95856 14.0373 9.21891 14.2977L13.9243 19.0031C14.0083 19.0871 14.1519 19.0276 14.1519 18.9088L14.1519 6.00004C14.1519 5.63185 14.4504 5.33337 14.8186 5.33337L16.8186 5.33337C17.1868 5.33337 17.4853 5.63185 17.4853 6.00004L17.4853 18.9093Z" fill="currentColor"/>',Bc='<path d="M13.0908 14.3334C12.972 14.3334 12.9125 14.1898 12.9965 14.1058L17.7021 9.40022C17.9625 9.13987 17.9625 8.71776 17.7021 8.45741L16.2879 7.04319C16.0275 6.78284 15.6054 6.78284 15.3451 7.04319L6.8598 15.5285C6.59945 15.7888 6.59945 16.2109 6.8598 16.4713L8.27401 17.8855L8.27536 17.8868L15.3453 24.9568C15.6057 25.2172 16.0278 25.2172 16.2881 24.9568L17.7024 23.5426C17.9627 23.2822 17.9627 22.8601 17.7024 22.5998L12.9969 17.8944C12.9129 17.8104 12.9724 17.6668 13.0912 17.6668L26 17.6668C26.3682 17.6668 26.6667 17.3683 26.6667 17.0001V15.0001C26.6667 14.6319 26.3682 14.3334 26 14.3334L13.0908 14.3334Z" fill="currentColor"/>',Gc='<path d="M14.1521 13.0929C14.1521 12.9741 14.0085 12.9147 13.9245 12.9987L9.21891 17.7043C8.95856 17.9646 8.53645 17.9646 8.2761 17.7043L6.86189 16.29C6.60154 16.0297 6.60154 15.6076 6.86189 15.3472L15.3472 6.86195C15.6075 6.6016 16.0296 6.6016 16.29 6.86195L17.7042 8.27616L17.7055 8.27751L24.7755 15.3475C25.0359 15.6078 25.0359 16.
20299 24.7755 16.2903L23.3613 17.7045C23.1009 17.9649 22.6788 17.9649 22.4185 17.7045L17.7131 12.9991C17.6291 12.9151 17.4855 12.9746 17.4855 13.0934V26.0022C17.4855 26.3704 17.187 26.6688 16.8188 26.6688H14.8188C14.4506 26.6688 14.1521 26.3704 14.1521 26.0022L14.1521 13.0929Z" fill="currentColor"/>',Uc='<path d="M16.6927 25.3346C16.3245 25.3346 16.026 25.0361 16.026 24.6679L16.026 7.3346C16.026 6.96641 16.3245 6.66794 16.6927 6.66794L18.6927 6.66794C19.0609 6.66794 19.3594 6.96642 19.3594 7.3346L19.3594 24.6679C19.3594 25.0361 19.0609 25.3346 18.6927 25.3346H16.6927Z" fill="currentColor"/> <path d="M24.026 25.3346C23.6578 25.3346 23.3594 25.0361 23.3594 24.6679L23.3594 7.3346C23.3594 6.96641 23.6578 6.66794 24.026 6.66794L26.026 6.66794C26.3942 6.66794 26.6927 6.96642 26.6927 7.3346V24.6679C26.6927 25.0361 26.3942 25.3346 26.026 25.3346H24.026Z" fill="currentColor"/> <path d="M5.48113 23.9407C5.38584 24.2963 5.59689 24.6619 5.95254 24.7572L7.88439 25.2748C8.24003 25.3701 8.60559 25.159 8.70089 24.8034L13.1871 8.06067C13.2824 7.70503 13.0713 7.33947 12.7157 7.24417L10.7838 6.72654C10.4282 6.63124 10.0626 6.8423 9.96733 7.19794L5.48113 23.9407Z" fill="currentColor"/>',Wc='<path fill-rule="evenodd" clip-rule="evenodd" d="M24.9266 7.57992C25.015 7.60672 25.0886 7.64746 25.2462 7.80506L26.956 9.51488C27.1136 9.67248 27.1543 9.74604 27.1811 9.83447C27.2079 9.9229 27.2079 10.0133 27.1811 10.1018C27.1543 10.1902 27.1136 10.2638 26.956 10.4214L13.1822 24.1951C13.0246 24.3527 12.951 24.3935 12.8626 24.4203C12.797 24.4402 12.7304 24.4453 12.6642 24.4357L12.7319 24.4203C12.6435 24.4471 12.553 24.4471 12.4646 24.4203C12.3762 24.3935 12.3026 24.3527 12.145 24.1951L5.04407 17.0942C4.88647 16.9366 4.84573 16.863 4.81893 16.7746C4.79213 16.6862 4.79213 16.5957 4.81893 16.5073C4.84573 16.4189 4.88647 16.3453 5.04407 16.1877L6.7539 14.4779C6.9115 14.3203 6.98506 14.2796 7.07349 14.2528C7.16191 14.226 7.25235 14.226 7.34078 14.2528C7.42921 14.2796 7.50277 14.3203 7.66037 14.4779L12.6628 19.4808L24.3397 7.80506C24.4973 7.64746 24.5709 7.60672 24.6593 7.57992C24.7477 7.55311 24.8382 7.55311 24.9266 7.57992Z" fill="currentColor"/>',jc='<path d="M17.947 16.095C17.999 16.043 17.999 15.9585 17.947 15.9065L11.6295 9.58899C11.3691 9.32864 11.3691 8.90653 11.6295 8.64618L13.2323 7.04341C13.4926 6.78306 13.9147 6.78306 14.1751 7.04341L21.0289 13.8973C21.0392 13.9064 21.0493 13.9158 21.0591 13.9257L22.6619 15.5285C22.9223 15.7888 22.9223 16.2109 22.6619 16.4713L14.1766 24.9565C13.9163 25.2169 13.4942 25.2169 13.2338 24.9565L11.631 23.3538C11.3707 23.0934 11.3707 22.6713 11.631 22.411L17.947 16.095Z" fill="currentColor"/>',ja='<path fill-rule="evenodd" clip-rule="evenodd" d="M6 7C5.63181 7 5.33333 7.29848 5.33333 7.66667V14.8667C5.33333 14.9403 5.39361 14.9999 5.46724 15.0009C10.8844 15.0719 15.2614 19.449 15.3325 24.8661C15.3334 24.9397 15.393 25 15.4667 25H26C26.3682 25 26.6667 24.7015 26.6667 24.3333V7.66667C26.6667 7.29848 26.3682 7 26 7H6ZM17.0119 22.2294C17.0263 22.29 17.0802 22.3333 17.1425 22.3333H23.3333C23.7015 22.3333 24 22.0349 24 21.6667V10.3333C24 9.96514 23.7015 9.66667 23.3333 9.66667H8.66667C8.29848 9.66667 8 9.96514 8 10.3333V13.1909C8 13.2531 8.04332 13.3071 8.10392 13.3214C12.5063 14.3618 15.9715 17.827 17.0119 22.2294Z" fill="currentColor"/> <path d="M13.2 25C13.2736 25 13.3334 24.9398 13.3322 24.8661C13.2615 20.5544 9.77889 17.0718 5.46718 17.0011C5.39356 16.9999 5.33333 17.0597 5.33333 17.1333V18.8667C5.33333 18.9403 5.39348 18.9999 5.4671 19.0015C8.67465 19.0716 11.2617 21.6587 11.3319 24.8662C11.3335 24.9399 11.393 25 11.4667 25H13.2Z" fill="currentColor"/> <path d="M5.33333 21.1333C5.33333 21.0597 5.39332 20.9998 5.46692 21.0022C7.57033 21.0712 9.26217 22.763 9.33114 24.8664C9.33356 24.94 9.27364 25 9.2 25H6C5.63181 25 5.33333 24.7015 5.33333 24.3333V21.1333Z" fill="currentColor"/>',Ir='<path d="M8 28.0003C8 27.6321 8.29848 27.3336 8.66667 27.3336H23.3333C23.7015 27.3336 24 27.6321 24 28.0003V29.3336C24 29.7018 23.7015 30.0003 23.3333 30.0003H8.66667C8.29848 30.0003 8 29.7018 8 29.3336V28.0003Z" fill="currentColor"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M4.66602 6.66699C4.29783 6.66699 3.99935 6.96547 3.99935 7.33366V24.667C3.99935 25.0352 4.29783 25.3337 4.66602 25.3337H27.3327C27.7009 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.7009 6.66699 27.3327 6.66699H4.66602ZM8.66659 21.3333C8.2984 21.3333 7.99992 21.0349 7.99992 20.6667V11.3333C7.99992 10.9651 8.2984 10.6667 8.66659 10.6667H13.9999C14.3681 10.6667 14.6666 10.9651 14.6666 11.3333V12.6667C14.6666 13.0349 14.3681 13.3333 13.9999 13.3333H10.7999C10.7263 13.3333 10.6666 13.393 10.6666 13.4667V18.5333C10.6666 18.607 10.7263 18.6667 10.7999 18.6667H13.9999C14.3681 18.6667 14.6666 18.9651 14.6666 19.3333V20.6667C14.6666 21.0349 14.3681 21.3333 13.9999 21.3333H8.66659ZM17.9999 21.3333C17.6317 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6317 10.6667 17.9999 10.6667H23.3333C23.7014 10.6667 23.9999 10.9651 23.9999 11.3333V12.6667C23.9999 13.0349 23.7014 13.3333 23.3333 13.3333H20.1333C20.0596 13.3333 19.9999 13.393 19.9999 13.4667V18.5333C19.9999 18.607 20.0596 18.6667 20.1333 18.6667H23.3333C23.7014 18.6667 23.9999 18.9651 23.9999 19.3333V20.6667C23.9999 21.0349 23.7014 21.3333 23.3333 21.3333H17.9999Z" fill="currentColor"/>',js='<path fill-rule="evenodd" clip-rule="evenodd" d="M4.6661 6.66699C4.29791 6.66699 3.99943 6.96547 3.99943 7.33366V24.667C3.99943 25.0352 4.29791 25.3337 4.6661 25.3337H27.3328C27.701 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.701 6.66699 27.3328 6.66699H4.6661ZM8.66667 21.3333C8.29848 21.3333 8 21.0349 8 20.6667V11.3333C8 10.9651 8.29848 10.6667 8.66667 10.6667H14C14.3682 10.6667 14.6667 10.9651 14.6667 11.3333V12.6667C14.6667 13.0349 14.3682 13.3333 14 13.3333H10.8C10.7264 13.3333 10.6667 13.393 10.6667 13.4667V18.5333C10.6667 18.607 10.7264 18.6667 10.8 18.6667H14C14.3682 18.6667 14.6667 18.9651 14.6667 19.3333V20.6667C14.6667 21.0349 14.3682 21.3333 14 21.3333H8.66667ZM18 21.3333C17.6318 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6318 10.6667 18 10.6667H23.3333C23.7015 10.6667 24 10.9651 24 11.3333V12.6667C24 13.0349 23.7015 13.3333 23.3333 13.3333H20.1333C20.0597 13.3333 20 13.393 20 13.4667V18.5333C20 18.607 20.0597 18.6667 20.1333 18.6667H23.3333C23.7015 18.6667 24 18.9651 24 19.3333V20.6667C24 21.0349 23.7015 21.3333 23.3333 21.3333H18Z" fill="currentColor"/>',Kc='<path d="M14.2225 13.7867C14.3065 13.8706 14.4501 13.8112 14.4501 13.6924V5.99955C14.4501 5.63136 14.7486 5.33289 15.1167 5.33289H16.8501C17.2183 5.33289 17.5167 5.63136 17.5167 5.99955V13.6916C17.5167 13.8104 17.6604 13.8699 17.7444 13.7859L19.9433 11.5869C20.2037 11.3266 20.6258 11.3266 20.8861 11.5869L22.1118 12.8126C22.3722 13.0729 22.3722 13.4951 22.1118 13.7554L16.4549 19.4123C16.1946 19.6726 15.772 19.6731 15.5116 19.4128L9.85479
213.7559C9.59444 13.4956 9.59444 13.0734 9.85479 12.8131L11.0804 11.5874C11.3408 11.3271 11.7629 11.3271 12.0233 11.5874L14.2225 13.7867Z" fill="currentColor"/> <path d="M5.99998 20.267C5.63179 20.267 5.33331 20.5654 5.33331 20.9336V25.9997C5.33331 26.3678 5.63179 26.6663 5.99998 26.6663H26C26.3682 26.6663 26.6666 26.3678 26.6666 25.9997V20.9336C26.6666 20.5654 26.3682 20.267 26 20.267H24.2666C23.8985 20.267 23.6 20.5654 23.6 20.9336V22.9333C23.6 23.3014 23.3015 23.5999 22.9333 23.5999H9.06638C8.69819 23.5999 8.39972 23.3014 8.39972 22.9333V20.9336C8.39972 20.5654 8.10124 20.267 7.73305 20.267H5.99998Z" fill="currentColor"/>',Zc='<path d="M16 20C18.2091 20 20 18.2092 20 16C20 13.7909 18.2091 12 16 12C13.7909 12 12 13.7909 12 16C12 18.2092 13.7909 20 16 20Z" fill="currentColor"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M28 16.0058C28 18.671 23.5 25.3334 16 25.3334C8.5 25.3334 4 18.6762 4 16.0058C4 13.3354 8.50447 6.66669 16 6.66669C23.4955 6.66669 28 13.3406 28 16.0058ZM25.3318 15.9934C25.3328 16.0017 25.3328 16.0099 25.3318 16.0182C25.3274 16.0571 25.3108 16.1728 25.2485 16.3708C25.1691 16.6229 25.0352 16.9462 24.8327 17.3216C24.4264 18.0749 23.7969 18.9398 22.9567 19.754C21.2791 21.3798 18.9148 22.6667 16 22.6667C13.0845 22.6667 10.7202 21.3805 9.04298 19.7557C8.20295 18.9419 7.57362 18.0773 7.16745 17.3241C6.96499 16.9486 6.83114 16.6252 6.75172 16.3729C6.67942 16.1431 6.66856 16.0243 6.66695 16.0066L6.66695 16.005C6.66859 15.9871 6.67951 15.8682 6.75188 15.6383C6.83145 15.3854 6.96554 15.0614 7.16831 14.6853C7.57507 13.9306 8.20514 13.0644 9.04577 12.249C10.7245 10.6208 13.0886 9.33335 16 9.33335C18.9108 9.33335 21.2748 10.6215 22.9539 12.2507C23.7947 13.0664 24.4249 13.933 24.8318 14.6877C25.0346 15.0639 25.1688 15.3878 25.2483 15.6404C25.3107 15.8386 25.3274 15.9545 25.3318 15.9934Z" fill="currentColor"/>',Qc='<path d="M15.8747 8.11857C16.3148 7.79342 16.9375 8.10759 16.9375 8.65476V14.2575C16.9375 14.3669 17.0621 14.4297 17.1501 14.3647L25.6038 8.11857C26.0439 7.79342 26.6667 8.10759 26.6667 8.65476V23.3451C26.6667 23.8923 26.0439 24.2064 25.6038 23.8813L17.1501 17.6346C17.0621 17.5695 16.9375 17.6324 16.9375 17.7418L16.9375 23.3451C16.9375 23.8923 16.3147 24.2064 15.8747 23.8813L5.93387 16.5358C5.57322 16.2693 5.57323 15.7299 5.93389 15.4634L15.8747 8.11857Z" fill="currentColor"/>',zc='<path d="M16.1253 8.11866C15.6852 7.7935 15.0625 8.10768 15.0625 8.65484V14.2576C15.0625 14.367 14.9379 14.4298 14.8499 14.3648L6.39615 8.11866C5.95607 7.7935 5.33331 8.10768 5.33331 8.65484V23.3452C5.33331 23.8923 5.9561 24.2065 6.39617 23.8813L14.8499 17.6347C14.9379 17.5696 15.0625 17.6325 15.0625 17.7419L15.0625 23.3452C15.0625 23.8923 15.6853 24.2065 16.1253 23.8813L26.0661 16.5358C26.4268 16.2694 26.4268 15.73 26.0661 15.4635L16.1253 8.11866Z" fill="currentColor"/>',Vr='<path d="M19.3334 13.3333C18.9652 13.3333 18.6667 13.0349 18.6667 12.6667L18.6667 7.33333C18.6667 6.96514 18.9652 6.66666 19.3334 6.66666H21.3334C21.7015 6.66666 22 6.96514 22 7.33333V9.86666C22 9.9403 22.0597 10 22.1334 10L24.6667 10C25.0349 10 25.3334 10.2985 25.3334 10.6667V12.6667C25.3334 13.0349 25.0349 13.3333 24.6667 13.3333L19.3334 13.3333Z" fill="currentColor"/> <path d="M13.3334 19.3333C13.3334 18.9651 13.0349 18.6667 12.6667 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V21.3333C6.66669 21.7015 6.96516 22 7.33335 22H9.86669C9.94032 22 10 22.0597 10 22.1333L10 24.6667C10 25.0349 10.2985 25.3333 10.6667 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667L13.3334 19.3333Z" fill="currentColor"/> <path d="M18.6667 24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333H21.3334C21.7015 25.3333 22 25.0349 22 24.6667V22.1333C22 22.0597 22.0597 22 22.1334 22H24.6667C25.0349 22 25.3334 21.7015 25.3334 21.3333V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667L19.3334 18.6667C18.9652 18.6667 18.6667 18.9651 18.6667 19.3333L18.6667 24.6667Z" fill="currentColor"/> <path d="M10.6667 13.3333H12.6667C13.0349 13.3333 13.3334 13.0349 13.3334 12.6667L13.3334 10.6667V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H10.6667C10.2985 6.66666 10 6.96514 10 7.33333L10 9.86666C10 9.9403 9.94033 10 9.86669 10L7.33335 10C6.96516 10 6.66669 10.2985 6.66669 10.6667V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333L10.
26667 13.3333Z" fill="currentColor"/>',Dr='<path d="M25.3299 7.26517C25.2958 6.929 25.0119 6.66666 24.6667 6.66666H19.3334C18.9652 6.66666 18.6667 6.96514 18.6667 7.33333V9.33333C18.6667 9.70152 18.9652 10 19.3334 10L21.8667 10C21.9403 10 22 10.0597 22 10.1333V12.6667C22 13.0349 22.2985 13.3333 22.6667 13.3333H24.6667C25.0349 13.3333 25.3334 13.0349 25.3334 12.6667V7.33333C25.3334 7.31032 25.3322 7.28758 25.3299 7.26517Z" fill="currentColor"/> <path d="M22 21.8667C22 21.9403 21.9403 22 21.8667 22L19.3334 22C18.9652 22 18.6667 22.2985 18.6667 22.6667V24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333L24.6667 25.3333C25.0349 25.3333 25.3334 25.0349 25.3334 24.6667V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667H22.6667C22.2985 18.6667 22 18.9651 22 19.3333V21.8667Z" fill="currentColor"/> <path d="M12.6667 22H10.1334C10.0597 22 10 21.9403 10 21.8667V19.3333C10 18.9651 9.70154 18.6667 9.33335 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V24.6667C6.66669 25.0349 6.96516 25.3333 7.33335 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667V22.6667C13.3334 22.2985 13.0349 22 12.6667 22Z" fill="currentColor"/> <path d="M10 12.6667V10.1333C10 10.0597 10.0597 10 10.1334 10L12.6667 10C13.0349 10 13.3334 9.70152 13.3334 9.33333V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H7.33335C6.96516 6.66666 6.66669 6.96514 6.66669 7.33333V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333H9.33335C9.70154 13.3333 10 13.0349 10 12.6667Z" fill="currentColor"/>',Yc='<path fill-rule="evenodd" clip-rule="evenodd" d="M26.6667 5.99998C26.6667 5.63179 26.3682 5.33331 26 5.33331H11.3333C10.9651 5.33331 10.6667 5.63179 10.6667 5.99998V17.5714C10.6667 17.6694 10.5644 17.7342 10.4741 17.6962C9.91823 17.4625 9.30754 17.3333 8.66667 17.3333C6.08934 17.3333 4 19.4226 4 22C4 24.5773 6.08934 26.6666 8.66667 26.6666C11.244 26.6666 13.3333 24.5773 13.3333 22V8.66665C13.3333 8.29846 13.6318 7.99998 14 7.99998L23.3333 7.99998C23.7015 7.99998 24 8.29846 24 8.66665V14.9048C24 15.0027 23.8978 15.0675 23.8075 15.0296C23.2516 14.7958 22.6409 14.6666 22 14.6666C19.4227 14.6666 17.3333 16.756 17.3333 19.3333C17.3333 21.9106 19.4227 24 22 24C24.5773 24 26.6667 21.9106 26.6667 19.3333V5.99998ZM22 21.3333C23.1046 21.3333 24 20.4379 24 19.3333C24 18.2287 23.1046 17.3333 22 17.3333C20.8954 17.3333 20 18.2287 20 19.3333C20 20.4379 20.8954 21.3333 22 21.3333ZM8.66667 24C9.77124 24 10.6667 23.1045 10.6667 22C10.6667 20.8954 9.77124 20 8.66667 20C7.5621 20 6.66667 20.8954 6.66667 22C6.66667 23.1045 7.5621 24 8.66667 24Z" fill="currentColor"/>',Rr='<path d="M17.5091 24.6594C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9991 9.36923 19.9991H4.66667C4.29848 19.9991 4 19.7006 4 19.3325V12.6658C4 12.2976 4.29848 11.9991 4.66667 11.9991H9.37115C9.39967 11.9991 9.42745 11.99 9.45039 11.973L16.4463 6.8036C16.8863 6.47842 17.5091 6.79259 17.5091 7.33977L17.5091 24.6594Z" fill="currentColor"/> <path d="M28.8621 13.6422C29.1225 13.3818 29.1225 12.9597 28.8621 12.6994L27.9193 11.7566C27.659 11.4962 27.2368 11.4962 26.9765 11.7566L24.7134 14.0197C24.6613 14.0717 24.5769 14.0717 24.5248 14.0197L22.262 11.7568C22.0016 11.4964 21.5795 11.4964 21.3191 11.7568L20.3763 12.6996C20.116 12.9599 20.116 13.382 20.3763 13.6424L22.6392 15.9053C22.6913 15.9573 22.6913 16.0418 22.6392 16.0938L20.3768 18.3562C20.1165 18.6166 20.1165 19.0387 20.3768 19.299L21.3196 20.2419C21.58 20.5022 22.0021 20.5022 22.2624 20.2418L24.5248 17.9795C24.5769 17.9274 24.6613 17.9274 24.7134 17.9795L26.976 20.2421C27.2363 20.5024 27.6585 20.5024 27.9188 20.2421L28.8616 19.2992C29.122 19.0389 29.122 18.6168 28.8616 18.3564L26.599 16.0938C26.547 16.0418 26.547 15.9573 26.599 15.9053L28.8621 13.6422Z" fill="currentColor"/>',Xc='<path d="M26.6009 16.0725C26.6009 16.424 26.4302 17.1125 25.9409 18.0213C25.4676 18.8976 24.7542 19.8715 23.8182 20.7783C21.9489 22.5905 19.2662 24.0667 15.9342 24.0667C12.6009 24.0667 9.91958 22.5915 8.04891 20.78C7.11424 19.8736 6.40091 18.9 5.92758 18.0236C5.43824 17.1149 5.26758 16.4257 5.26758 16.0725C5.26758 15.7193 5.43824 15.0293 5.92891 14.1193C6.40224 13.2416 7.11558 12.2665 8.05158 11.3587C9.92224 9.54398 12.6049 8.06665 15.9342 8.06665C19.2636 8.06665 21.9449 9.54505 23.8169 11.3604C24.7529 12.2687 25.4662 13.2441 25.9396 14.1216C26.4302 15.0317 26.6009 15.7209 26.6009 16.0725Z" stroke="currentColor" stroke-width="3"/> <path d="M15.9336 20.0667C18.1427 20.0667 19.9336 18.2758 19.9336 16.0667C19.9336 13.8575 18.1427 12.0667 15.9336 12.0667C13.7245 12.0667 11.9336 13.8575 11.9336 16.0667C11.9336 18.2758 13.7245 20.0667 15.9336 20.0667Z" fill="currentColor"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M27.2323 25.0624L6.93878 4.76886C6.78118 4.61126 6.70762 4.57052 6.61919 4.54372C6.53077 4.51692 6.44033 4.51691 6.3519 4.54372C6.26347 4.57052 6.18991 4.61126 6.03231 4.76886L4.77032 6.03085C4.61272 6.18845 4.57198 6.26201 4.54518 6.35044C4.51838 6.43887 4.51838 6.5293 4.54518 6.61773C4.57198 6.70616 4.61272 6.77972 4.77032 6.93732L25.0639 27.2308C25.2215 27.3884 25.295 27.4292 25.3834 27.456C25.4719 27.4828 25.5623 27.4828 25.6507 27.456C25.7392 27.4292 25.8127 27.3885 25.9703 27.2309L27.2323 25.9689C27.3899 25.8113 27.4307 25.7377 27.4575 25.6493C27.4843 25.5608 27.4843 25.4704 27.4575 25.382C27.4307 25.2935 27.3899 25.22 27.2323 25.0624Z" fill="currentColor"/>',Or='<path d="M25.14 25.1089C25.0171 25.2532 24.8356 25.3333 24.646 25.3333H22.8124C22.1084 25.3333 21.7734 24.1872 22.2745 23.6927C23.9161 22.0729 24.9336 19.822 24.9336 17.3333C24.9336 12.3997 20.9336 8.39973 16 8.39973C11.0664 8.39973 7.06641 12.3997 7.06641 17.3333C7.06641 19.822 8.08389 22.0729 9.72555 23.6927C10.2266 24.1872 9.89155 25.3333 9.18762 25.3333H7.35398C7.16436 25.3333 6.98294 25.2532 6.86001 25.1089C5.07703 23.015 4 20.2991 4 17.3333C4 10.7057 9.3724 5.33333 16 5.33333C22.6276 5.33333 28 10.7057 28 17.3333C28 20.2991 26.923 23.015 25.14 25.1089Z" fill="currentColor"/> <path d="M21.1992 14.3399C21.4595 14.0796 21.4595 13.6575 21.1992 13.3971L20.2564 12.4543C19.996 12.194 19.5739 12.194 19.3136 12.4543L16.4492 15.3187C16.4185 15.3493 16.3749 15.3629 16.332 15.3568C16.2236 15.3414 16.1127 15.3334 16 15.3334C14.7113 15.3334 13.6667 16.378 13.6667 17.6667C13.6667 18.9554 14.7113 20 16 20C17.2887 20 18.3333 18.9554 18.3333 17.6667C18.3333 17.5464 18.3242 17.4283 18.3067 17.313C18.3001 17.2696 18.3136 17.2255 18.3446 17.1945L21.1992 14.3399Z" fill="currentColor"/>',qr='<path d="M8.66667 6.66667C8.29848 6.66667 8 6.96514 8 7.33333V24.6667C8 25.0349 8.29848 25.3333 8.66667 25.3333H12.6667C13.0349 25.3333 13.3333 25.0349 13.3333 24.6667V7.33333C13.3333 6.96514 13.0349 6.66667 12.6667 6.66667H8.66667Z" fill="currentColor"/> <path d="M19.3333 6.66667C18.9651 6.66667 18.6667 6.96514 18.6667 7.33333V24.6667C18.6667 25.0349 18.9651 25.3333 19.3333 25.3333H23.3333C23.7015 25.3333 24 25.0349 24 24.6667V7.33333C24 6.96514 23.7015 6.66667 23.3333 6.66667H19.3333Z" fill="currentColor"/>',Nr='<path d="M5.33334 26V19.4667C5.33334 19.393 5.39304 19.3333 5.46668 19.3333H7.86668C7.94031 19.3333 8.00001 19.393 8.00001 19.4667V23.3333C8.00001 23.7015 8.29849 24 8.66668 24H23.3333C23.7015 24 24 23.7015 24 23.3333V8.66666C24 8.29847 23.7015 7.99999 23.3333 7.99999H19.4667C19.393 7.99999 19.3333 7.9403 19.3333 7.86666V5.46666C19.3333 5.39302 19.393 5.33333 19.4667 5.33333H26C26.3682 5.33333 26.6667 5.63181 26.6667 5.99999V26C26.6667 26.3682 26.3682 26.6667 26 26.6667H6.00001C5.63182 26.6667 5.33334 26.3682 5.33334 26Z" fill="currentColor"/> <path d="M14.0098 8.42359H10.806C10.6872 8.42359 10.6277 8.56721 10.7117 8.6512L16.5491 14.4886C16.8094 14.7489 16.8094 15.171 16.5491 15.4314L15.3234 16.657C15.0631 16.9174 14.641 16.9174 14.3806 16.657L8.63739 10.9138C8.55339 10.8298 8.40978 10.8893 8.40978 11.0081V14.0236C8.40978 14.3918 8.1113 14.6903 7.74311 14.6903H6.00978C5.64159 14.6903 5.34311 14.3918 5.34311 14.0236L5.34311 6.02359C5.34311 5.6554 5.64159 5.35692 6.00978 5.35692L14.0098 5.35692C14.378 5.35692 14.6764 5.6554 14.6764 6.02359V7.75692C14.6764 8.12511 14.378 8.42359 14.0098 8.42359Z" fill="currentColor"/>',Hr='<path d="M16 15.3333C15.6318 15.3333 15.3333 15.6318 15.3333 16V20C15.3333 20.3682 15.6318 20.6667 16 20.6667H21.3333C21.7015 20.6667 22 20.3682 22 20V16C22
215.6318 21.7015 15.3333 21.3333 15.3333H16Z" fill="currentColor"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M5.33333 7.33334C5.33333 6.96515 5.63181 6.66667 5.99999 6.66667H26C26.3682 6.66667 26.6667 6.96515 26.6667 7.33334V24.6667C26.6667 25.0349 26.3682 25.3333 26 25.3333H5.99999C5.63181 25.3333 5.33333 25.0349 5.33333 24.6667V7.33334ZM7.99999 10C7.99999 9.63182 8.29847 9.33334 8.66666 9.33334H23.3333C23.7015 9.33334 24 9.63182 24 10V22C24 22.3682 23.7015 22.6667 23.3333 22.6667H8.66666C8.29847 22.6667 7.99999 22.3682 7.99999 22V10Z" fill="currentColor"/>',Fr='<path d="M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z" fill="currentColor"/>',Jc='<path d="M13.9213 5.53573C14.3146 5.45804 14.6666 5.76987 14.6666 6.17079V7.57215C14.6666 7.89777 14.4305 8.17277 14.114 8.24925C12.5981 8.61559 11.2506 9.41368 10.2091 10.506C9.98474 10.7414 9.62903 10.8079 9.34742 10.6453L8.14112 9.94885C7.79394 9.7484 7.69985 9.28777 7.96359 8.98585C9.48505 7.24409 11.5636 6.00143 13.9213 5.53573Z" fill="currentColor"/> <path d="M5.88974 12.5908C6.01805 12.2101 6.46491 12.0603 6.81279 12.2611L8.01201 12.9535C8.29379 13.1162 8.41396 13.4577 8.32238 13.7699C8.11252 14.4854 7.99998 15.2424 7.99998 16.0257C7.99998 16.809 8.11252 17.566 8.32238 18.2814C8.41396 18.5936 8.29378 18.9352 8.01201 19.0979L6.82742 19.7818C6.48051 19.9821 6.03488 19.8337 5.90521 19.4547C5.5345 18.3712 5.33331 17.2091 5.33331 16C5.33331 14.8078 5.5289 13.6613 5.88974 12.5908Z" fill="currentColor"/> <path d="M8.17106 22.0852C7.82291 22.2862 7.72949 22.7486 7.99532 23.0502C9.51387 24.773 11.5799 26.0017 13.9213 26.4642C14.3146 26.5419 14.6666 26.2301 14.6666 25.8291V24.4792C14.6666 24.1536 14.4305 23.8786 14.114 23.8021C12.5981 23.4358 11.2506 22.6377 10.2091 21.5453C9.98474 21.31 9.62903 21.2435 9.34742 21.4061L8.17106 22.0852Z" fill="currentColor"/> <path d="M17.3333 25.8291C17.3333 26.2301 17.6857 26.5418 18.079 26.4641C22.9748 25.4969 26.6666 21.1796 26.6666 16C26.6666 10.8204 22.9748 6.50302 18.079 5.5358C17.6857 5.4581 17.3333 5.76987 17.3333 6.17079V7.57215C17.3333 7.89777 17.5697 8.17282 17.8862 8.24932C21.3942 9.09721 24 12.2572 24 16.0257C24 19.7942 21.3942 22.9542 17.8862 23.802C17.5697 23.8785 17.3333 24.1536 17.3333 24.4792V25.8291Z" fill="currentColor"/> <path d="M14.3961 10.4163C13.9561 10.0911 13.3333 10.4053 13.3333 10.9525L13.3333 21.0474C13.3333 21.5946 13.9561 21.9087 14.3962 21.5836L21.2273 16.5359C21.5879 16.2694 21.5879 15.73 21.2273 15.4635L14.3961 10.4163Z" fill="currentColor"/>',tu='<path d="M15.6038 12.2147C16.0439 12.5399 16.6667 12.2257 16.6667 11.6786V10.1789C16.6667 10.1001 16.7351 10.0384 16.8134 10.0479C20.1116 10.4494 22.6667 13.2593 22.6667 16.6659C22.6667 20.3481 19.6817 23.3332 15.9995 23.3332C12.542 23.3332 9.69927 20.7014 9.36509 17.332C9.32875 16.9655 9.03371 16.6662 8.66548 16.6662L6.66655 16.6666C6.29841 16.6666 5.99769 16.966 6.02187 17.3334C6.36494 22.5454 10.7012 26.6667 16 26.6667C21.5228 26.6667 26 22.1895 26 16.6667C26 11.4103 21.9444 7.10112 16.7916 6.69757C16.7216 6.69209 16.6667 6.63396 16.6667 6.56372V4.98824C16.6667 4.44106 16.0439 4.12689 15.6038 4.45206L11.0765 7.79738C10.7159 8.06387 10.7159 8.60326 11.0766 8.86973L15.6038 12.2147Z" fill="currentColor"/>',eu='<path d="M16.6667 10.3452C16.6667 10.8924 16.0439 11.2066 15.6038 10.8814L11.0766 7.5364C10.7159 7.26993 10.7159 6.73054 11.0766 6.46405L15.6038 3.11873C16.0439 2.79356 16.6667 3.10773 16.6667 3.6549V5.22682C16.6667 5.29746 16.7223 5.35579 16.7927 5.36066C22.6821 5.76757 27.3333 10.674 27.3333 16.6667C27.3333 22.9259 22.2592 28 16 28C9.96483 28 5.03145 23.2827 4.68601 17.3341C4.66466 16.9665 4.96518 16.6673 5.33339 16.6673H7.3334C7.70157 16.6673 7.99714 16.9668 8.02743 17.3337C8.36638 21.4399 11.8064 24.6667 16 24.6667C20.4183 24.6667 24 21.085 24 16.6667C24 12.5225 20.8483 9.11428 16.8113 8.70739C16.7337 8.69957 16.6667 8.76096 16.6667 8.83893V10.3452Z" fill="currentColor"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0226 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4279 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0993 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0832 15.4782 19.2015 15.6828 19.2868 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z" fill="currentColor"/> <path d="M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z" fill="currentColor"/>',iu='<path d="M15.3333 10.3452C15.3333 10.8924 15.9561 11.2066 16.3962 10.8814L20.9234 7.5364C21.2841 7.26993 21.2841 6.73054 20.9235 6.46405L16.3962 3.11873C15.9561 2.79356 15.3333 3.10773 15.3333 3.6549V5.22682C15.3333 5.29746 15.2778 5.35579 15.2073 5.36066C9.31791 5.76757 4.66667 10.674 4.66667 16.6667C4.66667 22.9259 9.74078 28 16 28C22.0352 28 26.9686 23.2827 27.314 17.3341C27.3354 16.9665 27.0348 16.6673 26.6666 16.6673H24.6666C24.2984 16.6673 24.0029 16.9668 23.9726 17.3337C23.6336 21.4399 20.1937 24.6667 16 24.6667C11.5817 24.6667 8 21.085 8 16.6667C8 12.5225 11.1517 9.11428 15.1887 8.70739C15.2663 8.69957 15.3333 8.76096 15.3333 8.83893V10.3452Z" fill="currentColor"/> <path fill-rule="evenodd" clip-rule="evenodd" d="M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0225 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4278 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0992 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0831 15.4782 19.2015 15.6828 19.2867 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z" fill="currentColor"/> <path d="M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z" fill="currentColor"/>',Br='<path d="M18.6669 10.4001C18.6669 10.7683 18.3684 11.0667 18.0002 11.0667H16.2668C15.8987 11.0667 15.6002 10.7683 15.6002 10.4001V9.86674C15.6002 9.7931 15.54
205 9.73341 15.4669 9.73341H5.99998C5.63179 9.73341 5.33331 9.43493 5.33331 9.06674V7.33341C5.33331 6.96522 5.63179 6.66674 5.99998 6.66674H15.4669C15.5405 6.66674 15.6002 6.60704 15.6002 6.53341V6.00007C15.6002 5.63188 15.8987 5.3334 16.2668 5.3334H18.0002C18.3684 5.3334 18.6669 5.63188 18.6669 6.00007V10.4001Z" fill="currentColor"/> <path d="M11.3334 18.8668C11.7016 18.8668 12.0001 18.5683 12.0001 18.2001V13.8001C12.0001 13.4319 11.7016 13.1335 11.3334 13.1335H9.60006C9.23187 13.1335 8.93339 13.4319 8.93339 13.8001V14.3335C8.93339 14.4071 8.8737 14.4668 8.80006 14.4668H6.00006C5.63187 14.4668 5.33339 14.7653 5.33339 15.1335V16.8668C5.33339 17.235 5.63187 17.5335 6.00006 17.5335H8.80006C8.8737 17.5335 8.93339 17.5932 8.93339 17.6668V18.2001C8.93339 18.5683 9.23187 18.8668 9.60006 18.8668H11.3334Z" fill="currentColor"/> <path d="M18.6667 26.0001C18.6667 26.3683 18.3682 26.6668 18 26.6668H16.2667C15.8985 26.6668 15.6 26.3683 15.6 26.0001V25.4668C15.6 25.3931 15.5403 25.3334 15.4667 25.3334H6.00014C5.63195 25.3334 5.33348 25.0349 5.33348 24.6668V22.9334C5.33348 22.5652 5.63195 22.2668 6.00014 22.2668H15.4667C15.5403 22.2668 15.6 22.2071 15.6 22.1334V21.6001C15.6 21.2319 15.8985 20.9334 16.2667 20.9334H18C18.3682 20.9334 18.6667 21.2319 18.6667 21.6001V26.0001Z" fill="currentColor"/> <path d="M22 24.6668C22 25.0349 22.2985 25.3334 22.6667 25.3334H26.0001C26.3683 25.3334 26.6668 25.0349 26.6668 24.6668V22.9334C26.6668 22.5652 26.3683 22.2668 26.0001 22.2668H22.6667C22.2985 22.2668 22 22.5652 22 22.9334V24.6668Z" fill="currentColor"/> <path d="M16.0001 17.5335C15.6319 17.5335 15.3334 17.235 15.3334 16.8668V15.1335C15.3334 14.7653 15.6319 14.4668 16.0001 14.4668H26.0001C26.3683 14.4668 26.6667 14.7653 26.6667 15.1335V16.8668C26.6667 17.235 26.3683 17.5335 26.0001 17.5335H16.0001Z" fill="currentColor"/> <path d="M22.0002 9.06674C22.0002 9.43493 22.2987 9.73341 22.6669 9.73341H26C26.3682 9.73341 26.6666 9.43493 26.6666 9.06674V7.3334C26.6666 6.96521 26.3682 6.66674 26 6.66674H22.6669C22.2987 6.66674 22.0002 6.96522 22.0002 7.33341V9.06674Z" fill="currentColor"/>',su='<path fill-rule="evenodd" clip-rule="evenodd" d="M13.5722 5.33333C13.2429 5.33333 12.9629 5.57382 12.9132 5.89938L12.4063 9.21916C12.4 9.26058 12.3746 9.29655 12.3378 9.31672C12.2387 9.37118 12.1409 9.42779 12.0444 9.48648C12.0086 9.5083 11.9646 9.51242 11.9255 9.49718L8.79572 8.27692C8.48896 8.15732 8.14083 8.27958 7.9762 8.56472L5.5491 12.7686C5.38444 13.0538 5.45271 13.4165 5.70981 13.6223L8.33308 15.7225C8.3658 15.7487 8.38422 15.7887 8.38331 15.8306C8.38209 15.8867 8.38148 15.9429 8.38148 15.9993C8.38148 16.0558 8.3821 16.1121 8.38332 16.1684C8.38423 16.2102 8.36582 16.2503 8.33313 16.2765L5.7103 18.3778C5.45334 18.5836 5.38515 18.9462 5.54978 19.2314L7.97688 23.4352C8.14155 23.7205 8.48981 23.8427 8.79661 23.723L11.926 22.5016C11.9651 22.4864 12.009 22.4905 12.0449 22.5123C12.1412 22.5709 12.2388 22.6274 12.3378 22.6818C12.3745 22.7019 12.4 22.7379 12.4063 22.7793L12.9132 26.0993C12.9629 26.4249 13.2429 26.6654 13.5722 26.6654H18.4264C18.7556 26.6654 19.0356 26.425 19.0854 26.0995L19.5933 22.7801C19.5997 22.7386 19.6252 22.7027 19.6619 22.6825C19.7614 22.6279 19.8596 22.5711 19.9564 22.5121C19.9923 22.4903 20.0362 22.4862 20.0754 22.5015L23.2035 23.7223C23.5103 23.842 23.8585 23.7198 24.0232 23.4346L26.4503 19.2307C26.6149 18.9456 26.5467 18.583 26.2898 18.3771L23.6679 16.2766C23.6352 16.2504 23.6168 16.2104 23.6177 16.1685C23.619 16.1122 23.6196 16.0558 23.6196 15.9993C23.6196 15.9429 23.619 15.8866 23.6177 15.8305C23.6168 15.7886 23.6353 15.7486 23.668 15.7224L26.2903 13.623C26.5474 13.4172 26.6156 13.0544 26.451 12.7692L24.0239 8.56537C23.8592 8.28023 23.5111 8.15797 23.2043 8.27757L20.0758 9.49734C20.0367 9.51258 19.9927 9.50846 19.9569 9.48664C19.8599 9.42762 19.7616 9.37071 19.6618 9.31596C19.6251 9.2958 19.5997 9.25984 19.5933 9.21843L19.0854 5.89915C19.0356 5.57369 18.7556 5.33333 18.4264 5.33333H13.5722ZM16.0001 20.2854C18.3672 20.2854 20.2862 18.3664 20.2862 15.9993C20.2862 13.6322 18.3672 11.7132 16.0001 11.7132C13.6329 11.7132 11.714 13.6322 11.714 15.9993C11.714 18.3664 13.6329 20.2854 16.0001 20.2854Z" fill="currentColor"/>',Ks='<path d="M17.5091 24.6595C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9992 9.36923 19.9992H4.66667C4.29848 19.9992 4 19.7007 4 19.3325V12.6658C4 12.2976 4.29848 11.9992 4.66667 11.9992H9.37115C9.39967 11.9992 9.42745 11.99 9.45039 11.9731L16.4463 6.80363C16.8863 6.47845 17.5091 6.79262 17.5091 7.3398L17.5091 24.6595Z" fill="currentColor"/> <path d="M27.5091 9.33336C27.8773 9.33336 28.1758 9.63184 28.1758 10V22C28.1758 22.3682 27.8773 22.6667 27.5091 22.6667H26.1758C25.8076 22.6667 25.5091 22.3682 25.5091 22V10C25.5091 9.63184 25.8076 9.33336 26.1758 9.33336L27.5091 9.33336Z" fill="currentColor"/> <path d="M22.1758 12C22.544 12 22.8424 12.2985 22.8424 12.6667V19.3334C22.8424 19.7016 22.544 20 22.1758 20H20.8424C20.4743 20 20.1758 19.7016 20.1758 19.3334V12.6667C20.1758 12.2985 20.4743 12 20.8424 12H22.1758Z" fill="currentColor"/>',Zs='<path d="M17.5091 24.6594C17.5091 25.2066 16.8864 25.5207 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9991 9.36923 19.9991H4.66667C4.29848 19.9991 4 19.7006 4 19.3324V12.6658C4 12.2976 4.29848 11.9991 4.66667 11.9991H9.37115C9.39967 11.9991 9.42745 11.99 9.45039 11.973L16.4463 6.80358C16.8863 6.4784 17.5091 6.79258 17.5091 7.33975L17.5091 24.6594Z" fill="currentColor"/> <path d="M22.8424 12.6667C22.8424 12.2985 22.544 12 22.1758 12H20.8424C20.4743 12 20.1758 12.2985 20.1758 12.6667V19.3333C20.1758 19.7015 20.4743 20 20.8424 20H22.1758C22.544 20 22.8424 19.7015 22.8424 19.3333V12.6667Z" fill="currentColor"/>',P={add:Symbol(0),remove:Symbol(0),reset:Symbol(0),select:Symbol(0),readonly:Symbol(0),setReadonly:Symbol(0),onReset:Symbol(0),onRemove:Symbol(0),onUserSelect:Symbol(0)},Si=class{#t;#e;constructor(t){this.#e=t}start(){ct(this.#t)&&this.#i()}stop(){it(this.#t)&&window.cancelAnimationFrame(this.#t),this.#t=void 0}#i(){this.#t=window.requestAnimationFrame(()=>{ct(this.#t)||(this.#e(),this.#i())})}},Ka=navigator?.userAgent.toLowerCase()||"",Cs=/iphone|ipad|ipod|ios|crios|fxios/i.test(Ka),Za=/(iphone|ipod)/gi.test(navigator?.platform||""),$s=!!window.chrome;/crios/i.test(Ka);var is=!!window.safari||Cs;function Qa(){return nu()&&ft(screen.orientation.unlock)}function nu(){return!ct(window.screen.orientation)&&!ct(window.screen.orientation.lock)}function za(t,e){return t||(t=document.createElement("audio")),t.canPlayType(e).length>0}function Ya(t,e){return t||(t=document.createElement("video")),t.canPlayType(e).length>0}function Xa(t){return t||(t=document.createElement("video")),t.canPlayType("application/vnd.apple.mpegurl").length>0}function Ja(t){return!!document.pictureInPictureEnabled&&!t?.disablePictureInPicture}function to(t){return ft(t?.webkitSupportsPresentationMode)&&ft(t?.webkitSetPresentationMode)}async function ru(){const t=document.createElement("video");return t.volume=.5,await wc(0),t.volume===.5}function au(){return window?.ManagedMediaSource??window?.MediaSource??window?.WebKitMediaSource}function ou(){return window?.SourceBuffer??window?.WebKitSourceBuffer}function ws(){const t=au();if(ct(t))return!1;
2const e=t&&ft(t.isTypeSupported)&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=ou(),s=ct(i)||!ct(i.prototype)&&ft(i.prototype.appendBuffer)&&ft(i.prototype.remove);return!!e&&!!s}function eo(){return ws()}var lu=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx|flac)($|\?)/i,cu=new Set(["audio/mpeg","audio/ogg","audio/3gp","audio/mp3","audio/webm","audio/flac","audio/m4a","audio/m4b","audio/mp4a","audio/mp4"]),uu=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,hu=new Set(["video/mp4","video/webm","video/3gp","video/ogg","video/avi","video/mpeg"]),du=/\.(m3u8)($|\?)/i,pu=/\.(mpd)($|\?)/i,fu=new Set(["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"]),mu=new Set(["application/dash+xml"]);function In({src:t,type:e}){return w(t)?lu.test(t)||cu.has(e)||t.startsWith("blob:")&&e==="audio/object":e==="audio/object"}function Vn(t){return w(t.src)?uu.test(t.src)||hu.has(t.type)||t.src.startsWith("blob:")&&t.type==="video/object"||Xe(t)&&Xa():t.type==="video/object"}function Xe({src:t,type:e}){return w(t)&&du.test(t)||fu.has(e)}function Ts({src:t,type:e}){return w(t)&&pu.test(t)||mu.has(e)}function io(t){return w(t.src)&&(In(t)||Vn(t)||Xe(t)||Ts(t))}function gu(t){return typeof window.MediaStream<"u"&&t instanceof window.MediaStream}var et=class{#t;get length(){return this.#t.length}constructor(t,e){Q(t)?this.#t=t:!ct(t)&&!ct(e)?this.#t=[[t,e]]:this.#t=[]}start(t){return this.#t[t][0]??1/0}end(t){return this.#t[t][1]??1/0}};function Gr(t){if(!t.length)return null;let e=t.start(0);for(let i=1;i<t.length;i++){const s=t.start(i);s<e&&(e=s)}return e}function we(t){if(!t.length)return null;let e=t.end(0);for(let i=1;i<t.length;i++){const s=t.end(i);s>e&&(e=s)}return e}function yu(t){if(t.length<=1)return t;t.sort((s,n)=>s[0]-n[0]);let e=[],i=t[0];for(let s=1;s<t.length;s++){const n=t[s];i[1]>=n[0]-1?i=[i[0],Math.max(i[1],n[1])]:(e.push(i),i=n)}return e.push(i),e}function vu(t,e,i){let s=e[0],n=e[1];return i<s?[i,-1]:i===s?e:s===-1?(e[0]=i,e):(i>s&&(e[1]=i,n===-1&&t.push(e)),yu(t),e)}function Dn(t,e){const i=new URL(t);for(const s of Object.keys(e))i.searchParams.set(s,e[s]+"");return i.toString()}function te(t,e="preconnect"){if(!Ht(document.querySelector(`link[href="${t}"]`)))return!0;const i=document.createElement("link");return i.rel=e,i.href=t,i.crossOrigin="true",document.head.append(i),!0}var si={};function Rn(t){if(si[t])return si[t].promise;const e=We();if(!Ht(document.querySelector(`script[src="${t}"]`)))return e.resolve(),e.promise;si[t]=e;const i=document.createElement("script");return i.src=t,i.onload=()=>{e.resolve(),delete si[t]},i.onerror=()=>{e.reject(),delete si[t]},setTimeout(()=>document.head.append(i),0),e.promise}function di(t){return t==="use-credentials"?"include":w(t)?"same-origin":void 0}function so({title:t,src:e,download:i}){const s=gi(i)||i===""?e.src:w(i)?i:i?.url;return bu({url:s,src:e,download:i})?{url:s,name:!gi(i)&&!w(i)&&i?.filename||t.toLowerCase()||"media"}:null}function bu({url:t,src:e,download:i}){return w(t)&&(i&&i!==!0||In(e)||Vn(e))}function pn(t,e){return e>=t.startTime&&e<t.endTime}function Je(t,e,i){let s=null,n=vs();function r(){const a=w(e)?[e]:e,o=t.toArray().find(l=>a.includes(l.kind)&&l.mode==="showing");if(o!==s){if(!o){i(null),s=null;return}o.readyState==2?i(o):(i(null),lt(()=>{const l=O(o,"load",()=>{i(o),l()},{once:!0})},n)),s=o}}return r(),O(t,"mode-change",r)}function Cu(t,e,i){Je(t,e,s=>{if(!s){i("");return}const n=()=>{const r=s?.activeCues[0];i(r?.text||"")};n(),O(s,"cue-change",n)})}var L={crossOrigin:Symbol(0),readyState:Symbol(0),updateActiveCues:Symbol(0),canLoad:Symbol(0),onModeChange:Symbol(0),native:Symbol(0),nativeHLS:Symbol(0)},ce=class extends Ha{static createId(t){return`vds-${t.type}-${t.kind}-${t.src??t.label??"?"}`}src;content;type;encoding;id="";label="";language="";kind;default=!1;#t=!1;#e=0;#i="disabled";#s={};#n=[];#r=[];#a=[];#l=new Set;[L.readyState]=0;[L.crossOrigin];[L.onModeChange]=null;[L.native]=null;get metadata(){return this.#s}get regions(){return this.#n}get cues(){return this.#r}get activeCues(){return this.#a}get readyState(){return this[L.readyState]}get mode(){return this.#i}set mode(t){this.setMode(t)}constructor(t){super();for(const e of Object.keys(t))this[e]=t[e];
2this.type||(this.type="vtt"),t.content?this.#o(t):t.src||(this[L.readyState]=2)}addCue(t,e){if(t.id){if(this.#l.has(t.id))return;this.#l.add(t.id)}let i=0,s=this.#r.length;for(i=0;i<s&&!(t.endTime<=this.#r[i].startTime);i++);i===s?this.#r.push(t):this.#r.splice(i,0,t),t instanceof TextTrackCue||this[L.native]?.track.addCue(t),this.dispatchEvent(new I("add-cue",{detail:t,trigger:e})),pn(t,this.#e)&&this[L.updateActiveCues](this.#e,e)}removeCue(t,e){const i=this.#r.indexOf(t);if(i>=0){const s=this.#a.includes(t);t.id&&this.#l.delete(t.id),this.#r.splice(i,1),this[L.native]?.track.removeCue(t),this.dispatchEvent(new I("remove-cue",{detail:t,trigger:e})),s&&this[L.updateActiveCues](this.#e,e)}}setMode(t,e){this.#i!==t&&(this.#i=t,t==="disabled"?(this.#a=[],this.#p()):this.readyState===2?this[L.updateActiveCues](this.#e,e):this.#u(),this.dispatchEvent(new I("mode-change",{detail:this,trigger:e})),this[L.onModeChange]?.())}[L.updateActiveCues](t,e){if(this.#e=t,this.mode==="disabled"||!this.#r.length)return;const i=[];for(let n=0,r=this.#r.length;n<r;n++){const a=this.#r[n];pn(a,t)&&i.push(a)}let s=i.length!==this.#a.length;if(!s){for(let n=0;n<i.length;n++)if(!this.#a.includes(i[n])){s=!0;break}}this.#a=i,s&&this.#p(e)}[L.canLoad](){this.#t=!0,this.#i!=="disabled"&&this.#u()}#o(t){ut(async()=>{const{parseText:e,VTTCue:i,VTTRegion:s}=await import("./B2WH9h9e.js");return{parseText:e,VTTCue:i,VTTRegion:s}},__vite__mapDeps([0,1]),import.meta.url).then(({parseText:e,VTTCue:i,VTTRegion:s})=>{!w(t.content)||t.type==="json"?(this.#h(t.content,i,s),this.readyState!==3&&this.#c()):e(t.content.split(` 3`).map(n=>n.trim()).join(` 4`).trim(),{type:t.type}).then(({cues:n,regions:r})=>{this.#r=n,this.#n=r,this.#c()})})}async#u(){if(!(!this.#t||this[L.readyState]>0)){if(this[L.readyState]=1,this.dispatchEvent(new I("load-start")),!this.src){this.#c();return}try{const{parseResponse:t,VTTCue:e,VTTRegion:i}=await ut(async()=>{const{parseResponse:r,VTTCue:a,VTTRegion:o}=await import("./B2WH9h9e.js");return{parseResponse:r,VTTCue:a,VTTRegion:o}},__vite__mapDeps([0,1]),import.meta.url),s=this[L.crossOrigin]?.(),n=fetch(this.src,{headers:this.type==="json"?{"Content-Type":"application/json"}:void 0,credentials:di(s)});if(this.type==="json")this.#h(await(await n).text(),e,i);else{const{errors:r,metadata:a,regions:o,cues:l}
4=await t(n,{type:this.type,encoding:this.encoding});if(r[0]?.code===0)throw r[0];this.#s=a,this.#n=o,this.#r=l}this.#c()}catch(t){this.#d(t)}}}#c(){if(this[L.readyState]=2,!this.src||this.type!=="vtt"){const e=this[L.native];if(e&&!e.managed)for(const i of this.#r)e.track.addCue(i)}const t=new I("load");this[L.updateActiveCues](this.#e,t),this.dispatchEvent(t)}#d(t){this[L.readyState]=3,this.dispatchEvent(new I("error",{detail:t}))}#h(t,e,i){try{const{regions:s,cues:n}=wu(t,e,i);this.#n=s,this.#r=n}catch(s){this.#d(s)}}#p(t){this.dispatchEvent(new I("cue-change",{trigger:t}))}},$u=/captions|subtitles/;function ht(t){return $u.test(t.kind)}function wu(t,e,i){const s=w(t)?JSON.parse(t):t;let n=[],r=[];return s.regions&&i&&(n=s.regions.map(a=>Object.assign(new i,a))),(s.cues||Q(s))&&(r=(Q(s)?s:s.cues).filter(a=>it(a.startTime)&&it(a.endTime)).map(a=>Object.assign(new e(0,0,""),a))),{regions:n,cues:r}}var no=Ut();function T(){return W(no)}function Y(){return T().$state}function nt(t,e=2){return Number(t.toFixed(e))}function fn(t){return String(t).split(".")[1]?.length??0}function On(t,e,i){return Math.max(t,Math.min(i,e))}var ss=Math.min,Pe=Math.max,ns=Math.round,Fi=Math.floor,Qt=t=>({x:t,y:t}),Tu={left:"right",right:"left",bottom:"top",top:"bottom"};function ku(t,e,i){return Pe(t,ss(e,i))}function qn(t,e){return typeof t=="function"?t(e):t}function yi(t){return t.split("-")[0]}function Nn(t){return t.split("-")[1]}function ro(t){return t==="x"?"y":"x"}function ao(t){return t==="y"?"height":"width"}function Te(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function oo(t){return ro(Te(t))}function Su(t,e,i){i===void 0&&(i=!1);const s=Nn(t),n=oo(t),r=ao(n);let a=n==="x"?s===(i?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=rs(a)),[a,rs(a)]}function xu(t){const e=rs(t);return[mn(t),e,mn(e)]}function mn(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var Ur=["left","right"],Wr=["right","left"],Pu=["top","bottom"],Eu=["bottom","top"];function Au(t,e,i){switch(t){case"top":case"bottom":return i?e?Wr:Ur:e?Ur:Wr;case"left":case"right":return e?Pu:Eu;default:return[]}}function Lu(t,e,i,s){const n=Nn(t);let r=Au(yi(t),i==="start",s);return n&&(r=r.map(a=>a+"-"+n),e&&(r=r.concat(r.map(mn)))),r}function rs(t){const e=yi(t);return Tu[e]+t.slice(e.length)}function Mu(t){var e,i,s,n;return{top:(e=t.top)!=null?e:0,right:(i=t.right)!=null?i:0,bottom:(s=t.bottom)!=null?s:0,left:(n=t.left)!=null?n:0}}function _u(t){return typeof t!="number"?Mu(t):{top:t,right:t,bottom:t,left:t}}function as(t){const{x:e,y:i,width:s,height:n}=t;return{width:s,height:n,top:i,left:e,right:e+s,bottom:i+n,x:e,y:i}}function jr(t,e,i){let{reference:s,floating:n}=t;const r=Te(e),a=oo(e),o=ao(a),l=yi(e),h=r==="y",c=s.x+s.width/2-n.width/2,d=s.y+s.height/2-n.height/2,p=s[o]/2-n[o]/2;let m;switch(l){case"top":m={x:c,y:s.y-n.height};break;case"bottom":m={x:c,y:s.y+s.height};break;case"right":m={x:s.x+s.width,y:d};break;case"left":m={x:s.x-n.width,y:d};break;default:m={x:s.x,y:s.y}}const v=Nn(e);
4return v&&(m[a]+=p*(v==="end"?1:-1)*(i&&h?-1:1)),m}async function Iu(t,e){var i;e===void 0&&(e={});const{x:s,y:n,platform:r,rects:a,elements:o,strategy:l}=t,{boundary:h="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=qn(e,t),v=_u(m),b=o[p?d==="floating"?"reference":"floating":d],A=as(await r.getClippingRect({element:(i=await(r.isElement==null?void 0:r.isElement(b)))==null||i?b:b.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(o.floating)),boundary:h,rootBoundary:c,strategy:l})),D=d==="floating"?{x:s,y:n,width:a.floating.width,height:a.floating.height}:a.reference,R=await(r.getOffsetParent==null?void 0:r.getOffsetParent(o.floating)),q=await(r.isElement==null?void 0:r.isElement(R))&&await(r.getScale==null?void 0:r.getScale(R))||{x:1,y:1},H=as(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:D,offsetParent:R,strategy:l}):D);return{top:(A.top-H.top+v.top)/q.y,bottom:(H.bottom-A.bottom+v.bottom)/q.y,left:(A.left-H.left+v.left)/q.x,right:(H.right-A.right+v.right)/q.x}}var Vu=50,Du=async(t,e,i)=>{const{placement:s="bottom",strategy:n="absolute",middleware:r=[],platform:a}=i,o=a.detectOverflow?a:{...a,detectOverflow:Iu},l=await(a.isRTL==null?void 0:a.isRTL(e));let h=await a.getElementRects({reference:t,floating:e,strategy:n}),{x:c,y:d}=jr(h,s,l),p=s,m=0;const v={};for(let b=0;b<r.length;b++){const A=r[b];if(!A)continue;const{name:D,fn:R}=A,{x:q,y:H,data:tt,reset:j}=await R({x:c,y:d,initialPlacement:s,placement:p,strategy:n,middlewareData:v,rects:h,platform:o,elements:{reference:t,floating:e}});c=q??c,d=H??d,v[D]={...v[D],...tt},j&&m<Vu&&(m++,typeof j=="object"&&(j.placement&&(p=j.placement),j.rects&&(h=j.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:n}):j.rects),{x:c,y:d}=jr(h,p,l)),b=-1)}return{x:c,y:d,placement:p,strategy:n,middlewareData:v}},Ru=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var i,s;const{placement:n,middlewareData:r,rects:a,initialPlacement:o,platform:l,elements:h}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,...A}=qn(t,e);if((i=r.arrow)!=null&&i.alignmentOffset)return{};const D=yi(n),R=Te(o),q=yi(o)===o,H=await(l.isRTL==null?void 0:l.isRTL(h.floating)),tt=p||(q||!b?[rs(o)]:xu(o)),j=v!=="none";!p&&j&&tt.push(...Lu(o,b,v,H));const Lt=[o,...tt],yt=await l.detectOverflow(e,A),$t=[];let pt=((s=r.flip)==null?void 0:s.overflows)||[];if(c&&$t.push(yt[D]),d){const J=Su(n,a,H);$t.push(yt[J[0]],yt[J[1]])}if(pt=[...pt,{placement:n,overflows:$t}],!$t.every(J=>J<=0)){var Mt,se;const J=(((Mt=r.flip)==null?void 0:Mt.index)||0)+1,ye=Lt[J];if(ye&&(!(d==="alignment"&&R!==Te(ye))||pt.every(N=>Te(N.placement)===R?N.overflows[0]>0:!0)))return{data:{index:J,overflows:pt},reset:{placement:ye}};let wt=(se=pt.filter(N=>N.overflows[0]<=0).sort((N,Tt)=>N.overflows[1]-Tt.overflows[1])[0])==null?void 0:se.placement;if(!wt)switch(m){case"bestFit":{var st;const N=(st=pt.filter(Tt=>{if(j){const kt=Te(Tt.placement);return kt===R||kt==="y"}return!0}).map(Tt=>[Tt.placement,Tt.overflows.filter(kt=>kt>0).reduce((kt,qe)=>kt+qe,0)]).sort((Tt,kt)=>Tt[1]-kt[1])[0])==null?void 0:st[0];N&&(wt=N);break}case"initialPlacement":wt=o;break}if(n!==wt)return{reset:{placement:wt}}}return{}}}},Ou=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:s,placement:n,platform:r}=e,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:R=>{let{x:q,y:H}=R;return{x:q,y:H}}},...h}=qn(t,e),c={x:i,y:s},d=await r.detectOverflow(e,h),p=Te(n),m=ro(p);let v=c[m],b=c[p];const A=(R,q)=>ku(q+d[R==="y"?"top":"left"],q,q-d[R==="y"?"bottom":"right"]);a&&(v=A(m,v)),o&&(b=A(p,b));const D=l.fn({...e,[m]:v,[p]:b});return{...D,data:{x:D.x-i,y:D.y-s,enabled:{[m]:a,[p]:o}}}}}};function ks(){return typeof window<"u"}function ti(t){return lo(t)?(t.nodeName||"").toLowerCase():"#document"}function Ct(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ee(t){var e;return(e=(lo(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function lo(t){return ks()?t instanceof Node||t instanceof Ct(t).Node:!1}function Bt(t){return ks()?t instanceof Element||t instanceof Ct(t).Element:!1}function pe(t){return ks()?t instanceof HTMLElement||t instanceof Ct(t).HTMLElement:!1}function Kr(t){return!ks()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ct(t).ShadowRoot}function Ss(t){const{overflow:e,overflowX:i,overflowY:s,display:n}=Gt(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+i)&&n!=="inline"&&n!=="contents"}function qu(t){return/^(table|td|th)$/.test(ti(t))}function xs(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Nu=/transform|translate|scale|rotate|perspective|filter/,Hu=/paint|layout|strict|content/,ve=t=>!!t&&t!=="none",Qs;function Hn(t){const e=Bt(t)?Gt(t):t;return ve(e.transform)||ve(e.translate)||ve(e.scale)||ve(e.rotate)||ve(e.perspective)||!Fn()&&(ve(e.backdropFilter)||ve(e.filter))||Nu.test(e.willChange||"")||Hu.test(e.contain||"")}function Fu(t){let e=Ae(t);for(;pe(e)&&!vi(e);){if(Hn(e))return e;if(xs(e))return null;e=Ae(e)}return null}function Fn(){return Qs==null&&(Qs=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qs}function vi(t){return/^(html|body|#document)$/.test(ti(t))}function Gt(t){return Ct(t).getComputedStyle(t)}function Ps(t){return Bt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ae(t){if(ti(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Kr(t)&&t.host||ee(t);return Kr(e)?e.host:e}function co(t){const e=Ae(t);return vi(e)?(t.ownerDocument||t).body:pe(e)&&Ss(e)?e:co(e)}function bi(t,e,i){var s;e===void 0&&(e=[]),i===void 0&&(i=!0);const n=co(t),r=n===((s=t.ownerDocument)==null?void 0:s.body),a=Ct(n);if(r){const o=gn(a);
4return e.concat(a,a.visualViewport||[],Ss(n)?n:[],o&&i?bi(o):[])}else return e.concat(n,bi(n,[],i))}function gn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function uo(t){const e=Gt(t);let i=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const n=pe(t),r=n?t.offsetWidth:i,a=n?t.offsetHeight:s,o=ns(i)!==r||ns(s)!==a;return o&&(i=r,s=a),{width:i,height:s,$:o}}function Bn(t){return Bt(t)?t:t.contextElement}function Fe(t){const e=Bn(t);if(!pe(e))return Qt(1);const i=e.getBoundingClientRect(),{width:s,height:n,$:r}=uo(e);let a=(r?ns(i.width):i.width)/s,o=(r?ns(i.height):i.height)/n;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}var Bu=Qt(0);function ho(t){const e=Ct(t);return!Fn()||!e.visualViewport?Bu:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Gu(t,e,i){return e===void 0&&(e=!1),!!i&&e&&i===Ct(t)}function Le(t,e,i,s){e===void 0&&(e=!1),i===void 0&&(i=!1);const n=t.getBoundingClientRect(),r=Bn(t);let a=Qt(1);e&&(s?Bt(s)&&(a=Fe(s)):a=Fe(t));const o=Gu(r,i,s)?ho(r):Qt(0);let l=(n.left+o.x)/a.x,h=(n.top+o.y)/a.y,c=n.width/a.x,d=n.height/a.y;if(r&&s){const p=Ct(r),m=Bt(s)?Ct(s):s;let v=p,b=gn(v);for(;b&&m!==v;){const A=Fe(b),D=b.getBoundingClientRect(),R=Gt(b),q=D.left+(b.clientLeft+parseFloat(R.paddingLeft))*A.x,H=D.top+(b.clientTop+parseFloat(R.paddingTop))*A.y;l*=A.x,h*=A.y,c*=A.x,d*=A.y,l+=q,h+=H,v=Ct(b),b=gn(v)}}return as({width:c,height:d,x:l,y:h})}function Es(t,e){const i=Ps(t).scrollLeft;return e?e.left+i:Le(ee(t)).left+i}function po(t,e){const i=t.getBoundingClientRect();return{x:i.left+e.scrollLeft-Es(t,i),y:i.top+e.scrollTop}}function Uu(t){let{elements:e,rect:i,offsetParent:s,strategy:n}=t;const r=n==="fixed",a=ee(s),o=e?xs(e.floating):!1;if(s===a||o&&r)return i;let l={scrollLeft:0,scrollTop:0},h=Qt(1);const c=Qt(0),d=pe(s);if((d||!r)&&((ti(s)!=="body"||Ss(a))&&(l=Ps(s)),d)){const m=Le(s);h=Fe(s),c.x=m.x+s.clientLeft,c.y=m.y+s.clientTop}const p=a&&!d&&!r?po(a,l):Qt(0);return{width:i.width*h.x,height:i.height*h.y,x:i.x*h.x-l.scrollLeft*h.x+c.x+p.x,y:i.y*h.y-l.scrollTop*h.y+c.y+p.y}}function Wu(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function ju(t){const e=Ps(t),i=t.ownerDocument.body,s=Pe(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),n=Pe(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let r=-e.scrollLeft+Es(t);const a=-e.scrollTop;return Gt(i).direction==="rtl"&&(r+=Pe(t.clientWidth,i.clientWidth)-s),{width:s,height:n,x:r,y:a}}var Ku=25;function Zu(t,e,i){i===void 0&&(i="viewport");const s=i==="layoutViewport",n=Ct(t),r=ee(t),a=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,h=0,c=0;if(a){const d=!Fn()||e==="fixed";s?d||(h=-a.offsetLeft,c=-a.offsetTop):(o=a.width,l=a.height,d&&(h=a.offsetLeft,c=a.offsetTop))}if(Es(r)<=0){const d=r.ownerDocument,p=d.body,m=getComputedStyle(p),v=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-v),A=getComputedStyle(r).scrollbarGutter==="stable both-edges"?b/2:b;A<=Ku&&(o-=A)}return{width:o,height:l,x:h,y:c}}function Qu(t,e){const i=Le(t,!0,e==="fixed"),s=i.top+t.clientTop,n=i.left+t.clientLeft,r=Fe(t);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:n*r.x,y:s*r.y}}function Zr(t,e,i){let s;if(e==="viewport"||e==="layoutViewport")s=Zu(t,i,e);else if(e==="document")s=ju(ee(t));else if(Bt(e))s=Qu(e,i);else{const n=ho(t);s={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return as(s)}function zu(t,e){const i=e.get(t);if(i)return i;let s=bi(t,[],!1).filter(o=>Bt(o)&&ti(o)!=="body"),n=null;const r=Gt(t).position==="fixed";let a=r?Ae(t):t;for(;Bt(a)&&!vi(a);){const o=Gt(a),l=Hn(a),h=n?n.position:r?"fixed":"";!l&&(h==="fixed"||h==="absolute"&&o.position==="static")?s=s.filter(c=>c!==a):n=o,a=Ae(a)}return e.set(t,s),s}function Yu(t){let{element:e,boundary:i,rootBoundary:s,strategy:n}=t;const r=[...i==="clippingAncestors"?xs(e)?[]:zu(e,this._c):[].concat(i),s],a=Zr(e,r[0],n);let o=a.top,l=a.right,h=a.bottom,c=a.left;for(let d=1;d<r.length;d++){const p=Zr(e,r[d],n);o=Pe(p.top,o),l=ss(p.right,l),h=ss(p.bottom,h),c=Pe(p.left,c)}return{width:l-c,height:h-o,x:c,y:o}}function Xu(t){const{width:e,height:i}=uo(t);return{width:e,height:i}}function Ju(t,e,i){const s=pe(e),n=ee(e),r=i==="fixed",a=Le(t,!0,r,e);let o={scrollLeft:0,scrollTop:0};const l=Qt(0);if((s||!r)&&((ti(e)!=="body"||Ss(n))&&(o=Ps(e)),s)){const c=Le(e,!0,r,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}!s&&n&&(l.x=Es(n));const h=n&&!s&&!r?po(n,o):Qt(0);return{x:a.left+o.scrollLeft-l.x-h.x,y:a.top+o.scrollTop-l.y-h.y,width:a.width,height:a.height}}function zs(t){return Gt(t).position==="static"}function Qr(t,e){if(!pe(t)||Gt(t).position==="fixed")return null;if(e)return e(t);let i=t.offsetParent;return ee(t)===i&&(i=i.ownerDocument.body),i}function fo(t,e){const i=Ct(t);if(xs(t))return i;if(!pe(t)){let n=Ae(t);for(;n&&!vi(n);
4){if(Bt(n)&&!zs(n))return n;n=Ae(n)}return i}let s=Qr(t,e);for(;s&&qu(s)&&zs(s);)s=Qr(s,e);return s&&vi(s)&&zs(s)&&!Hn(s)?i:s||Fu(t)||i}var th=async function(t){const e=this.getOffsetParent||fo,i=this.getDimensions,s=await i(t.floating);return{reference:Ju(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function eh(t){return Gt(t).direction==="rtl"}var ih={convertOffsetParentRelativeRectToViewportRelativeRect:Uu,getDocumentElement:ee,getClippingRect:Yu,getOffsetParent:fo,getElementRects:th,getClientRects:Wu,getDimensions:Xu,getScale:Fe,isElement:Bt,isRTL:eh};function mo(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function sh(t,e,i){let s=null,n;const r=ee(t);function a(){var c;clearTimeout(n),(c=s)==null||c.disconnect(),s=null}function o(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const p=t.getBoundingClientRect(),{left:m,top:v,width:b,height:A}=p;if(c||e(),!b||!A)return;const D=Fi(v),R=Fi(r.clientWidth-(m+b)),q=Fi(r.clientHeight-(v+A)),H=Fi(m),tt={rootMargin:-D+"px "+-R+"px "+-q+"px "+-H+"px",threshold:Pe(0,ss(1,d))||1};let j=!0;function Lt(yt){const $t=yt[0].intersectionRatio;if(!mo(p,t.getBoundingClientRect()))return o();if($t!==d){if(!j)return o();$t?o(!1,$t):n=setTimeout(()=>{o(!1,1e-7)},1e3)}j=!1}try{s=new IntersectionObserver(Lt,{...tt,root:r.ownerDocument})}catch{s=new IntersectionObserver(Lt,tt)}s.observe(t)}const l=Ct(t),h=()=>o(i);return l.addEventListener("resize",h),o(!0),()=>{l.removeEventListener("resize",h),a()}}function nh(t,e,i,s){s===void 0&&(s={});const{ancestorScroll:n=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=s,h=Bn(t),c=n||r?[...h?bi(h):[],...e?bi(e):[]]:[];c.forEach(D=>{n&&D.addEventListener("scroll",i),r&&D.addEventListener("resize",i)});const d=h&&o?sh(h,i,r):null;let p=-1,m=null;a&&(m=new ResizeObserver(D=>{let[R]=D;R&&R.target===h&&m&&e&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var q;(q=m)==null||q.observe(e)})),i()}),h&&!l&&m.observe(h),e&&m.observe(e));let v,b=l?Le(t):null;l&&A();function A(){const D=Le(t);b&&!mo(b,D)&&i(),b=D,v=requestAnimationFrame(A)}return i(),()=>{var D;c.forEach(R=>{n&&R.removeEventListener("scroll",i),r&&R.removeEventListener("resize",i)}),d?.(),(D=m)==null||D.disconnect(),m=null,l&&cancelAnimationFrame(v)}}var rh=Ou,ah=Ru,oh=(t,e,i)=>{const s=new Map,n=i??{},r={...ih,...n.platform,_c:s};return Du(t,e,{...n,platform:r})};function zr(t,e){const i=e.composedPath()[0];return Fa(i)&&t.contains(i)}var yn=new Set;{let t=function(){for(const e of yn)try{e()}catch{}window.requestAnimationFrame(t)};t()}function lh(t){return yn.add(t),()=>yn.delete(t)}function G(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}function fe(t,e){if(t.hasAttribute("aria-label")||t.hasAttribute("data-no-label"))return;if(!ft(e)){$(t,"aria-label",e);return}function i(){$(t,"aria-label",e())}u(i)}function go(t){const e=getComputedStyle(t);return e.display!=="none"&&parseInt(e.opacity)>0}function ch(t){return!!t&&("checkVisibility"in t?t.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0}):go(t))}function yo(t,e){return lh(()=>e(ch(t)))}function vo(t,e,i){for(;e;){if(e===t)return!0;if(i?.(e))break;e=e.parentElement}return!1}function ue(t,e){return new B(t).add("pointerup",i=>{i.button===0&&!i.defaultPrevented&&e(i)}).add("keydown",i=>{ki(i)&&e(i)})}function os(t){return ai(t)&&(t.touches.length>1||t.changedTouches.length>1)}function zt(t){let e=vs(),i=window.requestAnimationFrame(()=>{lt(t,e),i=-1});return()=>{window.cancelAnimationFrame(i)}}function Gn(t,e,i){let s,n=t,r=t.parentElement,a=t.content.firstElementChild,o=[];!a&&t.firstElementChild&&(t.innerHTML=t.firstElementChild.outerHTML,t.firstElementChild.remove(),a=t.content.firstElementChild);for(let l=0;l<e;l++)s=document.importNode(a,!0),i?.(s,l),r.insertBefore(s,n.nextSibling),o.push(s),n=s;return E(()=>{for(let l=0;l<o.length;l++)o[l].remove()}),o}function Un(t){const e=document.createElement("template");return e.innerHTML=t,e.content}function Wn(t){return t.cloneNode(!0).firstElementChild}function bo(t,e,i,{offsetVarName:s,xOffset:n,yOffset:r,...a}){if(!t)return;const o=i.replace(" ","-").replace("-center","");if(bt(t,"visibility",e?null:"hidden"),!e)return;let l=i.includes("top");const h=d=>i.includes("left")?`calc(-1 * ${d})`:d,c=d=>l?`calc(-1 * ${d})`:d;return nh(e,t,()=>{oh(e,t,{placement:o,middleware:[...a.middleware??[],ah({fallbackAxisSideDirection:"start",crossAxis:!1}),rh()],...a}).then(({x:d,y:p,middlewareData:m})=>{const v=!!m.flip?.index;l=i.includes(v?"bottom":"top"),t.setAttribute("data-placement",v?i.startsWith("top")?i.replace("top","bottom"):i.replace("bottom","top"):i),Ob
4ject.assign(t.style,{top:`calc(${p+"px"} + ${c(r?r+"px":`var(--${s}-y-offset, 0px)`)})`,left:`calc(${d+"px"} + ${h(n?n+"px":`var(--${s}-x-offset, 0px)`)})`})})})}function uh(t){return getComputedStyle(t).animationName!=="none"}function hh(t){const e=document.createElement("slot");return e.name=t,e}function dh(t){const e=C(!1);return u(()=>{const i=t();i&&new B(i).add("transitionstart",()=>e.set(!0)).add("transitionend",()=>e.set(!1))}),e}function Co(t,e){function i(){const s=t();if(!s)return;e();const n=new ResizeObserver(Jt(e));return n.observe(s),()=>n.disconnect()}u(i)}function ph(t){const e=fh(t),i=mh(t);let s=!1;return F(()=>{const n=e(),r=i();return s&&!n&&!r?!1:(s=n,n||r)})}function fh(t){const e=C(!1);return u(()=>{const i=t();if(!i){e.set(!1);return}new B(i).add("mouseenter",()=>e.set(!0)).add("mouseleave",()=>e.set(!1))}),e}function mh(t){const e=C(!1);return u(()=>{const i=t();if(!i){e.set(!1);return}new B(i).add("focusin",()=>e.set(!0)).add("focusout",()=>e.set(!1))}),e}function he(t){return t instanceof HTMLElement}function gh(){const t=C("dark"),e=window.matchMedia("(prefers-color-scheme: light)");function i(){t.set(e.matches?"light":"dark")}return i(),O(e,"change",i),t}function $o(t,e){u(()=>{const s=e();if(s==="system"){const n=gh();u(()=>i(n()));return}i(s)});function i(s){dn(t,"light",s==="light"),dn(t,"dark",s==="dark")}}function yh(t){return t?"true":"false"}function at(t){return()=>yh(t())}function vh(){return typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}var ot={setAuto:Symbol(0),enableAuto:Symbol(0)};function pi(t){return t instanceof Error?t:Error(typeof t=="string"?t:JSON.stringify(t))}function Wt(t,e){if(!t)throw Error(e||"Assertion failed.")}var As=C(!1);O(document,"pointerdown",()=>{As.set(!1)});O(document,"keydown",t=>{t.metaKey||t.altKey||t.ctrlKey||As.set(!0)});var Ot=class extends Dt{#t=C(!1);onConnect(t){u(()=>{const e=new B(t);if(!As()){this.#t.set(!1),Bi(t,!1),e.add("pointerenter",this.#s.bind(this)).add("pointerleave",this.#n.bind(this));return}const i=document.activeElement===t;this.#t.set(i),Bi(t,i),e.add("focus",this.#e.bind(this)).add("blur",this.#i.bind(this))})}focused(){return this.#t()}#e(){this.#t.set(!0),Bi(this.el,!0)}#i(){this.#t.set(!1),Bi(this.el,!1)}#s(){Yr(this.el,!0)}#n(){Yr(this.el,!1)}};function Bi(t,e){$(t,"data-focus",e),$(t,"data-hocus",e)}function Yr(t,e){$(t,"data-hocus",e),$(t,"data-hover",e)}var St={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},Xr=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],Jr=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],ta=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],vt=typeof window<"u"&&typeof window.document<"u"?window.document:{},_t="fullscreenEnabled"in vt&&Object.keys(St)||Xr[0]in vt&&Xr||Jr[0]in vt&&Jr||ta[0]in vt&&ta||[],Ee={requestFullscreen:function(t){return t[_t[St.requestFullscreen]]()},requestFullscreenFunction:function(t){return t[_t[St.requestFullscreen]]},get exitFullscreen(){return vt[_t[St.exitFullscreen]].bind(vt)},get fullscreenPseudoClass(){return":"+_t[St.fullscreen]},addEventListener:function(t,e,i){return vt.addEventListener(_t[St[t]],e,i)},removeEventListener:function(t,e,i){return vt.removeEventListener(_t[St[t]],e,i)},get fullscreenEnabled(){return!!vt[_t[St.fullscreenEnabled]]},set fullscreenEnabled(t){},get fullscreenElement(){return vt[_t[St.fullscreenElement]]},set fullscreenElement(t){},get onfullscreenchange(){return vt[("on"+_t[St.fullscreenchange]).toLowerCase()]},set onfullscreenchange(t){return vt[("on"+_t[St.fullscreenchange]).toLowerCase()]=t},get onfullscreenerror(){return vt[("on"+_t[St.fullscreenerror]).toLowerCase()]},set onfullscreenerror(t){return vt[("on"+_t[St.fullscreenerror]).toLowerCase()]=t}},wo=class extends Ha{items=[];[P.readonly]=!1;get length(){return this.items.length}get readonly(){return this[P.readonly]}indexOf(t){return this.items.indexOf(t)}getById(t){return t===""?null:this.items.find(e=>e.id===t)??null}toArray(){return[...this.items]}[Symbol.iterator](){return this.items.values()}[P.add](t,e){const i=this.items.length;""+i in this||Object.defineProperty(this,i,{get(){return this.items[i]}}),!this.items.includes(t)&&(this.items.push(t),this.dispatchEvent(new I("add",{detail:t,trigger:e})))}[P.remove](t,e){const i=this.items.indexOf(t);i>=0&&(this[P.onRemove]?.(t,e),this.items.splice(i,1),this.dispatchEvent(new I("remove",{detail:t,trigger:e})))}[P.reset](t){for(const e of[...this.items])this[P.remove](e,t);this.items=[],this[P.setReadonly](!1,t),this[P.onReset]?.()}[P.setReadonly](t,e){this[P.readonly]!==t&&(this[P.readonly]=t,this.dispatchEvent(new I("readonly-change",{detail:t,trigger:e})))}},vn=Ee.fullscreenEnabled,bh=class extends Dt{#t=!1;#e=!1;get active(){return this.#e}get supported(){return vn}onConnect(){new B(Ee).add("fullscreenchange",this.#s.bind(this)).add("fullscreenerror",this.#n.bind(this)),E(this.#i.bind(this))}#i(){vn&&this.exit().catch(Ue)}#s(t){const e=Ys(this.el);e!==this.#e&&(e||(this.#t=!1),this.#e=e,this.dispatch("fullscreen-change",{detail:e,trigger:t}))}#n(t){this.#t&&(this.dispatch("fullscreen-error",{detail:null,trigger:t}),this.#t=!1)}async enter(){try{return this.#t=!0,!this.el||Ys(this.el)?void 0:(ea(),Ee.requestFullscreen(this.el))}catch(t){throw this.#t=!1,t}}async exit(){if(!(!this.el||!Ys(this.el)))return ea(),Ee.exitFullscreen()}};function Ys(t){if(Ee.fullscreenElement===t)return!0;try{return t.matches(Ee.fullscreenPseudoClass)}catch{return!1}}function ea(){if(!vn)throw Error("[vidstack] no fullscreen API")}var To=class ko extends Dt{#t=C(this.#a());#e=C(!1);#i;get type(){return this.#t()}get locked(){return this.#e()}get portrait(){return this.#t().startsWith("portrait")}get landscape(){return this.#t().startsWith("landscape")}
4static supported=Qa();get supported(){return ko.supported}onConnect(){if(this.supported)O(screen.orientation,"change",this.#n.bind(this));else{const e=window.matchMedia("(orientation: landscape)");e.onchange=this.#n.bind(this),E(()=>e.onchange=null)}E(this.#s.bind(this))}async#s(){this.supported&&this.#e()&&await this.unlock()}#n(e){this.#t.set(this.#a()),this.dispatch("orientation-change",{detail:{orientation:y(this.#t),lock:this.#i},trigger:e})}async lock(e){y(this.#e)||this.#i===e||(this.#r(),await screen.orientation.lock(e),this.#e.set(!0),this.#i=e)}async unlock(){y(this.#e)&&(this.#r(),this.#i=void 0,await screen.orientation.unlock(),this.#e.set(!1))}#r(){if(!this.supported)throw Error("[vidstack] no orientation API")}#a(){return this.supported?window.screen.orientation.type:window.innerWidth>=window.innerHeight?"landscape-primary":"portrait-primary"}};function bn(t){return!w(t)&&"width"in t&&"height"in t&&it(t.width)&&it(t.height)}var So=new de({artist:"",artwork:null,audioTrack:null,audioTracks:[],autoPlay:!1,autoPlayError:null,audioGain:null,buffered:new et,canLoad:!1,canLoadPoster:!1,canFullscreen:!1,canOrientScreen:Qa(),canPictureInPicture:!1,canPlay:!1,clipStartTime:0,clipEndTime:0,controls:!1,get iOSControl
4s(){return Za&&this.mediaType==="video"&&(!this.playsInline||!Ee.fullscreenEnabled&&this.fullscreen)},get nativeControls(){return this.controls||this.iOSControls},controlsVisible:!1,get controlsHidden(){return!this.controlsVisible},crossOrigin:null,ended:!1,error:null,fullscreen:!1,get loop(){return this.providedLoop||this.userPrefersLoop},logLevel:"silent",mediaType:"unknown",muted:!1,paused:!0,played:new et,playing:!1,playsInline:!1,pictureInPicture:!1,preload:"metadata",playbackRate:1,qualities:[],quality:null,autoQuality:!1,canSetQuality:!0,canSetPlaybackRate:!0,canSetVolume:!1,canSetAudioGain:!1,seekable:new et,seeking:!1,source:{src:"",type:""},sources:[],started:!1,textTracks:[],textTrack:null,get hasCaptions(){return this.textTracks.filter(ht).length>0},volume:1,waiting:!1,realCurrentTime:0,get currentTime(){return this.ended?this.duration:this.clipStartTime>0?Math.max(0,Math.min(this.realCurrentTime-this.clipStartTime,this.duration)):this.realCurrentTime},providedDuration:-1,intrinsicDuration:0,get duration(){return this.seekableWindow},get title(){return this.providedTitle||this.inferredTitle},get poster(){return this.providedPoster||this.inferredPoster},get viewType(){return this.providedViewType!=="unknown"?this.providedViewType:this.inferredViewType},get streamType(){return this.providedStreamType!=="unknown"?this.providedStreamType:this.inferredStreamType},get currentSrc(){return this.source},get bufferedStart(){const t=Gr(this.buffered)??0;return Math.max(t,this.clipStartTime)},get bufferedEnd(){const t=we(this.buffered)??0;return Math.min(this.seekableEnd,Math.max(0,t-this.clipStartTime))},get bufferedWindow(){return Math.max(0,this.bufferedEnd-this.bufferedStart)}
4,get seekableStart(){if(this.isLiveDVR&&this.liveDVRWindow>0)return Math.max(0,this.seekableEnd-this.liveDVRWindow);const t=Gr(this.seekable)??0;return Math.max(t,this.clipStartTime)},get seekableEnd(){if(this.providedDuration>0)return this.providedDuration;const t=this.liveSyncPosition>0?this.liveSyncPosition:this.canPlay?we(this.seekable)??1/0:0;return this.clipEndTime>0?Math.min(this.clipEndTime,t):t},get seekableWindow(){const t=this.seekableEnd-this.seekableStart;return isNaN(t)?1/0:Math.max(0,t)},canAirPlay:!1,canGoogleCast:!1,remotePlaybackState:"disconnected",remotePlaybackType:"none",remotePlaybackLoader:null,remotePlaybackInfo:null,get isAirPlayConnected(){return this.remotePlaybackType==="airplay"&&this.remotePlaybackState==="connected"},get isGoogleCastConnected(){return this.remotePlaybackType==="google-cast"&&this.remotePlaybackState==="connected"},pointer:"fine",orientation:"landscape",width:0,height:0,mediaWidth:0,mediaHeight:0,lastKeyboardAction:null,userBehindLiveEdge:!1,liveEdgeTolerance:10,minLiveDVRWindow:60,get canSeek(){return/unknown|on-demand|:dvr/.test(this.streamType)&&Number.isFinite(this.duration)&&(!this.isLiveDVR||this.duration>=this.liveDVRWindow)},get live(){return this.streamType.includes("live")||!Number.isFinite(this.duration)},get liveEdgeStart(){return this.live&&Number.isFinite(this.seekableEnd)?Math.max(0,this.seekableEnd-this.liveEdgeTolerance):0},get liveEdge(){return this.live&&(!this.canSeek||!this.userBehindLiveEdge&&this.currentTime>=this.liveEdgeStart)},get liveEdgeWindow(){return this.live&&Number.isFinite(this.seekableEnd)?this.seekableEnd-this.liveEdgeStart:0},get isLiveDVR(){return/:dvr/.test(this.streamType)},get liveDVRWindow(){return Math.max(this.inferredLiveDVRWindow,this.minLiveDVRWindow)},autoPlaying:!1,providedTitle:"",inferredTitle:"",providedLoop:!1,userPrefersLoop:!1,providedPoster:"",inferredPoster:"",inferredViewType:"unknown",providedViewType:"unknown",providedStreamType:"unknown",inferredStreamType:"unknown",liveSyncPosition:null,inferredLiveDVRWindow:0,savedState:null}),xo=new Set(["autoPlayError","autoPlaying","buffered","canPlay","error","paused","played","playing","seekable","seeking","waiting"]),Ch=new Set([...xo,"ended","inferredPoster","inferredStreamType","inferredTitle","intrinsicDuration","inferredLiveDVRWindow","liveSyncPosition","realCurrentTime","savedState","started","userBehindLiveEdge"]);function ia(t,e=!1){const i=e?xo:Ch;So.reset(t,s=>i.has(s)),Nt()}function Po(t,e){const i=t+e.clipStartTime(),s=i<=e.seekableStart(),n=i>=e.seekableEnd();return s?e.seekableStart():n?e.seekableEnd():e.isLiveDVR()&&e.liveDVRWindow()>0&&i<e.seekableEnd()-e.liveDVRWindow()?e.bufferedStart():Math.min(Math.max(e.seekableStart()+.1,i),e.seekableEnd()-.1)}var $h=class{#t=null;#e=null;#i=-1;#s;constructor(t=void 0){this.#s=t}setTarget(t){this.#t=t}getPlayer(t){return this.#e?this.#e:((t??this.#t)?.dispatchEvent(new I("find-media-player",{detail:e=>{this.#e=e},bubbles:!0,composed:!0})),this.#e)}setPlayer(t){this.#e=t}startLoading(t){this.#n("media-start-loading",t)}startLoadingPoster(t){this.#n("media-poster-start-loading",t)}requestAirPlay(t){this.#n("media-airplay-request",t)}requestGoogleCast(t){this.#n("media-google-cast-request",t)}play(t){this.#n("media-play-request",t)}pause(t){this.#n("media-pause-request",t)}mute(t){this.#n("media-mute-request",t)}unmute(t){this.#n("media-unmute-request",t)}enterFullscreen(t,e){this.#n("media-enter-fullscreen-request",e,t)}exitFullscreen(t,e){this.#n("media-exit-fullscreen-request",e,t)}lockScreenOrientation(t,e){this.#n("media-orientation-lock-request",e,t)}unlockScreenOrientation(t){this.#n("media-orientation-unlock-request",t)}enterPictureInPicture(t){this.#n("media-enter-pip-request",t)}exitPictureInPicture(t){this.#n("media-exit-pip-request",t)}seeking(t,e){this.#n("media-seeking-request",e,t)}seek(t,e){this.#n("media-seek-request",e,t)}seekToLiveEdge(t){this.#n("media-live-edge-request",t)}changeDuration(t,e){this.#n("media-duration-change-request",e,t)}changeClipStart(t,e){this.#n("media-clip-start-change-request",e,t)}changeClipEnd(t,e){this.#n("media-clip-end-change-request",e,t)}changeVolume(t,e){this.#n("media-volume-change-request",e,Math.max(0,Math.min(1,t)))}changeAudioTrack(t,e){this.#n("media-audio-track-change-request",e,t)}changeQuality(t,e){this.#n("media-quality-change-request",e,t)}requestAutoQuality(t){this.changeQuality(-1,t)}changeTextTrackMode(t,e,i){this.#n("media-text-track-change-request",i,{index:t,mode:e})}changePlaybackRate(t,e){this.#n("media-rate-change-request",e,t)}changeAudioGain(t,e){this.#n("media-audio-gain-change-request",e,t)}
vendor: 4,213 bytes, line 4
4resumeControls(t){this.#n("media-resume-controls-request",t)}pauseControls(t){this.#n("media-pause-controls-request",t)}togglePaused(t){const e=this.getPlayer(t?.target);e&&(e.state.paused?this.play(t):this.pause(t))}toggleControls(t){const e=this.getPlayer(t?.target);e&&(e.controls.showing?e.controls.hide(0,t):e.controls.show(0,t))}toggleMuted(t){const e=this.getPlayer(t?.target);e&&(e.state.muted?this.unmute(t):this.mute(t))}toggleFullscreen(t,e){const i=this.getPlayer(e?.target);i&&(i.state.fullscreen?this.exitFullscreen(t,e):this.enterFullscreen(t,e))}togglePictureInPicture(t){const e=this.getPlayer(t?.target);e&&(e.state.pictureInPicture?this.exitPictureInPicture(t):this.enterPictureInPicture(t))}showCaptions(t){const e=this.getPlayer(t?.target);if(!e)return;let i=e.state.textTracks,s=this.#i;(!i[s]||!ht(i[s]))&&(s=-1),s===-1&&(s=i.findIndex(n=>ht(n)&&n.default)),s===-1&&(s=i.findIndex(n=>ht(n))),s>=0&&this.changeTextTrackMode(s,"showing",t),this.#i=-1}disableCaptions(t){const e=this.getPlayer(t?.target);if(!e)return;const i=e.state.textTracks,s=e.state.textTrack;if(s){const n=i.indexOf(s);this.changeTextTrackMode(n,"disabled",t),this.#i=n}}toggleCaptions(t){const e=this.getPlayer(t?.target);e&&(e.state.textTrack?this.disableCaptions():this.showCaptions())}userPrefersLoopChange(t,e){this.#n("media-user-loop-change-request",e,t)}#n(t,e,i){const s=new I(t,{bubbles:!0,composed:!0,cancelable:!0,detail:i,trigger:e});let n=e?.target||null;n&&n instanceof x&&(n=n.el),n=!n||n===document||n===window||n===document.body||this.#e?.el&&n instanceof Node&&!this.#e.el.contains(n)?this.#t??this.getPlayer()?.el:n??this.#t,this.#e?t==="media-play-request"&&!this.#e.state.canLoad?n?.dispatchEvent(s):this.#e.canPlayQueue.enqueue(t,()=>n?.dispatchEvent(s)):n?.dispatchEvent(s)}#r(t){}},wh=class{playerId="vds-player";mediaId=null;#t={volume:null,muted:null,audioGain:null,time:null,lang:null,captions:null,rate:null,quality:null};async getVolume(){return this.#t.volume}async setVolume(t){this.#t.volume=t,this.save()}async getMuted(){return this.#t.muted}async setMuted(t){this.#t.muted=t,this.save()}async getTime(){return this.#t.time}async setTime(t,e){const i=t<0;this.#t.time=i?null:t,i||e?this.saveTime():this.saveTimeThrottled()}async getLang(){return this.#t.lang}async setLang(t){this.#t.lang=t,this.save()}async getCaptions(){return this.#t.captions}async setCaptions(t){this.#t.captions=t,this.save()}async getPlaybackRate(){return this.#t.rate}async setPlaybackRate(t){this.#t.rate=t,this.save()}async getAudioGain(){return this.#t.audioGain}async setAudioGain(t){this.#t.audioGain=t,this.save()}async getVideoQuality(){return this.#t.quality}async setVideoQuality(t){this.#t.quality=t,this.save()}onChange(t,e,i="vds-player"){const s=i?localStorage.getItem(i):null,n=e?localStorage.getItem(e):null;this.playerId=i,this.mediaId=e,this.#t={volume:null,muted:null,audioGain:null,lang:null,captions:null,rate:null,quality:null,...s?JSON.parse(s):{},time:n?+n:null}}save(){if(!this.playerId)return;const t=JSON.stringify({...this.#t,time:void 0});localStorage.setItem(this.playerId,t)}saveTimeThrottled=Ve(this.saveTime.bind(this),1e3);saveTime(){if(!this.mediaId)return;const t=(this.#t.time??0).toString();localStorage.setItem(this.mediaId,t)}},ni=Symbol(0),Eo=class extends wo{get selected(){return this.items.find(t=>t.selected)??null}get selectedIndex(){return this.items.findIndex(t=>t.selected)}[P.onRemove](t,e){this[P.select](t,!1,e)}[P.add](t,e){t[ni]=!1,Object.defineProperty(t,"selected",{get(){return this[ni]},set:i=>{this.readonly||(this[P.onUserSelect]?.(),this[P.select](t,i))}}),super[P.add](t,e)}[P.select](t,e,i){if(e===t?.[ni])return;const s=this.selected;t&&(t[ni]=e),(e?s!==t:s===t)&&(s&&(s[ni]=!1),this.dispatchEvent(new I("change",{detail:{prev:s,current:this.selected},trigger:i})))}},Th=class extends Eo{},kh=class{priority=0;#t=!0;#e=null;#i=null;#s=new Set;canRender(t,e){return!!e}attach(t){this.#e=t,t&&(t.textTracks.onchange=this.#l.bind(this))}addTrack(t){this.#s.add(t),this.#n(t)}removeTrack(t){t[L.native]?.remove?.(),t[L.native]=null,this.#s.delete(t)}changeTrack(t){const e=t?.[L.native];e&&e.track.mode!=="showing"&&(e.track.mode="showing"),this.#i=t}
4setDisplay(t){this.#t=t,this.#l()}detach(){this.#e&&(this.#e.textTracks.onchange=null);for(const t of this.#s)this.removeTrack(t);this.#s.clear(),this.#e=null,this.#i=null}#n(t){if(!this.#e)return;const e=t[L.native]??=this.#r(t);he(e)&&(this.#e.append(e),e.track.mode=e.default?"showing":"disabled")}#r(t){const e=document.createElement("track"),i=t.default||t.mode==="showing",s=t.src&&t.type==="vtt";return e.id=t.id,e.src=s?t.src:"",e.label=t.label,e.kind=t.kind,e.default=i,t.language&&(e.srclang=t.language),i&&!s&&this.#a(t,e.track),e}#a(t,e){if(!(t.src&&t.type==="vtt"||e.cues?.length))for(const i of t.cues)e.addCue(i)}#l(t){for(const e of this.#s){const i=e[L.native];if(!i)continue;if(!this.#t){i.track.mode=i.managed?"hidden":"disabled";continue}const s=i.track.mode==="showing";s&&this.#a(e,i.track),e.setMode(s?"showing":"disabled",t)}}},Sh=class{#t=null;#e;#i=[];#s;#n=!1;#r=null;#a=null;constructor(t){this.#s=t;const e=t.textTracks;this.#e=e,u(this.#l.bind(this)),E(this.#p.bind(this)),new B(e).add("add",this.#c.bind(this)).add("remove",this.#d.bind(this)).add("mode-change",this.#h.bind(this))}#l(){const{nativeControls:t}=this.#s.$state;this.#n=t(),this.#h()}add(t){this.#i.push(t),Be(this.#h.bind(this))}remove(t){t.detach(),this.#i.splice(this.#i.indexOf(t),1),Be(this.#h.bind(this))}attachVideo(t){requestAnimationFrame(()=>{if(this.#t=t,t){this.#r=new kh,this.#r.attach(t);for(const e of this.#e)this.#o(e)}this.#h()})}#o(t){ht(t)&&this.#r?.addTrack(t)}#u(t){ht(t)&&this.#r?.removeTrack(t)}#c(t){this.#o(t.detail)}#d(t){this.#u(t.detail)}#h(){const t=this.#e.selected;if(this.#t&&(this.#n||t?.[L.nativeHLS])){this.#a?.changeTrack(null),this.#r?.setDisplay(!0),this.#r?.changeTrack(t);return}if(this.#r?.setDisplay(!1),this.#r?.changeTrack(null),!t){this.#a?.changeTrack(null);return}const e=this.#i.sort((i,s)=>i.priority-s.priority).find(i=>i.canRender(t,this.#t));this.#a!==e&&(this.#a?.detach(),e?.attach(this.#t),this.#a=e??null),e?.changeTrack(t)}#p(){this.#r?.detach(),this.#r=null,this.#a?.detach(),this.#a=null}},xh=class extends wo{#t=!1;#e={};#i=null;#s=null;[L.crossOrigin];constructor(){super()}get selected(){return this.items.find(t=>t.mode==="showing"&&ht(t))??null}get selectedIndex(){const t=this.selected;return t?this.indexOf(t):-1}get preferredLang(){return this.#s}set preferredLang(t){this.#s=t,this.#u(t)}add(t,e){const i=t instanceof ce?t:new ce(t),s=t.kind==="captions"||t.kind==="subtitles"?"captions":t.kind;return this.#e[s]&&t.default&&delete t.default,i.addEventListener("mode-change",this.#a),this[P.add](i,e),i[L.crossOrigin]=this[L.crossOrigin],this.#t&&i[L.canLoad](),t.default&&(this.#e[s]=i),this.#n(),this}remove(t,e){if(this.#r=t,!!this.items.includes(t))return t===this.#e[t.kind]&&delete this.#e[t.kind],t.mode="disabled",t[L.onModeChange]=null,t.removeEventListener("mode-change",this.#a),this[P.remove](t,e),this.#r=null,this}clear(t){for(const e of[...this.items])this.remove(e,t);return this}getByKind(t){const e=Array.isArray(t)?t:[t];return this.items.filter(i=>e.includes(i.kind))}[L.canLoad](){if(!this.#t){for(const t of this.items)t[L.canLoad]();this.#t=!0,this.#n()}}#n=_n(async()=>{if(!this.#t)return;!this.#s&&this.#i&&(this.#s=await this.#i.getLang());const t=await this.#i?.getCaptions();for(const e of[["captions","subtitles"],"chapters","descriptions","metadata"]){const i=this.getByKind(e);if(i.find(o=>o.mode==="showing"))continue;const s=this.#s?i.find(o=>o.language===this.#s):null,n=Q(e)?this.#e[e.find(o=>this.#e[o])||""]:this.#e[e],r=s??n,a=r&&ht(r);r&&(!a||t!==!1)&&(r.mode="showing",a&&this.#o(r))}},300);#r=null;#a=this.#l.bind(this);#l(t){const e=t.detail;if(this.#i&&ht(e)&&e!==this.#r&&this.#o(e),e.mode==="showing"){const i=ht(e)?["captions","subtitles"]:[e.kind];for(const s of this.items)s.mode==="showing"&&s!=e&&i.includes(s.kind)&&(s.mode="disabled")}this.dispatchEvent(new I("mode-change",{detail:t.detail,trigger:t}))}#o(t){t.mode!=="disabled"&&this.#u(t.language),this.#i?.setCaptions?.(t.mode==="showing")}#u(t){this.#i?.setLang?.(this.#s=t)}setStorage(t){this.#i=t}},Ph=class extends Eo{#t=!1;switch="current";get auto(){return this.#t||this.readonly}[ot.enableAuto];[P.onUserSelect](){this[ot.setAuto](!1)}[P.onReset](t){this[ot.enableAuto]=void 0,this[ot.setAuto](!1,t)}autoSelect(t){this.readonly||this.#t||!this[ot.enableAuto]||(this[ot.enableAuto]?.(t),this[ot.setAuto](!0,t))}getBySrc(t){return this.items.find(e=>e.src===t)}[ot.setAuto](t,e){this.#t!==t&&(this.#t=t,this.dispatchEvent(new I("auto-change",{detail:t,trigger:e})))}};function Eh(t){return t instanceof HTMLAudioElement}function Ah(t){return t instanceof HTMLVideoElement}function Lh(t){return Eh(t)||Ah(t)}var De=class extends Dt{},Mh={togglePaused:"k Space",toggleMuted:"m",toggleFullscreen:"f",togglePictureInPicture:"i",toggleCaptions:"c",seekBackward:"j J ArrowLeft",seekForward:"l L ArrowRight",volumeUp:"ArrowUp",volumeDown:"ArrowDown",speedUp:">",slowDown:"<"},li=new Set(["Shift","Alt","Meta","Ctrl"]),_h='button, [role="button"]',sa='input, textarea, select, [contenteditable], [role^="menuitem"], [role="timer"]',Ih=class extends De{#t;constructor(t){super(),this.#t=t}onConnect(){u(this.#e.bind(this))}#e(){const{keyDisabled:t,keyTarget:e}=this.$props;if(t())return;const i=e()==="player"?this.el:document,s=C(!1);i===this.el?new B(this.el).add("focusin",()=>s.set(!0)).add("focusout",n=>{this.el.contains(n.target)||s.set(!1)}):(y(s)||s.set(document.querySelector("[data-media-player]")===this.el),O(document,"focusin",n=>{const r=n.composedPath().find(a=>a instanceof Element&&a.localName==="media-player");r!==void 0&&s.set(this.el===r)})),u(()=>{s()&&new B(i).add("keyup",this.#i.bind(this)).add("keydown",this.#s.bind(this)).add("keydown",this.#n.bind(this),{capture:!0})})}#i(t){const e=document.activeElement;if(!t.key||!this.$state.canSeek()||e?.matches(sa))return;let{method:i,value:s}=this.#r(t);if(!w(s)&&!Q(s)){s?.onKeyUp?.({event:t,player:this.#t.player,remote:this.#t.remote}),s?.callback?.(t,this.#t.remote);return}i?.startsWith("seek")&&(t.preventDefault(),t.stopPropagation(),this.#o?(this.#u(t,i==="seekForward"),this.#o=null):(this.#t.remote.seek(this.#a,t),this.#a=void 0)),i?.startsWith("volume")&&this.el.querySelector("[data-media-volume-slider]")?.dispatchEvent(new KeyboardEvent("keyup",{key:i==="volumeUp"?"Up":"Down",shiftKey:t.shiftKey,trigger:t}))}#s(t){if(!t.key||li.has(t.key))return;const e=document.activeElement;if(e?.matches(sa)||ki(t)&&e?.matches(_h))return;let{method:i,value:s}=this.#r(t),n=!t.metaKey&&/^[0-9]$/.test(t.key);if(!w(s)&&!Q(s)&&!n){s?.onKeyDown?.({event:t,player:this.#t.player,remote:this.#t.remote}),s?.callback?.(t,this.#t.remote);return}if(!i&&n&&!Rh(t)){t.preventDefault(),t.stopPropagation(),this.#t.remote.seek(this.$state.duration()/10*Number(t.key),t);return}if(i){switch(t.preventDefault(),t.stopPropagation(),i){case"seekForward":case"seekBackward":this.#c(t,i,i==="seekForward");break;case"volumeUp":case"volumeDown":const r=this.el.querySelector("[data-media-volume-slider]");if(r)r.dispatchEvent(new KeyboardEvent("keydown",{key:i==="volumeUp"?"Up":"Down",shiftKey:t.shiftKey,trigger:t}));else{const o=t.shiftKey?.1:.05;this.#t.remote.changeVolume(this.$state.volume()+(i==="volumeUp"?+o:-o),t)}break;case"toggleFullscreen":this.#t.remote.toggleFullscreen("prefer-media",t);break;case"speedUp":case"slowDown":const a=this.$state.playbackRate();this.#t.remote.changePlaybackRate(Math.max(.25,Math.min(2,a+(i==="speedUp"?.25:-.25))),t);break;default:this.#t.remote[i]?.(t)}this.$state.lastKeyboardAction.set({action:i,event:t})}}#n(t){Lh(t.target)&&this.#r(t).method&&t.preventDefault()}#r(t){const e={...this.$props.keyShortcuts(),...this.#t.ariaKeys},i=Object.keys(e).find(s=>{const n=e[s],r=Q(n)?n.join(" "):w(n)?n:n?.keys;return(Q(r)?r:r?.split(" "))?.map(a=>Dh(a).replace(/Control/g,"Ctrl").split("+"))?.some(a=>{const o=new Set(a.filter(l=>li.has(l)));"<>".includes(t.key)&&o.add("Shift");for(const l of li){const h=l.toLowerCase()+"Key";if(!o.has(l)&&t[h])return!1}return a.every(l=>li.has(l)?t[l.toLowerCase()+"Key"]:t.key===l.replace("Space"," "))})});return{method:i,value:i?e[i]:null}}#a;#l(t,e){const i=t.shiftKey?10:5;return this.#a=Math.max(0,Math.min((this.#a??this.$state.currentTime())+(e==="seekForward"?+i:-i),this.$state.duration()))}#o=null;#u(t,e){this.#o?.dispatchEvent(new KeyboardEvent(t.type,{key:e?"Right":"Left",shiftKey:t.shiftKey,trigger:t}))}#c(t,e,i){this.$state.canSeek()&&(this.#o||(this.#o=this.el.querySelector("[data-media-time-slider]")),this.#o?this.#u(t,i):this.#t.remote.seeking(this.#l(t,e),t))}},Vh=["!","@","#","$","%","^","&","*","(",")"];function Dh(t){return t.replace(/Shift\+(\d)/g,(e,i)=>Vh[i-1])}function Rh(t){for(const e of li)if(t[e.toLowerCase()+"Key"])return!0;return!1}var Oh=class extends De{#t=-2;#e=!1;#i=C(!1);#s=C(!1);#n=null;#r=C(!0);defaultDelay=2e3;get canIdle(){return this.#r()}set canIdle(t){this.#r.set(t)}get hideOnMouseLeave(){const{hideControlsOnMouseLeave:t}=this.$props;return this.#i()||t()}set hideOnMouseLeave(t){this.#i.set(t)}get showing(){return this.$state.controlsVisible()}show(t=0,e){this.#m(),this.#e||this.#g(!0,t,e)}hide(t=this.defaultDelay,e){this.#m(),this.#e||this.#g(!1,t,e)}pause(t){this.#e=!0,this.#m(),this.#g(!0,0,t)}resume(t){this.#e=!1,!this.$state.paused()&&this.#g(!1,this.defaultDelay,t)}onConnect(){u(this.#a.bind(this))}
4#a(){const{viewType:t}=this.$state;if(!this.el||!this.#r())return;if(t()==="audio"){this.show();return}u(this.#l.bind(this)),u(this.#o.bind(this));const e=this.#u.bind(this),i=this.#c.bind(this),s=this.#d.bind(this);new B(this.el).add("can-play",n=>this.show(0,n)).add("play",e).add("pause",i).add("end",s).add("auto-play-fail",i)}#l(){if(!this.el)return;const{started:t,pointer:e,paused:i}=this.$state;if(!t()||e()!=="fine")return;const s=new B(this.el),n=this.hideOnMouseLeave;(!n||!this.#s())&&u(()=>{i()||s.add("pointermove",this.#y.bind(this))}),n&&s.add("mouseenter",this.#h.bind(this)).add("mouseleave",this.#p.bind(this))}#o(){const{paused:t,started:e,autoPlayError:i}=this.$state;if(t()||i()&&!e())return;const s=this.#y.bind(this);u(()=>{if(!this.el)return;const n=this.$state.pointer()==="coarse",r=new B(this.el),a=[n?"touchend":"pointerup","keydown"];for(const o of a)r.add(o,s,{passive:!1})})}#u(t){t.triggers.hasType("ended")||(this.show(0,t),this.hide(void 0,t))}#c(t){this.show(0,t)}#d(t){const{loop:e}=this.$state;e()&&this.hide(0,t)}#h(t){this.#s.set(!1),this.show(0,t),this.hide(void 0,t)}#p(t){this.#s.set(!0),this.hide(0,t)}#m(){window.clearTimeout(this.#t),this.#t=-1}#y(t){t.MEDIA_GESTURE||this.#e||os(t)||(ze(t)&&(t.key==="Escape"?(this.el?.focus(),this.#n=null):this.#n&&(t.preventDefault(),requestAnimationFrame(()=>{this.#n?.focus(),this.#n=null}))),this.show(0,t),this.hide(this.defaultDelay,t))}#g(t,e,i){if(e===0){this.#C(t,i);return}this.#t=window.setTimeout(()=>{this.scope&&this.#C(t&&!this.#e,i)},e)}#C(t,e){this.$state.controlsVisible()!==t&&(this.$state.controlsVisible.set(t),!t&&document.activeElement&&this.el?.contains(document.activeElement)&&(this.#n=document.activeElement,requestAnimationFrame(()=>{this.el?.focus({preventScroll:!0})}
4)),this.dispatch("controls-change",{detail:t,trigger:e}))}},qh=class{name="audio";target;canPlay(t){return In(t)?!w(t.src)||t.type==="?"||za(this.target,t.type):!1}mediaType(){return"audio"}async load(t){return new(await ut(async()=>{const{AudioProvider:e}=await Promise.resolve().then(()=>r3);return{AudioProvider:e}},void 0,import.meta.url)).AudioProvider(this.target,t)}},jn=class{name="video";target;canPlay(t){return Vn(t)?!w(t.src)||t.type==="?"||Ya(this.target,t.type):!1}mediaType(){return"video"}async load(t){return new(await ut(async()=>{const{VideoProvider:e}=await Promise.resolve().then(()=>V3);return{VideoProvider:e}},void 0,import.meta.url)).VideoProvider(this.target,t)}},Nh=class Ao extends jn{static supported=ws();name="hls";canPlay(e){return Ao.supported&&Xe(e)}async load(e){return new(await ut(async()=>{const{HLSProvider:i}=await Promise.resolve().then(()=>x3);return{HLSProvider:i}},void 0,import.meta.url)).HLSProvider(this.target,e)}},Hh=class Lo extends jn{static supported=eo();name="dash";canPlay(e){return Lo.supported&&Ts(e)}async load(e){return new(await ut(async()=>{const{DASHProvider:i}=await Promise.resolve().then(()=>$3);return{DASHProvider:i}},void 0,import.meta.url)).DASHProvider(this.target,e)}},Fh=class{name="vimeo";target;preconnect(){for(const t of["https://i.vimeocdn.com","https://f.vimeocdn.com","https://fresnel.vimeocdn.com"])te(t)}canPlay(t){return w(t.src)&&t.type==="video/vimeo"}mediaType(){return"video"}async load(t){return new(await ut(async()=>{const{VimeoProvider:e}=await Promise.resolve().then(()=>D3);return{VimeoProvider:e}},void 0,import.meta.url)).VimeoProvider(this.target,t)}async loadPoster(t,e,i){const{resolveVimeoVideoId:s,getVimeoVideoInfo:n}=await ut(()=>Promise.resolve().then(()=>U6).then(o=>o.utils_exports),void 0,import.meta.url);if(!w(t.src))return null;const{videoId:r,hash:a}=s(t.src);return r?n(r,i,a).then(o=>o?o.poster:null):null}},Bh=class{name="youtube";target;preconnect(){for(const t of["https://www.google.com","https://i.ytimg.com","https://googleads.g.doubleclick.net","https://static.doubleclick.net"])te(t)}canPlay(t){return w(t.src)&&t.type==="video/youtube"}mediaType(){return"video"}async load(t){return new(await ut(async()=>{const{YouTubeProvider:e}=await Promise.resolve().then(()=>q3);return{YouTubeProvider:e}},void 0,import.meta.url)).YouTubeProvider(this.target,t)}async loadPoster(t,e,i){const{findYouTubePoster:s,resolveYouTubeVideoId:n}=await ut(()=>Promise.resolve().then(()=>N6).then(a=>a.utils_exports),void 0,import.meta.url),r=w(t.src)&&n(t.src);return r?s(r,i):null}},Xs=Symbol(0),Gh=["autoPlay","canAirPlay","canFullscreen","canGoogleCast","canLoad","canLoadPoster","canPictureInPicture","canPlay","canSeek","ended","fullscreen","isAirPlayConnected","isGoogleCastConnected","live","liveEdge","loop","mediaType","muted","paused","pictureInPicture","playing","playsInline","remotePlaybackState","remotePlaybackType","seeking","started","streamType","viewType","waiting"],Uh={artist:"",artwork:null,ariaLabel:"",autoplay:!1,autoPlay:!1,clipStartTime:0,clipEndTime:0,controls:!1,currentTime:0,crossorigin:null,crossOrigin:null,duration:-1,fullscreenOrientation:"landscape",googleCast:{},load:"visible",posterLoad:"visible",logLevel:"silent",loop:!1,muted:!1,paused:!0,playsinline:!1,playsInline:!1,playbackRate:1,poster:"",preload:"metadata",preferNativeHLS:!1,src:"",title:"",controlsDelay:2e3,hideControlsOnMouseLeave:!1,viewType:"unknown",streamType:"unknown",volume:1,liveEdgeTolerance:10,minLiveDVRWindow:60,keyDisabled:!1,keyTarget:"player",keyShortcuts:Mh,storage:null},na=class extends De{#t;#e;constructor(t,e){super(),this.#t=t,this.#e=e}async onAttach(t){const e=this.$props[this.#t]();if(e==="eager")requestAnimationFrame(this.#e);else if(e==="idle")kc(this.#e);else if(e==="visible"){let i,s=new IntersectionObserver(n=>{this.scope&&n[0].isIntersecting&&(i?.(),i=void 0,this.#e())});s.observe(t),i=E(()=>s.disconnect())}}},Wh=class{#t;#e;constructor(t,e){this.#t=t,this.#e=e}notify(t,...e){this.#t(new I(t,{detail:e?.[0],trigger:e?.[1]}))}async ready(t,e){return Be(async()=>{const{logger:i}=this.#e,{autoPlay:s,canPlay:n,started:r,duration:a,seekable:o,buffered:l,remotePlaybackInfo:h,playsInl
4ine:c,savedState:d,source:p}=this.#e.$state;if(n())return;const m={duration:t?.duration??a(),seekable:t?.seekable??o(),buffered:t?.buffered??l(),provider:this.#e.$provider()};this.notify("can-play",m,e),Nt();let v=this.#e.$provider(),{storage:b,qualities:A}=this.#e,{muted:D,volume:R,clipStartTime:q,playbackRate:H}=this.#e.$props;await b?.onLoad?.(p());const tt=d()?.currentTime,j=d()?.paused,Lt=await b?.getTime(),yt=tt??Lt??q(),$t=j===!1||j!==!0&&!r()&&s();if(v){v.setVolume(await b?.getVolume()??R()),v.setMuted(D()||!!await b?.getMuted());const Mt=await b?.getAudioGain()??1;Mt>1&&v.audioGain?.setGain?.(Mt),v.setPlaybackRate?.(await b?.getPlaybackRate()??H()),v.setPlaysInline?.(c()),yt>0&&v.setCurrentTime(yt)}const pt=await b?.getVideoQuality();if(pt&&A.length){let Mt=null,se=1/0;for(const st of A){const J=Math.abs(pt.width-st.width)+Math.abs(pt.height-st.height)+(pt.bitrate?Math.abs(pt.bitrate-(st.bitrate??0)):0);J<se&&(Mt=st,se=J)}Mt&&(Mt.selected=!0)}n()&&$t?await this.#i(e):Lt&&Lt>0&&this.notify("started",void 0,e),h.set(null)})}async#i(t){const{player:e,$state:{autoPlaying:i,muted:s}}=this.#e;i.set(!0);const n=new I("auto-play-attempt",{trigger:t});try{await e.play(n)}catch{}}},jh=class{#t=new Map;enqueue(t,e){this.#t.set(t,e)}serve(t){const e=this.peek(t);return this.#t.delete(t),e}peek(t){return this.#t.get(t)}delete(t){this.#t.delete(t)}clear(){this.#t.clear()}},Mo=class{#t=!1;#e=We();#i=new Map;get size(){return this.#i.size}get isServing(){return this.#t}async waitForFlush(){this.#t||await this.#e.promise}enqueue(t,e){if(this.#t){e();return}this.#i.delete(t),this.#i.set(t,e)}serve(t){this.#i.get(t)?.(),this.#i.delete(t)}start(){this.#s(),this.#t=!0,this.#i.size>0&&this.#s()}stop(){this.#t=!1}reset(){this.stop(),this.#i.clear(),this.#n()}#s(){for(const t of this.#i.keys())this.serve(t);this.#n()}#n(){this.#e.resolve(),this.#e=We()}},Kh=class extends De{#t;#e;#i;controls;#s;#n;#r;#a=new Mo;constructor(t,e,i){super(),this.#t=t,this.#e=e,this.#i=i,this.#r=i.$provider,this.controls=new Oh,this.#s=new bh,this.#n=new To}onAttach(){this.listen("fullscreen-change",this.#k.bind(this))}onConnect(t){const e=Object.getOwnPropertyNames(Object.getPrototypeOf(this)),i=new B(t),s=this.#u.bind(this);for(const n of e)n.startsWith("media-")&&i.add(n,s);this.#l(),u(this.#o.bind(this)),u(this.#m.bind(this)),u(this.#y.bind(this)),u(this.#g.bind(this)),u(this.#C.bind(this)),u(this.#f.bind(this)),u(this.#$.bind(this))}onDestroy(){try{const t=this.createEvent("destroy"),{pictureInPicture:e,fullscreen:i}=this.$state;i()&&this.exitFullscreen("prefer-media",t),e()&&this.exitPictureInPicture(t)}catch{}this.#a.reset()}#l(){const{load:t}=this.$props,{canLoad:e}=this.$state;if(t()!=="play"||e())return;const i=this.listen("media-play-request",s=>{this.#c(s),i()})}#o(){const t=this.#r(),e=this.$state.canPlay();return t&&e&&this.#a.start(),()=>{this.#a.stop()}}#u(t){t.stopPropagation(),!t.defaultPrevented&&this[t.type]&&(y(this.#r)?this[t.type](t):this.#a.enqueue(t.type,()=>{y(this.#r)&&this[t.type](t)}))}async play(t){const{canPlay:e,paused:i,autoPlaying:s}=this.$state;if(this.#c(t)||!y(i))return;t&&this.#e.queue.enqueue("media-play-request",t);const n=y(s);try{const r=y(this.#r);return Js(r,y(e)),Zh(n),await r.play()}catch(r){const a=this.createEvent("play-fail",{detail:pi(r),trigger:t});throw a.autoPlay=n,this.#t.handle(a),r}}#c(t){const{load:e}=this.$props,{canLoad:i}=this.$state;if(e()==="play"&&!i()){const s=this.createEvent("media-start-loading",{trigger:t});return this.dispatchEvent(s),this.#a.enqueue("media-play-request",async()=>{try{await this.play(s)}catch{}}),!0}return!1}async pause(t){const{canPlay:e,paused:i}=this.$state;if(!y(i)){t&&this.#e.queue.enqueue("media-pause-request",t);try{const s=y(this.#r);return Js(s,y(e)),await s.pause()}catch(s){throw this.#e.queue.delete("media-pause-request"),s}}}setAudioGain(t,e){const{audioGain:i,canSetAudioGain:s}=this.$state;if(i()===t)return;const n=this.#r();if(!n?.audioGain||!s())throw Error("[vidstack] audio gain api not available");e&&this.#e.queue.enqueue("media-audio-gain-change-request",e),n.audioGain.setGain(t)}
4seekToLiveEdge(t){const{canPlay:e,live:i,liveEdge:s,canSeek:n,liveSyncPosition:r,seekableEnd:a,userBehindLiveEdge:o}=this.$state;if(o.set(!1),y(()=>!i()||n()&&s()))return;const l=y(this.#r);Js(l,y(e));const h=a()-2,c=Math.min(h,r()??h);Number.isFinite(c)&&(t&&this.#e.queue.enqueue("media-seek-request",t),l.setCurrentTime(c))}#d=!1;async enterFullscreen(t="prefer-media",e){const i=this.#h(t);if(ra(t,i),!i.active)return y(this.$state.pictureInPicture)&&(this.#d=!0,await this.exitPictureInPicture(e)),e&&this.#e.queue.enqueue("media-enter-fullscreen-request",e),i.enter()}async exitFullscreen(t="prefer-media",e){const i=this.#h(t);if(ra(t,i),!!i.active){e&&this.#e.queue.enqueue("media-exit-fullscreen-request",e);try{const s=await i.exit();return this.#d&&y(this.$state.canPictureInPicture)&&await this.enterPictureInPicture(),s}finally{this.#d=!1}}}#h(t){const e=y(this.#r);return t==="prefer-media"&&this.#s.supported||t==="media"?this.#s:e?.fullscreen}async enterPictureInPicture(t){if(this.#p(),!this.$state.pictureInPicture())return t&&this.#e.queue.enqueue("media-enter-pip-request",t),await this.#r().pictureInPicture.enter()}async exitPictureInPicture(t){if(this.#p(),!!this.$state.pictureInPicture()){t&&this.#e.queue.enqueue("media-exit-pip-request",t);try{if(document?.pictureInPictureElement&&document.exitPictureInPicture){await document.exitPictureInPicture();return}const e=this.#r();if(e?.pictureInPicture){await e.pictureInPicture.exit();return}const i=document?.querySelectorAll?.("video")||[];for(const s of i){if(s===document.pictureInPictureElement&&document.exitPictureInPicture){await document.exitPictureInPicture();return}if(s.webkitPresentationMode==="picture-in-picture"){s.webkitSetPresentationMode("inline");return}}}catch{}}}#p(){if(!this.$state.canPictureInPicture())throw Error("[vidstack] no pip support")}#m(){this.controls.defaultDelay=this.$props.controlsDelay()}#y(){const{canSetAudioGain:t}=this.$state,e=!!this.#r()?.audioGain?.supported;t.set(e)}#g(){const{canAirPlay:t}=this.$state,e=!!this.#r()?.airPlay?.supported;t.set(e)}#C(){const{canGoogleCast:t,source:e}=this.$state,i=$s&&!Cs&&io(e());t.set(i)}#f(){const{canFullscreen:t}=this.$state,e=this.#s.supported||!!this.#r()?.fullscreen?.supported;t.set(e)}#$(){const{canPictureInPicture:t}=this.$state,e=!!this.#r()?.pictureInPicture?.supported;t.set(e)}async"media-airplay-request"(t){try{await this.requestAirPlay(t)}catch{}}async requestAirPlay(t){try{const e=this.#r()?.airPlay;if(!e?.supported)throw Error("No AirPlay adapter.");return t&&this.#e.queue.enqueue("media-airplay-request",t),await e.prompt()}catch(e){throw this.#e.queue.delete("media-airplay-request"),e}}async"media-google-cast-request"(t){try{await this.requestGoogleCast(t)}catch{}}#v;async requestGoogleCast(t){try{const{canGoogleCast:e}=this.$state;if(!y(e)){const s=Error("Cast not available.");throw s.code="CAST_NOT_AVAILABLE",s}if(te("https://www.gstatic.com"),!this.#v){const s=await ut(()=>Promise.resolve().then(()=>O6),void 0,import.meta.url);this.#v=new s.GoogleCastLoader}await this.#v.prompt(this.#i),t&&this.#e.queue.enqueue("media-google-cast-request",t);const i=y(this.$state.remotePlaybackState)!=="disconnected";i&&this.$state.savedState.set({paused:y(this.$state.paused),currentTime:y(this.$state.currentTime)}),this.$state.remotePlaybackLoader.set(i?this.#v:null)}catch(e){throw this.#e.queue.delete("media-google-cast-request"),e}}"media-clip-start-change-request"(t){const{clipStartTime:e}=this.$state;e.set(t.detail)}"media-clip-end-change-request"(t){const{clipEndTime:e}=this.$state;e.set(t.detail),this.dispatch("duration-change",{detail:t.detail,trigger:t})}"media-duration-change-request"(t){const{providedDuration:e,clipEndTime:i}=this.$state;e.set(t.detail),i()<=0&&this.dispatch("duration-change",{detail:t.detail,trigger:t})}"media-audio-track-change-request"(t){const{logger:e,audioTracks:i}=this.#i;if(i.readonly)return;const s=i[t.detail];if(s){const n=t.type;this.#e.queue.enqueue(n,t),s.selected=!0}}async"media-enter-fullscreen-request"(t){try{await this.enterFullscreen(t.detail,t)}catch(e){this.#b(e,t)}}async"media-exit-fullscreen-request"(t){try{await this.exitFullscreen(t.detail,t)}catch(e){this.#b(e,t)}}async#k(t){const e=y(this.$props.fullscreenOrientation),i=t.detail;if(!(ct(e)||e==="none"||!this.#n.supported))if(i){if(this.#n.locked)return;this.dispatch("media-orientation-lock-request",{detail:e,trigger:t})}else this.#n.locked&&this.dispatch("media-orientation-unlock-request",{trigger:t})}#b(t,e){this.#t.handle(this.createEvent("fullscreen-error",{detail:pi(t)}))}async"media-orientation-lock-request"(t){const e=t.type;try{this.#e.queue.enqueue(e,t),await this.#n.lock(t.detail)}catch{this.#e.queue.delete(e)}}async"media-orientation-unlock-request"(t){const e=t.type;try{this.#e.queue.enqueue(e,t),await this.#n.unlock()}catch{this.#e.queue.delete(e)}}async"media-enter-pip-request"(t){try{await this.enterPictureInPicture(t)}catch(e){this.#w(e,t)}}async"media-exit-pip-request"(t){try{await this.exitPictureInPicture(t)}catch(e){this.#w(e,t)}}#w(t,e){this.#t.handle(this.createEvent("picture-in-picture-error",{detail:pi(t)}))}"media-live-edge-request"(t){const{live:e,liveEdge:i,canSeek:s}=this.$state;if(!(!e()||s()&&i()))try{this.seekToLiveEdge(t)}catch{this.#e.queue.delete("media-seek-request")}}async"media-loop-request"(t){try{this.#e.looping=!0,this.#e.replaying=!0,await this.play(t)}catch{this.#e.looping=!1}}"media-user-loop-change-request"(t){this.$state.userPrefersLoop.set(t.detail)}async"media-pause-request"(t){if(!this.$state.paused())try{await this.pause(t)}catch{}}async"media-play-request"(t){if(this.$state.paused())try{await this.play(t)}catch{}}"media-rate-change-request"(t){const{playbackRate:e,canSetPlaybackRate:i}=this.$state;if(e()===t.detail||!i())return;const s=this.#r();s?.setPlaybackRate&&(this.#e.queue.enqueue("media-rate-change-request",t),s.setPlaybackRate(t.detail))}"media-audio-gain-change-request"(t){try{this.setAudioGain(t.detail,t)}catch{}}"media-quality-change-request"(t){const{qualities:e,storage:i,logger:s}
4=this.#i;if(e.readonly)return;this.#e.queue.enqueue("media-quality-change-request",t);const n=t.detail;if(n<0)e.autoSelect(t),t.isOriginTrusted&&i?.setVideoQuality?.(null);else{const r=e[n];r&&(r.selected=!0,t.isOriginTrusted&&i?.setVideoQuality?.({id:r.id,width:r.width,height:r.height,bitrate:r.bitrate}))}}"media-pause-controls-request"(t){const e=t.type;this.#e.queue.enqueue(e,t),this.controls.pause(t)}"media-resume-controls-request"(t){const e=t.type;this.#e.queue.enqueue(e,t),this.controls.resume(t)}"media-seek-request"(t){const{canSeek:e,ended:i,live:s,seekableEnd:n,userBehindLiveEdge:r}=this.$state,a=t.detail;i()&&(this.#e.replaying=!0);const o=t.type;this.#e.seeking=!1,this.#e.queue.delete(o);const l=Po(a,this.$state);!Number.isFinite(l)||!e()||(this.#e.queue.enqueue(o,t),this.#r().setCurrentTime(l),s()&&t.isOriginTrusted&&Math.abs(n()-l)>=2&&r.set(!0))}"media-seeking-request"(t){const e=t.type;this.#e.queue.enqueue(e,t),this.$state.seeking.set(!0),this.#e.seeking=!0}"media-start-loading"(t){if(this.$state.canLoad())return;const e=t.type;this.#e.queue.enqueue(e,t),this.#t.handle(this.createEvent("can-load"))}"media-poster-start-loading"(t){if(this.$state.canLoadPoster())return;const e=t.type;this.#e.queue.enqueue(e,t),this.#t.handle(this.createEvent("can-load-poster"))}"media-text-track-change-request"(t){const{index:e,mode:i}=t.detail,s=this.#i.textTracks[e];if(s){const n=t.type;this.#e.queue.enqueue(n,t),s.setMode(i,t)}}"media-mute-request"(t){if(this.$state.muted())return;const e=t.type;this.#e.queue.enqueue(e,t),this.#r().setMuted(!0)}"media-unmute-request"(t){const{muted:e,volume:i}=this.$state;if(!e())return;const s=t.type;this.#e.queue.enqueue(s,t),this.#i.$provider().setMuted(!1),i()===0&&(this.#e.queue.enqueue(s,t),this.#r().setVolume(.25))}"media-volume-change-request"(t){const{muted:e,volume:i}=this.$state,s=t.detail;if(i()===s)return;const n=t.type;this.#e.queue.enqueue(n,t),this.#r().setVolume(s),s>0&&e()&&(this.#e.queue.enqueue(n,t),this.#r().setMuted(!1))}#S(t,e,i){}};function Js(t,e){if(!(t&&e))throw Error("[vidstack] media not ready")}function ra(t,e){if(!e?.supported)throw Error("[vidstack] no fullscreen support")}function Zh(t){if(!(!vh()||!t))throw Error("[vidstack] autoplay blocked")}var Qh=class{seeking=!1;looping=!1;replaying=!1;queue=new jh},zh=new Set(["auto-play","auto-play-fail","can-load","sources-change","source-change","load-start","abort","error","loaded-metadata","loaded-data","can-play","play","play-fail","pause","playing","seeking","seeked","waiting"]),Yh=class extends De{#t;#e;#i=new Map;#s=!1;#n=[];#r=[-1,-1];#a=!1;#l;constructor(t,e){super(),this.#t=t,this.#e=e}onAttach(t){t.setAttribute("aria-busy","true"),new B(this).add("fullscreen-change",this["fullscreen-change"].bind(this)).add("fullscreen-error",this["fullscreen-error"].bind(this)).add("orientation-change",this["orientation-change"].bind(this))}onConnect(t){u(this.#A.bind(this)),this.#p(),this.#m(),this.#y(),this.#u(),E(this.#c.bind(this))}onDestroy(){const{audioTracks:t,qualities:e,textTracks:i}=this.#e;t[P.reset](),e[P.reset](),i[P.reset](),this.#P()}handle(t){if(!this.scope)return;const e=t.type;Be(()=>this[t.type]?.(t)),zh.has(e)&&this.#i.set(e,t),this.dispatch(t)}#o=!1;#u(){this.#o&&(requestAnimationFrame(()=>{this.scope&&this.#e.remote.play(new I("dom-connect"))}),this.#o=!1)}#c(){this.#o||(this.#o=!this.$state.paused(),this.#e.$provider()?.pause())}#d(){this.#T(),this.#s=!1,this.#t.replaying=!1,this.#t.looping=!1,this.#a=!1,this.#l=void 0,this.#i.clear()}#h(t,e){const i=this.#t.queue.serve(t);i&&(e.request=i,e.triggers.add(i))}#p(){this.#g(),this.#C();const t=this.#e.textTracks;new B(t).add("add",this.#g.bind(this)).add("remove",this.#g.bind(this)).add("mode-change",this.#C.bind(this))}#m(){const t=this.#e.qualities;new B(t).add("add",this.#v.bind(this)).add("remove",this.#v.bind(this)).add("change",this.#k.bind(this)).add("auto-change",this.#b.bind(this)).add("readonly-change",this.#x.bind(this))}#y(){const t=this.#e.audioTracks;new B(t).add("add",this.#f.bind(this)).add("remove",this.#f.bind(this)).add("change",this.#$.b
4ind(this))}#g(t){const{textTracks:e}=this.$state;e.set(this.#e.textTracks.toArray()),this.dispatch("text-tracks-change",{detail:e(),trigger:t})}#C(t){t&&this.#h("media-text-track-change-request",t);const e=this.#e.textTracks.selected,{textTrack:i}=this.$state;i()!==e&&(i.set(e),this.dispatch("text-track-change",{detail:e,trigger:t}))}#f(t){const{audioTracks:e}=this.$state;e.set(this.#e.audioTracks.toArray()),this.dispatch("audio-tracks-change",{detail:e(),trigger:t})}#$(t){const{audioTrack:e}=this.$state;e.set(this.#e.audioTracks.selected),t&&this.#h("media-audio-track-change-request",t),this.dispatch("audio-track-change",{detail:e(),trigger:t})}#v(t){const{qualities:e}=this.$state;e.set(this.#e.qualities.toArray()),this.dispatch("qualities-change",{detail:e(),trigger:t})}#k(t){const{quality:e}=this.$state;e.set(this.#e.qualities.selected),t&&this.#h("media-quality-change-request",t),this.dispatch("quality-change",{detail:e(),trigger:t})}#b(){const{qualities:t}=this.#e,e=t.auto;this.$state.autoQuality.set(e),e||this.#P()}#w=null;#S(){this.#P(),this.#w=u(()=>{const{qualities:t}=this.#e,{mediaWidth:e,mediaHeight:i}=this.$state,s=e(),n=i();if(s===0||n===0)return;let r=null,a=1/0;for(const o of t){const l=Math.abs(o.width-s)+Math.abs(o.height-n);l<a&&(a=l,r=o)}r&&t[P.select](r,!0,new I("resize",{detail:{width:s,height:n}}))})}#P(){this.#w?.(),this.#w=null}#x(){this.$state.canSetQuality.set(!this.#e.qualities.readonly)}#A(){const{canSetVolume:t,isGoogleCastConnected:e}=this.$state;if(e()){t.set(!1);return}ru().then(t.set)}"provider-change"(t){const e=this.#e.$provider(),i=t.detail;e?.type!==i?.type&&(e?.destroy?.(),e?.scope?.dispose(),this.#e.$provider.set(t.detail),e&&t.detail===null&&this.#M(t))}"provider-loader-change"(t){}"auto-play"(t){this.$state.autoPlayError.set(null)}"auto-play-fail"(t){this.$state.autoPlayError.set(t.detail),this.#d()}"can-load"(t){this.$state.canLoad.set(!0),this.#i.set("can-load",t),this.#e.textTracks[L.canLoad](),this.#h("media-start-loading",t)}"can-load-poster"(t){this.$state.canLoadPoster.set(!0),this.#i.set("can-load-poster",t),this.#h("media-poster-start-loading",t)}"media-type-change"(t){const e=this.#i.get("source-change");e&&t.triggers.add(e);const i=this.$state.viewType();this.$state.mediaType.set(t.detail);const s=this.$state.providedViewType(),n=s==="unknown"?t.detail:s;i!==n&&setTimeout(()=>{requestAnimationFrame(()=>{this.scope&&(this.$state.inferredViewType.set(t.detail),this.dispatch("view-type-change",{detail:n,trigger:t}))})},0)}"stream-type-change"(t){const e=this.#i.get("source-change");e&&t.triggers.add(e);const{streamType:i,inferredStreamType:s}=this.$state;s.set(t.detail),t.detail=i()}"rate-change"(t){const{storage:e}=this.#e,{canPlay:i}=this.$state;this.$state.playbackRate.set(t.detail),this.#h("media-rate-change-request",t),i()&&e?.setPlaybackRate?.(t.detail)}"remote-playback-change"(t){const{remotePlaybackState:e,remotePlaybackType:i}=this.$state,{type:s,state:n}=t.detail,r=n==="connected";i.set(s),e.set(n);const a=s==="airplay"?"media-airplay-request":"media-google-cast-request";if(r)this.#h(a,t);else{const o=this.#t.queue.peek(a);o&&(t.request=o,t.triggers.add(o))}}"sources-change"(t){const e=this.$state.sources(),i=t.detail;this.$state.sources.set(i),this.#I(e,i,t)}#I(t,e,i){let{qualities:s}=this.#e,n=!1,r=!1;for(const a of t)if(bn(a)&&!e.some(o=>o.src===a.src)){const o=s.getBySrc(a.src);o&&(s[P.remove](o,i),r=!0)}r&&!s.length&&(this.$state.savedState.set(null),s[P.reset](i));for(const a of e){if(!bn(a)||s.getBySrc(a.src))continue;const o={id:a.id??a.height+"p",bitrate:null,codec:null,...a,selected:!1};s[P.add](o,i),n=!0}n&&!s[ot.enableAuto]&&(this.#S(),s[ot.enableAuto]=this.#S.bind(this),s[ot.setAuto](!0,i))}"source-change"(t){t.isQualityChange=t.originEvent?.type==="quality-change";const e=t.detail;this.#M(t,t.isQualityChange),this.#i.set(t.type,t),this.$state.source.set(e),this.el?.setAttribute("aria-busy","true")}#M(t,e=!1){const{audioTracks:i,qualities:s}=this.#e;if(!e){this.#n=[],this.#r=[-1,-1],i[P.reset](t),s[P.reset](t),ia(this.$state,e),this.#d();return}ia(this.$state,e),this.#d()}abort(t){const e=this.#i.get("source-change");e&&t.triggers.add(e);const i=this.#i.get("can-load");i&&!t.triggers.hasType("can-load")&&t.triggers.add(i)}"load-start"(t){const e=this.#i.get("source-change");e&&t.triggers.add(e)}error(t){this.$state.error.set(t.detail);const e=this.#i.get("abort");e&&t.triggers.add(e)}"loaded-metadata"(t){const e=this.#i.get("load-start");e&&t.triggers.add(e)}"loaded-data"(t){const e=this.#i.get("load-start");e&&t.triggers.add(e)}"can-play"(t){const e=this.#i.get("loaded-metadata");e&&t.triggers.add(e),this.#L(t.detail),this.el?.setAttribute("aria-busy","false")}"can-play-through"(t){this.#L(t.detail);const e=this.#i.get("can-play");e&&t.triggers.add(e)}#L(t){const{seekable:e,buffered:i,intrinsicDuration:s,canPlay:n}=this.$state;n.set(!0),i.set(t.buffered),e.set(t.seekable);const r=we(t.seekable)??1/0;s.set(r)}"duration-change"(t){const{live:e,intrinsicDuration:i,providedDuration:s,clipEndTime:n,ended:r}=this.$state,a=t.detail;if(!e()){const o=Number.isNaN(a)?0:a;i.set(o),r()&&this.#D(t)}(s()>0||n()>0)&&t.stopImmediatePropagation()}progress(t){const{buffered:e,seekable:i}=this.$state,{buffered:s,seekable:n}=t.detail,r=we(s),a=s.length!==e().length,o=r!==we(e()),l=we(n),h=n.length!==i().length,c=l!==we(i());(a||o)&&e.set(s),(h||c)&&i.set(n)}play(t){const{paused:e,autoPlayError:i,ended:s,autoPlaying:n,playsInl
4ine:r,pointer:a,muted:o,viewType:l,live:h,userBehindLiveEdge:c}=this.$state;if(this.#V(),!e()){t.stopImmediatePropagation();return}t.autoPlay=n();const d=this.#i.get("waiting");d&&t.triggers.add(d),this.#h("media-play-request",t),this.#i.set("play",t),e.set(!1),i.set(null),t.autoPlay&&(this.handle(this.createEvent("auto-play",{detail:{muted:o()},trigger:t})),n.set(!1)),(s()||this.#t.replaying)&&(this.#t.replaying=!1,s.set(!1),this.handle(this.createEvent("replay",{trigger:t}))),!r()&&l()==="video"&&a()==="coarse"&&this.#e.remote.enterFullscreen("prefer-media",t),h()&&!c()&&this.#e.remote.seekToLiveEdge(t)}#V(t){if(!y(this.#e.$provider))return;const{ended:e,seekableStart:i,clipEndTime:s,currentTime:n,realCurrentTime:r,duration:a}=this.$state,o=e()||r()<i()||s()>0&&r()>=s()||Math.abs(n()-a())<.1;return o&&this.dispatch("media-seek-request",{detail:i(),trigger:t}),o}"play-fail"(t){const{muted:e,autoPlaying:i}=this.$state,s=this.#i.get("play");s&&t.triggers.add(s),this.#h("media-play-request",t);const{paused:n,playing:r}=this.$state;n.set(!0),r.set(!1),this.#d(),this.#i.set("play-fail",t),t.autoPlay&&(this.handle(this.createEvent("auto-play-fail",{detail:{muted:e(),error:t.detail},trigger:t})),i.set(!1))}playing(t){const e=this.#i.get("play"),i=this.#i.get("seeked");e?t.triggers.add(e):i&&t.triggers.add(i),setTimeout(()=>this.#d(),0);const{paused:s,playing:n,live:r,liveSyncPosition:a,seekableEnd:o,started:l,currentTime:h,seeking:c,ended:d}=this.$state;if(s.set(!1),n.set(!0),c.set(!1),d.set(!1),this.#t.looping){this.#t.looping=!1;return}if(r()&&!l()&&h()===0){const p=a()??o()-2;Number.isFinite(p)&&this.#e.$provider().setCurrentTime(p)}this.started(t)}started(t){const{started:e}=this.$state;e()||(e.set(!0),this.handle(this.createEvent("started",{trigger:t})))}pause(t){this.el?.isConnected||(this.#o=!0),this.#h("media-pause-request",t);const e=this.#i.get("seeked");e&&t.triggers.add(e);const{paused:i,playing:s}=this.$state;i.set(!0),s.set(!1),this.#s&&setTimeout(()=>{this.handle(this.createEvent("end",{trigger:t})),this.#s=!1},0),this.#d()}"time-change"(t){if(this.#t.looping){t.stopImmediatePropagation();return}let{waiting:e,played:i,clipEndTime:s,realCurrentTime:n,currentTime:r}=this.$state,a=t.detail,o=s();n.set(a),this.#E(),e.set(!1);for(const l of this.#e.textTracks)l[L.updateActiveCues](a,t);o>0&&a>=o&&(this.#s=!0,this.dispatch("media-pause-request",{trigger:t})),this.#R(),this.dispatch("time-update",{detail:{currentTime:r(),played:i()},trigger:t})}#E(){const{currentTime:t,played:e,paused:i}=this.$state;i()||(this.#r=vu(this.#n,this.#r,t()),e.set(new et(this.#n)))}#D(t){const{clipStartTime:e,clipEndTime:i,duration:s}=this.$state;e()>0||i()>0||this.handle(this.createEvent("time-change",{detail:s(),trigger:t}))}#R(){const{storage:t}=this.#e,{canPlay:e,realCurrentTime:i}=this.$state;e()&&t?.setTime?.(i())}"audio-gain-change"(t){const{storage:e}=this.#e,{canPlay:i,audioGain:s}=this.$state;s.set(t.detail),this.#h("media-audio-gain-change-request",t),i()&&e?.setAudioGain?.(s())}"volume-change"(t){const{storage:e}=this.#e,{volume:i,muted:s,canPlay:n}=this.$state,r=t.detail;i.set(r.volume),s.set(r.muted||r.volume===0),this.#h("media-volume-change-request",t),this.#h(r.muted?"media-mute-request":"media-unmute-request",t),n()&&(e?.setVolume?.(i()),e?.setMuted?.(s()))}seeking=Ve(t=>{const{seeking:e,realCurrentTime:i,paused:s}=this.$state;e.set(!0),i.set(t.detail),this.#h("media-seeking-request",t),s()&&(this.#l=t,this.#_()),this.#r=[-1,-1]},150,{leading:!0});seeked(t){const{seeking:e,currentTime:i,realCurrentTime:s,paused:n,seekableEnd:r,ended:a,live:o}=this.$state;if(this.#t.seeking)e.set(!0),t.stopImmediatePropagation();else if(e()){const l=this.#i.get("waiting");l&&t.triggers.add(l);const h=this.#i.get("seeking");h&&!t.triggers.has(h)&&t.triggers.add(h),n()&&this.#T(),e.set(!1),s.set(t.detail),this.#h("media-seek-request",t);const c=t?.originEvent;c?.isTrusted&&!(c instanceof MessageEvent)&&!/seek/.test(c.type)&&this.started(t)}o()||(Math.floor(i())!==Math.floor(r())?a.set(!1):this.end(t))}waiting(t){this.#a||this.#t.seeking||(t.stopImmediatePropagation(),this.#l=t,this.#_())}#_=_n(()=>
4{if(!this.#l)return;this.#a=!0;const{waiting:t,playing:e}=this.$state;t.set(!0),e.set(!1);const i=this.createEvent("waiting",{trigger:this.#l});this.#i.set("waiting",i),this.dispatch(i),this.#l=void 0,this.#a=!1},300);end(t){const{loop:e,ended:i}=this.$state;if(!(!e()&&i())){if(e()){setTimeout(()=>{requestAnimationFrame(()=>{this.#V(t),this.dispatch("media-loop-request",{trigger:t})})},10);return}setTimeout(()=>this.#O(t),0)}}#O(t){const{storage:e}=this.#e,{paused:i,seeking:s,ended:n,duration:r}=this.$state;this.#D(t),i()||this.dispatch("pause",{trigger:t}),s()&&this.dispatch("seeked",{detail:r(),trigger:t}),n.set(!0),this.#d(),e?.setTime?.(r(),!0),this.dispatch("ended",{trigger:t})}#T(){this.#_.cancel(),this.$state.waiting.set(!1)}"fullscreen-change"(t){const e=t.detail;this.$state.fullscreen.set(e),this.#h(e?"media-enter-fullscreen-request":"media-exit-fullscreen-request",t)}"fullscreen-error"(t){this.#h("media-enter-fullscreen-request",t),this.#h("media-exit-fullscreen-request",t)}"orientation-change"(t){const e=t.detail.lock;this.#h(e?"media-orientation-lock-request":"media-orientation-unlock-request",t)}"picture-in-picture-change"(t){const e=t.detail;this.$state.pictureInPicture.set(e),this.#h(e?"media-enter-pip-request":"media-exit-pip-request",t)}"picture-in-picture-error"(t){this.#h("media-enter-pip-request",t),this.#h("media-exit-pip-request",t)}"title-change"(t){t.trigger&&(t.stopImmediatePropagation(),this.$state.inferredTitle.set(t.detail))}"poster-change"(t){t.trigger&&(t.stopImmediatePropagation(),this.$state.inferredPoster.set(t.detail))}},Xh=class extends De{onSetup(){this.#t();const t=[this.#s,this.#r,this.#h,this.#p,this.#l,this.#u,this.#c,this.#m,this.#g,this.#y,this.#a,this.#d,this.#o,this.#e,this.#n];for(const e of t)u(e.bind(this))}#t(){const t={duration:"providedDuration",loop:"providedLoop",poster:"providedPoster",streamType:"providedStreamType",title:"providedTitle",viewType:"providedViewType"},e=new Set(["currentTime","paused","playbackRate","volume"]);for(const i of Object.keys(this.$props))e.has(i)||this.$state[t[i]??i]?.set(this.$props[i]());this.$state.muted.set(this.$props.muted()||this.$props.volume()===0)}#e(){const{viewType:t,streamType:e,title:i,poster:s,loop:n}=this.$props,r=this.$state;r.providedPoster.set(s()),r.providedStreamType.set(e()),r.providedViewType.set(t()),r.providedTitle.set(i()),r.providedLoop.set(n())}#i(){}#s(){const{artist:t,artwork:e}=this.$props;this.$state.artist.set(t()),this.$state.artwork.set(e())}#n(){const{title:t}=this.$state;this.dispatch("title-change",{detail:t()})}#r(){const t=this.$props.autoPlay()||this.$props.autoplay();this.$state.autoPlay.set(t),this.dispatch("auto-play-change",{detail:t})}#a(){const t=this.$state.loop();this.dispatch("loop-change",{detail:t})}#l(){const t=this.$props.controls();this.$state.controls.set(t)}#o(){const{poster:t}=this.$state;this.dispatch("poster-change",{detail:t()})}#u(){const t=this.$props.crossOrigin()??this.$props.crossorigin(),e=t===!0?"":t;this.$state.crossOrigin.set(e)}#c(){const{duration:t}=this.$props;this.dispatch("media-duration-change-request",{detail:t()})}#d(){const t=this.$props.playsInline()||this.$props.playsinline();this.$state.playsInline.set(t),this.dispatch("plays-inline-change",{detail:t})}#h(){const{clipStartTime:t}=this.$props;this.dispatch("media-clip-start-change-request",{detail:t()})}#p(){const{clipEndTime:t}=this.$props;this.dispatch("media-clip-end-change-request",{detail:t()})}#m(){this.dispatch("live-change",{detail:this.$state.live()})}#y(){this.$state.liveEdgeTolerance.set(this.$props.liveEdgeTolerance()),this.$state.minLiveDVRWindow.set(this.$props.minLiveDVRWindow())}#g(){this.dispatch("live-edge-change",{detail:this.$state.liveEdge()})}},aa=["play","pause","seekforward","seekbackward","seekto"],Jh=class extends De{onConnect(){u(this.#e.bind(this)),u(this.#i.bind(this));const t=this.#s.bind(this);for(const e of aa)navigator.mediaSession.setActionHandler(e,t);E(this.#t.bind(this))}#t(){for(const t of aa)navigator.mediaSession.setActionHandler(t,null)}#e(){const{title:t,artist:e,artwork:i,poster:s}=this.$state;
4navigator.mediaSession.metadata=new MediaMetadata({title:t(),artist:e(),artwork:i()??[{src:s()}]})}#i(){const{canPlay:t,paused:e}=this.$state;navigator.mediaSession.playbackState=t()?e()?"paused":"playing":"none"}#s(t){const e=new I("media-session-action",{detail:t});switch(t.action){case"play":this.dispatch("media-play-request",{trigger:e});break;case"pause":this.dispatch("media-pause-request",{trigger:e});break;case"seekto":case"seekforward":case"seekbackward":this.dispatch("media-seek-request",{detail:it(t.seekTime)?t.seekTime:this.$state.currentTime()+(t.seekOffset??(t.action==="seekforward"?10:-10)),trigger:e});break}}},_o=class Zi extends x{static props=Uh;static state=So;#t;#e;#i;canPlayQueue=new Mo;remoteControl;get#s(){return this.#t.$provider()}get#n(){return this.$props}constructor(){super(),new Xh;const e={player:this,qualities:new Ph,audioTracks:new Th,storage:null,$provider:C(null),$providerSetup:C(!1),$props:this.$props,$state:this.$state};e.remote=this.remoteControl=new $h(void 0),e.remote.setPlayer(this),e.textTracks=new xh,e.textTracks[L.crossOrigin]=this.$state.crossOrigin,e.textRenderers=new Sh(e),e.ariaKeys={},this.#t=e,mt(no,e),this.orientation=new To,new Ot,new Ih(e);const i=new Qh;this.#e=new Yh(i,e),this.#i=new Kh(this.#e,i,e),e.delegate=new Wh(this.#e.handle.bind(this.#e),e),e.notify=e.delegate.notify.bind(e.delegate),typeof navigator<"u"&&"mediaSession"in navigator&&new Jh,new na("load",this.startLoading.bind(this)),new na("posterLoad",this.startLoadingPoster.bind(this))}onSetup(){this.#u(),u(this.#o.bind(this)),u(this.#y.bind(this)),u(this.#p.bind(this)),u(this.#$.bind(this)),u(this.#C.bind(this)),u(this.#w.bind(this)),u(this.#k.bind(this))}onAttach(e){e.setAttribute("data-media-player",""),G(e,"tabindex","0"),G(e,"role","region"),u(this.#P.bind(this)),u(this.#a.bind(this)),u(this.#l.bind(this)),O(e,"find-media-player",this.#c.bind(this))}onConnect(e){Za&&$(e,"data-iphone","");const i=window.matchMedia("(pointer: coarse)");this.#h(i),i.onchange=this.#h.bind(this);const s=new ResizeObserver(Jt(this.#d.bind(this)));s.observe(e),u(this.#d.bind(this)),this.dispatch("media-player-connect",{detail:this,bubbles:!0,composed:!0}),E(()=>{s.disconnect(),i.onchange=null})}onDestroy(){this.#t.player=null,this.canPlayQueue.reset()}#r=!1;#a(){const e=this.$el,{ariaLabel:i}=this.$props,{title:s,live:n,viewType:r,providedTitle:a}=this.$state,o=n(),l=Mn(r()),h=l!=="Unknown"?`${o?"Live ":""}${l}`:o?"Live":"Media",c=s(),d=i()||`${h} Player`+(c?` - ${c}`:"");$(this.el,"aria-label",d),e?.hasAttribute("title")&&(this.#r=!0,e?.removeAttribute("title"))}#l(){const e=this.orientation.landscape?"landscape":"portrait";this.$state.orientation.set(e),$(this.el,"data-orientation",e),this.#d()}#o(){this.$state.canPlay()&&this.#s?this.canPlayQueue.start():this.canPlayQueue.stop()}#u(){if(Zi[Xs]){this.setAttributes(Zi[Xs]);return}const e={"data-load":function(){return this.$props.load()},"data-captions":function(){const s=this.$state.textTrack();return!!s&&ht(s)},"data-ios-controls":function(){return this.$state.iOSControls()},"data-controls":function(){return this.controls.showing},"data-buffering":function(){const{canLoad:s,canPlay:n,waiting:r}=this.$state;return s()&&(!n()||r())},"data-error":function(){const{error:s}=this.$state;return!!s()},"data-autoplay-error":function(){const{autoPlayError:s}=this.$state;return!!s()}},i={autoPlay:"autoplay",canAirPlay:"can-airplay",canPictureInPicture:"can-pip",pictureInPicture:"pip",playsInline:"playsinline",remotePlaybackState:"remote-state",remotePlaybackType:"remote-type",isAirPlayConnected:"airplay",isGoogleCastConnected:"google-cast"};for(const s of Gh){const n="data-"+(i[s]??Xt(s));e[n]=function(){return this.$state[s]()}}delete e.title,Zi[Xs]=e,this.setAttributes(e)}#c(e){e.detail(this)}#d(){if(!this.el)return;const e=this.el.clientWidth,i=this.el.clientHeight;this.$state.width.set(e),this.$state.height.set(i),bt(this.el,"--player-width",e+"px"),bt(this.el,"--player-height",i+"px")}#h(e){const i=e.matches?"coarse":"fine";$(this.el,"data-pointer",i),this.$state.pointer.set(i),this.#d()}get provider(){return this.#s}get controls(){return this.#i.controls}set controls(e){this.#n.controls.set(e)}orientation;
4get title(){return y(this.$state.title)}set title(e){if(this.#r){this.#r=!1;return}this.#n.title.set(e)}get qualities(){return this.#t.qualities}get audioTracks(){return this.#t.audioTracks}get textTracks(){return this.#t.textTracks}get textRenderers(){return this.#t.textRenderers}get duration(){return this.$state.duration()}set duration(e){this.#n.duration.set(e)}get paused(){return y(this.$state.paused)}set paused(e){this.#m(e)}#p(){this.#m(this.$props.paused())}#m(e){e?this.canPlayQueue.enqueue("paused",()=>this.#i.pause()):this.canPlayQueue.enqueue("paused",()=>this.#i.play())}get muted(){return y(this.$state.muted)}set muted(e){this.#g(e)}#y(){this.#g(this.$props.muted())}#g(e){this.canPlayQueue.enqueue("muted",()=>{y(()=>{this.#s&&this.#s.setMuted(e)})})}get currentTime(){return y(this.$state.currentTime)}set currentTime(e){this.#f(e)}#C(){this.#f(this.$props.currentTime())}#f(e){this.canPlayQueue.enqueue("currentTime",()=>{const{currentTime:i}=this.$state;e!==y(i)&&y(()=>{if(!this.#s)return;const s=Po(e,this.$state);Number.isFinite(s)&&this.#s.setCurrentTime(s)})})}get volume(){return y(this.$state.volume)}set volume(e){this.#v(e)}#$(){this.#v(this.$props.volume())}#v(e){const i=On(0,e,1);this.canPlayQueue.enqueue("volume",()=>{this.#s&&this.#s.setVolume(i)})}get playbackRate(){return y(this.$state.playbackRate)}set playbackRate(e){this.#b(e)}#k(){this.#b(this.$props.playbackRate())}#b(e){this.canPlayQueue.enqueue("rate",()=>{this.#s&&this.#s.setPlaybackRate?.(e)})}#w(){this.#S(this.$props.playsInline())}#S(e){this.canPlayQueue.enqueue("playsinline",()=>{this.#s&&this.#s.setPlaysInline?.(e)})}#P(){let e=this.$props.storage(),i=w(e)?new wh:e;if(i?.onChange){const{source:s}=this.$state,n=w(e)?e:this.el?.id,r=F(this.#x.bind(this));u(()=>i.onChange(s(),r(),n||void 0))}this.#t.storage=i,this.#t.textTracks.setStorage(i),E(()=>{i?.onDestroy?.(),this.#t.storage=null,this.#t.textTracks.setStorage(null)})}#x(){const{clipStartTime:e,clipEndTime:i}=this.$props,{source:s}=this.$state,n=s();return n.src?`${n.src}:${e()}:${i()}`:null}async play(e){return this.#i.play(e)}async pause(e){return this.#i.pause(e)}async enterFullscreen(e,i){return this.#i.enterFullscreen(e,i)}async exitFullscreen(e,i){return this.#i.exitFullscreen(e,i)}enterPictureInPicture(e){return this.#i.enterPictureInPicture(e)}exitPictureInPicture(e){return this.#i.exitPictureInPicture(e)}seekToLiveEdge(e){this.#i.seekToLiveEdge(e)}startLoading(e){this.#t.notify("can-load",void 0,e)}startLoadingPoster(e){this.#t.notify("can-load-poster",void 0,e)}requestAirPlay(e){return this.#i.requestAirPlay(e)}requestGoogleCast(e){return this.#i.requestGoogleCast(e)}setAudioGain(e,i){return this.#i.setAudioGain(e,i)}destroy(){super.destroy(),this.#t.remote.setPlayer(null),this.dispatch("destroy")}},U=_o.prototype;V(U,"canPlayQueue");V(U,"remoteControl");V(U,"provider");V(U,"controls");V(U,"orientation");V(U,"title");V(U,"qualities");V(U,"audioTracks");V(U,"textTracks");V(U,"textRenderers");V(U,"duration");V(U,"paused");V(U,"muted");V(U,"currentTime");V(U,"volume");V(U,"playbackRate");X(U,"play");X(U,"pause");X(U,"enterFullscreen");X(U,"exitFullscreen");X(U,"enterPictureInPicture");X(U,"exitPictureInPicture");X(U,"seekToLiveEdge");X(U,"startLoading");X(U,"startLoadingPoster");X(U,"requestAirPlay");X(U,"requestGoogleCast");X(U,"setAudioGain");function td(t,e){return fetch(t,e).then(i=>i.text()).then(i=>/type="static"/.test(i)?"on-demand":"live")}function Io(t,e){return fetch(t,e).then(i=>i.text()).then(i=>{const s=ed(i);if(s)return Io(/^https?:/.test(s)?s:new URL(s,t).href,e);const n=/EXT-X-PLAYLIST-TYPE:\s*VOD/.test(i)?"on-demand":"live";return n==="live"&&id(i)>=10&&(/#EXT-X-DVR-ENABLED:\s*true/.test(i)||i.includes("#EXT-X-DISCONTINUITY"))?"live:dvr":n})}function ed(t){const e=t.match(/#EXT-X-STREAM-INF:[^\n]+(\n[^\n]+)*/g);return e?e[0].split(` 5`)[1].trim():null}function id(t){const e=t.split(` 6`);for(const i of e)if(i.startsWith("#EXT-X-TARGETDURATION")){const s=parseFloat(i.split(":")[1]);if(!isNaN(s))return s}return-1}var Cn=new Map,sd=class{#t=!1;#e;#i;#s;#n;constructor(t,e,i,s=[]){this.#i=t,this.#s=e,this.#n=i;const n=new Hh,r=new Nh,a=new jn,o=new qh,l=[new Bh,new Fh];this.#e=F(()=>{const c=e.$state.remotePlaybackLoader(),d=e.$props.preferNativeHLS()?[a,o,n,r,...l,...s]:[r,a,o,n,...l,...s];return c?[c,...d]:d});const{$state:h}=e;h.sources.set(oa(e.$props.src()));for(const c of h.sources()){const d=this.#e().find(m=>m.canPlay(c));if(!d)continue;const p=d.mediaType(c);e.$state.source.set(c),e.$state.mediaType.set(p),e.$state.inferredViewType.set(p),this.#n.set(d),this.#t=!0;break}}connect(){const t=this.#n();this.#t&&(this.#o(this.#s.$state.source(),t),this.#u(t),this.#t=!1),u(this.#r.bind(this)),u(this.#a.bind(this)),u(this.#c.bind(this)),u(this.#d.bind(this)),u(this.#h.bind(this))}#r(){this.#s.notify("sources-change",[...oa(this.#s.$props.src()),...this.#i()])}#a(){const{$state:t}=this.#s,e=t.sources(),i=y(t.source),s=this.#l(i,e);if(e[0]?.src&&!s.src&&!s.type){const{crossOrigin:n}=t,r=di(n()),a=new AbortController;return Promise.all(e.map(o=>w(o.src)&&o.type==="?"?fetch(o.src,{method:"HEAD",credentials:r,signal:a.signal}).then(l=>(o.type=l.headers.get("content-type")||"??",Cn.set(o.src,o.type),o)).catch(()=>o):o)).then(o=>{if(a.signal.aborted)return;const l=this.#l(y(t.source),o);Nt(),l.src||this.#s.notify("error",{message:"Failed to load resource.",code:4})}),()=>a.abort()}Nt()}#l(t,e){let i={src:"",type:""},s=null,n=new I("sources-change",{detail:{sources:e}}),r=this.#e(),{started:a,paused:o,currentTime:l,quality:h,savedState:c}=this.#s.$state;for(const d of e){const p=r.find(m=>m.canPlay(d));if(p){i=d,s=p;break}}if(bn(i)){const d=h(),p=e.find(m=>m.src===d?.src);y(a)?c.set({paused:y(o),currentTime:y(l)}):c.set(null),p&&(i=p,n=new I("quality-change",{detail:{quality:d}}))}return ca(t,i)||this.#o(i,s,n),s!==y(this.#n)&&this.#u(s,n),i}#o(t,e,i){this.#s.notify("source-change",t,i),this.#s.notify("media-type-change",e?.mediaType(t)||"unknown",i)}#u(t,e){this.#s.$providerSetup.set(!1),this.#s.notify("provider-change",null,e),t&&y(()=>t.preconnect?.(this.#s)),this.#n.set(t),this.#s.notify("provider-loader-change",t,e)}#c(){const t=this.#s.$provider();if(!(!t||y(this.#s.$providerSetup))){if(this.#s.$state.canLoad()){lt(()=>t.setup(),t.scope),this.#s.$providerSetup.set(!0);return}y(()=>t.preconnect?.())}}#d(){if(!this.#s.$providerSetup())return;const t=this.#s.$provider(),e=this.#s.$state.source(),i=y(this.#s.$state.crossOrigin),s=y(this.#s.$props.preferNativeHLS);if(!ca(t?.currentSrc,e)){if(this.#s.$state.canLoad()){const n=new AbortController;return Xe(e)?(s||!ws())&&Io(e.src,{credentials:di(i),signal:n.signal}).then(r=>{this.#s.notify("stream-type-change",r)}).catch(Ue):Ts(e)?td(e.src,{credentials:di(i),signal:n.signal}).then(r=>{this.#s.notify("stream-type-change",r)}).catch(Ue):this.#s.notify("stream-type-change","on-demand"),y(()=>{const r=y(this.#s.$state.preload);return t?.loadSource(e,r).catch(a=>{})}),()=>n.abort()}try{w(e.src)&&te(new URL(e.src).origin)}catch{}}}#h(){const t=this.#n(),{providedPoster:e,source:i,canLoadPoster:s}=this.#s.$state;if(!t||!t.loadPoster||!i()||!s()||e())return;const n=new AbortController,r=new I("source-change",{detail:i});return t.loadPoster(i(),this.#s,n).then(a=>{this.#s.notify("poster-change",a||"",r)}).catch(()=>{this.#s.notify("poster-change","",r)}),()=>{n.abort()}}};function oa(t){return(Q(t)?t:[t]).map(e=>w(e)?{src:e,type:la(e)}:{...e,type:la(e.src,e.type)})}function la(t,e){return w(e)&&e.length?e:w(t)&&Cn.has(t)?Cn.get(t):!e&&Xe({src:t,type:""})?"application/x-mpegurl":!e&&Ts({src:t,type:""}
6)?"application/dash+xml":!w(t)||t.startsWith("blob:")?"video/object":t.includes("youtube")||t.includes("youtu.be")?"video/youtube":t.includes("vimeo")&&!t.includes("progressive_redirect")&&!t.includes(".m3u8")?"video/vimeo":"?"}function ca(t,e){return t?.src===e?.src&&t?.type===e?.type}var nd=class{#t;#e;#i=[];constructor(t,e){this.#t=t,this.#e=e,u(this.#s.bind(this))}#s(){const t=this.#t();for(const e of this.#i)if(!t.some(i=>i.id===e.id)){const i=e.id&&this.#e.textTracks.getById(e.id);i&&this.#e.textTracks.remove(i)}for(const e of t){const i=e.id||ce.createId(e);this.#e.textTracks.getById(i)||(e.id=i,this.#e.textTracks.add(e))}this.#i=t}},Vo=class extends x{static props={loaders:[]};static state=new de({loader:null});#t;#e;#i=C([]);#s=C([]);#n=null;#r=null;#a=!1;onSetup(){this.#t=T(),this.#e=new sd(this.#i,this.#t,this.$state.loader,this.$props.loaders())}onAttach(t){t.setAttribute("data-media-provider","")}onConnect(t){this.#a=!0,this.#e.connect(),new nd(this.#s,this.#t);const e=new ResizeObserver(Jt(this.#c.bind(this)));e.observe(t);const i=new MutationObserver(this.#d.bind(this));i.observe(t,{attributes:!0,childList:!0}),this.#c(),this.#d(),this.#r&&this.load(this.#r),E(()=>{this.#a=!1,e.disconnect(),i.disconnect()})}#l=-1;load(t){this.#r=t||null,t?.setAttribute("aria-hidden","true"),this.#a&&(window.cancelAnimationFrame(this.#l),this.#l=requestAnimationFrame(()=>this.#o(t)),E(()=>{window.cancelAnimationFrame(this.#l)}))}#o(t){if(!this.scope)return;const e=this.$state.loader(),{$provider:i}=this.#t;this.#n===e&&e?.target===t&&y(i)||(this.#u(),this.#n=e,e&&(e.target=t||null),!(!e||!t)&&e.load(this.#t).then(s=>{this.scope&&y(this.$state.loader)===e&&this.#t.notify("provider-change",s)}))}onDestroy(){this.#n=null,this.#u()}#u(){this.#t?.notify("provider-change",null)}#c(){if(!this.el)return;const{player:t,$state:e}=this.#t,i=this.el.offsetWidth,s=this.el.offsetHeight;t&&(e.mediaWidth.set(i),e.mediaHeight.set(s),t.el&&(bt(t.el,"--media-width",i+"px"),bt(t.el,"--media-height",s+"px")))}#d(){const t=[],e=[],i=this.el.children;for(const s of i)if(!s.hasAttribute("data-vds")){if(s instanceof HTMLSourceElement){const n={id:s.id,src:s.src,type:s.type};for(const r of["id","src","width","height","bitrate","codec"]){const a=s.getAttribute(`data-${r}`);w(a)&&(n[r]=/id|src|codec/.test(r)?a:Number(a))}t.push(n)}else if(s instanceof HTMLTrackElement){const n={src:s.src,kind:s.track.kind,language:s.srclang,label:s.label,default:s.default,type:s.getAttribute("data-type")};e.push({id:s.id||ce.createId(n),...n})}}this.#i.set(t),this.#s.set(e),Nt()}},rd=Vo.prototype;X(rd,"load");var ad=class extends S(HTMLElement,Vo){static tagName="media-provider";#t;#e=null;#i=null;onSetup(){this.#t=T(),this.setAttribute("keep-alive","")}onDestroy(){this.#i?.remove(),this.#i=null,this.#e?.remove(),this.#e=null}onConnect(){u(()=>{const t=this.$state.loader(),e=t?.name==="youtube",i=t?.name==="vimeo",s=e||i,n=t?.name==="google-cast",r=t?n?this.#a():s?this.#r():t.mediaType()==="audio"?this.#s():this.#n():null;if(this.#e!==r){const a=this.#e?.parentElement??this;this.#e?.remove(),this.#e=r,r&&a.prepend(r),s&&r&&u(()=>{const{nativeControls:o,viewType:l}=this.#t.$state,h=o(),c=l()==="audio";!h&&!c?(this.#i=this.querySelector(".vds-blocker"),this.#i||(this.#i=document.createElement("div"),this.#i.classList.add("vds-blocker"),r.after(this.#i))):(this.#i?.remove(),this.#i=null),$(r,"data-no-controls",!h)})}e?r?.classList.add("vds-youtube"):i&&r?.classList.add("vds-vimeo"),s||(this.#i?.remove(),this.#i=null),this.load(r)})}#s(){const t=this.#e instanceof HTMLAudioElement?this.#e:document.createElement("audio"),{controls:e,crossOrigin:i}=this.#t.$state;return u(()=>{$(t,"controls",e()),$(t,"crossorigin",i())}),t}#n(){const t=this.#e instanceof HTMLVideoElement?this.#e:document.createElement("video"),{crossOrigin:e,poster:i,nativeControls:s}=this.#t.$state,n=F(()=>s()?"true":null),r=F(()=>i()&&s()?i():null);return u(()=>{$(t,"controls",n()),$(t,"crossorigin",e()),$(t,"poster",r())}),t}#r(){const t=this.#e instanceof HTMLIFrameElement?this.#e:document.createElement("iframe"),{nativeControls:e}=this.#t.$state;return u(()=>$(t,"tabindex",e()?null:-1)),t}#a(){if(this.#e?.classList.contains("vds-google-cast"))return this.#e;
6const t=document.createElement("div");return t.classList.add("vds-google-cast"),ut(async()=>{const{insertContent:e}=await Promise.resolve().then(()=>A6);return{insertContent:e}},void 0,import.meta.url).then(({insertContent:e})=>{e(t,this.#t.$state)}),t}},od=class extends S(HTMLElement,_o){static tagName="media-player";static attrs={ariaLabel:"aria-label",autoPlay:"autoplay",crossOrigin:"crossorigin",playsInline:"playsinline",preferNativeHLS:"prefer-native-hls",minLiveDVRWindow:"min-live-dvr-window"}};k(od);k(ad);var tn,ls=window,je=ls.trustedTypes,ua=je?je.createPolicy("lit-html",{createHTML:t=>t}):void 0,cs="$lit$",Kt=`lit$${(Math.random()+"").slice(9)}$`,Kn="?"+Kt,ld=`<${Kn}>`,Me=document,Ci=()=>Me.createComment(""),$i=t=>t===null||typeof t!="object"&&typeof t!="function",Do=Array.isArray,Ro=t=>Do(t)||typeof t?.[Symbol.iterator]=="function",en=`[ 7\f\r]`,ri=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ha=/-->/g,da=/>/g,be=RegExp(`>|${en}(?:([^\\s"'>=/]+)(${en}*=${en}*(?:[^ 8\f\r"'\`<>=]|("|')|))|$)`,"g"),pa=/'/g,fa=/"/g,Oo=/^(?:script|style|textarea|title)$/i,qo=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),f=qo(1),F3=qo(2),Ke=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),ma=new WeakMap,ke=Me.createTreeWalker(Me,129,null,!1);function No(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return ua!==void 0?ua.createHTML(e):e}var Ho=(t,e)=>{const i=t.length-1,s=[];let n,r=e===2?"<svg>":"",a=ri;for(let o=0;o<i;o++){const l=t[o];let h,c,d=-1,p=0;for(;p<l.length&&(a.lastIndex=p,c=a.exec(l),c!==null);)p=a.lastIndex,a===ri?c[1]==="!--"?a=ha:c[1]!==void 0?a=da:c[2]!==void 0?(Oo.test(c[2])&&(n=RegExp("</"+c[2],"g")),a=be):c[3]!==void 0&&(a=be):a===be?c[0]===">"?(a=n??ri,d=-1):c[1]===void 0?d=-2:(d=a.lastIndex-c[2].length,h=c[1],a=c[3]===void 0?be:c[3]==='"'?fa:pa):a===fa||a===pa?a=be:a===ha||a===da?a=ri:(a=be,n=void 0);const m=a===be&&t[o+1].startsWith("/>")?" ":"";r+=a===ri?l+ld:d>=0?(s.push(h),l.slice(0,d)+cs+l.slice(d)+Kt+m):l+Kt+(d===-2?(s.push(void 0),o):m)}return[No(t,r+(t[i]||"<?>")+(e===2?"</svg>":"")),s]},$n=class Fo{constructor({strings:e,_$litType$:i},s){let n;this.parts=[];let r=0,a=0;const o=e.length-1,l=this.parts,[h,c]=Ho(e,i);if(this.el=Fo.createElement(h,s),ke.currentNode=this.el.content,i===2){const d=this.el.content,p=d.firstChild;p.remove(),d.append(...p.childNodes)}for(;(n=ke.nextNode())!==null&&l.length<o;){if(n.nodeType===1){if(n.hasAttributes()){const d=[];for(const p of n.getAttributeNames())if(p.endsWith(cs)||p.startsWith(Kt)){const m=c[a++];if(d.push(p),m!==void 0){const v=n.getAttribute(m.toLowerCase()+cs).split(Kt),b=/([.?@])?(.*)/.exec(m);l.push({type:1,index:r,name:b[2],strings:v,ctor:b[1]==="."?Uo:b[1]==="?"?Wo:b[1]==="@"?jo:xi})}else l.push({type:6,index:r})}for(const p of d)n.removeAttribute(p)}if(Oo.test(n.tagName)){const d=n.textContent.split(Kt),p=d.length-1;if(p>0){n.textContent=je?je.emptyScript:"";for(let m=0;m<p;m++)n.append(d[m],Ci()),ke.nextNode(),l.push({type:2,index:++r});n.append(d[p],Ci())}}}else if(n.nodeType===8)if(n.data===Kn)l.push({type:2,index:r});else{let d=-1;for(;(d=n.data.indexOf(Kt,d+1))!==-1;)l.push({type:7,index:r}),d+=Kt.length-1}r++}}static createElement(e,i){const s=Me.createElement("template");return s.innerHTML=e,s}};function _e(t,e,i=t,s){var n,r,a,o;if(e===Ke)return e;let l=s!==void 0?(n=i._$Co)===null||n===void 0?void 0:n[s]:i._$Cl;const h=$i(e)?void 0:e._$litDirective$;return l?.constructor!==h&&((r=l?._$AO)===null||r===void 0||r.call(l,!1),h===void 0?l=void 0:(l=new h(t),l._$AT(t,i,s)),s!==void 0?((a=(o=i)._$Co)!==null&&a!==void 0?a:o._$Co=[])[s]=l:i._$Cl=l),l!==void 0&&(e=_e(t,l._$AS(t,e.values),l,s)),e}var Bo=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,n=((e=t?.creationScope)!==null&&e!==void 0?e:Me).importNode(i,!0);ke.currentNode=n;let r=ke.nextNode(),a=0,o=0,l=s[0];for(;l!==void 0;){if(a===l.index){let h;l.type===2?h=new Ls(r,r.nextSibling,this,t):l.type===1?h=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(h=new Ko(r,this,t)),this._$AV.push(h),l=s[++o]}a!==l?.index&&(r=ke.nextNode(),a++)}return ke.currentNode=Me,n}v(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}},Ls=class Go{constructor(e,i,s,n){var r;this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=e,this._$AB=i,this._$AM=s,this.options=n,this._$Cp=(r=n?.isConnected)===null||r===void 0||r}get _$AU(){var e,i;return(i=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&i!==void 0?i:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const i=this._$AM;return i!==void 0&&e?.nodeType===11&&(e=i.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,i=this){e=_e(this,e,i),$i(e)?e===Z||e==null||e===""?(this._$AH!==Z&&this._$AR(),this._$AH=Z):e!==this._$AH&&e!==Ke&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Ro(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==Z&&$i(this._$AH)?this._$AA.nextSibling.data=e:this.$(Me.createTextNode(e)),this._$AH=e}g(e){var i;const{values:s,_$litType$:n}=e,r=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=$n.createElement(No(n.h,n.h[0]),this.options)),n);if(((i=this._$AH)===null||i===void 0?void 0:i._$AD)===r)this._$AH.v(s);else{const a=new Bo(r,this),o=a.u(this.options);a.v(s),this.$(o),this._$AH=a}}_$AC(e){let i=ma.get(e.strings);return i===void 0&&ma.set(e.strings,i=new $n(e)),i}T(e){Do(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,n=0;for(const r of e)n===i.length?i.push(s=new Go(this.k(Ci()),this.k(Ci()),this,this.options)):s=i[n],s._$AI(r),n++;n<i.length&&(this._$AR(s&&s._$AB.nextSibling,n),i.length=n)}_$AR(e=this._$AA.nextSibling,i){var s;
8for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,i);e&&e!==this._$AB;){const n=e.nextSibling;e.remove(),e=n}}setConnected(e){var i;this._$AM===void 0&&(this._$Cp=e,(i=this._$AP)===null||i===void 0||i.call(this,e))}},xi=class{constructor(t,e,i,s,n){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Z}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const n=this.strings;let r=!1;if(n===void 0)t=_e(this,t,e,0),r=!$i(t)||t!==this._$AH&&t!==Ke,r&&(this._$AH=t);else{const a=t;let o,l;for(t=n[0],o=0;o<n.length-1;o++)l=_e(this,a[i+o],e,o),l===Ke&&(l=this._$AH[o]),r||(r=!$i(l)||l!==this._$AH[o]),l===Z?t=Z:t!==Z&&(t+=(l??"")+n[o+1]),this._$AH[o]=l}r&&!s&&this.j(t)}j(t){t===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Uo=class extends xi{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Z?void 0:t}},cd=je?je.emptyScript:"",Wo=class extends xi{constructor(){super(...arguments),this.type=4}j(t){t&&t!==Z?this.element.setAttribute(this.name,cd):this.element.removeAttribute(this.name)}},jo=class extends xi{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){var i;if((t=(i=_e(this,t,e,0))!==null&&i!==void 0?i:Z)===Ke)return;const s=this._$AH,n=t===Z&&s!==Z||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==Z&&(s===Z||n);n&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}},Ko=class{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){_e(this,t)}},ud={O:cs,P:Kt,A:Kn,C:1,M:Ho,L:Bo,R:Ro,D:_e,I:Ls,V:xi,H:Wo,N:jo,U:Uo,F:Ko},hd=ls.litHtmlPolyfillSupport;hd?.($n,Ls),((tn=ls.litHtmlVersions)!==null&&tn!==void 0?tn:ls.litHtmlVersions=[]).push("2.8.0");var us=(t,e,i)=>{var s,n;const r=(s=i?.renderBefore)!==null&&s!==void 0?s:e;let a=r._$litPart$;if(a===void 0){const o=(n=i?.renderBefore)!==null&&n!==void 0?n:null;r._$litPart$=a=new Ls(e.insertBefore(Ci(),o),o,void 0,i??{})}return a._$AI(t),a},Ms=class extends HTMLElement{rootPart=null;connectedCallback(){this.rootPart=us(this.render(),this,{renderBefore:this.firstChild}),this.rootPart.setConnected(!0)}disconnectedCallback(){this.rootPart?.setConnected(!1),this.rootPart=null,us(null,this)}},{I:B3}=ud;var dd=t=>t.strings===void 0;var pd={},fd=(t,e=pd)=>t._$AH=e;var hs={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Pi=t=>(...e)=>({_$litDirective$:t,values:e}),Zn=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}},fi=(t,e)=>{var i,s;const n=t._$AN;if(n===void 0)return!1;for(const r of n)(s=(i=r)._$AO)===null||s===void 0||s.call(i,e,!1),fi(r,e);return!0},ds=t=>{let e,i;do{if((e=t._$AM)===void 0)break;i=e._$AN,i.delete(t),t=e}while(i?.size===0)},Zo=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(i===void 0)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),yd(e)}};function md(t){this._$AN!==void 0?(ds(this),this._$AM=t,Zo(this)):this._$AM=t}function gd(t,e=!1,i=0){const s=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(e)if(Array.isArray(s))for(let r=i;r<s.length;r++)fi(s[r],!1),ds(s[r]);else s!=null&&(fi(s,!1),ds(s));else fi(this,t)}var yd=t=>{var e,i,s,n;t.type==hs.CHILD&&((e=(s=t)._$AP)!==null&&e!==void 0||(s._$AP=gd),(i=(n=t)._$AQ)!==null&&i!==void 0||(n._$AQ=md))},Qo=class extends Zn{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),Zo(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,s;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)===null||i===void 0||i.call(this):(s=this.disconnected)===null||s===void 0||s.call(this)),e&&(fi(this,t),ds(this))}setValue(t){if(dd(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}},Qn=t=>t??Z,ps=class extends Zn{constructor(t){if(super(t),this.et=Z,t.type!==hs.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===Z||t==null)return this.ft=void 0,this.et=t;if(t===Ke)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}};ps.directiveName="unsafeHTML",ps.resultType=1;var zo=Pi(ps),wn=class extends ps{};wn.directiveName="unsafeSVG",wn.resultType=2;var vd=Pi(wn),bd=class extends Qo{#t=null;#e=!1;#i=null;constructor(t){super(t),this.#e=t.type===hs.ATTRIBUTE||t.type===hs.BOOLEAN_ATTRIBUTE}render(t){return t!==this.#t&&(this.disconnected(),this.#t=t,this.isConnected&&this.#s()),this.#t?this.#n(y(this.#t)):Z}reconnected(){this.#s()}disconnected(){this.#i?.(),this.#i=null}#s(){this.#t&&(this.#i=u(this.#a.bind(this)))}#n(t){return this.#e?Qn(t):t}#r(t){this.setValue(this.#n(t))}#a(){this.#r(this.#t?.())}};function g(t){return Pi(bd)(F(t))}var Yo=class{#t;#e;elements=new Set;constructor(t,e){this.#t=t,this.#e=e}connect(){this.#s();const t=new MutationObserver(this.#i);for(const e of this.#t)t.observe(e,{childList:!0,subtree:!0});E(()=>t.disconnect()),E(this.disconnect.bind(this))}disconnect(){this.elements.clear()}assign(t,e){Fa(t)?(e.textContent="",e.append(t)):(us(null,e),us(t,e)),e.style.display||(e.style.display="contents");const i=e.firstElementChild;if(!i)return;const s=e.getAttribute("data-class");s&&i.classList.add(...s.split(" "))}#i=Jt(this.#s.bind(this));#s(t){if(t&&!t.some(s=>s.addedNodes.length))return;let e=!1,i=this.#t.flatMap(s=>[...s.querySelectorAll("slot")]);for(const s of i)!s.hasAttribute("name")||this.elements.has(s)||(this.elements.add(s),e=!0);e&&this.#e(this.elements)}},Cd=0,Gi="data-slot-id",zn=class{#t;slots;constructor(t){this.#t=t,this.slots=new Yo(t,this.#i.bind(this))}connect(){this.slots.connect(),this.#i();const t=new MutationObserver(this.#e);for(const e of this.#t)t.observe(e,{childList:!0});E(()=>t.disconnect())}#e=Jt(this.#i.bind(this));#i(){for(const t of this.#t)for(const e of t.children){if(e.nodeType!==1)continue;const i=e.getAttribute("slot");if(!i)continue;e.style.display="none";let s=e.getAttribute(Gi);s||e.setAttribute(Gi,s=++Cd+"");for(const n of this.slots.elements){if(n.getAttribute("name")!==i||n.getAttribute(Gi)===s)continue;const r=document.importNode(e,!0);i.includes("-icon")&&r.classList.add("vds-icon"),r.style.display="",r.removeAttribute("slot"),this.slots.assign(r,n),n.setAttribute(Gi,s)}}}};function Xo({name:t,class:e,state:i,paths:s,viewBox:n="0 0 32 32"}){return f`<svg 9 class="${"vds-icon"+(e?` ${e}`:"")}"
10 viewBox="${n}" 11 fill="none" 12 aria-hidden="true" 13 focusable="false" 14 xmlns="http://www.w3.org/2000/svg" 15 data-icon=${Qn(t??i)} 16 > 17 ${w(s)?vd(s):g(s)} 18 </svg>`}var $d=class{#t={};#e=!1;slots;constructor(t){this.slots=new Yo(t,this.#s.bind(this))}connect(){this.slots.connect()}load(){this.loadIcons().then(t=>{this.#t=t,this.#e=!0,this.#s()})}*#i(){for(const t of Object.keys(this.#t)){const e=`${t}-icon`;for(const i of this.slots.elements)i.name===e&&(yield{icon:this.#t[t],slot:i})}}#s(){if(this.#e)for(const{icon:t,slot:e}of this.#i())this.slots.assign(t,e)}},Jo=class extends $d{connect(){super.connect();const{player:t}=T();if(!t.el)return;let e,i=new IntersectionObserver(s=>{s[0]?.isIntersecting&&(e?.(),e=void 0,this.load())});i.observe(t.el),e=E(()=>i.disconnect())}},sn=new WeakMap,_s=Pi(class extends Qo{render(t){return Z}update(t,[e]){var i;const s=e!==this.G;return s&&this.G!==void 0&&this.ot(void 0),(s||this.rt!==this.lt)&&(this.G=e,this.dt=(i=t.options)===null||i===void 0?void 0:i.host,this.ot(this.lt=t.element)),Z}ot(t){var e;if(typeof this.G=="function"){const i=(e=this.dt)!==null&&e!==void 0?e:globalThis;let s=sn.get(i);s===void 0&&(s=new WeakMap,sn.set(i,s)),s.get(this.G)!==void 0&&this.G.call(this.dt,void 0),s.set(this.G,t),t!==void 0&&this.G.call(this.dt,t)}else this.G.value=t}get rt(){var t,e,i;return typeof this.G=="function"?(e=sn.get((t=this.dt)!==null&&t!==void 0?t:globalThis))===null||e===void 0?void 0:e.get(this.G):(i=this.G)===null||i===void 0?void 0:i.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}}),tl=Ut();function M(){return W(tl)}var wd={colorScheme:"system",download:null,customIcons:!1,disableTimeSlider:!1,menuContainer:null,menuGroup:"bottom",noAudioGain:!1,noGestures:!1,noKeyboardAnimations:!1,noModal:!1,noScrubGesture:!1,playbackRates:{min:0,max:2,step:.25},audioGains:{min:0,max:300,step:25},seekStep:10,sliderChaptersMinWidth:325,hideQualityBitrate:!1,smallWhen:!1,thumbnails:null,translations:null,when:!1},Yn=class extends x{static props=wd;#t;#e=F(()=>{const t=this.$props.when();return this.#s(t)});#i=F(()=>{const t=this.$props.smallWhen();return this.#s(t)});get isMatch(){return this.#e()}get isSmallLayout(){return this.#i()}onSetup(){this.#t=T(),this.setAttributes({"data-match":this.#e,"data-sm":()=>this.#i()?"":null,"data-lg":()=>this.#i()?null:"","data-size":()=>this.#i()?"sm":"lg","data-no-scrub-gesture":this.$props.noScrubGesture}),mt(tl,{...this.$props,when:this.#e,smallWhen:this.#i,userPrefersAnnouncements:C(!0),userPrefersKeyboardAnimations:C(!0),menuPortal:C(null)})}onAttach(t){$o(t,this.$props.colorScheme)}#s(t){return t!=="never"&&(gi(t)?t:F(()=>t(this.#t.player.state))())}},el=Yn.prototype;V(el,"isMatch");V(el,"isSmallLayout");function il(t,e){u(()=>{const{player:i}=T(),s=i.el;return s&&$(s,"data-layout",e()&&t),()=>s?.removeAttribute("data-layout")})}function dt(t,e){return t()?.[e]??e}function Xn(){return g(()=>{const{translations:t,userPrefersAnnouncements:e}=M();return e()?f`<media-announcer .translations=${g(t)}></media-announcer>`:null})}function Pt(t,e=""){return f`<slot 19 name=${`${t}-icon`} 20 data-class=${`vds-icon vds-${t}-icon${e?` ${e}`:""}`} 21 ></slot>`}function Ei(t){return t.map(e=>Pt(e))}function _(t,e){return g(()=>dt(t,e))}function Jn({tooltip:t}){const{translations:e}=M(),{remotePlaybackState:i}=Y(),s=g(()=>`${dt(e,"AirPlay")} ${Mn(i())}`),n=_(e,"AirPlay");return f` 22 <media-tooltip class="vds-airplay-tooltip vds-tooltip"> 23 <media-tooltip-trigger> 24 <media-airplay-button class="vds-airplay-button vds-button" aria-label=${s}> 25 ${Pt("airplay")} 26 </media-airplay-button> 27 </media-tooltip-trigger> 28 <media-tooltip-content class="vds-tooltip-content" placement=${t}> 29 <span class="vds-airplay-tooltip-text">${n}</span> 30 </media-tooltip-content> 31 </media-tooltip> 32 `}function sl({tooltip:t}){const{translations:e}=M(),{remotePlaybackState:i}=Y(),s=g(()=>`${dt(e,"Google Cast")} ${Mn(i())}`),n=_(e,"Google Cast");return f` 33 <media-tooltip class="vds-google-cast-tooltip vds-tooltip"> 34 <media-tooltip-trigger> 35 <media-google-cast-button class="vds-google-cast-button vds-button" aria-label=${s}> 36 ${Pt("google-cast")} 37 </media-google-cast-button> 38 </media-tooltip-trigger> 39 <media-tooltip-content class="vds-tooltip-content" placement=${t}>
40 <span class="vds-google-cast-tooltip-text">${n}</span> 41 </media-tooltip-content> 42 </media-tooltip> 43 `}function Is({tooltip:t}){const{translations:e}=M(),i=_(e,"Play"),s=_(e,"Pause");return f` 44 <media-tooltip class="vds-play-tooltip vds-tooltip"> 45 <media-tooltip-trigger> 46 <media-play-button 47 class="vds-play-button vds-button" 48 aria-label=${_(e,"Play")} 49 > 50 ${Ei(["play","pause","replay"])} 51 </media-play-button> 52 </media-tooltip-trigger> 53 <media-tooltip-content class="vds-tooltip-content" placement=${t}> 54 <span class="vds-play-tooltip-text">${i}</span> 55 <span class="vds-pause-tooltip-text">${s}</span> 56 </media-tooltip-content> 57 </media-tooltip> 58 `}function ga({tooltip:t,ref:e=Ue}){const{translations:i}=M(),s=_(i,"Mute"),n=_(i,"Unmute");return f` 59 <media-tooltip class="vds-mute-tooltip vds-tooltip"> 60 <media-tooltip-trigger> 61 <media-mute-button 62 class="vds-mute-button vds-button" 63 aria-label=${_(i,"Mute")} 64 ${_s(e)} 65 > 66 ${Ei(["mute","volume-low","volume-high"])} 67 </media-mute-button> 68 </media-tooltip-trigger> 69 <media-tooltip-content class="vds-tooltip-content" placement=${t}> 70 <span class="vds-mute-tooltip-text">${n}</span> 71 <span class="vds-unmute-tooltip-text">${s}</span> 72 </media-tooltip-content> 73 </media-tooltip> 74 `}function tr({tooltip:t}){const{translations:e}=M(),i=_(e,"Closed-Captions On"),s=_(e,"Closed-Captions Off");return f` 75 <media-tooltip class="vds-caption-tooltip vds-tooltip"> 76 <media-tooltip-trigger> 77 <media-caption-button 78 class="vds-caption-button vds-button" 79 aria-label=${_(e,"Captions")} 80 > 81 ${Ei(["cc-on","cc-off"])} 82 </media-caption-button> 83 </media-tooltip-trigger> 84 <media-tooltip-content class="vds-tooltip-content" placement=${t}> 85 <span class="vds-cc-on-tooltip-text">${s}</span> 86 <span class="vds-cc-off-tooltip-text">${i}</span> 87 </media-tooltip-content> 88 </media-tooltip> 89 `}function Td(){const{translations:t}=M(),e=_(t,"Enter PiP"),i=_(t,"Exit PiP");return f` 90 <media-tooltip class="vds-pip-tooltip vds-tooltip"> 91 <media-tooltip-trigger> 92 <media-pip-button 93 class="vds-pip-button vds-button" 94 aria-label=${_(t,"PiP")} 95 > 96 ${Ei(["pip-enter","pip-exit"])} 97 </media-pip-button> 98 </media-tooltip-trigger> 99 <media-tooltip-content class="vds-tooltip-content"> 100 <span class="vds-pip-enter-tooltip-text">${e}</span> 101 <span class="vds-pip-exit-tooltip-text">${i}</span> 102 </media-tooltip-content> 103 </media-tooltip> 104 `}function nl({tooltip:t}){const{translations:e}=M(),i=_(e,"Enter Fullscreen"),s=_(e,"Exit Fullscreen");return f` 105 <media-tooltip class="vds-fullscreen-tooltip vds-tooltip"> 106 <media-tooltip-trigger> 107 <media-fullscreen-button 108 class="vds-fullscreen-button vds-button" 109 aria-label=${_(e,"Fullscreen")} 110 > 111 ${Ei(["fs-enter","fs-exit"])} 112 </media-fullscreen-button> 113 </media-tooltip-trigger> 114 <media-tooltip-content class="vds-tooltip-content" placement=${t}> 115 <span class="vds-fs-enter-tooltip-text">${i}</span> 116 <span class="vds-fs-exit-tooltip-text">${s}</span> 117 </media-tooltip-content> 118 </media-tooltip> 119 `}function ya({backward:t,tooltip:e}){const{translations:i,seekStep:s}=M(),n=t?"Seek Backward":"Seek Forward",r=_(i,n);return f` 120 <media-tooltip class="vds-seek-tooltip vds-tooltip"> 121 <media-tooltip-trigger> 122 <media-seek-button 123 class="vds-seek-button vds-button" 124 seconds=${g(()=>(t?-1:1)*s())} 125 aria-label=${r} 126 > 127 ${Pt(t?"seek-backward":"seek-forward")} 128 </media-seek-button> 129 </media-tooltip-trigger> 130 <media-tooltip-content class="vds-tooltip-content" placement=${e}> 131 ${_(i,n)} 132 </media-tooltip-content> 133 </media-tooltip> 134 `}function rl(){const{translations:t}=M(),{live:e}=Y(),i=_(t,"Skip To Live"),s=_(t,"LIVE");return e()?f` 135 <media-live-button class="vds-live-button" aria-label=${i}>
136 <span class="vds-live-button-text">${s}</span> 137 </media-live-button> 138 `:null}function er(){return g(()=>{const{download:t,translations:e}=M(),i=t();if(Oa(i))return null;const{source:s,title:n}=Y(),r=s(),a=so({title:n(),src:r,download:i});return w(a?.url)?f` 139 <media-tooltip class="vds-download-tooltip vds-tooltip"> 140 <media-tooltip-trigger> 141 <a 142 role="button" 143 class="vds-download-button vds-button" 144 aria-label=${_(e,"Download")} 145 href=${Dn(a.url,{download:a.name})} 146 download=${a.name} 147 target="_blank" 148 > 149 <slot name="download-icon" data-class="vds-icon" /> 150 </a> 151 </media-tooltip-trigger> 152 <media-tooltip-content class="vds-tooltip-content" placement="top"> 153 ${_(e,"Download")} 154 </media-tooltip-content> 155 </media-tooltip> 156 `:null})}function ir(){const{translations:t}=M();return f` 157 <media-captions 158 class="vds-captions" 159 .exampleText=${_(t,"Captions look like this")} 160 ></media-captions> 161 `}function Zt(){return f`<div class="vds-controls-spacer"></div>`}function al(t,e){return f` 162 <media-menu-portal .container=${g(t)} disabled="fullscreen"> 163 ${e} 164 </media-menu-portal> 165 `}function ol(t,e,i,s){let n=w(e)?document.querySelector(e):e;n||(n=t?.closest("dialog")),n||(n=document.body);const r=document.createElement("div");r.style.display="contents",r.classList.add(i),n.append(r),u(()=>{if(!r)return;const{viewType:o}=Y(),l=s();$(r,"data-view-type",o()),$(r,"data-sm",l),$(r,"data-lg",!l),$(r,"data-size",l?"sm":"lg")});const{colorScheme:a}=M();return $o(r,a),r}function ll({placement:t,tooltip:e,portal:i}){const{textTracks:s}=T(),{viewType:n,seekableStart:r,seekableEnd:a}=Y(),{translations:o,thumbnails:l,menuPortal:h,noModal:c,menuGroup:d,smallWhen:p}=M();if(F(()=>{const q=r(),H=a(),tt=C(null);return Je(s,"chapters",tt.set),!tt()?.cues.filter(j=>j.startTime<=H&&j.endTime>=q)?.length})())return null;const m=F(()=>c()?Ji(t):p()?null:Ji(t)),v=F(()=>!p()&&d()==="bottom"&&n()==="video"?26:0),b=C(!1);function A(){b.set(!0)}function D(){b.set(!1)}const R=f` 166 <media-menu-items 167 class="vds-chapters-menu-items vds-menu-items" 168 placement=${g(m)} 169 offset=${g(v)} 170 > 171 ${g(()=>b()?f` 172 <media-chapters-radio-group 173 class="vds-chapters-radio-group vds-radio-group" 174 .thumbnails=${g(l)} 175 > 176 <template> 177 <media-radio class="vds-chapter-radio vds-radio">
178 <media-thumbnail class="vds-thumbnail"></media-thumbnail> 179 <div class="vds-chapter-radio-content"> 180 <span class="vds-chapter-radio-label" data-part="label"></span> 181 <span class="vds-chapter-radio-start-time" data-part="start-time"></span> 182 <span class="vds-chapter-radio-duration" data-part="duration"></span> 183 </div> 184 </media-radio> 185 </template> 186 </media-chapters-radio-group> 187 `:null)} 188 </media-menu-items> 189 `;return f` 190 <media-menu class="vds-chapters-menu vds-menu" @open=${A} @close=${D}> 191 <media-tooltip class="vds-tooltip"> 192 <media-tooltip-trigger> 193 <media-menu-button 194 class="vds-menu-button vds-button" 195 aria-label=${_(o,"Chapters")} 196 > 197 ${Pt("menu-chapters")} 198 </media-menu-button> 199 </media-tooltip-trigger> 200 <media-tooltip-content 201 class="vds-tooltip-content" 202 placement=${ft(e)?g(e):e} 203 > 204 ${_(o,"Chapters")} 205 </media-tooltip-content> 206 </media-tooltip> 207 ${i?al(h,R):R} 208 </media-menu> 209 `}function nn(t){const{style:e}=new Option;return e.color=t,e.color.match(/\((.*?)\)/)[1].replace(/,/g," ")}var sr={type:"color"},kd={type:"radio",values:{"Monospaced Serif":"mono-serif","Proportional Serif":"pro-serif","Monospaced Sans-Serif":"mono-sans","Proportional Sans-Serif":"pro-sans",Casual:"casual",Cursive:"cursive","Small Capitals":"capitals"}},Sd={type:"slider",min:0,max:400,step:25,upIcon:null,downIcon:null},xd={type:"slider",min:0,max:100,step:5,upIcon:null,downIcon:null},Pd={type:"radio",values:["None","Drop Shadow","Raised","Depressed","Outline"]},wi={fontFamily:"pro-sans",fontSize:"100%",textColor:"#ffffff",textOpacity:"100%",textShadow:"none",textBg:"#000000",textBgOpacity:"100%",displayBg:"#000000",displayBgOpacity:"0%"},Yt=Object.keys(wi).reduce((t,e)=>({...t,[e]:C(wi[e])}),{});for(const t of Object.keys(Yt)){const e=localStorage.getItem(`vds-player:${Xt(t)}`);w(e)&&Yt[t].set(e)}function Ed(){for(const t of Object.keys(Yt)){const e=wi[t];Yt[t].set(e)}}var va=!1,rn=new Set;function Ad(){const{player:t}=T();rn.add(t),Ld(t),E(()=>rn.delete(t)),va||(lt(()=>{for(const e of es(Yt)){const i=Yt[e],s=wi[e],n=`vds-player:${Xt(e)}`;u(()=>{const r=i(),a=r===s;for(const o of rn)cl(o,e,r);a?localStorage.removeItem(n):localStorage.setItem(n,r)})}},null),va=!0)}function Ld(t){for(const e of es(Yt))cl(t,e,Yt[e]())}function cl(t,e,i){const s=wi[e],n=`--media-user-${Xt(e)}`,r=i!==s?Md(e,i):null;if(e==="fontFamily"){const a=i==="capitals"?"small-caps":null;t.el?.style.setProperty("--media-user-font-variant",a)}t.el?.style.setProperty(n,r)}function Md(t,e){switch(t){case"fontFamily":return Id(e);case"fontSize":case"textOpacity":case"textBgOpacity":case"displayBgOpacity":return _d(e);case"textColor":return`rgb(${nn(e)} / var(--media-user-text-opacity, 1))`;case"textShadow":return Vd(e);case"textBg":return`rgb(${nn(e)} / var(--media-user-text-bg-opacity, 1))`;case"displayBg":return`rgb(${nn(e)} / var(--media-user-display-bg-opacity, 1))`}}function _d(t){return(parseInt(t)/100).toString()}function Id(t){switch(t){case"mono-serif":return'"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace';case"mono-sans":return'"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace';case"pro-sans":return'Roboto, "Arial Unicode Ms", Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif';case"casual":return'"Comic Sans MS", Impact, Handlee, fantasy';case"cursive":return'"Monotype Corsiva", "URW Chancery L", "Apple Chancery", "Dancing Script", cursive';case"capitals":return'"Arial Unicode Ms", Arial, Helvetica, Verdana, "Marcellus SC", sans-serif + font-variant=small-caps';default:return'"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif'}}function Vd(t){switch(t){case"drop shadow":return"rgb(34, 34, 34) 1.86389px 1.86389px 2.79583px, rgb(34, 34, 34) 1.86389px 1.86389px 3.72778px, rgb(34, 34, 34) 1.86389px 1.86389px 4.65972px";case"raised":return"rgb(34, 34, 34) 1px 1px, rgb(34, 34, 34) 2px 2px";case"depressed":return"rgb(204, 204, 204) 1px 1px, rgb(34, 34, 34) -1px -1px";case"outline":return"rgb(34, 34, 34) 0px 0px 1.86389px, rgb(34, 34, 34) 0px 0px 1.86389px, rgb(34, 34, 34) 0px 0px 1.86389px, rgb(34, 34, 34) 0px 0px 1.86389px, rgb(34, 34, 34) 0px 0px 1.86389px";default:return""}}var Dd=0;function qt({label:t="",value:e="",children:i}){if(!t)return f` 210 <div class="vds-menu-section"> 211 <div class="vds-menu-section-body">${i}</div> 212 </div> 213 `;const s=`vds-menu-section-${++Dd}`;return f` 214 <section class="vds-menu-section" role="group" aria-labelledby=${s}> 215 <div class="vds-menu-section-title"> 216 <header id=${s}>${t}</header> 217 ${e?f`<div class="vds-menu-section-value">${e}</div>`:null} 218 </div> 219 <div class="vds-menu-section-body">${i}</div> 220 </section> 221 `}function nr({label:t,children:e}){return f` 222 <div class="vds-menu-item"> 223 <div class="vds-menu-item-label">${t}</div> 224 ${e} 225 </div> 226 `}function me({label:t,icon:e,hint:i}){return f` 227 <media-menu-button class="vds-menu-item"> 228 ${Pt("menu-arrow-left","vds-menu-close-icon")} 229 ${e?Pt(e,"vds-menu-item-icon"):null}
230 <span class="vds-menu-item-label">${g(t)}</span> 231 <span class="vds-menu-item-hint" data-part="hint">${i?g(i):null} </span> 232 ${Pt("menu-arrow-right","vds-menu-open-icon")} 233 </media-menu-button> 234 `}function Rd({value:t=null,options:e,hideLabel:i=!1,children:s=null,onChange:n=null}){function r(a){const{value:o,label:l}=a;return f` 235 <media-radio class="vds-radio" value=${o}> 236 ${Pt("menu-radio-check")} 237 ${i?null:f` 238 <span class="vds-radio-label" data-part="label"> 239 ${w(l)?l:g(l)} 240 </span> 241 `} 242 ${ft(s)?s(a):s} 243 </media-radio> 244 `}return f` 245 <media-radio-group 246 class="vds-radio-group" 247 value=${w(t)?t:t?g(t):""} 248 @change=${n} 249 > 250 ${Q(e)?e.map(r):g(()=>e().map(r))} 251 </media-radio-group> 252 `}function Od(t){return Q(t)?t.map(e=>({label:e,value:e.toLowerCase()})):Object.keys(t).map(e=>({label:e,value:t[e]}))}function rr(){return f` 253 <div class="vds-slider-track"></div> 254 <div class="vds-slider-track-fill vds-slider-track"></div> 255 <div class="vds-slider-thumb"></div> 256 `}function ar(){return f` 257 <media-slider-steps class="vds-slider-steps"> 258 <template> 259 <div class="vds-slider-step"></div> 260 </template> 261 </media-slider-steps> 262 `}function or({label:t=null,value:e=null,upIcon:i="",downIcon:s="",children:n,isMin:r,isMax:a}){const o=t||e,l=[s?Pt(s,"down"):null,n,i?Pt(i,"up"):null];return f` 263 <div 264 class=${`vds-menu-item vds-menu-slider-item${o?" group":""}`} 265 data-min=${g(()=>r()?"":null)} 266 data-max=${g(()=>a()?"":null)} 267 > 268 ${o?f` 269 <div class="vds-menu-slider-title"> 270 ${[t?f`<div>${t}</div>`:null,e?f`<div>${e}</div>`:null]} 271 </div> 272 <div class="vds-menu-slider-body">${l}</div> 273 `:l} 274 </div> 275 `}var qd={...Sd,upIcon:"menu-opacity-up",downIcon:"menu-opacity-down"},lr={...xd,upIcon:"menu-opacity-up",downIcon:"menu-opacity-down"};function Nd(){return g(()=>{const{hasCaptions:t}=Y(),{translations:e}=M();return t()?f` 276 <media-menu class="vds-font-menu vds-menu"> 277 ${me({label:()=>dt(e,"Caption Styles")})} 278 <media-menu-items class="vds-menu-items"> 279 ${[qt({label:_(e,"Font"),children:[Hd(),Fd()]}),qt({label:_(e,"Text"),children:[Bd(),Ud(),Gd()]}),qt({label:_(e,"Text Background"),children:[Wd(),jd()]}),qt({label:_(e,"Display Background"),children:[Kd(),Zd()]}),qt({children:[Qd()]})]} 280 </media-menu-items> 281 </media-menu> 282 `:null})}function Hd(){return ie({label:"Family",option:kd,type:"fontFamily"})}function Fd(){return ie({label:"Size",option:qd,type:"fontSize"})}function Bd(){return ie({label:"Color",option:sr,type:"textColor"})}function Gd(){return ie({label:"Opacity",option:lr,type:"textOpacity"})}function Ud(){return ie({label:"Shadow",option:Pd,type:"textShadow"})}function Wd(){return ie({label:"Color",option:sr,type:"textBg"})}function jd(){return ie({label:"Opacity",option:lr,type:"textBgOpacity"})}function Kd(){return ie({label:"Color",option:sr,type:"displayBg"})}function Zd(){return ie({label:"Opacity",option:lr,type:"displayBgOpacity"})}function Qd(){const{translations:t}=M();return f` 283 <button class="vds-menu-item" role="menuitem" @click=${Ed}> 284 <span class="vds-menu-item-label">${g(()=>dt(t,"Reset"))}</span> 285 </button> 286 `}function ie({label:t,option:e,type:i}){const{player:s}=T(),{translations:n}=M(),r=Yt[i],a=()=>dt(n,t);function o(){Nt(),s.dispatchEvent(new Event("vds-font-change"))}if(e.type==="color"){let c=function(d){r.set(d.target.value),o()};return nr({label:g(a),children:f` 287 <input 288 class="vds-color-picker" 289 type="color" 290 .value=${g(r)} 291 @input=${c} 292 /> 293 `})}if(e.type==="slider"){let b=function(A){r.set(A.detail+"%"),o()};const{min:c,max:d,step:p,upIcon:m,downIcon:v}=e;return or({label:g(a),value:g(r),upIcon:m,downIcon:v,isMin:()=>r()===c+"%",isMax:()=>r()===d+"%",children:f` 294 <media-slider 295 class="vds-slider" 296 min=${c} 297 max=${d} 298 step=${p} 299 key-step=${p} 300 .value=${g(()=>parseInt(r()))} 301 aria-label=${g(a)} 302 @value-change=${b} 303 @drag-value-change=${b} 304 > 305 ${rr()}${ar()} 306 </media-slider> 307 `})}const l=Od(e.values),h=()=>{const c=r(),d=l.find(p=>p.value===c)?.label||"";return dt(n,w(d)?d:d())};return f` 308 <media-menu class=${`vds-${Xt(i)}-menu vds-menu`}> 309 ${me({label:a,hint:h})} 310 <media-menu-items class="vds-menu-items">
311 ${Rd({value:r,options:l,onChange({detail:c}){r.set(c),o()}})} 312 </media-menu-items> 313 </media-menu> 314 `}function ul({label:t,checked:e,defaultChecked:i=!1,storageKey:s,onChange:n}){const{translations:r}=M(),a=C(!!((s?localStorage.getItem(s):null)??i)),o=C(!1),l=g(at(a)),h=_(r,t);s&&n(y(a)),e&&u(()=>{a.set(e())});function c(m){m?.button!==1&&(a.set(v=>!v),s&&localStorage.setItem(s,a()?"1":""),n(a(),m),o.set(!1))}function d(m){ki(m)&&c()}function p(m){m.button===0&&o.set(!0)}return f` 315 <div 316 class="vds-menu-checkbox" 317 role="menuitemcheckbox" 318 tabindex="0" 319 aria-label=${h} 320 aria-checked=${l} 321 data-active=${g(()=>o()?"":null)} 322 @pointerup=${c} 323 @pointerdown=${p} 324 @keydown=${d} 325 ></div> 326 `}function zd(){return g(()=>{const{translations:t}=M();return f` 327 <media-menu class="vds-accessibility-menu vds-menu"> 328 ${me({label:()=>dt(t,"Accessibility"),icon:"menu-accessibility"})} 329 <media-menu-items class="vds-menu-items"> 330 ${[qt({children:[Yd(),Xd()]}),qt({children:[Nd()]})]} 331 </media-menu-items> 332 </media-menu> 333 `})}function Yd(){const{userPrefersAnnouncements:t,translations:e}=M(),i="Announcements";return nr({label:_(e,i),children:ul({label:i,storageKey:"vds-player::announcements",onChange(s){t.set(s)}})})}function Xd(){return g(()=>{const{translations:t,userPrefersKeyboardAnimations:e,noKeyboardAnimations:i}
333=M(),{viewType:s}=Y();if(F(()=>s()!=="video"||i())())return null;const n="Keyboard Animations";return nr({label:_(t,n),children:ul({label:n,defaultChecked:!0,storageKey:"vds-player::keyboard-animations",onChange(r){e.set(r)}})})})}function Jd(){return g(()=>{const{noAudioGain:t,translations:e}=M(),{audioTrack:i,audioTracks:s,canSetAudioGain:n}=Y();return F(()=>!(n()&&!t())&&s().length<=1)()?null:f` 334 <media-menu class="vds-audio-menu vds-menu"> 335 ${me({label:()=>dt(e,"Audio"),icon:"menu-audio",hint:()=>i()?.label??""})} 336 <media-menu-items class="vds-menu-items"> 337 ${[tp(),ep()]} 338 </media-menu-items> 339 </media-menu> 340 `})}function tp(){return g(()=>{const{translations:t}=M(),{audioTracks:e}=Y(),i=_(t,"Default");return F(()=>e().length<=1)()?null:qt({children:f` 341 <media-menu class="vds-audio-tracks-menu vds-menu"> 342 ${me({label:()=>dt(t,"Track")})} 343 <media-menu-items class="vds-menu-items"> 344 <media-audio-radio-group 345 class="vds-audio-track-radio-group vds-radio-group" 346 empty-label=${i} 347 > 348 <template> 349 <media-radio class="vds-audio-track-radio vds-radio"> 350 <slot name="menu-radio-check-icon" data-class="vds-icon"></slot> 351 <span class="vds-radio-label" data-part="label"></span> 352 </media-radio> 353 </template> 354 </media-audio-radio-group> 355 </media-menu-items> 356 </media-menu> 357 `})})}function ep(){return g(()=>{const{noAudioGain:t,translations:e}=M(),{canSetAudioGain:i}=Y();if(F(()=>!i()||t())())return null;const{audioGain:s}=Y();return qt({label:_(e,"Boost"),value:g(()=>Math.round(((s()??1)-1)*100)+"%"),children:[or({upIcon:"menu-audio-boost-up",downIcon:"menu-audio-boost-down",children:ip(),isMin:()=>((s()??1)-1)*100<=hl(),isMax:()=>((s()??1)-1)*100===dl()})]})})}function ip(){const{translations:t}=M(),e=_(t,"Boost"),i=hl,s=dl,n=sp;return f` 358 <media-audio-gain-slider 359 class="vds-audio-gain-slider vds-slider" 360 aria-label=${e} 361 min=${g(i)} 362 max=${g(s)} 363 step=${g(n)} 364 key-step=${g(n)} 365 > 366 ${rr()}${ar()} 367 </media-audio-gain-slider> 368 `}function hl(){const{audioGains:t}=M(),e=t();return Q(e)?e[0]??0:e.min}function dl(){const{audioGains:t}=M(),e=t();return Q(e)?e[e.length-1]??300:e.max}function sp(){const{audioGains:t}=M(),e=t();return Q(e)?e[1]-e[0]||25:e.step}function np(){return g(()=>{const{translations:t}=M(),{hasCaptions:e}=Y(),i=_(t,"Off");return e()?f` 369 <media-menu class="vds-captions-menu vds-menu"> 370 ${me({label:()=>dt(t,"Captions"),icon:"menu-captions"})} 371 <media-menu-items class="vds-menu-items"> 372 <media-captions-radio-group 373 class="vds-captions-radio-group vds-radio-group" 374 off-label=${i} 375 > 376 <template> 377 <media-radio class="vds-caption-radio vds-radio"> 378 <slot name="menu-radio-check-icon" data-class="vds-icon"></slot> 379 <span class="vds-radio-label" data-part="label"></span> 380 </media-radio> 381 </template> 382 </media-captions-radio-group> 383 </media-menu-items> 384 </media-menu> 385 `:null})}function rp(){return g(()=>{const{hideQualityBitrate:t,translations:e}=M(),{canSetQuality:i,qualities:s}=Y();if(!i()||s().length<=1)return null;const n=_(e,"Auto");return f` 386 <media-menu class="vds-quality-menu vds-menu"> 387 ${me({label:()=>dt(e,"Quality"),icon:"menu-quality-up"})} 388 <media-menu-items class="vds-menu-items"> 389 <media-quality-radio-group 390 class="vds-quality-radio-group vds-radio-group" 391 auto-label=${n} 392 ?hide-bitrate=${g(t)} 393 > 394 <template> 395 <media-radio class="vds-quality-radio vds-radio"> 396 <slot name="menu-radio-check-icon" data-class="vds-icon"></slot> 397 <span class="vds-radio-label" data-part="label"></span> 398 <span class="vds-radio-hint" data-part="bitrate"></span> 399 </media-radio> 400 </template> 401 </media-quality-radio-group> 402 </media-menu-items> 403 </media-menu> 404 `})}function ap(){return g(()=>{const{translations:t}=M(),{canSetPlaybackRate:e,playbackRate:i}=Y();return e()?f` 405 <media-menu class="vds-speed-menu vds-menu"> 406 ${me({label:()=>dt(t,"Speed"),icon:"menu-speed-up",hint:()=>i()===1?dt(t,"Normal"):i()+"x"})} 407 <media-menu-items class="vds-menu-items"> 408 ${qt({label:_(t,"Speed"),value:g(()=>i()===1?dt(t,"Normal"):i()+"x"),children:or({upIcon:"menu-font-size-up",downIcon:"menu-font-size-down",children:lp(),isMin:()=>i()===pl(),isMax:()=>i()===fl()})})} 409 </media-menu-items> 410 </media-menu> 411 `:null})}function pl(){const{playbackRates:t}=M(),e=t();return Q(e)?e[0]??0:e.min}function fl(){const{playbackRates:t}=M(),e=t();return Q(e)?e[e.length-1]??2:e.max}function op(){const{playbackRates:t}=M(),e=t();return Q(e)?e[1]-e[0]||.25:e.step}function lp(){const{translations:t}=M(),e=_(t,"Speed"),i=pl,s=fl,n=op;return f`
412 <media-speed-slider 413 class="vds-speed-slider vds-slider" 414 aria-label=${e} 415 min=${g(i)} 416 max=${g(s)} 417 step=${g(n)} 418 key-step=${g(n)} 419 > 420 ${rr()}${ar()} 421 </media-speed-slider> 422 `}function ml({placement:t,portal:e,tooltip:i}){return g(()=>{const{viewType:s}=Y(),{translations:n,menuPortal:r,noModal:a,menuGroup:o,smallWhen:l}=M(),h=F(()=>a()?Ji(t):l()?null:Ji(t)),c=F(()=>!l()&&o()==="bottom"&&s()==="video"?26:0),d=C(!1);Ad();function p(){d.set(!0)}function m(){d.set(!1)}const v=f` 423 <media-menu-items 424 class="vds-settings-menu-items vds-menu-items" 425 placement=${g(h)} 426 offset=${g(c)} 427 > 428 ${g(()=>d()?[ap(),rp(),zd(),Jd(),np()]:null)} 429 </media-menu-items> 430 `;return f` 431 <media-menu class="vds-settings-menu vds-menu" @open=${p} @close=${m}> 432 <media-tooltip class="vds-tooltip"> 433 <media-tooltip-trigger> 434 <media-menu-button 435 class="vds-menu-button vds-button" 436 aria-label=${_(n,"Settings")} 437 > 438 ${Pt("menu-settings","vds-rotate-icon")} 439 </media-menu-button> 440 </media-tooltip-trigger> 441 <media-tooltip-content 442 class="vds-tooltip-content" 443 placement=${ft(i)?g(i):i} 444 > 445 ${_(n,"Settings")} 446 </media-tooltip-content> 447 </media-tooltip> 448 ${e?al(r,v):v} 449 </media-menu> 450 `})}function cr({orientation:t,tooltip:e}){return g(()=>{const{pointer:i,muted:s,canSetVolume:n}=Y();if(i()==="coarse"&&!s())return null;if(!n())return ga({tooltip:e});const r=C(void 0);return f` 451 <div class="vds-volume" ?data-active=${g(ph(r))} ${_s(r.set)}> 452 ${ga({tooltip:e})} 453 <div class="vds-volume-popup">${cp({orientation:t})}</div> 454 </div> 455 `})}function cp({orientation:t}={}){const{translations:e}=M();return f` 456 <media-volume-slider 457 class="vds-volume-slider vds-slider" 458 aria-label=${_(e,"Volume")} 459 orientation=${Qn(t)} 460 > 461 <div class="vds-slider-track"></div> 462 <div class="vds-slider-track-fill vds-slider-track"></div> 463 <media-slider-preview class="vds-slider-preview" no-clamp> 464 <media-slider-value class="vds-slider-value"></media-slider-value> 465 </media-slider-preview> 466 <div class="vds-slider-thumb"></div> 467 </media-volume-slider> 468 `}function ur(){const t=C(void 0),e=C(0),{thumbnails:i,translations:s,sliderChaptersMinWidth:n,disableTimeSlider:r,seekStep:a,noScrubGesture:o}=M(),l=_(s,"Seek"),h=g(r),c=g(()=>e()<n()),d=g(i);return Co(t,()=>{const p=t();p&&e.set(p.clientWidth)}),f` 469 <media-time-slider 470 class="vds-time-slider vds-slider" 471 aria-label=${l} 472 key-step=${g(a)} 473 ?disabled=${h} 474 ?no-swipe-gesture=${g(o)} 475 ${_s(t.set)} 476 > 477 <media-slider-chapters class="vds-slider-chapters" ?disabled=${c}> 478 <template> 479 <div class="vds-slider-chapter"> 480 <div class="vds-slider-track"></div> 481 <div class="vds-slider-track-fill vds-slider-track"></div> 482 <div class="vds-slider-progress vds-slider-track"></div> 483 </div> 484 </template> 485 </media-slider-chapters> 486 <div class="vds-slider-thumb"></div> 487 <media-slider-preview class="vds-slider-preview"> 488 <media-slider-thumbnail 489 class="vds-slider-thumbnail vds-thumbnail" 490 .src=${d} 491 ></media-slider-thumbnail> 492 <div class="vds-slider-chapter-title" data-part="chapter-title"></div> 493 <media-slider-value class="vds-slider-value"></media-slider-value> 494 </media-slider-preview> 495 </media-time-slider> 496 `}function up(){return f` 497 <div class="vds-time-group"> 498 ${g(()=>{const{duration:t}=Y();return t()?[f`<media-time class="vds-time" type="current"></media-time>`,f`<div class="vds-time-divider">/</div>`,f`<media-time class="vds-time" type="duration"></media-time>`]:null})} 499 </div> 500 `}function hp(){return g(()=>{const{live:t,duration:e}=Y();return t()?rl():e()?f`<media-time class="vds-time" type="current" toggle remainder></media-time>`:null})}function gl(){return g(()=>{const{live:t}=Y();return t()?rl():up()})}function yl(){return g(()=>{const{textTracks:t}=T(),{title:e,started:i}=Y(),s=C(null);return Je(t,"chapters",s.set),s()&&(i()||!e())?vl():f`<media-title class="vds-chapter-title"></media-title>`})}function vl(){return f`<media-chapter-title class="vds-chapter-title"></media-chapter-title>`}var bl=class extends Jo{async loadIcons(){const t=(await ut(async()=>{const{icons:i}=await Promise.resolve().then(()=>g6);return{icons:i}},void 0,import.meta.url)).icons,e={};for(const i of Object.keys(t))e[i]=Xo({name:i,paths:t[i]});return e}},dp=class extends Yn{static props={...super.props,when:({viewType:t})=>t==="audio",smallWhen:({width:t})=>t<576}};
500function pp(){return[Xn(),ir(),f` 501 <media-controls class="vds-controls"> 502 <media-controls-group class="vds-controls-group"> 503 ${[ya({backward:!0,tooltip:"top start"}),Is({tooltip:"top"}),ya({tooltip:"top"}),fp(),ur(),hp(),cr({orientation:"vertical",tooltip:"top"}),tr({tooltip:"top"}),er(),Jn({tooltip:"top"}),mp()]} 504 </media-controls-group> 505 </media-controls> 506 `]}function fp(){return g(()=>{let t=C(void 0),e=C(!1),i=T(),{title:s,started:n,currentTime:r,ended:a}=Y(),{translations:o}=M(),l=dh(t),h=()=>n()||r()>0;const c=()=>`${dt(o,a()?"Replay":h()?"Continue":"Play")}: ${s()}`;u(()=>{l()&&document.activeElement===document.body&&i.player.el?.focus({preventScroll:!0})});function d(){const m=t(),v=!!m&&!l()&&m.clientWidth<m.children[0].clientWidth;m&&dn(m,"vds-marquee",v),e.set(v)}function p(){return f` 507 <span class="vds-title-text"> 508 ${g(c)}${g(()=>h()?vl():null)} 509 </span> 510 `}return Co(t,d),s()?f` 511 <span class="vds-title" title=${g(c)} ${_s(t.set)}> 512 ${[p(),g(()=>e()&&!l()?p():null)]} 513 </span> 514 `:Zt()})}function mp(){const t="top end";return[ll({tooltip:"top",placement:t,portal:!0}),ml({tooltip:"top end",placement:t,portal:!0})]}var gp=class extends S(Ms,dp){static tagName="media-audio-layout";static attrs={smallWhen:{converter(t){return t!=="never"&&!!t}}};#t;#e=C(!1);onSetup(){this.forwardKeepAlive=!1,this.#t=T(),this.#s(),this.#r()}onConnect(){this.#s(),il("audio",()=>this.isMatch),this.#n()}render(){return g(this.#i.bind(this))}#i(){return this.isMatch?pp():null}#s(){this.classList.add("vds-audio-layout")}#n(){const{menuPortal:t}=M();u(()=>{if(!this.isMatch)return;const e=ol(this,this.menuContainer,"vds-audio-layout",()=>this.isSmallLayout),i=e?[this,e]:[this];return(this.$props.customIcons()?new zn(i):new bl(i)).connect(),t.set(e),()=>{e.remove(),t.set(null)}})}#r(){const{pointer:t}=this.#t.$state;u(()=>{t()==="coarse"&&u(this.#a.bind(this))})}#a(){if(!this.#e()){O(this,"pointerdown",this.#l.bind(this),{capture:!0});return}O(this,"pointerdown",t=>t.stopPropagation()),O(window,"pointerdown",this.#o.bind(this))}#l(t){const{target:e}=t;he(e)&&e.closest(".vds-time-slider")&&(t.stopImmediatePropagation(),this.setAttribute("data-scrubbing",""),this.#e.set(!0))}#o(){this.#e.set(!1),this.removeAttribute("data-scrubbing")}},yp=Pi(class extends Zn{constructor(){super(...arguments),this.key=Z}render(t,e){return this.key=t,e}update(t,[e,i]){return e!==this.key&&(fd(t),this.key=e),i}}),vp=class extends Yn{static props={...super.props,when:({viewType:t})=>t==="video",smallWhen:({width:t,height:e})=>t<576||e<380}};function Cl(){return g(()=>{const t=T(),{noKeyboardAnimations:e,userPrefersKeyboardAnimations:i}=M();if(F(()=>e()||!i())())return null;const s=C(!1),{lastKeyboardAction:n}=t.$state;u(()=>{s.set(!!n());const c=setTimeout(()=>s.set(!1),500);return()=>{s.set(!1),window.clearTimeout(c)}});const r=F(()=>{const c=n()?.action;return c&&s()?Xt(c):null}),a=F(()=>`vds-kb-action${s()?"":" hidden"}`),o=F(bp),l=F(()=>{const c=Cp();return c?hh(c):null});function h(){const c=l();return c?f` 515 <div class="vds-kb-bezel"> 516 <div class="vds-kb-icon">${c}</div> 517 </div> 518 `:null}return f` 519 <div class=${g(a)} data-action=${g(r)}> 520 <div class="vds-kb-text-wrapper"> 521 <div class="vds-kb-text">${g(o)}</div> 522 </div> 523 ${g(()=>yp(n(),h()))} 524 </div> 525 `})}function bp(){const{$state:t}=T(),e=t.lastKeyboardAction()?.action,i=t.audioGain()??1;switch(e){case"toggleMuted":return t.muted()?"0%":ba(t.volume(),i);case"volumeUp":case"volumeDown":return ba(t.volume(),i);default:return""}}function ba(t,e){return`${Math.round(t*e*100)}%`}function Cp(){const{$state:t}=T();switch(t.lastKeyboardAction()?.action){case"togglePaused":return t.paused()?"kb-pause-icon":"kb-play-icon";case"toggleMuted":return t.muted()||t.volume()===0?"kb-mute-icon":t.volume()>=.5?"kb-volume-up-icon":"kb-volume-down-icon";case"toggleFullscreen":return`kb-fs-${t.fullscreen()?"enter":"exit"}-icon`;case"togglePictureInPicture":return`kb-pip-${t.pictureInPicture()?"enter":"exit"}-icon`;case"toggleCaptions":return t.hasCaptions()?`kb-cc-${t.textTrack()?"on":"off"}-icon`:null;case"volumeUp":return"kb-volume-up-icon";case"volumeDown":return"kb-volume-down-icon";case"seekForward":return"kb-seek-forward-icon";case"seekBackward":return"kb-seek-backward-icon";default:return null}}
525function $p(){return[Xn(),$l(),Vs(),Cl(),ir(),f`<div class="vds-scrim"></div>`,f` 526 <media-controls class="vds-controls"> 527 ${[Tp(),Zt(),f`<media-controls-group class="vds-controls-group"></media-controls-group>`,Zt(),f` 528 <media-controls-group class="vds-controls-group"> 529 ${ur()} 530 </media-controls-group> 531 `,f` 532 <media-controls-group class="vds-controls-group"> 533 ${[Is({tooltip:"top start"}),cr({orientation:"horizontal",tooltip:"top"}),gl(),yl(),tr({tooltip:"top"}),wp(),Jn({tooltip:"top"}),sl({tooltip:"top"}),er(),Td(),nl({tooltip:"top end"})]} 534 </media-controls-group> 535 `]} 536 </media-controls> 537 `]}function wp(){return g(()=>{const{menuGroup:t}=M();return t()==="bottom"?hr():null})}function Tp(){return f` 538 <media-controls-group class="vds-controls-group"> 539 ${g(()=>{const{menuGroup:t}=M();return t()==="top"?[Zt(),hr()]:null})} 540 </media-controls-group> 541 `}function kp(){return[Xn(),$l(),Vs(),ir(),Cl(),f`<div class="vds-scrim"></div>`,f` 542 <media-controls class="vds-controls"> 543 <media-controls-group class="vds-controls-group"> 544 ${[Jn({tooltip:"top start"}),sl({tooltip:"bottom start"}),Zt(),tr({tooltip:"bottom"}),er(),hr(),cr({orientation:"vertical",tooltip:"bottom end"})]} 545 </media-controls-group> 546 547 ${Zt()} 548 549 <media-controls-group class="vds-controls-group" style="pointer-events: none;"> 550 ${[Zt(),Is({tooltip:"top"}),Zt()]} 551 </media-controls-group> 552 553 ${Zt()} 554 555 <media-controls-group class="vds-controls-group"> 556 ${[gl(),yl(),nl({tooltip:"top end"})]} 557 </media-controls-group> 558 559 <media-controls-group class="vds-controls-group"> 560 ${ur()} 561 </media-controls-group> 562 </media-controls> 563 `,xp()]}function Sp(){return f` 564 <div class="vds-load-container"> 565 ${[Vs(),Is({tooltip:"top"})]} 566 </div> 567 `}function xp(){return g(()=>{const{duration:t}=Y();return t()===0?null:f` 568 <div class="vds-start-duration"> 569 <media-time class="vds-time" type="duration"></media-time> 570 </div> 571 `})}function Vs(){return f` 572 <div class="vds-buffering-indicator"> 573 <media-spinner class="vds-buffering-spinner"></media-spinner> 574 </div> 575 `}function hr(){const{menuGroup:t,smallWhen:e}=M(),i=()=>t()==="top"||e()?"bottom":"top",s=F(()=>`${i()} ${t()==="top"?"end":"center"}`),n=F(()=>`${i()} end`);return[ll({tooltip:s,placement:n,portal:!0}),ml({tooltip:s,placement:n,portal:!0})]}function $l(){return g(()=>{const{noGestures:t}=M();return t()?null:f` 576 <div class="vds-gestures"> 577 <media-gesture class="vds-gesture" event="pointerup" action="toggle:paused"></media-gesture> 578 <media-gesture 579 class="vds-gesture" 580 event="pointerup" 581 action="toggle:controls" 582 ></media-gesture> 583 <media-gesture 584 class="vds-gesture" 585 event="dblpointerup" 586 action="toggle:fullscreen" 587 ></media-gesture> 588 <media-gesture class="vds-gesture" event="dblpointerup" action="seek:-10"></media-gesture> 589 <media-gesture class="vds-gesture" event="dblpointerup" action="seek:10"></media-gesture> 590 </div> 591 `})}var Pp=class extends S(Ms,vp){static tagName="media-video-layout";static attrs={smallWhen:{converter(t){return t!=="never"&&!!t}}};#t;onSetup(){this.forwardKeepAlive=!1,this.#t=T(),this.#e()}onConnect(){this.#e(),il("video",()=>this.isMatch),this.#i()}render(){return g(this.#s.bind(this))}#e(){this.classList.add("vds-video-layout")}#i(){const{menuPortal:t}=M();u(()=>{if(!this.isMatch)return;const e=ol(this,this.menuContainer,"vds-video-layout",()=>this.isSmallLayout),i=e?[this,e]:[this];return(this.$props.customIcons()?new zn(i):new bl(i)).connect(),t.set(e),()=>{e.remove(),t.set(null)}})}#s(){const{load:t}=this.#t.$props,{canLoad:e,streamType:i,nativeControls:s}=this.#t.$state;return!s()&&this.isMatch?t()==="play"&&!e()?Sp():i()==="unknown"?Vs():this.isSmallLayout?kp():$p():null}},wl=Ut();function K(){return W(wl)}var Ep={clickToPlay:!0,clickToFullscreen:!0,controls:["play-large","play","progress","current-time","mute+volume","captions","settings","pip","airplay","fullscreen"],customIcons:!1,displayDuration:!1,download:null,markers:null,invertTime:!0,thumbnails:null,toggleTime:!0,translations:null,seekTime:10,speed:[.5,.75,1,1.25,1.5,1.75,2,4]},Ap=class extends x{static props=Ep;#t;onSetup(){this.#t=T(),mt(wl,{...this.$props,previewTime:C(0)})}};function Lp(t,e){const{canAirPlay:i,canFullscreen:s,canPictureInPicture:n,controlsHidden:r,currentTime:a,fullscreen:o,hasCaptions:l,isAirPlayConnected:h,paused:c,pictureInPicture:d,playing:p,pointer:m,poster:v,textTrack:b,viewType:A,w
591aiting:D}=e.$state;t.classList.add("plyr"),t.classList.add("plyr--full-ui");const R={"plyr--airplay-active":h,"plyr--airplay-supported":i,"plyr--fullscreen-active":o,"plyr--fullscreen-enabled":s,"plyr--hide-controls":r,"plyr--is-touch":()=>m()==="coarse","plyr--loading":D,"plyr--paused":c,"plyr--pip-active":d,"plyr--pip-enabled":n,"plyr--playing":p,"plyr__poster-enabled":v,"plyr--stopped":()=>c()&&a()===0,"plyr--captions-active":b,"plyr--captions-enabled":l},q=$c();for(const H of Object.keys(R))q.add(u(()=>{t.classList.toggle(H,!!R[H]())}));return q.add(u(()=>{const H=`plyr--${A()}`;return t.classList.add(H),()=>t.classList.remove(H)}),u(()=>{const{$provider:H}=e,tt=H()?.type,j=`plyr--${Mp(tt)?"html5":tt}`;return t.classList.toggle(j,!!tt),()=>t.classList.remove(j)})),()=>q.empty()}function Mp(t){return t==="audio"||t==="video"}var _p=class extends Jo{async loadIcons(){const t=(await ut(async()=>{const{icons:i}=await Promise.resolve().then(()=>v6);return{icons:i}},void 0,import.meta.url)).icons,e={};for(const i of Object.keys(t))e[i]=Xo({name:i,paths:t[i],viewBox:"0 0 18 18"});return e}};function Ds(t,e){return t()?.[e]??e}function Ip(){return Op()}function Vp(){const t=T(),{load:e}=t.$props,{canLoad:i}=t.$state;return F(()=>e()==="play"&&!i())()?[Tl(),Ca()]:[Dp(),Rp(),Ca(),qp(),Jp(),t1()]}function Tl(){const t=T(),{translations:e}=K(),{title:i}=t.$state;return f` 592 <media-play-button 593 class="plyr__control plyr__control--overlaid" 594 aria-label=${g(()=>`${Ds(e,"Play")}, ${i()}`)} 595 data-plyr="play" 596 > 597 <slot name="play-icon"></slot> 598 </button> 599 `}function Dp(){const{controls:t}=K();return g(()=>t().includes("play-large")?Tl():null)}function Rp(){const{thumbnails:t,previewTime:e}=K();return f`
600 <media-thumbnail 601 .src=${g(t)} 602 class="plyr__preview-scrubbing" 603 time=${g(()=>e())} 604 ></media-thumbnail> 605 `}function Ca(){const{poster:t}=T().$state;return f`<div class="plyr__poster" style=${g(()=>`background-image: url("${t()}");`)}></div>`}function Op(){const t=new Set(["captions","pip","airplay","fullscreen"]),{controls:e}=K();return f`<div class="plyr__controls">${g(()=>e().filter(i=>!t.has(i)).map(kl))}</div>`}function qp(){const{controls:t}=K();return f`<div class="plyr__controls">${g(()=>t().map(kl))}</div>`}function kl(t){switch(t){case"airplay":return Np();case"captions":return Hp();case"current-time":return Yp();case"download":return Xp();case"duration":return Sl();case"fast-forward":return Kp();case"fullscreen":return Fp();case"mute":case"volume":case"mute+volume":return Qp(t);case"pip":return Gp();case"play":return Up();case"progress":return Zp();case"restart":return Wp();case"rewind":return jp();case"settings":return e1();default:return null}}function Np(){const{translations:t}=K();return f` 606 <media-airplay-button class="plyr__controls__item plyr__control" data-plyr="airplay"> 607 <slot name="airplay-icon"></slot> 608 <span class="plyr__tooltip">${z(t,"AirPlay")}</span> 609 </media-airplay-button> 610 `}function Hp(){const{translations:t}=K();return f` 611 <media-caption-button 612 class="plyr__controls__item plyr__control" 613 data-no-label 614 data-plyr="captions" 615 > 616 <slot name="captions-on-icon" data-class="icon--pressed"></slot> 617 <slot name="captions-off-icon" data-class="icon--not-pressed"></slot> 618 <span class="label--pressed plyr__tooltip">${z(t,"Disable captions")}</span> 619 <span class="label--not-pressed plyr__tooltip">${z(t,"Enable captions")}</span> 620 </media-caption-button> 621 `}function Fp(){const{translations:t}=K(),e=z(t,"Enter Fullscreen");return f` 622 <media-fullscreen-button 623 class="plyr__controls__item plyr__control" 624 data-no-label 625 data-plyr="fullscreen" 626 > 627 <slot name="enter-fullscreen-icon" data-class="icon--pressed"></slot> 628 <slot name="exit-fullscreen-icon" data-class="icon--not-pressed"></slot> 629 <span class="label--pressed plyr__tooltip">${z(t,"Exit Fullscreen")}</span> 630 <span class="label--not-pressed plyr__tooltip">${e}</span> 631 </media-fullscreen-button> 632 `}function Bp(){const{translations:t}=K(),e=z(t,"Mute");return f` 633 <media-mute-button class="plyr__control" data-no-label data-plyr="mute"> 634 <slot name="muted-icon" data-class="icon--pressed"></slot> 635 <slot name="volume-icon" data-class="icon--not-pressed"></slot> 636 <span class="label--pressed plyr__tooltip">${z(t,"Unmute")}</span> 637 <span class="label--not-pressed plyr__tooltip">${e}</span> 638 </media-mute-button> 639 `}function Gp(){const{translations:t}=K(),e=z(t,"Enter PiP");return f` 640 <media-pip-button class="plyr__controls__item plyr__control" data-no-label data-plyr="pip"> 641 <slot name="pip-icon"></slot> 642 <slot name="enter-pip-icon" data-class="icon--pressed"></slot> 643 <slot name="exit-pip-icon" data-class="icon--not-pressed"></slot> 644 <span class="label--pressed plyr__tooltip">${z(t,"Exit PiP")}</span> 645 <span class="label--not-pressed plyr__tooltip">${e}</span> 646 </media-pip-button> 647 `}function Up(){const{translations:t}=K(),e=z(t,"Play");return f` 648 <media-play-button class="plyr__controls__item plyr__control" data-no-label data-plyr="play"> 649 <slot name="pause-icon" data-class="icon--pressed"></slot> 650 <slot name="play-icon" data-class="icon--not-pressed"></slot> 651 <span class="label--pressed plyr__tooltip">${z(t,"Pause")}</span> 652 <span class="label--not-pressed plyr__tooltip">${e}</span> 653 </media-play-button> 654 `}function Wp(){const{translations:t}=K(),{remote:e}=T(),i=z(t,"Restart");function s(n){ze(n)&&!ki(n)||e.seek(0,n)}return f` 655 <button 656 type="button" 657 class="plyr__control" 658 data-plyr="restart" 659 @pointerup=${s} 660 @keydown=${s} 661 > 662 <slot name="restart-icon"></slot> 663 <span class="plyr__tooltip">${i}</span> 664 </button> 665 `}function jp(){const{translations:t,seekTime:e}=K(),i=g(()=>`${Ds(t,"Rewind")} ${e()}s`);return f` 666 <media-seek-button 667 class="plyr__controls__item plyr__control" 668 seconds=${g(()=>-1*e())} 669 data-no-label 670 data-plyr="rewind" 671 > 672 <slot name="rewind-icon"></slot>
673 <span class="plyr__tooltip">${i}</span> 674 </media-seek-button> 675 `}function Kp(){const{translations:t,seekTime:e}=K(),i=g(()=>`${Ds(t,"Forward")} ${e()}s`);return f` 676 <media-seek-button 677 class="plyr__controls__item plyr__control" 678 seconds=${g(e)} 679 data-no-label 680 data-plyr="fast-forward" 681 > 682 <slot name="fast-forward-icon"></slot> 683 <span class="plyr__tooltip">${i}</span> 684 </media-seek-button> 685 `}function Zp(){let{duration:t,viewType:e}=T().$state,{translations:i,markers:s,thumbnails:n,seekTime:r,previewTime:a}=K(),o=z(i,"Seek"),l=C(null),h=g(()=>{const b=l();return b?f`<span class="plyr__progress__marker-label">${zo(b.label)}<br /></span>`:null});function c(b){a.set(b.detail)}function d(){l.set(this)}function p(){l.set(null)}function m(){const b=n(),A=g(()=>e()==="audio");return b?f` 686 <media-slider-preview class="plyr__slider__preview" ?no-clamp=${A}> 687 <media-slider-thumbnail .src=${b} class="plyr__slider__preview__thumbnail"> 688 <span class="plyr__slider__preview__time-container"> 689 ${h} 690 <media-slider-value class="plyr__slider__preview__time"></media-slider-value> 691 </span> 692 </media-slider-thumbnail> 693 </media-slider-preview> 694 `:f` 695 <span class="plyr__tooltip"> 696 ${h} 697 <media-slider-value></media-slider-value> 698 </span> 699 `}function v(){const b=t();return Number.isFinite(b)?s()?.map(A=>f` 700 <span 701 class="plyr__progress__marker" 702 @mouseenter=${d.bind(A)} 703 @mouseleave=${p} 704 style=${`left: ${A.time/b*100}%;`} 705 ></span> 706 `):null}return f` 707 <div class="plyr__controls__item plyr__progress__container"> 708 <div class="plyr__progress"> 709 <media-time-slider 710 class="plyr__slider" 711 data-plyr="seek" 712 pause-while-dragging 713 key-step=${g(r)} 714 aria-label=${o} 715 @media-seeking-request=${c} 716 > 717 <div class="plyr__slider__track"></div> 718 <div class="plyr__slider__thumb"></div> 719 <div class="plyr__slider__buffer"></div> 720 ${g(m)}${g(v)} 721 </media-time-slider> 722 </div> 723 </div> 724 `}function Qp(t){return g(()=>{const e=t==="mute"||t==="mute+volume",i=t==="volume"||t==="mute+volume";return f` 725 <div class="plyr__controls__item plyr__volume"> 726 ${[e?Bp():null,i?zp():null]} 727 </div> 728 `})}function zp(){const{translations:t}=K();return f` 729 <media-volume-slider class="plyr__slider" data-plyr="volume" aria-label=${z(t,"Volume")}> 730 <div class="plyr__slider__track"></div> 731 <div class="plyr__slider__thumb"></div> 732 </media-volume-slider> 733 `}function Yp(){const t=T(),{translations:e,invertTime:i,toggleTime:s,displayDuration:n}=K(),r=C(y(i));function a(l){!s()||n()||ze(l)&&!ki(l)||r.set(h=>!h)}function o(){return g(()=>n()?Sl():null)}return g(()=>{const{streamType:l}=t.$state,h=z(e,"LIVE"),c=z(e,"Current time"),d=g(()=>!n()&&r());return l()==="live"||l()==="ll-live"?f` 734 <media-live-button 735 class="plyr__controls__item plyr__control plyr__live-button" 736 data-plyr="live" 737 > 738 <span class="plyr__live-button__text">${h}</span> 739 </media-live-button> 740 `:f` 741 <media-time 742 type="current" 743 class="plyr__controls__item plyr__time plyr__time--current" 744 tabindex="0" 745 role="timer" 746 aria-label=${c} 747 ?remainder=${d} 748 @pointerup=${a} 749 @keydown=${a} 750 ></media-time> 751 ${o()} 752 `})}function Sl(){const{translations:t}=K();return f` 753 <media-time 754 type="duration" 755 class="plyr__controls__item plyr__time plyr__time--duration" 756 role="timer" 757 tabindex="0" 758 aria-label=${z(t,"Duration")} 759 ></media-time> 760 `}function Xp(){return g(()=>{const t=T(),{translations:e,download:i}=K(),{title:s,source:n}=t.$state,r=n(),a=i(),o=so({title:s(),src:r,download:a}),l=z(e,"Download");return w(o?.url)?f` 761 <a 762 class="plyr__controls__item plyr__control" 763 href=${Dn(o.url,{download:o.name})} 764 download=${o.name} 765 target="_blank" 766 > 767 <slot name="download-icon" />
768 <span class="plyr__tooltip">${l}</span> 769 </a> 770 `:null})}function Jp(){return g(()=>{const{clickToPlay:t,clickToFullscreen:e}=K();return[t()?f` 771 <media-gesture 772 class="plyr__gesture" 773 event="pointerup" 774 action="toggle:paused" 775 ></media-gesture> 776 `:null,e()?f` 777 <media-gesture 778 class="plyr__gesture" 779 event="dblpointerup" 780 action="toggle:fullscreen" 781 ></media-gesture> 782 `:null]})}function t1(){const t=T(),e=C(void 0),i=g(()=>zo(e()?.text));return u(()=>{const s=t.$state.textTrack();if(!s)return;function n(){e.set(s?.activeCues[0])}return n(),O(s,"cue-change",n)}),f` 783 <div class="plyr__captions" dir="auto"> 784 <span class="plyr__caption">${i}</span> 785 </div> 786 `}function e1(){const{translations:t}=K();return f` 787 <div class="plyr__controls__item plyr__menu"> 788 <media-menu> 789 <media-menu-button class="plyr__control" data-plyr="settings"> 790 <slot name="settings-icon" /> 791 <span class="plyr__tooltip">${z(t,"Settings")}</span> 792 </media-menu-button> 793 <media-menu-items class="plyr__menu__container" placement="top end"> 794 <div><div>${[s1(),o1(),c1(),r1()]}</div></div> 795 </media-menu-items> 796 </media-menu> 797 </div> 798 `}function Rs({label:t,children:e}){const i=C(!1);return f` 799 <media-menu @open=${()=>i.set(!0)} @close=${()=>i.set(!1)}> 800 ${i1({label:t,open:i})} 801 <media-menu-items>${e}</media-menu-items> 802 </media-menu> 803 `}function i1({open:t,label:e}){const{translations:i}=K(),s=g(()=>`plyr__control plyr__control--${t()?"back":"forward"}`);function n(){const r=z(i,"Go back to previous menu");return g(()=>t()?f`<span class="plyr__sr-only">${r}</span>`:null)}return f` 804 <media-menu-button class=${s} data-plyr="settings"> 805 <span class="plyr__menu__label" aria-hidden=${h1(t)}> 806 ${z(i,e)} 807 </span> 808 <span class="plyr__menu__value" data-part="hint"></span> 809 ${n()} 810 </media-menu-button> 811 `}function s1(){return Rs({label:"Audio",children:n1()})}function n1(){const{translations:t}=K();return f` 812 <media-audio-radio-group empty-label=${z(t,"Default")}> 813 <template> 814 <media-radio class="plyr__control" data-plyr="audio"> 815 <span data-part="label"></span> 816 </media-radio> 817 </template> 818 </media-audio-radio-group> 819 `}function r1(){return Rs({label:"Speed",children:a1()})}function a1(){const{translations:t,speed:e}=K();return f` 820 <media-speed-radio-group .rates=${e} normal-label=${z(t,"Normal")}> 821 <template> 822 <media-radio class="plyr__control" data-plyr="speed"> 823 <span data-part="label"></span> 824 </media-radio> 825 </template> 826 </media-speed-radio-group> 827 `}function o1(){return Rs({label:"Captions",children:l1()})}function l1(){const{translations:t}=K();return f` 828 <media-captions-radio-group off-label=${z(t,"Disabled")}> 829 <template> 830 <media-radio class="plyr__control" data-plyr="captions"> 831 <span data-part="label"></span> 832 </media-radio> 833 </template> 834 </media-captions-radio-group> 835 `}function c1(){return Rs({label:"Quality",children:u1()})}function u1(){const{translations:t}=K();return f` 836 <media-quality-radio-group auto-label=${z(t,"Auto")}> 837 <template> 838 <media-radio class="plyr__control" data-plyr="quality"> 839 <span data-part="label"></span> 840 </media-radio> 841 </template> 842 </media-quality-radio-group> 843 `}function h1(t){return g(()=>t()?"true":"false")}function z(t,e){return g(()=>Ds(t,e))}var d1=class extends S(Ms,Ap){static tagName="media-plyr-layout";#t;onSetup(){this.forwardKeepAlive=!1,this.#t=T()}onConnect(){this.#t.player.el?.setAttribute("data-layout","plyr"),E(()=>this.#t.player.el?.removeAttribute("data-layout")),Lp(this,this.#t),u(()=>{this.$props.customIcons()?new zn([this]).connect():new _p([this]).connect()})}render(){return g(this.#e.bind(this))}#e(){const{viewType:t}=this.#t.$state;return t()==="audio"?Ip():t()==="video"?Vp():null}};k(gp);k(Pp);k(d1);function xl(t,e){return[...t].sort(e?f1:p1)}function p1(t,e){return t.height===e.height?(t.bitrate??0)-(e.bitrate??0):t.height-e.height}function f1(t,e){return e.height===t.height?(e.bitrate??0)-(t.bitrate??0):e.height-t.height}var m1=class extends Dt{#t;constructor(t){super(),this.#t=t}onAttach(t){const{$props:e,ariaKeys:i}=T(),s=t.getAttribute("aria-keyshortcuts");if(s){i[this.#t]=s,E(()=>{delete i[this.#t]});return}const n=e.keyShortcuts()[this.#t];if(n){const r=Q(n)?n.join(" "):w(n)?n:n?.keys;t.setAttribute("aria-keyshortcuts",Q(r)?r.join(" "):r)}}};function an(t,e){const i=String(t),s=i.length;if(s<e){const n=e-s;return`${"0".repeat(n)}${t}`}return i}function Pl(t){return{hours:Math.trunc(t/3600),minutes:Math.trunc(t%3600/60),seconds:Math.trunc(t%60),fraction:Number((t-Math.trunc(t)).toPrecision(3))}}function Os(t,{padHrs:e=null,padMins:i=null,showHrs:s=!1,showMs:n=!1}={}){const{hours:r,minutes:a,seconds:o,fraction:l}=Pl(t),h=e?an(r,2):r,c=`${i||Ht(i)&&t>=3600?an(a,2):a}:${an(o,2)}${n&&l>0?`.${String(l).replace(/^0?\./,"")}`:""}`;return r>0||s?`${h}:${c}`:c}function fs(t){const e=[],{hours:i,minutes:s,seconds:n}=Pl(t);return i>0&&e.push(`${i} hour`),s>0&&e.push(`${s} min`),(n>0||e.length===0)&&e.push(`${n} sec`),e.join(" ")}var El=class extends Dt{#t;constructor(t){super(),this.#t=t,u(this.#e.bind(this))}onDestroy(){this.#n?.(),this.#n=null}#e(){const t=this.#t.trigger();if(!t){this.hide();return}const e=this.show.bind(this),i=this.hide.bind(this);this.#t.listen(t,e,i)}#i=-1;#s=-1;#n=null;show(t){this.#r(),window.cancelAnimationFrame(this.#s),this.#s=-1,this.#n?.(),this.#n=null,this.#i=window.setTimeout(()=>{this.#i=-1;const e=this.#t.content();e&&e.style.removeProperty("display"),y(()=>
843this.#t.onChange(!0,t))},this.#t.showDelay?.()??0)}hide(t){this.#r(),y(()=>this.#t.onChange(!1,t)),this.#s=requestAnimationFrame(()=>{this.#r(),this.#s=-1;const e=this.#t.content();if(e){const i=()=>{e.style.display="none",this.#n=null};if(uh(e)){this.#n?.();const s=O(e,"animationend",i,{once:!0});this.#n=s}else i()}})}#r(){window.clearTimeout(this.#i),this.#i=-1}},gt=class extends Dt{static props={disabled:!1};#t;constructor(t){super(),this.#t=t,new Ot,t.keyShortcut&&new m1(t.keyShortcut)}onSetup(){const{disabled:t}=this.$props;this.setAttributes({"data-pressed":this.#t.isPresssed,"aria-pressed":this.#e.bind(this),"aria-disabled":()=>t()?"true":null})}onAttach(t){G(t,"tabindex","0"),G(t,"role","button"),G(t,"type","button")}onConnect(t){const e=ue(t,this.#s.bind(this));for(const i of["click","touchstart"])e.add(i,this.#n.bind(this),{passive:!0})}#e(){return ts(this.#t.isPresssed())}#i(t){cc(this.#t.isPresssed)&&this.#t.isPresssed.set(e=>!e)}#s(t){if(this.$props.disabled()||this.el.hasAttribute("data-disabled")){t.preventDefault(),t.stopImmediatePropagation();return}t.preventDefault(),(this.#t.onPress??this.#i).call(this,t)}#n(t){this.$props.disabled()&&(t.preventDefault(),t.stopImmediatePropagation())}},g1=class extends x{static props=gt.props;#t;constructor(){super(),new gt({isPresssed:this.#i.bind(this),onPress:this.#e.bind(this)})}onSetup(){this.#t=T();const{canAirPlay:t,isAirPlayConnected:e}=this.#t.$state;this.setAttributes({"data-active":e,"data-supported":t,"data-state":this.#s.bind(this),"aria-hidden":at(()=>!t())})}onAttach(t){t.setAttribute("data-media-tooltip","airplay"),fe(t,this.#n.bind(this))}#e(t){this.#t.remote.requestAirPlay(t)}#i(){const{remotePlaybackType:t,remotePlaybackState:e}=this.#t.$state;return t()==="airplay"&&e()!=="disconnected"}#s(){const{remotePlaybackType:t,remotePlaybackState:e}=this.#t.$state;return t()==="airplay"&&e()}#n(){const{remotePlaybackState:t}=this.#t.$state;return`AirPlay ${t()}`}},y1=class extends x{static props=gt.props;#t;constructor(){super(),new gt({isPresssed:this.#i.bind(this),keyShortcut:"togglePaused",onPress:this.#e.bind(this)})}onSetup(){this.#t=T();const{paused:t,ended:e}=this.#t.$state;this.setAttributes({"data-paused":t,"data-ended":e})}onAttach(t){t.setAttribute("data-media-tooltip","play"),fe(t,"Play")}#e(t){const e=this.#t.remote;this.#i()?e.pause(t):e.play(t)}#i(){const{paused:t}=this.#t.$state;return!t()}},v1=class extends x{static props=gt.props;#t;constructor(){super(),new gt({isPresssed:this.#i.bind(this),keyShortcut:"toggleCaptions",onPress:this.#e.bind(this)})}onSetup(){this.#t=T(),this.setAttributes({"data-active":this.#i.bind(this),"data-supported":()=>!this.#s(),"aria-hidden":at(this.#s.bind(this))})}onAttach(t){t.setAttribute("data-media-tooltip","caption"),fe(t,"Captions")}#e(t){this.#t.remote.toggleCaptions(t)}#i(){const{textTrack:t}=this.#t.$state,e=t();return!!e&&ht(e)}#s(){const{hasCaptions:t}=this.#t.$state;return!t()}},b1=class extends x{static props={...gt.props,target:"prefer-media"};#t;constructor(){super(),new gt({isPresssed:this.#i.bind(this),keyShortcut:"toggleFullscreen",onPress:this.#e.bind(this)})}onSetup(){this.#t=T();const{fullscreen:t}=this.#t.$state,e=this.#s.bind(this);this.setAttributes({"data-active":t,"data-supported":e,"aria-hidden":at(()=>!e())})}onAttach(t){t.setAttribute("data-media-tooltip","fullscreen"),fe(t,"Fullscreen")}#e(t){const e=this.#t.remote,i=this.$props.target();this.#i()?e.exitFullscreen(i,t):e.enterFullscreen(i,t)}#i(){const{fullscreen:t}=this.#t.$state;return t()}#s(){const{canFullscreen:t}=this.#t.$state;return t()}},C1=class extends x{static props=gt.props;#t;constructor(){super(),new gt({isPresssed:this.#i.bind(this),keyShortcut:"toggleMuted",onPress:this.#e.bind(this)})}onSetup(){this.#t=T(),this.setAttributes({"data-muted":this.#i.bind(this),"data-state":this.#s.bind(this)})}onAttach(t){t.setAttribute("data-media-mute-button",""),t.setAttribute("data-media-tooltip","mute"),fe(t,"Mute")}#e(t){const e=this.#t.remote;this.#i()?e.unmute(t):e.mute(t)}#i(){const{muted:t,volume:e}=this.#t.$state;return t()||e()===0}#s(){const{muted:t,volume:e}=this.#t.$state,i=e();if(t()||i===0)return"muted";if(i>=.5)return"high";if(i<.5)return"low"}},$1=class extends x{static props=gt.props;#t;
843constructor(){super(),new gt({isPresssed:this.#i.bind(this),keyShortcut:"togglePictureInPicture",onPress:this.#e.bind(this)})}onSetup(){this.#t=T();const{pictureInPicture:t}=this.#t.$state,e=this.#s.bind(this);this.setAttributes({"data-active":t,"data-supported":e,"aria-hidden":at(()=>!e())})}onAttach(t){t.setAttribute("data-media-tooltip","pip"),fe(t,"PiP")}#e(t){const e=this.#t.remote;this.#i()?e.exitPictureInPicture(t):e.enterPictureInPicture(t)}#i(){const{pictureInPicture:t}=this.#t.$state;return t()}#s(){const{canPictureInPicture:t}=this.#t.$state;return t()}},w1=class extends x{static props={disabled:!1,seconds:30};#t;constructor(){super(),new Ot}onSetup(){this.#t=T();const{seeking:t}=this.#t.$state,{seconds:e}=this.$props,i=this.#e.bind(this);this.setAttributes({seconds:e,"data-seeking":t,"data-supported":i,"aria-hidden":at(()=>!i())})}onAttach(t){G(t,"tabindex","0"),G(t,"role","button"),G(t,"type","button"),t.setAttribute("data-media-tooltip","seek"),fe(t,this.#i.bind(this))}onConnect(t){ue(t,this.#s.bind(this))}#e(){const{canSeek:t}=this.#t.$state;return t()}#i(){const{seconds:t}=this.$props;return`Seek ${t()>0?"forward":"backward"} ${t()} seconds`}#s(t){const{seconds:e,disabled:i}=this.$props;if(i())return;const{currentTime:s}=this.#t.$state,n=s()+e();this.#t.remote.seek(n,t)}},T1=class extends x{static props={disabled:!1};#t;constructor(){super(),new Ot}onSetup(){this.#t=T();const{disabled:t}=this.$props,{live:e,liveEdge:i}=this.#t.$state,s=()=>!e();this.setAttributes({"data-edge":i,"data-hidden":s,"aria-disabled":at(()=>t()||i()),"aria-hidden":at(s)})}onAttach(t){G(t,"tabindex","0"),G(t,"role","button"),G(t,"type","button"),t.setAttribute("data-media-tooltip","live")}onConnect(t){ue(t,this.#e.bind(this))}#e(t){const{disabled:e}=this.$props,{liveEdge:i}=this.#t.$state;e()||i()||this.#t.remote.seekToLiveEdge(t)}},Re=new de({min:0,max:100,value:0,step:1,pointerValue:0,focused:!1,dragging:!1,pointing:!1,hidden:!1,get active(){return this.dragging||this.focused||this.pointing},get fillRate(){return $a(this.min,this.max,this.value)},get fillPercent(){return this.fillRate*100},get pointerRate(){return $a(this.min,this.max,this.pointerValue)},get pointerPercent(){return this.pointerRate*100}});function $a(t,e,i){const s=e-t,n=i-t;return s>0?n/s:0}var Al=class extends Dt{#t;#e;constructor(t){super(),this.#t=t}onConnect(t){this.#e=new IntersectionObserver(e=>{this.#t.callback?.(e,this.#e)},this.#t),this.#e.observe(t),E(this.#i.bind(this))}#i(){this.#e?.disconnect(),this.#e=void 0}},dr=Ut(),mi=Ut();function k1(t,e,i,s){return On(t,nt(i,fn(s)),e)}function S1(t,e,i,s){const n=On(0,i,1),r=(e-t)*n/s;return t+s*Math.round(r)}var on={Left:-1,ArrowLeft:-1,Up:1,ArrowUp:1,Right:1,ArrowRight:1,Down:-1,ArrowDown:-1},x1=class extends Dt{#t;#e;#i;constructor(t,e){super(),this.#t=t,this.#e=e}onSetup(){Et(mi)&&(this.#i=W(mi))}onConnect(t){u(this.#c.bind(this,t)),u(this.#d.bind(this,t)),this.#t.swipeGesture&&u(this.#s.bind(this))}#s(){const{pointer:t}=this.#e.$state;if(t()!=="coarse"||!this.#t.swipeGesture()){this.#n=null,this.#l();return}if(this.#n=this.#e.player.el?.querySelector("media-provider,[data-media-provider]"),!this.#n){this.#l();return}new B(this.#n).add("touchstart",this.#o.bind(this),{passive:!0}).add("touchmove",this.#u.bind(this),{passive:!1})}#n=null;#r=null;#a=null;#l(){this.#r=null,this.#a=null}#o(t){this.#r=t.touches[0]}#u(t){if(Ht(this.#r)||os(t))return;const e=t.touches[0],i=e.clientX-this.#r.clientX,s=e.clientY-this.#r.clientY,n=this.$state.dragging();!n&&Math.abs(s)>5||n||(t.preventDefault(),Math.abs(i)>20&&(this.#r=e,this.#a=this.$state.value(),this.#v(this.#a,t)))}#c(t){const{hidden:e}=this.$props;O(t,"focus",this.#h.bind(this)),!(e()||this.#t.isDisabled())&&new B(t).add("keyup",this.#P.bind(this)).add("keydown",this.#S.bind(this)).add("pointerenter",this.#g.bind(this)).add("pointermove",this.#C.bind(this)).add("pointerleave",this.#f.bind(this)).add("pointerdown",this.#$.bind(this))}#d(t){this.#t.isDisabled()||!this.$state.dragging()||new B(document).add("pointerup",this.#I.bind(this),{capture:!0}).add("pointermove",this.#L.bind(this)).add("touchmove",this.#M.bind(this),{passive:!1})}#h(){this.#m(this.$state.value())}#p(t,e){const{value:i,min:s,max:n,dragging:r}=this.$state,a=Math.max(s(),Math.min(t,n()));i.set(a);const o=this.createEvent("value-change",{detail:a,trigger:e});
843if(this.dispatch(o),this.#t.onValueChange?.(o),r()){const l=this.createEvent("drag-value-change",{detail:a,trigger:e});this.dispatch(l),this.#t.onDragValueChange?.(l)}}#m(t,e){const{pointerValue:i,dragging:s}=this.$state;i.set(t),this.dispatch("pointer-value-change",{detail:t,trigger:e}),s()&&this.#p(t,e)}#y(t){let e,i=this.el.getBoundingClientRect(),{min:s,max:n}=this.$state;if(this.$props.orientation()==="vertical"){const{bottom:r,height:a}=i;e=(r-t.clientY)/a}else if(this.#r&&it(this.#a)&&this.#n){const{width:r}=this.#n.getBoundingClientRect(),a=(t.clientX-this.#r.clientX)/r,o=n()-s(),l=o*Math.abs(a);e=(a<0?this.#a-l:this.#a+l)/o}else{this.#r&&it(this.#a)&&this.#l();const{left:r,width:a}=i;e=(t.clientX-r)/a}return Math.max(s(),Math.min(n(),this.#t.roundValue(S1(s(),n(),e,this.#t.getStep()))))}#g(t){this.$state.pointing.set(!0)}#C(t){const{dragging:e}=this.$state;e()||this.#m(this.#y(t),t)}#f(t){this.$state.pointing.set(!1)}#$(t){if(t.button!==0)return;const e=this.#y(t);this.#v(e,t),this.#m(e,t)}#v(t,e){const{dragging:i}=this.$state;if(i())return;i.set(!0),this.#e.remote.pauseControls(e);const s=this.createEvent("drag-start",{detail:t,trigger:e});this.dispatch(s),this.#t.onDragStart?.(s),this.#i?.onDragStart?.()}#k(t,e){const{dragging:i}=this.$state;if(!i())return;i.set(!1),this.#e.remote.resumeControls(e);const s=this.createEvent("drag-end",{detail:t,trigger:e});this.dispatch(s),this.#t.onDragEnd?.(s),this.#l(),this.#i?.onDragEnd?.()}#b;#w=!1;#S(t){if(!Object.keys(on).includes(t.key))return;const{key:e}=t,i=this.#x(t);if(!Ht(i)){this.#m(i,t),this.#p(i,t);return}const s=this.#A(t);this.#w||(this.#w=e===this.#b,!this.$state.dragging()&&this.#w&&this.#v(s,t)),this.#m(s,t),this.#b=e}#P(t){if(!Object.keys(on).includes(t.key)||!Ht(this.#x(t)))return;const e=this.#w?this.$state.pointerValue():this.#A(t);this.#p(e,t),this.#k(e,t),this.#b="",this.#w=!1}#x(t){let e=t.key,{min:i,max:s}=this.$state;return e==="Home"||e==="PageUp"?i():e==="End"||e==="PageDown"?s():!t.metaKey&&/^[0-9]$/.test(e)?(s()-i())/10*Number(e):null}#A(t){const{key:e,shiftKey:i}=t;t.preventDefault(),t.stopPropagation();const{shiftKeyMultiplier:s}=this.$props,{min:n,max:r,value:a,pointerValue:o}=this.$state,l=this.#t.getStep(),h=this.#t.getKeyStep(),c=(i?h*s():h)*Number(on[e]),d=((this.#w?o():this.#t.getValue?.()??a())+c)/l;return Math.max(n(),Math.min(r(),Number((l*d).toFixed(3))))}#I(t){if(t.button!==0)return;t.preventDefault(),t.stopImmediatePropagation();const e=this.#y(t);this.#m(e,t),this.#k(e,t)}#M(t){t.preventDefault()}#L=Ve(t=>{this.#m(this.#y(t),t)},20,{leading:!0})},Ze=Ut(()=>({})),Vt=class extends Dt{static props={hidden:!1,disabled:!1,step:1,keyStep:1,orientation:"horizontal",shiftKeyMultiplier:5};#t;#e;#i=C(!0);#s=C(!0);constructor(t){super(),this.#e=t}onSetup(){this.#t=T();const t=new Ot;t.attach(this),this.$state.focused=t.focused.bind(t),Et(Ze)||mt(Ze,{default:"value"}),mt(dr,{orientation:this.$props.orientation,disabled:this.#e.isDisabled,preview:C(null)}),u(this.#a.bind(this)),u(this.#l.bind(this)),u(this.#o.bind(this)),this.#c(),new x1(this.#e,this.#t).attach(this),new Al({callback:this.#n.bind(this)}).attach(this)}onAttach(t){G(t,"role","slider"),G(t,"tabindex","0"),G(t,"autocomplete","off"),u(this.#d.bind(this))}onConnect(t){E(yo(t,this.#i.set)),u(this.#r.bind(this))}#n(t){this.#s.set(t[0].isIntersecting)}#r(){const{hidden:t}=this.$props;this.$state.hidden.set(t()||!this.#i()||!this.#s())}#a(){const{dragging:t,value:e,min:i,max:s}=this.$state;y(t)||e.set(k1(i(),s(),e(),this.#e.getStep()))}#l(){this.$state.step.set(this.#e.getStep())}#o(){if(!this.#e.isDisabled())return;const{dragging:t,pointing:e}=this.$state;t.set(!1),e.set(!1)}#u(){return ts(this.#e.isDisabled())}#c(){const{orientation:t}=this.$props,{dragging:e,active:i,pointing:s}=this.$state;this.setAttributes({"data-dragging":e,"data-pointing":s,"data-active":i,"aria-disabled":this.#u.bind(this),"aria-valuemin":this.#e.aria.valueMin??this.$state.min,"aria-valuemax":this.#e.aria.valueMax??this.$state.max,"aria-valuenow":this.#e.aria.valueNow,"aria-valuetext":this.#e.aria.valueText,"aria-orientation":t})}#d(){const{fillPercent:t,pointerPercent:e}=this.$state;this.#h(nt(t(),3),nt(e(),3))}#h=Jt((t,e)=>{this.el?.style.setProperty("--slider-fill",t+"%"),this.el?.style.setProperty("--slider-pointer",e+"%")})},Ai=class extends x{static props={...Vt.props,min:0,max:100,value:0};static state=Re;constructor(){super(),new Vt({getStep:this.$props.step,getKeyStep:this.$props.keyStep,roundValue:Math.round,isDisabled:this.$props.disabled,aria:{valueNow:this.#t.b
843ind(this),valueText:this.#e.bind(this)}})}onSetup(){u(this.#i.bind(this)),u(this.#s.bind(this))}#t(){const{value:t}=this.$state;return Math.round(t())}#e(){const{value:t,max:e}=this.$state;return nt(t()/e()*100,2)+"%"}#i(){const{value:t}=this.$props;this.$state.value.set(t())}#s(){const{min:t,max:e}=this.$props;this.$state.min.set(t()),this.$state.max.set(e())}},jt=new Map,Ui=new Map,P1=class Ll{#t;#e;#i;$images=C([]);static create(e,i){return new Ll(e,i,T())}constructor(e,i,s){this.#e=e,this.#i=i,this.#t=s,u(this.#s.bind(this))}#s(){const{canLoad:e}=this.#t.$state;if(!e())return;const i=this.#e();if(i){if(w(i)&&jt.has(i)){const s=jt.get(i);if(jt.delete(i),jt.set(i,s),jt.size>99){const n=jt.keys().next().value;jt.delete(n)}this.$images.set(jt.get(i))}else if(w(i)){const s=this.#i(),n=i+"::"+s;if(!Ui.has(n)){const r=new Promise(async(a,o)=>{try{const l=await fetch(i,{credentials:di(s)});if(l.headers.get("content-type")==="application/json"){const h=await l.json();if(Q(h))if(h[0]&&"text"in h[0])a(this.#a(h));else{for(let c=0;c<h.length;c++){const d=h[c];Wt(qa(d),!1),Wt("url"in d&&w(d.url),!1),Wt("startTime"in d&&it(d.startTime),!1)}a(h)}else a(this.#r(h));return}ut(async()=>{const{parseResponse:h}=await import("./B2WH9h9e.js");return{parseResponse:h}},__vite__mapDeps([0,1]),import.meta.url).then(async({parseResponse:h})=>{try{const{cues:c}=await h(l);a(this.#a(c))}catch(c){o(c)}})}catch(l){o(l)}}).then(a=>(jt.set(n,a),a)).catch(a=>{this.#c(i,a)}).finally(()=>{w(n)&&Ui.delete(n)});Ui.set(n,r)}Ui.get(n)?.then(r=>{this.$images.set(r||[])})}else if(Q(i))try{this.$images.set(this.#n(i))}catch(s){this.#c(i,s)}else try{this.$images.set(this.#r(i))}catch(s){this.#c(i,s)}return()=>{this.$images.set([])}}}#n(e){const i=this.#l();return e.map((s,n)=>(Wt(s.url&&w(s.url),!1),Wt("startTime"in s&&it(s.startTime),!1),{...s,url:w(s.url)?this.#o(s.url,i):s.url}))}#r(e){Wt(w(e.url),!1),Wt(Q(e.tiles)&&e.tiles?.length,!1);const i=new URL(e.url),s=[],n="tile_width"in e?e.tile_width:e.tileWidth,r="tile_height"in e?e.tile_height:e.tileHeight;for(const a of e.tiles)s.push({url:i,startTime:"start"in a?a.start:a.startTime,width:n,height:r,coords:{x:a.x,y:a.y}});return s}#a(e){for(let n=0;n<e.length;n++){const r=e[n];Wt("startTime"in r&&it(r.startTime),!1),Wt("text"in r&&w(r.text),!1)}const i=[],s=this.#l();for(const n of e){const[r,a]=n.text.split("#"),o=this.#u(a);i.push({url:this.#o(r,s),startTime:n.startTime,endTime:n.endTime,width:o?.w,height:o?.h,coords:o&&it(o.x)&&it(o.y)?{x:o.x,y:o.y}:void 0})}return i}#l(){let e=y(this.#e);return!w(e)||!/^https?:/.test(e)?location.href:e}#o(e,i){return/^https?:/.test(e)?new URL(e):new URL(e,i)}#u(e){if(!e)return{};const[i,s]=e.split("="),n=s?.split(","),r={};if(!i||!n)return null;for(let a=0;a<i.length;a++){const o=+n[a];isNaN(o)||(r[i[a]]=o)}return r}#c(e,i){}},E1=2,A1=32,oe=new Map,L1=class extends x{static props={src:null,time:0,crossOrigin:null};static state=new de({src:"",img:null,thumbnails:[],activeThumbnail:null,crossOrigin:null,loading:!1,error:null,hidden:!1});media;#t;#e=[];onSetup(){this.media=T(),this.#t=P1.create(this.$props.src,this.$state.crossOrigin),this.#s(),this.setAttributes({"data-loading":this.#l.bind(this),"data-error":this.#o.bind(this),"data-hidden":this.$state.hidden,"aria-hidden":at(this.$state.hidden)})}onConnect(t){u(this.#i.bind(this)),u(this.#u.bind(this)),u(this.#s.bind(this)),u(this.#n.bind(this)),u(this.#c.bind(this)),u(this.#d.bind(this)),u(this.#h.bind(this))}#i(){const t=this.$state.img();t&&new B(t).add("load",this.#r.bind(this)).add("error",this.#a.bind(this))}#s(){const{crossOrigin:t}=this.$props,{crossOrigin:e}=this.$state,{crossOrigin:i}=this.media.$state,s=t()!==null?t():i();e.set(s===!0?"anonymous":s)}#n(){const{src:t,loading:e,error:i}=this.$state;return t()&&(e.set(!0),i.set(null)),()=>{this.#m(),e.set(!1),i.set(null)}}#r(){const{loading:t,error:e}=this.$state;this.#h(),t.set(!1),e.set(null)}#a(t){const{loading:e,error:i}=this.$state;e.set(!1),i.set(t)}#l(){const{loading:t,hidden:e}=this.$state;return!e()&&t()}#o(){const{error:t}=this.$state;return!Ht(t())}#u(){const{hidden:t}=this.$state,{duration:e}=this.media.$state,i=this.#t.$images();t.set(this.#o()||!Number.isFinite(e())||i.length===0)}getTime(){return this.$props.time()}#c(){let t=this.#t.$images();if(!t.length)return;
843let e=this.getTime(),{src:i,activeThumbnail:s}=this.$state,n=-1,r=null;for(let a=t.length-1;a>=0;a--){const o=t[a];if(e>=o.startTime&&(!o.endTime||e<o.endTime)){n=a;break}}t[n]&&(r=t[n]),i.set(r?.url.href||""),s.set(r)}#d(){const t=this.#t.$images(),e=this.$state.activeThumbnail();if(!e)return;const i=t.indexOf(e);if(i<0)return;const s=e.url.href,n=this.$state.crossOrigin(),r=i+1,a=Math.min(r+E1,t.length);for(let o=r;o<a;o++){const l=t[o].url.href;l!==s&&M1(l,n)}}#h(){if(!this.scope||this.$state.hidden())return;const t=this.el,e=this.$state.img(),i=this.$state.activeThumbnail();if(!e||!i||!t)return;let s=i.width??e.naturalWidth,n=i?.height??e.naturalHeight,{maxWidth:r,maxHeight:a,minWidth:o,minHeight:l,width:h,height:c}=getComputedStyle(this.el);o==="100%"&&(o=parseFloat(h)+""),l==="100%"&&(l=parseFloat(c)+"");let d=Math.max(parseInt(o)/s,parseInt(l)/n),p=Math.min(Math.max(parseInt(o),parseInt(r))/s,Math.max(parseInt(l),parseInt(a))/n),m=!isNaN(p)&&p<1?p:d>1?d:1;this.#p(t,"--thumbnail-width",`${s*m}px`),this.#p(t,"--thumbnail-height",`${n*m}px`),this.#p(t,"--thumbnail-aspect-ratio",String(nt(s/n,5))),this.#p(e,"width",`${e.naturalWidth*m}px`),this.#p(e,"height",`${e.naturalHeight*m}px`),this.#p(e,"transform",i.coords?`translate(-${i.coords.x*m}px, -${i.coords.y*m}px)`:""),this.#p(e,"max-width","none")}#p(t,e,i){t.style.setProperty(e,i),this.#e.push(()=>t.style.removeProperty(e))}#m(){for(const t of this.#e)t();this.#e=[]}};function M1(t,e){const i=`${t}::${e}`;if(oe.has(i)){const n=oe.get(i);oe.delete(i),oe.set(i,n);return}const s=new Image;if(s.decoding="async",s.crossOrigin=e,s.src=t,oe.set(i,s),oe.size>A1){const n=oe.keys().next().value;oe.delete(n)}}var Ml=class extends x{static props={type:"pointer",format:null,showHours:!1,showMs:!1,padHours:null,padMinutes:null,decimalPlaces:2};#t;#e;#i;onSetup(){this.#i=Ye(Ai.state),this.#t=W(Ze),this.#e=F(this.getValueText.bind(this))}getValueText(){const{type:t,format:e,decimalPlaces:i,padHours:s,padMinutes:n,showHours:r,showMs:a}=this.$props,{value:o,pointerValue:l,min:h,max:c}=this.#i,d=e?.()??this.#t.default,p=t()==="current"?o():l();if(d==="percent"){const m=p/(c()-h())*100;return(this.#t.percent??nt)(m,i())+"%"}else return d==="time"?(this.#t.time??Os)(p,{padHrs:s(),padMins:n(),showHrs:r(),showMs:a()}):(this.#t.value?.(p)??p.toFixed(2))+""}},_1=Ml.prototype;X(_1,"getValueText");var I1=class extends x{static props={offset:0,noClamp:!1};#t;onSetup(){this.#t=W(dr);const{active:t}=Ye(Ai.state);this.setAttributes({"data-visible":t})}onAttach(t){Object.assign(t.style,{position:"absolute",top:0,left:0,width:"max-content"})}onConnect(t){const{preview:e}=this.#t;e.set(t),E(()=>e.set(null)),u(this.#e.bind(this));const i=new ResizeObserver(this.#e.bind(this));i.observe(t),E(()=>i.disconnect())}#e=Jt(()=>{const{disabled:t,orientation:e}=this.#t;if(t())return;const i=this.el,{offset:s,noClamp:n}=this.$props;i&&V1(i,{clamp:!n(),offset:s(),orientation:e()})})};function V1(t,{clamp:e,offset:i,orientation:s}){const n=getComputedStyle(t),r=parseFloat(n.width),a=parseFloat(n.height),o={top:null,right:null,bottom:null,left:null};if(o[s==="horizontal"?"bottom":"left"]=`calc(100% + var(--media-slider-preview-offset, ${i}px))`,s==="horizontal"){const l=r/2;e?o.left=`min(${`max(0px, calc(var(--slider-pointer) - ${l}px))`}, ${`calc(100% - ${r}px)`})`:o.left=`calc(var(--slider-pointer) - ${l}px)`}else{const l=a/2;e?o.bottom=`min(${`max(${l}px, calc(var(--slider-pointer) - ${l}px))`}, ${`calc(100% - ${a}px)`})`:o.bottom=`calc(var(--slider-pointer) - ${l}px)`}Object.assign(t.style,o)}var D1=class extends x{static props={...Vt.props,keyStep:5,shiftKeyMultiplier:2};static state=Re;#t;onSetup(){this.#t=T();const{audioGain:t}=this.#t.$state;mt(Ze,{default:"percent",value(e){return(e*(t()??1)).toFixed(2)},percent(e){return Math.round(e*(t()??1))}}),new Vt({getStep:this.$props.step,getKeyStep:this.$props.keyStep,roundValue:Math.round,isDisabled:this.#n.bind(this),aria:{valueMax:this.#s.bind(this),valueNow:this.#e.bind(this),valueText:this.#i.bind(this)},onDragValueChange:this.#u.bind(this),onValueChange:this.#o.bind(this)}).attach(this),u(this.#r.bind(this))}onAttach(t){t.setAttribute("data-media-volume-slider",""),G(t,"aria-label","Volume");const{canSetVolume:e}=this.#t.$state;this.setAttributes({"data-supported":e,"aria-hidden":at(()=>!e())})}#e(){const{value:t}=this.$state,{audioGain:e}=this.#t.$state;return Math.round(t()*(e()??1))}#i(){const{value:t,max:e}=this.$state,{audioGain:i}=this.#t.$state;return nt(t()/e()*(i()??1)*100,2)+"%"}#s(){const{audioGain:t}=this.#t.$state;return this.$state.max()*(t()??1)}#n(){const{disabled:t}=this.$props,{canSetVolume:e}=this.#t.$state;return t()||!e()}#r(){const{muted:t,volume:e}=this.#t.$state,i=t()?0:e()*100;this.$state.value.set(i),this.dispatch("value-change",{detail:i})}#a=Ve(this.#l.bind(this),25);#l(t){if(!t.trigger)return;const e=nt(t.detail/100,3);this.#t.remote.changeVolume(e,t)}#o(t){this.#a(t)}#u(t){this.#a(t)}},_l=class extends x{static props={...Vt.props,step:.1,keyStep:5,shiftKeyMultiplier:2,pauseWhileDragging:!1,noSwipeGesture:!1,seekingRequestThrottle:100};static state=Re;#t;#e;#i=C(null);constructor(){super();const{noSwipeGesture:t}=this.$props;new Vt({swipeGesture:()=>!t(),getValue:this.#y.bind(this),getStep:this.#g.bind(this),getKeyStep:this.#C.bind(this),roundValue:this.#f,isDisabled:this.#$.b
843ind(this),aria:{valueNow:this.#v.bind(this),valueText:this.#k.bind(this)},onDragStart:this.#d.bind(this),onDragValueChange:this.#h.bind(this),onDragEnd:this.#p.bind(this),onValueChange:this.#m.bind(this)})}onSetup(){this.#t=T(),mt(Ze,{default:"time",value:this.#S.bind(this),time:this.#P.bind(this)}),this.setAttributes({"data-chapters":this.#n.bind(this)}),this.setStyles({"--slider-progress":this.#s.bind(this)}),u(this.#a.bind(this)),u(this.#r.bind(this))}onAttach(t){t.setAttribute("data-media-time-slider",""),G(t,"aria-label","Seek")}onConnect(t){u(this.#l.bind(this)),Je(this.#t.textTracks,"chapters",this.#i.set)}#s(){const{bufferedEnd:t,duration:e}=this.#t.$state;return nt(Math.min(t()/Math.max(e(),1),1)*100,3)+"%"}#n(){const{duration:t}=this.#t.$state;return this.#i()?.cues.length&&Number.isFinite(t())&&t()>0}#r(){this.#e=Ve(this.#o.bind(this),this.$props.seekingRequestThrottle())}#a(){if(this.$state.hidden())return;const{value:t,dragging:e}=this.$state,i=this.#y();y(e)||(t.set(i),this.dispatch("value-change",{detail:i}))}#l(){const t=this.#t.player.el,{preview:e}=W(dr);t&&e()&&$(t,"data-preview",this.$state.active())}#o(t,e){this.#t.remote.seeking(t,e)}#u(t,e,i){this.#e.cancel();const{live:s}=this.#t.$state;if(s()&&e>=99){this.#t.remote.seekToLiveEdge(i);return}this.#t.remote.seek(t,i)}#c=!1;#d(t){const{pauseWhileDragging:e}=this.$props;if(e()){const{paused:i}=this.#t.$state;this.#c=!i(),this.#t.remote.pause(t)}}#h(t){this.#e(this.#b(t.detail),t)}#p(t){const{seeking:e}=this.#t.$state;y(e)||this.#o(this.#b(t.detail),t);const i=t.detail;this.#u(this.#b(i),i,t);const{pauseWhileDragging:s}=this.$props;s()&&this.#c&&(this.#t.remote.play(t),this.#c=!1)}#m(t){const{dragging:e}=this.$state;e()||!t.trigger||this.#p(t)}#y(){const{currentTime:t}=this.#t.$state;return this.#w(t())}#g(){const t=this.$props.step()/this.#t.$state.duration()*100;return Number.isFinite(t)?t:1}#C(){const t=this.$props.keyStep()/this.#t.$state.duration()*100;return Number.isFinite(t)?t:1}#f(t){return nt(t,3)}#$(){const{disabled:t}=this.$props,{canSeek:e}=this.#t.$state;return t()||!e()}#v(){const{value:t}=this.$state;return Math.round(t())}#k(){const t=this.#b(this.$state.value()),{duration:e}=this.#t.$state;return Number.isFinite(t)?`${fs(t)} out of ${fs(e())}`:"live"}#b(t){const{duration:e}=this.#t.$state;return nt(t/100*e(),5)}#w(t){const{liveEdge:e,duration:i}=this.#t.$state,s=Math.max(0,Math.min(1,e()?1:Math.min(t,i())/i()));return Number.isNaN(s)?0:Number.isFinite(s)?s*100:100}#S(t){const e=this.#b(t),{live:i,duration:s}=this.#t.$state;return Number.isFinite(e)?(i()?e-s():e).toFixed(0):"LIVE"}#P(t,e){const i=this.#b(t),{live:s,duration:n}=this.#t.$state,r=s()?i-n():i;return Number.isFinite(i)?`${r<0?"-":""}${Os(Math.abs(r),e)}`:"LIVE"}},rt=Ut();function R1(t,e){const i=Ec(t,e);for(const{el:s,top:n,left:r}of i)s.scroll({top:n,left:r,behavior:e.behavior})}function O1(t,e={}){R1(t,{scrollMode:"if-needed",block:"center",inline:"center",...e})}var q1=["a[href]","[tabindex]","input","select","button"].map(t=>`${t}:not([aria-hidden='true'])`).join(","),N1=new Set(["Escape","Tab","ArrowUp","ArrowDown","Home","PageUp","End","PageDown","Enter"," "]),H1=class{#t=-1;#e=null;#i=[];#s;get items(){return this.#i}constructor(t){this.#s=t}attachMenu(t){O(t,"focus",this.#a.bind(this)),this.#e=t,E(()=>{this.#e=null})}listen(){this.#e&&(this.update(),new B(this.#e).add("keyup",this.#o.bind(this)).add("keydown",this.#u.bind(this)),E(()=>{this.#t=-1,this.#i=[]}))}update(){this.#t=0,this.#i=this.#d()}scroll(t=this.#r()){const e=this.#i[t];e&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{O1(e,{behavior:"smooth",boundary:i=>!i.hasAttribute("data-root")})})})}focusActive(t=!0){const e=this.#r();this.#n(e>=0?e:0,t)}#n(t,e=!0){this.#t=t,this.#i[t]?(this.#i[t].focus({preventScroll:!0}),e&&this.scroll(t)):this.#e?.focus({preventScroll:!0})}#r(){return this.#i.findIndex(t=>document.activeElement===t||t.getAttribute("role")==="menuitemradio"&&t.getAttribute("aria-checked")==="true")}#a(){this.#t>=0||(this.update(),this.focusActive())}#l(t){const e=t.target;if(mc(t)&&e instanceof Element){const i=e.getAttribute("role");return!/a|input|select|button/.test(e.localName)&&!i}return N1.has(t.key)}#o(t){this.#l(t)&&(t.stopPropagation(),t.preventDefault())}#u(t){if(this.#l(t))switch(t.stopPropagation(),t.preventDefault(),t.key){case"Escape":this.#s.closeMenu(t);break;case"Tab":this.#n(this.#c(t.shiftKey?-1:1));break;case"ArrowUp":this.#n(this.#c(-1));break;case"ArrowDown":this.#n(this.#c(1));break;case"Home":case"PageUp":this.#n(0);break;case"End":case"PageDown":this.#n(this.#i.length-1);break}}#c(t){let e=this.#t;do e=(e+t+this.#i.length)%this.#i.length;while(this.#i[e]?.offsetParent===null);return e}#d(){if(!this.#e)return[];const t=this.#e.querySelectorAll(q1),e=[],i=s=>s.getAttribute("role")==="menu";for(const s of t)he(s)&&s.offsetParent!==null&&vo(this.#e,s,i)&&e.push(s);return e}};function ge(t,e,i,s){var n=arguments.length,r=n<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,i):s,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,i,s);else for(var o=t.length-1;o>=0;
843o--)(a=t[o])&&(r=(n<3?a(r):n>3?a(e,i,r):a(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r}var F1=0,ei=class extends x{static props={showDelay:0};#t;#e;#i;#s=C(!1);#n=C(!1);#r=C(null);#a=C(null);#l;#o=new Set;#u=null;#c;#d;#h=!1;#p=C(!1);#m=new Set;get triggerElement(){return this.#r()}get contentElement(){return this.#a()}get isSubmenu(){return!!this.#l}constructor(){super();const{showDelay:t}=this.$props;this.#c=new El({trigger:this.#r,content:this.#a,showDelay:t,listen:(e,i,s)=>{ue(e,r=>{this.#s()?s(r):i(r)});const n=this.#L();n&&ue(n,r=>{r.stopPropagation(),s(r)})},onChange:this.#w.bind(this)})}onSetup(){this.#t=T();const t=++F1;this.#e=`media-menu-${t}`,this.#i=`media-menu-button-${t}`,this.#d=new H1({closeMenu:this.close.bind(this)}),Et(rt)&&(this.#l=W(rt)),this.#y(),this.setAttributes({"data-open":this.#s,"data-root":!this.isSubmenu,"data-submenu":this.isSubmenu,"data-disabled":this.#x.bind(this)}),mt(rt,{button:this.#r,content:this.#a,expanded:this.#s,hint:C(""),submenu:!!this.#l,disable:this.#A.bind(this),attachMenuButton:this.#C.bind(this),attachMenuItems:this.#f.bind(this),attachObserver:this.#$.bind(this),disableMenuButton:this.#k.bind(this),addSubmenu:this.#E.bind(this),onTransitionEvent:e=>{this.#m.add(e),E(()=>{this.#m.delete(e)})}})}onAttach(t){t.style.setProperty("display","contents")}onConnect(t){u(this.#g.bind(this)),this.isSubmenu&&this.#l?.addSubmenu(this)}onDestroy(){this.#r.set(null),this.#a.set(null),this.#u=null,this.#m.clear()}#y(){let t=-1,e=Et(mi)?W(mi):null;mt(mi,{onDragStart:()=>{e?.onDragStart?.(),window.clearTimeout(t),t=-1,this.#h=!0},onDragEnd:()=>{e?.onDragEnd?.(),t=window.setTimeout(()=>{this.#h=!1,t=-1},300)}})}#g(){const t=this.#P();this.isSubmenu||this.#H(),this.#v(t),t&&(u(()=>{const{height:e}=this.#t.$state,i=this.#a();i&&bt(i,"--player-height",e()+"px")}),this.#d.listen(),this.listen("pointerup",this.#I.bind(this)),O(window,"pointerup",this.#M.bind(this)))}#C(t){const e=t.el,i=this.isSubmenu,s=at(this.#x.bind(this));G(e,"tabindex",i?"-1":"0"),G(e,"role",i?"menuitem":"button"),$(e,"id",this.#i),$(e,"aria-haspopup","menu"),$(e,"aria-expanded","false"),$(e,"data-root",!this.isSubmenu),$(e,"data-submenu",this.isSubmenu),u(()=>{$(e,"data-open",this.#s()),$(e,"aria-disabled",s())}),this.#r.set(e),E(()=>{this.#r.set(null)})}#f(t){const e=t.el;e.style.setProperty("display","none"),$(e,"id",this.#e),G(e,"role","menu"),G(e,"tabindex","-1"),$(e,"data-root",!this.isSubmenu),$(e,"data-submenu",this.isSubmenu),this.#a.set(e),E(()=>this.#a.set(null)),u(()=>$(e,"data-open",this.#s())),this.#d.attachMenu(e),this.#v(!1);const s=this.#B.bind(this);this.isSubmenu?this.#l?.onTransitionEvent(s):(t.listen("transitionstart",s),t.listen("transitionend",s),t.listen("animationend",this.#H),t.listen("vds-menu-resize",this.#H))}#$(t){this.#u=t}#v(t){const e=y(this.#a);e&&$(e,"aria-hidden",ts(!t))}#k(t){this.#p.set(t)}#b=!1;#w(t,e){if(this.#b=ze(e),e?.stopPropagation(),this.#s()===t)return;if(this.#x()){t&&this.#c.hide(e);return}this.el?.dispatchEvent(new Event("vds-menu-resize",{bubbles:!0,composed:!0}));const i=this.#r(),s=this.#a();if(i&&($(i,"aria-controls",t&&this.#e),$(i,"aria-expanded",ts(t))),s&&$(s,"aria-labelledby",t&&this.#i),this.#s.set(t),this.#V(e),Nt(),this.#b){t?s?.focus():i?.focus();for(const n of[this.el,s])n&&n.setAttribute("data-keyboard","")}else for(const n of[this.el,s])n&&n.removeAttribute("data-keyboard");if(this.dispatch(t?"open":"close",{trigger:e}),t)!this.isSubmenu&&this.#t.activeMenu!==this&&(this.#t.activeMenu?.close(e),this.#t.activeMenu=this),this.#u?.onOpen?.(e);else{if(this.isSubmenu)for(const n of this.#o)n.close(e);else this.#t.activeMenu=null;this.#u?.onClose?.(e)}t&&requestAnimationFrame(this.#S.bind(this))}#S(){this.#F||this.#_||(this.#d.update(),requestAnimationFrame(()=>{this.#b?this.#d.focusActive():this.#d.scroll()}))}#P(){return!this.#x()&&this.#s()}#x(){return this.#n()||this.#p()}#A(t){this.#n.set(t)}#I(t){const e=this.#a();this.#h||e&&zr(e,t)||t.stopPropagation()}#M(t){const e=this.#a();this.#h||e&&zr(e,t)||this.close(t)}#L(){const t=this.el?.querySelector('[data-part="close-target"]');return this.el&&t&&vo(this.el,t,e=>e.getAttribute("role")==="menu")?t:null}#V(t){this.isSubmenu||(this.#s()?this.#t.remote.pauseControls(t):this.#t.remote.resumeControls(t))}#E(t){this.#o.add(t),new B(t).add("open",this.#O).add("close",this.#q),E(this.#D)}#D=this.#R.bind(this);#R(t){this.#o.delete(t)}#_=!1;#O=this.#T.bind(this);#T(t){this.#_=!0;const e=this.#a();this.isSubmenu&&this.triggerElement?.setAttribute("aria-hidden","true");for(const i of this.#o)if(i!==t.target)for(const s of[i.el,i.triggerElement])s?.setAttribute("aria-hidden","true");if(e){const i=t.target.el;for(const s of e.children)s.contains(i)?s.setAttribute("data-open",""):s!==i&&s.setAttribute("data-hidden","")}}#q=this.#N.bind(this);#N(t){this.#_=!1;const e=this.#a();this.isSubmenu&&this.triggerElement?.setAttribute("aria-hidden","false");for(const i of this.#o)for(const s of[i.el,i.triggerElement])s?.setAttribute("aria-hidden","false");if(e)for(const i of e.children)i.removeAttribute("data-open"),i.removeAttribute("data-hidden")}#H=Jt(()=>{const t=y(this.#a);if(!t)return;let e=0,i=getComputedStyle(t),s=[...t.children];for(const n of["paddingTop","paddingBottom","borderTopWidth","borderBottomWidth"])e+=parseFloat(i[n])||0;for(const n of s)if(he(n)&&n.style.display==="contents")s.push(...n.children);else if(n.nodeType===3)e+=parseFloat(getComputedStyle(n).fontSize);else if(he(n)){if(!go(n))continue;const r=getComputedStyle(n);e+=n.offsetHeight+(parseFloat(r.marginTop)||0)+(parseFloat(r.marginBottom)||
8430)}bt(t,"--menu-height",e+"px")});#F=!1;#B(t){const e=this.#a();e&&t.propertyName==="height"&&(this.#F=t.type==="transitionstart",$(e,"data-transition",this.#F?"height":null),this.#s()&&this.#S());for(const i of this.#m)i(t)}open(t){y(this.#s)||(this.#c.show(t),Nt())}close(t){y(this.#s)&&(this.#c.hide(t),Nt())}};ge([V],ei.prototype,"triggerElement",null);ge([V],ei.prototype,"contentElement",null);ge([V],ei.prototype,"isSubmenu",null);ge([X],ei.prototype,"open",null);ge([X],ei.prototype,"close",null);var pr=class extends x{static props={disabled:!1};#t;#e=C(null);get expanded(){return this.#t?.expanded()??!1}constructor(){super(),new Ot}onSetup(){this.#t=W(rt)}onAttach(t){this.#t.attachMenuButton(this),u(this.#i.bind(this)),G(t,"type","button")}onConnect(t){u(this.#s.bind(this)),this.#n();const e=new MutationObserver(this.#n.bind(this));e.observe(t,{attributeFilter:["data-part"],childList:!0,subtree:!0}),E(()=>e.disconnect()),ue(t,i=>{this.dispatch("select",{trigger:i})})}#i(){this.#t.disableMenuButton(this.$props.disabled())}#s(){const t=this.#e();t&&u(()=>{const e=this.#t.hint();e&&(t.textContent=e)})}#n(){const t=this.el?.querySelector('[data-part="hint"]');this.#e.set(t??null)}},B1=pr.prototype;V(B1,"expanded");var G1=class extends pr{},U1=class extends x{static props={container:null,disabled:!1};#t=null;#e;onSetup(){this.#e=T(),mt(Qi,{attach:this.#i.bind(this)})}onAttach(t){t.style.setProperty("display","contents")}onConnect(t){}onDestroy(){this.#t?.remove(),this.#t=null}#i(t){this.#n(!1),this.#t=t,zt(()=>{zt(()=>{this.connectScope&&u(this.#s.bind(this))})})}#s(){const{fullscreen:t}=this.#e.$state,{disabled:e}=this.$props;this.#n(e()==="fullscreen"?!t():!e())}#n(t){if(!this.#t)return;let e=this.#r(this.$props.container());if(!e)return;const i=this.#t.parentElement===e;$(this.#t,"data-portal",t),t?i||(this.#t.remove(),e.append(this.#t)):i&&this.#t.parentElement===e&&(this.#t.remove(),this.el?.append(this.#t))}#r(t){return he(t)?t:t?document.querySelector(t):document.body}},Qi=Ut(),W1=class extends x{static props={placement:null,offset:0,alignOffset:0};#t;constructor(){super(),new Ot;const{placement:t}=this.$props;this.setAttributes({"data-placement":t})}onAttach(t){if(this.#t=W(rt),this.#t.attachMenuItems(this),Et(Qi)){const e=W(Qi);e&&(mt(Qi,null),e.attach(t),E(()=>e.attach(null)))}}onConnect(t){u(this.#e.bind(this))}#e(){const{expanded:t}=this.#t;if(!this.el||!t())return;const e=this.$props.placement();if(!e)return;Object.assign(this.el.style,{position:"absolute",top:0,left:0,width:"max-content"});const{offset:i,alignOffset:s}=this.$props;E(bo(this.el,this.#s(),e,{offsetVarName:"media-menu",xOffset:s(),yOffset:i()})),E(this.#i.bind(this))}#i(){this.el&&(this.el.removeAttribute("style"),this.el.style.display="none")}#s(){return this.#t.button()}},Tn=Ut(),Oe=class extends Dt{#t=new Set;#e=C("");#i=null;onValueChange;get values(){return Array.from(this.#t).map(t=>t.value())}get value(){return this.#e()}set value(t){this.#a(t)}onSetup(){mt(Tn,{add:this.#s.bind(this),remove:this.#n.bind(this)})}onAttach(t){Et(rt)||G(t,"role","radiogroup"),this.setAttributes({value:this.#e})}onDestroy(){this.#t.clear()}#s(t){this.#t.has(t)||(this.#t.add(t),t.onCheck=this.#r,t.check(t.value()===this.#e()))}#n(t){t.onCheck=null,this.#t.delete(t)}#r=this.#a.bind(this);#a(t,e){const i=y(this.#e);if(!t||t===i)return;const s=this.#l(i),n=this.#l(t);s?.check(!1,e),n?.check(!0,e),this.#e.set(t),this.onValueChange?.(t,e)}#l(t){for(const e of this.#t)if(t===y(e.value))return e;return null}},Il=class extends x{static props={value:""};#t=C(!1);#e={value:this.$props.value,check:this.#a.bind(this),onCheck:null};get checked(){return this.#t()}constructor(){super(),new Ot}onSetup(){this.setAttributes({value:this.$props.value,"data-checked":this.#t,"aria-checked":at(this.#t)})}onAttach(t){const e=Et(rt);G(t,"tabindex",e?"-1":"0"),G(t,"role",e?"menuitemradio":"radio"),u(this.#n.bind(this))}onConnect(t){this.#s(),ue(t,this.#r.bind(this)),E(this.#i.bind(this))}#i(){lt(()=>{W(Tn).remove(this.#e)},this.connectScope)}#s(){W(Tn).add(this.#e)}#n(){const{value:t}=this.$props,e=t();y(this.#t)&&this.#e.onCheck?.(e)}#r(t){y(this.#t)||(this.#l(!0,t),this.#o(t),this.#e.onCheck?.(y(this.$props.value),t))}#a(t,e){y(this.#t)!==t&&this.#l(t,e)}#l(t,e){this.#t.set(t),this.dispatch("change",{detail:t,trigger:e})}#o(t){this.dispatch("select",{trigger:t})}},j1=Il.prototype;V(j1,"checked");var Vl=class extends x{static props={emptyLabel:"Default"};#t;#e;#i;get value(){return this.#i.value}get disabled(){const{audioTracks:t}=this.#e.$state;return t().length<=1}constructor(){super(),this.#i=new Oe,this.#i.onValueChange=this.#l.bind(this)}onSetup(){this.#e=T(),Et(rt)&&(this.#t=W(rt))}onConnect(t){u(this.#s.bind(this)),u(this.#r.bind(this)),u(this.#n.bind(this))}getOptions(){const{audioTracks:t}=this.#e.$state;return t().map(e=>({track:e,label:e.label,value:e.label.toLowerCase()}))}#s(){this.#i.value=this.#a()}#n(){const{emptyLabel:t}=this.$props,{audioTrack:e}=this.#e.$state,i=e();this.#t?.hint.set(i?.label??t())}#r(){this.#t?.disable(this.disabled)}#a(){const{audioTrack:t}=this.#e.$state,e=t();return e?e.label.toLowerCase():""}#l(t,e){if(this.disabled)return;const i=this.#e.audioTracks.toArray().findIndex(s=>s.label.toLowerCase()===t);if(i>=0){const s=this.#e.audioTracks[i];this.#e.remote.changeAudioTrack(i,e),this.dispatch("change",{detail:s,trigger:e})}}},fr=Vl.prototype;V(fr,"value");V(fr,"disabled");X(fr,"getOptions");var Dl=class extends x{static props={offLabel:"Off"};#t;#e;#i;get value(){return this.#i.value}get disabled(){const{hasCaptions:t}=this.#t.$state;return!t()}constructor(){super(),this.#i=new Oe,this.#i.onValueChange=this.#l.bind(this)}onSetup(){this.#t=T(),Et(rt)&&(this.#e=W(rt))}onConnect(t){super.onConnect?.(t),u(this.#s.bind(this)),u(this.#r.bind(this)),u(this.#n.bind(this))}getOptions(){const{offLabel:t}=this.$props,{textTracks:e}=this.#t.$state;return[{value:"off",label:t},...e().filter(ht).map(i=>({track:i,label:i.label,value:this.#o(i)}))]}#s(){this.#i.value=this.#a()}#n(){const{offLabel:t}=this.$props,{textTrack:e}=this.#t.$state,i=e();this.#e?.hint.set(i&&ht(i)&&i.mode==="showing"?i.label:t())}#r(){this.#e?.disable(this.disabled)}#a(){const{textTrack:t}=this.#t.$state,e=t();return e&&ht(e)&&e.mode==="showing"?this.#o(e):"off"}#l(t,e){if(this.disabled)return;if(t==="off"){const s=this.#t.textTracks.selected;if(s){const n=this.#t.textTracks.indexOf(s);this.#t.remote.changeTextTrackMode(n,"disabled",e),this.dispatch("change",{detail:null,trigger:e})}return}const i=this.#t.textTracks.toArray().findIndex(s=>this.#o(s)===t);if(i>=0){const s=this.#t.textTracks[i];this.#t.remote.changeTextTrackMode(i,"showing",e),this.dispatch("change",{detail:s,trigger:e})}}#o(t){return t.id+":"+t.kind+"-"+t.label.toLowerCase()}},mr=Dl.prototype;V(mr,"value");V(mr,"disabled");X(mr,"getOptions");var K1=[.25,.5,.75,1,1.25,1.5,1.75,2],Rl=class extends x{static props={normalLabel:"Normal",rates:K1};#t;#e;#i;get value(){return this.#i.value}get disabled(){const{rates:t}=this.$props,{canSetPlaybackRate:e}=this.#t.$state;return!e()||t().length===0}constructor(){super(),this.#i=new Oe,this.#i.onValueChange=this.#l.bind(this)}onSetup(){this.#t=T(),Et(rt)&&(this.#e=W(rt))}onConnect(t){u(this.#s.bind(this)),u(this.#n.bind(this)),u(this.#r.bind(this))}getOptions(){const{rates:t,normalLabel:e}=this.$props;return t().map(i=>({label:i===1?e:i+"×",value:i.toString()}))}#s(){this.#i.value=this.#a()}#n(){const{normalLabel:t}=this.$props,{playbackRate:e}=this.#t.$state,i=e();this.#e?.hint.set(i===1?t():i+"×")}#r(){this.#e?.disable(this.disabled)}#a(){const{playbackRate:t}=this.#t.$state;return t().toString()}#l(t,e){if(this.disabled)return;const i=+t;this.#t.remote.changePlaybackRate(i,e),this.dispatch("change",{detail:i,trigger:e})}},gr=Rl.prototype;V(gr,"value");V(gr,"disabled");X(gr,"getOptions");var Ol=class extends x{static props={autoLabel:"Auto",hideBitrate:!1,sort:"descending"};#t;#e;#i;get value(){return this.#i.value}get disabled(){const{canSetQuality:t,qualities:e}=this.#t.$state;return!t()||e().length<=1}#s=F(()=>{const{sort:t}=this.$props,{qualities:e}=this.#t.$state;return xl(e(),t()==="descending")});constructor(){super(),this.#i=new Oe,this.#i.onValueChange=this.#l.bind(this)}onSetup(){this.#t=T(),Et(rt)&&(this.#e=W(rt))}onConnect(t){u(this.#n.bind(this)),u(this.#a.bind(this)),u(this.#r.bind(this))}getOptions(){const{autoLabel:t,hideBitrate:e}=this.$props;return[{value:"auto",label:t},...this.#s().map(i=>{const s=i.bitrate&&i.bitrate>=0?`${nt(i.bitrate/1e6,2)} Mbps`:null;return{quality:i,label:i.height+"p",value:this.#u(i),bitrate:()=>e()?null:s}})]}#n(){this.#i.value=this.#o()}#r(){const{autoLabel:t}=this.$props,{autoQuality:e,quality:i}=this.#t.$state,s=i()?i().height+"p":"";this.#e?.hint.set(e()?t()+(s?` (${s})`:""):s)}#a(){this.#e?.disable(this.disabled)}#l(t,e){if(this.disabled)return;if(t==="auto"){this.#t.remote.changeQuality(-1,e),this.dispatch("change",{detail:"auto",trigger:e});return}const{qualities:i}=this.#t.$state,s=y(i).findIndex(n=>this.#u(n)===t);if(s>=0){const n=y(i)[s];this.#t.remote.changeQuality(s,e),this.dispatch("change",{detail:n,trigger:e})}}#o(){const{quality:t,autoQuality:e}=this.#t.$state;if(e())return"auto";const i=t();return i?this.#u(i):"auto"}#u(t){return t.height+"_"+t.bitrate}},yr=Ol.prototype;V(yr,"value");V(yr,"disabled");X(yr,"getOptions");var Z1=class extends x{static props={type:"current",showHours:!1,padHours:null,padMinutes:null,remainder:!1,toggle:!1,hidden:!1};static state=new de({timeText:"",hidden:!1});#t;#e=C(null);#i=C(!0);#s=C(!0);onSetup(){this.#t=T(),this.#l();const{type:t}=this.$props;this.setAttributes({"data-type":t,"data-remainder":this.#c.bind(this)}),new Al({callback:this.#n.bind(this)}).attach(this)}onAttach(t){t.hasAttribute("role")||u(this.#o.bind(this)),u(this.#l.bind(this))}onConnect(t){E(yo(t,this.#i.set)),u(this.#r.bind(this)),u(this.#a.bind(this))}#n(t){this.#s.set(t[0].isIntersecting)}#r(){const{hidden:t}=this.$props;this.$state.hidden.set(t()||!this.#i()||!this.#s())}#a(){if(!this.$props.toggle()){this.#e.set(null);return}this.el&&ue(this.el,this.#d.bind(this))}#l(){const{hidden:t,timeText:e}=this.$state,{duration:i}=this.#t.$state;if(t())return;const{type:s,padHours:n,padMinutes:r,showHours:a}=this.$props,o=this.#u(s()),l=i(),h=this.#c();if(!Number.isFinite(o+l)){e.set("LIVE");return}const c=Os(h?Math.max(0,l-o):o,{padHrs:n(),padMins:r(),showHrs:a()});e.set((h?"-":"")+c)}#o(){if(!this.el)return;const{toggle:t}=this.$props;$(this.el,"role",t()?"timer":null),$(this.el,"tabindex",t()?0:null)}#u(t){const{bufferedEnd:e,duration:i,currentTime:s}=this.#t.$state;switch(t){case"buffered":return e();case"duration":return i();default:return s()}}#c(){return this.$props.remainder()&&this.#e()!==!1}#d(t){if(t.preventDefault(),this.#e()===null){this.#e.set(!this.$props.remainder());return}this.#e.set(e=>!e)}},Q1=class extends x{static props={translations:null};static state=new de({label:null,busy:!1});#t;#e=!1;onSetup(){this.#t=T()}onAttach(t){t.style.display="contents"}onConnect(t){t.setAttribute("data-media-announcer",""),G(t,"role","status"),G(t,"aria-live","polite");const{busy:e}=this.$state;this.setAttributes({"aria-busy":()=>e()?"true":null}),this.#e=!0,u(this.#i.bind(this)),u(this.#a.bind(this)),u(this.#r.bind(this)),u(this.#s.bind(this)),u(this.#n.bind(this)),u(this.#u.bind(this)),u(this.#d.bind(this)),Nt(),this.#e=!1}#i(){const{paused:t}=this.#t.$state;this.#h(t()?"Pause":"Play")}#s(){const{fullscreen:t}=this.#t.$state;
843this.#h(t()?"Enter Fullscreen":"Exit Fullscreen")}#n(){const{pictureInPicture:t}=this.#t.$state;this.#h(t()?"Enter PiP":"Exit PiP")}#r(){const{textTrack:t}=this.#t.$state;this.#h(t()?"Closed-Captions On":"Closed-Captions Off")}#a(){const{muted:t,volume:e,audioGain:i}=this.#t.$state;this.#h(t()||e()===0?"Mute":`${Math.round(e()*(i()??1)*100)}% ${this.#c("Volume")}`)}#l=-1;#o=-1;#u(){const{seeking:t,currentTime:e}=this.#t.$state,i=t();this.#l>0?(window.clearTimeout(this.#o),this.#o=window.setTimeout(()=>{if(!this.scope)return;const s=y(e),n=Math.abs(s-this.#l);if(n>=1){const r=s>=this.#l,a=fs(n);this.#h(`${this.#c(r?"Seek Forward":"Seek Backward")} ${a}`)}this.#l=-1,this.#o=-1},300)):i&&(this.#l=y(e))}#c(t){const{translations:e}=this.$props;return e?.()?.[t||""]??t}#d(){const{label:t,busy:e}=this.$state,i=this.#c(t());if(this.#e)return;e.set(!0);const s=window.setTimeout(()=>{e.set(!1)},150);return this.el&&$(this.el,"aria-label",i),w(i)&&this.dispatch("change",{detail:i}),()=>window.clearTimeout(s)}#h(t){const{label:e}=this.$state;e.set(t)}},z1=class extends x{static props={hideDelay:2e3,hideOnMouseLeave:!1};#t;onSetup(){this.#t=T(),u(this.#i.bind(this))}onAttach(t){const{pictureInPicture:e,fullscreen:i}=this.#t.$state;bt(t,"pointer-events","none"),G(t,"role","group"),this.setAttributes({"data-visible":this.#s.bind(this),"data-fullscreen":i,"data-pip":e}),u(()=>{this.dispatch("change",{detail:this.#s()})}),u(this.#e.bind(this)),u(()=>{const s=i();for(const n of["top","right","bottom","left"])bt(t,`padding-${n}`,s&&`env(safe-area-inset-${n})`)})}#e(){if(!this.el)return;const{nativeControls:t}=this.#t.$state,e=t();$(this.el,"aria-hidden",e?"true":null),bt(this.el,"display",e?"none":null)}#i(){const{controls:t}=this.#t.player,{hideDelay:e,hideOnMouseLeave:i}=this.$props;t.defaultDelay=e()===2e3?this.#t.$props.controlsDelay():e(),t.hideOnMouseLeave=i()}#s(){const{controlsVisible:t}=this.#t.$state;return t()}},Y1=class extends x{onAttach(t){t.style.pointerEvents||bt(t,"pointer-events","auto")}},Se=Ut(),X1=0,J1=class extends x{static props={showDelay:700};#t=`media-tooltip-${++X1}`;#e=C(null);#i=C(null);#s=C(!1);constructor(){super(),new Ot;const{showDelay:t}=this.$props;new El({trigger:this.#e,content:this.#i,showDelay:t,listen(e,i,s){u(()=>{As()&&O(e,"focus",i),O(e,"blur",s)}),new B(e).add("touchstart",n=>n.preventDefault(),{passive:!1}).add("mouseenter",i).add("mouseleave",s)},onChange:this.#o.bind(this)})}onAttach(t){t.style.setProperty("display","contents")}onSetup(){mt(Se,{trigger:this.#e,content:this.#i,showing:this.#s,attachTrigger:this.#n.bind(this),detachTrigger:this.#r.bind(this),attachContent:this.#a.bind(this),detachContent:this.#l.bind(this)})}#n(t){this.#e.set(t);let e=t.getAttribute("data-media-tooltip");e&&this.el?.setAttribute(`data-media-${e}-tooltip`,""),$(t,"data-describedby",this.#t)}#r(t){t.removeAttribute("data-describedby"),t.removeAttribute("aria-describedby"),this.#e.set(null)}#a(t){t.setAttribute("id",this.#t),t.style.display="none",G(t,"role","tooltip"),this.#i.set(t)}#l(t){t.removeAttribute("id"),t.removeAttribute("role"),this.#i.set(null)}#o(t){const e=this.#e(),i=this.#i();e&&$(e,"aria-describedby",t?this.#t:null);for(const s of[this.el,e,i])s&&$(s,"data-visible",t);this.#s.set(t)}},tf=class extends x{constructor(){super(),new Ot}onConnect(t){E(zt(()=>{if(!this.connectScope)return;this.#t();const e=W(Se);E(()=>{const i=this.#e();i&&e.detachTrigger(i)})}))}#t(){const t=this.#e(),e=W(Se);t&&e.attachTrigger(t)}#e(){const t=this.el.firstElementChild;return t?.localName==="button"||t?.getAttribute("role")==="button"?t:this.el}},ef=class extends x{static props={placement:"top center",offset:0,alignOffset:0};constructor(){super(),new Ot;const{placement:t}=this.$props;this.setAttributes({"data-placement":t})}onAttach(t){this.#t(t),Object.assign(t.style,{position:"absolute",top:0,left:0,width:"max-content"})}onConnect(t){this.#t(t);const e=W(Se);E(()=>e.detachContent(t)),E(zt(()=>{this.connectScope&&u(this.#e.bind(this))}))}#t(t){W(Se).attachContent(t)}#e(){const{showing:t}=W(Se);if(!t())return;const{placement:e,offset:i,alignOffset:s}=this.$props;return bo(this.el,this.#i(),e(),{offsetVarName:"media-tooltip",xOffset:s(),yOffset:i()})}#i(){return W(Se).trigger()}},ql=class extends x{static props={disabled:!1,defaultPressed:!1};#t=C(!1);get pressed(){return this.#t()}
843constructor(){super(),new gt({isPresssed:this.#t})}},sf=ql.prototype;V(sf,"pressed");var nf=class extends x{static props=gt.props;#t;constructor(){super(),new gt({isPresssed:this.#i.bind(this),onPress:this.#e.bind(this)})}onSetup(){this.#t=T();const{canGoogleCast:t,isGoogleCastConnected:e}=this.#t.$state;this.setAttributes({"data-active":e,"data-supported":t,"data-state":this.#s.bind(this),"aria-hidden":at(()=>!t())})}onAttach(t){t.setAttribute("data-media-tooltip","google-cast"),fe(t,this.#n.bind(this))}#e(t){this.#t.remote.requestGoogleCast(t)}#i(){const{remotePlaybackType:t,remotePlaybackState:e}=this.#t.$state;return t()==="google-cast"&&e()!=="disconnected"}#s(){const{remotePlaybackType:t,remotePlaybackState:e}=this.#t.$state;return t()==="google-cast"&&e()}#n(){const{remotePlaybackState:t}=this.#t.$state;return`Google Cast ${t()}`}},Nl=class extends x{static props={src:null,crossOrigin:null};static state=new de({video:null,src:null,crossOrigin:null,canPlay:!1,error:null,hidden:!1});#t;#e;get video(){return this.$state.video()}onSetup(){this.#t=T(),this.#e=Ye(Ai.state),this.#n(),this.setAttributes({"data-loading":this.#r.bind(this),"data-hidden":this.$state.hidden,"data-error":this.#a.bind(this),"aria-hidden":at(this.$state.hidden)})}onAttach(t){u(this.#i.bind(this)),u(this.#s.bind(this)),u(this.#n.bind(this)),u(this.#l.bind(this)),u(this.#o.bind(this)),u(this.#d.bind(this))}#i(){const t=this.$state.video();t&&(t.readyState>=2&&this.#u(),new B(t).add("canplay",this.#u.bind(this)).add("error",this.#c.bind(this)))}#s(){const{src:t}=this.$state,{canLoad:e}=this.#t.$state;t.set(e()?this.$props.src():null)}#n(){const{crossOrigin:t}=this.$props,{crossOrigin:e}=this.$state,{crossOrigin:i}=this.#t.$state,s=t()!==null?t():i();e.set(s===!0?"anonymous":s)}#r(){const{canPlay:t,hidden:e}=this.$state;return!t()&&!e()}#a(){const{error:t}=this.$state;return!Ht(t)}#l(){const{src:t,hidden:e}=this.$state,{canLoad:i,duration:s}=this.#t.$state;e.set(i()&&(!t()||this.#a()||!Number.isFinite(s())))}#o(){const{src:t,canPlay:e,error:i}=this.$state;t(),e.set(!1),i.set(null)}#u(t){const{canPlay:e,error:i}=this.$state;e.set(!0),i.set(null),this.dispatch("can-play",{trigger:t})}#c(t){const{canPlay:e,error:i}=this.$state;e.set(!1),i.set(t),this.dispatch("error",{trigger:t})}#d(){const{video:t,canPlay:e}=this.$state,{duration:i}=this.#t.$state,{pointerRate:s}=this.#e,n=t();e()&&n&&Number.isFinite(i())&&Number.isFinite(s())&&(n.currentTime=s()*i())}},rf=Nl.prototype;V(rf,"video");var af=class extends x{static props={...Vt.props,step:25,keyStep:25,shiftKeyMultiplier:2,min:0,max:300};static state=Re;#t;onSetup(){this.#t=T(),mt(Ze,{default:"percent",percent:(t,e)=>nt(this.$state.value(),e)+"%"}),new Vt({getStep:this.$props.step,getKeyStep:this.$props.keyStep,roundValue:Math.round,isDisabled:this.#r.bind(this),aria:{valueNow:this.#e.bind(this),valueText:this.#i.bind(this)},onDragValueChange:this.#o.bind(this),onValueChange:this.#l.bind(this)}).attach(this),u(this.#s.bind(this)),u(this.#n.bind(this))}onAttach(t){t.setAttribute("data-media-audio-gain-slider",""),G(t,"aria-label","Audio Boost");const{canSetAudioGain:e}=this.#t.$state;this.setAttributes({"data-supported":e,"aria-hidden":at(()=>!e())})}#e(){const{value:t}=this.$state;return Math.round(t())}#i(){const{value:t}=this.$state;return t()+"%"}#s(){const{min:t,max:e}=this.$props;this.$state.min.set(t()),this.$state.max.set(e())}#n(){const{audioGain:t}=this.#t.$state,e=((t()??1)-1)*100;this.$state.value.set(e),this.dispatch("value-change",{detail:e})}#r(){const{disabled:t}=this.$props,{canSetAudioGain:e}=this.#t.$state;return t()||!e()}#a(t){if(!t.trigger)return;const e=nt(1+t.detail/100,2);this.#t.remote.changeAudioGain(e,t)}#l(t){this.#a(t)}#o(t){this.#a(t)}},of=class extends x{static props={...Vt.props,step:.25,keyStep:.25,shiftKeyMultiplier:2,min:0,max:2};static state=Re;#t;onSetup(){this.#t=T(),new Vt({getStep:this.$props.step,getKeyStep:this.$props.keyStep,roundValue:this.#r,isDisabled:this.#a.bind(this),aria:{valueNow:this.#e.bind(this),valueText:this.#i.bind(this)},onDragValueChange:this.#c.bind(this),onValueChange:this.#u.bind(this)}).attach(this),u(this.#s.bind(this)),u(this.#n.bind(this))}
vendor: 4,378 bytes, line 843
843onAttach(t){t.setAttribute("data-media-speed-slider",""),G(t,"aria-label","Speed");const{canSetPlaybackRate:e}=this.#t.$state;this.setAttributes({"data-supported":e,"aria-hidden":at(()=>!e())})}#e(){const{value:t}=this.$state;return t()}#i(){const{value:t}=this.$state;return t()+"x"}#s(){const{min:t,max:e}=this.$props;this.$state.min.set(t()),this.$state.max.set(e())}#n(){const{playbackRate:t}=this.#t.$state,e=t();this.$state.value.set(e),this.dispatch("value-change",{detail:e})}#r(t){return nt(t,2)}#a(){const{disabled:t}=this.$props,{canSetPlaybackRate:e}=this.#t.$state;return t()||!e()}#l=Ve(this.#o.bind(this),25);#o(t){if(!t.trigger)return;const e=t.detail;this.#t.remote.changePlaybackRate(e,t)}#u(t){this.#l(t)}#c(t){this.#l(t)}},lf=class extends x{static props={...Vt.props,step:1,keyStep:1,shiftKeyMultiplier:1};static state=Re;#t;#e=F(()=>{const{qualities:t}=this.#t.$state;return xl(t())});onSetup(){this.#t=T(),new Vt({getStep:this.$props.step,getKeyStep:this.$props.keyStep,roundValue:Math.round,isDisabled:this.#a.bind(this),aria:{valueNow:this.#i.bind(this),valueText:this.#s.bind(this)},onDragValueChange:this.#c.bind(this),onValueChange:this.#u.bind(this)}).attach(this),u(this.#n.bind(this)),u(this.#r.bind(this))}onAttach(t){t.setAttribute("data-media-quality-slider",""),G(t,"aria-label","Video Quality");const{qualities:e,canSetQuality:i}=this.#t.$state,s=F(()=>i()&&e().length>0);this.setAttributes({"data-supported":s,"aria-hidden":at(()=>!s())})}#i(){const{value:t}=this.$state;return t()}#s(){const{quality:t}=this.#t.$state;if(!t())return"";const{height:e,bitrate:i}=t(),s=i&&i>0?`${(i/1e6).toFixed(2)} Mbps`:null;return e?`${e}p${s?` (${s})`:""}`:"Auto"}#n(){const t=this.#e();this.$state.max.set(Math.max(0,t.length-1))}#r(){let{quality:t}=this.#t.$state,e=this.#e(),i=Math.max(0,e.indexOf(t()));this.$state.value.set(i),this.dispatch("value-change",{detail:i})}#a(){const{disabled:t}=this.$props,{canSetQuality:e,qualities:i}=this.#t.$state;return t()||i().length<=1||!e()}#l=Ve(this.#o.bind(this),25);#o(t){if(!t.trigger)return;const{qualities:e}=this.#t,i=y(this.#e)[t.detail];this.#t.remote.changeQuality(e.indexOf(i),t)}#u(t){this.#l(t)}#c(t){this.#l(t)}},Hl=class extends x{static props={disabled:!1};#t;#e;#i;#s=null;#n=[];#r=C(null);#a=C([]);#l=C(-1);#o=C(-1);#u=0;get cues(){return this.#a()}get activeCue(){return this.#a()[this.#l()]||null}get activePointerCue(){return this.#a()[this.#o()]||null}onSetup(){this.#t=T(),this.#e=Ye(_l.state)}onAttach(t){Je(this.#t.textTracks,"chapters",this.#c.bind(this)),u(this.#A.bind(this))}onConnect(){E(()=>this.#d.bind(this))}onDestroy(){this.#c(null)}setRefs(t){if(this.#n=t,this.#i?.dispose(),this.#n.length===1){const e=this.#n[0];e.style.width="100%",e.style.setProperty("--chapter-fill","var(--slider-fill)"),e.style.setProperty("--chapter-progress","var(--slider-progress)")}else this.#n.length>0&<(()=>this.#h(),this.#i=le())}#c(t){y(this.#r)!==t&&(this.#d(),this.#r.set(t))}#d(){this.#n=[],this.#a.set([]),this.#l.set(-1),this.#o.set(-1),this.#u=0,this.#i?.dispose()}#h(){this.#n.length&&u(this.#p.bind(this))}#p(){const{hidden:t}=this.#e;t()||(u(this.#m.bind(this)),u(this.#y.bind(this)),u(this.#g.bind(this)),u(this.#v.bind(this)))}#m(){const t=this.#a();if(!t.length)return;let e,{seekableStart:i,seekableEnd:s}=this.#t.$state,n=i(),r=(s()||t[t.length-1].endTime)-n,a=100;for(let o=0;o<t.length;o++)if(e=t[o],this.#n[o]){const l=o===t.length-1?a:nt((e.endTime-Math.max(n,e.startTime))/r*100,3);this.#n[o].style.width=l+"%",a-=l}}#y(){let{liveEdge:t,seekableStart:e,seekableEnd:i}=this.#t.$state,{fillPercent:s,value:n}=this.#e,r=this.#a(),a=t(),o=y(this.#l),l=r[o],h=a?this.#a.length-1:this.#$(l&&l.startTime/i()*100<=y(n)?o:0,s());a||!l?this.#C(0,r.length,100):h>o?this.#C(o,h,100):h<o&&this.#C(h+1,o+1,0);const c=a?100:this.#P(r[h],s(),e(),this.#S(r));this.#f(this.#n[h],c),this.#l.set(h)}#g(){let{hidden:t,pointerPercent:e}=this.#e;if(t()){this.#o.set(-1);return}const i=this.#$(0,e());this.#o.set(i)}#C(t,e,i){for(let s=t;s<e;s++)this.#f(this.#n[s],i)}#f(t,e){t&&(t.style.setProperty("--chapter-fill",e+"%"),$(t,"data-active",e>0&&e<100),$(t,"data-ended",e===100))}#$(t,e){let i=0,s=this.#a();if(e===0)return 0;if(e===100)return s.length-1;let{seekableStart:n}=this.#t.$state,r=n(),a=this.#S(s);for(let o=t;o<s.length;o++)if(i=this.#P(s[o],e,r,a),i>=0&&i<100)return o;return 0}
843#v(){this.#k(this.#b())}#k=Jt(t=>{let e,i=this.#a(),{seekableStart:s}=this.#t.$state,n=s(),r=this.#S(i);for(let a=this.#u;a<this.#n.length;a++)if(e=this.#P(i[a],t,n,r),this.#n[a]?.style.setProperty("--chapter-progress",e+"%"),e<100){this.#u=a;break}});#b=F(this.#w.bind(this));#w(){const{bufferedEnd:t,duration:e}=this.#t.$state;return nt(Math.min(t()/Math.max(e(),1),1),3)*100}#S(t){const{seekableEnd:e}=this.#t.$state,i=e();return Number.isFinite(i)?i:t[t.length-1]?.endTime||0}#P(t,e,i,s){if(!t||this.#a().length===0)return 0;const n=s-i,r=Math.max(0,t.startTime-i),a=Math.min(s,t.endTime)-i,o=r/n,l=o*100,h=Math.min(1,o+(a-r)/n)*100;return Math.max(0,nt(e>=h?100:(e-l)/(h-l)*100,3))}#x(t){let e=[],{seekableStart:i,seekableEnd:s,duration:n}=this.#t.$state,r=i(),a=s();t=t.filter(h=>h.startTime<=a&&h.endTime>=r);const o=t[0];o&&o.startTime>r&&e.push(new window.VTTCue(r,o.startTime,""));for(let h=0;h<t.length-1;h++){const c=t[h],d=t[h+1];if(e.push(c),d){const p=d.startTime-c.endTime;p>0&&e.push(new window.VTTCue(c.endTime,c.endTime+p,""))}}const l=t[t.length-1];if(l){e.push(l);const h=n();h>=0&&h-l.endTime>1&&e.push(new window.VTTCue(l.endTime,n(),""))}return e}#A(){const{source:t}=this.#t.$state;t(),this.#I()}#I(){if(!this.scope)return;const{disabled:t}=this.$props;if(t()){this.#a.set([]),this.#l.set(0),this.#u=0;return}const e=this.#r();if(e){const i=this.#L.bind(this);i(),new B(e).add("add-cue",i).add("remove-cue",i),u(this.#M.bind(this))}return this.#s=this.#D(),this.#s&&u(this.#V.bind(this)),()=>{this.#s&&(this.#s.textContent="",this.#s=null)}}#M(){this.#t.$state.duration(),this.#L()}#L=_n(()=>{const t=y(this.#r);!this.scope||!t||!t.cues.length||(this.#a.set(this.#x(t.cues)),this.#l.set(0),this.#u=0)},150,!0);#V(){const t=this.activePointerCue||this.activeCue;this.#s&&(this.#s.textContent=t?.text||"")}#E(){let t=this.el;for(;t&&t.getAttribute("role")!=="slider";)t=t.parentElement;return t}#D(){const t=this.#E();return t?t.querySelector('[data-part="chapter-title"]'):null}},qs=Hl.prototype;V(qs,"cues");V(qs,"activeCue");V(qs,"activePointerCue");X(qs,"setRefs");var Fl=class extends x{static props={value:""};#t;get values(){return this.#t.values}get value(){return this.#t.value}set value(t){this.#t.value=t}constructor(){super(),this.#t=new Oe,this.#t.onValueChange=this.#i.bind(this)}onSetup(){u(this.#e.bind(this))}#e(){this.#t.value=this.$props.value()}#i(t,e){const i=this.createEvent("change",{detail:t,trigger:e});this.dispatch(i)}},Bl=Fl.prototype;V(Bl,"values");V(Bl,"value");var Ns=class extends x{static props={thumbnails:null};#t;#e;#i;#s=C(null);#n=C([]);get value(){return this.#i.value}get disabled(){return!this.#n()?.length}constructor(){super(),this.#i=new Oe,this.#i.onValueChange=this.#c.bind(this)}onSetup(){this.#t=T(),Et(rt)&&(this.#e=W(rt));const{thumbnails:t}=this.$props;this.setAttributes({"data-thumbnails":()=>!!t()})}onAttach(t){this.#e?.attachObserver({onOpen:this.#r.bind(this)})}getOptions(){const{seekableStart:t,seekableEnd:e}=this.#t.$state,i=t(),s=e();return this.#n().map((n,r)=>({cue:n,value:r.toString(),label:n.text,startTime:Os(Math.max(0,n.startTime-i)),duration:fs(Math.min(s,n.endTime)-Math.max(i,n.startTime))}))}#r(){y(()=>this.#o())}onConnect(t){u(this.#o.bind(this)),u(this.#u.bind(this)),u(this.#a.bind(this)),Je(this.#t.textTracks,"chapters",this.#s.set)}#a(){const t=this.#s();if(!t)return;const e=this.#l.bind(this,t);return e(),new B(t).add("add-cue",e).add("remove-cue",e),()=>{this.#n.set([])}}#l(t){const{seekableStart:e,seekableEnd:i}=this.#t.$state,s=e(),n=i();this.#n.set([...t.cues].filter(r=>r.startTime<=n&&r.endTime>=s))}#o(){if(!this.#e?.expanded())return;if(!this.#s()){this.#i.value="-1";return}const{realCurrentTime:t,seekableStart:e,seekableEnd:i}=this.#t.$state,s=e(),n=i(),r=t(),a=this.#n().findIndex(o=>pn(o,r));this.#i.value=a.toString(),a>=0&&zt(()=>{if(!this.connectScope)return;const o=this.#n()[a],l=this.el.querySelector("[aria-checked='true']"),h=Math.max(s,o.startTime),c=Math.min(n,o.endTime)-h,d=Math.max(0,r-h)/c*100;l&&bt(l,"--progress",nt(d,3)+"%")})}#u(){this.#e?.disable(this.disabled)}#c(t,e){if(this.disabled||!e)return;const i=+t,s=this.#n(),{clipStartTime:n}=this.#t.$state;it(i)&&s?.[i]&&(this.#i.value=i.toString(),this.#t.remote.seek(s[i].startTime-n(),e),this.dispatch("change",{detail:s[i],trigger:e}))}};ge([V],Ns.prototype,"value",null);ge([V],Ns.prototype,"disabled",null);ge([X],Ns.prototype,"getOptions",null);var cf=[1,1.25,1.5,1.75,2,2.5,3,4],Gl=class extends x{static props={normalLabel:"Disabled",gains:cf};#t;#e;#i;get value(){return this.#i.value}get disabled(){const{gains:t}=this.$props,{canSetAudioGain:e}=this.#t.$state;return!e()||t().length===0}constructor(){super(),this.#i=new Oe,this.#i.onValueChange=this.#l.bind(this)}onSetup(){this.#t=T(),Et(rt)&&(this.#e=W(rt))}onConnect(t){u(this.#s.bind(this)),u(this.#n.bind(this)),u(this.#r.bind(this))}getOptions(){const{gains:t,normalLabel:e}=this.$props;return t().map(i=>({label:i===1||i===null?e:String(i*100)+"%",value:i.toString()}))}#s(){this.#i.value=this.#a()}#n(){const{normalLabel:t}=this.$props,{audioGain:e}=this.#t.$state,i=e();this.#e?.hint.set(i===1||i==null?t():String(i*100)+"%")}#r(){this.#e?.disable(this.disabled)}#a(){const{audioGain:t}=this.#t.$state;return t()?.toString()??"1"}#l(t,e){if(this.disabled)return;const i=+t;this.#t.remote.changeAudioGain(i,e),this.dispatch("change",{detail:i,trigger:e})}},vr=Gl.prototype;V(vr,"value");V(vr,"disabled");X(vr,"getOptions");var uf=class extends x{static props={disabled:!1,event:void 0,action:void 0};#t;#e=null;#i=null;onSetup(){this.#t=T();const{event:t,action:e}=this.$props;this.setAttributes({event:t,action:e})}onAttach(t){t.setAttribute("data-media-gesture",""),t.style.setProperty("pointer-events","none")}onConnect(t){this.#e=this.#t.player.el?.querySelector("[data-media-provider]"),u(this.#s.bind(this))}#s(){let t=this.$props.event(),e=this.$props.disabled();
843!this.#e||!t||e||(/^dbl/.test(t)&&(t=t.split(/^dbl/)[1]),(t==="pointerup"||t==="pointerdown")&&this.#t.$state.pointer()==="coarse"&&(t==="pointerup"&&O(this.#e,"touchstart",this.#l.bind(this),{passive:!0}),t=t==="pointerup"?"touchend":"touchstart"),O(this.#e,t,this.#a.bind(this),{passive:!1}))}#n=0;#r=-1;#a(t){if(!(this.$props.disabled()||Lr(t)&&(t.button!==0||this.#t.activeMenu)||ai(t)&&this.#t.activeMenu||this.#o(t)||os(t)||!this.#c(t))){if(t.MEDIA_GESTURE=!0,t.preventDefault(),!y(this.$props.event)?.startsWith("dbl"))this.#n===0&&setTimeout(()=>{this.#n===1&&this.#u(t)},250);else if(this.#n===1){queueMicrotask(()=>this.#u(t)),clearTimeout(this.#r),this.#n=0;return}this.#n===0&&(this.#r=window.setTimeout(()=>{this.#n=0},275)),this.#n++}}#l(t){if(os(t)){this.#i=null;return}const e=t.changedTouches[0]??t.touches[0];this.#i=e?{x:e.clientX,y:e.clientY}:null}#o(t){if(!ai(t)||t.type!=="touchend")return!1;const e=t.changedTouches[0]??t.touches[0],i=this.#i;return this.#i=null,!e||!i?!1:Math.abs(e.clientX-i.x)>10||Math.abs(e.clientY-i.y)>10}#u(t){this.el.setAttribute("data-triggered",""),requestAnimationFrame(()=>{this.#d()&&this.#h(y(this.$props.action),t),requestAnimationFrame(()=>{this.el.removeAttribute("data-triggered")})})}#c(t){if(!this.el)return!1;if(Lr(t)||fc(t)||ai(t)){const e=ai(t)?t.changedTouches[0]??t.touches[0]:void 0,i=e?.clientX??t.clientX,s=e?.clientY??t.clientY,n=this.el.getBoundingClientRect(),r=s>=n.top&&s<=n.bottom&&i>=n.left&&i<=n.right;return t.type.includes("leave")?!r:r}return!0}#d(){const t=this.#t.player.el.querySelectorAll("[data-media-gesture][data-triggered]");return Array.from(t).sort((e,i)=>+getComputedStyle(i).zIndex-+getComputedStyle(e).zIndex)[0]===this.el}#h(t,e){if(!t)return;const i=new I("will-trigger",{detail:t,cancelable:!0,trigger:e});if(this.dispatchEvent(i),i.defaultPrevented)return;const[s,n]=t.replace(/:([a-z])/,"-$1").split(":");t.includes(":fullscreen")?this.#t.remote.toggleFullscreen("prefer-media",e):t.includes("seek:")?this.#t.remote.seek(y(this.#t.$state.currentTime)+(+n||0),e):this.#t.remote[Cc(s)](e),this.dispatch("trigger",{detail:t,trigger:e})}},hf=class{priority=10;#t=null;#e;#i;constructor(t){this.#e=t}attach(){}canRender(){return!0}detach(){this.#i?.abort(),this.#i=void 0,this.#e.reset(),this.#t=null}changeTrack(t){!t||this.#t===t||(this.#i?.abort(),this.#i=new B(t),t.readyState<2?(this.#e.reset(),this.#i.add("load",()=>this.#s(t),{once:!0})):this.#s(t),this.#i.add("add-cue",e=>{this.#e.addCue(e.detail)}).add("remove-cue",e=>{this.#e.removeCue(e.detail)}),this.#t=t)}#s(t){this.#e.changeTrack({cues:[...t.cues],regions:[...t.regions]})}},df=class $e extends x{static props={textDir:"ltr",exampleText:"Captions look like this."};#t;static lib=C(null);onSetup(){this.#t=T(),this.setAttributes({"aria-hidden":at(this.#e.bind(this))})}onAttach(e){e.style.setProperty("pointer-events","none")}onConnect(e){$e.lib()||ut(()=>import("./B2WH9h9e.js").then(i=>$e.lib.set(i)),__vite__mapDeps([0,1]),import.meta.url),u(this.#i.bind(this))}
843#e(){const{textTrack:e,remotePlaybackState:i,iOSControls:s}=this.#t.$state,n=e();return s()||i()==="connected"||!n||!ht(n)}#i(){if(!$e.lib())return;const{viewType:e}=this.#t.$state;return e()==="audio"?this.#s():this.#l()}#s(){return u(this.#n.bind(this)),this.#c(null),()=>{this.el.textContent=""}}#n(){if(this.#e())return;this.#r();const{textTrack:e}=this.#t.$state;O(e(),"cue-change",this.#r.bind(this)),u(this.#a.bind(this))}#r(){this.el.textContent="",this.#p>=0&&this.#y();const{realCurrentTime:e,textTrack:i}=this.#t.$state,{renderVTTCueString:s}=$e.lib(),n=y(e),r=y(i).activeCues;for(const a of r){const o=this.#g(),l=this.#C();l.innerHTML=s(a,n),o.append(l),this.el.append(l)}}#a(){const{realCurrentTime:e}=this.#t.$state,{updateTimedVTTCueNodes:i}=$e.lib();i(this.el,e())}#l(){const{CaptionsRenderer:e}=$e.lib(),i=new e(this.el),s=new hf(i);return this.#t.textRenderers.add(s),u(this.#o.bind(this,i)),u(this.#u.bind(this,i)),this.#c(i),()=>{this.el.textContent="",this.#t.textRenderers.remove(s),i.destroy()}}#o(e){e.dir=this.$props.textDir()}#u(e){if(this.#e())return;const{realCurrentTime:i,textTrack:s}=this.#t.$state;e.currentTime=i(),this.#p>=0&&s()?.activeCues[0]&&this.#y()}#c(e){const i=this.#t.player;i&&O(i,"vds-font-change",this.#d.bind(this,e))}#d(e){if(this.#p>=0){this.#m();return}const{textTrack:i}=this.#t.$state;i()?.activeCues[0]?e?.update(!0):this.#h()}#h(){const e=this.#g();$(e,"data-example","");const i=this.#C();$(i,"data-example",""),i.textContent=this.$props.exampleText(),e?.append(i),this.el?.append(e),this.el?.setAttribute("data-example",""),this.#m()}#p=-1;#m(){window.clearTimeout(this.#p),this.#p=window.setTimeout(this.#y.bind(this),2500)}#y(){this.el?.removeAttribute("data-example"),this.el?.querySelector("[data-example]")&&(this.el.textContent=""),this.#p=-1}#g(){const e=document.createElement("div");return $(e,"data-part","cue-display"),e}#C(){const e=document.createElement("div");return $(e,"data-part","cue"),e}},pf=Un('<img loading="eager" decoding="async" aria-hidden="true">'),Ul=class extends S(HTMLElement,L1){static tagName="media-thumbnail";static attrs={crossOrigin:"crossorigin"};#t;#e=this.#i();onSetup(){this.#t=T(),this.$state.img.set(this.#e)}onConnect(){const{src:t,crossOrigin:e}=this.$state;this.#e.parentNode!==this&&this.prepend(this.#e),u(()=>{$(this.#e,"src",t()),$(this.#e,"crossorigin",e())})}#i(){return Wn(pf)}},ff=class extends S(HTMLElement,Z1){static tagName="media-time";onConnect(){u(()=>{this.textContent=this.$state.timeText()})}},mf=class extends S(HTMLElement,g1){static tagName="media-airplay-button"},gf=class extends S(HTMLElement,v1){static tagName="media-caption-button"},yf=class extends S(HTMLElement,b1){static tagName="media-fullscreen-button"},vf=class extends S(HTMLElement,T1){static tagName="media-live-button"},bf=class extends S(HTMLElement,C1){static tagName="media-mute-button"},Cf=class extends S(HTMLElement,$1){static tagName="media-pip-button"},$f=class extends S(HTMLElement,y1){static tagName="media-play-button"},wf=class extends S(HTMLElement,w1){static tagName="media-seek-button"};function ii(t,e){zt(()=>{if(!t.connectScope)return;const i=t.querySelector("template");i&&u(()=>{const s=t.getOptions();Gn(i,s.length,(n,r)=>{const{label:a,value:o}=s[r],l=n.querySelector('[data-part="label"]');n.setAttribute("value",o),l&&(w(a)?l.textContent=a:u(()=>{l.textContent=a()})),e?.(n,s[r],r)})})})}var Tf=class extends S(HTMLElement,Vl){static tagName="media-audio-radio-group";onConnect(){ii(this)}},kf=class extends S(HTMLElement,Dl){static tagName="media-captions-radio-group";onConnect(){ii(this)}},Sf=class extends S(HTMLElement,ei){static tagName="media-menu"},xf=class extends S(HTMLElement,pr){static tagName="media-menu-button"},Pf=class extends S(HTMLElement,G1){static tagName="media-menu-item"},Ef=class extends S(HTMLElement,W1){static tagName="media-menu-items"},Af=class extends S(HTMLElement,Rl){static tagName="media-speed-radio-group";onConnect(){ii(this)}},Lf=class extends S(HTMLElement,Ol){static tagName="media-quality-radio-group";onConnect(){ii(this,(t,e)=>{const i=e.bitrate,s=t.querySelector('[data-part="bitrate"]');i&&s&&u(()=>{s.textContent=i()||""})})}},Mf=class extends S(HTMLElement,Il){static tagName="media-radio"},_f=class extends Ul{static tagName="media-slider-thumbnail";#t;#e;onSetup(){super.onSetup(),this.#t=T(),this.#e=Ye(Ai.state)}onConnect(){super.onConnect(),u(this.#i.bind(this))}#i(){const{duration:t,clipStartTime:e}=this.#t.$state;this.time=e()+this.#e.pointerRate()*t()}},If=class extends S(HTMLElement,Ml){static tagName="media-slider-value";static attrs={padMinutes:{converter:Ga}};onConnect(){u(()=>{this.textContent=this.getValueText()})}},Vf=class extends S(HTMLElement,_l){static tagName="media-time-slider"},Df=class extends S(HTMLElement,I1){static tagName="media-slider-preview"},Rf=class extends S(HTMLElement,D1){static tagName="media-volume-slider"},Of=class extends S(HTMLElement,df){static tagName="media-captions"},qf=class extends S(HTMLElement,uf){static tagName="media-gesture"},Nf=class extends S(HTMLElement,Q1){static tagName="media-announcer"},Hf=class extends S(HTMLElement,z1){static tagName="media-controls"},Ff=class extends S(HTMLElement,Y1){static tagName="media-controls-group"},Bf=class extends x{},Gf=class extends S(HTMLElement,Bf){static tagName="media-title";#t;onSetup(){this.#t=T()}onConnect(){u(this.#e.bind(this))}#e(){const{title:t}=this.#t.$state;this.textContent=t()}},Uf=class extends x{static props={defaultText:""}},Wf=class extends S(HTMLElement,Uf){static tagName="media-chapter-title";#t;#e;onSetup(){this.#t=T(),this.#e=C("")}onConnect(){const t=this.#t.textTracks;Cu(t,"chapters",this.#e.set),u(this.#i.bind(this))}#i(){const{defaultText:t}=this.$props;this.textContent=this.#e()||t()}},jf=class extends x{static props={size:96,trackWidth:8,fillPercent:50};onConnect(t){zt(()=>{if(!this.connectScope)return;const e=t.querySelector("svg"),i=e.firstElementChild,s=i.nextElementSibling;
843u(this.#t.bind(this,e,i,s))})}#t(t,e,i){const{size:s,trackWidth:n,fillPercent:r}=this.$props;$(t,"width",s()),$(t,"height",s()),$(e,"stroke-width",n()),$(i,"stroke-width",n()),$(i,"stroke-dashoffset",100-r())}},Kf=class extends S(Ms,jf){static tagName="media-spinner";render(){return f` 844 <svg fill="none" viewBox="0 0 120 120" aria-hidden="true" data-part="root"> 845 <circle cx="60" cy="60" r="54" stroke="currentColor" data-part="track"></circle> 846 <circle 847 cx="60" 848 cy="60" 849 r="54" 850 stroke="currentColor" 851 pathLength="100" 852 stroke-dasharray="100" 853 data-part="track-fill" 854 ></circle> 855 </svg> 856 `}},Zf=class extends x{static props={when:!1}},Qf=class extends S(HTMLElement,Zf){static tagName="media-layout";#t;onSetup(){this.#t=T()}onConnect(){u(this.#e.bind(this))}#e(){const t=this.firstElementChild,e=t?.localName==="template",i=this.$props.when();if(!(gi(i)?i:F(()=>i(this.#t.player.state))())){e?(this.textContent="",this.appendChild(t)):he(t)&&(t.style.display="none");return}e?this.append(t.content.cloneNode(!0)):he(t)&&(t.style.display="")}},zf=class extends S(HTMLElement,nf){static tagName="media-google-cast-button"},Yf=class extends S(HTMLElement,ql){static tagName="media-toggle-button"},Xf=class extends S(HTMLElement,J1){static tagName="media-tooltip"},Jf=class extends S(HTMLElement,tf){static tagName="media-tooltip-trigger";onConnect(){this.style.display="contents"}},t6=class extends S(HTMLElement,ef){static tagName="media-tooltip-content"},e6=class extends S(HTMLElement,U1){static tagName="media-menu-portal";static attrs={disabled:{converter(t){return w(t)?t:t!==null}}}},i6=class extends S(HTMLElement,Ns){static tagName="media-chapters-radio-group";onConnect(){ii(this,(t,e)=>{const{cue:i,startTime:s,duration:n}=e,r=t.querySelector(".vds-thumbnail,media-thumbnail"),a=t.querySelector('[data-part="start-time"]'),o=t.querySelector('[data-part="duration"]');a&&(a.textContent=s),o&&(o.textContent=n),r&&(r.setAttribute("time",i.startTime+""),u(()=>{const l=this.$props.thumbnails();"src"in r?r.src=l:w(l)&&r.setAttribute("src",l)}))})}},s6=class extends S(HTMLElement,Gl){static tagName="media-audio-gain-radio-group";onConnect(){ii(this)}},n6=class extends S(HTMLElement,Fl){static tagName="media-radio-group"},r6=class extends S(HTMLElement,Ai){static tagName="media-slider"},a6=Un('<video muted playsinline preload="none" style="max-width: unset;"></video>'),o6=class extends S(HTMLElement,Nl){static tagName="media-slider-video";#t;#e=this.#i();onSetup(){this.#t=T(),this.$state.video.set(this.#e)}onConnect(){const{canLoad:t}=this.#t.$state,{src:e,crossOrigin:i}=this.$state;this.#e.parentNode!==this&&this.prepend(this.#e),u(()=>{$(this.#e,"crossorigin",i()),$(this.#e,"preload",t()?"auto":"none"),$(this.#e,"src",e())})}#i(){return Wn(a6)}},l6=class extends S(HTMLElement,af){static tagName="media-audio-gain-slider"},c6=class extends S(HTMLElement,of){static tagName="media-speed-slider"},u6=class extends S(HTMLElement,lf){static tagName="media-quality-slider"},h6=class extends S(HTMLElement,Hl){static tagName="media-slider-chapters";#t=null;onConnect(){zt(()=>{if(!this.connectScope)return;const t=this.querySelector("template");t&&(this.#t=t,u(this.#e.bind(this)))})}#e(){if(!this.#t)return;const t=Gn(this.#t,this.cues.length||1);this.setRefs(t)}},d6=class extends x{},p6=class extends S(HTMLElement,d6){static tagName="media-slider-steps";#t=null;onConnect(t){zt(()=>{this.connectScope&&(this.#t=t.querySelector("template"),this.#t&&u(this.#e.bind(this)))})}#e(){if(!this.#t)return;const{min:t,max:e,step:i}=Ye(Re),s=(e()-t())/i();Gn(this.#t,Math.floor(s)+1)}},wa=Object.defineProperty,Wl=(t,e)=>{let i={};for(var s in t)wa(i,s,{get:t[s],enumerable:!0});return e||wa(i,Symbol.toStringTag,{value:"Module"}),i},f6=class extends x{static props={src:null,alt:null,crossOrigin:null};static state=new de({img:null,src:null,alt:null,crossOrigin:null,loading:!0,error:null,hidden:!1});#t;onSetup(){this.#t=T(),this.#l(),this.#o(),this.#u(),this.#s()}onAttach(t){t.style.setProperty("pointer-events","none"),u(this.#r.bind(this)),u(this.#l.bind(this)),u(this.#o.bind(this)),u(this.#u.bind(this)),u(this.#s.bind(this));const{started:e}=this.#t.$state;this.setAttributes({"data-visible":()=>!e()&&!this.$state.hidden(),"data-loading":this.#n.bind(this),"data-error":this.#e.bind(this),"data-hidden":this.$state.hidden})}onConnect(t){u(this.#i.bind(this)),u(this.#c.bind(this))}#e(){const{error:t}=this.$state;return!Ht(t())}#i(){const{canLoadPoster:t,poster:e}=this.#t.$state;!t()&&e()&&te(e(),"preconnect")}#s(){const{src:t}=this.$props,{poster:e,nativeControls:i}=this.#t.$state;this.el&&$(this.el,"display",i()?"none":null),this.$state.hidden.set(this.#e()||!(t()||e())||i())}#n(){const{loading:t,hidden:e}=this.$state;return!e()&&t()}#r(){const t=this.$state.img();t&&(new B(t).add("load",this.#d.bind(this)).add("error",this.#h.bind(this)),t.complete&&this.#d())}#a="";#l(){const{poster:t}=this.#t.$props,{canLoadPoster:e,providedPoster:i,inferredPoster:s}=this.#t.$state,n=this.$props.src()||"",r=n||t()||s();this.#a===i()&&i.set(n),this.$state.src.set(e()&&r.length?r:null),this.#a=n}#o(){const{src:t}=this.$props,{alt:e}=this.$state,{poster:i}=this.#t.$state;e.set(t()||i()?this.$props.alt():null)}#u(){const{crossOrigin:t}=this.$props,{crossOrigin:e}=this.$state,{crossOrigin:i,poster:s}=this.#t.$state,n=t()!==null?t():i();e.set(/ytimg\.com|vimeo/.test(s()||"")?null:n===!0?"anonymous":n)}#c(){const{loading:t,error:e}
856=this.$state,{canLoadPoster:i,poster:s}=this.#t.$state;t.set(i()&&!!s()),e.set(null)}#d(){const{loading:t,error:e}=this.$state;t.set(!1),e.set(null)}#h(t){const{loading:e,error:i}=this.$state;e.set(!1),i.set(t)}},m6=class extends S(HTMLElement,f6){static tagName="media-poster";static attrs={crossOrigin:"crossorigin"};#t=document.createElement("img");onSetup(){this.$state.img.set(this.#t)}onConnect(){const{src:t,alt:e,crossOrigin:i}=this.$state;u(()=>{const{loading:s,hidden:n}=this.$state;this.#t.style.display=s()||n()?"none":""}),u(()=>{$(this.#t,"alt",e()),$(this.#t,"crossorigin",i()),$(this.#t,"src",t())}),this.#t.parentNode!==this&&this.prepend(this.#t)}};k(Qf);k(Hf);k(Ff);k(m6);k(Nf);k(Xf);k(Jf);k(t6);k($f);k(bf);k(gf);k(yf);k(Cf);k(wf);k(mf);k(zf);k(Yf);k(r6);k(l6);k(Rf);k(Vf);k(c6);k(u6);k(h6);k(p6);k(Df);k(If);k(_f);k(o6);k(Sf);k(xf);k(e6);k(Ef);k(Pf);k(Tf);k(kf);k(Af);k(s6);k(Lf);k(i6);k(n6);k(Mf);k(qf);k(Ul);k(Of);k(vf);k(ff);k(Gf);k(Wf);k(Kf);var g6=At({icons:()=>y6}),y6={airplay:Hc,download:Kc,play:Fr,pause:qr,replay:tu,mute:Rr,"google-cast":ja,"volume-low":Zs,"volume-high":Ks,"cc-on":Ir,"cc-off":js,"pip-enter":Hr,"pip-exit":Nr,"fs-enter":Dr,"fs-exit":Vr,"seek-forward":iu,"seek-backward":eu,"menu-chapters":Uc,"menu-settings":su,"menu-arrow-left":Bc,"menu-arrow-right":jc,"menu-accessibility":Nc,"menu-audio":Yc,"menu-audio-boost-up":Ks,"menu-audio-boost-down":Zs,"menu-playback":Jc,"menu-speed-up":Or,"menu-speed-down":Or,"menu-captions":js,"menu-quality-up":Br,"menu-quality-down":Br,"menu-radio-check":Wc,"menu-font-size-up":Gc,"menu-font-size-down":Fc,"menu-opacity-up":Zc,"menu-opacity-down":Xc,"kb-play":Fr,"kb-pause":qr,"kb-mute":Rr,"kb-volume-up":Ks,"kb-volume-down":Zs,"kb-fs-enter":Dr,"kb-fs-exit":Vr,"kb-pip-enter":Hr,"kb-pip-exit":Nr,"kb-cc-on":Ir,"kb-cc-off":js,"kb-seek-forward":zc,"kb-seek-backward":Qc},v6=At({icons:()=>E6}),b6='<g><path d="M16,1 L2,1 C1.447,1 1,1.447 1,2 L1,12 C1,12.553 1.447,13 2,13 L5,13 L5,11 L3,11 L3,3 L15,3 L15,11 L13,11 L13,13 L16,13 C16.553,13 17,12.553 17,12 L17,2 C17,1.447 16.553,1 16,1 L16,1 Z"></path><polygon points="4 17 14 17 9 11"></polygon></g>',C6='<g fill-rule="evenodd" fill-opacity="0.5"><path d="M1,1 C0.4,1 0,1.4 0,2 L0,13 C0,13.6 0.4,14 1,14 L5.6,14 L8.3,16.7 C8.5,16.9 8.7,17 9,17 C9.3,17 9.5,16.9 9.7,16.7 L12.4,14 L17,14 C17.6,14 18,13.6 18,13 L18,2 C18,1.4 17.6,1 17,1 L1,1 Z M5.52,11.15 C7.51,11.15 8.53,9.83 8.8,8.74 L7.51,8.35 C7.32,9.01 6.73,9.8 5.52,9.8 C4.38,9.8 3.32,8.97 3.32,7.46 C3.32,5.85 4.44,5.09 5.5,5.09 C6.73,5.09 7.28,5.84 7.45,6.52 L8.75,6.11 C8.47,4.96 7.46,3.76 5.5,3.76 C3.6,3.76 1.89,5.2 1.89,7.46 C1.89,9.72 3.54,11.15 5.52,11.15 Z M13.09,11.15 C15.08,11.15 16.1,9.83 16.37,8.74 L15.08,8.35 C14.89,9.01 14.3,9.8 13.09,9.8 C11.95,9.8 10.89,8.97 10.89,7.46 C10.89,5.85 12.01,5.09 13.07,5.09 C14.3,5.09 14.85,5.84 15.02,6.52 L16.32,6.11 C16.04,4.96 15.03,3.76 13.07,3.76 C11.17,3.76 9.46,5.2 9.46,7.46 C9.46,9.72 11.11,11.15 13.09,11.15 Z"></path></g>',$6='<g fill-rule="evenodd"><path d="M1,1 C0.4,1 0,1.4 0,2 L0,13 C0,13.6 0.4,14 1,14 L5.6,14 L8.3,16.7 C8.5,16.9 8.7,17 9,17 C9.3,17 9.5,16.9 9.7,16.7 L12.4,14 L17,14 C17.6,14 18,13.6 18,13 L18,2 C18,1.4 17.6,1 17,1 L1,1 Z M5.52,11.15 C7.51,11.15 8.53,9.83 8.8,8.74 L7.51,8.35 C7.32,9.01 6.73,9.8 5.52,9.8 C4.38,9.8 3.32,8.97 3.32,7.46 C3.32,5.85 4.44,5.09 5.5,5.09 C6.73,5.09 7.28,5.84 7.45,6.52 L8.75,6.11 C8.47,4.96 7.46,3.76 5.5,3.76 C3.6,3.76 1.89,5.2 1.89,7.46 C1.89,9.72 3.54,11.15 5.52,11.15 Z M13.09,11.15 C15.08,11.15 16.1,9.83 16.37,8.74 L15.08,8.35 C14.89,9.01 14.3,9.8 13.09,9.8 C11.95,9.8 10.89,8.97 10.89,7.46 C10.89,5.85 12.01,5.09 13.07,5.09 C14.3,5.09 14.85,5.84 15.02,6.52 L16.32,6.11 C16.04,4.96 15.03,3.76 13.07,3.76 C11.17,3.76 9.46,5.2 9.46,7.46 C9.46,9.72 11.11,11.15 13.09,11.15 Z"></path></g>',w6='<g transform="translate(2 1)"><path d="M7,12 C7.3,12 7.5,11.9 7.7,11.7 L13.4,6 L12,4.6 L8,8.6 L8,0 L6,0 L6,8.6 L2,4.6 L0.6,6 L6.3,11.7 C6.5,11.9 6.7,12 7,12 Z" /><rect width="14" height="2" y="14" /></g>',T6='<polygon points="10 3 13.6 3 9.6 7 11 8.4 15 4.4 15 8 17 8 17 1 10 1"></polygon>
856<polygon points="7 9.6 3 13.6 3 10 1 10 1 17 8 17 8 15 4.4 15 8.4 11"></polygon>',k6='<polygon points="1 12 4.6 12 0.6 16 2 17.4 6 13.4 6 17 8 17 8 10 1 10"></polygon><polygon points="16 0.6 12 4.6 12 1 10 1 10 8 17 8 17 6 13.4 6 17.4 2"></polygon>',S6='<polygon points="7.875 7.17142857 0 1 0 17 7.875 10.8285714 7.875 17 18 9 7.875 1"></polygon>',x6='<polygon points="12.4 12.5 14.5 10.4 16.6 12.5 18 11.1 15.9 9 18 6.9 16.6 5.5 14.5 7.6 12.4 5.5 11 6.9 13.1 9 11 11.1"></polygon><path d="M3.78571429,6.00820648 L0.714285714,6.00820648 C0.285714286,6.00820648 0,6.30901277 0,6.76022222 L0,11.2723167 C0,11.7235261 0.285714286,12.0243324 0.714285714,12.0243324 L3.78571429,12.0243324 L7.85714286,15.8819922 C8.35714286,16.1827985 9,15.8819922 9,15.2803796 L9,2.75215925 C9,2.15054666 8.35714286,1.77453879 7.85714286,2.15054666 L3.78571429,6.00820648 Z"></path>',P6='<path d="M6,1 L3,1 C2.4,1 2,1.4 2,2 L2,16 C2,16.6 2.4,17 3,17 L6,17 C6.6,17 7,16.6 7,16 L7,2 C7,1.4 6.6,1 6,1 L6,1 Z"></path><path d="M12,1 C11.4,1 11,1.4 11,2 L11,16 C11,16.6 11.4,17 12,17 L15,17 C15.6,17 16,16.6 16,16 L16,2 C16,1.4 15.6,1 15,1 L12,1 Z"></path>',Ta='<polygon points="13.293 3.293 7.022 9.564 8.436 10.978 14.707 4.707 17 7 17 1 11 1"></polygon><path d="M13,15 L3,15 L3,5 L8,5 L8,3 L2,3 C1.448,3 1,3.448 1,4 L1,16 C1,16.552 1.448,17 2,17 L14,17 C14.552,17 15,16.552 15,16 L15,10 L13,10 L13,15 L13,15 Z"></path>',E6={airplay:b6,"captions-off":C6,"captions-on":$6,download:w6,"enter-fullscreen":k6,"exit-fullscreen":T6,"fast-forward":S6,muted:x6,pause:P6,"enter-pip":Ta,"exit-pip":Ta,play:'<path d="M15.5615866,8.10002147 L3.87056367,0.225209313 C3.05219207,-0.33727727 2,0.225209313 2,1.12518784 L2,16.8748122 C2,17.7747907 3.05219207,18.3372773 3.87056367,17.7747907 L15.5615866,9.89997853 C16.1461378,9.44998927 16.1461378,8.55001073 15.5615866,8.10002147 L15.5615866,8.10002147 Z"></path>',restart:'<path d="M9.7,1.2 L10.4,7.6 L12.5,5.5 C14.4,7.4 14.4,10.6 12.5,12.5 C11.6,13.5 10.3,14 9,14 C7.7,14 6.4,13.5 5.5,12.5 C3.6,10.6 3.6,7.4 5.5,5.5 C6.1,4.9 6.9,4.4 7.8,4.2 L7.2,2.3 C6,2.6 4.9,3.2 4,4.1 C1.3,6.8 1.3,11.2 4,14 C5.3,15.3 7.1,16 8.9,16 C10.8,16 12.5,15.3 13.8,14 C16.5,11.3 16.5,6.9 13.8,4.1 L16,1.9 L9.7,1.2 L9.7,1.2 Z"></path>',rewind:'<polygon points="10.125 1 0 9 10.125 17 10.125 10.8285714 18 17 18 1 10.125 7.17142857"></polygon>',settings:'<path d="M16.135,7.784 C14.832,7.458 14.214,5.966 14.905,4.815 C15.227,4.279 15.13,3.817 14.811,3.499 L14.501,3.189 C14.183,2.871 13.721,2.774 13.185,3.095 C12.033,3.786 10.541,3.168 10.216,1.865 C10.065,1.258 9.669,1 9.219,1 L8.781,1 C8.331,1 7.936,1.258 7.784,1.865 C7.458,3.168 5.966,3.786 4.815,3.095 C4.279,2.773 3.816,2.87 3.498,3.188 L3.188,3.498 C2.87,3.816 2.773,4.279 3.095,4.815 C3.786,5.967 3.168,7.459 1.865,7.784 C1.26,7.935 1,8.33 1,8.781 L1,9.219 C1,9.669 1.258,10.064 1.865,10.216 C3.168,10.542 3.786,12.034 3.095,
85613.185 C2.773,13.721 2.87,14.183 3.189,14.501 L3.499,14.811 C3.818,15.13 4.281,15.226 4.815,14.905 C5.967,14.214 7.459,14.832 7.784,16.135 C7.935,16.742 8.331,17 8.781,17 L9.219,17 C9.669,17 10.064,16.742 10.216,16.135 C10.542,14.832 12.034,14.214 13.185,14.905 C13.72,15.226 14.182,15.13 14.501,14.811 L14.811,14.501 C15.129,14.183 15.226,13.72 14.905,13.185 C14.214,12.033 14.832,10.541 16.135,10.216 C16.742,10.065 17,9.669 17,9.219 L17,8.781 C17,8.33 16.74,7.935 16.135,7.784 L16.135,7.784 Z M9,12 C7.343,12 6,10.657 6,9 C6,7.343 7.343,6 9,6 C10.657,6 12,7.343 12,9 C12,10.657 10.657,12 9,12 L9,12 Z"></path>',volume:'<path d="M15.5999996,3.3 C15.1999996,2.9 14.5999996,2.9 14.1999996,3.3 C13.7999996,3.7 13.7999996,4.3 14.1999996,4.7 C15.3999996,5.9 15.9999996,7.4 15.9999996,9 C15.9999996,10.6 15.3999996,12.1 14.1999996,13.3 C13.7999996,13.7 13.7999996,14.3 14.1999996,14.7 C14.3999996,14.9 14.6999996,15 14.8999996,15 C15.1999996,15 15.3999996,14.9 15.5999996,14.7 C17.0999996,13.2 17.9999996,11.2 17.9999996,9 C17.9999996,6.8 17.0999996,4.8 15.5999996,3.3 L15.5999996,3.3 Z"></path><path d="M11.2819745,5.28197449 C10.9060085,5.65794047 10.9060085,6.22188944 11.2819745,6.59785542 C12.0171538,7.33303477 12.2772954,8.05605449 12.2772954,9.00000021 C12.2772954,9.93588462 11.851678,10.9172014 11.2819745,11.4869049 C10.9060085,11.8628709 10.9060085,12.4268199 11.2819745,12.8027859 C11.4271642,12.9479755 11.9176724,13.0649528 12.2998149,12.9592565 C12.4124479,12.9281035 12.5156669,12.8776063 12.5978555,12.8027859 C13.773371,11.732654 14.1311161,10.1597914 14.1312523,9.00000021 C14.1312723,8.8299555 14.1286311,8.66015647 14.119665,8.4897429 C14.0674781,7.49784946 13.8010171,6.48513613 12.5978554,5.28197449 C12.2218894,4.9060085 11.6579405,4.9060085 11.2819745,5.28197449 Z"></path><path d="M3.78571429,6.00820648 L0.714285714,6.00820648 C0.285714286,6.00820648 0,6.30901277 0,6.76022222 L0,11.2723167 C0,11.7235261 0.285714286,12.0243324 0.714285714,12.0243324 L3.78571429,12.0243324 L7.85714286,15.8819922 C8.35714286,16.1827985 9,15.8819922 9,15.2803796 L9,2.75215925 C9,2.15054666 8.35714286,1.77453879 7.85714286,2.15054666 L3.78571429,6.00820648 Z"></path>'},A6=At({insertContent:()=>M6}),L6=Un('<svg viewBox="0 0 32 32" fill="none" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"></svg>');function M6(t,e){const i=Wn(L6);i.innerHTML=ja,t.append(i);const s=document.createElement("span");s.classList.add("vds-google-cast-info"),t.append(s);const n=document.createElement("span");n.classList.add("vds-google-cast-device-name"),u(()=>{const{remotePlaybackInfo:r}=e,a=r();return a?.deviceName&&(n.textContent=a.deviceName,s.append("Google Cast on ",n)),()=>{s.textContent=""}})}function _6(){return"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"}function I6(){return!!window.cast?.framework}function V6(){return!!window.chrome?.cast?.isAvailable}function ka(){return Li().getCastState()===cast.framework.CastState.CONNECTED}function Li(){return window.cast.framework.CastContext.getInstance()}function br(){return Li().getCurrentSession()}function Cr(){return br()?.getSessionObj().media[0]}function Sa(t){return Cr()?.media.contentId===t?.src}function D6(){return{language:"en-US",autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,receiverApplicationId:chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,resumeSavedSession:!0,androidReceiverCompatible:!0}}function jl(t){return`Google Cast Error Code: ${t}`}function R6(t,e){return O(Li(),t,e)}var O6=At({GoogleCastLoader:()=>q6}),q6=class{name="google-cast";target;#t;get cast(){return Li()}mediaType(){return"video"}canPlay(t){return $s&&!Cs&&io(t)}async prompt(t){let e,i,s;try{e=await this.#e(t),this.#t||(this.#t=new cast.framework.RemotePlayer,new cast.framework.RemotePlayerController(this.#t)),i=t.player.createEvent("google-cast-prompt-open",{trigger:e}),t.player.dispatchEvent(i),this.#n(t,"connecting",i),await this.#i(y(t.$props.googleCast)),t.$state.remotePlaybackInfo.set({deviceName:br()?.getCastDevice().friendlyName}),ka()&&this.#n(t,"connected",i)}catch(n){const r=n instanceof Error?n:this.#r((n+"").toUpperCase(),"Prompt failed.");throw s=t.player.createEvent("google-cast-prompt-error",{detail:r,trigger:i??e,cancelable:!0}
856),t.player.dispatch(s),this.#n(t,ka()?"connected":"disconnected",s),r}finally{t.player.dispatch("google-cast-prompt-close",{trigger:s??i??e})}}async load(t){if(!this.#t)throw Error("[vidstack] google cast player was not initialized");return new(await ut(async()=>{const{GoogleCastProvider:e}=await Promise.resolve().then(()=>w3);return{GoogleCastProvider:e}},void 0,import.meta.url)).GoogleCastProvider(this.#t,t)}async#e(t){if(I6())return;const e=t.player.createEvent("google-cast-load-start");t.player.dispatch(e),await Rn(_6()),await customElements.whenDefined("google-cast-launcher");const i=t.player.createEvent("google-cast-loaded",{trigger:e});if(t.player.dispatch(i),!V6())throw this.#r("CAST_NOT_AVAILABLE","Google Cast not available on this platform.");return i}async#i(t){this.#s(t);const e=await this.cast.requestSession();if(e)throw this.#r(e.toUpperCase(),jl(e))}#s(t){this.cast?.setOptions({...D6(),...t})}#n(t,e,i){const s={type:"google-cast",state:e};t.notify("remote-playback-change",s,i)}#r(t,e){const i=Error(e);return i.code=t,i}},N6=At({resolveYouTubeVideoId:()=>$r,utils_exports:()=>H6}),H6=Wl({findYouTubePoster:()=>B6,resolveYouTubeVideoId:()=>$r}),F6=/(?:youtu\.be|youtube|youtube\.com|youtube-nocookie\.com)(?:\/shorts)?\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|)((?:\w|-){11})/,ln=new Map,Wi=new Map;function $r(t){return t.match(F6)?.[1]}async function B6(t,e){if(ln.has(t))return ln.get(t);if(Wi.has(t))return Wi.get(t);const i=new Promise(async s=>{for(const n of["maxresdefault","sddefault","hqdefault"])for(const r of[!0,!1]){const a=G6(t,n,r);if((await fetch(a,{mode:"no-cors",signal:e.signal})).status<400){ln.set(t,a),s(a);return}}}).catch(()=>"").finally(()=>Wi.delete(t));return Wi.set(t,i),i}function G6(t,e,i){return`https://i.ytimg.com/${i?"vi_webp":"vi"}/${t}/${e}.${i?"webp":"jpg"}`}var U6=At({getVimeoVideoInfo:()=>Tr,resolveVimeoVideoId:()=>wr,utils_exports:()=>W6}),W6=Wl({getVimeoVideoInfo:()=>Tr,resolveVimeoVideoId:()=>wr}),j6=/(?:https:\/\/)?(?:player\.)?vimeo(?:\.com)?\/(?:video\/)?(\d+)(?:(?:\?hash=|\?h=|\/)(.*))?/,cn=new Map,ji=new Map,Ki=1920;function wr(t){const e=t.match(j6);return{videoId:e?.[1],hash:e?.[2]}}async function Tr(t,e,i){if(cn.has(t))return cn.get(t);if(ji.has(t))return ji.get(t);let s=`https://vimeo.com/api/oembed.json?url=https://player.vimeo.com/video/${t}`;i&&(s=s.concat(`?h=${i}`));const n=window.fetch(s,{mode:"cors",signal:e.signal}).then(r=>r.json()).then(r=>{const a={title:r?.title??"",duration:r?.duration??0,poster:K6(r),pro:r.account_type!=="basic"};return cn.set(t,a),a}).finally(()=>ji.delete(t));return ji.set(t,n),n}function K6(t){const e=t?.thumbnail_url??"",i=e.match(/vimeocdn\.com\/video\/([^_/?#]+)_/)?.[1];if(!i)return e;const s=Z6(t);return s?`https://i.vimeocdn.com/video/${i}_${s.width}x${s.height}.webp`:e}function Z6(t){const e=t.width||t.thumbnail_width,i=t.height||t.thumbnail_height;return!e||!i?null:e>i?{width:Ki,height:Math.round(Ki*i/e)}:{width:Math.round(Ki*e/i),height:Ki}}var zi=null,ms=[],gs=[];function kr(){return zi??=new AudioContext}function Q6(){const t=kr(),e=t.createGain();return e.connect(t.destination),ms.push(e),e}function z6(t,e){const i=kr().createMediaElementSource(t);return e&&i.connect(e),gs.push(i),i}function Y6(t){const e=ms.indexOf(t);e!==-1&&(ms.splice(e,1),t.disconnect(),Kl())}function X6(t){const e=gs.indexOf(t);e!==-1&&(gs.splice(e,1),t.disconnect(),Kl())}function Kl(){zi&&ms.length===0&&gs.length===0&&zi.close().then(()=>{zi=null})}var J6=class{#t;#e;#i=null;#s=null;get currentGain(){return this.#i?.gain?.value??null}get supported(){return!0}constructor(t,e){this.#t=t,this.#e=e}setGain(t){const e=this.currentGain;if(t!==this.currentGain){if(t===1&&e!==1){this.removeGain();return}this.#i||(this.#i=Q6(),this.#s&&this.#s.connect(this.#i)),this.#s||(this.#s=z6(this.#t,this.#i)),this.#i.gain.value=t,this.#e(t)}}removeGain(){this.#i&&(this.#s&&this.#s.connect(kr().destination),this.#r(),this.#e(null))}destroy(){this.#n(),this.#r()}#n(){if(this.#s)try{X6(this.#s)}catch{}finally{this.#s=null}}#r(){if(this.#i)try{Y6(this.#i)}catch{}finally{this.#i=null}}},t3=["focus","blur","visibilitychange","pageshow","pagehide"],e3=class{#t=C(xa());#e=C(document.visibilityState);#i;connect(){const t=new B(window),e=this.#s.bind(this);for(const i of t3)t.add(i,e);is&&t.add("beforeunload",i=>{this.#i=setTimeout(()=>{i.defaultPrevented||i.returnValue.length>0||(this.#t.set("hidden"),this.#e.set("hidden"))},0)})}get pageState(){return this.#t()}get visibility(){return this.#e()}#s(t){is&&window.clearTimeout(this.#i),(t.type!=="blur"||this.#t()==="active")&&(this.#t.set(xa(t)),this.#e.set(document.visibilityState=="hidden"?"hidden":"visible"))}};function xa(t){return t?.type==="blur"||document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}var i3=class{#t;#e;#i=!1;#s=!1;#n=!1;#r=new Si(this.#h.bind(this));#a=new e3;#l;get#o(){return this.#t.media}
856constructor(t,e){this.#t=t,this.#e=e,this.#l=new B(t.media),this.#p(),this.#a.connect(),u(this.#_.bind(this)),E(this.#u.bind(this))}#u(){this.#s=!1,this.#n=!1,this.#r.stop(),this.#l.abort(),this.#g?.clear()}#c=0;#d=-1;#h(){const t=this.#o.currentTime;!(is&&t-this.#d<.35)&&this.#c!==t&&(this.#v(t),this.#c=t)}#p(){this.#f("loadstart",this.#k),this.#f("abort",this.#b),this.#f("emptied",this.#w),this.#f("error",this.#U),this.#f("volumechange",this.#q)}#m(){this.#s||(this.#f("loadeddata",this.#S),this.#f("loadedmetadata",this.#P),this.#f("canplay",this.#M),this.#f("canplaythrough",this.#L),this.#f("durationchange",this.#T),this.#f("play",this.#A),this.#f("progress",this.#F),this.#f("stalled",this.#E),this.#f("suspend",this.#B),this.#f("ratechange",this.#G),this.#s=!0)}#y(){this.#n||(this.#f("pause",this.#I),this.#f("playing",this.#V),this.#f("seeked",this.#N),this.#f("seeking",this.#H),this.#f("ended",this.#R),this.#f("waiting",this.#D),this.#n=!0)}#g=void 0;#C=void 0;#f(t,e){this.#l.add(t,e.bind(this))}#$(t){}#v(t,e){const i=Math.min(t,this.#e.$state.seekableEnd());this.#e.notify("time-change",i,e)}#k(t){if(this.#o.networkState===3){this.#b(t);return}this.#m(),this.#e.notify("load-start",void 0,t)}#b(t){this.#e.notify("abort",void 0,t)}#w(t){this.#e.notify("emptied",void 0,t)}#S(t){this.#e.notify("loaded-data",void 0,t)}#P(t){this.#c=0,this.#d=-1,this.#y(),this.#e.notify("loaded-metadata",void 0,t),(Cs||is&&Xe(this.#e.$state.source()))&&this.#e.delegate.ready(this.#x(),t)}#x(){return{provider:y(this.#e.$provider),duration:this.#o.duration,buffered:this.#o.buffered,seekable:this.#o.seekable}}#A(t){this.#e.$state.canPlay()&&this.#e.notify("play",void 0,t)}#I(t){this.#o.readyState===1&&!this.#i||(this.#i=!1,this.#r.stop(),this.#e.notify("pause",void 0,t))}#M(t){this.#e.delegate.ready(this.#x(),t)}#L(t){this.#e.$state.started()||this.#e.notify("can-play-through",this.#x(),t)}#V(t){this.#o.paused||(this.#i=!1,this.#e.notify("playing",void 0,t),this.#r.start())}#E(t){this.#e.notify("stalled",void 0,t),this.#o.readyState<3&&(this.#i=!0,this.#e.notify("waiting",void 0,t))}#D(t){this.#o.readyState<3&&(this.#i=!0,this.#e.notify("waiting",void 0,t))}#R(t){this.#r.stop(),this.#v(this.#o.duration,t),this.#e.notify("end",void 0,t),this.#e.$state.loop()&&Oa(this.#o.controls)&&(this.#o.controls=!1)}#_(){const t=this.#e.$state.paused(),e=this.#a.visibility==="hidden";(t||e)&&O(this.#o,"timeupdate",this.#O.bind(this))}#O(t){this.#v(this.#o.currentTime,t)}#T(t){this.#e.$state.ended()&&this.#v(this.#o.duration,t),this.#e.notify("duration-change",this.#o.duration,t)}#q(t){const e={volume:this.#o.volume,muted:this.#o.muted};this.#e.notify("volume-change",e,t)}#N(t){this.#d=this.#o.currentTime,this.#v(this.#o.currentTime,t),this.#e.notify("seeked",this.#o.currentTime,t),Math.trunc(this.#o.currentTime)===Math.trunc(this.#o.duration)&&fn(this.#o.duration)>fn(this.#o.currentTime)&&(this.#v(this.#o.duration,t),this.#o.ended||this.#e.player.dispatch(new I("media-play-request",{trigger:t})))}#H(t){this.#e.notify("seeking",this.#o.currentTime,t)}#F(t){const e={buffered:this.#o.buffered,seekable:this.#o.seekable};this.#e.notify("progress",e,t)}#B(t){this.#e.notify("suspend",void 0,t)}#G(t){this.#e.notify("rate-change",this.#o.playbackRate,t)}#U(t){const e=this.#o.error;if(!e)return;const i={message:e.message,code:e.code,mediaError:e};this.#e.notify("error",i,t)}},s3=class{#t;#e;get#i(){return this.#t.media.audioTracks}constructor(t,e){this.#t=t,this.#e=e,this.#i.onaddtrack=this.#s.bind(this),this.#i.onremovetrack=this.#n.bind(this),this.#i.onchange=this.#r.bind(this),O(this.#e.audioTracks,"change",this.#l.bind(this))}#s(t){const e=t.track;if(e.label==="")return;const i={id:e.id.toString()||`native-audio-${this.#e.audioTracks.length}`,label:e.label,language:e.language,kind:e.kind,selected:!1};this.#e.audioTracks[P.add](i,t),e.enabled&&(i.selected=!0)}#n(t){const e=this.#e.audioTracks.getById(t.track.id);e&&this.#e.audioTracks[P.remove](e,t)}#r(t){let e=this.#a();if(!e)return;const i=this.#e.audioTracks.getById(e.id);i&&this.#e.audioTracks[P.select](i,!0,t)}#a(){return Array.from(this.#i).find(t=>t.enabled)}#l(t){const{current:e}=t.detail;if(!e)return;const i=this.#i.getTrackById(e.id);if(i){const s=this.#a();s&&(s.enabled=!1),i.enabled=!0}}},Zl=class{media;ctx;scope=le();currentSrc=null;audioGain;constructor(t,e){this.media=t,this.ctx=e,this.audioGain=new J6(t,i=>
856{this.ctx.notify("audio-gain-change",i)})}setup(){new i3(this,this.ctx),"audioTracks"in this.media&&new s3(this,this.ctx),E(()=>{this.audioGain.destroy(),this.media.srcObject=null,this.media.removeAttribute("src");for(const t of this.media.querySelectorAll("source"))t.remove();this.media.load()})}get type(){return""}setPlaybackRate(t){this.media.playbackRate=t}async play(){return this.media.play()}async pause(){return this.media.pause()}setMuted(t){this.media.muted=t}setVolume(t){this.media.volume=t}setCurrentTime(t){this.media.currentTime=t}setPlaysInline(t){$(this.media,"playsinline",t)}async loadSource({src:t,type:e},i){this.media.preload=i||"",gu(t)?(this.removeSource(),this.media.srcObject=t):(this.media.srcObject=null,w(t)?e!=="?"?this.appendSource({src:t,type:e}):(this.removeSource(),this.media.src=this.#t(t)):(this.removeSource(),this.media.src=window.URL.createObjectURL(t))),this.media.load(),this.currentSrc={src:t,type:e}}appendSource(t,e){const i=this.media.querySelector("source[data-vds]"),s=i??document.createElement("source");$(s,"src",this.#t(t.src)),$(s,"type",t.type!=="?"?t.type:e),$(s,"data-vds",""),i||this.media.append(s)}removeSource(){this.media.querySelector("source[data-vds]")?.remove()}#t(t){const{clipStartTime:e,clipEndTime:i}=this.ctx.$state,s=e(),n=i();return s>0&&n>0?`${t}#t=${s},${n}`:s>0?`${t}#t=${s}`:n>0?`${t}#t=0,${n}`:t}},n3=class{#t;#e;#i;#s=C(!1);get supported(){return this.#s()}constructor(t,e){this.#t=t,this.#e=e,this.#n()}#n(){!this.#t?.remote||!this.canPrompt||(this.#t.remote.watchAvailability(t=>{this.#s.set(t)}).catch(()=>{this.#s.set(!1)}),u(this.#r.bind(this)))}#r(){if(!this.#s())return;const t=["connecting","connect","disconnect"],e=this.#a.bind(this);e(),O(this.#t,"playing",e);const i=new B(this.#t.remote);for(const s of t)i.add(s,e)}async prompt(){if(!this.supported)throw Error("Not supported on this platform.");return this.type==="airplay"&&this.#t.webkitShowPlaybackTargetPicker?this.#t.webkitShowPlaybackTargetPicker():this.#t.remote.prompt()}#a(t){const e=this.#t.remote.state;if(e===this.#i)return;const i={type:this.type,state:e};this.#e.notify("remote-playback-change",i,t),this.#i=e}},Ql=class extends n3{type="airplay";get canPrompt(){return"WebKitPlaybackTargetAvailabilityEvent"in window}},r3=At({AudioProvider:()=>a3}),a3=class extends Zl{$$PROVIDER_TYPE="AUDIO";get type(){return"audio"}airPlay;constructor(t,e){super(t,e),lt(()=>{this.airPlay=new Ql(this.media,e)},this.scope)}setup(){super.setup(),this.type==="audio"&&this.ctx.notify("provider-setup",this)}get audio(){return this.media}},o3=class{#t;#e;constructor(t,e){this.#t=t,this.#e=e,t.textTracks.onaddtrack=this.#i.bind(this),E(this.#s.bind(this))}#i(t){const e=t.track;if(!e||l3(this.#t,e))return;const i=new ce({id:e.id,kind:e.kind,label:e.label??"",language:e.language,type:"vtt"});i[L.native]={track:e},i[L.readyState]=2,i[L.nativeHLS]=!0;let s=0;const n=r=>{if(e.cues)for(let a=s;a<e.cues.length;a++)i.addCue(e.cues[a],r),s++};n(t),e.oncuechange=n,this.#e.textTracks.add(i,t),i.setMode(e.mode,t)}#s(){this.#t.textTracks.onaddtrack=null;for(const t of this.#e.textTracks){const e=t[L.native]?.track;e?.oncuechange&&(e.oncuechange=null)}}};function l3(t,e){return Array.from(t.children).find(i=>i.track===e)}var c3=class{#t;#e;constructor(t,e){this.#t=t,this.#e=e,new B(t).add("enterpictureinpicture",this.#i.bind(this)).add("leavepictureinpicture",this.#s.bind(this))}get active(){return document.pictureInPictureElement===this.#t}get supported(){return Ja(this.#t)}async enter(){return this.#t.requestPictureInPicture()}exit(){return document.exitPictureInPicture()}#i(t){this.#n(!0,t)}#s(t){this.#n(!1,t)}#n=(t,e)=>{this.#e.notify("picture-in-picture-change",t,e)}},u3=class{#t;#e;#i="inline";get mode(){return this.#i}constructor(t,e){this.#t=t,this.#e=e,O(t,"webkitpresentationmodechanged",this.#s.bind(this))}get supported(){return to(this.#t)}async setPresentationMode(t){this.#i!==t&&this.#t.webkitSetPresentationMode(t)}#s(t){const e=this.#i;this.#i=this.#t.webkitPresentationMode,this.#e.player?.dispatch(new I("video-presentation-change",{detail:this.#i,trigger:t})),["fullscreen","picture-in-picture"].forEach(i=>
856{(this.#i===i||e===i)&&this.#e.notify(`${i}-change`,this.#i===i,t)})}},h3=class{#t;get active(){return this.#t.mode==="fullscreen"}get supported(){return this.#t.supported}constructor(t){this.#t=t}async enter(){this.#t.setPresentationMode("fullscreen")}async exit(){this.#t.setPresentationMode("inline")}},d3=class{#t;get active(){return this.#t.mode==="picture-in-picture"}get supported(){return this.#t.supported}constructor(t){this.#t=t}async enter(){this.#t.setPresentationMode("picture-in-picture")}async exit(){this.#t.setPresentationMode("inline")}},Sr=class extends Zl{$$PROVIDER_TYPE="VIDEO";get type(){return"video"}airPlay;fullscreen;pictureInPicture;constructor(t,e){super(t,e),lt(()=>{if(this.airPlay=new Ql(t,e),to(t)){const i=new u3(t,e);this.fullscreen=new h3(i),this.pictureInPicture=new d3(i)}else Ja(t)&&(this.pictureInPicture=new c3(t,e))},this.scope)}setup(){super.setup(),Xa(this.video)&&new o3(this.video,this.ctx),this.ctx.textRenderers.attachVideo(this.video),E(()=>{this.ctx.textRenderers.attachVideo(null)}),this.type==="video"&&this.ctx.notify("provider-setup",this)}get video(){return this.media}};function Pa(t){try{return new Intl.DisplayNames(navigator.languages,{type:"language"}).of(t)??null}catch{return null}}var p3=t=>`dash-${Xt(t)}`,f3=class{#t;#e;#i=null;#s=new Set;#n=null;config={};get instance(){return this.#i}constructor(t,e){this.#t=t,this.#e=e}setup(t){this.#i=t().create();const e=this.#o.bind(this);for(const i of Object.values(t.events))this.#i.on(i,e);this.#i.on(t.events.ERROR,this.#g.bind(this));for(const i of this.#s)i(this.#i);this.#e.player.dispatch("dash-instance",{detail:this.#i}),this.#i.initialize(this.#t,void 0,!1),this.#i.updateSettings({streaming:{text:{defaultEnabled:!1,dispatchForManualRendering:!0},buffer:{fastSwitchEnabled:!0}},...this.config}),this.#i.on(t.events.FRAGMENT_LOADING_STARTED,this.#C.bind(this)),this.#i.on(t.events.FRAGMENT_LOADING_COMPLETED,this.#f.bind(this)),this.#i.on(t.events.MANIFEST_LOADED,this.#y.bind(this)),this.#i.on(t.events.QUALITY_CHANGE_RENDERED,this.#m.bind(this)),this.#i.on(t.events.TEXT_TRACKS_ADDED,this.#h.bind(this)),this.#i.on(t.events.TRACK_CHANGE_RENDERED,this.#p.bind(this)),this.#e.qualities[ot.enableAuto]=this.#w.bind(this),O(this.#e.qualities,"change",this.#P.bind(this)),O(this.#e.audioTracks,"change",this.#x.bind(this)),this.#n=u(this.#a.bind(this))}#r(t){return new I(p3(t.type),{detail:t})}#a(){if(!this.#e.$state.live())return;const t=new Si(this.#l.bind(this));return t.start(),t.stop.bind(t)}#l(){if(!this.#i)return;const t=this.#i.duration()-this.#i.time();this.#e.$state.liveSyncPosition.set(isNaN(t)?1/0:t)}#o(t){this.#e.player?.dispatch(this.#r(t))}#u=null;#c={};#d(t){const e=this.#u?.[L.native],i=(e?.track).cues;if(!e||!i)return;const s=this.#u.id,n=this.#c[s]??0,r=this.#r(t);for(let a=n;a<i.length;a++){const o=i[a];o.positionAlign||(o.positionAlign="auto"),this.#u.addCue(o,r)}this.#c[s]=i.length}#h(t){if(!this.#i)return;const e=t.tracks,i=[...this.#t.textTracks].filter(n=>"manualMode"in n),s=this.#r(t);for(let n=0;n<i.length;n++){const r=e[n],a=i[n],o=new ce({id:`dash-${r.kind}-${n}`,label:r?.label??r.labels.find(l=>l.text)?.text??(r?.lang&&Pa(r.lang))??r?.lang??void 0,language:r.lang??void 0,kind:r.kind,default:r.defaultTrack});o[L.native]={managed:!0,track:a},o[L.readyState]=2,o[L.onModeChange]=()=>{this.#i&&(o.mode==="showing"?(this.#i.setTextTrack(n),this.#u=o):(this.#i.setTextTrack(-1),this.#u=null))},this.#e.textTracks.add(o,s)}}#p(t){const{mediaType:e,newMediaInfo:i}=t;if(e==="audio"){const s=this.#e.audioTracks.getById(`dash-audio-${i.index}`);if(s){const n=this.#r(t);this.#e.audioTracks[P.select](s,!0,n)}}}#m(t){if(t.mediaType!=="video")return;const e=this.#e.qualities[t.newQuality];if(e){const i=this.#r(t);this.#e.qualities[P.select](e,!0,i)}}#y(t){if(this.#e.$state.canPlay()||!this.#i)return;const{type:e,mediaPresentationDuration:i}=t.data,s=this.#r(t);this.#e.notify("stream-type-change",e!=="static"?"live":"on-demand",s),this.#e.notify("duration-change",i,s),this.#e.qualities[ot.setAuto](!0,s);const n=this.#i.getVideoElement(),r=this.#i.getTracksForTypeFromManifest("video",t.data),a=[...new Set(r.map(c=>c.mimeType))].find(c=>c&&Ya(n,c)),o=r.find(c=>a===c.mimeType);let l=this.#i.getTracksForTypeFromManifest("audio",t.data);const h=[...new Set(l.map(c=>c.mimeType))].find(c=>c&&za(n,c));if(l=l.filter(c=>h===c.mimeType),o&&(o.bitrateList.forEach((c,d)=>{const p={id:c.id?.toString()??`dash-bitrate-${d}`,width:c.width??0,height:c.height??0,bitrate:c.bandwidth??0,codec:o.codec,index:d};this.#e.qualities[P.add](p,s)}
856),it(o.index))){const c=this.#e.qualities[o.index];c&&this.#e.qualities[P.select](c,!0,s)}l.forEach((c,d)=>{const p=c.labels.find(v=>navigator.languages.some(b=>v.lang&&b.toLowerCase().startsWith(v.lang.toLowerCase())))||c.labels[0],m={id:`dash-audio-${c?.index}`,label:p?.text??(c.lang&&Pa(c.lang))??c.lang??"",language:c.lang??"",kind:"main",mimeType:c.mimeType,codec:c.codec,index:d};this.#e.audioTracks[P.add](m,s)}),n.dispatchEvent(new I("canplay",{trigger:s}))}#g(t){const{type:e,error:i}=t;i.code===27?this.#v(i):this.#b(i)}#C(){this.#$>=0&&this.#k()}#f(t){t.mediaType==="text"&&requestAnimationFrame(this.#d.bind(this,t))}#$=-1;#v(t){this.#k(),this.#i?.play(),this.#$=window.setTimeout(()=>{this.#$=-1,this.#b(t)},5e3)}#k(){clearTimeout(this.#$),this.#$=-1}#b(t){this.#e.notify("error",{message:t.message??"",code:1,error:t})}#w(){this.#S("video",!0);const{qualities:t}=this.#e;this.#i?.setQualityFor("video",t.selectedIndex,!0)}#S(t,e){this.#i?.updateSettings({streaming:{abr:{autoSwitchBitrate:{[t]:e}}}})}#P(){const{qualities:t}=this.#e;!this.#i||t.auto||!t.selected||(this.#S("video",!1),this.#i.setQualityFor("video",t.selectedIndex,t.switch==="current"),$s&&(this.#t.currentTime=this.#t.currentTime))}#x(){if(!this.#i)return;const{audioTracks:t}=this.#e,e=this.#i.getTracksFor("audio").find(i=>t.selected&&t.selected.id===`dash-audio-${i.index}`);e&&this.#i.setCurrentTrack(e)}#A(){this.#k(),this.#u=null,this.#c={}}onInstance(t){return this.#s.add(t),()=>this.#s.delete(t)}loadSource(t){this.#A(),w(t.src)&&this.#i?.attachSource(t.src)}destroy(){this.#A(),this.#i?.destroy(),this.#i=null,this.#n?.(),this.#n=null}},m3=class{#t;#e;#i;constructor(t,e,i){this.#t=t,this.#e=e,this.#i=i,this.#s()}async#s(){const t={onLoadStart:this.#n.bind(this),onLoaded:this.#r.bind(this),onLoadError:this.#a.bind(this)};let e=await y3(this.#t,t);if(ct(e)&&!w(this.#t)&&(e=await g3(this.#t,t)),!e)return null;if(!window.dashjs.supportsMediaSource()){const i="[vidstack] `dash.js` is not supported in this environment";return this.#e.player.dispatch(new I("dash-unsupported")),this.#e.notify("error",{message:i,code:4}),null}return e}#n(){this.#e.player.dispatch(new I("dash-lib-load-start"))}#r(t){this.#e.player.dispatch(new I("dash-lib-loaded",{detail:t})),this.#i(t)}#a(t){const e=pi(t);this.#e.player.dispatch(new I("dash-lib-load-error",{detail:e})),this.#e.notify("error",{message:e.message,code:4,error:e})}};async function g3(t,e={}){if(!ct(t)){if(e.onLoadStart?.(),v3(t))return e.onLoaded?.(t),t;if(Ea(t)){const i=t.MediaPlayer;return e.onLoaded?.(i),i}try{const i=(await t())?.default;if(Ea(i))return e.onLoaded?.(i.MediaPlayer),i.MediaPlayer;if(i)e.onLoaded?.(i);else throw Error("");return i}catch(i){e.onLoadError?.(i)}}}async function y3(t,e={}){if(w(t)){e.onLoadStart?.();try{if(await Rn(t),!ft(window.dashjs.MediaPlayer))throw Error("");const i=window.dashjs.MediaPlayer;return e.onLoaded?.(i),i}catch(i){e.onLoadError?.(i)}}}function v3(t){return t&&t.prototype&&t.prototype!==Function}function Ea(t){return t&&"MediaPlayer"in t}var b3="https://cdn.jsdelivr.net",C3=class extends Sr{$$PROVIDER_TYPE="DASH";#t=null;#e=new f3(this.video,this.ctx);get ctor(){return this.#t}get instance(){return this.#e.instance}static supported=eo();get type(){return"dash"}get canLiveSync(){return!0}#i=`${b3}/npm/[email protected]/dist/dash.all.min.js`;get config(){return this.#e.config}set config(t){this.#e.config=t}get library(){return this.#i}set library(t){this.#i=t}preconnect(){w(this.#i)&&te(this.#i)}setup(){super.setup(),new m3(this.#i,this.ctx,t=>{this.#t=t,this.#e.setup(t),this.ctx.notify("provider-setup",this);const e=y(this.ctx.$state.source);e&&this.loadSource(e)})}async loadSource(t,e){if(!w(t.src)){this.removeSource();return}this.media.preload=e||"",this.appendSource(t,"application/x-mpegurl"),this.#e.loadSource(t),this.currentSrc=t}onInstance(t){const e=this.#e.instance;return e&&t(e),this.#e.onInstance(t)}destroy(){this.#e.destroy()}},$3=At({DASHProvider:()=>C3}),w3=At({GoogleCastProvider:()=>S3}),T3=class{#t;constructor(t){this.#t=new chrome.cast.media.MediaInfo(t.src,t.type)}build(){return this.#t}setStreamType(t){return t.includes("live")?this.#t.streamType=chrome.cast.media.StreamType.LIVE:this.#t.streamType=chrome.cast.media.StreamType.BUFFERED,this}setTracks(t){return this.#t.tracks=t.map(this.#e),this}setMetadata(t,e){return this.#t.metadata=new chrome.cast.media.GenericMediaMetadata,this.#t.metadata.title=t,this.#t.metadata.images=[{url:e}],this}#e(t,e){const i=new chrome.cast.media.Track(e,chrome.cast.media.TrackType.TEXT);return i.name=t.label,i.trackContentId=t.src,i.trackContentType="text/vtt",i.language=t.language,i.subtype=t.kind.toUpperCase(),i}},k3=class{#t;#e;#i;constructor(t,e,i){this.#t=t,this.#e=e,this.#i=i}setup(){const t=this.syncRemoteActiveIds.bind(this);O(this.#e.audioTracks,"change",t),O(this.#e.textTracks,"mode-change",t),u(this.#a.bind(this))}getLocalTextTracks(){return this.#e.$state.textTracks().filter(t=>t.src&&t.type==="vtt")}#s(){return this.#e.$state.audioTracks()}#n(t){const e=this.#t.mediaInfo?.tracks??[];return t?e.filter(i=>i.type===t):e}#r(){const t=[],e=this.#s().find(s=>s.selected),i=this.getLocalTextTracks().filter(s=>s.mode==="showing");if(e){const s=this.#n(chrome.cast.media.TrackType.AUDIO),n=this.#u(s,e);
856n&&t.push(n.trackId)}if(i?.length){const s=this.#n(chrome.cast.media.TrackType.TEXT);if(s.length)for(const n of i){const r=this.#u(s,n);r&&t.push(r.trackId)}}return t}#a(){const t=this.getLocalTextTracks();if(!this.#t.isMediaLoaded)return;const e=this.#n(chrome.cast.media.TrackType.TEXT);for(const i of t)if(!this.#u(e,i)){Be(()=>this.#i?.());break}}syncRemoteTracks(t){if(!this.#t.isMediaLoaded)return;const e=this.#s(),i=this.getLocalTextTracks(),s=this.#n(chrome.cast.media.TrackType.AUDIO),n=this.#n(chrome.cast.media.TrackType.TEXT);for(const r of s){if(this.#o(e,r))continue;const a={id:r.trackId.toString(),label:r.name,language:r.language,kind:r.subtype??"main",selected:!1};this.#e.audioTracks[P.add](a,t)}for(const r of n){if(this.#o(i,r))continue;const a={id:r.trackId.toString(),src:r.trackContentId,label:r.name,language:r.language,kind:r.subtype.toLowerCase()};this.#e.textTracks.add(a,t)}}syncRemoteActiveIds(t){if(!this.#t.isMediaLoaded)return;const e=this.#r(),i=new chrome.cast.media.EditTracksInfoRequest(e);this.#l(i).catch(s=>{})}#l(t){const e=Cr();return new Promise((i,s)=>e?.editTracksInfo(t,i,s))}#o(t,e){return t.find(i=>this.#c(i,e))}#u(t,e){return t.find(i=>this.#c(e,i))}#c(t,e){return e.name===t.label&&e.language===t.language&&e.subtype.toLowerCase()===t.kind.toLowerCase()}},S3=class{$$PROVIDER_TYPE="GOOGLE_CAST";scope=le();#t;#e;#i;#s=null;#n="disconnected";#r=0;#a=0;#l=new et(0,0);#o=new Si(this.#f.bind(this));#u;#c=null;#d=!1;constructor(t,e){this.#t=t,this.#e=e,this.#i=new k3(t,e,this.#O.bind(this))}get type(){return"google-cast"}get currentSrc(){return this.#s}get player(){return this.#t}get cast(){return Li()}get session(){return br()}get media(){return Cr()}get hasActiveSession(){return Sa(this.#s)}setup(){this.#h(),this.#p(),this.#i.setup(),this.#e.notify("provider-setup",this)}#h(){R6(cast.framework.CastContextEventType.CAST_STATE_CHANGED,this.#v.bind(this))}#p(){const t=cast.framework.RemotePlayerEventType,e={[t.IS_CONNECTED_CHANGED]:this.#v,[t.IS_MEDIA_LOADED_CHANGED]:this.#k,[t.CAN_CONTROL_VOLUME_CHANGED]:this.#b,[t.CAN_SEEK_CHANGED]:this.#w,[t.DURATION_CHANGED]:this.#x,[t.IS_MUTED_CHANGED]:this.#A,[t.VOLUME_LEVEL_CHANGED]:this.#A,[t.IS_PAUSED_CHANGED]:this.#I,[t.LIVE_SEEKABLE_RANGE_CHANGED]:this.#M,[t.PLAYER_STATE_CHANGED]:this.#L};this.#u=e;const i=this.#$.bind(this);for(const s of es(e))this.#t.controller.addEventListener(s,i);E(()=>{for(const s of es(e))this.#t.controller.removeEventListener(s,i)})}async play(){if(!(!this.#t.isPaused&&!this.#d)){if(this.#d){await this.#_(!1,0);return}this.#t.controller?.playOrPause()}}async pause(){this.#t.isPaused||this.#t.controller?.playOrPause()}getMediaStatus(t){return new Promise((e,i)=>{this.media?.getStatus(t,e,i)})}setMuted(t){(t&&!this.#t.isMuted||!t&&this.#t.isMuted)&&this.#t.controller?.muteOr
856Unmute()}setCurrentTime(t){this.#t.currentTime=t,this.#e.notify("seeking",t),this.#t.controller?.seek()}setVolume(t){this.#t.volumeLevel=t,this.#t.controller?.setVolumeLevel()}async loadSource(t){if(this.#c?.src!==t&&(this.#c=null),Sa(t)){this.#y(),this.#s=t;return}this.#e.notify("load-start");const e=this.#R(t),i=await this.session.loadMedia(e);if(i){this.#s=null,this.#e.notify("error",Error(jl(i)));return}this.#s=t}destroy(){this.#m(),this.#g()}#m(){this.#c||(this.#a=0,this.#l=new et(0,0)),this.#o.stop(),this.#r=0,this.#c=null}#y(){const t=new I("resume-session",{detail:this.session});this.#k(t);const{muted:e,volume:i,savedState:s}=this.#e.$state,n=s();this.setCurrentTime(Math.max(this.#t.currentTime,n?.currentTime??0)),this.setMuted(e()),this.setVolume(i()),n?.paused===!1&&this.play()}#g(){this.cast.endCurrentSession(!0);const{remotePlaybackLoader:t}=this.#e.$state;t.set(null)}#C(){const{savedState:t}=this.#e.$state;t.set({paused:this.#t.isPaused,currentTime:this.#t.currentTime}),this.#g()}#f(){this.#P()}#$(t){this.#u[t.type].call(this,t)}#v(t){const e=this.cast.getCastState(),i=e===cast.framework.CastState.CONNECTED?"connected":e===cast.framework.CastState.CONNECTING?"connecting":"disconnected";if(this.#n===i)return;const s={type:"google-cast",state:i},n=this.#E(t);this.#n=i,this.#e.notify("remote-playback-change",s,n),i==="disconnected"&&this.#C()}#k(t){if(!this.#t.isMediaLoaded)return;const e=y(this.#e.$state.source);Promise.resolve().then(()=>{if(e!==y(this.#e.$state.source)||!this.#t.isMediaLoaded)return;this.#m();const i=this.#t.duration;this.#l=new et(0,i);const s={provider:this,duration:i,buffered:new et(0,0),seekable:this.#V()},n=this.#E(t);this.#e.notify("loaded-metadata",void 0,n),this.#e.notify("loaded-data",void 0,n),this.#e.notify("can-play",s,n),this.#b(),this.#w(t);const{volume:r,muted:a}=this.#e.$state;this.setVolume(r()),this.setMuted(a()),this.#o.start(),this.#i.syncRemoteTracks(n),this.#i.syncRemoteActiveIds(n)})}#b(){this.#e.$state.canSetVolume.set(this.#t.canControlVolume)}#w(t){const e=this.#E(t);this.#e.notify("stream-type-change",this.#S(),e)}#S(){return this.#t.mediaInfo?.streamType===chrome.cast.media.StreamType.LIVE?this.#t.canSeek?"live:dvr":"live":"on-demand"}#P(){if(this.#c)return;const t=this.#t.currentTime;t!==this.#r&&(this.#e.notify("time-change",t),t>this.#a&&(this.#a=t,this.#M()),this.#e.$state.seeking()&&this.#e.notify("seeked",t),this.#r=t)}#x(t){if(!this.#t.isMediaLoaded||this.#c)return;const e=this.#t.duration,i=this.#E(t);this.#l=new et(0,e),this.#e.notify("duration-change",e,i)}#A(t){if(!this.#t.isMediaLoaded)return;const e={muted:this.#t.isMuted,volume:this.#t.volumeLevel},i=this.#E(t);this.#e.notify("volume-change",e,i)}#I(t){const e=this.#E(t);this.#t.isPaused?this.#e.notify("pause",void 0,e):this.#e.notify("play",void 0,e)}#M(t){const e={seekable:this.#V(),buffered:new et(0,this.#a)},i=t?this.#E(t):void 0;this.#e.notify("progress",e,i)}#L(t){const e=this.#t.playerState,i=chrome.cast.media.PlayerState;if(this.#d=e===i.IDLE,e===i.PAUSED)return;const s=this.#E(t);switch(e){case i.PLAYING:this.#e.notify("playing",void 0,s);break;case i.BUFFERING:this.#e.notify("waiting",void 0,s);break;case i.IDLE:this.#o.stop(),this.#e.notify("pause"),this.#e.notify("end");break}}#V(){return this.#t.liveSeekableRange?new et(this.#t.liveSeekableRange.start,this.#t.liveSeekableRange.end):this.#l}#E(t){return t instanceof Event?t:new I(t.type,{detail:t})}#D(t){const{streamType:e,title:i,poster:s}=this.#e.$state;return new T3(t).setMetadata(i(),s()).setStreamType(e()).setTracks(this.#i.getLocalTextTracks()).build()}#R(t){const e=this.#D(t),i=new chrome.cast.media.LoadRequest(e),s=this.#e.$state.savedState();return i.autoplay=(this.#c?.paused??s?.paused)===!1,i.currentTime=this.#c?.time??s?.currentTime??0,i}async#_(t,e){const i=y(this.#e.$state.source);this.#c={src:i,paused:t,time:e},await this.loadSource(i)}#O(){this.#_(this.#t.isPaused,this.#t.currentTime).catch(t=>{})}},x3=At({HLSProvider:()=>I3}),P3=t=>Xt(t),E3=class{#t;#e;#i=null;#s=null;config={};#n=new Set;get instance(){return this.#i}constructor(t,e){this.#t=t,this.#e=e}setup(t){const{streamType:e}=this.#e.$state,i=y(e).includes("live"),s=y(e).includes("ll-"),n=this.#i=new t({lowLatencyMode:s,backBufferLength:s?4:i?8:void 0,renderTextTracksNatively:!1,...this.config}),r=o=>(l,h)=>{this.#i===n&&o(l,h)},a=r(this.#o.bind(this));
856for(const o of Object.values(t.Events))n.on(o,a);n.on(t.Events.ERROR,r(this.#y.bind(this)));for(const o of this.#n)o(n);this.#e.player.dispatch("hls-instance",{detail:n}),n.attachMedia(this.#t),n.on(t.Events.AUDIO_TRACK_SWITCHED,r(this.#d.bind(this))),n.on(t.Events.LEVEL_SWITCHED,r(this.#h.bind(this))),n.on(t.Events.LEVEL_LOADED,r(this.#m.bind(this,n))),n.on(t.Events.LEVEL_UPDATED,r(this.#p.bind(this))),n.on(t.Events.NON_NATIVE_TEXT_TRACKS_FOUND,r(this.#u.bind(this,n))),n.on(t.Events.CUES_PARSED,r(this.#c.bind(this,n))),this.#e.qualities[ot.enableAuto]=this.#C.bind(this),O(this.#e.qualities,"change",this.#f.bind(this)),O(this.#e.audioTracks,"change",this.#$.bind(this)),this.#s=u(this.#a.bind(this))}#r(t,e){return new I(P3(t),{detail:e})}#a(){if(!this.#e.$state.live())return;const t=new Si(this.#l.bind(this));return t.start(),t.stop.bind(t)}#l(){this.#e.$state.liveSyncPosition.set(this.#i?.liveSyncPosition??1/0)}#o(t,e){this.#e.player?.dispatch(this.#r(t,e))}#u(t,e,i){const s=this.#r(e,i);let n=-1;for(let r=0;r<i.tracks.length;r++){const a=i.tracks[r],o=a.subtitleTrack??a.closedCaptions,l=new ce({id:`hls-${a.kind}-${r}`,src:o?.url,label:a.label,language:o?.lang,kind:a.kind,default:a.default});l[L.readyState]=2,l[L.onModeChange]=()=>{this.#i===t&&(l.mode==="showing"?(t.subtitleTrack=r,n=r):n===r&&(t.subtitleTrack=-1,n=-1))},this.#e.textTracks.add(l,s)}}#c(t,e,i){const s=t.subtitleTrack,n=this.#e.textTracks.getById(`hls-${i.type}-${s}`);if(!n)return;const r=this.#r(e,i);for(const a of i.cues)a.positionAlign="auto",n.addCue(a,r)}#d(t,e){const i=this.#e.audioTracks[e.id];if(i){const s=this.#r(t,e);this.#e.audioTracks[P.select](i,!0,s)}}#h(t,e){const i=this.#e.qualities[e.level];if(i){const s=this.#r(t,e);this.#e.qualities[P.select](i,!0,s)}}#p(t,e){e.details.totalduration>0&&this.#e.$state.inferredLiveDVRWindow.set(e.details.totalduration)}#m(t,e,i){if(this.#e.$state.canPlay())return;const s=t.media;if(!s)return;const{type:n,live:r,totalduration:a,targetduration:o}=i.details,l=this.#r(e,i);this.#e.notify("stream-type-change",r?n==="EVENT"&&Number.isFinite(a)&&o>=10?"live:dvr":"live":"on-demand",l),this.#e.notify("duration-change",a,l),t.currentLevel===-1&&this.#e.qualities[ot.setAuto](!0,l);for(const h of t.audioTracks){const c={id:h.id.toString(),label:h.name,language:h.lang||"",kind:"main"};this.#e.audioTracks[P.add](c,l)}for(const h of t.levels){const c={id:h.id?.toString()??h.height+"p",width:h.width,height:h.height,codec:h.codecSet,bitrate:h.bitrate};this.#e.qualities[P.add](c,l)}s.dispatchEvent(new I("canplay",{trigger:l}))}#y(t,e){e.fatal&&(e.type==="mediaError"?this.#i?.recoverMediaError():this.#g(e.error))}#g(t){this.#e.notify("error",{message:t.message,code:1,error:t})}#C(){this.#i&&(this.#i.currentLevel=-1)}#f(){const{qualities:t}=this.#e;!this.#i||t.auto||(this.#i[t.switch+"Level"]=t.selectedIndex,$s&&(this.#t.currentTime=this.#t.currentTime))}#$(){const{audioTracks:t}=this.#e;this.#i&&this.#i.audioTrack!==t.selectedIndex&&(this.#i.audioTrack=t.selectedIndex)}onInstance(t){return this.#n.add(t),()=>this.#n.delete(t)}loadSource(t){w(t.src)&&this.#i?.loadSource(t.src)}destroy(){this.#i?.destroy(),this.#i=null,this.#s?.(),this.#s=null}},A3=class{#t;#e;#i;constructor(t,e,i){this.#t=t,this.#e=e,this.#i=i,this.#s()}async#s(){const t={onLoadStart:this.#n.bind(this),onLoaded:this.#r.bind(this),onLoadError:this.#a.bind(this)};let e=await M3(this.#t,t);if(ct(e)&&!w(this.#t)&&(e=await L3(this.#t,t)),!e)return null;if(!e.isSupported()){const i="[vidstack] `hls.js` is not supported in this environment";return this.#e.player.dispatch(new I("hls-unsupported")),this.#e.notify("error",{message:i,code:4}),null}return e}#n(){this.#e.player.dispatch(new I("hls-lib-load-start"))}#r(t){this.#e.player.dispatch(new I("hls-lib-loaded",{detail:t})),this.#i(t)}#a(t){const e=pi(t);this.#e.player.dispatch(new I("hls-lib-load-error",{detail:e})),this.#e.notify("error",{message:e.message,code:4,error:e})}};async function L3(t,e={}){if(!ct(t)){if(e.onLoadStart?.(),t.prototype&&t.prototype!==Function)return e.onLoaded?.(t),t;try{const i=(await t())?.default;if(i&&i.isSupported)e.onLoaded?.(i);else throw Error("");return i}catch(i){e.onLoadError?.(i)}}}async function M3(t,e={}){if(w(t)){e.onLoadStart?.();try{if(await Rn(t),!ft(window.Hls))throw Error("");const i=window.Hls;return e.onLoaded?.(i),i}catch(i){e.onLoadError?.(i)}}}var _3="https://cdn.jsdelivr.net",I3=class extends Sr{$$PROVIDER_TYPE="HLS";#t=null;#e=new E3(this.video,this.ctx);get ctor(){return this.#t}get instance(){return this.#e.instance}
856static supported=ws();get type(){return"hls"}get canLiveSync(){return!0}#i=`${_3}/npm/hls.js@^1.5.0/dist/hls.min.js`;get config(){return this.#e.config}set config(t){this.#e.config=t}get library(){return this.#i}set library(t){this.#i=t}preconnect(){w(this.#i)&&te(this.#i)}setup(){super.setup(),new A3(this.#i,this.ctx,t=>{this.#t=t,this.#e.setup(t),this.ctx.notify("provider-setup",this);const e=y(this.ctx.$state.source);e&&this.loadSource(e)})}async loadSource(t,e){if(!w(t.src)){this.removeSource();return}this.media.preload=e||"",this.appendSource(t,"application/x-mpegurl"),this.#e.loadSource(t),this.currentSrc=t}onInstance(t){const e=this.#e.instance;return e&&t(e),this.#e.onInstance(t)}destroy(){this.#e.destroy()}},V3=At({VideoProvider:()=>Sr}),zl=class{#t;src=C("");referrerPolicy=null;get iframe(){return this.#t}constructor(t){this.#t=t,t.setAttribute("frameBorder","0"),t.setAttribute("aria-hidden","true"),t.setAttribute("allow","autoplay; fullscreen; encrypted-media; picture-in-picture; accelerometer; gyroscope"),this.referrerPolicy!==null&&t.setAttribute("referrerpolicy",this.referrerPolicy)}setup(){O(window,"message",this.#i.bind(this)),O(this.#t,"load",this.onLoad.bind(this)),u(this.#e.bind(this))}#e(){const t=this.src();if(!t.length){this.#t.setAttribute("src","");return}const e=y(()=>this.buildParams());this.#t.setAttribute("src",Dn(t,e))}postMessage(t,e){this.#t.contentWindow?.postMessage(JSON.stringify(t),e??"*")}#i(t){const e=this.getOrigin();if((t.source===null||t.source===this.#t?.contentWindow)&&(!w(e)||e===t.origin)){try{const i=JSON.parse(t.data);i&&this.onMessage(i,t);return}catch{}t.data&&this.onMessage(t.data,t)}}},D3=At({VimeoProvider:()=>O3}),R3=["bufferend","bufferstart","durationchange","ended","enterpictureinpicture","error","fullscreenchange","leavepictureinpicture","loaded","playProgress","loadProgress","pause","play","playbackratechange","qualitychange","seeked","seeking","timeupdate","volumechange","waiting"],O3=class extends zl{$$PROVIDER_TYPE="VIMEO";scope=le();fullscreen;#t;#e=C("");#i=C(!1);#s=null;#n=null;#r=!1;#a=new et(0,0);#l=new Si(this.#y.bind(this));#o=null;#u=null;#c=new Map;#d=null;constructor(t,e){super(t),this.#t=e;const i=this;this.fullscreen={get active(){return i.#r},supported:!0,enter:()=>this.#T("requestFullscreen"),exit:()=>this.#T("exitFullscreen")}}cookies=!1;title=!0;byline=!0;portrait=!0;color="00ADEF";get type(){return"vimeo"}get currentSrc(){return this.#n}get videoId(){return this.#e()}get hash(){return this.#s}get isPro(){return this.#i()}preconnect(){te(this.getOrigin())}setup(){super.setup(),u(this.#h.bind(this)),u(this.#p.bind(this)),u(this.#m.bind(this)),this.#t.notify("provider-setup",this)}destroy(){this.#q(),this.fullscreen=void 0;const t="provider destroyed";for(const e of this.#c.values())for(const{reject:i}of e)i(t);this.#c.clear(),this.#T("destroy")}async play(){return this.#T("play")}async pause(){return this.#T("pause")}setMuted(t){this.#T("setMuted",t)}setCurrentTime(t){this.#T("seekTo",t),this.#t.notify("seeking",t)}setVolume(t){this.#T("setVolume",t),this.#T("setMuted",y(this.#t.$state.muted))}setPlaybackRate(t){this.#T("setPlaybackRate",t)}async loadSource(t){if(!w(t.src)){this.#n=null,this.#s=null,this.#e.set("");return}const{videoId:e,hash:i}=wr(t.src);this.#e.set(e??""),this.#s=i??null,this.#n=t}#h(){this.#q();const t=this.#e();if(!t){this.src.set("");return}this.src.set(`${this.getOrigin()}/video/${t}`),this.#t.notify("load-start")}#p(){const t=this.#e();if(!t)return;const e=We(),i=new AbortController;return this.#d=e,Tr(t,i,this.#s).then(s=>{e.resolve(s)}).catch(s=>{e.reject()}),()=>{e.reject(),i.abort()}}#m(){const t=this.#i(),{$state:e,qualities:i}=this.#t;if(e.canSetPlaybackRate.set(t),i[P.setReadonly](!t),t)return O(i,"change",()=>{if(i.auto)return;const s=i.selected?.id;s&&this.#T("setQuality",s)})}getOrigin(){return"https://player.vimeo.com"}buildParams(){const{keyDisabled:t}=this.#t.$props,{playsInline:e,nativeControls:i}=this.#t.$state,s=i();return{title:this.title,byline:this.byline,color:this.color,portrait:this.portrait,controls:s,h:this.hash,keyboard:s&&!t(),transparent:!0,playsinline:e(),dnt:!this.cookies}}#y(){this.#T("getCurrentTime")}#g=!1;#C(t,e){if(this.#g&&t===0)return;const{realCurrentTime:i,paused:s,bufferedEnd:n,seekableEnd:r,live:a}=this.#t.$state;if(i()===t)return;const o=i();this.#t.notify("time-change",t,e),Math.abs(o-t)>1.5&&(this.#t.notify("seeking",t,e),!s()&&n()<t&&this.#t.notify("waiting",void 0,e)),!a()&&r()-t<.01&&(this.#t.notify("end",void 0,e),this.#g=!0,setTimeout(()=>{this.#g=!1},500))}#f(t,e){this.#t.notify("seeked",t,e)}#$(t){const e=this.#e();this.#d?.promise.then(i=>{if(!i)return;const{title:s,poster:n,duration:r,pro:a}=i;this.#i.set(a),this.#t.notify("title-change",s,t),this.#t.notify("poster-change",n,t),this.#t.notify("duration-change",r,t),this.#v(r,t)}).catch(()=>{e===this.#e()&&(this.#T("getVideoTitle"),this.#T("getDuration"))})}#v(t,e){const{nativeControls:i}=this.#t.$state,s=i();this.#a=new et(0,t);const n={buffered:new et(0,0),seekable:this.#a,duration:t};this.#t.delegate.ready(n,e),s||this.#T("_hideOverlay"),this.#T("getQualities"),this.#T("getChapters")}#k(t,e,i){switch(t){case"getVideoTitle":const s=e;this.#t.notify("title-change",s,i);break;case"getDuration":const n=e;this.#t.$state.canPlay()?this.#t.notify("duration-change",n,i):this.#v(n,i);break;case"getCurrentTime":this.#C(e,i);break;case"getBuffered":Q(e)&&e.length&&this.#x(e[e.length-1][1],i);break;case"setMuted":case"getMuted":this.#L(y(this.#t.$state.volume),e,i);break;case"getChapters":this.#V(e);break;case"getQualities":this.#D(e,i);break}this.#N(t)?.resolve()}#b(){for(const t of R3)this.#T("addEventListener",t)}#w(t){this.#l.stop(),this.#t.notify("pause",void 0,t)}async#S(t){this.#l.start(),await this.#T("getMuted"),this.#t.notify("play",void 0,t)}#P(t){const{paused:e}=this.#t.$state;!e()&&!this.#g&&this.#t.notify("playing",void 0,t)}#x(t,e){const i={buffered:new et(0,t),seekable:this.#a};this.#t.notify("progress",i,e)}#A(t){this.#t.notify("waiting",void 0,t)}#I(t){const{paused:e}=this.#t.$state;e()||this.#t.notify("playing",void 0,t)}async#M(t){const{paused:e}=this.#t.$state;e()&&(await this.#T("getMuted"),this.#t.notify("play",void 0,t)),this.#t.notify("waiting",void 0,t)}#L(t,e,i){const s={volume:t,muted:e};this.#t.notify("volume-change",s,i)}#V(t){if(this.#E(),!t.length)return;const e=new ce({kind:"chapters",default:!0}),{seekableEnd:i}=this.#t.$state;for(let s=0;s<t.length;s++){const n=t[s],r=t[s+1];e.addCue(new window.VTTCue(n.startTime,r?.startTime??i(),n.title))}this.#u=e,this.#t.textTracks.add(e)}#E(){this.#u&&(this.#t.textTracks.remove(this.#u),this.#u=null)}#D(t,e){this.#t.qualities[ot.enableAuto]=t.some(i=>i.id==="auto")?()=>this.#T("setQuality","auto"):void 0;for(const i of t){if(i.id==="auto")continue;const s=+i.id.slice(0,-1);isNaN(s)||this.#t.qualities[P.add]({id:i.id,width:s*(16/9),height:s,codec:"avc1,h.264",b
856itrate:-1},e)}this.#R(t.find(i=>i.active),e)}#R({id:t}={},e){if(!t)return;const i=t==="auto",s=this.#t.qualities.getById(t);i?(this.#t.qualities[ot.setAuto](i,e),this.#t.qualities[P.select](void 0,!0,e)):this.#t.qualities[P.select](s??void 0,!0,e)}#_(t,e,i){switch(t){case"ready":this.#b();break;case"loaded":this.#$(i);break;case"play":this.#S(i);break;case"playProgress":this.#P(i);break;case"pause":this.#w(i);break;case"loadProgress":this.#x(e.seconds,i);break;case"waiting":this.#M(i);break;case"bufferstart":this.#A(i);break;case"bufferend":this.#I(i);break;case"volumechange":this.#L(e.volume,y(this.#t.$state.muted),i);break;case"durationchange":this.#a=new et(0,e.duration),this.#t.notify("duration-change",e.duration,i);break;case"playbackratechange":this.#t.notify("rate-change",e.playbackRate,i);break;case"qualitychange":this.#R(e,i);break;case"fullscreenchange":this.#r=e.fullscreen,this.#t.notify("fullscreen-change",e.fullscreen,i);break;case"enterpictureinpicture":this.#t.notify("picture-in-picture-change",!0,i);break;case"leavepictureinpicture":this.#t.notify("picture-in-picture-change",!1,i);break;case"ended":this.#t.notify("end",void 0,i);break;case"error":this.#O(e,i);break;case"seek":case"seeked":this.#f(e.seconds,i);break}}#O(t,e){const{message:i,method:s}=t;s==="setPlaybackRate"&&this.#i.set(!1),s&&this.#N(s)?.reject(i)}onMessage(t,e){t.event?this.#_(t.event,t.data,e):t.method&&this.#k(t.method,t.value,e)}onLoad(){}async#T(t,e){let i=We(),s=this.#c.get(t);return s||this.#c.set(t,s=[]),s.push(i),this.postMessage({method:t,value:e}),i.promise}#q(){this.#l.stop(),this.#a=new et(0,0),this.#d=null,this.#o=null,this.#i.set(!1),this.#E()}#N(t){return this.#c.get(t)?.shift()}},q3=At({YouTubeProvider:()=>N3}),Ce={Unstarted:-1,Ended:0,Playing:1,Paused:2,Buffering:3,Cued:5},N3=class extends zl{$$PROVIDER_TYPE="YOUTUBE";scope=le();#t;#e=C("");#i=-1;#s=null;#n=-1;#r=!1;#a=new Map;constructor(t,e){super(t),this.#t=e}language="en";color="red";cookies=!1;get currentSrc(){return this.#s}get type(){return"youtube"}get videoId(){return this.#e()}preconnect(){te(this.getOrigin())}setup(){super.setup(),u(this.#u.bind(this)),this.#t.notify("provider-setup",this)}destroy(){this.#f();const t="provider destroyed";for(const e of this.#a.values())for(const{reject:i}of e)i(t);this.#a.clear()}async play(){return this.#c("playVideo")}#l(t){this.#$("playVideo")?.reject(t)}async pause(){return this.#c("pauseVideo")}#o(t){this.#$("pauseVideo")?.reject(t)}setMuted(t){t?this.#c("mute"):this.#c("unMute")}setCurrentTime(t){this.#c("seekTo",[t,!0]),this.#t.notify("seeking",t)}setVolume(t){this.#c("setVolume",t*100)}setPlaybackRate(t){this.#c("setPlaybackRate",t)}async loadSource(t){if(!w(t.src)){this.#s=null,this.#e.set("");return}const e=$r(t.src);this.#e.set(e??""),this.#s=t}getOrigin(){return this.cookies?"https://www.youtube.com":"https://www.youtube-nocookie.com"}#u(){this.#f();const t=this.#e();if(!t){this.src.set("");return}this.src.set(`${this.getOrigin()}/embed/${t}`),this.#t.notify("load-start")}buildParams(){const{keyDisabled:t}=this.#t.$props,{muted:e,playsInline:i,nativeControls:s}=this.#t.$state,n=s();return{rel:0,autoplay:0,cc_lang_pref:this.language,cc_load_policy:n?1:void 0,color:this.color,controls:n?1:0,disablekb:!n||t()?1:0,enablejsapi:1,fs:1,hl:this.language,iv_load_policy:n?1:3,mute:e()?1:0,playsinline:i()?1:0}}#c(t,e){let i=We(),s=this.#a.get(t);s||this.#a.set(t,s=[]),s.push(i);const n=Array.isArray(e)?e:e?[e]:void 0;return this.postMessage({event:"command",func:t,args:n}),i.promise}onLoad(){window.setTimeout(()=>this.postMessage({event:"listening"}),100)}#d(t){this.#t.notify("loaded-metadata"),this.#t.notify("loaded-data"),this.#t.delegate.ready(void 0,t)}#h(t){this.#$("pauseVideo")?.resolve(),this.#t.notify("pause",void 0,t)}#p(t,e){const{duration:i,realCurrentTime:s}=this.#t.$state,n=this.#i===Ce.Ended,r=n?i():t;this.#t.notify("time-change",r,e),!n&&Math.abs(r-s())>1&&this.#t.notify("seeking",r,e)}#m(t,e,i){const s={buffered:new et(0,t),seekable:e};this.#t.notify("progress",s,i);const{seeking:n,realCurrentTime:r}=this.#t.$state;n()&&t>r()&&this.#y(i)}#y(t){const{paused:e,realCurrentTime:i}=this.#t.$state;window.clearTimeout(this.#n),this.#n=window.setTimeout(()=>{this.#t.notify("seeked",i(),t),this.#n=-1},e()?100:0)}#g(t){const{seeking:e}=this.#t.$state;e()&&this.#y(t),this.#t.notify("pause",void 0,t),this.#t.notify("end",void 0,t)}#C(t,e){const{paused:i,seeking:s}
856=this.#t.$state,n=t===Ce.Playing,r=t===Ce.Buffering,a=this.#v("playVideo"),o=i()&&(r||n);if(r&&this.#t.notify("waiting",void 0,e),s()&&n&&this.#y(e),this.#r&&n){this.pause(),this.#r=!1,this.setMuted(this.#t.$state.muted());return}if(!a&&o){this.#r=!0,this.setMuted(!0);return}switch(o&&(this.#$("playVideo")?.resolve(),this.#t.notify("play",void 0,e)),t){case Ce.Cued:this.#d(e);break;case Ce.Playing:this.#t.notify("playing",void 0,e);break;case Ce.Paused:this.#h(e);break;case Ce.Ended:this.#g(e);break}this.#i=t}onMessage({info:t},e){if(!t)return;const{title:i,intrinsicDuration:s,playbackRate:n}=this.#t.$state;if(qa(t.videoData)&&t.videoData.title!==i()&&this.#t.notify("title-change",t.videoData.title,e),it(t.duration)&&t.duration!==s()){if(it(t.videoLoadedFraction)){const r=t.progressState?.loaded??t.videoLoadedFraction*t.duration,a=new et(0,t.duration);this.#m(r,a,e)}this.#t.notify("duration-change",t.duration,e)}if(it(t.playbackRate)&&t.playbackRate!==n()&&this.#t.notify("rate-change",t.playbackRate,e),t.progressState){const{current:r,seekableStart:a,seekableEnd:o,loaded:l,duration:h}=t.progressState;this.#p(r,e),this.#m(l,new et(a,o),e),h!==s()&&this.#t.notify("duration-change",h,e)}if(it(t.volume)&&gi(t.muted)&&!this.#r){const r={muted:t.muted,volume:t.volume/100};this.#t.notify("volume-change",r,e)}it(t.playerState)&&t.playerState!==this.#i&&this.#C(t.playerState,e)}#f(){this.#i=-1,this.#n=-1,this.#r=!1}#$(t){return this.#a.get(t)?.shift()}#v(t){return!!this.#a.get(t)?.length}};export{ut as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.