sibujs 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build.cjs +251 -40
- package/dist/build.js +1 -1
- package/dist/cdn.global.js +124 -27
- package/dist/{chunk-32ZISOLJ.js → chunk-VAU366PN.js} +251 -40
- package/dist/index.cjs +251 -40
- package/dist/index.js +1 -1
- package/dist/plugins.cjs +3 -2
- package/dist/plugins.js +3 -2
- package/package.json +1 -1
package/dist/cdn.global.js
CHANGED
|
@@ -1,39 +1,127 @@
|
|
|
1
|
-
"use strict";var Sibu=(()=>{var ke=Object.defineProperty;var go=Object.getOwnPropertyDescriptor;var ho=Object.getOwnPropertyNames;var bo=Object.prototype.hasOwnProperty;var Ie=(t,e)=>{for(var r in e)ke(t,r,{get:e[r],enumerable:!0})},xo=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ho(e))!bo.call(t,o)&&o!==r&&ke(t,o,{get:()=>e[o],enumerable:!(n=go(e,o))||n.enumerable});return t};var yo=t=>xo(ke({},"__esModule",{value:!0}),t);var jo={};Ie(jo,{DynamicComponent:()=>Mr,ErrorBoundary:()=>uo,Fragment:()=>_r,KeepAlive:()=>Br,Loading:()=>fo,Portal:()=>Nr,SVG_NS:()=>y,Suspense:()=>je,a:()=>wt,abbr:()=>Ct,action:()=>Kr,address:()=>ct,area:()=>Jt,array:()=>no,article:()=>nt,aside:()=>at,audio:()=>Xt,autoResize:()=>qr,b:()=>_t,base:()=>Gn,batch:()=>ve,bdi:()=>Nt,bdo:()=>At,bindDynamic:()=>Ce,blockquote:()=>mt,body:()=>Xe,br:()=>Lt,button:()=>ye,canvas:()=>mn,caption:()=>yn,catchError:()=>Ur,catchErrorAsync:()=>Wr,center:()=>br,checkLeaks:()=>Ye,circle:()=>Zn,cite:()=>Mt,clickOutside:()=>zr,clipPath:()=>cr,code:()=>Ot,col:()=>vn,colgroup:()=>Tn,context:()=>co,copyOnClick:()=>jr,customElement:()=>vr,data:()=>Rt,datalist:()=>An,dd:()=>gt,deepEqual:()=>ie,deepSignal:()=>oo,defs:()=>ar,del:()=>bn,derived:()=>z,details:()=>Fn,dfn:()=>Dt,dialog:()=>Un,disableSSR:()=>Ke,dispose:()=>O,div:()=>w,dl:()=>ht,dt:()=>bt,each:()=>wr,effect:()=>oe,ellipse:()=>Jn,em:()=>Ht,embed:()=>on,enableSSR:()=>Be,enqueueBatchedSignal:()=>Z,fieldset:()=>Ln,figcaption:()=>xt,figure:()=>yt,font:()=>xr,footer:()=>ot,form:()=>Mn,g:()=>Xn,getSlot:()=>Or,h1:()=>lt,h2:()=>dt,h3:()=>xe,h4:()=>ut,h5:()=>pt,h6:()=>ft,head:()=>Je,header:()=>rt,hr:()=>vt,html:()=>Le,i:()=>Bt,iframe:()=>sn,img:()=>en,input:()=>On,ins:()=>xn,isBatching:()=>Vr,isSSR:()=>J,kbd:()=>Kt,label:()=>Rn,lazy:()=>Pe,legend:()=>Dn,li:()=>Tt,line:()=>er,linearGradient:()=>ur,link:()=>Qn,longPress:()=>Pr,main:()=>st,map:()=>tn,mark:()=>zt,marker:()=>hr,marquee:()=>yr,mask:()=>lr,match:()=>Hr,math:()=>fn,memo:()=>eo,memoFn:()=>to,menu:()=>Wn,meta:()=>Yn,meter:()=>Hn,mount:()=>kr,nav:()=>it,noscript:()=>gn,object:()=>an,ol:()=>St,on:()=>Yr,onCleanup:()=>ao,onMount:()=>ze,onUnmount:()=>so,optgroup:()=>Bn,option:()=>Kn,output:()=>zn,p:()=>be,param:()=>cn,path:()=>tr,pattern:()=>dr,picture:()=>ln,polygon:()=>nr,polyline:()=>rr,portal:()=>dn,pre:()=>Et,progress:()=>Pn,q:()=>Pt,radialGradient:()=>pr,reactiveArray:()=>ro,rect:()=>or,ref:()=>Xr,registerComponent:()=>Ar,registerDisposer:()=>E,resolveComponent:()=>Oe,rp:()=>jt,rt:()=>qt,ruby:()=>Ft,s:()=>Ut,samp:()=>Wt,script:()=>hn,section:()=>tt,select:()=>jn,setGlobalErrorHandler:()=>Ir,show:()=>Rr,signal:()=>C,slot:()=>Vn,small:()=>It,source:()=>un,span:()=>D,stop:()=>fr,store:()=>Jr,strong:()=>Vt,style:()=>Y,sub:()=>$t,summary:()=>In,sup:()=>Gt,svg:()=>pn,symbol:()=>gr,table:()=>Sn,tagFactory:()=>s,tbody:()=>kn,td:()=>En,template:()=>$n,text:()=>ir,textarea:()=>qn,tfoot:()=>wn,th:()=>Cn,thead:()=>_n,time:()=>Qt,title:()=>et,tr:()=>Nn,track:()=>nn,trapFocus:()=>Fr,tspan:()=>sr,u:()=>Yt,ul:()=>kt,unregisterComponent:()=>Lr,untracked:()=>G,use:()=>mr,var_:()=>Zt,video:()=>rn,watch:()=>Zr,when:()=>Dr,withSSR:()=>Gr,writable:()=>io});var Fe={};Ie(Fe,{DynamicComponent:()=>Mr,ErrorBoundary:()=>uo,Fragment:()=>_r,KeepAlive:()=>Br,Loading:()=>fo,Portal:()=>Nr,SVG_NS:()=>y,Suspense:()=>je,a:()=>wt,abbr:()=>Ct,action:()=>Kr,address:()=>ct,area:()=>Jt,array:()=>no,article:()=>nt,aside:()=>at,audio:()=>Xt,autoResize:()=>qr,b:()=>_t,base:()=>Gn,batch:()=>ve,bdi:()=>Nt,bdo:()=>At,bindDynamic:()=>Ce,blockquote:()=>mt,body:()=>Xe,br:()=>Lt,button:()=>ye,canvas:()=>mn,caption:()=>yn,catchError:()=>Ur,catchErrorAsync:()=>Wr,center:()=>br,checkLeaks:()=>Ye,circle:()=>Zn,cite:()=>Mt,clickOutside:()=>zr,clipPath:()=>cr,code:()=>Ot,col:()=>vn,colgroup:()=>Tn,context:()=>co,copyOnClick:()=>jr,customElement:()=>vr,data:()=>Rt,datalist:()=>An,dd:()=>gt,deepEqual:()=>ie,deepSignal:()=>oo,defs:()=>ar,del:()=>bn,derived:()=>z,details:()=>Fn,dfn:()=>Dt,dialog:()=>Un,disableSSR:()=>Ke,dispose:()=>O,div:()=>w,dl:()=>ht,dt:()=>bt,each:()=>wr,effect:()=>oe,ellipse:()=>Jn,em:()=>Ht,embed:()=>on,enableSSR:()=>Be,enqueueBatchedSignal:()=>Z,fieldset:()=>Ln,figcaption:()=>xt,figure:()=>yt,font:()=>xr,footer:()=>ot,form:()=>Mn,g:()=>Xn,getSlot:()=>Or,h1:()=>lt,h2:()=>dt,h3:()=>xe,h4:()=>ut,h5:()=>pt,h6:()=>ft,head:()=>Je,header:()=>rt,hr:()=>vt,html:()=>Le,i:()=>Bt,iframe:()=>sn,img:()=>en,input:()=>On,ins:()=>xn,isBatching:()=>Vr,isSSR:()=>J,kbd:()=>Kt,label:()=>Rn,lazy:()=>Pe,legend:()=>Dn,li:()=>Tt,line:()=>er,linearGradient:()=>ur,link:()=>Qn,longPress:()=>Pr,main:()=>st,map:()=>tn,mark:()=>zt,marker:()=>hr,marquee:()=>yr,mask:()=>lr,match:()=>Hr,math:()=>fn,memo:()=>eo,memoFn:()=>to,menu:()=>Wn,meta:()=>Yn,meter:()=>Hn,mount:()=>kr,nav:()=>it,noscript:()=>gn,object:()=>an,ol:()=>St,on:()=>Yr,onCleanup:()=>ao,onMount:()=>ze,onUnmount:()=>so,optgroup:()=>Bn,option:()=>Kn,output:()=>zn,p:()=>be,param:()=>cn,path:()=>tr,pattern:()=>dr,picture:()=>ln,polygon:()=>nr,polyline:()=>rr,portal:()=>dn,pre:()=>Et,progress:()=>Pn,q:()=>Pt,radialGradient:()=>pr,reactiveArray:()=>ro,rect:()=>or,ref:()=>Xr,registerComponent:()=>Ar,registerDisposer:()=>E,resolveComponent:()=>Oe,rp:()=>jt,rt:()=>qt,ruby:()=>Ft,s:()=>Ut,samp:()=>Wt,script:()=>hn,section:()=>tt,select:()=>jn,setGlobalErrorHandler:()=>Ir,show:()=>Rr,signal:()=>C,slot:()=>Vn,small:()=>It,source:()=>un,span:()=>D,stop:()=>fr,store:()=>Jr,strong:()=>Vt,style:()=>Y,sub:()=>$t,summary:()=>In,sup:()=>Gt,svg:()=>pn,symbol:()=>gr,table:()=>Sn,tagFactory:()=>s,tbody:()=>kn,td:()=>En,template:()=>$n,text:()=>ir,textarea:()=>qn,tfoot:()=>wn,th:()=>Cn,thead:()=>_n,time:()=>Qt,title:()=>et,tr:()=>Nn,track:()=>nn,trapFocus:()=>Fr,tspan:()=>sr,u:()=>Yt,ul:()=>kt,unregisterComponent:()=>Lr,untracked:()=>G,use:()=>mr,var_:()=>Zt,video:()=>rn,watch:()=>Zr,when:()=>Dr,withSSR:()=>Gr,writable:()=>io});function _(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:!0}var Ve=_();function N(t,e){if(Ve&&!t)throw new Error(`[Sibu] ${e}`)}function L(t){Ve&&console.warn(`[Sibu] ${t}`)}function P(t){let e=t.replace(/[\x00-\x20\x7f-\x9f]+/g,"").trim();if(!e)return"";let r=e.toLowerCase();return r.startsWith("javascript:")||r.startsWith("data:")||r.startsWith("vbscript:")||r.startsWith("blob:")?"":e}function Ee(t){let e=t.toLowerCase().replace(/\s+/g,"");return e.includes("url(")||e.includes("expression(")||e.includes("javascript:")||e.includes("-moz-binding")?"":t}var vo=new Set(["href","src","action","formaction","cite","poster","background","srcset"]);function j(t){return vo.has(t)}var To=_(),V=new Array(32),$=32,R=-1,K=null,So=new WeakMap,q="__s",H=0,S=[],M=new Set;function te(t){try{t()}catch(e){To&&L(`Subscriber threw during notification: ${e instanceof Error?e.message:String(e)}`)}}var pe=0,fe=!1;function x(t,e){e||(e=t),$e(e),++R,R>=$&&($*=2,V.length=$),V[R]=e,K=e;try{t()}finally{R--,K=R>=0?V[R]:null}return()=>$e(e)}function ko(){pe===0&&(++R,R>=$&&($*=2,V.length=$),V[R]=null,K=null,fe=!0),pe++}function Eo(){pe--,pe===0&&(R--,K=R>=0?V[R]:null,fe=!1)}function G(t){ko();try{return t()}finally{Eo()}}function Q(t){if(!K)return;let e=K;if(e._dep===t)return;let r=e._deps;if(r){if(r.has(t))return;r.add(t)}else if(e._dep!==void 0){let o=new Set;o.add(e._dep),o.add(t),e._deps=o,e._dep=void 0}else e._dep=t;let n=t[q];n||(n=new Set,So.set(t,n),t[q]=n),n.add(K),n.size===1?t.__f=K:t.__f!==void 0&&(t.__f=void 0)}function Ge(t){let e=t[q];if(e)for(let r of e)r._c?I(r):M.has(r)||(M.add(r),S.push(r))}function Qe(){if(!(H>0)){H++;try{let t=0;for(;t<S.length;)te(S[t]),t++}finally{S.length=0,M.clear(),H--}}}function I(t){t();let e=t._sig;for(;e;){let r=e.__f;if(r){if(r._c){let i=r._sig;i._d=!0,e=i;continue}M.has(r)||(M.add(r),S.push(r));break}let n=e[q];if(!n)break;let o;for(let i of n)if(i._c){i();let a=i._sig;a&&!o?o=a:a&&I(i)}else M.has(i)||(M.add(i),S.push(i));e=o}}function me(t){let e=t.__f;if(e){if(H>0){e._c?I(e):M.has(e)||(M.add(e),S.push(e));return}H++;try{e._c?I(e):te(e);let n=0;for(;n<S.length;)te(S[n]),n++}finally{S.length=0,M.clear(),H--}return}let r=t[q];if(!(!r||r.size===0)){if(H>0){for(let n of r)n._c?I(n):M.has(n)||(M.add(n),S.push(n));return}H++;try{let n=0;for(let i of r)S[n++]=i;for(let i=0;i<n;i++)S[i]._c&&I(S[i]);for(let i=0;i<n;i++)S[i]._c||M.has(S[i])||te(S[i]);let o=n;for(;o<S.length;)te(S[o]),o++}finally{S.length=0,M.clear(),H--}}}function $e(t){let e=t,r=e._dep;if(r!==void 0){let o=r[q];o&&(o.delete(t),r.__f===t&&(r.__f=void 0)),e._dep=void 0;return}let n=e._deps;if(!(!n||n.size===0)){for(let o of n){let i=o[q];i&&(i.delete(t),o.__f===t&&(o.__f=void 0))}n.clear()}}var we=_();function ge(t,e,r){function n(){let i;try{i=r()}catch(c){we&&L(`bindAttribute: getter for "${e}" threw: ${c instanceof Error?c.message:String(c)}`);return}if(typeof i=="boolean"){e in t&&(e==="checked"||e==="disabled"||e==="selected")?t[e]=i:i?t.setAttribute(e,""):t.removeAttribute(e);return}let a=String(i);(e==="value"||e==="checked")&&e in t?t[e]=e==="checked"?!!i:a:t.setAttribute(e,j(e)?P(a):a)}return x(n)}function Ce(t,e,r){let n=null;function o(){let a;try{a=typeof e=="function"?e():e}catch(d){we&&L(`bindDynamic: name getter threw: ${d instanceof Error?d.message:String(d)}`);return}let c;try{c=typeof r=="function"?r():r}catch(d){we&&L(`bindDynamic: value getter threw: ${d instanceof Error?d.message:String(d)}`);return}if((a[0]==="o"||a[0]==="O")&&(a[1]==="n"||a[1]==="N"))return;n!==null&&n!==a&&t.removeAttribute(n);let l=String(c);(a==="value"||a==="checked")&&a in t?t[a]=a==="checked"?!!c:l:t.setAttribute(a,j(a)?P(l):l),n=a}let i=x(o);return()=>{i(),n!==null&&t.removeAttribute(n)}}var wo=_();function F(t,e){let r=[];function n(){let o;try{o=e()}catch(l){wo&&L(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}for(let l=0;l<r.length;l++){let d=r[l];d.parentNode&&d.parentNode.removeChild(d)}if(o==null||typeof o=="boolean"){r.length=0;return}let i=t.parentNode;if(!i){r.length=0;return}let a=t.nextSibling,c=0;if(Array.isArray(o)){r.length<o.length&&(r=new Array(o.length));for(let l=0;l<o.length;l++){let d=o[l];if(d==null||typeof d=="boolean")continue;let u=d instanceof Node?d:document.createTextNode(String(d));i.insertBefore(u,a),r[c++]=u}}else{r.length<1&&(r=[null]);let l=o instanceof Node?o:document.createTextNode(String(o));i.insertBefore(l,a),r[c++]=l}r.length=c}return x(n)}var he=new WeakMap,_e=_(),ne=0;function E(t,e){let r=he.get(t);r||(r=[],he.set(t,r)),r.push(e),_e&&ne++}function O(t){let e=[t],r=[];for(;e.length>0;){let n=e.pop();r.push(n);let o=n.childNodes;for(let i=0;i<o.length;i++)e.push(o[i])}for(let n=r.length-1;n>=0;n--){let o=r[n],i=he.get(o);if(i){_e&&(ne-=i.length);for(let a of i)a();he.delete(o)}}}function Ye(t=0){return _e?(t>0&&ne>t&&L(`checkLeaks: ${ne} active DOM bindings detected. Expected \u2264${t}. This may indicate a component was removed from the DOM without calling dispose().`),ne):0}var y="http://www.w3.org/2000/svg",Ze=new Map;function Co(t){let e=Ze.get(t);return e!==void 0||(e=t.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`),Ze.set(t,e)),e}function _o(t,e){if(typeof e=="function"){let n=x(()=>{t.setAttribute("style",e())});E(t,n);return}if(typeof e=="string"){t.setAttribute("style",e);return}let r=t;for(let n in e){let o=e[n],i=Co(n);if(typeof o=="function"){let a=o,c=x(()=>{r.style.setProperty(i,Ee(String(a())))});E(t,c)}else r.style.setProperty(i,Ee(String(o)))}}function No(t,e){if(typeof e=="string"){t.setAttribute("class",e);return}if(typeof e=="function"){let i=x(()=>{t.setAttribute("class",e())});E(t,i);return}let r=e,n=!1,o="";for(let i in r){let a=r[i];if(typeof a=="function"){n=!0;break}a&&(o=o?`${o} ${i}`:i)}if(n){let a=x(()=>{let c="";for(let l in r){let d=r[l];(typeof d=="function"?d():d)&&(c=c?`${c} ${l}`:l)}t.setAttribute("class",c)});E(t,a)}else t.setAttribute("class",o)}function Ne(t,e){if(typeof e=="string"){t.textContent=e;return}if(typeof e=="number"){t.textContent=String(e);return}if(!(typeof e=="boolean"||e==null)){if(typeof e=="function"){let r=document.createComment("");t.appendChild(r),E(t,F(r,e));return}if(e instanceof Node){t.appendChild(e);return}if(Array.isArray(e))for(let r=0;r<e.length;r++){let n=e[r];if(typeof n=="function"){let o=document.createComment("");t.appendChild(o),E(t,F(o,n))}else if(n instanceof Node)t.appendChild(n);else if(Array.isArray(n))for(let o=0;o<n.length;o++){let i=n[o];if(typeof i=="function"){let a=document.createComment("");t.appendChild(a),E(t,F(a,i))}else i instanceof Node?t.appendChild(i):i!=null&&typeof i!="boolean"&&t.appendChild(document.createTextNode(String(i)))}else n!=null&&typeof n!="boolean"&&t.appendChild(document.createTextNode(String(n)))}}}var s=(t,e)=>(r,n)=>{let o=e?document.createElementNS(e,t):document.createElement(t);if(r===void 0)return o;if(n===void 0&&typeof r=="string")return o.textContent=r,o;if(n!==void 0)return o.setAttribute("class",r),Ne(o,n),o;if(Array.isArray(r)||r instanceof Node)return Ne(o,r),o;let i=r,a=i.class;a!=null&&No(o,a);let c=i.id;c!=null&&(o.id=c);let l=i.nodes;l!=null&&Ne(o,l);let d=i.on;if(d)for(let m in d)o.addEventListener(m,d[m]);let u=i.style;u!=null&&_o(o,u);let f=i.ref;f&&(f.current=o);for(let m in i)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let p=i[m];if(p==null||p===!1||m[0]==="o"&&m[1]==="n")continue;if(typeof p=="function")E(o,ge(o,m,p));else if(p===!0)o.setAttribute(m,"");else{let g=String(p);o.setAttribute(m,j(m)?P(g):g)}}}return i.onElement&&typeof i.onElement=="function"&&i.onElement(o),o};var ci=s("html"),Je=s("head"),Xe=s("body"),et=s("title"),w=s("div"),D=s("span"),tt=s("section"),nt=s("article"),rt=s("header"),ot=s("footer"),it=s("nav"),st=s("main"),at=s("aside"),ct=s("address"),be=s("p"),lt=s("h1"),dt=s("h2"),xe=s("h3"),ut=s("h4"),pt=s("h5"),ft=s("h6"),mt=s("blockquote"),gt=s("dd"),ht=s("dl"),bt=s("dt"),xt=s("figcaption"),yt=s("figure"),vt=s("hr"),Tt=s("li"),St=s("ol"),kt=s("ul"),Et=s("pre"),wt=s("a"),Ct=s("abbr"),_t=s("b"),Nt=s("bdi"),At=s("bdo"),Lt=s("br"),Mt=s("cite"),Ot=s("code"),Rt=s("data"),Dt=s("dfn"),Ht=s("em"),Bt=s("i"),Kt=s("kbd"),zt=s("mark"),Pt=s("q"),jt=s("rp"),qt=s("rt"),Ft=s("ruby"),Ut=s("s"),Wt=s("samp"),It=s("small"),Vt=s("strong"),$t=s("sub"),Gt=s("sup"),Qt=s("time"),Yt=s("u"),Zt=s("var"),Jt=s("area"),Xt=s("audio"),en=s("img"),tn=s("map"),nn=s("track"),rn=s("video"),on=s("embed"),sn=s("iframe"),an=s("object"),cn=s("param"),ln=s("picture"),dn=s("portal"),un=s("source"),pn=s("svg",y),fn=s("math"),mn=s("canvas"),gn=s("noscript"),hn=s("script"),bn=s("del"),xn=s("ins"),yn=s("caption"),vn=s("col"),Tn=s("colgroup"),Sn=s("table"),kn=s("tbody"),En=s("td"),wn=s("tfoot"),Cn=s("th"),_n=s("thead"),Nn=s("tr"),ye=s("button"),An=s("datalist"),Ln=s("fieldset"),Mn=s("form"),On=s("input"),Rn=s("label"),Dn=s("legend"),Hn=s("meter"),Bn=s("optgroup"),Kn=s("option"),zn=s("output"),Pn=s("progress"),jn=s("select"),qn=s("textarea"),Fn=s("details"),Un=s("dialog"),Wn=s("menu"),In=s("summary"),Vn=s("slot"),$n=s("template"),Gn=s("base"),Qn=s("link"),Yn=s("meta"),Y=s("style"),Zn=s("circle",y),Jn=s("ellipse",y),Xn=s("g",y),er=s("line",y),tr=s("path",y),nr=s("polygon",y),rr=s("polyline",y),or=s("rect",y),ir=s("text",y),sr=s("tspan",y),ar=s("defs",y),cr=s("clipPath",y),lr=s("mask",y),dr=s("pattern",y),ur=s("linearGradient",y),pr=s("radialGradient",y),fr=s("stop",y),mr=s("use",y),gr=s("symbol",y),hr=s("marker",y),br=s("center"),xr=s("font"),yr=s("marquee"),vr=t=>s(t);var Ao=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Tr=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),Sr=new WeakMap;function Lo(t){let e=t.length-1,r=t[0];for(let p=0;p<e;p++)r+=`\0${p}\0${t[p+1]}`;let n=0,o=r.length;function i(){for(;n<o&&(r[n]===" "||r[n]===" "||r[n]===`
|
|
2
|
-
`||r[n]==="\r");)n++}function a(){if(r.charCodeAt(n)!==0)return-1;let p=n;n++;let g=0;for(;n<o&&r.charCodeAt(n)!==0;)g=g*10+(r.charCodeAt(n)-48),n++;return n<o&&n++,g<0||g>=e?(n=p,-1):g}function c(){let p=n;for(;n<o;){let g=r.charCodeAt(n);if(g>=97&&g<=122||g>=65&&g<=90||g>=48&&g<=57||g===45)n++;else break}return r.slice(p,n)}function l(){if(i(),r[n]!=="=")return{kind:"bool"};n++,i();let p=a();if(p>=0)return{kind:"expr",idx:p};let g=r[n];if(g==='"'||g==="'"){n++;let b=[],B=[],W="";for(;n<o&&r[n]!==g;){let X=a();X>=0?(b.push(W),W="",B.push(X)):W+=r[n++]}return n<o&&n++,b.push(W),B.length===0?{kind:"static",value:b[0]}:{kind:"mixed",statics:b,exprs:B}}let T=n;for(;n<o;){let b=r.charCodeAt(n);if(b===32||b===9||b===10||b===13||b===62||b===47)break;n++}return{kind:"static",value:r.slice(T,n)}}function d(){let p=[];for(;n<o&&(i(),!(r[n]===">"||r[n]==="/"));){let g=n;for(;n<o;){let b=r.charCodeAt(n);if(b>=97&&b<=122||b>=65&&b<=90||b>=48&&b<=57||b===45||b===58||b===95||b===46)n++;else break}let T=r.slice(g,n);if(!T)break;let v=l();T.startsWith("on:")?v.kind==="expr"&&p.push({t:3,name:T.slice(3),idx:v.idx}):v.kind==="bool"?p.push({t:4,name:T}):v.kind==="static"?p.push({t:0,name:T,value:v.value}):v.kind==="expr"?p.push({t:1,name:T,idx:v.idx}):v.kind==="mixed"&&p.push({t:2,name:T,statics:v.statics,exprs:v.exprs})}return p}function u(p){return p.replace(/\s+/g," ")}function f(p){let g="";for(;n<o&&r[n]!=="<";){let v=a();if(v>=0){let b=u(g);b&&p.push({t:1,value:b}),g="",p.push({t:2,idx:v})}else g+=r[n++]}let T=u(g);T&&p.push({t:1,value:T})}function m(){let p=[];for(;n<o&&!(r[n]==="<"&&n+1<o&&r[n+1]==="/");)if(r[n]==="<"){n++;let g=c(),T=d();i();let v=Ao.has(g),b=r[n]==="/";if(b&&n++,n<o&&n++,v||b)p.push({t:0,el:{tag:g,svg:Tr.has(g),attrs:T,children:[]}});else{let B=m();r[n]==="<"&&n+1<o&&r[n+1]==="/"&&(n+=2,c(),i(),n<o&&r[n]===">"&&n++),p.push({t:0,el:{tag:g,svg:Tr.has(g),attrs:T,children:B}})}}else f(p);return p}return m()}function Ae(t,e){let r=t.svg?document.createElementNS(y,t.tag):document.createElement(t.tag);for(let n=0;n<t.attrs.length;n++){let o=t.attrs[n];switch(o.t){case 0:r.setAttribute(o.name,o.value);break;case 1:{let i=o.name;if(i[0]==="o"&&i[1]==="n")break;let a=e[o.idx];if(typeof a=="function")E(r,ge(r,i,a));else if(a!=null){let c=String(a);r.setAttribute(i,j(i)?P(c):c)}break}case 2:{let i=o.statics[0];for(let a=0;a<o.exprs.length;a++)i+=String(e[o.exprs[a]])+o.statics[a+1];r.setAttribute(o.name,i);break}case 3:r.addEventListener(o.name,e[o.idx]);break;case 4:r.setAttribute(o.name,"");break}}for(let n=0;n<t.children.length;n++){let o=t.children[n];switch(o.t){case 0:r.appendChild(Ae(o.el,e));break;case 1:r.appendChild(document.createTextNode(o.value));break;case 2:{let i=e[o.idx];if(typeof i=="function"){let a=document.createComment("");r.appendChild(a),E(r,F(a,i))}else if(i instanceof Node)r.appendChild(i);else if(Array.isArray(i))for(let a=0;a<i.length;a++){let c=i[a];c instanceof Node?r.appendChild(c):c!=null&&typeof c!="boolean"&&r.appendChild(document.createTextNode(String(c)))}else i!=null&&typeof i!="boolean"&&r.appendChild(document.createTextNode(String(i)));break}}}return r}function Le(t,...e){let r=Sr.get(t);if(r||(r=Lo(t),Sr.set(t,r)),r.length===1&&r[0].t===0)return Ae(r[0].el,e);let n=document.createElement("div");for(let o=0;o<r.length;o++){let i=r[o];switch(i.t){case 0:n.appendChild(Ae(i.el,e));break;case 1:n.appendChild(document.createTextNode(i.value));break;case 2:{let a=e[i.idx];if(a instanceof Node)n.appendChild(a);else if(typeof a=="function"){let c=document.createComment("bind:htm");n.appendChild(c),E(n,F(c,a))}else if(Array.isArray(a))for(let c=0;c<a.length;c++){let l=a[c];l instanceof Node?n.appendChild(l):l!=null&&typeof l!="boolean"&&n.appendChild(document.createTextNode(String(l)))}else a!=null&&typeof a!="boolean"&&n.appendChild(document.createTextNode(String(a)));break}}}return n.childNodes.length===1&&n.firstChild instanceof Element?n.firstChild:n}function kr(t,e){if(!e)throw new Error("[Sibu] mount: container element not found. Make sure the DOM element exists before calling mount().");N(typeof t=="function"||t instanceof Node,"mount: first argument must be a component function or a DOM Node.");let r=typeof performance<"u"?performance.now():0,n=typeof t=="function"?t():t,o=typeof performance<"u"?performance.now()-r:0;e.appendChild(n);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:n,container:e,duration:o}),{node:n,unmount(){i&&i.emit("app:unmount",{rootElement:n}),O(n),n.parentNode&&n.parentNode.removeChild(n)}}}var Mo=_();function Er(t){return typeof t=="function"?Er(t()):t instanceof Node?t:document.createTextNode(String(t))}function Oo(t,e){if(e===0)return[];let r=[],n=new Array(e);for(let c=0;c<e;c++){let l=t[c],d=0,u=r.length;for(;d<u;){let f=d+u>>1;t[r[f]]<l?d=f+1:u=f}r[d]=c,n[c]=d>0?r[d-1]:-1}let o=r.length,i=new Array(o),a=r[o-1];for(let c=o-1;c>=0;c--)i[c]=a,a=n[a];return i}function wr(t,e,r){N(typeof t=="function","each: first argument must be a function that returns an array."),N(typeof e=="function","each: second argument must be a render function."),N(r&&typeof r.key=="function","each: options.key must be a function that returns a unique key per item.");let n=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],a=[],c=i,l=0,d=new Map,u=new Map,f=[],m=[],p=new Uint8Array(0),g=new Map,T=[],v=[],b=!1,B=!1,W=r.key,X=()=>{let Te=t(),k=Te.length,ae=n.parentNode;if(!ae)return;B||(ae.insertBefore(o,n.nextSibling),B=!0),m.length<k&&(m=new Array(k));for(let h=0;h<k;h++)m[h]=W(Te[h]);let ce=m;f.length<k&&(f=new Array(k)),u.clear();for(let h=0;h<k;h++){let A=ce[h],We=d.get(A),ee;if(We!==void 0)ee=We;else try{ee=Er(e(Te[h],h))}catch(Se){Mo&&L(`each: render threw for item at index ${h} (key="${ce[h]}"): ${Se instanceof Error?Se.message:String(Se)}`),ee=document.createComment(`each:error:${h}`)}u.set(A,ee),f[h]=ee}for(let[h,A]of d)u.has(h)||(O(A),A.parentNode&&ae.removeChild(A));if(k===0){l=0;let h=d;d=u,u=h;return}g.clear();for(let h=0;h<l;h++)g.set(c[h],h);T.length<k&&(T=new Array(k),v=new Array(k));let le=0;for(let h=0;h<k;h++){let A=g.get(ce[h]);A!==void 0&&(T[le]=h,v[le]=A,le++)}let Ue=Oo(v,le);p.length<k?p=new Uint8Array(k):p.fill(0,0,k);for(let h=0;h<Ue.length;h++)p[T[Ue[h]]]=1;let de=o;for(let h=k-1;h>=0;h--){let A=f[h];p[h]||A.nextSibling!==de&&ae.insertBefore(A,de),de=A}let ue=c===i?a:i;ue.length<k&&(ue.length=k);for(let h=0;h<k;h++)ue[h]=ce[h];c=ue,l=k;let mo=d;d=u,u=mo,b=!0};return x(X),b||queueMicrotask(()=>{!b&&n.parentNode&&X()}),n}function _r(t){let e=document.createDocumentFragment();for(let r of t)if(!(r==null||typeof r=="boolean"))if(Array.isArray(r))for(let n of r)n==null||typeof n=="boolean"||e.appendChild(Cr(n));else e.appendChild(Cr(r));return e}function Cr(t){if(t==null)return document.createTextNode("");if(t instanceof Node)return t;if(typeof t=="function"){let e=t();return e instanceof Node?e:document.createTextNode(String(e??""))}return document.createTextNode(String(t))}function Nr(t,e){let r=document.createComment("portal"),n=e||document.body,o=null;queueMicrotask(()=>{try{o=t(),n.appendChild(o)}catch(a){console.error("[Portal] Render error:",a)}});let i=new MutationObserver(()=>{!r.isConnected&&o&&(o.remove(),o=null,i.disconnect())});return queueMicrotask(()=>{r.parentNode&&i.observe(r.parentNode,{childList:!0})}),r}var Me=new Map;function Ar(t,e){Me.set(t,e)}function Lr(t){Me.delete(t)}function Oe(t){let e=Me.get(t);return e?e():w({nodes:`[Component "${t}" not found]`})}function Mr(t){let e=w({class:"sibu-dynamic"});function r(){let n=t(),o;typeof n=="function"?o=n():o=Oe(n);for(let i of Array.from(e.childNodes))O(i);e.replaceChildren(o)}return x(r),e}function Or(t,e="default"){return t?.[e]}function Rr(t,e){return x(()=>{e.style.display=t()?"":"none"}),e}function Dr(t,e,r){let n=document.createComment("when"),o=null,i,a=!1,c=()=>{let l=t(),d=n.parentNode;if(!d||a&&l===i)return;i=l,o?.parentNode&&(O(o),o.parentNode.removeChild(o),o=null);let u=l?e():r?r():null;if(u!=null){let f=u instanceof Node?u:document.createTextNode(String(u));d.insertBefore(f,n.nextSibling),o=f}a=!0};return x(c),a||queueMicrotask(()=>{!a&&n.parentNode&&c()}),n}function Hr(t,e,r){let n=document.createComment("match"),o=null,i,a=!1,c=()=>{let l=String(t()),d=n.parentNode;if(!d||a&&l===i)return;i=l,o?.parentNode&&(O(o),o.parentNode.removeChild(o),o=null);let u=e[l]||r;if(u){let f=u();if(f!=null){let m=f instanceof Node?f:document.createTextNode(String(f));d.insertBefore(m,n.nextSibling),o=m}}a=!0};return x(c),a||queueMicrotask(()=>{!a&&n.parentNode&&c()}),n}function Br(t,e,r){let n=document.createComment("keep-alive"),o=new Map,i=[],a=r?.max??0,c,l=null,d=!1,u=()=>{let f=t(),m=n.parentNode;if(!m||d&&f===c)return;l?.parentNode&&m.removeChild(l),c=f;let p=o.get(f);if(p){let g=i.indexOf(f);g!==-1&&(i.splice(g,1),i.push(f))}else{let g=e[f];if(!g){l=null,d=!0;return}if(p=g(),o.set(f,p),i.push(f),a>0&&i.length>a){let T=i.shift(),v=o.get(T);v&&(O(v),v.parentNode&&v.parentNode.removeChild(v),o.delete(T))}}m.insertBefore(p,n.nextSibling),l=p,d=!0};return x(u),d||queueMicrotask(()=>{!d&&n.parentNode&&u()}),n}function Kr(t,e,r){let n=e(t,r);typeof n=="function"&&E(t,n)}var zr=(t,e)=>{let r=n=>{t.contains(n.target)||e()};return document.addEventListener("pointerdown",r,!0),()=>document.removeEventListener("pointerdown",r,!0)},Pr=(t,e)=>{let r=e.duration??500,n=null,o=()=>{n=setTimeout(()=>{e.callback(),n=null},r)},i=()=>{n!==null&&(clearTimeout(n),n=null)};return t.addEventListener("pointerdown",o),t.addEventListener("pointerup",i),t.addEventListener("pointerleave",i),()=>{i(),t.removeEventListener("pointerdown",o),t.removeEventListener("pointerup",i),t.removeEventListener("pointerleave",i)}},jr=(t,e)=>{let r=()=>{let n=typeof e=="function"?e():t.textContent??"";navigator.clipboard.writeText(n)};return t.addEventListener("click",r),()=>t.removeEventListener("click",r)},qr=t=>{let e=()=>{t.style.overflow="hidden",t.style.height="auto",t.style.height=`${t.scrollHeight}px`};return e(),t.addEventListener("input",e),()=>t.removeEventListener("input",e)},Fr=t=>{let e='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',r=n=>{if(n.key!=="Tab")return;let o=Array.from(t.querySelectorAll(e));if(o.length===0)return;let i=o[0],a=o[o.length-1];n.shiftKey&&document.activeElement===i?(n.preventDefault(),a.focus()):!n.shiftKey&&document.activeElement===a&&(n.preventDefault(),i.focus())};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)};var U=null;function Ur(t,e){try{let r=t();return r&&typeof r.then=="function"&&r.catch(n=>{e?e(n,"async"):U?U(n,"async"):console.error("Unhandled async error in Sibu.catchError:",n)}),r}catch(r){return e?e(r,"sync"):U?U(r,"sync"):console.error("Unhandled error in Sibu.catchError:",r),null}}async function Wr(t,e){try{return await t()}catch(r){return e?e(r,"async"):U?U(r,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",r),null}}function Ir(t){U=t}var re=0,Re=new Set;function ve(t){re++;try{return t()}finally{re--,re===0&&Ro()}}function Z(t){return re===0?!1:(Re.add(t),!0)}function Vr(){return re>0}function Ro(){for(let t of Re)Ge(t);Re.clear(),Qe()}var $r=globalThis,De=_();function C(t,e){let r={value:t},n=De?e?.name:void 0,o=e?.equals;n&&(r.__name=n);function i(){return Q(r),r.value}i.__signal=r,n&&(i.__name=n);function a(c){let l=typeof c=="function"?c(r.value):c;if(!(o?o(r.value,l):Object.is(l,r.value))){if(De){let d=r.value;r.value=l;let u=$r.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&u.emit("signal:update",{signal:r,name:n,oldValue:d,newValue:l})}else r.value=l;Z(r)||me(r)}}if(De){let c=$r.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&c.emit("signal:create",{signal:r,name:n,getter:i,initial:t})}return[i,a]}var He=!1;function J(){return He}function Be(){He=!0}function Ke(){He=!1}function Gr(t){Be();try{return t()}finally{Ke()}}var Qr=globalThis;function Yr(t,e){let r,n=!0;return()=>{let o=t();if(n)n=!1,r=o,G(()=>e(o,void 0));else{let i=r;r=o,G(()=>e(o,i))}}}function oe(t,e){if(N(typeof t=="function","effect: argument must be a function."),J())return()=>{};let r=e?.onError,n=r?()=>{try{t()}catch(c){r(c)}}:t,o=()=>{},i=()=>{o(),o=x(n,i)};o=x(n,i);let a=Qr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return a&&a.emit("effect:create",{effectFn:t}),()=>{let c=Qr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&c.emit("effect:destroy",{effectFn:t}),o()}}function z(t,e){N(typeof t=="function","derived: argument must be a getter function.");let r=e?.name,n={};n._d=!1,n._g=t;let o=()=>{n._d||(n._d=!0)};o._c=1,o._sig=n,x(()=>{n._d=!1,n._v=t()},o);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;function a(){if(fe)return n._d&&(n._d=!1,n._v=t()),n._v;if(Q(n),n._d){let c=n._v;x(()=>{n._d=!1,n._v=t()},o),i&&c!==n._v&&i.emit("computed:update",{signal:n,oldValue:c,newValue:n._v})}return n._v}return r&&(a.__name=r,n.__name=r),a.__signal=n,i&&i.emit("computed:create",{signal:n,name:r,getter:a}),a}function Zr(t,e){if(N(typeof t=="function","watch: first argument must be a getter function."),N(typeof e=="function","watch: second argument must be a callback function."),J())return()=>{};let r,n=!0;return x(()=>{let a=t();if(n){r=a,n=!1;return}Object.is(a,r)||(e(a,r),r=a)})}function Jr(t){N(t!==null&&typeof t=="object"&&!Array.isArray(t),"store: argument must be a plain object. For arrays, use array() instead.");let e={};Object.keys(t).forEach(l=>{let[d,u]=C(t[l]);e[l]=[d,u]});let r=new Proxy({},{get(l,d){if(d in e){let u=e[d][0];return u()}},set(){throw new Error("[Sibu] store: Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),n=()=>{let l={};return Object.keys(e).forEach(d=>{l[d]=e[d][0]()}),l};return[r,{setState:l=>{let d=n(),u=typeof l=="function"?l(d):l;Object.entries(u).forEach(([f,m])=>{f in e&&e[f][1](m)})},reset:()=>{Object.keys(t).forEach(l=>{let d=e[l][1];d(t[l])})},subscribe:l=>{let d=!0;return oe(()=>{let u=n();if(d){d=!1;return}l(u)})},subscribeKey:(l,d)=>{let u,f=!0;return oe(()=>{let m=e[l][0]();if(f){u=m,f=!1;return}if(!Object.is(m,u)){let p=u;u=m,d(m,p)}})},getSnapshot:n}]}function Xr(t){let[e,r]=C(t);return{get current(){return e()},set current(n){r(n)}}}function eo(t){return z(t)}function to(t){return z(t)}function no(t=[]){let[e,r]=C([...t]);return[e,{push(...o){r(i=>[...i,...o])},pop(){let o;return r(i=>{let a=[...i];return o=a.pop(),a}),o},shift(){let o;return r(i=>{let a=[...i];return o=a.shift(),a}),o},unshift(...o){r(i=>[...o,...i])},splice(o,i=0,...a){let c=[];return r(l=>{let d=[...l];return c=d.splice(o,i,...a),d}),c},remove(o){r(i=>i.filter((a,c)=>c!==o))},removeWhere(o){r(i=>{let a=i.findIndex(o);return a===-1?i:i.filter((c,l)=>l!==a)})},set(o){r([...o])},update(o,i){r(a=>a.map((c,l)=>l===o?i:c))},updateWhere(o,i){r(a=>a.map(c=>o(c)?i(c):c))},sort(o){r(i=>[...i].sort(o))},reverse(){r(o=>[...o].reverse())},filter(o){r(i=>i.filter(o))},map(o){r(i=>i.map(o))},clear(){r([])}}]}function ro(t=[]){let e=[...t],r=null,n={};function o(){r=null,Z(n)||me(n)}function i(){return Q(n),r===null&&(r=Object.freeze([...e])),r}return[i,{push(...c){c.length!==0&&(e.push(...c),o())},pop(){if(e.length===0)return;let c=e.pop();return o(),c},shift(){if(e.length===0)return;let c=e.shift();return o(),c},unshift(...c){c.length!==0&&(e.unshift(...c),o())},splice(c,l=0,...d){let u=e.splice(c,l,...d);return(u.length>0||d.length>0)&&o(),u},remove(c){c<0||c>=e.length||(e.splice(c,1),o())},removeWhere(c){let l=e.findIndex(c);l!==-1&&(e.splice(l,1),o())},set(c){e=[...c],o()},update(c,l){c<0||c>=e.length||Object.is(e[c],l)||(e[c]=l,o())},updateWhere(c,l){let d=!1;for(let u=0;u<e.length;u++)if(c(e[u])){let f=l(e[u]);Object.is(e[u],f)||(e[u]=f,d=!0)}d&&o()},sort(c){e.length<=1||(e.sort(c),o())},reverse(){e.length<=1||(e.reverse(),o())},filter(c){let l=e.filter(c);l.length!==e.length&&(e=l,o())},map(c){let l=!1;for(let d=0;d<e.length;d++){let u=c(e[d],d);Object.is(e[d],u)||(e[d]=u,l=!0)}l&&o()},clear(){e.length!==0&&(e=[],o())}}]}function ie(t,e,r){if(Object.is(t,e))return!0;if(t==null||e==null||typeof t!=typeof e||typeof t!="object")return!1;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(t instanceof RegExp&&e instanceof RegExp)return t.toString()===e.toString();if(r||(r=new Set),r.has(t))return!0;if(r.add(t),Array.isArray(t))return!Array.isArray(e)||t.length!==e.length?!1:t.every((i,a)=>ie(i,e[a],r));let n=Object.keys(t),o=Object.keys(e);return n.length!==o.length?!1:n.every(i=>ie(t[i],e[i],r))}function oo(t){return C(t,{equals:(e,r)=>ie(e,r)})}function io(t,e,r){return[z(t,r),i=>{ve(()=>e(i))}]}function se(t,e){try{t()}catch(r){L(`${e}: callback threw: ${r instanceof Error?r.message:String(r)}`)}}function ze(t,e){if(!(typeof document>"u"))if(e){if(e.isConnected){queueMicrotask(()=>{se(t,"onMount")});return}let r=new MutationObserver(()=>{e.isConnected&&(r.disconnect(),se(t,"onMount"))});queueMicrotask(()=>{e.isConnected?se(t,"onMount"):r.observe(document.body,{childList:!0,subtree:!0})})}else queueMicrotask(()=>{se(t,"onMount")})}function so(t,e){let r=()=>{let n=new MutationObserver(()=>{e.isConnected||(n.disconnect(),se(t,"onUnmount"))});n.observe(document.body,{childList:!0,subtree:!0})};e.isConnected?r():ze(()=>{r()},e)}function ao(t,e){E(e,t)}function co(t){let[e,r]=C(t);return{provide(n){r(n)},use(){return e},get(){return e()},set(n){r(n)}}}function Pe(t){let e=null;return function(){if(e)return e();let[n,o]=C("loading"),[i,a]=C(null),c=w({class:"sibu-lazy"});return t().then(l=>{e=l.default;let d=e();c.replaceChildren(d),o("loaded")}).catch(l=>{let d=l instanceof Error?l:new Error(String(l));a(d),o("error"),c.replaceChildren(w({class:"sibu-lazy-error",nodes:`Failed to load component: ${d.message}`}))}),c.appendChild(D({class:"sibu-lazy-loading",nodes:"Loading..."})),c}}function je({nodes:t,fallback:e}){let r=w({class:"sibu-suspense"}),n=e();return r.appendChild(n),queueMicrotask(()=>{try{let o=t();if(o.classList.contains("sibu-lazy")){let i=new MutationObserver(()=>{o.querySelector(".sibu-lazy-loading")||(i.disconnect(),r.replaceChildren(o))});i.observe(o,{childList:!0,subtree:!0}),o.querySelector(".sibu-lazy-loading")||r.replaceChildren(o)}else r.replaceChildren(o)}catch{}}),r}var Do=_(),Ho=`
|
|
1
|
+
"use strict";var Sibu=(()=>{var Ee=Object.defineProperty;var go=Object.getOwnPropertyDescriptor;var bo=Object.getOwnPropertyNames;var ho=Object.prototype.hasOwnProperty;var Ie=(t,e)=>{for(var r in e)Ee(t,r,{get:e[r],enumerable:!0})},xo=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of bo(e))!ho.call(t,o)&&o!==r&&Ee(t,o,{get:()=>e[o],enumerable:!(n=go(e,o))||n.enumerable});return t};var yo=t=>xo(Ee({},"__esModule",{value:!0}),t);var jo={};Ie(jo,{DynamicComponent:()=>Mr,ErrorBoundary:()=>uo,Fragment:()=>_r,KeepAlive:()=>Br,Loading:()=>fo,Portal:()=>Nr,SVG_NS:()=>k,Suspense:()=>je,a:()=>wt,abbr:()=>Ct,action:()=>zr,address:()=>lt,area:()=>Xt,array:()=>no,article:()=>rt,aside:()=>ct,audio:()=>Yt,autoResize:()=>jr,b:()=>_t,base:()=>Gn,batch:()=>Te,bdi:()=>Nt,bdo:()=>At,bindDynamic:()=>_e,blockquote:()=>gt,body:()=>et,br:()=>Lt,button:()=>K,canvas:()=>mn,caption:()=>yn,catchError:()=>qr,catchErrorAsync:()=>$r,center:()=>hr,checkLeaks:()=>Je,circle:()=>Jn,cite:()=>Mt,clickOutside:()=>Kr,clipPath:()=>cr,code:()=>Ot,col:()=>vn,colgroup:()=>Tn,context:()=>co,copyOnClick:()=>Pr,customElement:()=>vr,data:()=>Rt,datalist:()=>An,dd:()=>bt,deepEqual:()=>ce,deepSignal:()=>oo,defs:()=>ar,del:()=>hn,derived:()=>F,details:()=>Wn,dfn:()=>Ht,dialog:()=>qn,disableSSR:()=>Ke,dispose:()=>R,div:()=>x,dl:()=>ht,dt:()=>xt,each:()=>wr,effect:()=>ae,ellipse:()=>Xn,em:()=>Dt,embed:()=>on,enableSSR:()=>ze,enqueueBatchedSignal:()=>X,fieldset:()=>Ln,figcaption:()=>yt,figure:()=>vt,font:()=>xr,footer:()=>it,form:()=>Mn,g:()=>Yn,getSlot:()=>Or,h1:()=>ut,h2:()=>dt,h3:()=>ie,h4:()=>pt,h5:()=>ft,h6:()=>mt,head:()=>Ye,header:()=>ot,hr:()=>Tt,html:()=>Me,i:()=>Bt,iframe:()=>sn,img:()=>en,input:()=>On,ins:()=>xn,isBatching:()=>Ir,isSSR:()=>Y,kbd:()=>zt,label:()=>Rn,lazy:()=>Pe,legend:()=>Hn,li:()=>kt,line:()=>er,linearGradient:()=>dr,link:()=>Qn,longPress:()=>Fr,main:()=>at,map:()=>tn,mark:()=>Kt,marker:()=>br,marquee:()=>yr,mask:()=>lr,match:()=>Dr,math:()=>fn,memo:()=>eo,memoFn:()=>to,menu:()=>$n,meta:()=>Zn,meter:()=>Dn,mount:()=>Sr,nav:()=>st,noscript:()=>gn,object:()=>an,ol:()=>St,on:()=>Zr,onCleanup:()=>ao,onMount:()=>Fe,onUnmount:()=>so,optgroup:()=>Bn,option:()=>zn,output:()=>Kn,p:()=>oe,param:()=>cn,path:()=>tr,pattern:()=>ur,picture:()=>ln,polygon:()=>nr,polyline:()=>rr,portal:()=>un,pre:()=>ve,progress:()=>Fn,q:()=>Ft,radialGradient:()=>pr,reactiveArray:()=>ro,rect:()=>or,ref:()=>Yr,registerComponent:()=>Ar,registerDisposer:()=>w,resolveComponent:()=>Re,rp:()=>Pt,rt:()=>jt,ruby:()=>Wt,s:()=>qt,samp:()=>$t,script:()=>bn,section:()=>nt,select:()=>Pn,setGlobalErrorHandler:()=>Ur,show:()=>Rr,signal:()=>_,slot:()=>In,small:()=>Ut,source:()=>dn,span:()=>C,stop:()=>fr,store:()=>Xr,strong:()=>It,style:()=>J,sub:()=>Vt,summary:()=>Un,sup:()=>Gt,svg:()=>pn,symbol:()=>gr,table:()=>kn,tagFactory:()=>a,tbody:()=>Sn,td:()=>En,template:()=>Vn,text:()=>ir,textarea:()=>jn,tfoot:()=>wn,th:()=>Cn,thead:()=>_n,time:()=>Qt,title:()=>tt,tr:()=>Nn,track:()=>nn,trapFocus:()=>Wr,tspan:()=>sr,u:()=>Zt,ul:()=>Et,unregisterComponent:()=>Lr,untracked:()=>Q,use:()=>mr,var_:()=>Jt,video:()=>rn,watch:()=>Jr,when:()=>Hr,withSSR:()=>Gr,writable:()=>io});var qe={};Ie(qe,{DynamicComponent:()=>Mr,ErrorBoundary:()=>uo,Fragment:()=>_r,KeepAlive:()=>Br,Loading:()=>fo,Portal:()=>Nr,SVG_NS:()=>k,Suspense:()=>je,a:()=>wt,abbr:()=>Ct,action:()=>zr,address:()=>lt,area:()=>Xt,array:()=>no,article:()=>rt,aside:()=>ct,audio:()=>Yt,autoResize:()=>jr,b:()=>_t,base:()=>Gn,batch:()=>Te,bdi:()=>Nt,bdo:()=>At,bindDynamic:()=>_e,blockquote:()=>gt,body:()=>et,br:()=>Lt,button:()=>K,canvas:()=>mn,caption:()=>yn,catchError:()=>qr,catchErrorAsync:()=>$r,center:()=>hr,checkLeaks:()=>Je,circle:()=>Jn,cite:()=>Mt,clickOutside:()=>Kr,clipPath:()=>cr,code:()=>Ot,col:()=>vn,colgroup:()=>Tn,context:()=>co,copyOnClick:()=>Pr,customElement:()=>vr,data:()=>Rt,datalist:()=>An,dd:()=>bt,deepEqual:()=>ce,deepSignal:()=>oo,defs:()=>ar,del:()=>hn,derived:()=>F,details:()=>Wn,dfn:()=>Ht,dialog:()=>qn,disableSSR:()=>Ke,dispose:()=>R,div:()=>x,dl:()=>ht,dt:()=>xt,each:()=>wr,effect:()=>ae,ellipse:()=>Xn,em:()=>Dt,embed:()=>on,enableSSR:()=>ze,enqueueBatchedSignal:()=>X,fieldset:()=>Ln,figcaption:()=>yt,figure:()=>vt,font:()=>xr,footer:()=>it,form:()=>Mn,g:()=>Yn,getSlot:()=>Or,h1:()=>ut,h2:()=>dt,h3:()=>ie,h4:()=>pt,h5:()=>ft,h6:()=>mt,head:()=>Ye,header:()=>ot,hr:()=>Tt,html:()=>Me,i:()=>Bt,iframe:()=>sn,img:()=>en,input:()=>On,ins:()=>xn,isBatching:()=>Ir,isSSR:()=>Y,kbd:()=>zt,label:()=>Rn,lazy:()=>Pe,legend:()=>Hn,li:()=>kt,line:()=>er,linearGradient:()=>dr,link:()=>Qn,longPress:()=>Fr,main:()=>at,map:()=>tn,mark:()=>Kt,marker:()=>br,marquee:()=>yr,mask:()=>lr,match:()=>Dr,math:()=>fn,memo:()=>eo,memoFn:()=>to,menu:()=>$n,meta:()=>Zn,meter:()=>Dn,mount:()=>Sr,nav:()=>st,noscript:()=>gn,object:()=>an,ol:()=>St,on:()=>Zr,onCleanup:()=>ao,onMount:()=>Fe,onUnmount:()=>so,optgroup:()=>Bn,option:()=>zn,output:()=>Kn,p:()=>oe,param:()=>cn,path:()=>tr,pattern:()=>ur,picture:()=>ln,polygon:()=>nr,polyline:()=>rr,portal:()=>un,pre:()=>ve,progress:()=>Fn,q:()=>Ft,radialGradient:()=>pr,reactiveArray:()=>ro,rect:()=>or,ref:()=>Yr,registerComponent:()=>Ar,registerDisposer:()=>w,resolveComponent:()=>Re,rp:()=>Pt,rt:()=>jt,ruby:()=>Wt,s:()=>qt,samp:()=>$t,script:()=>bn,section:()=>nt,select:()=>Pn,setGlobalErrorHandler:()=>Ur,show:()=>Rr,signal:()=>_,slot:()=>In,small:()=>Ut,source:()=>dn,span:()=>C,stop:()=>fr,store:()=>Xr,strong:()=>It,style:()=>J,sub:()=>Vt,summary:()=>Un,sup:()=>Gt,svg:()=>pn,symbol:()=>gr,table:()=>kn,tagFactory:()=>a,tbody:()=>Sn,td:()=>En,template:()=>Vn,text:()=>ir,textarea:()=>jn,tfoot:()=>wn,th:()=>Cn,thead:()=>_n,time:()=>Qt,title:()=>tt,tr:()=>Nn,track:()=>nn,trapFocus:()=>Wr,tspan:()=>sr,u:()=>Zt,ul:()=>Et,unregisterComponent:()=>Lr,untracked:()=>Q,use:()=>mr,var_:()=>Jt,video:()=>rn,watch:()=>Jr,when:()=>Hr,withSSR:()=>Gr,writable:()=>io});function N(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:!0}var Ve=N();function A(t,e){if(Ve&&!t)throw new Error(`[Sibu] ${e}`)}function M(t){Ve&&console.warn(`[Sibu] ${t}`)}function P(t){let e=t.replace(/[\x00-\x20\x7f-\x9f]+/g,"").trim();if(!e)return"";let r=e.toLowerCase();return r.startsWith("javascript:")||r.startsWith("data:")||r.startsWith("vbscript:")||r.startsWith("blob:")?"":e}function we(t){let e=t.toLowerCase().replace(/\s+/g,"");return e.includes("url(")||e.includes("expression(")||e.includes("javascript:")||e.includes("-moz-binding")?"":t}var vo=new Set(["href","src","action","formaction","cite","poster","background","srcset"]);function j(t){return vo.has(t)}var To=N(),V=new Array(32),G=32,H=-1,z=null,ko=new WeakMap,W="__s",B=0,S=[],O=new Set;function ne(t){try{t()}catch(e){To&&M(`Subscriber threw during notification: ${e instanceof Error?e.message:String(e)}`)}}var ge=0,be=!1;function v(t,e){e||(e=t),Ge(e),++H,H>=G&&(G*=2,V.length=G),V[H]=e,z=e;try{t()}finally{H--,z=H>=0?V[H]:null}return()=>Ge(e)}function So(){ge===0&&(++H,H>=G&&(G*=2,V.length=G),V[H]=null,z=null,be=!0),ge++}function Eo(){ge--,ge===0&&(H--,z=H>=0?V[H]:null,be=!1)}function Q(t){So();try{return t()}finally{Eo()}}function Z(t){if(!z)return;let e=z;if(e._dep===t)return;let r=e._deps;if(r){if(r.has(t))return;r.add(t)}else if(e._dep!==void 0){let o=new Set;o.add(e._dep),o.add(t),e._deps=o,e._dep=void 0}else e._dep=t;let n=t[W];n||(n=new Set,ko.set(t,n),t[W]=n),n.add(z),n.size===1?t.__f=z:t.__f!==void 0&&(t.__f=void 0)}function Qe(t){let e=t[W];if(e)for(let r of e)r._c?I(r):O.has(r)||(O.add(r),S.push(r))}function Ze(){if(!(B>0)){B++;try{let t=0;for(;t<S.length;)ne(S[t]),t++}finally{S.length=0,O.clear(),B--}}}function I(t){t();let e=t._sig;for(;e;){let r=e.__f;if(r){if(r._c){let i=r._sig;i._d=!0,e=i;continue}O.has(r)||(O.add(r),S.push(r));break}let n=e[W];if(!n)break;let o;for(let i of n)if(i._c){i();let s=i._sig;s&&!o?o=s:s&&I(i)}else O.has(i)||(O.add(i),S.push(i));e=o}}function he(t){let e=t.__f;if(e){if(B>0){e._c?I(e):O.has(e)||(O.add(e),S.push(e));return}B++;try{e._c?I(e):ne(e);let n=0;for(;n<S.length;)ne(S[n]),n++}finally{S.length=0,O.clear(),B--}return}let r=t[W];if(!(!r||r.size===0)){if(B>0){for(let n of r)n._c?I(n):O.has(n)||(O.add(n),S.push(n));return}B++;try{let n=0;for(let i of r)S[n++]=i;for(let i=0;i<n;i++)S[i]._c&&I(S[i]);for(let i=0;i<n;i++)S[i]._c||O.has(S[i])||ne(S[i]);let o=n;for(;o<S.length;)ne(S[o]),o++}finally{S.length=0,O.clear(),B--}}}function Ge(t){let e=t,r=e._dep;if(r!==void 0){let o=r[W];o&&(o.delete(t),r.__f===t&&(r.__f=void 0)),e._dep=void 0;return}let n=e._deps;if(!(!n||n.size===0)){for(let o of n){let i=o[W];i&&(i.delete(t),o.__f===t&&(o.__f=void 0))}n.clear()}}var Ce=N();function xe(t,e,r){function n(){let i;try{i=r()}catch(c){Ce&&M(`bindAttribute: getter for "${e}" threw: ${c instanceof Error?c.message:String(c)}`);return}if(typeof i=="boolean"){e in t&&(e==="checked"||e==="disabled"||e==="selected")?t[e]=i:i?t.setAttribute(e,""):t.removeAttribute(e);return}let s=String(i);(e==="value"||e==="checked")&&e in t?t[e]=e==="checked"?!!i:s:t.setAttribute(e,j(e)?P(s):s)}return v(n)}function _e(t,e,r){let n=null;function o(){let s;try{s=typeof e=="function"?e():e}catch(u){Ce&&M(`bindDynamic: name getter threw: ${u instanceof Error?u.message:String(u)}`);return}let c;try{c=typeof r=="function"?r():r}catch(u){Ce&&M(`bindDynamic: value getter threw: ${u instanceof Error?u.message:String(u)}`);return}if((s[0]==="o"||s[0]==="O")&&(s[1]==="n"||s[1]==="N"))return;n!==null&&n!==s&&t.removeAttribute(n);let l=String(c);(s==="value"||s==="checked")&&s in t?t[s]=s==="checked"?!!c:l:t.setAttribute(s,j(s)?P(l):l),n=s}let i=v(o);return()=>{i(),n!==null&&t.removeAttribute(n)}}var wo=N();function q(t,e){let r=[];function n(){let o;try{o=e()}catch(l){wo&&M(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}for(let l=0;l<r.length;l++){let u=r[l];u.parentNode&&u.parentNode.removeChild(u)}if(o==null||typeof o=="boolean"){r.length=0;return}let i=t.parentNode;if(!i){r.length=0;return}let s=t.nextSibling,c=0;if(Array.isArray(o)){r.length<o.length&&(r=new Array(o.length));for(let l=0;l<o.length;l++){let u=o[l];if(u==null||typeof u=="boolean")continue;let d=u instanceof Node?u:document.createTextNode(String(u));i.insertBefore(d,s),r[c++]=d}}else{r.length<1&&(r=[null]);let l=o instanceof Node?o:document.createTextNode(String(o));i.insertBefore(l,s),r[c++]=l}r.length=c}return v(n)}var ye=new WeakMap,Ne=N(),re=0;function w(t,e){let r=ye.get(t);r||(r=[],ye.set(t,r)),r.push(e),Ne&&re++}function R(t){let e=[t],r=[];for(;e.length>0;){let n=e.pop();r.push(n);let o=n.childNodes;for(let i=0;i<o.length;i++)e.push(o[i])}for(let n=r.length-1;n>=0;n--){let o=r[n],i=ye.get(o);if(i){Ne&&(re-=i.length);for(let s of i)s();ye.delete(o)}}}function Je(t=0){return Ne?(t>0&&re>t&&M(`checkLeaks: ${re} active DOM bindings detected. Expected \u2264${t}. This may indicate a component was removed from the DOM without calling dispose().`),re):0}var k="http://www.w3.org/2000/svg",Xe=new Map;function Co(t){let e=Xe.get(t);return e!==void 0||(e=t.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`),Xe.set(t,e)),e}function _o(t,e){if(typeof e=="function"){let n=v(()=>{t.setAttribute("style",e())});w(t,n);return}if(typeof e=="string"){t.setAttribute("style",e);return}let r=t;for(let n in e){let o=e[n],i=Co(n);if(typeof o=="function"){let s=o,c=v(()=>{r.style.setProperty(i,we(String(s())))});w(t,c)}else r.style.setProperty(i,we(String(o)))}}function No(t,e){if(typeof e=="string"){t.setAttribute("class",e);return}if(typeof e=="function"){let i=v(()=>{t.setAttribute("class",e())});w(t,i);return}let r=e,n=!1,o="";for(let i in r){let s=r[i];if(typeof s=="function"){n=!0;break}s&&(o=o?`${o} ${i}`:i)}if(n){let s=v(()=>{let c="";for(let l in r){let u=r[l];(typeof u=="function"?u():u)&&(c=c?`${c} ${l}`:l)}t.setAttribute("class",c)});w(t,s)}else t.setAttribute("class",o)}function Ae(t,e){if(typeof e=="string"){t.textContent=e;return}if(typeof e=="number"){t.textContent=String(e);return}if(!(typeof e=="boolean"||e==null)){if(typeof e=="function"){let r=document.createComment("");t.appendChild(r),w(t,q(r,e));return}if(e instanceof Node){t.appendChild(e);return}if(Array.isArray(e))for(let r=0;r<e.length;r++){let n=e[r];if(typeof n=="function"){let o=document.createComment("");t.appendChild(o),w(t,q(o,n))}else if(n instanceof Node)t.appendChild(n);else if(Array.isArray(n))for(let o=0;o<n.length;o++){let i=n[o];if(typeof i=="function"){let s=document.createComment("");t.appendChild(s),w(t,q(s,i))}else i instanceof Node?t.appendChild(i):i!=null&&typeof i!="boolean"&&t.appendChild(document.createTextNode(String(i)))}else n!=null&&typeof n!="boolean"&&t.appendChild(document.createTextNode(String(n)))}}}var a=(t,e)=>(r,n)=>{let o=e?document.createElementNS(e,t):document.createElement(t);if(r===void 0)return o;if(n===void 0&&typeof r=="string")return o.textContent=r,o;if(n!==void 0)return o.setAttribute("class",r),Ae(o,n),o;if(Array.isArray(r)||r instanceof Node)return Ae(o,r),o;let i=r,s=i.class;s!=null&&No(o,s);let c=i.id;c!=null&&(o.id=c);let l=i.nodes;l!=null&&Ae(o,l);let u=i.on;if(u)for(let m in u)o.addEventListener(m,u[m]);let d=i.style;d!=null&&_o(o,d);let f=i.ref;f&&(f.current=o);for(let m in i)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let p=i[m];if(p==null||p===!1||m[0]==="o"&&m[1]==="n")continue;if(typeof p=="function")w(o,xe(o,m,p));else if(p===!0)o.setAttribute(m,"");else{let g=String(p);o.setAttribute(m,j(m)?P(g):g)}}}return i.onElement&&typeof i.onElement=="function"&&i.onElement(o),o};var li=a("html"),Ye=a("head"),et=a("body"),tt=a("title"),x=a("div"),C=a("span"),nt=a("section"),rt=a("article"),ot=a("header"),it=a("footer"),st=a("nav"),at=a("main"),ct=a("aside"),lt=a("address"),oe=a("p"),ut=a("h1"),dt=a("h2"),ie=a("h3"),pt=a("h4"),ft=a("h5"),mt=a("h6"),gt=a("blockquote"),bt=a("dd"),ht=a("dl"),xt=a("dt"),yt=a("figcaption"),vt=a("figure"),Tt=a("hr"),kt=a("li"),St=a("ol"),Et=a("ul"),ve=a("pre"),wt=a("a"),Ct=a("abbr"),_t=a("b"),Nt=a("bdi"),At=a("bdo"),Lt=a("br"),Mt=a("cite"),Ot=a("code"),Rt=a("data"),Ht=a("dfn"),Dt=a("em"),Bt=a("i"),zt=a("kbd"),Kt=a("mark"),Ft=a("q"),Pt=a("rp"),jt=a("rt"),Wt=a("ruby"),qt=a("s"),$t=a("samp"),Ut=a("small"),It=a("strong"),Vt=a("sub"),Gt=a("sup"),Qt=a("time"),Zt=a("u"),Jt=a("var"),Xt=a("area"),Yt=a("audio"),en=a("img"),tn=a("map"),nn=a("track"),rn=a("video"),on=a("embed"),sn=a("iframe"),an=a("object"),cn=a("param"),ln=a("picture"),un=a("portal"),dn=a("source"),pn=a("svg",k),fn=a("math"),mn=a("canvas"),gn=a("noscript"),bn=a("script"),hn=a("del"),xn=a("ins"),yn=a("caption"),vn=a("col"),Tn=a("colgroup"),kn=a("table"),Sn=a("tbody"),En=a("td"),wn=a("tfoot"),Cn=a("th"),_n=a("thead"),Nn=a("tr"),K=a("button"),An=a("datalist"),Ln=a("fieldset"),Mn=a("form"),On=a("input"),Rn=a("label"),Hn=a("legend"),Dn=a("meter"),Bn=a("optgroup"),zn=a("option"),Kn=a("output"),Fn=a("progress"),Pn=a("select"),jn=a("textarea"),Wn=a("details"),qn=a("dialog"),$n=a("menu"),Un=a("summary"),In=a("slot"),Vn=a("template"),Gn=a("base"),Qn=a("link"),Zn=a("meta"),J=a("style"),Jn=a("circle",k),Xn=a("ellipse",k),Yn=a("g",k),er=a("line",k),tr=a("path",k),nr=a("polygon",k),rr=a("polyline",k),or=a("rect",k),ir=a("text",k),sr=a("tspan",k),ar=a("defs",k),cr=a("clipPath",k),lr=a("mask",k),ur=a("pattern",k),dr=a("linearGradient",k),pr=a("radialGradient",k),fr=a("stop",k),mr=a("use",k),gr=a("symbol",k),br=a("marker",k),hr=a("center"),xr=a("font"),yr=a("marquee"),vr=t=>a(t);var Ao=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Tr=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),kr=new WeakMap;function Lo(t){let e=t.length-1,r=t[0];for(let p=0;p<e;p++)r+=`\0${p}\0${t[p+1]}`;let n=0,o=r.length;function i(){for(;n<o&&(r[n]===" "||r[n]===" "||r[n]===`
|
|
2
|
+
`||r[n]==="\r");)n++}function s(){if(r.charCodeAt(n)!==0)return-1;let p=n;n++;let g=0;for(;n<o&&r.charCodeAt(n)!==0;)g=g*10+(r.charCodeAt(n)-48),n++;return n<o&&n++,g<0||g>=e?(n=p,-1):g}function c(){let p=n;for(;n<o;){let g=r.charCodeAt(n);if(g>=97&&g<=122||g>=65&&g<=90||g>=48&&g<=57||g===45)n++;else break}return r.slice(p,n)}function l(){if(i(),r[n]!=="=")return{kind:"bool"};n++,i();let p=s();if(p>=0)return{kind:"expr",idx:p};let g=r[n];if(g==='"'||g==="'"){n++;let h=[],D=[],U="";for(;n<o&&r[n]!==g;){let ee=s();ee>=0?(h.push(U),U="",D.push(ee)):U+=r[n++]}return n<o&&n++,h.push(U),D.length===0?{kind:"static",value:h[0]}:{kind:"mixed",statics:h,exprs:D}}let T=n;for(;n<o;){let h=r.charCodeAt(n);if(h===32||h===9||h===10||h===13||h===62||h===47)break;n++}return{kind:"static",value:r.slice(T,n)}}function u(){let p=[];for(;n<o&&(i(),!(r[n]===">"||r[n]==="/"));){let g=n;for(;n<o;){let h=r.charCodeAt(n);if(h>=97&&h<=122||h>=65&&h<=90||h>=48&&h<=57||h===45||h===58||h===95||h===46)n++;else break}let T=r.slice(g,n);if(!T)break;let y=l();T.startsWith("on:")?y.kind==="expr"&&p.push({t:3,name:T.slice(3),idx:y.idx}):y.kind==="bool"?p.push({t:4,name:T}):y.kind==="static"?p.push({t:0,name:T,value:y.value}):y.kind==="expr"?p.push({t:1,name:T,idx:y.idx}):y.kind==="mixed"&&p.push({t:2,name:T,statics:y.statics,exprs:y.exprs})}return p}function d(p){return p.replace(/\s+/g," ")}function f(p){let g="";for(;n<o&&r[n]!=="<";){let y=s();if(y>=0){let h=d(g);h&&p.push({t:1,value:h}),g="",p.push({t:2,idx:y})}else g+=r[n++]}let T=d(g);T&&p.push({t:1,value:T})}function m(){let p=[];for(;n<o&&!(r[n]==="<"&&n+1<o&&r[n+1]==="/");)if(r[n]==="<"){n++;let g=c(),T=u();i();let y=Ao.has(g),h=r[n]==="/";if(h&&n++,n<o&&n++,y||h)p.push({t:0,el:{tag:g,svg:Tr.has(g),attrs:T,children:[]}});else{let D=m();r[n]==="<"&&n+1<o&&r[n+1]==="/"&&(n+=2,c(),i(),n<o&&r[n]===">"&&n++),p.push({t:0,el:{tag:g,svg:Tr.has(g),attrs:T,children:D}})}}else f(p);return p}return m()}function Le(t,e){let r=t.svg?document.createElementNS(k,t.tag):document.createElement(t.tag);for(let n=0;n<t.attrs.length;n++){let o=t.attrs[n];switch(o.t){case 0:r.setAttribute(o.name,o.value);break;case 1:{let i=o.name;if(i[0]==="o"&&i[1]==="n")break;let s=e[o.idx];if(typeof s=="function")w(r,xe(r,i,s));else if(s!=null){let c=String(s);r.setAttribute(i,j(i)?P(c):c)}break}case 2:{let i=o.statics[0];for(let s=0;s<o.exprs.length;s++)i+=String(e[o.exprs[s]])+o.statics[s+1];r.setAttribute(o.name,i);break}case 3:r.addEventListener(o.name,e[o.idx]);break;case 4:r.setAttribute(o.name,"");break}}for(let n=0;n<t.children.length;n++){let o=t.children[n];switch(o.t){case 0:r.appendChild(Le(o.el,e));break;case 1:r.appendChild(document.createTextNode(o.value));break;case 2:{let i=e[o.idx];if(typeof i=="function"){let s=document.createComment("");r.appendChild(s),w(r,q(s,i))}else if(i instanceof Node)r.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let c=i[s];c instanceof Node?r.appendChild(c):c!=null&&typeof c!="boolean"&&r.appendChild(document.createTextNode(String(c)))}else i!=null&&typeof i!="boolean"&&r.appendChild(document.createTextNode(String(i)));break}}}return r}function Me(t,...e){let r=kr.get(t);if(r||(r=Lo(t),kr.set(t,r)),r.length===1&&r[0].t===0)return Le(r[0].el,e);let n=document.createElement("div");for(let o=0;o<r.length;o++){let i=r[o];switch(i.t){case 0:n.appendChild(Le(i.el,e));break;case 1:n.appendChild(document.createTextNode(i.value));break;case 2:{let s=e[i.idx];if(s instanceof Node)n.appendChild(s);else if(typeof s=="function"){let c=document.createComment("bind:htm");n.appendChild(c),w(n,q(c,s))}else if(Array.isArray(s))for(let c=0;c<s.length;c++){let l=s[c];l instanceof Node?n.appendChild(l):l!=null&&typeof l!="boolean"&&n.appendChild(document.createTextNode(String(l)))}else s!=null&&typeof s!="boolean"&&n.appendChild(document.createTextNode(String(s)));break}}}return n.childNodes.length===1&&n.firstChild instanceof Element?n.firstChild:n}function Sr(t,e){if(!e)throw new Error("[Sibu] mount: container element not found. Make sure the DOM element exists before calling mount().");A(typeof t=="function"||t instanceof Node,"mount: first argument must be a component function or a DOM Node.");let r=typeof performance<"u"?performance.now():0,n=typeof t=="function"?t():t,o=typeof performance<"u"?performance.now()-r:0;e.appendChild(n);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:n,container:e,duration:o}),{node:n,unmount(){i&&i.emit("app:unmount",{rootElement:n}),R(n),n.parentNode&&n.parentNode.removeChild(n)}}}var Mo=N();function Er(t){return typeof t=="function"?Er(t()):t instanceof Node?t:document.createTextNode(String(t))}function Oo(t,e){if(e===0)return[];let r=[],n=new Array(e);for(let c=0;c<e;c++){let l=t[c],u=0,d=r.length;for(;u<d;){let f=u+d>>1;t[r[f]]<l?u=f+1:d=f}r[u]=c,n[c]=u>0?r[u-1]:-1}let o=r.length,i=new Array(o),s=r[o-1];for(let c=o-1;c>=0;c--)i[c]=s,s=n[s];return i}function wr(t,e,r){A(typeof t=="function","each: first argument must be a function that returns an array."),A(typeof e=="function","each: second argument must be a render function."),A(r&&typeof r.key=="function","each: options.key must be a function that returns a unique key per item.");let n=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],c=i,l=0,u=new Map,d=new Map,f=[],m=[],p=new Uint8Array(0),g=new Map,T=[],y=[],h=!1,D=!1,U=r.key,ee=()=>{let ke=t(),E=ke.length,ue=n.parentNode;if(!ue)return;D||(ue.insertBefore(o,n.nextSibling),D=!0),m.length<E&&(m=new Array(E));for(let b=0;b<E;b++)m[b]=U(ke[b]);let de=m;f.length<E&&(f=new Array(E)),d.clear();for(let b=0;b<E;b++){let L=de[b],Ue=u.get(L),te;if(Ue!==void 0)te=Ue;else try{te=Er(e(ke[b],b))}catch(Se){Mo&&M(`each: render threw for item at index ${b} (key="${de[b]}"): ${Se instanceof Error?Se.message:String(Se)}`),te=document.createComment(`each:error:${b}`)}d.set(L,te),f[b]=te}for(let[b,L]of u)d.has(b)||(R(L),L.parentNode&&ue.removeChild(L));if(E===0){l=0;let b=u;u=d,d=b;return}g.clear();for(let b=0;b<l;b++)g.set(c[b],b);T.length<E&&(T=new Array(E),y=new Array(E));let pe=0;for(let b=0;b<E;b++){let L=g.get(de[b]);L!==void 0&&(T[pe]=b,y[pe]=L,pe++)}let $e=Oo(y,pe);p.length<E?p=new Uint8Array(E):p.fill(0,0,E);for(let b=0;b<$e.length;b++)p[T[$e[b]]]=1;let fe=o;for(let b=E-1;b>=0;b--){let L=f[b];p[b]||L.nextSibling!==fe&&ue.insertBefore(L,fe),fe=L}let me=c===i?s:i;me.length<E&&(me.length=E);for(let b=0;b<E;b++)me[b]=de[b];c=me,l=E;let mo=u;u=d,d=mo,h=!0};return v(ee),h||queueMicrotask(()=>{!h&&n.parentNode&&ee()}),n}function _r(t){let e=document.createDocumentFragment();for(let r of t)if(!(r==null||typeof r=="boolean"))if(Array.isArray(r))for(let n of r)n==null||typeof n=="boolean"||e.appendChild(Cr(n));else e.appendChild(Cr(r));return e}function Cr(t){if(t==null)return document.createTextNode("");if(t instanceof Node)return t;if(typeof t=="function"){let e=t();return e instanceof Node?e:document.createTextNode(String(e??""))}return document.createTextNode(String(t))}function Nr(t,e){let r=document.createComment("portal"),n=e||document.body,o=null;queueMicrotask(()=>{try{o=t(),n.appendChild(o)}catch(s){console.error("[Portal] Render error:",s)}});let i=new MutationObserver(()=>{!r.isConnected&&o&&(o.remove(),o=null,i.disconnect())});return queueMicrotask(()=>{r.parentNode&&i.observe(r.parentNode,{childList:!0})}),r}var Oe=new Map;function Ar(t,e){Oe.set(t,e)}function Lr(t){Oe.delete(t)}function Re(t){let e=Oe.get(t);return e?e():x({nodes:`[Component "${t}" not found]`})}function Mr(t){let e=x({class:"sibu-dynamic"});function r(){let n=t(),o;typeof n=="function"?o=n():o=Re(n);for(let i of Array.from(e.childNodes))R(i);e.replaceChildren(o)}return v(r),e}function Or(t,e="default"){return t?.[e]}function Rr(t,e){return v(()=>{e.style.display=t()?"":"none"}),e}function Hr(t,e,r){let n=document.createComment("when"),o=null,i,s=!1,c=()=>{let l=t(),u=n.parentNode;if(!u||s&&l===i)return;i=l,o?.parentNode&&(R(o),o.parentNode.removeChild(o),o=null);let d=l?e():r?r():null;if(d!=null){let f=d instanceof Node?d:document.createTextNode(String(d));u.insertBefore(f,n.nextSibling),o=f}s=!0};return v(c),s||queueMicrotask(()=>{!s&&n.parentNode&&c()}),n}function Dr(t,e,r){let n=document.createComment("match"),o=null,i,s=!1,c=()=>{let l=String(t()),u=n.parentNode;if(!u||s&&l===i)return;i=l,o?.parentNode&&(R(o),o.parentNode.removeChild(o),o=null);let d=e[l]||r;if(d){let f=d();if(f!=null){let m=f instanceof Node?f:document.createTextNode(String(f));u.insertBefore(m,n.nextSibling),o=m}}s=!0};return v(c),s||queueMicrotask(()=>{!s&&n.parentNode&&c()}),n}function Br(t,e,r){let n=document.createComment("keep-alive"),o=new Map,i=[],s=r?.max??0,c,l=null,u=!1,d=()=>{let f=t(),m=n.parentNode;if(!m||u&&f===c)return;l?.parentNode&&m.removeChild(l),c=f;let p=o.get(f);if(p){let g=i.indexOf(f);g!==-1&&(i.splice(g,1),i.push(f))}else{let g=e[f];if(!g){l=null,u=!0;return}if(p=g(),o.set(f,p),i.push(f),s>0&&i.length>s){let T=i.shift(),y=o.get(T);y&&(R(y),y.parentNode&&y.parentNode.removeChild(y),o.delete(T))}}m.insertBefore(p,n.nextSibling),l=p,u=!0};return v(d),u||queueMicrotask(()=>{!u&&n.parentNode&&d()}),n}function zr(t,e,r){let n=e(t,r);typeof n=="function"&&w(t,n)}var Kr=(t,e)=>{let r=n=>{t.contains(n.target)||e()};return document.addEventListener("pointerdown",r,!0),()=>document.removeEventListener("pointerdown",r,!0)},Fr=(t,e)=>{let r=e.duration??500,n=null,o=()=>{n=setTimeout(()=>{e.callback(),n=null},r)},i=()=>{n!==null&&(clearTimeout(n),n=null)};return t.addEventListener("pointerdown",o),t.addEventListener("pointerup",i),t.addEventListener("pointerleave",i),()=>{i(),t.removeEventListener("pointerdown",o),t.removeEventListener("pointerup",i),t.removeEventListener("pointerleave",i)}},Pr=(t,e)=>{let r=()=>{let n=typeof e=="function"?e():t.textContent??"";navigator.clipboard.writeText(n)};return t.addEventListener("click",r),()=>t.removeEventListener("click",r)},jr=t=>{let e=()=>{t.style.overflow="hidden",t.style.height="auto",t.style.height=`${t.scrollHeight}px`};return e(),t.addEventListener("input",e),()=>t.removeEventListener("input",e)},Wr=t=>{let e='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',r=n=>{if(n.key!=="Tab")return;let o=Array.from(t.querySelectorAll(e));if(o.length===0)return;let i=o[0],s=o[o.length-1];n.shiftKey&&document.activeElement===i?(n.preventDefault(),s.focus()):!n.shiftKey&&document.activeElement===s&&(n.preventDefault(),i.focus())};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)};var $=null;function qr(t,e){try{let r=t();return r&&typeof r.then=="function"&&r.catch(n=>{e?e(n,"async"):$?$(n,"async"):console.error("Unhandled async error in Sibu.catchError:",n)}),r}catch(r){return e?e(r,"sync"):$?$(r,"sync"):console.error("Unhandled error in Sibu.catchError:",r),null}}async function $r(t,e){try{return await t()}catch(r){return e?e(r,"async"):$?$(r,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",r),null}}function Ur(t){$=t}var se=0,He=new Set;function Te(t){se++;try{return t()}finally{se--,se===0&&Ro()}}function X(t){return se===0?!1:(He.add(t),!0)}function Ir(){return se>0}function Ro(){for(let t of He)Qe(t);He.clear(),Ze()}var Vr=globalThis,De=N();function _(t,e){let r={value:t},n=De?e?.name:void 0,o=e?.equals;n&&(r.__name=n);function i(){return Z(r),r.value}i.__signal=r,n&&(i.__name=n);function s(c){let l=typeof c=="function"?c(r.value):c;if(!(o?o(r.value,l):Object.is(l,r.value))){if(De){let u=r.value;r.value=l;let d=Vr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:r,name:n,oldValue:u,newValue:l})}else r.value=l;X(r)||he(r)}}if(De){let c=Vr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&c.emit("signal:create",{signal:r,name:n,getter:i,initial:t})}return[i,s]}var Be=!1;function Y(){return Be}function ze(){Be=!0}function Ke(){Be=!1}function Gr(t){ze();try{return t()}finally{Ke()}}var Qr=globalThis;function Zr(t,e){let r,n=!0;return()=>{let o=t();if(n)n=!1,r=o,Q(()=>e(o,void 0));else{let i=r;r=o,Q(()=>e(o,i))}}}function ae(t,e){if(A(typeof t=="function","effect: argument must be a function."),Y())return()=>{};let r=e?.onError,n=r?()=>{try{t()}catch(c){r(c)}}:t,o=()=>{},i=()=>{o(),o=v(n,i)};o=v(n,i);let s=Qr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return s&&s.emit("effect:create",{effectFn:t}),()=>{let c=Qr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&c.emit("effect:destroy",{effectFn:t}),o()}}function F(t,e){A(typeof t=="function","derived: argument must be a getter function.");let r=e?.name,n={};n._d=!1,n._g=t;let o=()=>{n._d||(n._d=!0)};o._c=1,o._sig=n,v(()=>{n._d=!1,n._v=t()},o);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;function s(){if(be)return n._d&&(n._d=!1,n._v=t()),n._v;if(Z(n),n._d){let c=n._v;v(()=>{n._d=!1,n._v=t()},o),i&&c!==n._v&&i.emit("computed:update",{signal:n,oldValue:c,newValue:n._v})}return n._v}return r&&(s.__name=r,n.__name=r),s.__signal=n,i&&i.emit("computed:create",{signal:n,name:r,getter:s}),s}function Jr(t,e){if(A(typeof t=="function","watch: first argument must be a getter function."),A(typeof e=="function","watch: second argument must be a callback function."),Y())return()=>{};let r,n=!0;return v(()=>{let s=t();if(n){r=s,n=!1;return}Object.is(s,r)||(e(s,r),r=s)})}function Xr(t){A(t!==null&&typeof t=="object"&&!Array.isArray(t),"store: argument must be a plain object. For arrays, use array() instead.");let e={};Object.keys(t).forEach(l=>{let[u,d]=_(t[l]);e[l]=[u,d]});let r=new Proxy({},{get(l,u){if(u in e){let d=e[u][0];return d()}},set(){throw new Error("[Sibu] store: Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),n=()=>{let l={};return Object.keys(e).forEach(u=>{l[u]=e[u][0]()}),l};return[r,{setState:l=>{let u=n(),d=typeof l=="function"?l(u):l;Object.entries(d).forEach(([f,m])=>{f in e&&e[f][1](m)})},reset:()=>{Object.keys(t).forEach(l=>{let u=e[l][1];u(t[l])})},subscribe:l=>{let u=!0;return ae(()=>{let d=n();if(u){u=!1;return}l(d)})},subscribeKey:(l,u)=>{let d,f=!0;return ae(()=>{let m=e[l][0]();if(f){d=m,f=!1;return}if(!Object.is(m,d)){let p=d;d=m,u(m,p)}})},getSnapshot:n}]}function Yr(t){let[e,r]=_(t);return{get current(){return e()},set current(n){r(n)}}}function eo(t){return F(t)}function to(t){return F(t)}function no(t=[]){let[e,r]=_([...t]);return[e,{push(...o){r(i=>[...i,...o])},pop(){let o;return r(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return r(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){r(i=>[...o,...i])},splice(o,i=0,...s){let c=[];return r(l=>{let u=[...l];return c=u.splice(o,i,...s),u}),c},remove(o){r(i=>i.filter((s,c)=>c!==o))},removeWhere(o){r(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((c,l)=>l!==s)})},set(o){r([...o])},update(o,i){r(s=>s.map((c,l)=>l===o?i:c))},updateWhere(o,i){r(s=>s.map(c=>o(c)?i(c):c))},sort(o){r(i=>[...i].sort(o))},reverse(){r(o=>[...o].reverse())},filter(o){r(i=>i.filter(o))},map(o){r(i=>i.map(o))},clear(){r([])}}]}function ro(t=[]){let e=[...t],r=null,n={};function o(){r=null,X(n)||he(n)}function i(){return Z(n),r===null&&(r=Object.freeze([...e])),r}return[i,{push(...c){c.length!==0&&(e.push(...c),o())},pop(){if(e.length===0)return;let c=e.pop();return o(),c},shift(){if(e.length===0)return;let c=e.shift();return o(),c},unshift(...c){c.length!==0&&(e.unshift(...c),o())},splice(c,l=0,...u){let d=e.splice(c,l,...u);return(d.length>0||u.length>0)&&o(),d},remove(c){c<0||c>=e.length||(e.splice(c,1),o())},removeWhere(c){let l=e.findIndex(c);l!==-1&&(e.splice(l,1),o())},set(c){e=[...c],o()},update(c,l){c<0||c>=e.length||Object.is(e[c],l)||(e[c]=l,o())},updateWhere(c,l){let u=!1;for(let d=0;d<e.length;d++)if(c(e[d])){let f=l(e[d]);Object.is(e[d],f)||(e[d]=f,u=!0)}u&&o()},sort(c){e.length<=1||(e.sort(c),o())},reverse(){e.length<=1||(e.reverse(),o())},filter(c){let l=e.filter(c);l.length!==e.length&&(e=l,o())},map(c){let l=!1;for(let u=0;u<e.length;u++){let d=c(e[u],u);Object.is(e[u],d)||(e[u]=d,l=!0)}l&&o()},clear(){e.length!==0&&(e=[],o())}}]}function ce(t,e,r){if(Object.is(t,e))return!0;if(t==null||e==null||typeof t!=typeof e||typeof t!="object")return!1;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(t instanceof RegExp&&e instanceof RegExp)return t.toString()===e.toString();if(r||(r=new Set),r.has(t))return!0;if(r.add(t),Array.isArray(t))return!Array.isArray(e)||t.length!==e.length?!1:t.every((i,s)=>ce(i,e[s],r));let n=Object.keys(t),o=Object.keys(e);return n.length!==o.length?!1:n.every(i=>ce(t[i],e[i],r))}function oo(t){return _(t,{equals:(e,r)=>ce(e,r)})}function io(t,e,r){return[F(t,r),i=>{Te(()=>e(i))}]}function le(t,e){try{t()}catch(r){M(`${e}: callback threw: ${r instanceof Error?r.message:String(r)}`)}}function Fe(t,e){if(!(typeof document>"u"))if(e){if(e.isConnected){queueMicrotask(()=>{le(t,"onMount")});return}let r=new MutationObserver(()=>{e.isConnected&&(r.disconnect(),le(t,"onMount"))});queueMicrotask(()=>{e.isConnected?le(t,"onMount"):r.observe(document.body,{childList:!0,subtree:!0})})}else queueMicrotask(()=>{le(t,"onMount")})}function so(t,e){let r=()=>{let n=new MutationObserver(()=>{e.isConnected||(n.disconnect(),le(t,"onUnmount"))});n.observe(document.body,{childList:!0,subtree:!0})};e.isConnected?r():Fe(()=>{r()},e)}function ao(t,e){w(e,t)}function co(t){let[e,r]=_(t);return{provide(n){r(n)},use(){return e},get(){return e()},set(n){r(n)}}}function Pe(t){let e=null;return function(){if(e)return e();let[n,o]=_("loading"),[i,s]=_(null),c=x({class:"sibu-lazy"});return t().then(l=>{e=l.default;let u=e();c.replaceChildren(u),o("loaded")}).catch(l=>{let u=l instanceof Error?l:new Error(String(l));s(u),o("error"),c.replaceChildren(x({class:"sibu-lazy-error",nodes:`Failed to load component: ${u.message}`}))}),c.appendChild(C({class:"sibu-lazy-loading",nodes:"Loading..."})),c}}function je({nodes:t,fallback:e}){let r=x({class:"sibu-suspense"}),n=e();return r.appendChild(n),queueMicrotask(()=>{try{let o=t();if(o.classList.contains("sibu-lazy")){let i=new MutationObserver(()=>{o.querySelector(".sibu-lazy-loading")||(i.disconnect(),r.replaceChildren(o))});i.observe(o,{childList:!0,subtree:!0}),o.querySelector(".sibu-lazy-loading")||r.replaceChildren(o)}else r.replaceChildren(o)}catch{}}),r}var Ho=N(),Do=`
|
|
3
3
|
.sibu-error-boundary {
|
|
4
4
|
position: relative;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.sibu-error-fallback {
|
|
8
|
-
border:
|
|
8
|
+
border: 1px solid #e5484d;
|
|
9
9
|
border-radius: 8px;
|
|
10
|
-
padding:
|
|
10
|
+
padding: 0;
|
|
11
11
|
margin: 10px 0;
|
|
12
|
-
background:
|
|
13
|
-
box-shadow: 0
|
|
12
|
+
background: #1a1a2e;
|
|
13
|
+
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
|
|
14
14
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
15
|
+
color: #e1e1e6;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.sibu-error-fallback .sibu-error-header {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: 8px;
|
|
23
|
+
padding: 12px 16px;
|
|
24
|
+
background: #e5484d;
|
|
25
|
+
color: white;
|
|
15
26
|
}
|
|
16
27
|
|
|
17
28
|
.sibu-error-fallback .sibu-error-title {
|
|
18
|
-
margin: 0
|
|
19
|
-
|
|
20
|
-
font-size: 1.1em;
|
|
29
|
+
margin: 0;
|
|
30
|
+
font-size: 0.95em;
|
|
21
31
|
font-weight: 600;
|
|
22
32
|
}
|
|
23
33
|
|
|
34
|
+
.sibu-error-fallback .sibu-error-source {
|
|
35
|
+
margin-left: auto;
|
|
36
|
+
font-size: 0.8em;
|
|
37
|
+
opacity: 0.9;
|
|
38
|
+
font-family: 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.sibu-error-fallback .sibu-error-body {
|
|
42
|
+
padding: 16px;
|
|
43
|
+
}
|
|
44
|
+
|
|
24
45
|
.sibu-error-fallback .sibu-error-message {
|
|
25
46
|
font-family: 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
border-radius: 6px;
|
|
29
|
-
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
30
|
-
margin: 10px 0;
|
|
31
|
-
color: #495057;
|
|
47
|
+
margin: 0 0 12px 0;
|
|
48
|
+
color: #f1a9a0;
|
|
32
49
|
word-break: break-word;
|
|
33
50
|
font-size: 0.9em;
|
|
34
51
|
line-height: 1.5;
|
|
35
52
|
}
|
|
36
53
|
|
|
54
|
+
.sibu-error-fallback .sibu-error-stack-container {
|
|
55
|
+
position: relative;
|
|
56
|
+
margin: 0 0 12px 0;
|
|
57
|
+
border-radius: 6px;
|
|
58
|
+
border: 1px solid #2a2a3e;
|
|
59
|
+
background: #12121f;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.sibu-error-fallback .sibu-error-stack-label {
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: space-between;
|
|
67
|
+
padding: 6px 12px;
|
|
68
|
+
background: #1e1e32;
|
|
69
|
+
border-bottom: 1px solid #2a2a3e;
|
|
70
|
+
font-size: 0.75em;
|
|
71
|
+
color: #888;
|
|
72
|
+
text-transform: uppercase;
|
|
73
|
+
letter-spacing: 0.05em;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.sibu-error-fallback .sibu-error-copy-btn {
|
|
77
|
+
background: transparent;
|
|
78
|
+
border: 1px solid #3a3a4e;
|
|
79
|
+
border-radius: 4px;
|
|
80
|
+
color: #888;
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
padding: 2px 8px;
|
|
83
|
+
font-size: 1em;
|
|
84
|
+
transition: all 0.15s ease;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.sibu-error-fallback .sibu-error-copy-btn:hover {
|
|
88
|
+
background: #2a2a3e;
|
|
89
|
+
color: #ccc;
|
|
90
|
+
border-color: #4a4a5e;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.sibu-error-fallback .sibu-error-stack pre {
|
|
94
|
+
margin: 0;
|
|
95
|
+
padding: 12px;
|
|
96
|
+
overflow-x: auto;
|
|
97
|
+
font-family: 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;
|
|
98
|
+
font-size: 0.82em;
|
|
99
|
+
line-height: 1.6;
|
|
100
|
+
color: #a0a0b0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.sibu-error-fallback .sibu-error-stack .sibu-line-num {
|
|
104
|
+
display: inline-block;
|
|
105
|
+
width: 3ch;
|
|
106
|
+
margin-right: 12px;
|
|
107
|
+
color: #555;
|
|
108
|
+
text-align: right;
|
|
109
|
+
user-select: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.sibu-error-fallback .sibu-error-stack .sibu-stack-fn {
|
|
113
|
+
color: #7ec8e3;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.sibu-error-fallback .sibu-error-stack .sibu-stack-loc {
|
|
117
|
+
color: #666;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.sibu-error-fallback .sibu-error-actions {
|
|
121
|
+
display: flex;
|
|
122
|
+
gap: 8px;
|
|
123
|
+
}
|
|
124
|
+
|
|
37
125
|
.sibu-error-fallback .sibu-error-btn {
|
|
38
126
|
display: inline-flex;
|
|
39
127
|
align-items: center;
|
|
@@ -42,24 +130,33 @@
|
|
|
42
130
|
border: none;
|
|
43
131
|
border-radius: 6px;
|
|
44
132
|
cursor: pointer;
|
|
45
|
-
font-size:
|
|
133
|
+
font-size: 13px;
|
|
46
134
|
font-weight: 500;
|
|
47
|
-
transition: all 0.
|
|
48
|
-
|
|
49
|
-
|
|
135
|
+
transition: all 0.15s ease;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.sibu-error-fallback .sibu-error-btn-retry {
|
|
139
|
+
background: #e5484d;
|
|
50
140
|
color: white;
|
|
51
141
|
}
|
|
52
142
|
|
|
53
|
-
.sibu-error-fallback .sibu-error-btn:hover {
|
|
54
|
-
background
|
|
55
|
-
transform: translateY(-1px);
|
|
56
|
-
box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
|
|
143
|
+
.sibu-error-fallback .sibu-error-btn-retry:hover {
|
|
144
|
+
background: #d13438;
|
|
57
145
|
}
|
|
58
146
|
|
|
59
|
-
.sibu-error-fallback .sibu-error-btn
|
|
60
|
-
|
|
147
|
+
.sibu-error-fallback .sibu-error-btn-reload {
|
|
148
|
+
background: #2a2a3e;
|
|
149
|
+
color: #ccc;
|
|
150
|
+
border: 1px solid #3a3a4e;
|
|
61
151
|
}
|
|
62
|
-
|
|
152
|
+
|
|
153
|
+
.sibu-error-fallback .sibu-error-btn-reload:hover {
|
|
154
|
+
background: #3a3a4e;
|
|
155
|
+
}
|
|
156
|
+
`,lo=!1;function Bo(){if(!lo&&typeof document<"u"){let t=J({nodes:Do});document.head.appendChild(t),lo=!0}}var We=new WeakMap;function zo(t,e,r){let n=We.get(t);n||(n=new Map,We.set(t,n));let o=e.message;return n.has(o)||n.set(o,t(e,r)),n.get(o)}function Ko(t){let r=(t.stack||"").split(`
|
|
157
|
+
`),n=[],o="";for(let i of r){let s=i.trim(),c=s.match(/^at\s+(?:(.+?)\s+\((.+)\)|(.+))$/);if(c){let u=c[1]||"(anonymous)",d=c[2]||c[3]||"";n.push({fn:u,loc:d}),!o&&u!=="(anonymous)"&&!u.startsWith("Object.")&&!u.startsWith("Module.")&&(o=u);continue}let l=s.match(/^(.+?)@(.+)$/);if(l){let u=l[1]||"(anonymous)",d=l[2]||"";n.push({fn:u,loc:d}),!o&&u!=="(anonymous)"&&(o=u)}}return{source:o,frames:n}}function uo({nodes:t,fallback:e,onError:r}){Bo();let[n,o]=_(null),i=()=>{e&&We.delete(e),o(null)},s=d=>{let f=d instanceof Error?d:new Error(String(d));return o(f),r?.(f),f},c=(d,f)=>{if(!Ho)return x({class:"sibu-error-fallback",nodes:[x({class:"sibu-error-header",nodes:[ie({nodes:"Something went wrong",class:"sibu-error-title"})]}),x({class:"sibu-error-body",nodes:[oe({nodes:"An unexpected error occurred. Please try again.",class:"sibu-error-message"}),x({class:"sibu-error-actions",nodes:[K({nodes:"Retry",class:"sibu-error-btn sibu-error-btn-retry",on:{click:f}}),K({nodes:"Reload Page",class:"sibu-error-btn sibu-error-btn-reload",on:{click:()=>location.reload()}})]})]})]});let{source:m,frames:p}=Ko(d),g=`${d.message}
|
|
158
|
+
|
|
159
|
+
${d.stack||""}`,T=K({nodes:"Copy",class:"sibu-error-copy-btn",on:{click:()=>{navigator.clipboard.writeText(g).then(()=>{T.textContent="Copied!",setTimeout(()=>{T.textContent="Copy"},1500)})}}}),y=p.map((h,D)=>x({nodes:[C({class:"sibu-line-num",nodes:String(D+1)}),C({class:"sibu-stack-fn",nodes:h.fn}),C({class:"sibu-stack-loc",nodes:` ${h.loc}`})]}));return x({class:"sibu-error-fallback",nodes:[x({class:"sibu-error-header",nodes:[ie({nodes:m?`Error in ${m}`:"Something went wrong",class:"sibu-error-title"}),...m?[]:[C()]]}),x({class:"sibu-error-body",nodes:[oe({nodes:d.message,class:"sibu-error-message"}),...p.length>0?[x({class:"sibu-error-stack-container",nodes:[x({class:"sibu-error-stack-label",nodes:[C({nodes:"Stack Trace"}),T]}),x({class:"sibu-error-stack",nodes:[ve({nodes:y})]})]})]:[],x({class:"sibu-error-actions",nodes:[K({nodes:"Retry",class:"sibu-error-btn sibu-error-btn-retry",on:{click:f}}),K({nodes:"Reload Page",class:"sibu-error-btn sibu-error-btn-reload",on:{click:()=>location.reload()}})]})]})]})},l=d=>{let f=e||c;try{return zo(f,d,i)}catch(m){let p=m instanceof Error?m:new Error(String(m));return queueMicrotask(()=>{u.parentNode&&u.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:p}}))}),document.createComment("error-boundary-failed")}},u=x({class:"sibu-error-boundary",nodes:()=>{let d=n();if(d)return l(d);try{let f=t();if(f&&typeof f.then=="function"){let m=x({class:"sibu-error-async"});return m.appendChild(C({class:"sibu-lazy-loading",nodes:"Loading..."})),f.then(p=>{m.replaceChildren(p)}).catch(p=>{let g=s(p);m.replaceChildren(l(g))}),m}return f}catch(f){let m=s(f);return l(m)}}});return u.addEventListener("sibu:error-propagate",d=>{if(n())return;d.stopPropagation();let m=d.detail?.error;m&&s(m)}),u}var Fo=`
|
|
63
160
|
@keyframes sibu-spin {
|
|
64
161
|
to { transform: rotate(360deg); }
|
|
65
162
|
}
|
|
@@ -112,4 +209,4 @@
|
|
|
112
209
|
.sibu-loading-lg .sibu-loading-spinner { width: 40px; height: 40px; border-width: 4px; }
|
|
113
210
|
.sibu-loading-lg .sibu-loading-dot { width: 12px; height: 12px; }
|
|
114
211
|
.sibu-loading-lg .sibu-loading-dots { gap: 6px; }
|
|
115
|
-
`,po=!1;function Po(){!po&&typeof document<"u"&&(document.head.appendChild(
|
|
212
|
+
`,po=!1;function Po(){!po&&typeof document<"u"&&(document.head.appendChild(J({nodes:Fo})),po=!0)}function fo(t={}){Po();let{text:e,variant:r="spinner",size:n="md"}=t,o=n!=="md"?` sibu-loading-${n}`:"";return r==="dots"?x({class:`sibu-loading${o}`,nodes:[x({class:"sibu-loading-dots",nodes:[C({class:"sibu-loading-dot"}),C({class:"sibu-loading-dot"}),C({class:"sibu-loading-dot"})]}),e?C({class:"sibu-loading-text",nodes:e}):null].filter(Boolean)}):x({class:`sibu-loading${o}`,nodes:[x({class:"sibu-loading-spinner"}),e?C({class:"sibu-loading-text",nodes:e}):null].filter(Boolean)})}typeof window<"u"&&(window.Sibu=qe);return yo(jo);})();
|