UNPKG

@builder.io/qwik

Version:

An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.

1 lines 70.7 kB
import{p as t}from"@builder.io/qwik/preloader";const n=!1,e=!0,r=!1,o=t=>function(n,...e){return t.call(null,cc(n),...e)},s=t=>t&&"number"==typeof t.nodeType,i=t=>9===t.nodeType,c=t=>1===t.nodeType,l=t=>{const n=t.nodeType;return 1===n||111===n},u=t=>{const n=t.nodeType;return 1===n||111===n||3===n},f=t=>111===t.nodeType,a=t=>3===t.nodeType,$=t=>8===t.nodeType,d=(t,...n)=>v(!1,t,...n),p=(t,...n)=>{throw v(!1,t,...n)},h=(t,...n)=>v(false,t,...n),v=(t,n,...e)=>{const r=n instanceof Error?n:new Error(n);return console.error("%cQWIK ERROR","",r.message,...e,r.stack),t&&setTimeout((()=>{throw r}),0),r},m=t=>`Code(${t}) https://github.com/QwikDev/qwik/blob/main/packages/qwik/src/core/error/error.ts#L${8+t}`,w=(t,...n)=>{const e=m(t,...n);return h(e,...n)},b=()=>({isServer:n,importSymbol(t,n,e){if(!n)throw w(31,e);if(!t)throw w(30,n,e);const r=y(t.ownerDocument,t,n).toString(),o=new URL(r);return o.hash="",import(o.href).then((t=>t[e]))},raf:t=>new Promise((n=>{requestAnimationFrame((()=>{n(t())}))})),nextTick:t=>new Promise((n=>{setTimeout((()=>{n(t())}))})),chunkForSymbol:(t,n)=>[t,n??"_"]}),y=(t,n,e)=>{const r=t.baseURI,o=new URL(n.getAttribute("q:base")??r,r);return new URL(e,o)};let g=/*#__PURE__ */b();const x=t=>g=t,S=()=>g,q=t=>{const n=Object.getPrototypeOf(t);return n===Object.prototype||null===n},k=t=>!!t&&"object"==typeof t,j=t=>Array.isArray(t),C=t=>"string"==typeof t,M=t=>"function"==typeof t,P=t=>t&&"function"==typeof t.then,O=(t,n,e)=>{try{const r=t();return P(r)?r.then(n,e):n(r)}catch(t){return e(t)}},T=(t,n)=>P(t)?t.then(n):n(t),E=t=>t.some(P)?Promise.all(t):t,R=t=>t.length>0?Promise.all(t):t,I=t=>null!=t,z=t=>new Promise((n=>{setTimeout(n,t)})),A=[],_={},N=()=>document,L="q:renderFn",F="⭐️",U="q:slot",W="q:sref",D="q:s",H="q:style",J="q:sstyle",Q="q:instance",B=(t,n)=>t["qFuncs_"+n]||[],G="q:container",Y="[q\\:container]",K="qRender",V="qTask",X="q:id",Z=Symbol("proxy target"),tt=Symbol("proxy flags"),nt=Symbol("proxy manager"),et=Symbol("IMMUTABLE"),rt="$$",ot="__virtual",st="_qc_",it=(t,n,e)=>t.setAttribute(n,e),ct=(t,n)=>t.getAttribute(n),lt=(t,n)=>t.removeAttribute(n),ut=t=>t.replace(/([A-Z])/g,"-$1").toLowerCase(),ft=(t,n,e=0)=>n.t.get(t)||(0!==e&&dt(t,e),at(t,n,void 0)),at=(t,n,e)=>{Fi(t),n.t.has(t),k(t),q(t)||j(t);const r=n.l.o(e),o=new Proxy(t,new ht(n,r));return n.t.set(t,o),o},$t=()=>{const t={};return dt(t,2),t},dt=(t,n)=>{Object.defineProperty(t,tt,{value:n,enumerable:!1})},pt=(t,n)=>{const e={};for(const r in t)n.includes(r)||(e[r]=t[r]);return e};class ht{u;$;constructor(t,n){this.u=t,this.$=n}deleteProperty(t,n){if(2&t[tt])throw w(17);return"string"==typeof n&&delete t[n]&&(this.$.p(j(t)?void 0:n),!0)}get(t,n){if("symbol"==typeof n)return n===Z?t:n===nt?this.$:t[n];const e=t[tt]??0,r=hr(),o=!!(1&e),s=t[rt+n];let i,c;if(r&&(i=r.v),!(2&e)||n in t&&!vt(t[et]?.[n])||(i=null),s?(Wr(s),c=s.value,i=null):c=t[n],i){const e=j(t);this.$.m(i,e?void 0:n)}return o?mt(c,this.u):c}set(t,n,e){if("symbol"==typeof n)return t[n]=e,!0;const r=t[tt]??0;if(2&r)throw w(17);const o=1&r?Fi(e):e;if(j(t))return t[n]=o,this.$.p(),!0;const s=t[n];return t[n]=o,s!==o&&this.$.p(n),!0}has(t,n){if(n===Z)return!0;const e=hr();if("string"==typeof n&&e){const r=e.v;if(r){const e=j(t);this.$.m(r,e?void 0:n)}}const r=Object.prototype.hasOwnProperty;return!!r.call(t,n)||!("string"!=typeof n||!r.call(t,rt+n))}ownKeys(t){if(!(2&(t[tt]??0))){let t=null;const n=hr();n&&(t=n.v),t&&this.$.m(t)}return j(t)?Reflect.ownKeys(t):Reflect.ownKeys(t).map((t=>"string"==typeof t&&t.startsWith(rt)?t.slice(2):t))}getOwnPropertyDescriptor(t,n){const e=Reflect.getOwnPropertyDescriptor(t,n);return j(t)||"symbol"==typeof n||e&&!e.configurable?e:{enumerable:!0,configurable:!0}}}const vt=t=>t===et||Wr(t),mt=(t,n)=>{if(k(t)){if(Object.isFrozen(t))return t;const e=Fi(t);if(e!==t)return t;if(Ai(e))return t;if(q(e)||j(e))return n.t.get(e)||ft(e,n,1)}return t},wt=/^(on|window:|document:)/,bt="preventdefault:",yt=t=>t.endsWith("$")&&wt.test(t),gt=t=>{if(0===t.length)return A;if(1===t.length){const n=t[0];return[[n[0],[n[1]]]]}const n=[];for(let e=0;e<t.length;e++){const r=t[e][0];n.includes(r)||n.push(r)}return n.map((n=>[n,t.filter((t=>t[0]===n)).map((t=>t[1]))]))},xt=(t,n,e,r)=>{if(n.endsWith("$"),n=kt(n.slice(0,-1)),e)if(j(e)){const o=e.flat(1/0).filter((t=>null!=t)).map((t=>[n,jt(t,r)]));t.push(...o)}else t.push([n,jt(e,r)]);return n},St=["on","window:on","document:on"],qt=["on","on-window","on-document"],kt=t=>{let n="on";for(let e=0;e<St.length;e++){const r=St[e];if(t.startsWith(r)){n=qt[e],t=t.slice(r.length);break}}return n+":"+(t.startsWith("-")?ut(t.slice(1)):t.toLowerCase())},jt=(t,n)=>{const e=Vi(t)?t:cc(t);return e.S(n),e},Ct=(t,n=0)=>{for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;return Number(Math.abs(n)).toString(36)},Mt="1.15.0",Pt=()=>{const t=mr(),n=lr(t.q,t.j.k.u),e=n.C||=[],r=t.M++;return{val:e[r],set:t=>e[r]=t,i:r,iCtx:t,elCtx:n}},Ot=t=>(/^[\w/.-]+$/.test(t),/*#__PURE__*/Object.freeze({id:ut(t)})),Tt=(t,n)=>{const{val:e,set:r,elCtx:o}=Pt();void 0===e&&((o.P||=new Map).set(t.id,n),r(!0))},Et=(t,n)=>{const{val:e,set:r,iCtx:o,elCtx:s}=Pt();if(void 0!==e)return e;const i=It(t,s,o.j.k.u);if("function"==typeof n)return r(yr(void 0,n,i));if(void 0!==i)return r(i);if(void 0!==n)return r(n);throw w(13,t.id)},Rt=(t,n)=>(void 0===t.O&&(t.O=((t,n)=>{let e=t,r=1;for(;e&&!e.hasAttribute?.("q:container");){for(;e=e.previousSibling;)if($(e)){const t=e[ot];if(t){const r=t[st];if(e===t.open)return r??lr(t,n);if(r?.O)return r.O;e=t;continue}if("/qv"===e.data)r++;else if(e.data.startsWith("qv ")&&(r--,0===r))return lr(ds(e),n)}e=t.parentElement,t=e}return null})(t.T,n)),t.O),It=(t,n,e)=>{const r=t.id;if(!n)return;let o=n;for(;o;){const t=o.P?.get(r);if(t)return t;o=Rt(o,e)}},zt=/*#__PURE__*/Ot("qk-error"),At=(t,n,e)=>{const r=cr(n);{const n=It(zt,r,e.k.u);if(void 0===n)throw t;n.error=t}},_t=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexShrink","gridArea","gridRow","gridRowEnd","gridRowStart","gridColumn","gridColumnEnd","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","MozAnimationIterationCount","MozBoxFlex","msFlex","msFlexPositive","WebkitAnimationIterationCount","WebkitBoxFlex","WebkitBoxOrdinalGroup","WebkitColumnCount","WebkitColumns","WebkitFlex","WebkitFlexGrow","WebkitFlexShrink","WebkitLineClamp"]),Nt=(t,n,e)=>{n.R&=-2,n.R|=sr,n.I=[],n.li.length=0;const r=n.T,o=n.A,s=n.N,i=qr(t.k.L,r,void 0,K),c=i.F=[],l=Ft(t);l.U=n,l.W=void 0,i.v=[0,r],i.j=t,o.S(t.k.u.D);const u=o.getFn(i);return O((()=>u(s)),(r=>T(R(c),(()=>n.R&rr&&!(e&&e>100)?Nt(t,n,e?e+1:1):{node:r,rCtx:l}))),(o=>o!==_r||e&&e>100?(At(o,r,t),{node:Un,rCtx:l}):T(R(c),(()=>Nt(t,n,e?e+1:1)))))},Lt=(t,n)=>({k:{H:t,L:n.J.locale,u:n,B:new Set,G:[],Y:[],K:[],X:[],Z:[],tt:[]},U:null,W:void 0}),Ft=t=>({k:t.k,U:t.U,W:t.W}),Ut=(t,n)=>n?.nt?.length?n.nt.join(" ")+" "+Wt(t):Wt(t),Wt=t=>{if(!t)return"";if(C(t))return t.trim();const n=[];if(j(t))for(const e of t){const t=Wt(e);t&&n.push(t)}else for(const[e,r]of Object.entries(t))r&&n.push(e.trim());return n.join(" ")},Dt=t=>{if(null==t)return"";if("object"==typeof t){if(j(t))throw w(0,t,"style");{const n=[];for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const r=t[e];null!=r&&"function"!=typeof r&&(e.startsWith("--")?n.push(e+":"+r):n.push(ut(e)+":"+Ht(e,r)))}return n.join(";")}}return String(t)},Ht=(t,n)=>"number"!=typeof n||0===n||_t.has(t)?n:n+"px",Jt=t=>Vr(t.k.u.et++),Qt=(t,n)=>{const e=Jt(t);n.rt=e},Bt=t=>Wr(t)?Bt(t.value):null==t||"boolean"==typeof t?"":String(t);function Gt(t){return t.startsWith("aria-")}const Yt=(t,n)=>!!n.key&&(!_n(t)||!M(t.type)&&t.key!=n.key),Kt="dangerouslySetInnerHTML",Vt="\x3c!--qkssr-f--\x3e";class Xt{nodeType;[st]=null;constructor(t){this.nodeType=t}}const Zt=async(t,n)=>{const e=n.containerTagName,r=un(1).T,o=Br(r,n.base??"/");o.J.locale=n.serverData?.locale;const s=new Xt(9),i=Lt(s,o),c=n.beforeContent??[],l={k:{P:[],ot:"html"===e?c:[],L:n.serverData?.locale,st:new Map},it:void 0,ct:void 0,lt:void 0},u=n.serverData?.locale,f=n.containerAttributes,a=f["q:render"];f["q:container"]="paused",f["q:version"]=Mt,f["q:render"]=(a?a+"-":"")+"ssr",f["q:base"]=n.base||"",f["q:locale"]=u,f["q:manifest-hash"]=n.manifestHash,f["q:instance"]=tn();const $="html"===e?[t]:[c,t];"html"!==e&&(f.class="qc📦"+(f.class?" "+f.class:""));const d=o.J={...o.J,...n.serverData};d.containerAttributes={...d.containerAttributes,...f},(l.lt=qr(u)).j=i;const p=Mn(e,null,f,$,rr|or,null);o.ut=new Set,await Promise.resolve().then((()=>nn(p,i,l,n.stream,o,n)))},tn=()=>Math.random().toString(36).slice(2),nn=async(t,n,e,r,o,s)=>{const i=s.beforeClose;return await fn(t,n,e,r,0,i?t=>{const r=i(e.k.P,o,!1,e.k.st);return an(r,n,e,t,0,void 0)}:void 0),n},en=(t,n,e,r,o,s,i,c)=>{const l=t.props,u=l[L];if(u)return n.A=u,cn(r,o,s,n,t,i,c);let f="\x3c!--qv"+on(l);const a=D in l,$=null!=t.key?String(t.key):null;a&&(f+=" q:sref="+r.U.rt),null!=$&&(f+=" q:key="+$),f+="--\x3e",s.write(f);const d=t.props[Kt];if(d)return s.write(d),void s.write(rn);if(e)for(const t of e)sn(t.type,t.props,s);const p=$n(t.children,r,o,s,i);return T(p,(()=>{if(!a&&!c)return void s.write(rn);let t;if(a){const e=o.it?.[$];if(e){const[r,c]=o.ct,l=Ft(r);l.W=n,o.it[$]=void 0,t=an(e,l,c,s,i)}}return c&&(t=T(t,(()=>c(s)))),T(t,(()=>{s.write(rn)}))}))},rn="\x3c!--/qv--\x3e",on=t=>{let n="";for(const e in t){if("children"===e||e===Kt)continue;const r=t[e];null!=r&&(n+=" "+(""===r?e:e+"="+r))}return n},sn=(t,n,e)=>{if(e.write("<"+t+(t=>{let n="";for(const e in t){if(e===Kt)continue;const r=t[e];null!=r&&(n+=" "+(""===r?e:e+'="'+r+'"'))}return n})(n)+">"),wn[t])return;const r=n[Kt];null!=r&&e.write(r),e.write(`</${t}>`)},cn=(t,n,e,r,o,s,i)=>(hn(t,r,o.props.props),T(Nt(t,r),(c=>{const l=r.T,u=c.rCtx,f=qr(n.k.L,l,void 0);f.v=[0,l],f.j=u;const a={k:n.k,it:ln(o.children,n),ct:[t,n],lt:f},$=[];if(r.ft){const t=4&s?n.k.ot:$;for(const n of r.ft)t.push(Mn("style",{[H]:n.styleId,[Kt]:n.content,hidden:""},null,null,0,null))}const d=Jt(t),p=r.nt?(t=>{const n=t.join("|");if(n.length>0)return n})(r.nt):void 0,h=On(o.type,{[J]:p,[X]:d,children:c.node},0,o.key);return r.rt=d,n.k.P.push(r),en(h,r,$,u,a,e,s,(e=>{if(r.R&or){const o=un(1),s=o.li;s.push(...r.li),r.R&=-3,o.rt=Jt(t);const i={type:"placeholder",hidden:"","q:id":o.rt};n.k.P.push(o);const c=gt(s);for(const n of c){const e=jn(n[0]);i[e]=Fs(n[1],t.k.u,o),yn(e,t.k.u)}sn("script",i,e)}const o=a.it;let s;if(o){const t=Object.keys(o).map((t=>{const n=o[t];if(n)return Mn("q:template",{[U]:t||!0,hidden:!0,"aria-hidden":"true"},null,n,0,null)})),[n,i]=a.ct,c=Ft(n);c.W=r,s=an(t,c,i,e,0,void 0)}return i?T(s,(()=>i(e))):s}))}))),ln=(t,n)=>{const e=dn(t,n);if(null===e)return;const r={};for(const t of e){let n="";_n(t)&&(n=t.props[U]||""),(r[n]||=[]).push(t)}return r},un=t=>{const n=new Xt(t);return fr(n)},fn=(t,n,e,r,o,s)=>{const i=t.type,c=n.U;if("string"==typeof i){const l=t.key,u=t.props,f=t.immutableProps||_,a=un(1),$=a.T,d="head"===i;let p="<"+i,h=!1,v=!1,m="",w=null;const b=(t,e,r)=>{if("ref"===t)return void(void 0!==e&&(Gr(e,$),v=!0));if(yt(t))return void xt(a.li,t,e,void 0);if(Wr(e)&&(e=Mr(e,r?[1,$,e,c.T,t]:[2,c.T,e,$,t]),h=!0),t===Kt)return void(w=e);let o;t.startsWith(bt)&&yn(t.slice(15),n.k.u);const s="htmlFor"===t?"for":t;"class"===s||"className"===s?m=Wt(e):"style"===s?o=Dt(e):Gt(s)||"draggable"===s||"spellcheck"===s?(o=null!=e?String(e):null,e=o):o=!1===e||null==e?null:String(e),null!=o&&("value"===s&&"textarea"===i?w=gn(o):Sn(s)||(p+=" "+(!0===e?s:s+'="'+gn(o)+'"')))};for(const t in u){let n,e=!1;t in f?(e=!0,n=f[t],n===et&&(n=u[t])):n=u[t],b(t,n,e)}for(const t in f){if(t in u)continue;const n=f[t];n!==et&&b(t,n,!0)}const y=a.li;if(c){if(c.nt?.length){const t=c.nt.join(" ");m=m?`${t} ${m}`:t}c.R&or&&(y.push(...c.li),c.R&=-3)}if(d&&(o|=1),i in vn&&(o|=16),i in mn&&(o|=8),m&&(p+=' class="'+gn(m)+'"'),y.length>0){const t=gt(y),e=!!(16&o);for(const r of t){const t=e?jn(r[0]):r[0];p+=" "+t+'="'+Fs(r[1],n.k.u,a)+'"',yn(t,n.k.u)}}if(null!=l&&(p+=' q:key="'+gn(l)+'"'),v||h||y.length>0){if(v||h||qn(y)){const t=Jt(n);p+=' q:id="'+t+'"',a.rt=t}e.k.P.push(a)}if(1&o&&(p+=" q:head"),p+=">",r.write(p),i in wn)return;if(null!=w)return r.write(String(w)),void r.write(`</${i}>`);"html"===i?o|=4:o&=-5,2&t.flags&&(o|=1024);const g=an(t.children,n,e,r,o);return T(g,(()=>{if(d){for(const t of e.k.ot)sn(t.type,t.props,r);e.k.ot.length=0}if(s)return T(s(r),(()=>{r.write(`</${i}>`)}));r.write(`</${i}>`)}))}if(i===In){const i=un(111);return n.W?(i.O=n.W,i.$t=n.U):i.O=n.U,c&&c.R&ir&&kn(c,i),en(t,i,void 0,n,e,r,o,s)}if(i===Wn)return void r.write(t.props.data);if(i===Bn)return(async(t,n,e,r,o)=>{r.write(Vt);const s=t.props.children;let i;if(M(s)){const t=s({write(t){r.write(t),r.write(Vt)}});if(P(t))return t;i=t}else i=s;for await(const t of i)await an(t,n,e,r,o,void 0),r.write(Vt)})(t,n,e,r,o);const l=yr(e.lt,i,t.props,t.key,t.flags,t.dev);return Yt(l,t)?fn(On(In,{children:l},0,t.key),n,e,r,o,s):an(l,n,e,r,o,s)},an=(t,n,e,r,o,s)=>{if(null!=t&&"boolean"!=typeof t){if(!C(t)&&"number"!=typeof t){if(_n(t))return fn(t,n,e,r,o,s);if(j(t))return $n(t,n,e,r,o);if(Wr(t)){const i=8&o,c=n.U?.T;let l;if(c){if(!i){const i=Jt(n);if(l=Mr(t,1024&o?[3,"#"+i,t,"#"+i]:[4,c,t,"#"+i]),C(l)){const t=Bt(l);e.k.st.set(t,i)}return r.write(`\x3c!--t=${i}--\x3e`),an(l,n,e,r,o,s),void r.write("\x3c!----\x3e")}l=yr(e.lt,(()=>t.value))}return void r.write(gn(Bt(l)))}return P(t)?(r.write(Vt),t.then((t=>an(t,n,e,r,o,s)))):void 0}r.write(gn(String(t)))}},$n=(t,n,e,r,o)=>{if(null==t)return;if(!j(t))return an(t,n,e,r,o);const s=t.length;if(1===s)return an(t[0],n,e,r,o);if(0===s)return;let i=0;const c=[];return t.reduce(((t,s,l)=>{const u=[];c.push(u);const f=an(s,n,e,t?{write(t){i===l?r.write(t):u.push(t)}}:r,o);if(t||P(f)){const n=()=>{i++,c.length>i&&c[i].forEach((t=>r.write(t)))};return P(f)?t?Promise.all([f,t]).then(n):f.then(n):t.then(n)}i++}),void 0)},dn=(t,n)=>{if(null==t)return null;const e=pn(t,n),r=j(e)?e:[e];return 0===r.length?null:r},pn=(t,n)=>{if(null==t)return null;if(j(t))return t.flatMap((t=>pn(t,n)));if(_n(t)&&M(t.type)&&t.type!==Wn&&t.type!==Bn&&t.type!==In){const e=yr(n.lt,t.type,t.props,t.key,t.flags);return dn(e,n)}return t},hn=(t,n,e)=>{const r=Object.keys(e),o=$t();if(n.N=at(o,t.k.u),0===r.length)return;const s=o[et]=e[et]??_;for(const t of r)"children"!==t&&t!==U&&(Wr(s[t])?o[rt+t]=s[t]:o[t]=e[t])},vn={head:!0,style:!0,script:!0,link:!0,meta:!0},mn={title:!0,style:!0,script:!0,noframes:!0,textarea:!0},wn={area:!0,base:!0,basefont:!0,bgsound:!0,br:!0,col:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},bn=/[&<>'"]/g,yn=(t,n)=>{n.dt.add(Zr(t))},gn=t=>t.replace(bn,(t=>{switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"'":return"&#39;";default:return""}})),xn=/[>/="'\u0009\u000a\u000c\u0020]/,Sn=t=>xn.test(t),qn=t=>t.some((t=>t[1].ht&&t[1].ht.length>0)),kn=(t,n)=>{const e=t.vt||=[];e.includes(n)||e.push(n)},jn=t=>"on:qvisible"===t?"on-document:qinit":t,Cn=(t,n,e)=>new Fr(t,n,e),Mn=(t,n,e,r,o,s)=>{const i=null==s?null:String(s),c=new Rn(t,n||_,e,r,o,i);return An(c),c},Pn=(t,n,e,r,o,s)=>{let i=null;return n&&"children"in n&&(i=n.children,delete n.children),Mn(t,n,e,i,r,o,s)},On=(t,n,e,r,o)=>{const s=null==r?null:String(r),i=n??{};if("string"==typeof t&&et in i){const n=i[et];delete i[et];const s=i.children;delete i.children;for(const[t,e]of Object.entries(n))e!==et&&(delete i[t],i[t]=e);return Mn(t,null,i,s,e,r,o)}const c=new Rn(t,i,null,i.children,e,s);return"string"==typeof t&&n&&delete n.children,An(c),c},Tn=(t,n,e)=>{const r=null==e?null:String(e),o=jr((()=>{const e=n.children;return"string"==typeof t&&delete n.children,e}));C(t)&&"className"in n&&(n.class=n.className,delete n.className);const s=new Rn(t,n,null,o,0,r);return An(s),s},En=":skipRender";class Rn{type;props;immutableProps;children;flags;key;dev;constructor(t,n,e,r,o,s=null){this.type=t,this.props=n,this.immutableProps=e,this.children=r,this.flags=o,this.key=s}}const In=t=>t.children,zn=(t,n)=>new Rn(In,_,null,t.children,2,n),An=()=>{},_n=t=>t instanceof Rn,Nn=t=>t.children,Ln=t=>Tn(In,t),Fn=(t,n,e,r,o)=>{const s=null==e?null:String(e),i=jr((()=>{const e=n.children;return"string"==typeof t&&delete n.children,e}));C(t)&&"className"in n&&(n.class=n.className,delete n.className);const c=new Rn(t,n,null,i,0,s);return c.dev={stack:(new Error).stack,...o},An(c),c},Un=Symbol("skip render"),Wn=()=>null,Dn=t=>Tn(Wn,{data:`\x3c!--${t.data}--\x3e`},null),Hn=t=>[Tn(Dn,{data:"qkssr-pu"}),t.children,Tn(Dn,{data:"qkssr-po"})],Jn=(t,n)=>Tn(zn,{children:Tn(Bn,t)},n),Qn=()=>null,Bn=()=>null,Gn=(t,n,e)=>{const r=!(n.R&sr),o=n.T,s=t.k.u;return s.wt.delete(n),s.l.bt(o),T(Nt(t,n),(s=>{const i=t.k,c=s.rCtx,l=qr(t.k.L,o);if(i.B.add(o),l.v=[0,o],l.j=c,r&&n.ft)for(const t of n.ft)Ko(i,t);const u=Zn(s.node,l);return T(u,(t=>{const r=Xn(o,t),s=Yn(n);return T(oo(c,s,r,e),(()=>{n.yt=r}))}))}))},Yn=t=>(t.yt||(t.yt=fo(t.T)),t.yt);class Kn{gt;N;xt;St;R;qt;kt=null;jt="";Ct=null;rt;Mt;constructor(t,n,e,r,o,s){this.gt=t,this.N=n,this.xt=e,this.St=r,this.R=o,this.qt=s,this.rt=t+(s?":"+s:"")}}const Vn=(t,n)=>{const{key:e,type:r,props:o,children:s,flags:i,immutableProps:c}=t;let l="";if(C(r))l=r;else{if(r!==In){if(M(r)){const s=yr(n,r,o,e,i,t.dev);return Yt(s,t)?Vn(On(In,{children:s},0,e),n):Zn(s,n)}throw w(25,r)}l=fs}let u=A;return null!=s?T(Zn(s,n),(t=>(void 0!==t&&(u=j(t)?t:[t]),new Kn(l,o,c,u,i,e)))):new Kn(l,o,c,u,i,e)},Xn=(t,n)=>{const e=void 0===n?A:j(n)?n:[n],r=new Kn(":virtual",{},null,e,0,null);return r.kt=t,r},Zn=(t,n)=>{if(null!=t&&"boolean"!=typeof t){if(te(t)){const n=new Kn("#text",_,null,A,0,null);return n.jt=String(t),n}if(_n(t))return Vn(t,n);if(Wr(t)){const n=new Kn("#signal",_,null,A,0,null);return n.Ct=t,n}if(j(t)){const e=E(t.flatMap((t=>Zn(t,n))));return T(e,(t=>t.flat(100).filter(I)))}return P(t)?t.then((t=>Zn(t,n))):t===Un?new Kn(En,_,null,A,0,null):void 0}},te=t=>C(t)||"number"==typeof t,ne=t=>{"paused"===ct(t,G)&&re(t)},ee=(t,n)=>{const e=JSON.parse(t);if("object"!=typeof e)return null;const{_objs:r,_entry:o}=e;if(void 0===r||void 0===o)return null;let i={},c={};if(s(n)&&l(n)){const t=kr(n);t&&(c=Qr(t),i=t.ownerDocument)}const u=Ci(c,i);for(let t=0;t<r.length;t++){const n=r[t];C(n)&&(r[t]=n===Zs?void 0:u.prepare(n))}const f=t=>r[Xr(t)];for(const t of r)se(t,f,u);return f(o)},re=t=>{if(!Kr(t))return;const n=t._qwikjson_??(t=>{const n=N(),e=ce(t===n.documentElement?n.body:t,"type");if(e)return JSON.parse(ie(e.firstChild.data)||"{}")})(t);if(t._qwikjson_=null,!n)return;const e=N(),r=t.getAttribute(Q),o=B(e,r),s=Qr(t),i=new Map,l=new Map;let u=null,f=0;const a=e.createTreeWalker(t,Yr);for(;u=a.nextNode();){const t=u.data;if(0===f)if(t.startsWith("qv ")){const n=ue(t);n>=0&&i.set(n,u)}else if(t.startsWith("t=")){const n=t.slice(2),e=Xr(n),r=le(u);i.set(e,r),l.set(e,r.data)}"cq"===t?f++:"/cq"===t&&f--}const d=0!==t.getElementsByClassName("qc📦").length;t.querySelectorAll("[q\\:id]").forEach((n=>{if(d&&n.closest("[q\\:container]")!==t)return;const e=ct(n,X),r=Xr(e);i.set(r,n)}));const p=Ci(s,e),h=new Map,v=new Set,m=t=>h.has(t)?h.get(t):w(t),w=t=>{if(t.startsWith("#")){const n=t.slice(1),e=Xr(n);i.has(e);const r=i.get(e);if($(r)){if(!r.isConnected)return void h.set(t,void 0);const n=ds(r);return h.set(t,n),lr(n,s),n}return c(r)?(h.set(t,r),lr(r,s),r):(h.set(t,r),r)}if(t.startsWith("@")){const n=t.slice(1),e=Xr(n);return o[e]}if(t.startsWith("*")){const n=t.slice(1),e=Xr(n);i.has(e);const r=l.get(e);return h.set(t,r),r}const e=Xr(t);let r=n.objs[e];C(r)&&(r=r===Zs?void 0:p.prepare(r));let u=r;for(let n=t.length-1;n>=0;n--){const e=Mi[t[n]];if(!e)break;u=e(u,s)}return h.set(t,u),te(r)||v.has(e)||(v.add(e),oe(r,e,n.subs,m,s,p),se(r,m,p)),u};var b,y;s.et=1e5,s.Pt={getObject:m,meta:n.ctx,refs:n.refs},it(t,G,"resumed"),y=!0,(b=t)&&b.dispatchEvent(new CustomEvent("qresume",{detail:void 0,bubbles:y,composed:y}))},oe=(t,n,e,r,o,s)=>{const i=e[n];if(i){const n=[];let e=0;for(const t of i)if(t.startsWith("_"))e=parseInt(t.slice(1),10);else{const e=Ji(t,r);e&&n.push(e)}if(e>0&&dt(t,e),!s.subs(t,n)){const e=o.t.get(t);e?Wi(e).Ot(n):at(t,o,n)}}},se=(t,n,e)=>{if(!e.fill(t,n)&&t&&"object"==typeof t)if(j(t))for(let e=0;e<t.length;e++)t[e]=n(t[e]);else if(q(t))for(const e in t)t[e]=n(t[e])},ie=t=>t.replace(/\\x3C(\/?script)/gi,"<$1"),ce=(t,n)=>{let e=t.lastElementChild;for(;e;){if("SCRIPT"===e.tagName&&"qwik/json"===ct(e,n))return e;e=e.previousElementSibling}},le=t=>{const n=t.nextSibling;if(a(n))return n;{const n=t.ownerDocument.createTextNode("");return t.parentElement.insertBefore(n,t),n}},ue=t=>{const n=t.indexOf("q:id=");return n>0?Xr(t.slice(n+5)):-1},fe=()=>{const t=vr();let n=t.Tt;if(n);else{const e=t.T,r=kr(e);n=Us(decodeURIComponent(String(t.Et)),r),ne(r);const o=lr(e,Qr(r));Hs(n,o)}return n.ht},ae=(t,n)=>{if(0===t[0]){const e=t[1];nr(e)?pe(e,n):$e(e,n)}else de(t,n)},$e=(t,n)=>{ne(n.D);const e=lr(t,n);e.R&rr||(e.R|=rr,void 0!==n.ut?n.wt.add(e):(n.Rt.add(e),he(n)))},de=(t,n)=>{const e=void 0!==n.ut;n.It.add(t),e||he(n)},pe=(t,n)=>{t.R&_e||(t.R|=_e,void 0!==n.ut?n.zt.add(t):(n.At.add(t),he(n)))},he=t=>(void 0===t._t&&(t._t=S().nextTick((()=>me(t)))),t._t),ve=()=>{const[t]=fe();pe(t,Qr(kr(t.Nt)))},me=async t=>{const n=t.D,e=N();try{const r=Lt(e,t),o=r.k,s=t.ut=new Set(t.Rt);t.Rt.clear(),await xe(t,r),t.wt.forEach((t=>{s.add(t)})),t.wt.clear();const i=Array.from(t.It);t.It.clear();const c=Array.from(s);qe(c),!t.Lt&&c.length>0&&(t.Lt=!0,(n===e.documentElement?e.body:n).querySelectorAll("style[q\\:style]").forEach((n=>{t.Ft.add(ct(n,H)),Yo(o,e.head,n)})));for(const t of c){const n=t.T;if(!o.B.has(n)&&t.A){o.K.push(t);try{await Gn(r,t,we(n.parentElement))}catch(t){d(t)}}}return i.forEach((t=>{((t,n)=>{try{const e=n[0],r=t.k;switch(e){case 1:case 2:{let t,o;1===e?(t=n[1],o=n[3]):(t=n[3],o=n[1]);const s=cr(t);if(null==s)return;const i=n[4],c=t.namespaceURI===to;r.u.l.Ut(n);let l=Mr(n[2],n.slice(0,-1));"class"===i?l=Ut(l,cr(o)):"style"===i&&(l=Dt(l));const u=Yn(s);if(i in u.N&&u.N[i]===l)return;return u.N[i]=l,Po(r,t,i,l,c)}case 3:case 4:{const e=n[3];if(!r.tt.includes(e)){r.u.l.Ut(n);const o=void 0;let s=Mr(n[2],n.slice(0,-1));const i=Yi;Array.isArray(s)&&(s=new Rn(In,{},null,s,0,null));let c=Zn(s,o);if(P(c))d("Rendering promises in JSX signals is not supported");else{void 0===c&&(c=Zn("",o));const s=uo(e),u=function(t){for(;t;){if(l(t))return t;t=t.parentElement}throw new Error("Not found")}(n[1]);if(t.U=lr(u,t.k.u),s.gt==c.gt&&s.qt==c.qt&&s.rt==c.rt)vo(t,s,c,0);else{const n=[],o=s.kt,l=xo(t,c,0,n);n.length&&d("Rendering promises in JSX signals is not supported"),i[3]=l,Bo(t.k,e.parentElement,l,o),o&&ts(r,o)}}}}}}catch(t){}})(r,t)})),o.G.push(...o.Y),0===o.G.length?(cs(o),void await be(t,r)):(await Io(o),cs(o),be(t,r))}catch(t){d(t)}},we=t=>{let n=0;return t&&(t.namespaceURI===to&&(n|=no),"HEAD"===t.tagName&&(n|=eo)),n},be=async(t,n)=>{const e=n.k.B;await Se(t,n,((t,n)=>!!(t.R&Ie)&&(!n||e.has(t.Nt)))),t.wt.forEach((n=>{t.Rt.add(n)})),t.wt.clear(),t.ut=void 0,t._t=void 0,t.Rt.size+t.At.size+t.It.size>0&&(t._t=me(t))},ye=t=>!!(t.R&ze),ge=t=>!!(t.R&Ae),xe=async(t,n)=>{const e=t.D,r=[],o=[];t.At.forEach((n=>{ye(n)&&(o.push(T(n.Tt.Wt(e),(()=>n))),t.At.delete(n)),ge(n)&&(r.push(T(n.Tt.Wt(e),(()=>n))),t.At.delete(n))}));do{if(t.zt.forEach((n=>{ye(n)?o.push(T(n.Tt.Wt(e),(()=>n))):ge(n)?r.push(T(n.Tt.Wt(e),(()=>n))):t.At.add(n)})),t.zt.clear(),o.length>0){const e=await Promise.all(o);ke(e),await Promise.all(e.map((e=>Be(e,t,n)))),o.length=0}}while(t.zt.size>0);if(r.length>0){const e=await Promise.all(r);ke(e);for(const r of e)Be(r,t,n)}},Se=async(t,n,e)=>{const r=[],o=t.D;t.At.forEach((n=>{e(n,!1)&&(n.Nt.isConnected&&r.push(T(n.Tt.Wt(o),(()=>n))),t.At.delete(n))}));do{if(t.zt.forEach((n=>{n.Nt.isConnected&&(e(n,!0)?r.push(T(n.Tt.Wt(o),(()=>n))):t.At.add(n))})),t.zt.clear(),r.length>0){const e=await Promise.all(r);ke(e);for(const r of e)Be(r,t,n);r.length=0}}while(t.zt.size>0)},qe=t=>{t.sort(((t,n)=>2&t.T.compareDocumentPosition(ps(n.T))?1:-1))},ke=t=>{t.sort(((t,n)=>t.Nt===n.Nt?t.Dt<n.Dt?-1:1:2&t.Nt.compareDocumentPosition(ps(n.Nt))?1:-1))},je=(t,n)=>{Oe(Pe(t,void 0),n)},Ce=(t,n)=>{Oe(Pe(t,"document"),n)},Me=(t,n)=>{Oe(Pe(t,"window"),n)},Pe=(t,n)=>{const e=void 0!==n?n+":":"";return Array.isArray(t)?t.map((t=>`${e}on-${t}`)):`${e}on-${t}`},Oe=(t,n)=>{if(n){const e=mr(),r=lr(e.q,e.j.k.u);"string"==typeof t?r.li.push([kt(t),n]):r.li.push(...t.map((t=>[kt(t),n]))),r.R|=or}},Te=t=>{const n=wr(),e=M(t)&&!dc(t)?yr(void 0,t):t;return Rr(e,n,0)},Ee=t=>{const{val:n,set:e}=Pt();return null!=n?n:e(t=M(t)&&!dc(t)?t():t)},Re=t=>Ee((()=>Te(t))),Ie=1,ze=2,Ae=4,_e=16,Ne=t=>{const{val:n,set:e,iCtx:r,i:o,elCtx:s}=Pt();if(n)return;const i=r.j.k.u,c=new er(_e|ze,o,s.T,t,void 0);e(!0),t.Wt(i.D),s.Ht||(s.Ht=[]),s.Ht.push(c),xr(r,(()=>Ye(c,i,r.j)))},Le=t=>{const n=mr(),e=n.j.k.u,r=lr(n.q,e),o=Rr(void 0,e,Ar|zr,void 0),s=new er(_e|ze|8,0,r.T,t,o);return t.Wt(e.D),(r.Ht||=[]).push(s),xr(n,(()=>Ke(s,e,n.j))),o},Fe=t=>Ee((()=>Le(t))),Ue=o(Fe),We=o(Le),De=/*#__PURE__*/o(Ne),He=(t,n)=>{const{val:e,set:r,i:o,iCtx:s,elCtx:i}=Pt(),c=n?.strategy??"intersection-observer";if(e)return;const l=new er(Ie,o,i.T,t,void 0),u=s.j.k.u;i.Ht||(i.Ht=[]),i.Ht.push(l),r(l),Ze(l,c),t.Wt(u.D),pe(l,u)},Je=/*#__PURE__*/o(He),Qe=t=>!!(t.R&Ae),Be=async(t,n,e)=>Qe(t)?Ge(t,n,e):(t=>!!(8&t.R))(t)?Ke(t,n,e):Ye(t,n,e),Ge=(t,n,e,r)=>{t.R&=-17,Ve(t);const o=qr(e.k.L,t.Nt,void 0,V),{l:s}=n;o.j=e;const i=t.Tt.getFn(o,(()=>{s.bt(t)})),c=[],l=t.Jt,u=Fi(l),f={track:(n,r)=>{if(M(n)){const r=qr();return r.j=e,r.v=[0,t],yr(r,n)}const o=Wi(n);return o?o.m([0,t],r):h(m(26),n),r?n[r]:Wr(n)?n.value:n},cleanup(t){c.push(t)},cache(t){let n=0;n="immutable"===t?1/0:t,l._cache=n},previous:u._resolved};let a,$,d=!1;const p=(t,n)=>!d&&(d=!0,t?(d=!0,l.loading=!1,l._state="resolved",l._resolved=n,l._error=void 0,a(n)):(d=!0,l.loading=!1,l._state="rejected",l._error=n,$(n)),!0);yr(o,(()=>{l._state="pending",l.loading=!0,l.value=new Promise(((t,n)=>{a=t,$=n}))})),t.Qt=Ni((()=>{d=!0,c.forEach((t=>t()))}));const v=O((()=>T(r,(()=>i(f)))),(t=>{p(!0,t)}),(t=>{p(!1,t)})),w=u._timeout;return w>0?Promise.race([v,z(w).then((()=>{p(!1,new Error("timeout"))&&Ve(t)}))]):v},Ye=(t,n,e)=>{t.R&=-17,Ve(t);const r=t.Nt,o=qr(e.k.L,r,void 0,V);o.j=e;const{l:s}=n,i=t.Tt.getFn(o,(()=>{s.bt(t)})),c=[];t.Qt=Ni((()=>{c.forEach((t=>t()))}));const l={track:(n,e)=>{if(M(n)){const e=qr();return e.v=[0,t],yr(e,n)}const r=Wi(n);return r?r.m([0,t],e):h(m(26),n),e?n[e]:Wr(n)?n.value:n},cleanup(t){c.push(t)}};return O((()=>i(l)),(t=>{M(t)&&c.push(t)}),(t=>{At(t,r,e)}))},Ke=(t,n,e)=>{t.R&=-17,Ve(t);const r=t.Nt,o=qr(e.k.L,r,void 0,"qComputed");o.v=[0,t],o.j=e;const{l:s}=n,i=t.Tt.getFn(o,(()=>{s.bt(t)})),c=n=>{jr((()=>{const e=t.Jt;e[Ir]&=-3,e.untrackedValue=n,e[nt].p()}))},l=t=>{At(t,r,e)};try{return T(t.Tt.Wt(n.D),(()=>{const t=i();if(P(t)){const n=new Error("useComputed$: Async functions in computed tasks are deprecated and will stop working in v2. Use useTask$ or useResource$ instead.").stack;return n&&n.replace(/^Error:\s*/,""),t.then(c,l)}c(t)}))}catch(t){l(t)}},Ve=t=>{const n=t.Qt;if(n){t.Qt=void 0;try{n()}catch(t){d(t)}}},Xe=t=>{32&t.R?(t.R&=-33,(0,t.Tt)()):Ve(t)},Ze=(t,n)=>{"visible"===n||"intersection-observer"===n?je("qvisible",tr(t)):"load"===n||"document-ready"===n?Ce("qinit",tr(t)):"idle"!==n&&"document-idle"!==n||Ce("qidle",tr(t))},tr=t=>{const n=t.Tt,e=tc(n.Bt,"_hW",ve,null,null,[t],n.Gt);return n.dev&&(e.dev=n.dev),e},nr=t=>k(t)&&t instanceof er;class er{R;Dt;Nt;Tt;Jt;constructor(t,n,e,r,o){this.R=t,this.Dt=n,this.Nt=e,this.Tt=r,this.Jt=o}}const rr=1,or=2,sr=4,ir=8,cr=t=>t[st],lr=(t,n)=>{const e=cr(t);if(e)return e;const r=fr(t),o=ct(t,"q:id");if(o){const e=n.Pt;if(r.rt=o,e){const{getObject:i,meta:c,refs:l}=e;if(function(t){return t&&"number"==typeof t.nodeType}(s=t)&&1===s.nodeType){const t=l[o];t&&(r.Yt=t.split(" ").map(i),r.li=((t,n)=>{const e=t.T.attributes,r=[];for(let o=0;o<e.length;o++){const{name:s,value:i}=e.item(o);if(s.startsWith("on:")||s.startsWith("on-window:")||s.startsWith("on-document:")){const e=i.split("\n");for(const o of e){const e=Us(o,n);e.Kt&&Hs(e,t),r.push([s,e])}}}return r})(r,n.D))}else{const e=t.getAttribute(J);r.nt=e?e.split("|"):null;const s=c[o];if(s){const t=s.s,e=s.h,o=s.c,c=s.w;if(t&&(r.C=t.split(" ").map(i)),c&&(r.Ht=c.split(" ").map(i)),o){r.P=new Map;for(const t of o.split(" ")){const[n,e]=t.split("=");r.P.set(n,i(e))}}if(e){const[t,o]=e.split(" ");if(r.R=sr,t&&(r.A=i(t)),o){const t=i(o);r.N=t,dt(t,2),t[et]=ur(t)}else r.N=at($t(),n)}}}}}var s;return r},ur=t=>{const n={},e=Ui(t);for(const t in e)t.startsWith(rt)&&(n[t.slice(2)]=e[t]);return n},fr=t=>{const n={R:0,rt:"",T:t,Yt:[],li:[],Ht:null,C:null,I:null,nt:null,ft:null,N:null,yt:null,A:null,P:null,vt:null,O:void 0,$t:void 0};return t[st]=n,n};let ar,$r;function dr(t){if(void 0===ar){const n=hr();if(n&&n.L)return n.L;if(void 0!==t)return t;throw new Error("Reading `locale` outside of context.")}return ar}function pr(t,n){const e=ar;try{return ar=t,n()}finally{ar=e}}const hr=()=>{if(!$r){const t="undefined"!=typeof document&&document&&document.__q_context__;if(!t)return;return j(t)?document.__q_context__=Sr(t):t}return $r},vr=()=>{const t=hr();if(!t)throw w(14);return t},mr=()=>{const t=hr();if(!t||t.Vt!==K)throw w(20);return t},wr=()=>mr().j.k.u;function br(t){if(null==t)return t;const n=vr();return function(...e){return gr.call(this,n,t,e)}}function yr(t,n,...e){return gr.call(this,t,n,e)}function gr(t,n,e){const r=$r;let o;try{$r=t,o=n.apply(this,e)}finally{$r=r}return o}const xr=(t,n)=>{const e=t.F;if(0===e.length){const t=n();P(t)&&e.push(t)}else e.push(Promise.all(e).then(n))},Sr=([t,n,e])=>{const r=t.closest(Y),o=r?.getAttribute("q:locale")||void 0;return o&&function(t){ar=t}(o),qr(o,void 0,t,n,e)},qr=(t,n,e,r,o)=>({Et:o,M:0,q:n,T:e,Vt:r,Tt:void 0,F:void 0,v:void 0,j:void 0,L:t||("object"==typeof r&&r&&"locale"in r?r.locale:void 0)}),kr=t=>t.closest(Y),jr=t=>yr(void 0,t),Cr=/*#__PURE__*/qr(void 0,void 0,void 0,K),Mr=(t,n)=>(Cr.v=n,yr(Cr,(()=>t.value))),Pr=()=>{const t=hr();if(t)return t.T??t.q??t.Tt?.S(void 0)},Or=()=>{const t=hr();if(t)return t.Vt},Tr=t=>{const n=hr();return n&&n.q&&n.j&&(lr(n.q,n.j.k.u).R|=ir),t},Er=t=>{const n=kr(t);return n?Qr(n)._t??Promise.resolve():Promise.resolve()},Rr=(t,n,e,r)=>{const o=n.l.o(r);return new Lr(t,o,e)},Ir=Symbol("proxy manager"),zr=1,Ar=2,_r=Symbol("unassigned signal");class Nr{}class Lr extends Nr{untrackedValue;[nt];[Ir]=0;constructor(t,n,e){super(),this.untrackedValue=t,this[nt]=n,this[Ir]=e}valueOf(){}toString(){return`[Signal ${String(this.value)}]`}toJSON(){return{value:this.value}}get value(){if(this[Ir]&Ar)throw _r;const t=hr()?.v;return t&&this[nt].m(t),this.untrackedValue}set value(t){const n=this[nt];n&&this.untrackedValue!==t&&(this.untrackedValue=t,n.p())}}class Fr extends Nr{Xt;Zt;tn;constructor(t,n,e){super(),this.Xt=t,this.Zt=n,this.tn=e}get value(){return this.Xt.apply(void 0,this.Zt)}}class Ur extends Nr{ref;prop;constructor(t,n){super(),this.ref=t,this.prop=n}get[nt](){return Wi(this.ref)}get value(){return this.ref[this.prop]}set value(t){this.ref[this.prop]=t}}const Wr=t=>t instanceof Nr,Dr=(t,n)=>{if(!k(t))return t[n];if(t instanceof Nr)return t;const e=Ui(t);if(e){const r=e[rt+n];if(r)return Wr(r),r;if(!0!==e[et]?.[n])return new Ur(t,n)}const r=t[et]?.[n];return Wr(r)?r:et},Hr=(t,n)=>{const e=Dr(t,n);return e===et?t[n]:e},Jr=Symbol("ContainerState"),Qr=t=>{let n=t[Jr];return n||(t[Jr]=n=Br(t,ct(t,"q:base")??"/")),n},Br=(t,n)=>{const e={};if(t){const n=t.attributes;if(n)for(let t=0;t<n.length;t++){const r=n[t];e[r.name]=r.value}}const r={D:t,et:0,Lt:!1,t:new WeakMap,It:new Set,At:new Set,zt:new Set,Rt:new Set,wt:new Set,Ft:new Set,dt:new Set,J:{containerAttributes:e},nn:n,_t:void 0,ut:void 0,Pt:void 0,l:null,en:new Map};return r.l=Bi(r),r},Gr=(t,n)=>{if(M(t))return t(n);if(Wr(t))return t.value=n;throw w(32,t)},Yr=128,Kr=t=>c(t)&&t.hasAttribute(G),Vr=t=>t.toString(36),Xr=t=>parseInt(t,36),Zr=t=>{const n=t.indexOf(":");return t?t.slice(n+1).replace(/-./g,(t=>t[1].toUpperCase())):t},to="http://www.w3.org/2000/svg",no=1,eo=2,ro=[],oo=(t,n,e,r)=>{const o=e.St;if(1===o.length&&o[0].gt===En)return void(e.St=n.St);const s=n.kt;let i=po;n.St===ro&&"HEAD"===s.nodeName&&(i=ao,r|=eo);const c=so(n,i);return c.length>0&&o.length>0?io(t,s,c,o,r):c.length>0&&0===o.length?bo(t.k,c,0,c.length-1):o.length>0?wo(t,s,null,o,0,o.length-1,r):void 0},so=(t,n)=>{const e=t.St;return e===ro?t.St=lo(t.kt,n):e},io=(t,n,e,r,o)=>{let s,i,c,l=0,u=0,f=e.length-1,a=e[0],$=e[f],d=r.length-1,p=r[0],h=r[d];const v=[],m=t.k;for(;l<=f&&u<=d;)if(null==a)a=e[++l];else if(null==$)$=e[--f];else if(null==p)p=r[++u];else if(null==h)h=r[--d];else if(a.rt===p.rt)v.push(vo(t,a,p,o)),a=e[++l],p=r[++u];else if($.rt===h.rt)v.push(vo(t,$,h,o)),$=e[--f],h=r[--d];else if(a.qt&&a.rt===h.rt)v.push(vo(t,a,h,o)),Go(m,n,a.kt,$.kt),a=e[++l],h=r[--d];else if($.qt&&$.rt===p.rt)v.push(vo(t,$,p,o)),Bo(m,n,$.kt,a.kt),$=e[--f],p=r[++u];else{if(void 0===s&&(s=No(e,l,f)),i=s[p.qt],void 0===i){const e=xo(t,p,o,v);Bo(m,n,e,a?.kt)}else if(c=e[i],c.gt!==p.gt){const e=xo(t,p,o,v);T(e,(t=>{Bo(m,n,t,a?.kt)}))}else v.push(vo(t,c,p,o)),e[i]=void 0,Bo(m,n,c.kt,a.kt);p=r[++u]}u<=d&&v.push(wo(t,n,null==r[d+1]?null:r[d+1].kt,r,u,d,o));let w=E(v);return l<=f&&(w=T(w,(()=>{bo(m,e,l,f)}))),w},co=(t,n)=>{const e=f(t)?t.close:null,r=[];let o=t.firstChild;for(;(o=$s(o))&&(n(o)&&r.push(o),o=o.nextSibling,o!==e););return r},lo=(t,n)=>co(t,n).map(uo),uo=t=>c(t)?cr(t)?.yt??fo(t):fo(t),fo=t=>{if(l(t)){const n=new Kn(t.localName,{},null,ro,0,os(t));return n.kt=t,n}if(a(t)){const n=new Kn(t.nodeName,_,null,ro,0,null);return n.jt=t.data,n.kt=t,n}},ao=t=>{const n=t.nodeType;return 1===n?t.hasAttribute("q:head"):111===n},$o=t=>"Q:TEMPLATE"===t.nodeName,po=t=>{const n=t.nodeType;if(3===n||111===n)return!0;if(1!==n)return!1;const e=t.nodeName;return"Q:TEMPLATE"!==e&&("HEAD"===e?t.hasAttribute("q:head"):"STYLE"!==e||!t.hasAttribute(H))},ho=t=>{const n={};for(const e of t){const t=go(e);(n[t]??(n[t]=new Kn(fs,{[D]:""},null,[],0,t))).St.push(e)}return n},vo=(t,n,e,r)=>{const o=n.kt,s=e.gt,i=t.k,c=i.u,l=t.U;if(e.kt=o,"#text"===s){i.tt.push(o);const t=e.Ct;return t&&(e.jt=Bt(Mr(t,[4,l.T,t,o]))),void Do(i,o,"data",e.jt)}if("#signal"===s)return;const u=e.N,f=e.R,a=lr(o,c);if(s!==fs){let $=!!(r&no);if($||"svg"!==s||(r|=no,$=!0),u!==_){1&f||(a.li.length=0);const t=n.N;e.N=t;for(const n in u){let e=u[n];if("ref"!==n)if(yt(n)){const t=xt(a.li,n,e,c.D);Lo(i,o,t)}else Wr(e)&&(e=Mr(e,[1,l.T,e,o,n])),"class"===n?e=Ut(e,l):"style"===n&&(e=Dt(e)),t[n]!==e&&(t[n]=e,Po(i,o,n,e,$));else void 0!==e&&Gr(e,o)}}if(2&f)return;if($&&"foreignObject"===s&&(r&=-2),void 0!==u[Kt])return;if("textarea"===s)return;return oo(t,n,e,r)}if(L in u){const n=u.props;To(c,a,n);let o=!!(a.R&rr);return o||a.A||a.T.hasAttribute(X)||(Qt(t,a),a.A=n[L],o=!0),o?T(Gn(t,a,r),(()=>mo(t,a,e,r))):mo(t,a,e,r)}if(D in u)l.I.push(e);else if(Kt in u)Do(i,o,"innerHTML",u[Kt]);else if(!(2&f))return oo(t,n,e,r)},mo=(t,n,e,r)=>{if(2&e.R)return;const o=t.k,s=ho(e.St),i=So(n);for(const t in i.slots)if(!s[t]){const n=i.slots[t],e=lo(n,po);if(e.length>0){const t=cr(n);t&&t.yt&&(t.yt.St=[]),bo(o,e,0,e.length-1)}}for(const t in i.templates){const n=i.templates[t];n&&!s[t]&&(i.templates[t]=void 0,ts(o,n))}return E(Object.keys(s).map((e=>{const c=s[e],l=yo(o,i,n,e,t.k.u),u=Yn(l),f=Ft(t),a=l.T;f.W=l,l.yt=c,c.kt=a;let $=-2&r;a.isSvg&&($|=no);const d=o.X.findIndex((t=>t[0]===a));return d>=0&&o.X.splice(d,1),oo(f,u,c,$)})))},wo=(t,n,e,r,o,s,i)=>{const c=[];for(;o<=s;++o){const s=xo(t,r[o],i,c);Bo(t.k,n,s,e)}return R(c)},bo=(t,n,e,r)=>{for(;e<=r;++e){const r=n[e];r&&ts(t,r.kt)}},yo=(t,n,e,r,o)=>{const s=n.slots[r];if(s)return lr(s,o);const i=n.templates[r];if(i)return lr(i,o);const c=es(t.H,r),l=fr(c);return l.O=e,Xo(t,e.T,c),n.templates[r]=c,l},go=t=>t.N[U]??"",xo=(t,n,e,r)=>{const o=n.gt,s=t.k.H,i=t.U;if("#text"===o)return n.kt=s.createTextNode(n.jt);if("#signal"===o){const o=n.Ct,c=o.value;if(_n(c)){const s=Zn(c);if(Wr(s))throw new Error("NOT IMPLEMENTED: Promise");if(Array.isArray(s))throw new Error("NOT IMPLEMENTED: Array");{const c=xo(t,s,e,r);return Mr(o,4&e?[3,c,o,c]:[4,i.T,o,c]),n.kt=c}}{const t=s.createTextNode(n.jt);return t.data=n.jt=Bt(c),Mr(o,4&e?[3,t,o,t]:[4,i.T,o,t]),n.kt=t}}let c,l=!!(e&no);l||"svg"!==o||(e|=no,l=!0);const u=o===fs,f=n.N,a=t.k,$=a.u;u?c=ls(s,l):"head"===o?(c=s.head,e|=eo):(c=Qo(s,o,l),e&=-3),2&n.R&&(e|=4),n.kt=c;const d=fr(c);if(t.W?(d.O=t.W,d.$t=t.U):d.O=t.U,u){if(L in f){const o=f[L],s=$t(),i=$.l.o(),l=new Proxy(s,new ht($,i)),u=f.props;if($.t.set(s,l),d.N=l,u!==_){const t=s[et]=u[et]??_;for(const n in u)if("children"!==n&&n!==U){const e=t[n];Wr(e)?s[rt+n]=e:s[n]=u[n]}}Qt(t,d),d.A=o;const p=T(Gn(t,d,e),(()=>{let r=n.St;if(0===r.length)return;1===r.length&&r[0].gt===En&&(r=r[0].St);const o=So(d),s=[],i=ho(r);for(const n in i){const r=i[n],c=yo(a,o,d,n,a.u),l=Ft(t),u=c.T;l.W=c,c.yt=r,r.kt=u;let f=-2&e;u.isSvg&&(f|=no);for(const t of r.St){const n=xo(l,t,f,s);Yo(a,u,n)}}return R(s)}));return P(p)&&r.push(p),c}if(D in f)ss(c,n.qt),it(c,W,i.rt),it(c,D,""),i.I.push(n),a.X.push([c,i.T]);else if(Kt in f)return Do(a,c,"innerHTML",f[Kt]),c}else{if(n.xt){const t=f!==_?Object.fromEntries(Object.entries(n.xt).map((([t,n])=>[t,n===et?f[t]:n]))):n.xt;Oo(a,d,i,t,l,!0)}if(f!==_){d.yt=n;const t=n.xt?Object.fromEntries(Object.entries(f).filter((([t])=>!(t in n.xt)))):f;n.N=Oo(a,d,i,t,l,!1)}if(l&&"foreignObject"===o&&(l=!1,e&=-2),i){const t=i.nt;t&&t.forEach((t=>{c.classList.add(t)})),i.R&or&&(d.li.push(...i.li),i.R&=-3)}for(const t of d.li)Lo(a,c,t[0]);if(void 0!==f[Kt])return c;l&&"foreignObject"===o&&(l=!1,e&=-2)}let p=n.St;if(0===p.length)return c;1===p.length&&p[0].gt===En&&(p=p[0].St);const h=p.map((n=>xo(t,n,e,r)));for(const t of h)zo(c,t);return c},So=t=>{const n=(t=>t.I||(t.I=qo(t)))(t),e={},r={},o=Array.from(t.T.childNodes).filter($o);for(const t of n)e[t.qt??""]=t.kt;for(const t of o)r[ct(t,U)??""]=t;return{slots:e,templates:r}},qo=t=>us(t.T.parentElement,W,t.rt).map(fo),ko=(t,n,e)=>(n.namespaceURI===to?Uo(t,n,"class",e):Do(t,n,"className",e),!0),jo=(t,n,e,r)=>r in n&&((n[r]!==e||"value"===r&&!n.hasAttribute(r))&&("value"===r&&"OPTION"!==n.tagName?Ho(t,n,r,e):Do(t,n,r,e)),!0),Co=(t,n,e,r)=>(Uo(t,n,r.toLowerCase(),e),!0),Mo={style:(t,n,e)=>(Do(t,n.style,"cssText",e),!0),class:ko,className:ko,value:jo,checked:jo,href:Co,list:Co,form:Co,tabIndex:Co,download:Co,innerHTML:()=>!0,[Kt]:(t,n,e)=>(Do(t,n,"innerHTML",e),!0)},Po=(t,n,e,r,o)=>{if(Gt(e))return void Uo(t,n,e,null!=r?String(r):r);const s=Mo[e];s&&s(t,n,r,e)||(o||!(e in n)?(e.startsWith(bt)&&Fo(e.slice(15)),Uo(t,n,e,r)):Do(t,n,e,r))},Oo=(t,n,e,r,o,s)=>{const i={},c=n.T;for(const l in r){let u=r[l];if("ref"!==l)if(yt(l))xt(n.li,l,u,t.u.D);else{if(Wr(u)&&(u=Mr(u,s?[1,c,u,e.T,l]:[2,e.T,u,c,l])),"class"===l){if(u=Ut(u,e),!u)continue}else"style"===l&&(u=Dt(u));i[l]=u,Po(t,c,l,u,o)}else void 0!==u&&Gr(u,c)}return i},To=(t,n,e)=>{let r=n.N;if(r||(n.N=r=at($t(),t)),e===_)return;const o=Wi(r),s=Ui(r),i=s[et]=e[et]??_;for(const t in e)if("children"!==t&&t!==U&&!i[t]){const n=e[t];s[t]!==n&&(s[t]=n,o.p(t))}},Eo=(t,n,e,r)=>{if(e.bt(t),l(t)){if(r&&t.hasAttribute(D))return void n.Z.push(t);const o=cr(t);o&&((t,n)=>{t.Ht?.forEach((t=>{n.bt(t),Xe(t)})),t.A=null,t.C=null,t.Ht=null})(o,e);const s=f(t)?t.close:null;let i=t.firstChild;for(;(i=$s(i))&&(Eo(i,n,e,!0),i=i.nextSibling,i!==s););}},Ro=()=>{document.__q_scroll_restore__&&(document.__q_scroll_restore__(),document.__q_scroll_restore__=void 0)},Io=async t=>{if(document.__q_view_transition__&&(document.__q_view_transition__=void 0,document.startViewTransition)){const n=document.startViewTransition((()=>{rs(t),Ro()})),e=new CustomEvent("qviewTransition",{detail:n});return document.dispatchEvent(e),void await n.finished}rs(t),Ro()},zo=(t,n)=>{f(n)?n.appendTo(t):t.appendChild(n)},Ao=(t,n,e)=>{f(n)?n.insertBeforeTo(t,e?.nextSibling??null):t.insertBefore(n,e?.nextSibling??null)},_o=(t,n,e)=>{f(n)?n.insertBeforeTo(t,ps(e)):t.insertBefore(n,ps(e))},No=(t,n,e)=>{const r={};for(let o=n;o<=e;++o){const n=t[o].qt;null!=n&&(r[n]=o)}return r},Lo=(t,n,e)=>{e.startsWith("on:")||Uo(t,n,e,""),Fo(e)},Fo=t=>{{const n=Zr(t);try{(globalThis.qwikevents||=[]).push(n)}catch(t){}}},Uo=(t,n,e,r)=>{t.G.push({rn:Wo,Zt:[n,e,r]})},Wo=(t,n,e)=>{if(null==e||!1===e)t.removeAttribute(n);else{const r=!0===e?"":String(e);it(t,n,r)}},Do=(t,n,e,r)=>{t.G.push({rn:Jo,Zt:[n,e,r]})},Ho=(t,n,e,r)=>{t.Y.push({rn:Jo,Zt:[n,e,r]})},Jo=(t,n,e)=>{try{t[n]=e??"",null==e&&s(t)&&c(t)&&t.removeAttribute(n)}catch(r){d(m(6),n,{node:t,value:e},r)}},Qo=(t,n,e)=>e?t.createElementNS(to,n):t.createElement(n),Bo=(t,n,e,r)=>(t.G.push({rn:_o,Zt:[n,e,r||null]}),e),Go=(t,n,e,r)=>(t.G.push({rn:Ao,Zt:[n,e,r||null]}),e),Yo=(t,n,e)=>(t.G.push({rn:zo,Zt:[n,e]}),e),Ko=(t,n)=>{t.u.Ft.add(n.styleId),t.Y.push({rn:Vo,Zt:[t.u,n]})},Vo=(t,n)=>{const e=t.D,r=N(),o=r.documentElement===e,s=r.head,i=r.createElement("style");it(i,H,n.styleId),it(i,"hidden",""),i.textContent=n.content,o&&s?zo(s,i):_o(e,i,e.firstChild)},Xo=(t,n,e)=>{t.G.push({rn:Zo,Zt:[n,e]})},Zo=(t,n)=>{_o(t,n,t.firstChild)},ts=(t,n)=>{l(n)&&Eo(n,t,t.u.l,!0),t.G.push({rn:ns,Zt:[n,t]})},ns=t=>{const n=t.parentElement;n&&((t,n)=>{f(n)?n.remove():t.removeChild(n)})(n,t)},es=(t,n)=>{const e=Qo(t,"q:template",!1);return it(e,U,n),it(e,"hidden",""),it(e,"aria-hidden","true"),e},rs=t=>{for(const n of t.G)n.rn.apply(void 0,n.Zt);is(t)},os=t=>ct(t,"q:key"),ss=(t,n)=>{null!==n&&it(t,"q:key",n)},is=t=>{const n=t.u.l;for(const e of t.Z){const r=os(e),o=co(e,po);if(o.length>0){const s=e.getAttribute(W),i=t.K.find((t=>t.rt===s));if(i){const s=i.T;if(s.isConnected)if(co(s,$o).some((t=>ct(t,U)===r)))Eo(e,t,n,!1);else{const n=es(t.H,r);for(const t of o)zo(n,t);_o(s,n,s.firstChild)}else Eo(e,t,n,!1)}else Eo(e,t,n,!1)}}for(const[n,e]of t.X){const t=os(n),r=co(e,$o).find((n=>n.getAttribute(U)===t));r&&(co(r,po).forEach((t=>{zo(n,t)})),r.remove())}},cs=()=>{},ls=(t,n)=>{const e=t.createComment("qv "),r=t.createComment("/qv");return new as(e,r,n)},us=(t,n,e)=>{const r=((t,n,e)=>t.ownerDocument.createTreeWalker(t,128,{acceptNode(t){const r=ds(t);return r&&ct(r,n)===e?1:2}}))(t,n,e),o=[];let s=null;for(;s=r.nextNode();)o.push(ds(s));return o},fs=":virtual";class as{open;close;isSvg;ownerDocument;_qc_=null;nodeType=111;localName=fs;nodeName=fs;sn;cn;constructor(t,n,e){this.open=t,this.close=n,this.isSvg=e;const r=this.ownerDocument=t.ownerDocument;this.cn=Qo(r,"template",!1),this.sn=(t=>{if(!t)return{};const n=t.split(" ");return Object.fromEntries(n.map((t=>{const n=t.indexOf("=");return n>=0?[t.slice(0,n),(e=t.slice(n+1),e.replace(/\+/g," "))]:[t,""];var e})))})(t.data.slice(3)),t.data.startsWith("qv "),t[ot]=this,n[ot]=this}insertBefore(t,n){const e=this.parentElement;return e?e.insertBefore(t,n||this.close):this.cn.insertBefore(t,n),t}remove(){const t=this.parentElement;if(t){const n=this.childNodes;t.removeChild(this.open);for(let t=0;t<n.length;t++)this.cn.appendChild(n[t]);t.removeChild(this.close)}}appendChild(t){return this.insertBefore(t,null)}insertBeforeTo(t,n){const e=this.childNodes;t.insertBefore(this.open,n);for(const r of e)t.insertBefore(r,n);t.insertBefore(this.close,n)}appendTo(t){this.insertBeforeTo(t,null)}get namespaceURI(){return this.parentElement?.namespaceURI??""}removeChild(t){this.parentElement?this.parentElement.removeChild(t):this.cn.removeChild(t)}getAttribute(t){return this.sn[t]??null}hasAttribute(t){return t in this.sn}setAttribute(t,n){this.sn[t]=n}removeAttribute(t){delete this.sn[t]}matches(t){return!1}compareDocumentPosition(t){return this.open.compareDocumentPosition(t)}closest(t){const n=this.parentElement;return n?n.closest(t):null}querySelectorAll(t){const n=[];return co(this,u).forEach((e=>{l(e)&&(e.matches(t)&&n.push(e),n.concat(Array.from(e.querySelectorAll(t))))})),n}querySelector(t){for(const n of this.childNodes)if(c(n)){if(n.matches(t))return n;const e=n.querySelector(t);if(null!==e)return e}return null}get innerHTML(){return""}set innerHTML(t){const n=this.parentElement;n?(this.childNodes.forEach((t=>this.removeChild(t))),this.cn.innerHTML=t,n.insertBefore(this.cn.content,this.close)):this.cn.innerHTML=t}get firstChild(){if(this.parentElement){const t=this.open.nextSibling;return t===this.close?null:t}return this.cn.firstChild}get nextSibling(){return this.close.nextSibling}get previousSibling(){return this.open.previousSibling}get childNodes(){if(!this.parentElement)return Array.from(this.cn.childNodes);const t=[];let n=this.open;for(;(n=n.nextSibling)&&n!==this.close;)t.push(n);return t}get isConnected(){return this.open.isConnected}get parentElement(){return this.open.parentElement}}const $s=t=>{if(null==t)return null;if($(t)){const n=ds(t);if(n)return n}return t},ds=t=>{const n=t[ot];if(n)return n;if(t.data.startsWith("qv ")){const n=(t=>{let n=t,e=1;for(;n=n.nextSibling;)if($(n)){const t=n[ot];if(t)n=t;else if(n.data.startsWith("qv "))e++;else if("/qv"===n.data&&(e--,0===e))return n}})(t);return new as(t,n,t.parentElement?.namespaceURI===to)}return null},ps=t=>null==t?null:f(t)?t.open:t,hs=async t=>{const n=Br(null,null),e=bs(n);let r;for(Cs(t,e,!1);(r=e.ln).length>0;){e.ln=[];const t=await Promise.allSettled(r);for(const n of t)"rejected"===n.status&&console.error(n.reason)}const o=Array.from(e.un.keys());let s=0;const i=new Map;for(const t of o)i.set(t,Vr(s)),s++;if(e.fn.length>0){const t=i.get(void 0);for(const n of e.fn)i.set(n,t)}const c=t=>{let n="";if(P(t)){const e=js(t);if(!e)throw w(27,t);t=e.value,n+=e.resolved?"~":"_"}if(k(t)){const e=Ui(t);e&&(n+="!",t=e)}const e=i.get(t);if(void 0===e)throw w(27,t);return e+n},l=Ts(o,c,null,e,n);return JSON.stringify({_entry:c(t),_objs:l})},vs=async(t,n,e,r)=>{const o=bs(n);r?.forEach(((t,n)=>{o.an.add(n)}));let i,u=!1;for(const n of t)if(n.Ht)for(const t of n.Ht)Qe(t)&&o.$n.push(t.Jt),Xe(t);for(const n of t){const t=n.T,e=n.li;for(const n of e)if(c(t)){const t=n[1],e=t.ht;if(e)for(const t of e)Cs(t,o,!0);o.dn.push(t),u=!0}}if(!u)return{state:{refs:{},ctx:{},objs:[],subs:[]},objs:[],funcs:[],qrls:[],resources:o.$n,mode:"static"};for(;(i=o.ln).length>0;)o.ln=[],await Promise.all(i);const a=o.pn.length>0;if(a){for(const t of o.hn)xs(t,o,t.T);for(const n of t)ws(n,o)}for(;(i=o.ln).length>0;)o.ln=[],await Promise.all(i);const $=new Map,d=Array.from(o.un.keys()),p=new Map,h=t=>{let n="";if(P(t)){const e=js(t);if(!e)return null;t=e.value,n+=e.resolved?"~":"_"}if(k(t)){const e=Ui(t);if(e)n+="!",t=e;else if(l(t)){const e=(t=>{let n=$.get(t);return void 0===n&&(n=Ps(t),n||console.warn("Missing ID",t),$.set(t,n)),n})(t);return e?"#"+e+n:null}}const o=p.get(t);if(o)return o+n;const s=r?.get(t);return s?"*"+s:e?e(t):null},v=t=>{const n=h(t);if(null===n){if(Vi(t)){const n=Vr(p.size);return p.set(t,n),n}throw w(27,t)}return n},m=new Map;for(const t of d){const e=Ms(t,n)?.vn;if(!e)continue;const r=Di(t)??0,i=[];1&r&&i.push(r);for(const t of e){const n=t[1];0===t[0]&&s(n)&&f(n)&&!o.pn.includes(cr(n))||i.push(t)}i.length>0&&m.set(t,i)}d.sort(((t,n)=>(m.has(t)?0:1)-(m.has(n)?0:1)));let b=0;for(const t of d)p.set(t,Vr(b)),b++;if(o.fn.length>0){const t=p.get(void 0);for(const n of o.fn)p.set(n,t)}const y=[];for(const t of d){const n=m.get(t);if(null==n)break;y.push(n.map((t=>"number"==typeof t?`_${t}`:Hi(t,h))).filter(I))}const g=Ts(d,v,h,o,n),x={},S={};for(const n of t){const t=n.rt,e=n.Yt,r=n.N,s=n.P,i=n.Ht,c=n.A,l=n.C,u={},$=f(n.T)&&o.pn.includes(n);if(e.length>0){const n=ms(e,v," ");n&&(S[t]=n)}else if(a){let n=!1;if($){const t=h(r);u.h=v(c)+(t?" "+t:""),n=!0}else{const t=h(r);t&&(u.h=" "+t,n=!0)}if(i&&i.length>0){const t=ms(i,h," ");t&&(u.w=t,n=!0)}if($&&l&&l.length>0){const t=ms(l,v," ");u.s=t,n=!0}if(s){const t=[];s.forEach(((n,e)=>{const r=h(n);r&&t.push(`${e}=${r}`)}));const e=t.join(" ");e&&(u.c=e,n=!0)}n&&(x[t]=u)}}return{state:{refs:S,ctx:x,objs:g,subs:y},objs:d,funcs:o.mn,resources:o.$n,qrls:o.dn,mode:a?"render":"listeners"}},ms=(t,n,e)=>{let r="";for(const o of t){const t=n(o);null!==t&&(""!==r&&(r+=e),r+=t)}return r},ws=(t,n)=>{const e=t.$t||t.O,r=t.N;if(e&&r&&!Os(r)&&n.pn.includes(e)){const e=Wi(r)?.vn,o=t.T;if(e)for(const[t,i]of e)0===t?(i!==o&&qs(Wi(r),n,!1),s(i)?gs(i,n):Cs(i,n,!0)):(Cs(r,n,!1),qs(Wi(r),n,!1))}},bs=t=>{const n=[];return t.en.forEach(((t,e)=>{for(;n.length<=t;)n.push("");n[t]=e})),{u:t,an:new Set,un:new Set,wn:0,fn:[],mn:n,$n:[],pn:[],dn:[],hn:[],ln:[]}},ys=(t,n)=>{const e=cr(t);n.pn.includes(e)||(n.pn.push(e),e.R&ir?(n.wn++,xs(e,n,!0),n.wn--):n.hn.push(e))},gs=(t,n)=>{const e=cr(t);if(e){if(n.pn.includes(e))return;n.pn.push(e),xs(e,n,t)}},xs=(t,n,e)=>{if(t.N&&!Os(t.N)&&(Cs(t.N,n,e),qs(Wi(t.N),n,e)),t.A&&Cs(t.A,n,e),t.C)for(const r of t.C)Cs(r,n,e);if(t.Ht){const r=n.u.l.bn;for(const o of t.Ht)r.has(o)&&Cs(o,n,e)}if(!0===e&&(Ss(t,n),t.vt))for(const e of t.vt)Ss(e,n)},Ss=(t,n)=>{for(;t;){if(t.P)for(const e of t.P.values())Cs(e,n,!0);t=t.O}},qs=(t,n,e)=>{if(n.an.has(t))return;n.an.add(t);const r=t.vn;for(const t of r)if(t[0]>0&&Cs(t[2],n,e),!0===e){const e=t[1];s(e)&&f(e)?0===t[0]&&ys(e,n):Cs(e,n,!0)}},ks=Symbol(),js=t=>t[ks],Cs=(t,n,e)=>{if(null!=t){const o=typeof t;switch(o){case"function":case"object":{if(n.an.has(t))return;if(n.an.add(t),Ai(t))return n.un.add(void 0),void n.fn.push(t);const i=t,c=Ui(t);if(c){const r=!(2&Di(t=c));if(e&&r&&qs(Wi(i),n,e),_i(i))return void n.un.add(t)}if(ki(t,n,e))return void n.un.add(t);if(P(t))return void n.ln.push((r=t,r.then((t=>(r[ks]={resolved:!0,value:t},t)),(t=>(r[ks]={resolved:!1,value:t},t)))).then((t=>{Cs(t,n,e)})));if("object"===o){if(s(t))return;if(j(t))for(let r=0;r<t.length;r++)Cs(i[r],n,e);else if(q(t))for(const r in t)Cs(i[r],n,e)}break}}}var r;n.un.add(t)},Ms=(t,n)=>{if(!k(t))return;if(t instanceof Lr)return Wi(t);const e=n.t.get(t);return e?Wi(e):void 0},Ps=t=>{const n=cr(t);return n?n.rt:null},Os=t=>0===Objec