UNPKG

@ktt45678/vidstack

Version:

UI component library for building high-quality, accessible video and audio experiences on the web.

4 lines (3 loc) 43.7 kB
const D=Symbol(0);let Vt=!1,fe=!1,H=null,lt=null,P=null,O=0,ct=[],he={};const Yn=()=>{},ut=0,ze=1,zt=2,qt=3;function Xn(){Vt=!0,queueMicrotask(qe)}function qe(){if(!ct.length){Vt=!1;return}fe=!0;for(let t=0;t<ct.length;t++)ct[t].$st!==ut&&Zn(ct[t]);ct=[],Vt=!1,fe=!1}function Zn(t){let e=[t];for(;t=t[D];)t.$e&&t.$st!==ut&&e.push(t);for(let n=e.length-1;n>=0;n--)ye(e[n])}function Jn(t){const e=Ut();return At(e,t.length?t.bind(null,at.bind(e)):t,null)}function Gn(t){return At(H,t,null)}function Ue(t){return At(null,t,null)}function Qn(){fe||qe()}function de(){return H}function B(t,e){try{return At(e,t,null)}catch(n){pe(e,n);return}}function Ke(t,e=H){return e?.$cx[t]}function ti(t,e,n=H){n&&(n.$cx={...n.$cx,[t]:e})}function wt(t){if(!t||!H)return t||Yn;const e=H;return e.$d?Array.isArray(e.$d)?e.$d.push(t):e.$d=[e.$d,t]:e.$d=t,function(){e.$st!==qt&&(t.call(null),Kt(e.$d)?e.$d=null:Array.isArray(e.$d)&&e.$d.splice(e.$d.indexOf(t),1))}}function at(t=!0){if(this.$st!==qt){if(this.$h)if(Array.isArray(this.$h))for(let e=this.$h.length-1;e>=0;e--)at.call(this.$h[e]);else at.call(this.$h);if(t){const e=this[D];e&&(Array.isArray(e.$h)?e.$h.splice(e.$h.indexOf(this),1):e.$h=null),ei(this)}}}function ei(t){t.$st=qt,t.$d&&Ye(t),t.$s&&be(t,0),t[D]=null,t.$s=null,t.$o=null,t.$h=null,t.$cx=he,t.$eh=null}function Ye(t){try{if(Array.isArray(t.$d))for(let e=t.$d.length-1;e>=0;e--){const n=t.$d[e];n.call(n)}else t.$d.call(t.$d);t.$d=null}catch(e){pe(t,e)}}function At(t,e,n){const i=H,s=lt;H=t,lt=n;try{return e.call(t)}finally{H=i,lt=s}}function pe(t,e){if(!t||!t.$eh)throw e;let n=0,i=t.$eh.length,s=e;for(n=0;n<i;n++)try{t.$eh[n](s);break}catch(r){s=r}if(n===i)throw s}function ge(){return this.$st===qt?this.$v:(lt&&!this.$e&&(!P&&lt.$s&&lt.$s[O]==this?O++:P?P.push(this):P=[this]),this.$c&&ye(this),this.$v)}function Xe(t){const e=Kt(t)?t(this.$v):t;if(this.$ch(this.$v,e)&&(this.$v=e,this.$o))for(let n=0;n<this.$o.length;n++)Qe(this.$o[n],zt);return this.$v}const me=function(){this[D]=null,this.$h=null,H&&H.append(this)},G=me.prototype;G.$cx=he,G.$eh=null,G.$c=null,G.$d=null,G.append=function(t){t[D]=this,this.$h?Array.isArray(this.$h)?this.$h.push(t):this.$h=[this.$h,t]:this.$h=t,t.$cx=t.$cx===he?this.$cx:{...this.$cx,...t.$cx},this.$eh&&(t.$eh=t.$eh?[...t.$eh,...this.$eh]:this.$eh)},G.dispose=function(){at.call(this)};function Ut(){return new me}const Ze=function(e,n,i){me.call(this),this.$st=n?zt:ut,this.$i=!1,this.$e=!1,this.$s=null,this.$o=null,this.$v=e,n&&(this.$c=n),i&&i.dirty&&(this.$ch=i.dirty)},$e=Ze.prototype;Object.setPrototypeOf($e,G),$e.$ch=ni,$e.call=ge;function ve(t,e,n){return new Ze(t,e,n)}function ni(t,e){return t!==e}function Kt(t){return typeof t=="function"}function ye(t){if(t.$st===ze)for(let e=0;e<t.$s.length&&(ye(t.$s[e]),t.$st!==zt);e++);t.$st===zt?Je(t):t.$st=ut}function ii(t){t.$h&&at.call(t,!1),t.$d&&Ye(t),t.$eh=t[D]?t[D].$eh:null}function Je(t){let e=P,n=O;P=null,O=0;try{ii(t);const i=At(t,t.$c,t);Ge(t),!t.$e&&t.$i?Xe.call(t,i):(t.$v=i,t.$i=!0)}catch(i){Ge(t),pe(t,i)}finally{P=e,O=n,t.$st=ut}}function Ge(t){if(P){if(t.$s&&be(t,O),t.$s&&O>0){t.$s.length=O+P.length;for(let n=0;n<P.length;n++)t.$s[O+n]=P[n]}else t.$s=P;let e;for(let n=O;n<t.$s.length;n++)e=t.$s[n],e.$o?e.$o.push(t):e.$o=[t]}else t.$s&&O<t.$s.length&&(be(t,O),t.$s.length=O)}function Qe(t,e){if(!(t.$st>=e)&&(t.$e&&t.$st===ut&&(ct.push(t),Vt||Xn()),t.$st=e,t.$o))for(let n=0;n<t.$o.length;n++)Qe(t.$o[n],ze)}function be(t,e){let n,i;for(let s=e;s<t.$s.length;s++)n=t.$s[s],n.$o&&(i=n.$o.indexOf(t),n.$o[i]=n.$o[n.$o.length-1],n.$o.pop())}function we(...t){}function tn(t){return t===null}function Yt(t){return typeof t>"u"}function si(t){return tn(t)||Yt(t)}function ri(t){return t?.constructor===Object}function oi(t){return typeof t=="number"&&!Number.isNaN(t)}function Ae(t){return typeof t=="string"}function li(t){return typeof t=="boolean"}function xe(t){return typeof t=="function"}function Ee(t){return Array.isArray(t)}var en;const ci=Event,nn=Symbol("DOM_EVENT");class Ce extends ci{constructor(e,...n){super(e,n[0]),this[en]=!0,this.triggers=new ui,this.detail=n[0]?.detail;const i=n[0]?.trigger;i&&this.triggers.add(i)}get trigger(){return this.triggers.source}get originEvent(){return this.triggers.origin}get isOriginTrusted(){return this.triggers.origin?.isTrusted??!1}}en=nn;class ui{constructor(){this.chain=[]}get source(){return this.chain[0]}get origin(){return this.chain[this.chain.length-1]}add(e){this.chain.push(e),ai(e)&&this.chain.push(...e.triggers)}remove(e){return this.chain.splice(this.chain.indexOf(e),1)[0]}has(e){return this.chain.some(n=>n===e)}hasType(e){return!!this.findType(e)}findType(e){return this.chain.find(n=>n.type===e)}walk(e){for(const n of this.chain){const i=e(n);if(i)return[n,i]}}[Symbol.iterator](){return this.chain.values()}}function ai(t){return!!t?.[nn]}class fi extends EventTarget{addEventListener(e,n,i){return super.addEventListener(e,n,i)}removeEventListener(e,n,i){return super.removeEventListener(e,n,i)}}function sn(t,e,n,i){return t.addEventListener(e,n,i),wt(()=>t.removeEventListener(e,n,i))}function hi(t){return!!t?.type.startsWith("pointer")}function di(t){return!!t?.type.startsWith("touch")}function pi(t){return/^(click|mouse)/.test(t?.type??"")}function _e(t){return!!t?.type.startsWith("key")}function gi(t){return _e(t)&&t.key==="Enter"}function mi(t){return _e(t)&&(t.key==="Enter"||t.key===" ")}function $i(t){return t instanceof Node}function Se(t,e,n){if(t)if(!n&&n!==""&&n!==0)t.removeAttribute(e);else{const i=n===!0?"":n+"";t.getAttribute(e)!==i&&t.setAttribute(e,i)}else return}function Te(t,e,n){if(t)!n&&n!==0?t.style.removeProperty(e):t.style.setProperty(e,n+"");else return}function Xt(t,e){const n=ve(t,null,e),i=ge.bind(n);return i[D]=!0,i.set=Xe.bind(n),i}function vi(t){return Kt(t)&&D in t}function rn(t,e){const n=ve(e?.initial,t,e),i=ge.bind(n);return i[D]=!0,i}function yi(t,e){const n=ve(null,function(){let s=t();return Kt(s)&&wt(s),null},void 0);return n.$e=!0,Je(n),at.bind(n,!0)}function bi(t){return vi(t)&&"set"in t}const Zt=yi;function wi(t){return{id:Symbol(),provide:t}}function on(t,e,n=de()){const i=!Yt(e);ti(t.id,i?e:t.provide?.(),n)}function ln(t){return Ke(t.id)}function Ai(t){return!Yt(Ke(t.id))}const xt=Symbol(0),Et=Symbol(0),cn=Symbol(0);var un;const ke={};class xi{constructor(e,n,i){this[un]=null,this.$el=Xt(null),this.a=null,this.d=null,this.f=null,this.g=null,this.e=null,this.o=!1,this.i=ke,this.b=null,this.c=null,this.l=[],this.m=[],this.j=[],this.n=[],this.d=n,i?.scope&&i.scope.append(n);let s=e.state,r=e.props;if(s&&(this.h=s.create(),this.k=new Proxy(this.h,{get:(o,u)=>this.h[u]()}),on(s,this.h)),r&&(this.i=Ei(r),i?.props))for(const o of Object.keys(i.props))this.i[o]?.set(i.props[o]);wt(this.p.bind(this))}w(){B(()=>{for(const e of this.l)e()},this.d)}x(e){this.a||(this.a=e,this.$el.set(e),B(()=>{this.f=Ut(),B(()=>{for(const n of this.m)n(this.a);this.q(),this.r()},this.f)},this.d),e.dispatchEvent(new Event("attached")))}s(){this.f?.dispose(),this.f=null,this.g=null,this.a=null,this.$el.set(null)}y(){!this.a||!this.f||!this.j.length||B(()=>{this.g=Ut(),B(()=>{for(const e of this.j)e(this.a)},this.g)},this.f)}z(){this.g?.dispose(),this.g=null}p(){if(this.o)return;this.o=!0,B(()=>{for(const n of this.n)n(this.a)},this.d);const e=this.a;this.s(),this.d.dispose(),this.l.length=0,this.m.length=0,this.j.length=0,this.n.length=0,this.e=null,this.b=null,this.c=null,this.i=ke,this.d=null,this.k=ke,this.h=null,e&&delete e.$}t(e){e.onSetup&&this.l.push(e.onSetup.bind(e)),e.onAttach&&this.m.push(e.onAttach.bind(e)),e.onConnect&&this.j.push(e.onConnect.bind(e)),e.onDestroy&&this.n.push(e.onDestroy.bind(e))}q(){if(this.b)for(const e of Object.keys(this.b))xe(this.b[e])?Zt(this.u.bind(this,e)):Se(this.a,e,this.b[e])}r(){if(this.c)for(const e of Object.keys(this.c))xe(this.c[e])?Zt(this.v.bind(this,e)):Te(this.a,e,this.c[e])}u(e){Se(this.a,e,this.b[e].call(this.e))}v(e){Te(this.a,e,this.c[e].call(this.e))}}un=cn;function Ei(t){const e={};for(const n of Object.keys(t)){const i=t[n];e[n]=Xt(i,i)}return e}let Ct={$$:null};function Ci(t,e){return Jn(()=>{Ct.$$=new xi(t,de(),e);const n=new t;return Ct.$$.e=n,Ct.$$=null,n})}class an extends EventTarget{constructor(){super(),Ct.$$&&this.attach(Ct)}get el(){return this.$$.a}get $el(){return this.$$.$el()}get scope(){return this.$$.d}get attachScope(){return this.$$.f}get connectScope(){return this.$$.g}get $props(){return this.$$.i}get $state(){return this.$$.h}get state(){return this.$$.k}attach({$$:e}){return this.$$=e,e.t(this),this}addEventListener(e,n,i){this.listen(e,n,i)}removeEventListener(e,n,i){this.el?.removeEventListener(e,n,i)}setAttributes(e){this.$$.b||(this.$$.b={}),Object.assign(this.$$.b,e)}setStyles(e){this.$$.c||(this.$$.c={}),Object.assign(this.$$.c,e)}setCSSVars(e){this.setStyles(e)}createEvent(e,...n){return new Ce(e,n[0])}dispatch(e,...n){if(!this.el)return!1;const i=e instanceof Event?e:new Ce(e,n[0]);return Object.defineProperty(i,"target",{get:()=>this.$$.e}),Ue(()=>(this.$$[cn]?.(i),this.el.dispatchEvent(i)))}dispatchEvent(e){return this.dispatch(e)}listen(e,n,i){return this.el?sn(this.el,e,n,i):we}}function _i(t,e){for(const n of t)n(e)}function fn(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Si(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function Ti(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Oe=t=>t===null?"":t+"",ki=t=>t===null?null:t+"",Oi=t=>t===null?0:Number(t),hn=t=>t!==null,Ni=()=>null,Ri=t=>t===null?[]:JSON.parse(t),Pi=t=>t===null?{}:JSON.parse(t);function Li(t){if(t===null)return ki;switch(typeof t){case"undefined":return Oe;case"string":return Oe;case"boolean":return hn;case"number":return Oi;case"function":return Ni;case"object":return Ee(t)?Ri:Pi;default:return Oe}}const K=Symbol(0),dn=Symbol(0),Q=Symbol(0),ft=Symbol(0);function Hi(t,e){var n,i,s;const r=class extends t{constructor(...l){if(super(...l),this[i]=0,this[s]=null,this.keepAlive=!1,this.forwardKeepAlive=!0,this.$=B(()=>Ci(e),null),this.$.$$.t(this),e.props){const c=this.$props,a=Object.getOwnPropertyDescriptors(this);for(const f of Object.keys(a))f in e.props&&(c[f].set(this[f]),delete this[f])}}static get observedAttributes(){if(!this[K]&&e.props){const l=new Map;for(const c of Object.keys(e.props)){let a=this.attrs?.[c],f=Ae(a)?a:a&&a?.attr;f!==!1&&(f||(f=fn(c)),l.set(f,{C:c,B:a&&!Ae(a)&&a?.converter||Li(e.props[c])}))}this[K]=l}return this[K]?Array.from(this[K].keys()):[]}get scope(){return this.$.$$.d}get attachScope(){return this.$.$$.f}get connectScope(){return this.$.$$.g}get $props(){return this.$.$$.i}get $state(){return this.$.$$.h}get state(){return this.$.state}attributeChangedCallback(l,c,a){const f=this.constructor;if(!f[K]){super.attributeChangedCallback?.(l,c,a);return}const h=f[K].get(l);h&&(this[h.C]=h.B(a))}connectedCallback(){const l=this.$?.$$;if(!l||l.o)return;if(this[Q]!==2){Fi.call(this);return}if(!this.isConnected)return;this.hasAttribute("keep-alive")&&(this.keepAlive=!0),l.y(),Ee(this[ft])&&_i(this[ft],this),this[ft]=null;const c=super.connectedCallback;c&&B(()=>c.call(this),this.connectScope)}disconnectedCallback(){const l=this.$?.$$;if(!l||l.o)return;l.z();const c=super.disconnectedCallback;c&&c.call(this),!this.keepAlive&&!this.hasAttribute("keep-alive")&&setTimeout(()=>{requestAnimationFrame(()=>{this.isConnected||l.p()})},0)}[(n=K,i=Q,s=ft,dn)](){const l=this.$.$$,c=this.constructor;if(l.o)return;const a=c[K];if(a)for(const f of this.attributes){let h=a.get(f.name);h&&h.B&&l.i[h.C].set(h.B(this.getAttribute(f.name)))}l.w(),l.x(this),this[Q]=2,this.connectedCallback()}subscribe(l){return this.$.subscribe(l)}destroy(){this.disconnectedCallback(),this.$.destroy()}};r[n]=null;let o=r;return Mi(o,e),o}function Mi(t,e){const n=t.prototype,i=e.prototype;if(e.props)for(const s of Object.keys(e.props))Object.defineProperty(n,s,{enumerable:!0,configurable:!0,get(){return this.$props[s]()},set(r){this.$props[s].set(r)}});if(i[xt])for(const s of i[xt])Object.defineProperty(n,s,{enumerable:!0,configurable:!0,get(){return this.$[s]},set(r){this.$[s]=r}});if(i[Et])for(const s of i[Et])n[s]=function(...r){return this.$[s](...r)}}function Fi(){if(this[Q]!==0)return;this[Q]=1;const t=Bi(this),e=t&&window.customElements.get(t.localName),n=t&&t[Q]===2;if(t&&(!e||!n)){Di.call(this,t);return}pn.call(this,t)}async function Di(t){await window.customElements.whenDefined(t.localName),t[Q]!==2&&await new Promise(e=>(t[ft]??(t[ft]=[])).push(e)),pn.call(this,t)}function pn(t){if(this.isConnected){if(t){t.keepAlive&&t.forwardKeepAlive&&(this.keepAlive=!0,this.setAttribute("keep-alive",""));const e=this.$.$$.d;e&&t.$.$$.f.append(e)}this[dn]()}}function Bi(t){let e=t.parentNode,n=t.localName.split("-",1)[0]+"-";for(;e;){if(e.nodeType===1&&e.localName.startsWith(n))return e;e=e.parentNode}return null}function Wi(t,e=!1){(e||!window.customElements.get(t.tagName))&&window.customElements.define(t.tagName,t)}class Ii extends an{subscribe(e){return B(()=>Zt(()=>e(this.state)),this.$$.d)}destroy(){this.$$.p()}}function ji(t,e,n){t[xt]||(t[xt]=new Set),t[xt].add(e)}function Vi(t,e,n){t[Et]||(t[Et]=new Set),t[Et].add(e)}class zi{constructor(e){this.id=Symbol(0),this.record=e,this.A=Object.getOwnPropertyDescriptors(e)}create(){const e={},n=new Proxy(e,{get:(i,s)=>e[s]()});for(const i of Object.keys(this.record)){const s=this.A[i].get;e[i]=s?rn(s.bind(n)):Xt(this.record[i])}return e}reset(e,n){for(const i of Object.keys(e))!this.A[i].get&&(!n||n(i))&&e[i].set(this.record[i])}}function qi(t){return ln(t)}function Ui(t){return t?"true":"false"}function gn(){const t=new Set;return{add(...e){for(const n of e)t.add(n)},empty(){for(const e of t)e();t.clear()}}}function Ki(){const t=gn();return wt(t.empty),t}function Yi(t){return Object.keys(t)}function Xi(){let t,e;return{promise:new Promise((i,s)=>{t=i,e=s}),resolve:t,reject:e}}function Zi(t){return new Promise(e=>setTimeout(e,t))}function Ji(t){let e=-1,n;function i(...s){n=s,!(e>=0)&&(e=window.requestAnimationFrame(()=>{t.apply(this,n),e=-1,n=void 0}))}return i}const Gi=typeof window<"u"?"requestIdleCallback"in window?window.requestIdleCallback:t=>window.setTimeout(t,1):we;function Qi(t,e){return new Promise(n=>{Gi(i=>{t?.(i),n()},e)})}var N={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},mn=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],$n=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],vn=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],_=typeof window<"u"&&typeof window.document<"u"?window.document:{},L="fullscreenEnabled"in _&&Object.keys(N)||mn[0]in _&&mn||$n[0]in _&&$n||vn[0]in _&&vn||[],ts={requestFullscreen:function(t){return t[L[N.requestFullscreen]]()},requestFullscreenFunction:function(t){return t[L[N.requestFullscreen]]},get exitFullscreen(){return _[L[N.exitFullscreen]].bind(_)},get fullscreenPseudoClass(){return":"+L[N.fullscreen]},addEventListener:function(t,e,n){return _.addEventListener(L[N[t]],e,n)},removeEventListener:function(t,e,n){return _.removeEventListener(L[N[t]],e,n)},get fullscreenEnabled(){return!!_[L[N.fullscreenEnabled]]},set fullscreenEnabled(t){},get fullscreenElement(){return _[L[N.fullscreenElement]]},set fullscreenElement(t){},get onfullscreenchange(){return _[("on"+L[N.fullscreenchange]).toLowerCase()]},set onfullscreenchange(t){return _[("on"+L[N.fullscreenchange]).toLowerCase()]=t},get onfullscreenerror(){return _[("on"+L[N.fullscreenerror]).toLowerCase()]},set onfullscreenerror(t){return _[("on"+L[N.fullscreenerror]).toLowerCase()]=t}};const Jt=Math.min,tt=Math.max,Gt=Math.round,Qt=Math.floor,Y=t=>({x:t,y:t}),es={left:"right",right:"left",bottom:"top",top:"bottom"},ns={start:"end",end:"start"};function yn(t,e,n){return tt(t,Jt(e,n))}function Ne(t,e){return typeof t=="function"?t(e):t}function ht(t){return t.split("-")[0]}function Re(t){return t.split("-")[1]}function bn(t){return t==="x"?"y":"x"}function wn(t){return t==="y"?"height":"width"}function _t(t){return["top","bottom"].includes(ht(t))?"y":"x"}function An(t){return bn(_t(t))}function is(t,e,n){n===void 0&&(n=!1);const i=Re(t),s=An(t),r=wn(s);let o=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(o=te(o)),[o,te(o)]}function ss(t){const e=te(t);return[Pe(t),e,Pe(e)]}function Pe(t){return t.replace(/start|end/g,e=>ns[e])}function rs(t,e,n){const i=["left","right"],s=["right","left"],r=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:i:e?i:s;case"left":case"right":return e?r:o;default:return[]}}function os(t,e,n,i){const s=Re(t);let r=rs(ht(t),n==="start",i);return s&&(r=r.map(o=>o+"-"+s),e&&(r=r.concat(r.map(Pe)))),r}function te(t){return t.replace(/left|right|bottom|top/g,e=>es[e])}function ls(t){return{top:0,right:0,bottom:0,left:0,...t}}function cs(t){return typeof t!="number"?ls(t):{top:t,right:t,bottom:t,left:t}}function ee(t){const{x:e,y:n,width:i,height:s}=t;return{width:i,height:s,top:n,left:e,right:e+i,bottom:n+s,x:e,y:n}}function xn(t,e,n){let{reference:i,floating:s}=t;const r=_t(e),o=An(e),u=wn(o),l=ht(e),c=r==="y",a=i.x+i.width/2-s.width/2,f=i.y+i.height/2-s.height/2,h=i[u]/2-s[u]/2;let d;switch(l){case"top":d={x:a,y:i.y-s.height};break;case"bottom":d={x:a,y:i.y+i.height};break;case"right":d={x:i.x+i.width,y:f};break;case"left":d={x:i.x-s.width,y:f};break;default:d={x:i.x,y:i.y}}switch(Re(e)){case"start":d[o]-=h*(n&&c?-1:1);break;case"end":d[o]+=h*(n&&c?-1:1);break}return d}const us=async(t,e,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:r=[],platform:o}=n,u=r.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:a,y:f}=xn(c,i,l),h=i,d={},p=0;for(let g=0;g<u.length;g++){const{name:$,fn:m}=u[g],{x:v,y:b,data:A,reset:w}=await m({x:a,y:f,initialPlacement:i,placement:h,strategy:s,middlewareData:d,rects:c,platform:o,elements:{reference:t,floating:e}});a=v??a,f=b??f,d={...d,[$]:{...d[$],...A}},w&&p<=50&&(p++,typeof w=="object"&&(w.placement&&(h=w.placement),w.rects&&(c=w.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):w.rects),{x:a,y:f}=xn(c,h,l)),g=-1)}return{x:a,y:f,placement:h,strategy:s,middlewareData:d}};async function En(t,e){var n;e===void 0&&(e={});const{x:i,y:s,platform:r,rects:o,elements:u,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:a="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=Ne(e,t),p=cs(d),$=u[h?f==="floating"?"reference":"floating":f],m=ee(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement($)))==null||n?$:$.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(u.floating)),boundary:c,rootBoundary:a,strategy:l})),v=f==="floating"?{x:i,y:s,width:o.floating.width,height:o.floating.height}:o.reference,b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(u.floating)),A=await(r.isElement==null?void 0:r.isElement(b))?await(r.getScale==null?void 0:r.getScale(b))||{x:1,y:1}:{x:1,y:1},w=ee(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:v,offsetParent:b,strategy:l}):v);return{top:(m.top-w.top+p.top)/A.y,bottom:(w.bottom-m.bottom+p.bottom)/A.y,left:(m.left-w.left+p.left)/A.x,right:(w.right-m.right+p.right)/A.x}}const as=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:s,middlewareData:r,rects:o,initialPlacement:u,platform:l,elements:c}=e,{mainAxis:a=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...$}=Ne(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const m=ht(s),v=_t(u),b=ht(u)===u,A=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=h||(b||!g?[te(u)]:ss(u)),F=p!=="none";!h&&F&&w.push(...os(u,g,p,A));const vt=[u,...w],V=await En(e,$),J=[];let z=((i=r.flip)==null?void 0:i.overflows)||[];if(a&&J.push(V[m]),f){const x=is(s,o,A);J.push(V[x[0]],V[x[1]])}if(z=[...z,{placement:s,overflows:J}],!J.every(x=>x<=0)){var yt,bt;const x=(((yt=r.flip)==null?void 0:yt.index)||0)+1,rt=vt[x];if(rt)return{data:{index:x,overflows:z},reset:{placement:rt}};let S=(bt=z.filter(y=>y.overflows[0]<=0).sort((y,T)=>y.overflows[1]-T.overflows[1])[0])==null?void 0:bt.placement;if(!S)switch(d){case"bestFit":{var C;const y=(C=z.filter(T=>{if(F){const k=_t(T.placement);return k===v||k==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(k=>k>0).reduce((k,ot)=>k+ot,0)]).sort((T,k)=>T[1]-k[1])[0])==null?void 0:C[0];y&&(S=y);break}case"initialPlacement":S=u;break}if(s!==S)return{reset:{placement:S}}}return{}}}},fs=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:s}=e,{mainAxis:r=!0,crossAxis:o=!1,limiter:u={fn:$=>{let{x:m,y:v}=$;return{x:m,y:v}}},...l}=Ne(t,e),c={x:n,y:i},a=await En(e,l),f=_t(ht(s)),h=bn(f);let d=c[h],p=c[f];if(r){const $=h==="y"?"top":"left",m=h==="y"?"bottom":"right",v=d+a[$],b=d-a[m];d=yn(v,d,b)}if(o){const $=f==="y"?"top":"left",m=f==="y"?"bottom":"right",v=p+a[$],b=p-a[m];p=yn(v,p,b)}const g=u.fn({...e,[h]:d,[f]:p});return{...g,data:{x:g.x-n,y:g.y-i}}}}};function dt(t){return Cn(t)?(t.nodeName||"").toLowerCase():"#document"}function R(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function j(t){var e;return(e=(Cn(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Cn(t){return t instanceof Node||t instanceof R(t).Node}function W(t){return t instanceof Element||t instanceof R(t).Element}function I(t){return t instanceof HTMLElement||t instanceof R(t).HTMLElement}function _n(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof R(t).ShadowRoot}function St(t){const{overflow:e,overflowX:n,overflowY:i,display:s}=M(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(s)}function hs(t){return["table","td","th"].includes(dt(t))}function ne(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Le(t){const e=He(),n=M(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function ds(t){let e=X(t);for(;I(e)&&!pt(e);){if(ne(e))return null;if(Le(e))return e;e=X(e)}return null}function He(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pt(t){return["html","body","#document"].includes(dt(t))}function M(t){return R(t).getComputedStyle(t)}function ie(t){return W(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function X(t){if(dt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||_n(t)&&t.host||j(t);return _n(e)?e.host:e}function Sn(t){const e=X(t);return pt(e)?t.ownerDocument?t.ownerDocument.body:t.body:I(e)&&St(e)?e:Sn(e)}function Tt(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=Sn(t),r=s===((i=t.ownerDocument)==null?void 0:i.body),o=R(s);return r?e.concat(o,o.visualViewport||[],St(s)?s:[],o.frameElement&&n?Tt(o.frameElement):[]):e.concat(s,Tt(s,[],n))}function Tn(t){const e=M(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=I(t),r=s?t.offsetWidth:n,o=s?t.offsetHeight:i,u=Gt(n)!==r||Gt(i)!==o;return u&&(n=r,i=o),{width:n,height:i,$:u}}function Me(t){return W(t)?t:t.contextElement}function gt(t){const e=Me(t);if(!I(e))return Y(1);const n=e.getBoundingClientRect(),{width:i,height:s,$:r}=Tn(e);let o=(r?Gt(n.width):n.width)/i,u=(r?Gt(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!u||!Number.isFinite(u))&&(u=1),{x:o,y:u}}const ps=Y(0);function kn(t){const e=R(t);return!He()||!e.visualViewport?ps:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function gs(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==R(t)?!1:e}function et(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),r=Me(t);let o=Y(1);e&&(i?W(i)&&(o=gt(i)):o=gt(t));const u=gs(r,n,i)?kn(r):Y(0);let l=(s.left+u.x)/o.x,c=(s.top+u.y)/o.y,a=s.width/o.x,f=s.height/o.y;if(r){const h=R(r),d=i&&W(i)?R(i):i;let p=h,g=p.frameElement;for(;g&&i&&d!==p;){const $=gt(g),m=g.getBoundingClientRect(),v=M(g),b=m.left+(g.clientLeft+parseFloat(v.paddingLeft))*$.x,A=m.top+(g.clientTop+parseFloat(v.paddingTop))*$.y;l*=$.x,c*=$.y,a*=$.x,f*=$.y,l+=b,c+=A,p=R(g),g=p.frameElement}}return ee({width:a,height:f,x:l,y:c})}function ms(t){let{elements:e,rect:n,offsetParent:i,strategy:s}=t;const r=s==="fixed",o=j(i),u=e?ne(e.floating):!1;if(i===o||u&&r)return n;let l={scrollLeft:0,scrollTop:0},c=Y(1);const a=Y(0),f=I(i);if((f||!f&&!r)&&((dt(i)!=="body"||St(o))&&(l=ie(i)),I(i))){const h=et(i);c=gt(i),a.x=h.x+i.clientLeft,a.y=h.y+i.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+a.x,y:n.y*c.y-l.scrollTop*c.y+a.y}}function $s(t){return Array.from(t.getClientRects())}function On(t){return et(j(t)).left+ie(t).scrollLeft}function vs(t){const e=j(t),n=ie(t),i=t.ownerDocument.body,s=tt(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=tt(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+On(t);const u=-n.scrollTop;return M(i).direction==="rtl"&&(o+=tt(e.clientWidth,i.clientWidth)-s),{width:s,height:r,x:o,y:u}}function ys(t,e){const n=R(t),i=j(t),s=n.visualViewport;let r=i.clientWidth,o=i.clientHeight,u=0,l=0;if(s){r=s.width,o=s.height;const c=He();(!c||c&&e==="fixed")&&(u=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:u,y:l}}function bs(t,e){const n=et(t,!0,e==="fixed"),i=n.top+t.clientTop,s=n.left+t.clientLeft,r=I(t)?gt(t):Y(1),o=t.clientWidth*r.x,u=t.clientHeight*r.y,l=s*r.x,c=i*r.y;return{width:o,height:u,x:l,y:c}}function Nn(t,e,n){let i;if(e==="viewport")i=ys(t,n);else if(e==="document")i=vs(j(t));else if(W(e))i=bs(e,n);else{const s=kn(t);i={...e,x:e.x-s.x,y:e.y-s.y}}return ee(i)}function Rn(t,e){const n=X(t);return n===e||!W(n)||pt(n)?!1:M(n).position==="fixed"||Rn(n,e)}function ws(t,e){const n=e.get(t);if(n)return n;let i=Tt(t,[],!1).filter(u=>W(u)&&dt(u)!=="body"),s=null;const r=M(t).position==="fixed";let o=r?X(t):t;for(;W(o)&&!pt(o);){const u=M(o),l=Le(o);!l&&u.position==="fixed"&&(s=null),(r?!l&&!s:!l&&u.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||St(o)&&!l&&Rn(t,o))?i=i.filter(a=>a!==o):s=u,o=X(o)}return e.set(t,i),i}function As(t){let{element:e,boundary:n,rootBoundary:i,strategy:s}=t;const o=[...n==="clippingAncestors"?ne(e)?[]:ws(e,this._c):[].concat(n),i],u=o[0],l=o.reduce((c,a)=>{const f=Nn(e,a,s);return c.top=tt(f.top,c.top),c.right=Jt(f.right,c.right),c.bottom=Jt(f.bottom,c.bottom),c.left=tt(f.left,c.left),c},Nn(e,u,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function xs(t){const{width:e,height:n}=Tn(t);return{width:e,height:n}}function Es(t,e,n){const i=I(e),s=j(e),r=n==="fixed",o=et(t,!0,r,e);let u={scrollLeft:0,scrollTop:0};const l=Y(0);if(i||!i&&!r)if((dt(e)!=="body"||St(s))&&(u=ie(e)),i){const f=et(e,!0,r,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else s&&(l.x=On(s));const c=o.left+u.scrollLeft-l.x,a=o.top+u.scrollTop-l.y;return{x:c,y:a,width:o.width,height:o.height}}function Fe(t){return M(t).position==="static"}function Pn(t,e){return!I(t)||M(t).position==="fixed"?null:e?e(t):t.offsetParent}function Ln(t,e){const n=R(t);if(ne(t))return n;if(!I(t)){let s=X(t);for(;s&&!pt(s);){if(W(s)&&!Fe(s))return s;s=X(s)}return n}let i=Pn(t,e);for(;i&&hs(i)&&Fe(i);)i=Pn(i,e);return i&&pt(i)&&Fe(i)&&!Le(i)?n:i||ds(t)||n}const Cs=async function(t){const e=this.getOffsetParent||Ln,n=this.getDimensions,i=await n(t.floating);return{reference:Es(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function _s(t){return M(t).direction==="rtl"}const Ss={convertOffsetParentRelativeRectToViewportRelativeRect:ms,getDocumentElement:j,getClippingRect:As,getOffsetParent:Ln,getElementRects:Cs,getClientRects:$s,getDimensions:xs,getScale:gt,isElement:W,isRTL:_s};function Ts(t,e){let n=null,i;const s=j(t);function r(){var u;clearTimeout(i),(u=n)==null||u.disconnect(),n=null}function o(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),r();const{left:c,top:a,width:f,height:h}=t.getBoundingClientRect();if(u||e(),!f||!h)return;const d=Qt(a),p=Qt(s.clientWidth-(c+f)),g=Qt(s.clientHeight-(a+h)),$=Qt(c),v={rootMargin:-d+"px "+-p+"px "+-g+"px "+-$+"px",threshold:tt(0,Jt(1,l))||1};let b=!0;function A(w){const F=w[0].intersectionRatio;if(F!==l){if(!b)return o();F?o(!1,F):i=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(A,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(A,v)}n.observe(t)}return o(!0),r}function ks(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=Me(t),a=s||r?[...c?Tt(c):[],...Tt(e)]:[];a.forEach(m=>{s&&m.addEventListener("scroll",n,{passive:!0}),r&&m.addEventListener("resize",n)});const f=c&&u?Ts(c,n):null;let h=-1,d=null;o&&(d=new ResizeObserver(m=>{let[v]=m;v&&v.target===c&&d&&(d.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=d)==null||b.observe(e)})),n()}),c&&!l&&d.observe(c),d.observe(e));let p,g=l?et(t):null;l&&$();function $(){const m=et(t);g&&(m.x!==g.x||m.y!==g.y||m.width!==g.width||m.height!==g.height)&&n(),g=m,p=requestAnimationFrame($)}return n(),()=>{var m;a.forEach(v=>{s&&v.removeEventListener("scroll",n),r&&v.removeEventListener("resize",n)}),f?.(),(m=d)==null||m.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const Os=fs,Ns=as,Rs=(t,e,n)=>{const i=new Map,s={platform:Ss,...n},r={...s.platform,_c:i};return us(t,e,{...s,platform:r})};var Ps=Ls;function Ls(t,e,n){var i=null,s=null,r=function(){i&&(clearTimeout(i),s=null,i=null)},o=function(){var l=s;r(),l&&l()},u=function(){if(!e)return t.apply(this,arguments);var l=this,c=arguments,a=n&&!i;if(r(),s=function(){t.apply(l,c)},i=setTimeout(function(){if(i=null,!a){var f=s;return s=null,f()}},e),a)return s()};return u.cancel=r,u.flush=o,u}var Hs=Ms;function Ms(t,e,n){var i=null,s=null,r=n&&n.leading,o=n&&n.trailing;r==null&&(r=!0),o==null&&(o=!r),r==!0&&(o=!1);var u=function(){i&&(clearTimeout(i),i=null)},l=function(){var a=s;u(),a&&a()},c=function(){var a=r&&!i,f=this,h=arguments;if(s=function(){return t.apply(f,h)},i||(i=setTimeout(function(){if(i=null,o)return s()},e)),a)return a=!1,s()};return c.cancel=u,c.flush=l,c}const Hn=t=>typeof t=="object"&&t!=null&&t.nodeType===1,Mn=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",De=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return Mn(n.overflowY,e)||Mn(n.overflowX,e)||(i=>{const s=(r=>{if(!r.ownerDocument||!r.ownerDocument.defaultView)return null;try{return r.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!s&&(s.clientHeight<i.scrollHeight||s.clientWidth<i.scrollWidth)})(t)}return!1},se=(t,e,n,i,s,r,o,u)=>r<t&&o>e||r>t&&o<e?0:r<=t&&u<=n||o>=e&&u>=n?r-t-i:o>e&&u<n||r<t&&u>n?o-e+s:0,Fs=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},Ds=(t,e)=>{var n,i,s,r;if(typeof document>"u")return[];const{scrollMode:o,block:u,inline:l,boundary:c,skipOverflowHiddenElements:a}=e,f=typeof c=="function"?c:S=>S!==c;if(!Hn(t))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,d=[];let p=t;for(;Hn(p)&&f(p);){if(p=Fs(p),p===h){d.push(p);break}p!=null&&p===document.body&&De(p)&&!De(document.documentElement)||p!=null&&De(p,a)&&d.push(p)}const g=(i=(n=window.visualViewport)==null?void 0:n.width)!=null?i:innerWidth,$=(r=(s=window.visualViewport)==null?void 0:s.height)!=null?r:innerHeight,{scrollX:m,scrollY:v}=window,{height:b,width:A,top:w,right:F,bottom:vt,left:V}=t.getBoundingClientRect(),{top:J,right:z,bottom:yt,left:bt}=(S=>{const y=window.getComputedStyle(S);return{top:parseFloat(y.scrollMarginTop)||0,right:parseFloat(y.scrollMarginRight)||0,bottom:parseFloat(y.scrollMarginBottom)||0,left:parseFloat(y.scrollMarginLeft)||0}})(t);let C=u==="start"||u==="nearest"?w-J:u==="end"?vt+yt:w+b/2-J+yt,x=l==="center"?V+A/2-bt+z:l==="end"?F+z:V-bt;const rt=[];for(let S=0;S<d.length;S++){const y=d[S],{height:T,width:k,top:ot,right:le,bottom:ce,left:Ht}=y.getBoundingClientRect();if(o==="if-needed"&&w>=0&&V>=0&&vt<=$&&F<=g&&w>=ot&&vt<=ce&&V>=Ht&&F<=le)return rt;const Mt=getComputedStyle(y),Ft=parseInt(Mt.borderLeftWidth,10),Dt=parseInt(Mt.borderTopWidth,10),Bt=parseInt(Mt.borderRightWidth,10),Wt=parseInt(Mt.borderBottomWidth,10);let q=0,U=0;const It="offsetWidth"in y?y.offsetWidth-y.clientWidth-Ft-Bt:0,jt="offsetHeight"in y?y.offsetHeight-y.clientHeight-Dt-Wt:0,ue="offsetWidth"in y?y.offsetWidth===0?0:k/y.offsetWidth:0,ae="offsetHeight"in y?y.offsetHeight===0?0:T/y.offsetHeight:0;if(h===y)q=u==="start"?C:u==="end"?C-$:u==="nearest"?se(v,v+$,$,Dt,Wt,v+C,v+C+b,b):C-$/2,U=l==="start"?x:l==="center"?x-g/2:l==="end"?x-g:se(m,m+g,g,Ft,Bt,m+x,m+x+A,A),q=Math.max(0,q+v),U=Math.max(0,U+m);else{q=u==="start"?C-ot-Dt:u==="end"?C-ce+Wt+jt:u==="nearest"?se(ot,ce,T,Dt,Wt+jt,C,C+b,b):C-(ot+T/2)+jt/2,U=l==="start"?x-Ht-Ft:l==="center"?x-(Ht+k/2)+It/2:l==="end"?x-le+Bt+It:se(Ht,le,k,Ft,Bt+It,x,x+A,A);const{scrollLeft:je,scrollTop:Ve}=y;q=ae===0?0:Math.max(0,Math.min(Ve+q/ae,y.scrollHeight-T/ae+jt)),U=ue===0?0:Math.max(0,Math.min(je+U/ue,y.scrollWidth-k/ue+It)),C+=Ve-q,x+=je-U}rt.push({el:y,top:q,left:U})}return rt};var Be;const re=window,mt=re.trustedTypes,Fn=mt?mt.createPolicy("lit-html",{createHTML:t=>t}):void 0,We="$lit$",Z=`lit$${(Math.random()+"").slice(9)}$`,Dn="?"+Z,Bs=`<${Dn}>`,nt=document,kt=()=>nt.createComment(""),Ot=t=>t===null||typeof t!="object"&&typeof t!="function",Bn=Array.isArray,Ws=t=>Bn(t)||typeof t?.[Symbol.iterator]=="function",Ie=`[ \f\r]`,Nt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Wn=/-->/g,In=/>/g,it=RegExp(`>|${Ie}(?:([^\\s"'>=/]+)(${Ie}*=${Ie}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),jn=/'/g,Vn=/"/g,zn=/^(?:script|style|textarea|title)$/i,Is=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),js=Is(1),Rt=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),qn=new WeakMap,st=nt.createTreeWalker(nt,129,null,!1);function Un(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Fn!==void 0?Fn.createHTML(e):e}const Vs=(t,e)=>{const n=t.length-1,i=[];let s,r=e===2?"<svg>":"",o=Nt;for(let u=0;u<n;u++){const l=t[u];let c,a,f=-1,h=0;for(;h<l.length&&(o.lastIndex=h,a=o.exec(l),a!==null);)h=o.lastIndex,o===Nt?a[1]==="!--"?o=Wn:a[1]!==void 0?o=In:a[2]!==void 0?(zn.test(a[2])&&(s=RegExp("</"+a[2],"g")),o=it):a[3]!==void 0&&(o=it):o===it?a[0]===">"?(o=s??Nt,f=-1):a[1]===void 0?f=-2:(f=o.lastIndex-a[2].length,c=a[1],o=a[3]===void 0?it:a[3]==='"'?Vn:jn):o===Vn||o===jn?o=it:o===Wn||o===In?o=Nt:(o=it,s=void 0);const d=o===it&&t[u+1].startsWith("/>")?" ":"";r+=o===Nt?l+Bs:f>=0?(i.push(c),l.slice(0,f)+We+l.slice(f)+Z+d):l+Z+(f===-2?(i.push(void 0),u):d)}return[Un(t,r+(t[n]||"<?>")+(e===2?"</svg>":"")),i]};class Pt{constructor({strings:e,_$litType$:n},i){let s;this.parts=[];let r=0,o=0;const u=e.length-1,l=this.parts,[c,a]=Vs(e,n);if(this.el=Pt.createElement(c,i),st.currentNode=this.el.content,n===2){const f=this.el.content,h=f.firstChild;h.remove(),f.append(...h.childNodes)}for(;(s=st.nextNode())!==null&&l.length<u;){if(s.nodeType===1){if(s.hasAttributes()){const f=[];for(const h of s.getAttributeNames())if(h.endsWith(We)||h.startsWith(Z)){const d=a[o++];if(f.push(h),d!==void 0){const p=s.getAttribute(d.toLowerCase()+We).split(Z),g=/([.?@])?(.*)/.exec(d);l.push({type:1,index:r,name:g[2],strings:p,ctor:g[1]==="."?qs:g[1]==="?"?Ks:g[1]==="@"?Ys:oe})}else l.push({type:6,index:r})}for(const h of f)s.removeAttribute(h)}if(zn.test(s.tagName)){const f=s.textContent.split(Z),h=f.length-1;if(h>0){s.textContent=mt?mt.emptyScript:"";for(let d=0;d<h;d++)s.append(f[d],kt()),st.nextNode(),l.push({type:2,index:++r});s.append(f[h],kt())}}}else if(s.nodeType===8)if(s.data===Dn)l.push({type:2,index:r});else{let f=-1;for(;(f=s.data.indexOf(Z,f+1))!==-1;)l.push({type:7,index:r}),f+=Z.length-1}r++}}static createElement(e,n){const i=nt.createElement("template");return i.innerHTML=e,i}}function $t(t,e,n=t,i){var s,r,o,u;if(e===Rt)return e;let l=i!==void 0?(s=n._$Co)===null||s===void 0?void 0:s[i]:n._$Cl;const c=Ot(e)?void 0:e._$litDirective$;return l?.constructor!==c&&((r=l?._$AO)===null||r===void 0||r.call(l,!1),c===void 0?l=void 0:(l=new c(t),l._$AT(t,n,i)),i!==void 0?((o=(u=n)._$Co)!==null&&o!==void 0?o:u._$Co=[])[i]=l:n._$Cl=l),l!==void 0&&(e=$t(t,l._$AS(t,e.values),l,i)),e}class zs{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var n;const{el:{content:i},parts:s}=this._$AD,r=((n=e?.creationScope)!==null&&n!==void 0?n:nt).importNode(i,!0);st.currentNode=r;let o=st.nextNode(),u=0,l=0,c=s[0];for(;c!==void 0;){if(u===c.index){let a;c.type===2?a=new Lt(o,o.nextSibling,this,e):c.type===1?a=new c.ctor(o,c.name,c.strings,this,e):c.type===6&&(a=new Xs(o,this,e)),this._$AV.push(a),c=s[++l]}u!==c?.index&&(o=st.nextNode(),u++)}return st.currentNode=nt,r}v(e){let n=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,n),n+=i.strings.length-2):i._$AI(e[n])),n++}}class Lt{constructor(e,n,i,s){var r;this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=s,this._$Cp=(r=s?.isConnected)===null||r===void 0||r}get _$AU(){var e,n;return(n=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&n!==void 0?n:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&e?.nodeType===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=$t(this,e,n),Ot(e)?e===E||e==null||e===""?(this._$AH!==E&&this._$AR(),this._$AH=E):e!==this._$AH&&e!==Rt&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Ws(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!==E&&Ot(this._$AH)?this._$AA.nextSibling.data=e:this.$(nt.createTextNode(e)),this._$AH=e}g(e){var n;const{values:i,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=Pt.createElement(Un(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)===null||n===void 0?void 0:n._$AD)===r)this._$AH.v(i);else{const o=new zs(r,this),u=o.u(this.options);o.v(i),this.$(u),this._$AH=o}}_$AC(e){let n=qn.get(e.strings);return n===void 0&&qn.set(e.strings,n=new Pt(e)),n}T(e){Bn(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,s=0;for(const r of e)s===n.length?n.push(i=new Lt(this.k(kt()),this.k(kt()),this,this.options)):i=n[s],i._$AI(r),s++;s<n.length&&(this._$AR(i&&i._$AB.nextSibling,s),n.length=s)}_$AR(e=this._$AA.nextSibling,n){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,n);e&&e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){var n;this._$AM===void 0&&(this._$Cp=e,(n=this._$AP)===null||n===void 0||n.call(this,e))}}class oe{constructor(e,n,i,s,r){this.type=1,this._$AH=E,this._$AN=void 0,this.element=e,this.name=n,this._$AM=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=E}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,n=this,i,s){const r=this.strings;let o=!1;if(r===void 0)e=$t(this,e,n,0),o=!Ot(e)||e!==this._$AH&&e!==Rt,o&&(this._$AH=e);else{const u=e;let l,c;for(e=r[0],l=0;l<r.length-1;l++)c=$t(this,u[i+l],n,l),c===Rt&&(c=this._$AH[l]),o||(o=!Ot(c)||c!==this._$AH[l]),c===E?e=E:e!==E&&(e+=(c??"")+r[l+1]),this._$AH[l]=c}o&&!s&&this.j(e)}j(e){e===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class qs extends oe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===E?void 0:e}}const Us=mt?mt.emptyScript:"";class Ks extends oe{constructor(){super(...arguments),this.type=4}j(e){e&&e!==E?this.element.setAttribute(this.name,Us):this.element.removeAttribute(this.name)}}class Ys extends oe{constructor(e,n,i,s,r){super(e,n,i,s,r),this.type=5}_$AI(e,n=this){var i;if((e=(i=$t(this,e,n,0))!==null&&i!==void 0?i:E)===Rt)return;const s=this._$AH,r=e===E&&s!==E||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,o=e!==E&&(s===E||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,i;typeof this._$AH=="function"?this._$AH.call((i=(n=this.options)===null||n===void 0?void 0:n.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}}class Xs{constructor(e,n,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){$t(this,e)}}const Kn=re.litHtmlPolyfillSupport;Kn?.(Pt,Lt),((Be=re.litHtmlVersions)!==null&&Be!==void 0?Be:re.litHtmlVersions=[]).push("2.8.0");const Zs=(t,e,n)=>{var i,s;const r=(i=n?.renderBefore)!==null&&i!==void 0?i:e;let o=r._$litPart$;if(o===void 0){const u=(s=n?.renderBefore)!==null&&s!==void 0?s:null;r._$litPart$=o=new Lt(e.insertBefore(kt(),u),u,void 0,n??{})}return o._$AI(t),o};var Js='<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"/>';export{hn as $,rn as A,ji as B,Ii as C,Ce as D,fi as E,Vi as F,B as G,Hi as H,we as I,Wi as J,tn as K,Ui as L,bi as M,gn as N,hi as O,di as P,pi as Q,Si as R,zi as S,li as T,Ai as U,an as V,Ds as W,gi as X,qi as Y,Ut as Z,ri as _,Ee as a,Zs as a0,js as a1,xe as a2,Ki as a3,si as a4,de as a5,Zi as a6,Yi as a7,$i as a8,ks as a9,Rs as aa,Ns as ab,Os as ac,Js as ad,mi as b,wi as c,Ue as d,Zt as e,ts as f,Xi as g,_e as h,Ae as i,Yt as j,oi as k,sn as l,Hs as m,Ps as n,wt as o,Gn as p,Se as q,on as r,Xt as s,Qn as t,ln as u,Ji as v,Qi as w,Ti as x,fn as y,Te as z};