(()=>{var h=(e)=>typeof e==="function",L=(e)=>e&&typeof e==="object",E=Array.isArray,y=typeof document<"u"?document:null,V=(e)=>e?._isRuntime?e.container:e instanceof Node?e:y.createTextNode(e==null?"":String(e)),u=null,m=null,O=!1,k=0,R=new Set,U=new WeakMap,Q="http://www.w3.org/2000/svg",D="http://www.w3.org/1999/xlink",X=new Set("svg,path,circle,rect,line,polyline,polygon,g,defs,text,textPath,tspan,use,symbol,image,marker,ellipse".split(",")),b=(e)=>{if(!e||e._disposed)return;e._disposed=!0;let n=[e];while(n.length){let t=n.pop();if(t._cleanups)t._cleanups.forEach((r)=>r()),t._cleanups.clear();if(t._children)t._children.forEach((r)=>n.push(r)),t._children.clear();if(t._deps)t._deps.forEach((r)=>r.delete(t)),t._deps.clear()}},C=(e)=>{if(m)(m._cleanups||=new Set).add(e)},H=(e)=>{let n=u;u=null;try{return e()}finally{u=n}},A=(e,n=!1)=>{let t=()=>{if(t._disposed)return;if(t._deps)t._deps.forEach((a)=>a.delete(t));if(t._cleanups)t._cleanups.forEach((a)=>a()),t._cleanups.clear();let r=u,o=m;u=m=t;try{return t._result=e()}catch(a){console.error("[SigPro]",a)}finally{u=r,m=o}};if(t._deps=t._cleanups=t._children=null,t._disposed=!1,t._isComputed=n,t._depth=u?u._depth+1:0,t._mounts=[],t._parent=m,m)(m._children||=new Set).add(t);return t},G=()=>{if(O)return;O=!0;let e=Array.from(R).sort((n,t)=>n._depth-t._depth);R.clear();for(let n of e)if(!n._disposed)n();O=!1},I=(e)=>{k++;try{return e()}finally{if(k--,k===0&&R.size>0&&!O)G()}},x=(e,n=!1)=>{if(!n&&u&&!u._disposed)e.add(u),(u._deps||=new Set).add(e);else if(n&&e.size>0){let t=!1;for(let r of e){if(r===u||r._disposed)continue;if(r._isComputed){if(r._dirty=!0,r._subs)x(r._subs,!0)}else R.add(r),t=!0}if(t&&!O&&k===0)queueMicrotask(G)}},v=(e,n=null)=>{let t=new Set;if(h(e)){let r,o=()=>{if(o._dirty){let a=u;u=o;try{let s=e();if(!Object.is(r,s))r=s,x(t,!0)}finally{u=a}o._dirty=!1}return x(t),r};return o._isComputed=!0,o._subs=t,o._dirty=!0,o._deps=null,o._disposed=!1,o}if(n)try{e=JSON.parse(localStorage.getItem(n))??e}catch(r){}return(...r)=>{if(r.length){let o=h(r[0])?r[0](e):r[0];if(!Object.is(e,o)){if(e=o,n)localStorage.setItem(n,JSON.stringify(e));x(t,!0)}}return x(t),e}},N=(e,n)=>{if(n===void 0){let r=A(e);return r(),()=>b(r)}let t=A(()=>{let r=E(e)?e.map((o)=>o()):e();H(()=>n(r))});return t(),()=>b(t)},B=(e)=>{if(!e)return;if(e._cleanups)e._cleanups.forEach((n)=>n()),e._cleanups.clear();if(e._ownerEffect)b(e._ownerEffect);if(e.childNodes)e.childNodes.forEach((n)=>B(n))},K=/^\s*(javascript|data|vbscript):/i,Y=new Set(["src","href","formaction","action","background","code","archive"]),Z=(e)=>Y.has(e)||e.startsWith("on"),$=(e,n)=>{if(n==null||n===!1)return null;if(Z(e)){let t=String(n);if(K.test(t))return"#"}return n},g=(e,n={},t=[])=>{if(n instanceof Node||E(n)||!L(n))t=n,n={};if(h(e)){let s=A(()=>{let f=e(n,{children:t,emit:(d,..._)=>n[`on${d[0].toUpperCase()}${d.slice(1)}`]?.(..._)});return s._result=f,f});s();let c=s._result;if(c==null)return null;let i=c instanceof Node||E(c)&&c.every((f)=>f instanceof Node)?c:y.createTextNode(String(c)),l=(f)=>{if(L(f)&&!f._isRuntime)f._mounts=s._mounts||[],f._cleanups=s._cleanups||new Set,f._ownerEffect=s};return E(i)?i.forEach(l):l(i),i}let r=X.has(e),o=r?y.createElementNS(Q,e):y.createElement(e);o._cleanups=new Set;for(let s of Object.keys(n)){let c=n[s];if(s==="ref"){h(c)?c(o):c.current=o;continue}if(r&&s.startsWith("xlink:")){let i=$(s.slice(6),c);i==null?o.removeAttributeNS(D,s.slice(6)):o.setAttributeNS(D,s.slice(6),i);continue}if(s.startsWith("on")){let i=s.slice(2).toLowerCase();o.addEventListener(i,c);let l=()=>o.removeEventListener(i,c);o._cleanups.add(l),C(l)}else if(h(c)){let i=A(()=>{let l=$(s,c());if(s==="class")o.className=l||"";else if(l==null)o.removeAttribute(s);else if(s==="style"&&typeof l==="string")o.setAttribute("style",l);else if(s in o&&!r)o[s]=l;else o.setAttribute(s,l===!0?"":l)});if(i(),o._cleanups.add(()=>b(i)),C(()=>b(i)),/^(INPUT|TEXTAREA|SELECT)$/.test(o.tagName)&&(s==="value"||s==="checked")){let l=s==="checked"?"change":"input";o.addEventListener(l,(f)=>c(f.target[s]))}}else{let i=$(s,c);if(i!=null)if(s==="style"&&typeof i==="string")o.setAttribute("style",i);else if(s in o&&!r)o[s]=i;else o.setAttribute(s,i===!0?"":i)}}let a=(s)=>{if(E(s))return s.forEach(a);if(h(s)){let c=y.createTextNode("");o.appendChild(c);let i=[],l=A(()=>{let f=s(),d=(E(f)?f:[f]).map(V);i.forEach((p)=>{if(p._isRuntime)p.destroy();else B(p);if(p.parentNode)p.remove()});let _=c;for(let p=d.length-1;p>=0;p--){let w=d[p];if(w.parentNode!==_.parentNode)_.parentNode?.insertBefore(w,_);if(w._mounts)w._mounts.forEach((z)=>z());_=w}i=d});l(),o._cleanups.add(()=>b(l)),C(()=>b(l))}else{let c=V(s);if(o.appendChild(c),c._mounts)c._mounts.forEach((i)=>i())}};return a(t),o},T=(e)=>{let n=new Set,t=m,r=u,o=y.createElement("div");o.style.display="contents",o.setAttribute("role","presentation"),m={_cleanups:n},u=null;let a=(s)=>{if(!s)return;if(s._isRuntime)n.add(s.destroy),o.appendChild(s.container);else if(E(s))s.forEach(a);else o.appendChild(s instanceof Node?s:y.createTextNode(String(s==null?"":s)))};try{a(e({onCleanup:(s)=>n.add(s)}))}finally{m=t,u=r}return{_isRuntime:!0,container:o,destroy:()=>{n.forEach((s)=>s()),B(o),o.remove()}}},F=(e,n,t=null)=>{let r=y.createTextNode(""),o=g("div",{style:"display:contents"},[r]),a=null;return N(()=>!!(h(e)?e():e),(s)=>{if(a)a.destroy(),a=null;let c=s?n:t;if(c)a=T(()=>h(c)?c():c),o.insertBefore(a.container,r)}),C(()=>a?.destroy()),o},M=(e,n,t)=>{let r=y.createTextNode(""),o=g("div",{style:"display:contents"},[r]),a=new Map;return N(()=>(h(e)?e():e)||[],(s)=>{let c=new Map,i=[],l=s||[];for(let d=0;dn(_,d));else a.delete(p);c.set(p,w),i.push(w)}a.forEach((d)=>d.destroy());let f=r;for(let d=i.length-1;d>=0;d--){let p=i[d].container;if(p.nextSibling!==f)o.insertBefore(p,f);f=p}a=c}),o},P=(e)=>e.children,W=(e,n)=>{let t=typeof n==="string"?y.querySelector(n):n;if(!t)return;if(U.has(t))U.get(t).destroy();let r=T(h(e)?e:()=>e);return t.replaceChildren(r.container),U.set(t,r),r};if(typeof window<"u")"a abbr article aside audio b blockquote br button canvas caption cite code col colgroup datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 header hr i iframe img input ins kbd label legend li main mark meter nav object ol optgroup option output p picture pre progress section select slot small source span strong sub summary sup svg table tbody td template textarea tfoot th thead time tr u ul video".split(" ").forEach((e)=>{window[e]=(n,t)=>g(e,n,t)});var S=(e)=>{let n=()=>window.location.hash.slice(1)||"/",t=v(n()),r=()=>t(n());window.addEventListener("hashchange",r);let o=g("div",{class:"router-hook"}),a=null;return N([t],()=>{let s=t(),c=e.find((i)=>{let l=i.path.split("/").filter(Boolean),f=s.split("/").filter(Boolean);return l.length===f.length&&l.every((d,_)=>d[0]===":"||d===f[_])})||e.find((i)=>i.path==="*");if(c){a?.destroy();let i={};c.path.split("/").filter(Boolean).forEach((l,f)=>{if(l[0]===":")i[l.slice(1)]=s.split("/").filter(Boolean)[f]}),S.params(i),a=T(()=>h(c.component)?c.component(i):c.component),o.replaceChildren(a.container)}}),o.destroy=()=>{window.removeEventListener("hashchange",r),a?.destroy()},o};S.params=v({});S.to=(e)=>window.location.hash=e.replace(/^#?\/?/,"#/");S.back=()=>window.history.back();S.path=()=>window.location.hash.replace(/^#/,"")||"/";var ee=v("en"),j={},q=(e)=>{for(let n of Object.keys(e)){if(!j[n])j[n]={};Object.assign(j[n],e[n])}};var J=(e)=>{return()=>j[ee()]?.[e]??e};if(typeof window<"u")Object.assign(window,{$:v,watch:N,h:g,Fragment:P,when:F,each:M,router:S,addLang:q,t:J,mount:W,batch:I,isArr:E,isFunc:h,isObj:L});})();