manifest
Version:
Self-hosted Manifest LLM router with embedded server, SQLite database, and dashboard
2 lines (1 loc) • 44 kB
JavaScript
const y={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return st(this.context.count)},getNextContextId(){return st(this.context.count++)}};function st(e){const t=String(e),n=t.length-1;return y.context.id+(n?String.fromCharCode(96+n):"")+t}function ae(e){y.context=e}const gt=!1,Bt=(e,t)=>e===t,_=Symbol("solid-proxy"),mt=typeof Proxy=="function",Se=Symbol("solid-track"),Ee={equals:Bt};let fe=null,yt=St;const F=1,Oe=2,wt={owned:null,cleanups:null,context:null,owner:null},ke={};var p=null;let Me=null,Vt=null,S=null,I=null,D=null,Ne=0;function H(e,t){const n=S,r=p,s=e.length===0,o=t===void 0?r:t,i=s?wt:{owned:null,cleanups:null,context:o?o.context:null,owner:o},l=s?e:()=>e(()=>N(()=>de(i)));p=i,S=null;try{return U(l,!0)}finally{S=n,p=r}}function T(e,t){t=t?Object.assign({},Ee,t):Ee;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),Pt(n,s));return[At.bind(n),r]}function Kt(e,t,n){const r=me(e,t,!0,F);se(r)}function K(e,t,n){const r=me(e,t,!1,F);se(r)}function bt(e,t,n){yt=Yt;const r=me(e,t,!1,F);(!n||!n.render)&&(r.user=!0),D?D.push(r):se(r)}function E(e,t,n){n=n?Object.assign({},Ee,n):Ee;const r=me(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,se(r),At.bind(r)}function qt(e){return e&&typeof e=="object"&&"then"in e}function Ht(e,t,n){let r,s,o;typeof t=="function"?(r=e,s=t,o={}):(r=!0,s=e,o=t||{});let i=null,l=ke,c=null,u=!1,a="initialValue"in o,f=typeof r=="function"&&E(r);const d=new Set,[h,w]=(o.storage||T)(o.initialValue),[g,m]=T(void 0),[A,b]=T(void 0,{equals:!1}),[R,x]=T(a?"ready":"unresolved");y.context&&(c=y.getNextContextId(),o.ssrLoadFrom==="initial"?l=o.initialValue:y.load&&y.has(c)&&(l=y.load(c)));function C(L,v,k,$){return i===L&&(i=null,$!==void 0&&(a=!0),(L===l||v===l)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated($,{value:v})),l=ke,B(v,k)),v}function B(L,v){U(()=>{v===void 0&&w(()=>L),x(v!==void 0?"errored":a?"ready":"unresolved"),m(v);for(const k of d.keys())k.decrement();d.clear()},!1)}function J(){const L=zt,v=h(),k=g();if(k!==void 0&&!i)throw k;return S&&S.user,v}function ie(L=!0){if(L!==!1&&u)return;u=!1;const v=f?f():r;if(v==null||v===!1){C(i,N(h));return}let k;const $=l!==ke?l:N(()=>{try{return s(v,{value:h(),refetching:L})}catch(P){k=P}});if(k!==void 0){C(i,void 0,Ae(k),v);return}else if(!qt($))return C(i,$,void 0,v),$;return i=$,"v"in $?($.s===1?C(i,$.v,void 0,v):C(i,void 0,Ae($.v),v),$):(u=!0,queueMicrotask(()=>u=!1),U(()=>{x(a?"refreshing":"pending"),b()},!1),$.then(P=>C($,P,void 0,v),P=>C($,void 0,Ae(P),v)))}Object.defineProperties(J,{state:{get:()=>R()},error:{get:()=>g()},loading:{get(){const L=R();return L==="pending"||L==="refreshing"}},latest:{get(){if(!a)return J();const L=g();if(L&&!i)throw L;return h()}}});let le=p;return f?Kt(()=>(le=p,ie(!1))):ie(!1),[J,{refetch:L=>$e(le,()=>ie(L)),mutate:w}]}function pt(e){return U(e,!1)}function N(e){if(S===null)return e();const t=S;S=null;try{return e()}finally{S=t}}function Qe(e,t,n){const r=Array.isArray(e);let s,o=n&&n.defer;return i=>{let l;if(r){l=Array(e.length);for(let u=0;u<e.length;u++)l[u]=e[u]()}else l=e();if(o)return o=!1,i;const c=N(()=>t(l,s,i));return s=l,c}}function mr(e){bt(()=>N(e))}function W(e){return p===null||(p.cleanups===null?p.cleanups=[e]:p.cleanups.push(e)),e}function Wt(e,t){fe||(fe=Symbol("error")),p=me(void 0,void 0,!0),p.context={...p.context,[fe]:[t]};try{return e()}catch(n){ye(n)}finally{p=p.owner}}function Fe(){return S}function xe(){return p}function $e(e,t){const n=p,r=S;p=e,S=null;try{return U(t,!0)}catch(s){ye(s)}finally{p=n,S=r}}function Gt(e){const t=S,n=p;return Promise.resolve().then(()=>{S=t,p=n;let r;return U(e,!1),S=p=null,r?r.done:void 0})}const[yr,wr]=T(!1);function Ze(e,t){const n=Symbol("context");return{id:n,Provider:Qt(n),defaultValue:e}}function Te(e){let t;return p&&p.context&&(t=p.context[e.id])!==void 0?t:e.defaultValue}function et(e){const t=E(e),n=E(()=>Be(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let zt;function At(){if(this.sources&&this.state)if(this.state===F)se(this);else{const e=I;I=null,U(()=>ve(this),!1),I=e}if(S){const e=this.observers?this.observers.length:0;S.sources?(S.sources.push(this),S.sourceSlots.push(e)):(S.sources=[this],S.sourceSlots=[e]),this.observers?(this.observers.push(S),this.observerSlots.push(S.sources.length-1)):(this.observers=[S],this.observerSlots=[S.sources.length-1])}return this.value}function Pt(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&U(()=>{for(let s=0;s<e.observers.length;s+=1){const o=e.observers[s],i=Me&&Me.running;i&&Me.disposed.has(o),(i?!o.tState:!o.state)&&(o.pure?I.push(o):D.push(o),o.observers&&Et(o)),i||(o.state=F)}if(I.length>1e6)throw I=[],new Error},!1)),t}function se(e){if(!e.fn)return;de(e);const t=Ne;Xt(e,e.value,t)}function Xt(e,t,n){let r;const s=p,o=S;S=p=e;try{r=e.fn(t)}catch(i){return e.pure&&(e.state=F,e.owned&&e.owned.forEach(de),e.owned=null),e.updatedAt=n+1,ye(i)}finally{S=o,p=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Pt(e,r):e.value=r,e.updatedAt=n)}function me(e,t,n,r=F,s){const o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:p,context:p?p.context:null,pure:n};return p===null||p!==wt&&(p.owned?p.owned.push(o):p.owned=[o]),o}function Ce(e){if(e.state===0)return;if(e.state===Oe)return ve(e);if(e.suspense&&N(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Ne);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===F)se(e);else if(e.state===Oe){const r=I;I=null,U(()=>ve(e,t[0]),!1),I=r}}function U(e,t){if(I)return e();let n=!1;t||(I=[]),D?n=!0:D=[],Ne++;try{const r=e();return Jt(n),r}catch(r){n||(D=null),I=null,ye(r)}}function Jt(e){if(I&&(St(I),I=null),e)return;const t=D;D=null,t.length&&U(()=>yt(t),!1)}function St(e){for(let t=0;t<e.length;t++)Ce(e[t])}function Yt(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Ce(r)}if(y.context){if(y.count){y.effects||(y.effects=[]),y.effects.push(...e.slice(0,n));return}ae()}for(y.effects&&(y.done||!y.count)&&(e=[...y.effects,...e],n+=y.effects.length,delete y.effects),t=0;t<n;t++)Ce(e[t])}function ve(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const s=r.state;s===F?r!==t&&(!r.updatedAt||r.updatedAt<Ne)&&Ce(r):s===Oe&&ve(r,t)}}}function Et(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Oe,n.pure?I.push(n):D.push(n),n.observers&&Et(n))}}function de(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),s=n.observers;if(s&&s.length){const o=s.pop(),i=n.observerSlots.pop();r<s.length&&(o.sourceSlots[i]=r,s[r]=o,n.observerSlots[r]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)de(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)de(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Ae(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function ot(e,t,n){try{for(const r of t)r(e)}catch(r){ye(r,n&&n.owner||null)}}function ye(e,t=p){const n=fe&&t&&t.context&&t.context[fe],r=Ae(e);if(!n)throw r;D?D.push({fn(){ot(r,n,t)},state:F}):ot(r,n,t)}function Be(e){if(typeof e=="function"&&!e.length)return Be(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=Be(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function Qt(e,t){return function(r){let s;return K(()=>s=N(()=>(p.context={...p.context,[e]:r.value},et(()=>r.children))),void 0),s}}const Ve=Symbol("fallback");function Re(e){for(let t=0;t<e.length;t++)e[t]()}function Zt(e,t,n={}){let r=[],s=[],o=[],i=0,l=t.length>1?[]:null;return W(()=>Re(o)),()=>{let c=e()||[],u=c.length,a,f;return c[Se],N(()=>{let h,w,g,m,A,b,R,x,C;if(u===0)i!==0&&(Re(o),o=[],r=[],s=[],i=0,l&&(l=[])),n.fallback&&(r=[Ve],s[0]=H(B=>(o[0]=B,n.fallback())),i=1);else if(i===0){for(s=new Array(u),f=0;f<u;f++)r[f]=c[f],s[f]=H(d);i=u}else{for(g=new Array(u),m=new Array(u),l&&(A=new Array(u)),b=0,R=Math.min(i,u);b<R&&r[b]===c[b];b++);for(R=i-1,x=u-1;R>=b&&x>=b&&r[R]===c[x];R--,x--)g[x]=s[R],m[x]=o[R],l&&(A[x]=l[R]);for(h=new Map,w=new Array(x+1),f=x;f>=b;f--)C=c[f],a=h.get(C),w[f]=a===void 0?-1:a,h.set(C,f);for(a=b;a<=R;a++)C=r[a],f=h.get(C),f!==void 0&&f!==-1?(g[f]=s[a],m[f]=o[a],l&&(A[f]=l[a]),f=w[f],h.set(C,f)):o[a]();for(f=b;f<u;f++)f in g?(s[f]=g[f],o[f]=m[f],l&&(l[f]=A[f],l[f](f))):s[f]=H(d);s=s.slice(0,i=u),r=c.slice(0)}return s});function d(h){if(o[f]=h,l){const[w,g]=T(f);return l[f]=g,t(c[f],w)}return t(c[f])}}}function en(e,t,n={}){let r=[],s=[],o=[],i=[],l=0,c;return W(()=>Re(o)),()=>{const u=e()||[],a=u.length;return u[Se],N(()=>{if(a===0)return l!==0&&(Re(o),o=[],r=[],s=[],l=0,i=[]),n.fallback&&(r=[Ve],s[0]=H(d=>(o[0]=d,n.fallback())),l=1),s;for(r[0]===Ve&&(o[0](),o=[],r=[],s=[],l=0),c=0;c<a;c++)c<r.length&&r[c]!==u[c]?i[c](()=>u[c]):c>=r.length&&(s[c]=H(f));for(;c<r.length;c++)o[c]();return l=i.length=o.length=a,r=u.slice(0),s=s.slice(0,l)});function f(d){o[c]=d;const[h,w]=T(u[c]);return i[c]=w,t(h,c)}}}function q(e,t){return N(()=>e(t||{}))}function pe(){return!0}const Ke={get(e,t,n){return t===_?n:e.get(t)},has(e,t){return t===_?!0:e.has(t)},set:pe,deleteProperty:pe,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:pe,deleteProperty:pe}},ownKeys(e){return e.keys()}};function De(e){return(e=typeof e=="function"?e():e)?e:{}}function tn(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function qe(...e){let t=!1;for(let i=0;i<e.length;i++){const l=e[i];t=t||!!l&&_ in l,e[i]=typeof l=="function"?(t=!0,E(l)):l}if(mt&&t)return new Proxy({get(i){for(let l=e.length-1;l>=0;l--){const c=De(e[l])[i];if(c!==void 0)return c}},has(i){for(let l=e.length-1;l>=0;l--)if(i in De(e[l]))return!0;return!1},keys(){const i=[];for(let l=0;l<e.length;l++)i.push(...Object.keys(De(e[l])));return[...new Set(i)]}},Ke);const n={},r=Object.create(null);for(let i=e.length-1;i>=0;i--){const l=e[i];if(!l)continue;const c=Object.getOwnPropertyNames(l);for(let u=c.length-1;u>=0;u--){const a=c[u];if(a==="__proto__"||a==="constructor")continue;const f=Object.getOwnPropertyDescriptor(l,a);if(!r[a])r[a]=f.get?{enumerable:!0,configurable:!0,get:tn.bind(n[a]=[f.get.bind(l)])}:f.value!==void 0?f:void 0;else{const d=n[a];d&&(f.get?d.push(f.get.bind(l)):f.value!==void 0&&d.push(()=>f.value))}}}const s={},o=Object.keys(r);for(let i=o.length-1;i>=0;i--){const l=o[i],c=r[l];c&&c.get?Object.defineProperty(s,l,c):s[l]=c?c.value:void 0}return s}function nn(e,...t){const n=t.length;if(mt&&_ in e){const s=n>1?t.flat():t[0],o=t.map(i=>new Proxy({get(l){return i.includes(l)?e[l]:void 0},has(l){return i.includes(l)&&l in e},keys(){return i.filter(l=>l in e)}},Ke));return o.push(new Proxy({get(i){return s.includes(i)?void 0:e[i]},has(i){return s.includes(i)?!1:i in e},keys(){return Object.keys(e).filter(i=>!s.includes(i))}},Ke)),o}const r=[];for(let s=0;s<=n;s++)r[s]={};for(const s of Object.getOwnPropertyNames(e)){let o=n;for(let c=0;c<t.length;c++)if(t[c].includes(s)){o=c;break}const i=Object.getOwnPropertyDescriptor(e,s);!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable?r[o][s]=i.value:Object.defineProperty(r[o],s,i)}return r}function br(e){let t,n;const r=s=>{const o=y.context;if(o){const[l,c]=T();y.count||(y.count=0),y.count++,(n||(n=e())).then(u=>{!y.done&&ae(o),y.count--,c(()=>u.default),ae()}),t=l}else if(!t){const[l]=Ht(()=>(n||(n=e())).then(c=>c.default));t=l}let i;return E(()=>(i=t())?N(()=>{if(!o||y.done)return i(s);const l=y.context;ae(o);const c=i(s);return ae(l),c}):"")};return r.preload=()=>n||((n=e()).then(s=>t=()=>s.default),n),r}let rn=0;function sn(){return y.context?y.getNextContextId():`cl-${rn++}`}const on=e=>`Stale read from <${e}>.`;function pr(e){const t="fallback"in e&&{fallback:()=>e.fallback};return E(Zt(()=>e.each,e.children,t||void 0))}function Ar(e){const t="fallback"in e&&{fallback:()=>e.fallback};return E(en(()=>e.each,e.children,t||void 0))}function Ot(e){const t=e.keyed,n=E(()=>e.when,void 0,void 0),r=t?n:E(n,void 0,{equals:(s,o)=>!s==!o});return E(()=>{const s=r();if(s){const o=e.children;return typeof o=="function"&&o.length>0?N(()=>o(t?s:()=>{if(!N(r))throw on("Show");return n()})):o}return e.fallback},void 0,void 0)}let te;function ln(){te&&[...te].forEach(e=>e())}function Pr(e){let t;y.context&&y.load&&(t=y.load(y.getContextId()));const[n,r]=T(t,void 0);return te||(te=new Set),te.add(r),W(()=>te.delete(r)),E(()=>{let s;if(s=n()){const o=e.fallback;return typeof o=="function"&&o.length?N(()=>o(s,()=>r())):o}return Wt(()=>e.children,r)},void 0,void 0)}const cn=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],an=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...cn]),un=new Set(["innerHTML","textContent","innerText","children"]),fn=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),dn=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function hn(e,t){const n=dn[e];return typeof n=="object"?n[t]?n.$:void 0:n}const gn=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),mn={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},yn=e=>E(()=>e());function wn(e,t,n){let r=n.length,s=t.length,o=r,i=0,l=0,c=t[s-1].nextSibling,u=null;for(;i<s||l<o;){if(t[i]===n[l]){i++,l++;continue}for(;t[s-1]===n[o-1];)s--,o--;if(s===i){const a=o<r?l?n[l-1].nextSibling:n[o-l]:c;for(;l<o;)e.insertBefore(n[l++],a)}else if(o===l)for(;i<s;)(!u||!u.has(t[i]))&&t[i].remove(),i++;else if(t[i]===n[o-1]&&n[l]===t[s-1]){const a=t[--s].nextSibling;e.insertBefore(n[l++],t[i++].nextSibling),e.insertBefore(n[--o],a),t[s]=n[o]}else{if(!u){u=new Map;let f=l;for(;f<o;)u.set(n[f],f++)}const a=u.get(t[i]);if(a!=null)if(l<a&&a<o){let f=i,d=1,h;for(;++f<s&&f<o&&!((h=u.get(t[f]))==null||h!==a+d);)d++;if(d>a-l){const w=t[i];for(;l<a;)e.insertBefore(n[l++],w)}else e.replaceChild(n[l++],t[i++])}else i++;else t[i++].remove()}}}const it="_$DX_DELEGATE";function Sr(e,t,n,r={}){let s;return H(o=>{s=o,t===document?e():Ge(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{s(),t.textContent=""}}function bn(e,t,n,r){let s;const o=()=>{const l=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return l.innerHTML=e,n?l.content.firstChild.firstChild:r?l.firstChild:l.content.firstChild},i=t?()=>N(()=>document.importNode(s||(s=o()),!0)):()=>(s||(s=o())).cloneNode(!0);return i.cloneNode=i,i}function xt(e,t=window.document){const n=t[it]||(t[it]=new Set);for(let r=0,s=e.length;r<s;r++){const o=e[r];n.has(o)||(n.add(o),t.addEventListener(o,Rn))}}function He(e,t,n){oe(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function pn(e,t,n,r){oe(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function An(e,t,n){oe(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function Pn(e,t){oe(e)||(t==null?e.removeAttribute("class"):e.className=t)}function Sn(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const s=n[0];e.addEventListener(t,n[0]=o=>s.call(e,n[1],o))}else e.addEventListener(t,n,typeof n!="function"&&n)}function En(e,t,n={}){const r=Object.keys(t||{}),s=Object.keys(n);let o,i;for(o=0,i=s.length;o<i;o++){const l=s[o];!l||l==="undefined"||t[l]||(lt(e,l,!1),delete n[l])}for(o=0,i=r.length;o<i;o++){const l=r[o],c=!!t[l];!l||l==="undefined"||n[l]===c||!c||(lt(e,l,!0),n[l]=c)}return n}function On(e,t,n){if(!t)return n?He(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let s,o;for(o in n)t[o]==null&&r.removeProperty(o),delete n[o];for(o in t)s=t[o],s!==n[o]&&(r.setProperty(o,s),n[o]=s);return n}function Er(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function We(e,t={},n,r){const s={};return r||K(()=>s.children=he(e,t.children,s.children)),K(()=>typeof t.ref=="function"&&xn(t.ref,e)),K(()=>Cn(e,t,n,!0,s,!0)),s}function xn(e,t,n){return N(()=>e(t,n))}function Ge(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return he(e,t,r,n);K(s=>he(e,t(),s,n),r)}function Cn(e,t,n,r,s={},o=!1){t||(t={});for(const i in s)if(!(i in t)){if(i==="children")continue;s[i]=ct(e,i,null,s[i],n,o,t)}for(const i in t){if(i==="children")continue;const l=t[i];s[i]=ct(e,i,l,s[i],n,o,t)}}function oe(e){return!!y.context&&!y.done&&(!e||e.isConnected)}function vn(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function lt(e,t,n){const r=t.trim().split(/\s+/);for(let s=0,o=r.length;s<o;s++)e.classList.toggle(r[s],n)}function ct(e,t,n,r,s,o,i){let l,c,u,a,f;if(t==="style")return On(e,n,r);if(t==="classList")return En(e,n,r);if(n===r)return r;if(t==="ref")o||n(e);else if(t.slice(0,3)==="on:"){const d=t.slice(3);r&&e.removeEventListener(d,r,typeof r!="function"&&r),n&&e.addEventListener(d,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const d=t.slice(10);r&&e.removeEventListener(d,r,!0),n&&e.addEventListener(d,n,!0)}else if(t.slice(0,2)==="on"){const d=t.slice(2).toLowerCase(),h=gn.has(d);if(!h&&r){const w=Array.isArray(r)?r[0]:r;e.removeEventListener(d,w)}(h||n)&&(Sn(e,d,n,h),h&&xt([d]))}else if(t.slice(0,5)==="attr:")He(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")An(e,t.slice(5),n);else if((f=t.slice(0,5)==="prop:")||(u=un.has(t))||!s&&((a=hn(t,e.tagName))||(c=an.has(t)))||(l=e.nodeName.includes("-")||"is"in i)){if(f)t=t.slice(5),c=!0;else if(oe(e))return n;t==="class"||t==="className"?Pn(e,n):l&&!c&&!u?e[vn(t)]=n:e[a||t]=n}else{const d=s&&t.indexOf(":")>-1&&mn[t.split(":")[0]];d?pn(e,d,t,n):He(e,fn[t]||t,n)}return n}function Rn(e){if(y.registry&&y.events&&y.events.find(([c,u])=>u===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,s=e.currentTarget,o=c=>Object.defineProperty(e,"target",{configurable:!0,value:c}),i=()=>{const c=t[n];if(c&&!t.disabled){const u=t[`${n}Data`];if(u!==void 0?c.call(t,u,e):c.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&o(t.host),!0},l=()=>{for(;i()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),y.registry&&!y.done&&(y.done=_$HY.done=!0),e.composedPath){const c=e.composedPath();o(c[0]);for(let u=0;u<c.length-2&&(t=c[u],!!i());u++){if(t._$host){t=t._$host,l();break}if(t.parentNode===s)break}}else l();o(r)}function he(e,t,n,r,s){const o=oe(e);if(o){!n&&(n=[...e.childNodes]);let c=[];for(let u=0;u<n.length;u++){const a=n[u];a.nodeType===8&&a.data.slice(0,2)==="!$"?a.remove():c.push(a)}n=c}for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,l=r!==void 0;if(e=l&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(o||i==="number"&&(t=t.toString(),t===n))return n;if(l){let c=n[0];c&&c.nodeType===3?c.data!==t&&(c.data=t):c=document.createTextNode(t),n=Z(e,n,r,c)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean"){if(o)return n;n=Z(e,n,r)}else{if(i==="function")return K(()=>{let c=t();for(;typeof c=="function";)c=c();n=he(e,c,n,r)}),()=>n;if(Array.isArray(t)){const c=[],u=n&&Array.isArray(n);if(ze(c,t,n,s))return K(()=>n=he(e,c,n,r,!0)),()=>n;if(o){if(!c.length)return n;if(r===void 0)return n=[...e.childNodes];let a=c[0];if(a.parentNode!==e)return n;const f=[a];for(;(a=a.nextSibling)!==r;)f.push(a);return n=f}if(c.length===0){if(n=Z(e,n,r),l)return n}else u?n.length===0?at(e,c,r):wn(e,n,c):(n&&Z(e),at(e,c));n=c}else if(t.nodeType){if(o&&t.parentNode)return n=l?[t]:t;if(Array.isArray(n)){if(l)return n=Z(e,n,r,t);Z(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function ze(e,t,n,r){let s=!1;for(let o=0,i=t.length;o<i;o++){let l=t[o],c=n&&n[e.length],u;if(!(l==null||l===!0||l===!1))if((u=typeof l)=="object"&&l.nodeType)e.push(l);else if(Array.isArray(l))s=ze(e,l,c)||s;else if(u==="function")if(r){for(;typeof l=="function";)l=l();s=ze(e,Array.isArray(l)?l:[l],Array.isArray(c)?c:[c])||s}else e.push(l),s=!0;else{const a=String(l);c&&c.nodeType===3&&c.data===a?e.push(c):e.push(document.createTextNode(a))}}return s}function at(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n)}function Z(e,t,n,r){if(n===void 0)return e.textContent="";const s=r||document.createTextNode("");if(t.length){let o=!1;for(let i=t.length-1;i>=0;i--){const l=t[i];if(s!==l){const c=l.parentNode===e;!o&&!i?c?e.replaceChild(s,l):e.insertBefore(s,n):c&&l.remove()}else o=!0}}else e.insertBefore(s,n);return[s]}const Ln=!1,Nn="http://www.w3.org/2000/svg";function $n(e,t=!1,n=void 0){return t?document.createElementNS(Nn,e):document.createElement(e,{is:n})}function Or(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,s=xe();let o,i=!!y.context;return bt(()=>{i&&(xe().user=i=!1),o||(o=$e(s,()=>E(()=>e.children)));const l=r();if(l instanceof HTMLHeadElement){const[c,u]=T(!1),a=()=>u(!0);H(f=>Ge(l,()=>c()?f():o(),null)),W(a)}else{const c=$n(e.isSVG?"g":"div",e.isSVG),u=t&&c.attachShadow?c.attachShadow({mode:"open"}):c;Object.defineProperty(c,"_$host",{get(){return n.parentNode},configurable:!0}),Ge(u,o),l.appendChild(c),e.ref&&e.ref(c),W(()=>l.removeChild(c))}},void 0,{render:!i}),n}function Ct(){let e=new Set;function t(s){return e.add(s),()=>e.delete(s)}let n=!1;function r(s,o){if(n)return!(n=!1);const i={to:s,options:o,defaultPrevented:!1,preventDefault:()=>i.defaultPrevented=!0};for(const l of e)l.listener({...i,from:l.location,retry:c=>{c&&(n=!0),l.navigate(s,{...o,resolve:!1})}});return!i.defaultPrevented}return{subscribe:t,confirm:r}}let Xe;function tt(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),Xe=window.history.state._depth}tt();function Tn(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function In(e,t){let n=!1;return()=>{const r=Xe;tt();const s=r==null?null:Xe-r;if(n){n=!1;return}s&&t(s)?(n=!0,window.history.go(-s)):e()}}const jn=/^(?:[a-z0-9]+:)?\/\//i,kn=/^\/+|(\/)\/+$/g,vt="http://sr";function X(e,t=!1){const n=e.replace(kn,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function Pe(e,t,n){if(jn.test(t))return;const r=X(e),s=n&&X(n);let o="";return!s||t.startsWith("/")?o=r:s.toLowerCase().indexOf(r.toLowerCase())!==0?o=r+s:o=s,(o||"/")+X(t,!o)}function Mn(e,t){if(e==null)throw new Error(t);return e}function Dn(e,t){return X(e).replace(/\/*(\*.*)?$/g,"")+X(t)}function Rt(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function _n(e,t,n){const[r,s]=e.split("/*",2),o=r.split("/").filter(Boolean),i=o.length;return l=>{const c=l.split("/").filter(Boolean),u=c.length-i;if(u<0||u>0&&s===void 0&&!t)return null;const a={path:i?"":"/",params:{}},f=d=>n===void 0?void 0:n[d];for(let d=0;d<i;d++){const h=o[d],w=h[0]===":",g=w?c[d]:c[d].toLowerCase(),m=w?h.slice(1):h.toLowerCase();if(w&&_e(g,f(m)))a.params[m]=g;else if(w||!_e(g,m))return null;a.path+=`/${g}`}if(s){const d=u?c.slice(-u).join("/"):"";if(_e(d,f(s)))a.params[s]=d;else return null}return a}}function _e(e,t){const n=r=>r===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function Un(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((s,o)=>s+(o.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function Lt(e){const t=new Map,n=xe();return new Proxy({},{get(r,s){return t.has(s)||$e(n,()=>t.set(s,E(()=>e()[s]))),t.get(s)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(r,s){return s in e()}})}function Fn(e,t){const n=new URLSearchParams(e);Object.entries(t).forEach(([s,o])=>{o==null||o===""||o instanceof Array&&!o.length?n.delete(s):o instanceof Array?(n.delete(s),o.forEach(i=>{n.append(s,String(i))})):n.set(s,String(o))});const r=n.toString();return r?`?${r}`:""}function Nt(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const s=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)s.push(n+=t[1]),r=r.slice(t[0].length);return Nt(r).reduce((o,i)=>[...o,...s.map(l=>l+i)],[])}const Bn=100,$t=Ze(),nt=Ze(),we=()=>Mn(Te($t),"<A> and 'use' router primitives can be only used inside a Route."),Vn=()=>Te(nt)||we().base,Kn=e=>{const t=Vn();return E(()=>t.resolvePath(e()))},qn=e=>{const t=we();return E(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},Hn=()=>we().navigatorFactory(),Tt=()=>we().location,xr=()=>we().params,Cr=()=>{const e=Tt(),t=Hn(),n=(r,s)=>{const o=N(()=>Fn(e.search,r)+e.hash);t(o,{scroll:!1,resolve:!1,...s})};return[e.query,n]};function Wn(e,t=""){const{component:n,preload:r,load:s,children:o,info:i}=e,l=!o||Array.isArray(o)&&!o.length,c={key:e,component:n,preload:r||s,info:i};return It(e.path).reduce((u,a)=>{for(const f of Nt(a)){const d=Dn(t,f);let h=l?d:d.split("/*",1)[0];h=h.split("/").map(w=>w.startsWith(":")||w.startsWith("*")?w:encodeURIComponent(w)).join("/"),u.push({...c,originalPath:a,pattern:h,matcher:_n(h,!l,e.matchFilters)})}return u},[])}function Gn(e,t=0){return{routes:e,score:Un(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let s=e.length-1;s>=0;s--){const o=e[s],i=o.matcher(n);if(!i)return null;r.unshift({...i,route:o})}return r}}}function It(e){return Array.isArray(e)?e:[e]}function jt(e,t="",n=[],r=[]){const s=It(e);for(let o=0,i=s.length;o<i;o++){const l=s[o];if(l&&typeof l=="object"){l.hasOwnProperty("path")||(l.path="");const c=Wn(l,t);for(const u of c){n.push(u);const a=Array.isArray(l.children)&&l.children.length===0;if(l.children&&!a)jt(l.children,u.pattern,n,r);else{const f=Gn([...n],r.length);r.push(f)}n.pop()}}}return n.length?r:r.sort((o,i)=>i.score-o.score)}function Ue(e,t){for(let n=0,r=e.length;n<r;n++){const s=e[n].matcher(t);if(s)return s}return[]}function zn(e,t,n){const r=new URL(vt),s=E(a=>{const f=e();try{return new URL(f,r)}catch{return console.error(`Invalid path ${f}`),a}},r,{equals:(a,f)=>a.href===f.href}),o=E(()=>s().pathname),i=E(()=>s().search,!0),l=E(()=>s().hash),c=()=>"",u=Qe(i,()=>Rt(s()));return{get pathname(){return o()},get search(){return i()},get hash(){return l()},get state(){return t()},get key(){return c()},query:n?n(u):Lt(u)}}let z;function Xn(){return z}function Jn(e,t,n,r={}){const{signal:[s,o],utils:i={}}=e,l=i.parsePath||(P=>P),c=i.renderPath||(P=>P),u=i.beforeLeave||Ct(),a=Pe("",r.base||"");if(a===void 0)throw new Error(`${a} is not a valid base path`);a&&!s().value&&o({value:a,replace:!0,scroll:!1});const[f,d]=T(!1);let h;const w=(P,O)=>{O.value===g()&&O.state===A()||(h===void 0&&d(!0),z=P,h=O,Gt(()=>{h===O&&(m(h.value),b(h.state),ln(),C[1](j=>j.filter(Y=>Y.pending)))}).finally(()=>{h===O&&pt(()=>{z=void 0,P==="navigate"&&k(h),d(!1),h=void 0})}))},[g,m]=T(s().value),[A,b]=T(s().state),R=zn(g,A,i.queryWrapper),x=[],C=T([]),B=E(()=>typeof r.transformUrl=="function"?Ue(t(),r.transformUrl(R.pathname)):Ue(t(),R.pathname)),J=()=>{const P=B(),O={};for(let j=0;j<P.length;j++)Object.assign(O,P[j].params);return O},ie=i.paramsWrapper?i.paramsWrapper(J,t):Lt(J),le={pattern:a,path:()=>a,outlet:()=>null,resolvePath(P){return Pe(a,P)}};return K(Qe(s,P=>w("native",P),{defer:!0})),{base:le,location:R,params:ie,isRouting:f,renderPath:c,parsePath:l,navigatorFactory:v,matches:B,beforeLeave:u,preloadRoute:$,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:C};function L(P,O,j){N(()=>{if(typeof O=="number"){O&&(i.go?i.go(O):console.warn("Router integration does not support relative routing"));return}const Y=!O||O[0]==="?",{replace:Ie,resolve:Q,scroll:je,state:ce}={replace:!1,resolve:!Y,scroll:!0,...j},be=Q?P.resolvePath(O):Pe(Y&&R.pathname||"",O);if(be===void 0)throw new Error(`Path '${O}' is not a routable path`);if(x.length>=Bn)throw new Error("Too many redirects");const rt=g();(be!==rt||ce!==A())&&(Ln||u.confirm(be,j)&&(x.push({value:rt,replace:Ie,scroll:je,state:A()}),w("navigate",{value:be,state:ce})))})}function v(P){return P=P||Te(nt)||le,(O,j)=>L(P,O,j)}function k(P){const O=x[0];O&&(o({...P,replace:O.replace,scroll:O.scroll}),x.length=0)}function $(P,O){const j=Ue(t(),P.pathname),Y=z;z="preload";for(let Ie in j){const{route:Q,params:je}=j[Ie];Q.component&&Q.component.preload&&Q.component.preload();const{preload:ce}=Q;O&&ce&&$e(n(),()=>ce({params:je,location:{pathname:P.pathname,search:P.search,hash:P.hash,query:Rt(P),state:null,key:""},intent:"preload"}))}z=Y}}function Yn(e,t,n,r){const{base:s,location:o,params:i}=e,{pattern:l,component:c,preload:u}=r().route,a=E(()=>r().path);c&&c.preload&&c.preload();const f=u?u({params:i,location:o,intent:z||"initial"}):void 0;return{parent:t,pattern:l,path:a,outlet:()=>c?q(c,{params:i,location:o,data:f,get children(){return n()}}):n(),resolvePath(h){return Pe(s.path(),h,a())}}}const Qn=e=>t=>{const{base:n}=t,r=et(()=>t.children),s=E(()=>jt(r(),t.base||""));let o;const i=Jn(e,s,()=>o,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(i),q($t.Provider,{value:i,get children(){return q(Zn,{routerState:i,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[yn(()=>(o=xe())&&null),q(er,{routerState:i,get branches(){return s()}})]}})}})};function Zn(e){const t=e.routerState.location,n=e.routerState.params,r=E(()=>e.preload&&N(()=>{e.preload({params:n,location:t,intent:Xn()||"initial"})}));return q(Ot,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:s=>q(s,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function er(e){const t=[];let n;const r=E(Qe(e.routerState.matches,(s,o,i)=>{let l=o&&s.length===o.length;const c=[];for(let u=0,a=s.length;u<a;u++){const f=o&&o[u],d=s[u];i&&f&&d.route.key===f.route.key?c[u]=i[u]:(l=!1,t[u]&&t[u](),H(h=>{t[u]=h,c[u]=Yn(e.routerState,c[u-1]||e.routerState.base,ut(()=>r()[u+1]),()=>{const w=e.routerState.matches();return w[u]??w[0]})}))}return t.splice(s.length).forEach(u=>u()),i&&l?i:(n=c[0],c)}));return ut(()=>r()&&n)()}const ut=e=>()=>q(Ot,{get when(){return e()},keyed:!0,children:t=>q(nt.Provider,{value:t,get children(){return t.outlet()}})}),vr=e=>{const t=et(()=>e.children);return qe(e,{get children(){return t()}})};function tr([e,t],n,r){return[e,r?s=>t(r(s)):t]}function nr(e){let t=!1;const n=s=>typeof s=="string"?{value:s}:s,r=tr(T(n(e.get()),{equals:(s,o)=>s.value===o.value&&s.state===o.state}),void 0,s=>(!t&&e.set(s),y.registry&&!y.done&&(y.done=!0),s));return e.init&&W(e.init((s=e.get())=>{t=!0,r[1](n(s)),t=!1})),Qn({signal:r,create:e.create,utils:e.utils})}function rr(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function sr(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const or=new Map;function ir(e=!0,t=!1,n="/_server",r){return s=>{const o=s.base.path(),i=s.navigatorFactory(s.base);let l,c;function u(g){return g.namespaceURI==="http://www.w3.org/2000/svg"}function a(g){if(g.defaultPrevented||g.button!==0||g.metaKey||g.altKey||g.ctrlKey||g.shiftKey)return;const m=g.composedPath().find(B=>B instanceof Node&&B.nodeName.toUpperCase()==="A");if(!m||t&&!m.hasAttribute("link"))return;const A=u(m),b=A?m.href.baseVal:m.href;if((A?m.target.baseVal:m.target)||!b&&!m.hasAttribute("state"))return;const x=(m.getAttribute("rel")||"").split(/\s+/);if(m.hasAttribute("download")||x&&x.includes("external"))return;const C=A?new URL(b,document.baseURI):new URL(b);if(!(C.origin!==window.location.origin||o&&C.pathname&&!C.pathname.toLowerCase().startsWith(o.toLowerCase())))return[m,C]}function f(g){const m=a(g);if(!m)return;const[A,b]=m,R=s.parsePath(b.pathname+b.search+b.hash),x=A.getAttribute("state");g.preventDefault(),i(R,{resolve:!1,replace:A.hasAttribute("replace"),scroll:!A.hasAttribute("noscroll"),state:x?JSON.parse(x):void 0})}function d(g){const m=a(g);if(!m)return;const[A,b]=m;r&&(b.pathname=r(b.pathname)),s.preloadRoute(b,A.getAttribute("preload")!=="false")}function h(g){clearTimeout(l);const m=a(g);if(!m)return c=null;const[A,b]=m;c!==A&&(r&&(b.pathname=r(b.pathname)),l=setTimeout(()=>{s.preloadRoute(b,A.getAttribute("preload")!=="false"),c=A},20))}function w(g){if(g.defaultPrevented)return;let m=g.submitter&&g.submitter.hasAttribute("formaction")?g.submitter.getAttribute("formaction"):g.target.getAttribute("action");if(!m)return;if(!m.startsWith("https://action/")){const b=new URL(m,vt);if(m=s.parsePath(b.pathname+b.search),!m.startsWith(n))return}if(g.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const A=or.get(m);if(A){g.preventDefault();const b=new FormData(g.target,g.submitter);A.call({r:s,f:g.target},g.target.enctype==="multipart/form-data"?b:new URLSearchParams(b))}}xt(["click","submit"]),document.addEventListener("click",f),e&&(document.addEventListener("mousemove",h,{passive:!0}),document.addEventListener("focusin",d,{passive:!0}),document.addEventListener("touchstart",d,{passive:!0})),document.addEventListener("submit",w),W(()=>{document.removeEventListener("click",f),e&&(document.removeEventListener("mousemove",h),document.removeEventListener("focusin",d),document.removeEventListener("touchstart",d)),document.removeEventListener("submit",w)})}}function Rr(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,s=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:s}},n=Ct();return nr({get:t,set({value:r,replace:s,scroll:o,state:i}){s?window.history.replaceState(Tn(i),"",r):window.history.pushState(i,"",r),sr(decodeURIComponent(window.location.hash.slice(1)),o),tt()},init:r=>rr(window,"popstate",In(r,s=>{if(s)return!n.confirm(s);{const o=t();return!n.confirm(o.value,{state:o.state})}})),create:ir(e.preload,e.explicitLinks,e.actionBase,e.transformUrl),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}var lr=bn("<a>");function Lr(e){e=qe({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=nn(e,["href","state","class","activeClass","inactiveClass","end"]),n=Kn(()=>e.href),r=qn(n),s=Tt(),o=E(()=>{const i=n();if(i===void 0)return[!1,!1];const l=X(i.split(/[?#]/,1)[0]).toLowerCase(),c=decodeURI(X(s.pathname).toLowerCase());return[e.end?l===c:c.startsWith(l+"/")||c===l,l===c]});return(()=>{var i=lr();return We(i,qe(t,{get href(){return r()||e.href},get state(){return JSON.stringify(e.state)},get classList(){return{...e.class&&{[e.class]:!0},[e.inactiveClass]:!o()[0],[e.activeClass]:o()[0],...t.classList}},link:"",get"aria-current"(){return o()[1]?"page":void 0}}),!1,!1),i})()}const Je=Symbol("store-raw"),ne=Symbol("store-node"),V=Symbol("store-has"),kt=Symbol("store-self");function Mt(e){let t=e[_];if(!t&&(Object.defineProperty(e,_,{value:t=new Proxy(e,ur)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let s=0,o=n.length;s<o;s++){const i=n[s];r[i].get&&Object.defineProperty(e,i,{enumerable:r[i].enumerable,get:r[i].get.bind(t)})}}return t}function G(e){let t;return e!=null&&typeof e=="object"&&(e[_]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function re(e,t=new Set){let n,r,s,o;if(n=e!=null&&e[Je])return n;if(!G(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let i=0,l=e.length;i<l;i++)s=e[i],(r=re(s,t))!==s&&(e[i]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const i=Object.keys(e),l=Object.getOwnPropertyDescriptors(e);for(let c=0,u=i.length;c<u;c++)o=i[c],!l[o].get&&(s=e[o],(r=re(s,t))!==s&&(e[o]=r))}return e}function Le(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function ge(e,t,n){if(e[t])return e[t];const[r,s]=T(n,{equals:!1,internal:!0});return r.$=s,e[t]=r}function cr(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===_||t===ne||(delete n.value,delete n.writable,n.get=()=>e[_][t]),n}function Dt(e){Fe()&&ge(Le(e,ne),kt)()}function ar(e){return Dt(e),Reflect.ownKeys(e)}const ur={get(e,t,n){if(t===Je)return e;if(t===_)return n;if(t===Se)return Dt(e),n;const r=Le(e,ne),s=r[t];let o=s?s():e[t];if(t===ne||t===V||t==="__proto__")return o;if(!s){const i=Object.getOwnPropertyDescriptor(e,t);Fe()&&(typeof o!="function"||e.hasOwnProperty(t))&&!(i&&i.get)&&(o=ge(r,t,o)())}return G(o)?Mt(o):o},has(e,t){return t===Je||t===_||t===Se||t===ne||t===V||t==="__proto__"?!0:(Fe()&&ge(Le(e,V),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:ar,getOwnPropertyDescriptor:cr};function M(e,t,n,r=!1){if(!r&&e[t]===n)return;const s=e[t],o=e.length;n===void 0?(delete e[t],e[V]&&e[V][t]&&s!==void 0&&e[V][t].$()):(e[t]=n,e[V]&&e[V][t]&&s===void 0&&e[V][t].$());let i=Le(e,ne),l;if((l=ge(i,t,s))&&l.$(()=>n),Array.isArray(e)&&e.length!==o){for(let c=e.length;c<o;c++)(l=i[c])&&l.$();(l=ge(i,"length",o))&&l.$(e.length)}(l=i[kt])&&l.$()}function _t(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const s=n[r];M(e,s,t[s])}}function fr(e,t){if(typeof t=="function"&&(t=t(e)),t=re(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const s=t[n];e[n]!==s&&M(e,n,s)}M(e,"length",r)}else _t(e,t)}function ue(e,t,n=[]){let r,s=e;if(t.length>1){r=t.shift();const i=typeof r,l=Array.isArray(e);if(Array.isArray(r)){for(let c=0;c<r.length;c++)ue(e,[r[c]].concat(t),n);return}else if(l&&i==="function"){for(let c=0;c<e.length;c++)r(e[c],c)&&ue(e,[c].concat(t),n);return}else if(l&&i==="object"){const{from:c=0,to:u=e.length-1,by:a=1}=r;for(let f=c;f<=u;f+=a)ue(e,[f].concat(t),n);return}else if(t.length>1){ue(e[r],t,[r].concat(n));return}s=e[r],n=[r].concat(n)}let o=t[0];typeof o=="function"&&(o=o(s,n),o===s)||r===void 0&&o==null||(o=re(o),r===void 0||G(s)&&G(o)&&!Array.isArray(o)?_t(s,o):M(e,r,o))}function Nr(...[e,t]){const n=re(e||{}),r=Array.isArray(n),s=Mt(n);function o(...i){pt(()=>{r&&i.length===1?fr(n,i[0]):ue(n,i)})}return[s,o]}const Ye=Symbol("store-root");function ee(e,t,n,r,s){const o=t[n];if(e===o)return;const i=Array.isArray(e);if(n!==Ye&&(!G(e)||!G(o)||i!==Array.isArray(o)||s&&e[s]!==o[s])){M(t,n,e);return}if(i){if(e.length&&o.length&&(!r||s&&e[0]&&e[0][s]!=null)){let u,a,f,d,h,w,g,m;for(f=0,d=Math.min(o.length,e.length);f<d&&(o[f]===e[f]||s&&o[f]&&e[f]&&o[f][s]&&o[f][s]===e[f][s]);f++)ee(e[f],o,f,r,s);const A=new Array(e.length),b=new Map;for(d=o.length-1,h=e.length-1;d>=f&&h>=f&&(o[d]===e[h]||s&&o[d]&&e[h]&&o[d][s]&&o[d][s]===e[h][s]);d--,h--)A[h]=o[d];if(f>h||f>d){for(a=f;a<=h;a++)M(o,a,e[a]);for(;a<e.length;a++)M(o,a,A[a]),ee(e[a],o,a,r,s);o.length>e.length&&M(o,"length",e.length);return}for(g=new Array(h+1),a=h;a>=f;a--)w=e[a],m=s&&w?w[s]:w,u=b.get(m),g[a]=u===void 0?-1:u,b.set(m,a);for(u=f;u<=d;u++)w=o[u],m=s&&w?w[s]:w,a=b.get(m),a!==void 0&&a!==-1&&(A[a]=o[u],a=g[a],b.set(m,a));for(a=f;a<e.length;a++)a in A?(M(o,a,A[a]),ee(e[a],o,a,r,s)):M(o,a,e[a])}else for(let u=0,a=e.length;u<a;u++)ee(e[u],o,u,r,s);o.length>e.length&&M(o,"length",e.length);return}const l=Object.keys(e);for(let u=0,a=l.length;u<a;u++)ee(e[l[u]],o,l[u],r,s);const c=Object.keys(o);for(let u=0,a=c.length;u<a;u++)e[c[u]]===void 0&&M(o,c[u],void 0)}function $r(e,t={}){const{merge:n,key:r="id"}=t,s=re(e);return o=>{if(!G(o)||!G(s))return s;const i=ee(s,{[Ye]:o},Ye,n,r);return i===void 0?o:i}}const Ut=Ze(),dr=["title","meta"],ft=[],dt=["name","http-equiv","content","charset","media"].concat(["property"]),ht=(e,t)=>{const n=Object.fromEntries(Object.entries(e.props).filter(([r])=>t.includes(r)).sort());return(Object.hasOwn(n,"name")||Object.hasOwn(n,"property"))&&(n.name=n.name||n.property,delete n.property),e.tag+JSON.stringify(n)};function hr(){if(!y.context){const n=document.head.querySelectorAll("[data-sm]");Array.prototype.forEach.call(n,r=>r.parentNode.removeChild(r))}const e=new Map;function t(n){if(n.ref)return n.ref;let r=document.querySelector(`[data-sm="${n.id}"]`);return r?(r.tagName.toLowerCase()!==n.tag&&(r.parentNode&&r.parentNode.removeChild(r),r=document.createElement(n.tag)),r.removeAttribute("data-sm")):r=document.createElement(n.tag),r}return{addTag(n){if(dr.indexOf(n.tag)!==-1){const o=n.tag==="title"?ft:dt,i=ht(n,o);e.has(i)||e.set(i,[]);let l=e.get(i),c=l.length;l=[...l,n],e.set(i,l);let u=t(n);n.ref=u,We(u,n.props);let a=null;for(var r=c-1;r>=0;r--)if(l[r]!=null){a=l[r];break}return u.parentNode!=document.head&&document.head.appendChild(u),a&&a.ref&&a.ref.parentNode&&document.head.removeChild(a.ref),c}let s=t(n);return n.ref=s,We(s,n.props),s.parentNode!=document.head&&document.head.appendChild(s),-1},removeTag(n,r){const s=n.tag==="title"?ft:dt,o=ht(n,s);if(n.ref){const i=e.get(o);if(i){if(n.ref.parentNode){n.ref.parentNode.removeChild(n.ref);for(let l=r-1;l>=0;l--)i[l]!=null&&document.head.appendChild(i[l].ref)}i[r]=null,e.set(o,i)}else n.ref.parentNode&&n.ref.parentNode.removeChild(n.ref)}}}}const Tr=e=>{const t=hr();return q(Ut.Provider,{value:t,get children(){return e.children}})},Ft=(e,t,n)=>(gr({tag:e,props:t,setting:n,id:sn(),get name(){return t.name||t.property}}),null);function gr(e){const t=Te(Ut);if(!t)throw new Error("<MetaProvider /> should be in the tree");K(()=>{const n=t.addTag(e);W(()=>t.removeTag(e,n))})}const Ir=e=>Ft("title",e,{escape:!0,close:!0}),jr=e=>Ft("meta",e);export{Lr as A,On as B,Qe as C,Cr as D,Pr as E,pr as F,Ar as I,jr as M,Or as P,Rr as R,Ot as S,Ir as T,T as a,Hn as b,Nr as c,xt as d,mr as e,bt as f,q as g,K as h,Ge as i,Sn as j,Ht as k,xn as l,yn as m,xr as n,W as o,E as p,Pn as q,$r as r,He as s,bn as t,Tt as u,Sr as v,vr as w,Tr as x,br as y,Er as z};