sibujs 4.0.0 → 4.0.1
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/browser.cjs +1 -1
- package/dist/browser.js +4 -4
- package/dist/build.cjs +8 -8
- package/dist/build.js +10 -10
- package/dist/cdn.global.js +7 -7
- package/dist/{chunk-F64ZPCFE.js → chunk-52ERIVFD.js} +3 -3
- package/dist/{chunk-WN6WDFCB.js → chunk-5BVKQX2F.js} +4 -4
- package/dist/{chunk-Z2CE42DB.js → chunk-AD5YSZAN.js} +1 -1
- package/dist/{chunk-ES2GERY2.js → chunk-E72G5JSK.js} +1 -1
- package/dist/{chunk-NF3LYCQH.js → chunk-HPXTUPJD.js} +4 -4
- package/dist/{chunk-EWEE7NBF.js → chunk-IKVUUE7D.js} +2 -2
- package/dist/{chunk-6LG2T7LO.js → chunk-J4WZMCIW.js} +4 -4
- package/dist/{chunk-ACBT6UZS.js → chunk-JYXQCELN.js} +1 -1
- package/dist/{chunk-3EKJK5FZ.js → chunk-PHB3MCK4.js} +2 -2
- package/dist/{chunk-4MFZMLUU.js → chunk-PHRH66Y7.js} +1 -1
- package/dist/{chunk-GCSGGA3Q.js → chunk-PJDSI2K7.js} +9 -9
- package/dist/{chunk-RRIDJQ5C.js → chunk-PTLJ7NQX.js} +1 -1
- package/dist/{chunk-DQVUBVNX.js → chunk-QD4I7ZGZ.js} +10 -11
- package/dist/{chunk-DR7H6UGM.js → chunk-TNEHT3NG.js} +5 -5
- package/dist/{chunk-W55YHPEP.js → chunk-TVURNWDK.js} +1 -1
- package/dist/{chunk-E62UADKL.js → chunk-UNAYBND2.js} +1 -1
- package/dist/{chunk-PBQEW5VW.js → chunk-XDOMTQHM.js} +1 -1
- package/dist/{chunk-O3QQ3XOL.js → chunk-XET2RUJF.js} +1 -1
- package/dist/{chunk-VFHIVEPF.js → chunk-XZMCVZW6.js} +3 -3
- package/dist/{chunk-WOOMUJFT.js → chunk-YLV26GAJ.js} +3 -3
- package/dist/data.cjs +1 -1
- package/dist/data.js +6 -6
- package/dist/devtools.cjs +1 -1
- package/dist/devtools.js +4 -4
- package/dist/ecosystem.cjs +8 -8
- package/dist/ecosystem.js +7 -7
- package/dist/extras.cjs +8 -8
- package/dist/extras.js +19 -19
- package/dist/index.cjs +8 -8
- package/dist/index.js +10 -10
- package/dist/motion.cjs +1 -1
- package/dist/motion.js +3 -3
- package/dist/patterns.cjs +1 -1
- package/dist/patterns.js +5 -5
- package/dist/performance.cjs +1 -1
- package/dist/performance.js +4 -4
- package/dist/plugins.cjs +8 -8
- package/dist/plugins.js +6 -6
- package/dist/ssr.cjs +8 -8
- package/dist/ssr.js +7 -7
- package/dist/testing.cjs +1 -1
- package/dist/testing.js +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +6 -6
- package/dist/widgets.cjs +1 -1
- package/dist/widgets.js +6 -6
- package/package.json +1 -1
package/dist/browser.cjs
CHANGED
|
@@ -619,7 +619,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
619
619
|
|
|
620
620
|
// src/reactivity/track.ts
|
|
621
621
|
var _isDev2 = isDev();
|
|
622
|
-
var _runtimeVersion = true ? "4.0.
|
|
622
|
+
var _runtimeVersion = true ? "4.0.1" : "dev";
|
|
623
623
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
624
624
|
function resolveReactiveApi() {
|
|
625
625
|
const g = globalThis;
|
package/dist/browser.js
CHANGED
|
@@ -35,14 +35,14 @@ import {
|
|
|
35
35
|
visibility,
|
|
36
36
|
wakeLock,
|
|
37
37
|
windowSize
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-IKVUUE7D.js";
|
|
39
39
|
import "./chunk-H3SRKIYX.js";
|
|
40
40
|
import "./chunk-52XFPGSN.js";
|
|
41
41
|
import "./chunk-7ZHH77QA.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-XDOMTQHM.js";
|
|
43
43
|
import "./chunk-TIRZCERI.js";
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-TVURNWDK.js";
|
|
45
|
+
import "./chunk-JYXQCELN.js";
|
|
46
46
|
import "./chunk-VPP2FONR.js";
|
|
47
47
|
export {
|
|
48
48
|
animationFrame,
|
package/dist/build.cjs
CHANGED
|
@@ -2177,7 +2177,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
2177
2177
|
|
|
2178
2178
|
// src/reactivity/track.ts
|
|
2179
2179
|
var _isDev4 = isDev();
|
|
2180
|
-
var _runtimeVersion = true ? "4.0.
|
|
2180
|
+
var _runtimeVersion = true ? "4.0.1" : "dev";
|
|
2181
2181
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
2182
2182
|
function resolveReactiveApi() {
|
|
2183
2183
|
const g2 = globalThis;
|
|
@@ -2400,9 +2400,9 @@ function toKebab(prop) {
|
|
|
2400
2400
|
}
|
|
2401
2401
|
function applyStyle(el, style2) {
|
|
2402
2402
|
if (typeof style2 === "function") {
|
|
2403
|
-
const teardown =
|
|
2403
|
+
const teardown = reactiveBinding2(() => {
|
|
2404
2404
|
el.setAttribute("style", sanitizeStyleAttribute(String(style2())));
|
|
2405
|
-
});
|
|
2405
|
+
}, el);
|
|
2406
2406
|
registerDisposer(el, teardown);
|
|
2407
2407
|
return;
|
|
2408
2408
|
}
|
|
@@ -2416,9 +2416,9 @@ function applyStyle(el, style2) {
|
|
|
2416
2416
|
const name = toKebab(prop);
|
|
2417
2417
|
if (typeof val === "function") {
|
|
2418
2418
|
const getter = val;
|
|
2419
|
-
const teardown =
|
|
2419
|
+
const teardown = reactiveBinding2(() => {
|
|
2420
2420
|
htmlEl.style.setProperty(name, sanitizeCSSValue(String(getter())));
|
|
2421
|
-
});
|
|
2421
|
+
}, el);
|
|
2422
2422
|
registerDisposer(el, teardown);
|
|
2423
2423
|
} else {
|
|
2424
2424
|
htmlEl.style.setProperty(name, sanitizeCSSValue(String(val)));
|
|
@@ -2431,9 +2431,9 @@ function applyClass(el, cls) {
|
|
|
2431
2431
|
return;
|
|
2432
2432
|
}
|
|
2433
2433
|
if (typeof cls === "function") {
|
|
2434
|
-
const teardown =
|
|
2434
|
+
const teardown = reactiveBinding2(() => {
|
|
2435
2435
|
el.setAttribute("class", cls());
|
|
2436
|
-
});
|
|
2436
|
+
}, el);
|
|
2437
2437
|
registerDisposer(el, teardown);
|
|
2438
2438
|
return;
|
|
2439
2439
|
}
|
|
@@ -2458,7 +2458,7 @@ function applyClass(el, cls) {
|
|
|
2458
2458
|
}
|
|
2459
2459
|
el.setAttribute("class", r);
|
|
2460
2460
|
};
|
|
2461
|
-
const teardown =
|
|
2461
|
+
const teardown = reactiveBinding2(update, el);
|
|
2462
2462
|
registerDisposer(el, teardown);
|
|
2463
2463
|
} else {
|
|
2464
2464
|
el.setAttribute("class", result);
|
package/dist/build.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
index_exports
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-PJDSI2K7.js";
|
|
4
|
+
import "./chunk-E72G5JSK.js";
|
|
5
5
|
import "./chunk-HYCCIYNS.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-PTLJ7NQX.js";
|
|
7
7
|
import "./chunk-CCSJMTRN.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-XET2RUJF.js";
|
|
9
|
+
import "./chunk-QD4I7ZGZ.js";
|
|
10
|
+
import "./chunk-PHRH66Y7.js";
|
|
11
|
+
import "./chunk-AD5YSZAN.js";
|
|
12
12
|
import "./chunk-5INI7D2L.js";
|
|
13
13
|
import "./chunk-7ZHH77QA.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-XDOMTQHM.js";
|
|
15
15
|
import "./chunk-TIRZCERI.js";
|
|
16
16
|
import "./chunk-DHDZ7IVN.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-TVURNWDK.js";
|
|
18
|
+
import "./chunk-JYXQCELN.js";
|
|
19
19
|
import "./chunk-VPP2FONR.js";
|
|
20
20
|
|
|
21
21
|
// src/build/compileTemplates.ts
|
package/dist/cdn.global.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";var Sibu=(()=>{var nt=Object.defineProperty;var _s=Object.getOwnPropertyDescriptor;var Cs=Object.getOwnPropertyNames;var Ns=Object.prototype.hasOwnProperty;var rt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,t)=>(typeof require<"u"?require:n)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var an=(e,n)=>{for(var t in n)nt(e,t,{get:n[t],enumerable:!0})},Ls=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of Cs(n))!Ns.call(e,o)&&o!==t&&nt(e,o,{get:()=>n[o],enumerable:!(r=_s(n,o))||r.enumerable});return e};var Rs=e=>Ls(nt({},"__esModule",{value:!0}),e);var uc={};an(uc,{DynamicComponent:()=>Bi,ErrorBoundary:()=>Ti,ErrorDisplay:()=>Qe,Fragment:()=>Vi,KeepAlive:()=>Ki,Loading:()=>wi,MAX_DRAIN_TEARDOWNS:()=>ke,Portal:()=>Ji,SVG_NS:()=>N,Suspense:()=>Tt,__resetIdCounter:()=>Hi,a:()=>dr,abbr:()=>fr,action:()=>Ai,address:()=>Gn,area:()=>$r,array:()=>Yi,article:()=>Vn,aside:()=>Jn,asyncDerived:()=>Qi,audio:()=>Ir,autoResize:()=>Vt,b:()=>pr,base:()=>Ho,batch:()=>z,bdi:()=>mr,bdo:()=>br,bindDynamic:()=>ht,blockquote:()=>tr,body:()=>Fn,br:()=>gr,button:()=>ve,canvas:()=>Qr,caption:()=>ro,catchError:()=>_i,catchErrorAsync:()=>Ci,center:()=>ni,checkLeaks:()=>ln,circle:()=>Po,cite:()=>hr,clickOutside:()=>Ft,clipPath:()=>Uo,code:()=>Ge,col:()=>oo,colgroup:()=>io,context:()=>Ri,copyOnClick:()=>qt,createId:()=>Mi,customElement:()=>ii,data:()=>yr,datalist:()=>mo,dd:()=>nr,deepEqual:()=>Te,deepSignal:()=>Xi,defer:()=>gs,defs:()=>Ko,del:()=>to,derived:()=>Xe,details:()=>_o,dfn:()=>vr,dialog:()=>Co,disableSSR:()=>Rt,dispose:()=>M,div:()=>k,dl:()=>rr,dt:()=>or,each:()=>zi,effect:()=>P,ellipse:()=>$o,em:()=>xr,embed:()=>Vr,enableSSR:()=>Lt,enhance:()=>Oe,enhanceAll:()=>cs,enqueueBatchedSignal:()=>oe,fieldset:()=>bo,figcaption:()=>ir,figure:()=>sr,font:()=>ri,footer:()=>Wn,form:()=>go,g:()=>Io,getAction:()=>Bt,getRequestScopedCache:()=>Nt,getRuntimeErrorHandler:()=>st,getSSRStore:()=>re,getSlot:()=>Gi,h1:()=>Yn,h2:()=>Zn,h3:()=>Ue,h4:()=>Qn,h5:()=>Xn,h6:()=>er,head:()=>Bn,header:()=>jn,hr:()=>ar,html:()=>Yt,i:()=>Sr,iframe:()=>jr,img:()=>Br,input:()=>ho,ins:()=>no,isBatching:()=>gi,isSSR:()=>J,kbd:()=>Tr,label:()=>yo,lazy:()=>St,lazyIsland:()=>ds,legend:()=>vo,li:()=>cr,line:()=>Bo,linearGradient:()=>Yo,link:()=>Do,longPress:()=>zt,main:()=>Un,map:()=>Fr,mark:()=>Er,marker:()=>ti,marquee:()=>oi,mask:()=>Jo,match:()=>Pi,math:()=>Zr,menu:()=>No,meta:()=>Oo,meter:()=>xo,mount:()=>Ui,mountIslands:()=>ms,nav:()=>Kn,nextTick:()=>ys,noscript:()=>Xr,object:()=>Wr,ol:()=>ur,on:()=>mi,onCleanup:()=>ui,onMount:()=>Me,onUnmount:()=>ci,optgroup:()=>So,option:()=>To,output:()=>Eo,p:()=>Ke,param:()=>Kr,path:()=>Fo,pattern:()=>Go,picture:()=>Ur,polygon:()=>zo,polyline:()=>qo,portal:()=>Jr,pre:()=>Je,progress:()=>wo,q:()=>wr,radialGradient:()=>Zo,reactiveArray:()=>Zi,rect:()=>Vo,ref:()=>es,registerAction:()=>de,registerComponent:()=>$i,registerDisposer:()=>S,registerIsland:()=>fs,replaceChildrenSafely:()=>q,reportDrainRunaway:()=>Ae,reportError:()=>A,resolveComponent:()=>Jt,retrack:()=>Y,rp:()=>kr,rt:()=>Ar,ruby:()=>_r,runInSSRContext:()=>Mt,s:()=>Cr,samp:()=>Nr,script:()=>eo,section:()=>qn,select:()=>ko,setGlobalErrorHandler:()=>Ni,setMaxDrainIterations:()=>gt,setRuntimeErrorHandler:()=>it,show:()=>Di,signal:()=>L,slot:()=>Ro,small:()=>Lr,source:()=>Gr,span:()=>D,stop:()=>Qo,store:()=>ts,strict:()=>os,strictEffect:()=>is,strong:()=>Rr,style:()=>ne,sub:()=>Mr,summary:()=>Lo,sup:()=>Hr,svg:()=>Yr,symbol:()=>ei,table:()=>so,tagFactory:()=>d,takePendingError:()=>Re,tbody:()=>ao,td:()=>co,template:()=>Mo,text:()=>jo,textarea:()=>Ao,tfoot:()=>uo,th:()=>lo,thead:()=>fo,time:()=>Dr,title:()=>zn,tr:()=>po,track:()=>zr,transition:()=>hs,trapFocus:()=>jt,trustHTML:()=>Xt,tspan:()=>Wo,u:()=>Or,ul:()=>lr,unregisterComponent:()=>Ii,unregisterDisposer:()=>Be,unregisterIsland:()=>ps,untracked:()=>ge,use:()=>Xo,var_:()=>Pr,video:()=>qr,watch:()=>ns,when:()=>Oi,withSSR:()=>Ht,writable:()=>rs});var en={};an(en,{DynamicComponent:()=>Bi,ErrorBoundary:()=>Ti,ErrorDisplay:()=>Qe,Fragment:()=>Vi,KeepAlive:()=>Ki,Loading:()=>wi,MAX_DRAIN_TEARDOWNS:()=>ke,Portal:()=>Ji,SVG_NS:()=>N,Suspense:()=>Tt,__resetIdCounter:()=>Hi,a:()=>dr,abbr:()=>fr,action:()=>Ai,address:()=>Gn,area:()=>$r,array:()=>Yi,article:()=>Vn,aside:()=>Jn,asyncDerived:()=>Qi,audio:()=>Ir,autoResize:()=>Vt,b:()=>pr,base:()=>Ho,batch:()=>z,bdi:()=>mr,bdo:()=>br,bindDynamic:()=>ht,blockquote:()=>tr,body:()=>Fn,br:()=>gr,button:()=>ve,canvas:()=>Qr,caption:()=>ro,catchError:()=>_i,catchErrorAsync:()=>Ci,center:()=>ni,checkLeaks:()=>ln,circle:()=>Po,cite:()=>hr,clickOutside:()=>Ft,clipPath:()=>Uo,code:()=>Ge,col:()=>oo,colgroup:()=>io,context:()=>Ri,copyOnClick:()=>qt,createId:()=>Mi,customElement:()=>ii,data:()=>yr,datalist:()=>mo,dd:()=>nr,deepEqual:()=>Te,deepSignal:()=>Xi,defer:()=>gs,defs:()=>Ko,del:()=>to,derived:()=>Xe,details:()=>_o,dfn:()=>vr,dialog:()=>Co,disableSSR:()=>Rt,dispose:()=>M,div:()=>k,dl:()=>rr,dt:()=>or,each:()=>zi,effect:()=>P,ellipse:()=>$o,em:()=>xr,embed:()=>Vr,enableSSR:()=>Lt,enhance:()=>Oe,enhanceAll:()=>cs,enqueueBatchedSignal:()=>oe,fieldset:()=>bo,figcaption:()=>ir,figure:()=>sr,font:()=>ri,footer:()=>Wn,form:()=>go,g:()=>Io,getAction:()=>Bt,getRequestScopedCache:()=>Nt,getRuntimeErrorHandler:()=>st,getSSRStore:()=>re,getSlot:()=>Gi,h1:()=>Yn,h2:()=>Zn,h3:()=>Ue,h4:()=>Qn,h5:()=>Xn,h6:()=>er,head:()=>Bn,header:()=>jn,hr:()=>ar,html:()=>Yt,i:()=>Sr,iframe:()=>jr,img:()=>Br,input:()=>ho,ins:()=>no,isBatching:()=>gi,isSSR:()=>J,kbd:()=>Tr,label:()=>yo,lazy:()=>St,lazyIsland:()=>ds,legend:()=>vo,li:()=>cr,line:()=>Bo,linearGradient:()=>Yo,link:()=>Do,longPress:()=>zt,main:()=>Un,map:()=>Fr,mark:()=>Er,marker:()=>ti,marquee:()=>oi,mask:()=>Jo,match:()=>Pi,math:()=>Zr,menu:()=>No,meta:()=>Oo,meter:()=>xo,mount:()=>Ui,mountIslands:()=>ms,nav:()=>Kn,nextTick:()=>ys,noscript:()=>Xr,object:()=>Wr,ol:()=>ur,on:()=>mi,onCleanup:()=>ui,onMount:()=>Me,onUnmount:()=>ci,optgroup:()=>So,option:()=>To,output:()=>Eo,p:()=>Ke,param:()=>Kr,path:()=>Fo,pattern:()=>Go,picture:()=>Ur,polygon:()=>zo,polyline:()=>qo,portal:()=>Jr,pre:()=>Je,progress:()=>wo,q:()=>wr,radialGradient:()=>Zo,reactiveArray:()=>Zi,rect:()=>Vo,ref:()=>es,registerAction:()=>de,registerComponent:()=>$i,registerDisposer:()=>S,registerIsland:()=>fs,replaceChildrenSafely:()=>q,reportDrainRunaway:()=>Ae,reportError:()=>A,resolveComponent:()=>Jt,retrack:()=>Y,rp:()=>kr,rt:()=>Ar,ruby:()=>_r,runInSSRContext:()=>Mt,s:()=>Cr,samp:()=>Nr,script:()=>eo,section:()=>qn,select:()=>ko,setGlobalErrorHandler:()=>Ni,setMaxDrainIterations:()=>gt,setRuntimeErrorHandler:()=>it,show:()=>Di,signal:()=>L,slot:()=>Ro,small:()=>Lr,source:()=>Gr,span:()=>D,stop:()=>Qo,store:()=>ts,strict:()=>os,strictEffect:()=>is,strong:()=>Rr,style:()=>ne,sub:()=>Mr,summary:()=>Lo,sup:()=>Hr,svg:()=>Yr,symbol:()=>ei,table:()=>so,tagFactory:()=>d,takePendingError:()=>Re,tbody:()=>ao,td:()=>co,template:()=>Mo,text:()=>jo,textarea:()=>Ao,tfoot:()=>uo,th:()=>lo,thead:()=>fo,time:()=>Dr,title:()=>zn,tr:()=>po,track:()=>zr,transition:()=>hs,trapFocus:()=>jt,trustHTML:()=>Xt,tspan:()=>Wo,u:()=>Or,ul:()=>lr,unregisterComponent:()=>Ii,unregisterDisposer:()=>Be,unregisterIsland:()=>ps,untracked:()=>ge,use:()=>Xo,var_:()=>Pr,video:()=>qr,watch:()=>ns,when:()=>Oi,withSSR:()=>Ht,writable:()=>rs});var cn=Symbol.for("sibujs.runtime-errors.v1");function ot(){let e=globalThis,n=e[cn];if(n)return n;let t={handler:null,handlerDepth:0};return e[cn]=t,t}function it(e){let n=ot(),t=n.handler;return n.handler=e,t}function st(){return ot().handler}function at(e){if(e instanceof Error)return e;let n=typeof e=="string"?e:`Non-Error value thrown: ${Ms(e)}`;return new Error(n,{cause:e})}function Ms(e){if(typeof e=="symbol")return e.toString();try{return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}catch{return Object.prototype.toString.call(e)}}function Hs(e){return e.name?`${e.phase} "${e.name}"`:e.phase}var Ds=Symbol.for("sibujs.reactive.v1");function Os(e){let n=globalThis[Ds];return n?.untracked?n.untracked(e):e()}var Ps="sibu:error-propagate";function $s(e,n){let t=n.node;if(!t||typeof CustomEvent>"u")return!1;let r=Is(t);if(!r)return!1;try{let o=new CustomEvent(Ps,{bubbles:!0,cancelable:!0,detail:{error:e,context:n}});return r.dispatchEvent(o)===!1}catch{return!1}}function Is(e){let t=e;for(;t;){if(t.nodeType===1&&typeof t.dispatchEvent=="function")return t;t=t.parentNode}let r=e;return typeof r.dispatchEvent=="function"?r:null}function Bs(e,n){typeof console>"u"||console.error(`[SibuJS] Uncaught error during ${Hs(n)}: ${e.message}`,e)}function A(e,n){let t=at(e);Os(()=>{if($s(t,n))return;let r=ot(),o=r.handler;if(o&&r.handlerDepth===0){r.handlerDepth++;try{o(e instanceof Error?e:t,n);return}catch(i){if(typeof console<"u"){let s=i instanceof Error?i.message:String(i);console.error(`[SibuJS] runtime error handler itself threw: ${s}`,i)}}finally{r.handlerDepth--}}Bs(t,n)})}function _(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var un=_();function B(e,n){if(un&&!e)throw new Error(`[SibuJS] ${n}`)}function R(e){un&&console.warn(`[SibuJS] ${e}`)}var G=new WeakMap,ke=1e4;function Ae(e,n,t){typeof console>"u"||console.error(`[SibuJS ${e}] runaway cleanup: stopped after running ${n} teardowns with ${t} still queued. Cleanup production did not stabilize before the teardown safety ceiling was reached \u2014 the remaining work was NOT run.`,{executed:n,remaining:t})}var we=_(),se=0;function S(e,n){let t=G.get(e);t||(t=[],G.set(e,t)),t.push(n),we&&se++}function Be(e,n){let t=G.get(e);if(!t)return;let r=t.indexOf(n);r!==-1&&(t.splice(r,1),we&&se--,t.length===0&&G.delete(e))}function M(e){let n=[e],t=[];for(;n.length>0;){let r=n.pop();t.push(r);let o=Array.from(r.childNodes);for(let i=0;i<o.length;i++)n.push(o[i])}for(let r=t.length-1;r>=0;r--){let o=t[r];if(G.has(o)){let i=0,s=!1;for(;!s;){let a=G.get(o);if(!a||a.length===0)break;let c=a.slice();G.delete(o),we&&(se-=c.length);for(let l=0;l<c.length;l++){if(i>=ke){let u=c.slice(l),f=G.get(o);G.set(o,f?u.concat(f):u),we&&(se+=u.length),Ae("dispose",i,u.length+(f?.length??0)),s=!0;break}i++;try{c[l]()}catch(u){A(u,{phase:"cleanup",name:"disposer"})}}}}}}function q(e,...n){for(let r=0;r<n.length;r++){let o=n[r];o.parentNode?.removeChild(o)}let t=Array.from(e.childNodes);for(let r=0;r<t.length;r++)M(t[r]);e.replaceChildren(...n)}function ln(e=0){return we?(e>0&&se>e&&R(`checkLeaks: ${se} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),se):0}function Fs(e){return e.replace(/[\x00-\x20\x7f-\x9f]+/g,"")}function be(e){if(e.length<3)return!1;let n=e.toLowerCase();return n[0]==="o"&&n[1]==="n"&&n.charCodeAt(2)>=97&&n.charCodeAt(2)<=122}var zs=["http:","https:","mailto:","tel:","ftp:"],qs=/^[\x00-\x20\x7f-\x9f]+|[\x00-\x20\x7f-\x9f]+$/g;function fn(e){let n=Fs(e).trim();if(!n)return"";let t=e.replace(qs,""),r=n.toLowerCase(),o=-1;for(let s=0;s<r.length;s++){let a=r.charCodeAt(s);if(a===58){o=s;break}if(a===47||a===63||a===35)break}if(o===-1)return t;let i=r.slice(0,o+1);return/^[a-z][a-z0-9+.-]*:$/.test(i)&&zs.indexOf(i)===-1?"":t}var Vs=/^\s+\d+(\.\d+)?[wx]$/;function js(e){let n=e.split(","),t=[];for(let r=0;r<n.length;r++){let o=n[r].trim();if(!o)continue;let i=o.match(/^(\S+)(\s+.+)?$/);if(!i||i[2]!==void 0&&!Vs.test(i[2]))continue;let s=fn(i[1]);s&&t.push(i[2]?`${s}${i[2]}`:s)}return t.join(", ")}var Ws=/[(:@\\]/;function Ks(e){return e===" "||e===" "||e===`
|
|
1
|
+
"use strict";var Sibu=(()=>{var nt=Object.defineProperty;var _s=Object.getOwnPropertyDescriptor;var Cs=Object.getOwnPropertyNames;var Ns=Object.prototype.hasOwnProperty;var rt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,t)=>(typeof require<"u"?require:n)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var an=(e,n)=>{for(var t in n)nt(e,t,{get:n[t],enumerable:!0})},Ls=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of Cs(n))!Ns.call(e,o)&&o!==t&&nt(e,o,{get:()=>n[o],enumerable:!(r=_s(n,o))||r.enumerable});return e};var Rs=e=>Ls(nt({},"__esModule",{value:!0}),e);var uc={};an(uc,{DynamicComponent:()=>Bi,ErrorBoundary:()=>Ti,ErrorDisplay:()=>Qe,Fragment:()=>Vi,KeepAlive:()=>Ki,Loading:()=>wi,MAX_DRAIN_TEARDOWNS:()=>Ae,Portal:()=>Ji,SVG_NS:()=>N,Suspense:()=>Tt,__resetIdCounter:()=>Hi,a:()=>dr,abbr:()=>fr,action:()=>Ai,address:()=>Gn,area:()=>$r,array:()=>Yi,article:()=>Vn,aside:()=>Jn,asyncDerived:()=>Qi,audio:()=>Ir,autoResize:()=>Vt,b:()=>pr,base:()=>Ho,batch:()=>z,bdi:()=>mr,bdo:()=>br,bindDynamic:()=>ht,blockquote:()=>tr,body:()=>Fn,br:()=>gr,button:()=>xe,canvas:()=>Qr,caption:()=>ro,catchError:()=>_i,catchErrorAsync:()=>Ci,center:()=>ni,checkLeaks:()=>ln,circle:()=>Po,cite:()=>hr,clickOutside:()=>Ft,clipPath:()=>Uo,code:()=>Ge,col:()=>oo,colgroup:()=>io,context:()=>Ri,copyOnClick:()=>qt,createId:()=>Mi,customElement:()=>ii,data:()=>yr,datalist:()=>mo,dd:()=>nr,deepEqual:()=>Ee,deepSignal:()=>Xi,defer:()=>gs,defs:()=>Ko,del:()=>to,derived:()=>Xe,details:()=>_o,dfn:()=>vr,dialog:()=>Co,disableSSR:()=>Rt,dispose:()=>M,div:()=>k,dl:()=>rr,dt:()=>or,each:()=>zi,effect:()=>O,ellipse:()=>$o,em:()=>xr,embed:()=>Vr,enableSSR:()=>Lt,enhance:()=>Oe,enhanceAll:()=>cs,enqueueBatchedSignal:()=>ie,fieldset:()=>bo,figcaption:()=>ir,figure:()=>sr,font:()=>ri,footer:()=>Wn,form:()=>go,g:()=>Io,getAction:()=>Bt,getRequestScopedCache:()=>Nt,getRuntimeErrorHandler:()=>st,getSSRStore:()=>oe,getSlot:()=>Gi,h1:()=>Yn,h2:()=>Zn,h3:()=>Ue,h4:()=>Qn,h5:()=>Xn,h6:()=>er,head:()=>Bn,header:()=>jn,hr:()=>ar,html:()=>Yt,i:()=>Sr,iframe:()=>jr,img:()=>Br,input:()=>ho,ins:()=>no,isBatching:()=>gi,isSSR:()=>G,kbd:()=>Tr,label:()=>yo,lazy:()=>St,lazyIsland:()=>ds,legend:()=>vo,li:()=>cr,line:()=>Bo,linearGradient:()=>Yo,link:()=>Do,longPress:()=>zt,main:()=>Un,map:()=>Fr,mark:()=>Er,marker:()=>ti,marquee:()=>oi,mask:()=>Jo,match:()=>Pi,math:()=>Zr,menu:()=>No,meta:()=>Oo,meter:()=>xo,mount:()=>Ui,mountIslands:()=>ms,nav:()=>Kn,nextTick:()=>ys,noscript:()=>Xr,object:()=>Wr,ol:()=>ur,on:()=>mi,onCleanup:()=>ui,onMount:()=>Me,onUnmount:()=>ci,optgroup:()=>So,option:()=>To,output:()=>Eo,p:()=>Ke,param:()=>Kr,path:()=>Fo,pattern:()=>Go,picture:()=>Ur,polygon:()=>zo,polyline:()=>qo,portal:()=>Jr,pre:()=>Je,progress:()=>wo,q:()=>wr,radialGradient:()=>Zo,reactiveArray:()=>Zi,rect:()=>Vo,ref:()=>es,registerAction:()=>fe,registerComponent:()=>$i,registerDisposer:()=>S,registerIsland:()=>fs,replaceChildrenSafely:()=>q,reportDrainRunaway:()=>_e,reportError:()=>A,resolveComponent:()=>Jt,retrack:()=>Z,rp:()=>kr,rt:()=>Ar,ruby:()=>_r,runInSSRContext:()=>Mt,s:()=>Cr,samp:()=>Nr,script:()=>eo,section:()=>qn,select:()=>ko,setGlobalErrorHandler:()=>Ni,setMaxDrainIterations:()=>gt,setRuntimeErrorHandler:()=>it,show:()=>Di,signal:()=>L,slot:()=>Ro,small:()=>Lr,source:()=>Gr,span:()=>H,stop:()=>Qo,store:()=>ts,strict:()=>os,strictEffect:()=>is,strong:()=>Rr,style:()=>re,sub:()=>Mr,summary:()=>Lo,sup:()=>Hr,svg:()=>Yr,symbol:()=>ei,table:()=>so,tagFactory:()=>d,takePendingError:()=>Re,tbody:()=>ao,td:()=>co,template:()=>Mo,text:()=>jo,textarea:()=>Ao,tfoot:()=>uo,th:()=>lo,thead:()=>fo,time:()=>Dr,title:()=>zn,tr:()=>po,track:()=>zr,transition:()=>hs,trapFocus:()=>jt,trustHTML:()=>Xt,tspan:()=>Wo,u:()=>Or,ul:()=>lr,unregisterComponent:()=>Ii,unregisterDisposer:()=>Be,unregisterIsland:()=>ps,untracked:()=>he,use:()=>Xo,var_:()=>Pr,video:()=>qr,watch:()=>ns,when:()=>Oi,withSSR:()=>Ht,writable:()=>rs});var en={};an(en,{DynamicComponent:()=>Bi,ErrorBoundary:()=>Ti,ErrorDisplay:()=>Qe,Fragment:()=>Vi,KeepAlive:()=>Ki,Loading:()=>wi,MAX_DRAIN_TEARDOWNS:()=>Ae,Portal:()=>Ji,SVG_NS:()=>N,Suspense:()=>Tt,__resetIdCounter:()=>Hi,a:()=>dr,abbr:()=>fr,action:()=>Ai,address:()=>Gn,area:()=>$r,array:()=>Yi,article:()=>Vn,aside:()=>Jn,asyncDerived:()=>Qi,audio:()=>Ir,autoResize:()=>Vt,b:()=>pr,base:()=>Ho,batch:()=>z,bdi:()=>mr,bdo:()=>br,bindDynamic:()=>ht,blockquote:()=>tr,body:()=>Fn,br:()=>gr,button:()=>xe,canvas:()=>Qr,caption:()=>ro,catchError:()=>_i,catchErrorAsync:()=>Ci,center:()=>ni,checkLeaks:()=>ln,circle:()=>Po,cite:()=>hr,clickOutside:()=>Ft,clipPath:()=>Uo,code:()=>Ge,col:()=>oo,colgroup:()=>io,context:()=>Ri,copyOnClick:()=>qt,createId:()=>Mi,customElement:()=>ii,data:()=>yr,datalist:()=>mo,dd:()=>nr,deepEqual:()=>Ee,deepSignal:()=>Xi,defer:()=>gs,defs:()=>Ko,del:()=>to,derived:()=>Xe,details:()=>_o,dfn:()=>vr,dialog:()=>Co,disableSSR:()=>Rt,dispose:()=>M,div:()=>k,dl:()=>rr,dt:()=>or,each:()=>zi,effect:()=>O,ellipse:()=>$o,em:()=>xr,embed:()=>Vr,enableSSR:()=>Lt,enhance:()=>Oe,enhanceAll:()=>cs,enqueueBatchedSignal:()=>ie,fieldset:()=>bo,figcaption:()=>ir,figure:()=>sr,font:()=>ri,footer:()=>Wn,form:()=>go,g:()=>Io,getAction:()=>Bt,getRequestScopedCache:()=>Nt,getRuntimeErrorHandler:()=>st,getSSRStore:()=>oe,getSlot:()=>Gi,h1:()=>Yn,h2:()=>Zn,h3:()=>Ue,h4:()=>Qn,h5:()=>Xn,h6:()=>er,head:()=>Bn,header:()=>jn,hr:()=>ar,html:()=>Yt,i:()=>Sr,iframe:()=>jr,img:()=>Br,input:()=>ho,ins:()=>no,isBatching:()=>gi,isSSR:()=>G,kbd:()=>Tr,label:()=>yo,lazy:()=>St,lazyIsland:()=>ds,legend:()=>vo,li:()=>cr,line:()=>Bo,linearGradient:()=>Yo,link:()=>Do,longPress:()=>zt,main:()=>Un,map:()=>Fr,mark:()=>Er,marker:()=>ti,marquee:()=>oi,mask:()=>Jo,match:()=>Pi,math:()=>Zr,menu:()=>No,meta:()=>Oo,meter:()=>xo,mount:()=>Ui,mountIslands:()=>ms,nav:()=>Kn,nextTick:()=>ys,noscript:()=>Xr,object:()=>Wr,ol:()=>ur,on:()=>mi,onCleanup:()=>ui,onMount:()=>Me,onUnmount:()=>ci,optgroup:()=>So,option:()=>To,output:()=>Eo,p:()=>Ke,param:()=>Kr,path:()=>Fo,pattern:()=>Go,picture:()=>Ur,polygon:()=>zo,polyline:()=>qo,portal:()=>Jr,pre:()=>Je,progress:()=>wo,q:()=>wr,radialGradient:()=>Zo,reactiveArray:()=>Zi,rect:()=>Vo,ref:()=>es,registerAction:()=>fe,registerComponent:()=>$i,registerDisposer:()=>S,registerIsland:()=>fs,replaceChildrenSafely:()=>q,reportDrainRunaway:()=>_e,reportError:()=>A,resolveComponent:()=>Jt,retrack:()=>Z,rp:()=>kr,rt:()=>Ar,ruby:()=>_r,runInSSRContext:()=>Mt,s:()=>Cr,samp:()=>Nr,script:()=>eo,section:()=>qn,select:()=>ko,setGlobalErrorHandler:()=>Ni,setMaxDrainIterations:()=>gt,setRuntimeErrorHandler:()=>it,show:()=>Di,signal:()=>L,slot:()=>Ro,small:()=>Lr,source:()=>Gr,span:()=>H,stop:()=>Qo,store:()=>ts,strict:()=>os,strictEffect:()=>is,strong:()=>Rr,style:()=>re,sub:()=>Mr,summary:()=>Lo,sup:()=>Hr,svg:()=>Yr,symbol:()=>ei,table:()=>so,tagFactory:()=>d,takePendingError:()=>Re,tbody:()=>ao,td:()=>co,template:()=>Mo,text:()=>jo,textarea:()=>Ao,tfoot:()=>uo,th:()=>lo,thead:()=>fo,time:()=>Dr,title:()=>zn,tr:()=>po,track:()=>zr,transition:()=>hs,trapFocus:()=>jt,trustHTML:()=>Xt,tspan:()=>Wo,u:()=>Or,ul:()=>lr,unregisterComponent:()=>Ii,unregisterDisposer:()=>Be,unregisterIsland:()=>ps,untracked:()=>he,use:()=>Xo,var_:()=>Pr,video:()=>qr,watch:()=>ns,when:()=>Oi,withSSR:()=>Ht,writable:()=>rs});var cn=Symbol.for("sibujs.runtime-errors.v1");function ot(){let e=globalThis,n=e[cn];if(n)return n;let t={handler:null,handlerDepth:0};return e[cn]=t,t}function it(e){let n=ot(),t=n.handler;return n.handler=e,t}function st(){return ot().handler}function at(e){if(e instanceof Error)return e;let n=typeof e=="string"?e:`Non-Error value thrown: ${Ms(e)}`;return new Error(n,{cause:e})}function Ms(e){if(typeof e=="symbol")return e.toString();try{return typeof e=="object"&&e!==null?JSON.stringify(e):String(e)}catch{return Object.prototype.toString.call(e)}}function Hs(e){return e.name?`${e.phase} "${e.name}"`:e.phase}var Ds=Symbol.for("sibujs.reactive.v1");function Os(e){let n=globalThis[Ds];return n?.untracked?n.untracked(e):e()}var Ps="sibu:error-propagate";function $s(e,n){let t=n.node;if(!t||typeof CustomEvent>"u")return!1;let r=Is(t);if(!r)return!1;try{let o=new CustomEvent(Ps,{bubbles:!0,cancelable:!0,detail:{error:e,context:n}});return r.dispatchEvent(o)===!1}catch{return!1}}function Is(e){let t=e;for(;t;){if(t.nodeType===1&&typeof t.dispatchEvent=="function")return t;t=t.parentNode}let r=e;return typeof r.dispatchEvent=="function"?r:null}function Bs(e,n){typeof console>"u"||console.error(`[SibuJS] Uncaught error during ${Hs(n)}: ${e.message}`,e)}function A(e,n){let t=at(e);Os(()=>{if($s(t,n))return;let r=ot(),o=r.handler;if(o&&r.handlerDepth===0){r.handlerDepth++;try{o(e instanceof Error?e:t,n);return}catch(i){if(typeof console<"u"){let s=i instanceof Error?i.message:String(i);console.error(`[SibuJS] runtime error handler itself threw: ${s}`,i)}}finally{r.handlerDepth--}}Bs(t,n)})}function _(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var un=_();function B(e,n){if(un&&!e)throw new Error(`[SibuJS] ${n}`)}function R(e){un&&console.warn(`[SibuJS] ${e}`)}var Y=new WeakMap,Ae=1e4;function _e(e,n,t){typeof console>"u"||console.error(`[SibuJS ${e}] runaway cleanup: stopped after running ${n} teardowns with ${t} still queued. Cleanup production did not stabilize before the teardown safety ceiling was reached \u2014 the remaining work was NOT run.`,{executed:n,remaining:t})}var ke=_(),ae=0;function S(e,n){let t=Y.get(e);t||(t=[],Y.set(e,t)),t.push(n),ke&&ae++}function Be(e,n){let t=Y.get(e);if(!t)return;let r=t.indexOf(n);r!==-1&&(t.splice(r,1),ke&&ae--,t.length===0&&Y.delete(e))}function M(e){let n=[e],t=[];for(;n.length>0;){let r=n.pop();t.push(r);let o=Array.from(r.childNodes);for(let i=0;i<o.length;i++)n.push(o[i])}for(let r=t.length-1;r>=0;r--){let o=t[r];if(Y.has(o)){let i=0,s=!1;for(;!s;){let a=Y.get(o);if(!a||a.length===0)break;let c=a.slice();Y.delete(o),ke&&(ae-=c.length);for(let l=0;l<c.length;l++){if(i>=Ae){let u=c.slice(l),f=Y.get(o);Y.set(o,f?u.concat(f):u),ke&&(ae+=u.length),_e("dispose",i,u.length+(f?.length??0)),s=!0;break}i++;try{c[l]()}catch(u){A(u,{phase:"cleanup",name:"disposer"})}}}}}}function q(e,...n){for(let r=0;r<n.length;r++){let o=n[r];o.parentNode?.removeChild(o)}let t=Array.from(e.childNodes);for(let r=0;r<t.length;r++)M(t[r]);e.replaceChildren(...n)}function ln(e=0){return ke?(e>0&&ae>e&&R(`checkLeaks: ${ae} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),ae):0}function Fs(e){return e.replace(/[\x00-\x20\x7f-\x9f]+/g,"")}function ge(e){if(e.length<3)return!1;let n=e.toLowerCase();return n[0]==="o"&&n[1]==="n"&&n.charCodeAt(2)>=97&&n.charCodeAt(2)<=122}var zs=["http:","https:","mailto:","tel:","ftp:"],qs=/^[\x00-\x20\x7f-\x9f]+|[\x00-\x20\x7f-\x9f]+$/g;function fn(e){let n=Fs(e).trim();if(!n)return"";let t=e.replace(qs,""),r=n.toLowerCase(),o=-1;for(let s=0;s<r.length;s++){let a=r.charCodeAt(s);if(a===58){o=s;break}if(a===47||a===63||a===35)break}if(o===-1)return t;let i=r.slice(0,o+1);return/^[a-z][a-z0-9+.-]*:$/.test(i)&&zs.indexOf(i)===-1?"":t}var Vs=/^\s+\d+(\.\d+)?[wx]$/;function js(e){let n=e.split(","),t=[];for(let r=0;r<n.length;r++){let o=n[r].trim();if(!o)continue;let i=o.match(/^(\S+)(\s+.+)?$/);if(!i||i[2]!==void 0&&!Vs.test(i[2]))continue;let s=fn(i[1]);s&&t.push(i[2]?`${s}${i[2]}`:s)}return t.join(", ")}var Ws=/[(:@\\]/;function Ks(e){return e===" "||e===" "||e===`
|
|
2
2
|
`||e==="\r"||e==="\f"}function dn(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"}function Us(e){let n="";for(let t=0;t<e.length;t++){let r=e[t];if(r!=="\\"){n+=r;continue}if(t+1>=e.length)break;let o=e[t+1];if(o===`
|
|
3
3
|
`||o==="\f"){t+=1;continue}if(o==="\r"){t+=e[t+2]===`
|
|
4
4
|
`?2:1;continue}if(dn(o)){let i="",s=t+1;for(;s<e.length&&i.length<6&&dn(e[s]);)i+=e[s],s++;s<e.length&&Ks(e[s])&&(s+=e[s]==="\r"&&e[s+1]===`
|
|
5
|
-
`?2:1);let a=Number.parseInt(i,16),c=a===0||a>1114111||a>=55296&&a<=57343;n+=c?"\uFFFD":String.fromCodePoint(a),t=s-1;continue}n+=o,t+=1}return n}function me(e){if(!Ws.test(e))return e;let t=(e.includes("\\")?Us(e):e).toLowerCase().replace(/\s+/g,"");return t.includes("url(")||t.includes("expression(")||t.includes("javascript:")||t.includes("vbscript:")||t.includes("-moz-binding")||t.includes("behavior:")||t.includes("@import")||t.includes("image-set(")||t.includes("filter:progid")?"":e}function Fe(e){let n=String(e);if(n.trim()==="")return"";if(typeof document>"u")return me(n)===""?"":n;let t=document.createElement("div");try{t.style.cssText=n}catch{return""}let r=[];for(let o=0;o<t.style.length;o++){let i=t.style[o],s=t.style.getPropertyValue(i);if(me(s)===""||me(`${i}:${s}`)==="")continue;let a=t.style.getPropertyPriority(i);r.push(`${i}: ${s}${a?` !${a}`:""}`)}return r.join("; ")}var Js=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),Gs=new Set(["srcdoc"]);function pn(e){return Gs.has(e.toLowerCase())}function mn(e,n){let t=e.toLowerCase();return t==="srcset"?js(n):Js.has(t)?fn(n):t==="style"?Fe(n):n}var bn=_(),Ys="http://www.w3.org/1999/xhtml",Zs="http://www.w3.org/2000/svg",Qs="http://www.w3.org/1999/xlink",Xs="http://www.w3.org/XML/1998/namespace",ea=new Set(["checked","disabled","selected"]);function ta(e){return e.namespaceURI===null||e.namespaceURI===Ys}function gn(e,n,t){e[n]=t}function na(e,n){if(e.namespaceURI!==Zs)return null;let t=n.toLowerCase();return t.startsWith("xlink:")?Qs:t.startsWith("xml:")?Xs:null}function V(e,n,t,r={}){let o=na(e,n),i=o?n.slice(n.indexOf(":")+1):n;if(be(n))return bn&&R(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${n}". Its value would be evaluated as JavaScript. Use on:{ ${n.slice(2)}: fn } instead.`),o?e.removeAttributeNS(o,i):e.removeAttribute(n),!1;if(t==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(n),!0;if(pn(n))return bn&&R(`${r.label??"setSafeAttribute"}: refusing to set "${n}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(n),!1;let s=ta(e),a=s?n.toLowerCase():n;if(typeof t=="boolean")return s&&ea.has(a)&&a in e?gn(e,a,t):t?o?e.setAttributeNS(o,n,""):e.setAttribute(n,""):o?e.removeAttributeNS(o,i):e.removeAttribute(n),!0;let c=String(t);if(r.syncValueProperty!==!1&&s&&(a==="value"||a==="checked")&&a in e)return gn(e,a,a==="checked"?!!t:c),!0;let l=mn(n,c);return(o?e.getAttributeNS(o,i):e.getAttribute(n))===l||(o?e.setAttributeNS(o,n,l):e.setAttribute(n,l)),!0}var ra=4096,ct=[];function oa(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function ia(e,n,t){let r=ct.pop();if(r)return r.sig=e,r.sub=n,r.epoch=t,r;let o=oa();return o.sig=e,o.sub=n,o.epoch=t,o}function hn(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,ct.length<ra&&ct.push(e)}function sa(e,n){let t=e.subsHead??null;n.sigPrev=null,n.sigNext=t,t?t.sigPrev=n:e.subsTail=n,e.subsHead=n,e.__sc=(e.__sc??0)+1}function yn(e){let n=e.sig;if(!n)return;let t=e.sigPrev,r=e.sigNext;t?t.sigNext=r:n.subsHead=r,r?r.sigPrev=t:n.subsTail=t,n.__sc=(n.__sc??1)-1,n.__activeNode===e&&(n.__activeNode=e.prevActive),n.__sc===0&&(n.subsHead=null,n.subsTail=null)}function aa(e,n){let t=e.depsTail??null;n.subPrev=t,n.subNext=null,t?t.subNext=n:e.depsHead=n,e.depsTail=n}function ca(e){let n=e.sub;if(!n)return;let t=e.subPrev,r=e.subNext;t?t.subNext=r:n.depsHead=r,r?r.subPrev=t:n.depsTail=t}var W=null,ut=null,ee=0,te=[],j=new Set,ua=[];function la(e){try{e()}catch(n){let t=e;A(n,{phase:t._errorPhase??"effect",name:t.__name,node:t._errorNode})}}function da(e){let n=e.depsHead??null;if(n===null)return!0;for(;n!==null;){let t=n.sig;if(t===null)return!0;if(t._d===!0&&t._validate!==void 0)try{t._validate()}catch{return!0}if(n.depVersion!==t.__v)return!0;n=n.subNext}return!1}var ze=0,dt=!1;function ft(){ze===0&&(ut=W,W=null,dt=!0),ze++}function pt(){ze--,ze===0&&(W=ut,ut=null,dt=!1)}function vn(){return dt}function xn(e){ft();try{return e()}finally{pt()}}var fa=0;function mt(e,n){let t=W;W=n;let r=n,o=++fa;r._epoch=o,r._structDirty=!1;for(let i=r.depsHead??null;i!==null;i=i.subNext){let s=i.sig;i.prevActive=s.__activeNode??null,s.__activeNode=i}try{e()}finally{W=t;let i=r.depsHead??null;for(;i!==null;){let s=i.subNext,a=i.sig;a.__activeNode=i.prevActive,i.prevActive=null,i.epoch!==o&&(ca(i),yn(i),hn(i)),i=s}}}function Sn(e,n){if(!n)return bt(e);_e(n);let t=W;W=n;try{e()}finally{W=t;let o=n;for(let i=o.depsHead??null;i!==null;i=i.subNext){let s=i.sig;s.__activeNode=i.prevActive,i.prevActive=null}}let r=n;return r._dispose??(r._dispose=()=>_e(n))}function bt(e,n){let t=()=>{let o=r;if(!(o._disposed||o._reentrant)){o._reentrant=!0;try{mt(e,r)}finally{o._reentrant=!1}}},r=t;return r.depsHead=null,r.depsTail=null,r._epoch=0,r._structDirty=!1,r._hasComputedDep=!1,r._runEpoch=0,r._runs=0,r._reentrant=!1,r._disposed=!1,r._errorPhase="binding",r._errorNode=n,t(),r._dispose??(r._dispose=()=>{r._disposed=!0,r._errorNode=void 0,_e(r)})}function Tn(e){if(!W)return;let n=W,t=e,r=n._epoch??0,o=t.__activeNode??null;if(o!==null&&o.sub===n){o.epoch=r,o.depVersion=t.__v??Number.NaN;return}t._validate!==void 0&&(n._hasComputedDep=!0);let i=ia(e,n,r);i.depVersion=t.__v??Number.NaN,i.prevActive=o,t.__activeNode=i,aa(n,i),sa(t,i),n._structDirty=!0}function _e(e){let n=e,t=n.depsHead??null;for(n.depsHead=null,n.depsTail=null;t;){let r=t.subNext;yn(t),hn(t),t=r}}var qe=1e3,Ve=1e6,je=0,ae=new Set;function En(e){let n=qe;return Number.isFinite(e)&&e>0&&(qe=Math.floor(e)),n}function wn(e){let n=Ve;return Number.isFinite(e)&&e>0&&(Ve=Math.floor(e)),n}function pa(e){let n=e;return n._runEpoch!==je?(n._runEpoch=je,n._runs=1,!1):(n._runs=(n._runs??0)+1,n._runs>qe)}function ma(e){let n=e.__name??"<unnamed>";A(new Error(`subscriber "${n}" fired more than ${qe} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:n})}function ba(){A(new Error(`Notification drain exceeded ${Ve} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function kn(){let e=0;for(;e<te.length;){if(e>=Ve){ba();break}let n=te[e++];if(j.delete(n),!(ae.size>0&&ae.has(n))&&!(n._hasComputedDep===!0&&!da(n))){if(pa(n)){ma(n),ae.add(n);continue}la(n)}}}function An(){if(!(ee>0)){ee++,je++;try{kn()}finally{ee--,ee===0&&(te.length=0,j.clear(),ae.size>0&&ae.clear())}}}function lt(e){e();let n=e._sig;if(!n)return;let t=ua,r=t.length;for(t.push(n);t.length>r;){let i=t.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?a._d||(a._d=!0,t.push(a)):s()}else j.has(s)||(j.add(s),te.push(s));i=i.sigNext}}}function _n(e){let t=e.subsHead??null;for(;t;){let r=t.sub;r&&(r._c?lt(r):j.has(r)||(j.add(r),te.push(r))),t=t.sigNext}}function Cn(e){let t=e.subsHead;if(t){if(ee>0){let r=t;for(;r;){let o=r.sub;o&&(o._c?lt(o):j.has(o)||(j.add(o),te.push(o))),r=r.sigNext}return}ee++,je++;try{let r=t;for(;r;){let o=r.sub;o&&(o._c?lt(o):j.has(o)||(j.add(o),te.push(o))),r=r.sigNext}kn()}finally{ee--,ee===0&&(te.length=0,j.clear(),ae.size>0&&ae.clear())}}}function Nn(e){return e.__sc??0}function Ln(e){let n=e,t=[],r=n.depsHead??null;for(;r;)r.sig&&t.push(r.sig),r=r.subNext;return t}function Rn(e,n){let t=e.subsHead??null;for(;t;){let r=t.sub;r&&n(r),t=t.sigNext}}var ha=_(),Mn="4.0.0",Hn=Symbol.for("sibujs.reactive.v1");function ya(){let e=globalThis,n=e[Hn];if(n)return ha&&!n.__dupWarned&&(n.__dupWarned=!0,R(`Multiple instances of the reactive runtime detected on this page (active: ${n.version}, duplicate: ${Mn}). Reactivity still works \u2014 all copies share the first one \u2014 but de-duplicate sibujs in your bundler (e.g. Vite optimizeDeps.exclude: ['sibujs'] or resolve.dedupe: ['sibujs']).`)),n;let t={suspendTracking:ft,resumeTracking:pt,isTrackingSuspended:vn,untracked:xn,retrack:mt,track:Sn,reactiveBinding:bt,recordDependency:Tn,cleanup:_e,setMaxSubscriberRepeats:En,setMaxDrainIterations:wn,drainNotificationQueue:An,queueSignalNotification:_n,notifySubscribers:Cn,getSubscriberCount:Nn,getSubscriberDeps:Ln,forEachSubscriber:Rn,version:Mn};return e[Hn]=t,t}var $=ya(),Ce=$.suspendTracking,Ne=$.resumeTracking,Dn=$.isTrackingSuspended,ge=$.untracked,Y=$.retrack,H=$.track,Le=$.reactiveBinding,he=$.recordDependency,On=$.cleanup,Ec=$.setMaxSubscriberRepeats,gt=$.setMaxDrainIterations,Pn=$.drainNotificationQueue,$n=$.queueSignalNotification,ye=$.notifySubscribers,wc=$.getSubscriberCount,kc=$.getSubscriberDeps,Ac=$.forEachSubscriber;function We(e,n,t){if(be(n))return V(e,n,"",{label:`bindAttribute("${n}")`}),()=>{};function r(){let o;try{o=t()}catch(i){A(i,{phase:"binding",name:`bindAttribute("${n}")`,node:e});return}V(e,n,o,{label:`bindAttribute("${n}")`})}return Le(r,e)}function ht(e,n,t){let r=null;function o(){let s;try{s=typeof n=="function"?n():n}catch(c){A(c,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof t=="function"?t():t}catch(c){A(c,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),V(e,s,a,{label:"bindDynamic"})&&(r=s)}let i=Le(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var va=_();function ce(e,n){let t=[];function r(){let o;try{o=n()}catch(l){A(l,{phase:"binding",name:"bindChildNode",node:e});return}if(o==null||typeof o=="boolean"){for(let l=0;l<t.length;l++){let u=t[l];M(u),u.parentNode&&u.parentNode.removeChild(u)}t.length=0;return}let i=e.parentNode;if(!i){t.length=0;return}let s;if(Array.isArray(o)){s=[];let l=new Set;for(let u=0;u<o.length;u++){let f=o[u];if(f==null||typeof f=="boolean")continue;let b=f instanceof Node?f:document.createTextNode(String(f));if(l.has(b)){va&&R("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}l.add(b),s.push(b)}}else s=[o instanceof Node?o:document.createTextNode(String(o))];let a;if(t.length>0&&s.length>0){let l=new Set(t);a=new Set;for(let u=0;u<s.length;u++)l.has(s[u])&&a.add(s[u])}for(let l=0;l<t.length;l++){let u=t[l];a?.has(u)||(M(u),u.parentNode&&u.parentNode.removeChild(u))}let c=e;for(let l=0;l<s.length;l++){let u=s[l];c.nextSibling!==u&&i.insertBefore(u,c.nextSibling),c=u}t=s}return Le(r,e)}var N="http://www.w3.org/2000/svg",yt=_(),xa=new Set(["script","iframe","object","embed","frame","frameset"]);function Sa(e){return xa.has(e.toLowerCase())}var Ta=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);function Ea(e){let n=e.trim();if(!n)return!1;let t=n.split(/\s+/),r=!1;for(let o=0;o<t.length;o++){let i=t[o];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(i))return!1;/[-:/0-9]/.test(i)&&(r=!0)}return r}var In=new Map;function wa(e){let n=In.get(e);return n!==void 0||(n=e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),In.set(e,n)),n}function ka(e,n){if(typeof n=="function"){let r=H(()=>{e.setAttribute("style",Fe(String(n())))});S(e,r);return}if(typeof n=="string"){e.setAttribute("style",Fe(n));return}let t=e;for(let r in n){let o=n[r],i=wa(r);if(typeof o=="function"){let s=o,a=H(()=>{t.style.setProperty(i,me(String(s())))});S(e,a)}else t.style.setProperty(i,me(String(o)))}}function Aa(e,n){if(typeof n=="string"){e.setAttribute("class",n);return}if(typeof n=="function"){let i=H(()=>{e.setAttribute("class",n())});S(e,i);return}let t=n,r=!1,o="";for(let i in t){let s=t[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=H(()=>{let a="";for(let c in t){let l=t[c];(typeof l=="function"?l():l)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)});S(e,s)}else e.setAttribute("class",o)}function vt(e,n){if(typeof n=="string"){e.textContent=n;return}if(typeof n=="number"){e.textContent=String(n);return}if(!(typeof n=="boolean"||n==null)){if(typeof n=="function"){let t=document.createComment("");e.appendChild(t),S(e,ce(t,n));return}if(n instanceof Node){e.appendChild(n);return}if(Array.isArray(n))for(let t=0;t<n.length;t++){let r=n[t];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),S(e,ce(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),S(e,ce(s,i))}else i instanceof Node?e.appendChild(i):i!=null&&typeof i!="boolean"&&e.appendChild(document.createTextNode(String(i)))}else r!=null&&typeof r!="boolean"&&e.appendChild(document.createTextNode(String(r)))}}}var d=(e,n)=>{let t=Sa(e);return(r,o)=>{if(t)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);let i=n?document.createElementNS(n,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),vt(i,o),i):(yt&&Ea(r)&&R(`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return vt(i,r),i;let s=r,a=s.class;a!=null&&Aa(i,a);let c=s.id;c!=null&&(yt&&typeof c=="string"&&Ta.has(c.toLowerCase())&&R(`tagFactory: element id="${c}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=c);let l=o!==void 0?o:s.nodes;l!=null&&vt(i,l);let u=s.on;if(u)for(let m in u){let p=u[m];typeof p=="function"?i.addEventListener(m,p):yt&&R(`tagFactory: on.${m} handler is not a function (got ${typeof p}). Event listener was not attached.`)}let f=s.style;f!=null&&ka(i,f);let b=s.ref;b&&(b.current=i);for(let m in s)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let p=s[m];if(p==null||be(m))continue;typeof p=="function"?S(i,We(i,m,p)):V(i,m,p,{syncValueProperty:!1,label:"tagFactory"})}}return s.onElement&&typeof s.onElement=="function"&&s.onElement(i),i}};var Uc=d("html"),Bn=d("head"),Fn=d("body"),zn=d("title"),k=d("div"),D=d("span"),qn=d("section"),Vn=d("article"),jn=d("header"),Wn=d("footer"),Kn=d("nav"),Un=d("main"),Jn=d("aside"),Gn=d("address"),Ke=d("p"),Yn=d("h1"),Zn=d("h2"),Ue=d("h3"),Qn=d("h4"),Xn=d("h5"),er=d("h6"),tr=d("blockquote"),nr=d("dd"),rr=d("dl"),or=d("dt"),ir=d("figcaption"),sr=d("figure"),ar=d("hr"),cr=d("li"),ur=d("ol"),lr=d("ul"),Je=d("pre"),dr=d("a"),fr=d("abbr"),pr=d("b"),mr=d("bdi"),br=d("bdo"),gr=d("br"),hr=d("cite"),Ge=d("code"),yr=d("data"),vr=d("dfn"),xr=d("em"),Sr=d("i"),Tr=d("kbd"),Er=d("mark"),wr=d("q"),kr=d("rp"),Ar=d("rt"),_r=d("ruby"),Cr=d("s"),Nr=d("samp"),Lr=d("small"),Rr=d("strong"),Mr=d("sub"),Hr=d("sup"),Dr=d("time"),Or=d("u"),Pr=d("var"),$r=d("area"),Ir=d("audio"),Br=d("img"),Fr=d("map"),zr=d("track"),qr=d("video"),Vr=d("embed"),jr=d("iframe"),Wr=d("object"),Kr=d("param"),Ur=d("picture"),Jr=d("portal"),Gr=d("source"),Yr=d("svg",N),Zr=d("math"),Qr=d("canvas"),Xr=d("noscript"),eo=d("script"),to=d("del"),no=d("ins"),ro=d("caption"),oo=d("col"),io=d("colgroup"),so=d("table"),ao=d("tbody"),co=d("td"),uo=d("tfoot"),lo=d("th"),fo=d("thead"),po=d("tr"),ve=d("button"),mo=d("datalist"),bo=d("fieldset"),go=d("form"),ho=d("input"),yo=d("label"),vo=d("legend"),xo=d("meter"),So=d("optgroup"),To=d("option"),Eo=d("output"),wo=d("progress"),ko=d("select"),Ao=d("textarea"),_o=d("details"),Co=d("dialog"),No=d("menu"),Lo=d("summary"),Ro=d("slot"),Mo=d("template"),Ho=d("base"),Do=d("link"),Oo=d("meta"),ne=d("style"),Po=d("circle",N),$o=d("ellipse",N),Io=d("g",N),Bo=d("line",N),Fo=d("path",N),zo=d("polygon",N),qo=d("polyline",N),Vo=d("rect",N),jo=d("text",N),Wo=d("tspan",N),Ko=d("defs",N),Uo=d("clipPath",N),Jo=d("mask",N),Go=d("pattern",N),Yo=d("linearGradient",N),Zo=d("radialGradient",N),Qo=d("stop",N),Xo=d("use",N),ei=d("symbol",N),ti=d("marker",N),ni=d("center"),ri=d("font"),oi=d("marquee"),ii=e=>d(e);var xt="__sibuPendingError";function si(e,n){let t=()=>e.parentNode?(A(n,{phase:"render",name:"lazy",node:e}),!0):!1;t()||queueMicrotask(()=>{t()||(e[xt]=n)})}function Re(e){let n=e,t=n[xt];if(t instanceof Error)return delete n[xt],t}function St(e){let n=null;return function(){if(n)return n();let r=k({class:"sibu-lazy"}),o=!1;return e().then(i=>{if(o)return;n=i.default;let s=n();q(r,s)}).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));q(r,k({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),si(r,s)}),r.appendChild(D("sibu-lazy-loading","Loading...")),S(r,()=>{o=!0}),r}}function Tt({nodes:e,fallback:n}){let t=k({class:"sibu-suspense"}),r=n();t.appendChild(r);let o=!1,i=null,s=null;return S(t,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!t.contains(s)&&M(s)}),queueMicrotask(()=>{if(!o)try{let a=e();if(s=a,a.classList.contains("sibu-lazy")){if(!a.querySelector(".sibu-lazy-loading")){q(t,a);return}i=new MutationObserver(()=>{if(o)return;a.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,q(t,a))}),i.observe(a,{childList:!0,subtree:!0})}else q(t,a)}catch(a){let c=a instanceof Error?a:new Error(String(a));si(t,c)}}),t}function At(e,n){try{return e()}catch(t){let r=n.toLowerCase().includes("unmount")?"cleanup":"effect";A(t,{phase:r,name:n});return}}function Et(e,n,t){let r=At(e,n);typeof r=="function"&&t&&S(t,r)}var xe=new WeakMap,ue=new WeakMap,Z=new Set,Q=new Set,Se=null,Ye=0,_a=256;function wt(e){let n=xe.get(e);if(n){xe.delete(e),Z.delete(e);for(let t of n)try{t()}catch{}}}function kt(e){ue.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let t=ue.get(e);if(t){ue.delete(e),Q.delete(e);for(let r of t)try{r()}catch{}}})}function Ca(e){if(Z.size===0||e.nodeType!==1)return;let n=e;if(Z.has(n)&&n.isConnected&&wt(n),n.firstElementChild)for(let t of Array.from(Z))t!==n&&t.isConnected&&n.contains(t)&&wt(t)}function Na(e){if(Q.size===0||e.nodeType!==1)return;let n=e;if(Q.has(n)&&!n.isConnected&&kt(n),n.firstElementChild)for(let t of Array.from(Q))t!==n&&!t.isConnected&&n.contains(t)&&kt(t)}function La(){if(Z.size>0)for(let e of Array.from(Z))e.isConnected&&wt(e);if(Q.size>0)for(let e of Array.from(Q))e.isConnected||kt(e)}function ai(){Se||typeof document>"u"||(Se=new MutationObserver(e=>{for(let n of e)if(n.type==="childList"){if(n.addedNodes.length>0)for(let t=0;t<n.addedNodes.length;t++)Ca(n.addedNodes[t]);if(n.removedNodes.length>0)for(let t=0;t<n.removedNodes.length;t++)Na(n.removedNodes[t])}Ye+=e.length,Ye>=_a&&(Ye=0,La()),_t()}),Se.observe(document.body,{childList:!0,subtree:!0}))}function _t(){Se&&Z.size===0&&Q.size===0&&(Se.disconnect(),Se=null,Ye=0)}function Ra(e,n){let t=xe.get(e);return t||(t=[],xe.set(e,t)),t.push(n),Z.add(e),ai(),()=>{let r=xe.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(xe.delete(e),Z.delete(e))}_t()}}function Ma(e,n){let t=ue.get(e);return t||(t=[],ue.set(e,t)),t.push(n),Q.add(e),ai(),()=>{let r=ue.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(ue.delete(e),Q.delete(e))}_t()}}function Me(e,n){if(!(typeof document>"u"))if(n){let t=!1;if(S(n,()=>{t=!0}),n.isConnected){queueMicrotask(()=>{t||Et(e,"onMount",n)});return}queueMicrotask(()=>{if(t)return;if(n.isConnected){Et(e,"onMount",n);return}let r=Ra(n,()=>{t||Et(e,"onMount",n)});S(n,r)})}else queueMicrotask(()=>{At(e,"onMount")})}function ci(e,n){if(typeof document>"u")return;let t=!1,r=()=>{t||(t=!0,At(e,"onUnmount"))};S(n,r);let o=()=>{if(t)return;let i=Ma(n,r);S(n,i)};n.isConnected?o():Me(()=>{o()},n)}function ui(e,n){S(n,e)}var Ct=Symbol.for("sibujs.ssr.v1");function Ha(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let n=null,t=process.getBuiltinModule;typeof t=="function"?n=t("node:async_hooks"):typeof rt=="function"&&(n=rt("async_hooks")),n&&(e=new n.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var le=globalThis[Ct]??(globalThis[Ct]=Ha()),He=le.als,U=le.fallbackStore;le.fallbackDepth??(le.fallbackDepth=0);var li=!1;function Da(){if(li||He||!(typeof process<"u"&&!!process.versions?.node))return;li=!0;let n=process.versions.node;R(`SSR request isolation is UNAVAILABLE on this runtime (Node ${n}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function re(){if(He){let e=He.getStore();if(e)return e}return U}function J(){return re().ssr}function Nt(e){if(!J())return null;let n=re(),t=n.caches??(n.caches=new Map),r=t.get(e);return r||(r=new Map,t.set(e,r)),r}function Lt(){re().ssr=!0}function Rt(){re().ssr=!1}function Mt(e){let n={ssr:!0,suspenseIdCounter:0,locale:void 0};if(He)return He.run(n,e);Da();let t=U.ssr,r=U.suspenseIdCounter,o=U.locale;U.ssr=!0,U.suspenseIdCounter=0,U.locale=void 0,le.fallbackDepth++;try{return e()}finally{le.fallbackDepth--,U.ssr=t,U.suspenseIdCounter=r,U.locale=o}}function Ht(e){let n=re(),t=n.ssr;n.ssr=!0;try{return e()}finally{t||(n.ssr=!1)}}var pi=globalThis;function mi(e,n){let t,r=!0;return()=>{let o=e();if(r)r=!1,t=o,ge(()=>n(o,void 0));else{let i=t;t=o,ge(()=>n(o,i))}}}var di=100;function Dt(e){let n=e.userCleanups;if(n.length!==0){e.userCleanups=[];for(let t=n.length-1;t>=0;t--)try{n[t]()}catch(r){A(r,{phase:"cleanup"})}}}function fi(e){let n=1;do e.rerunPending=!1,e.userCleanups.length>0&&Dt(e),Y(e.bodyFn,e.subscriber);while(e.rerunPending&&++n<=di);e.rerunPending&&(e.rerunPending=!1,A(new Error(`effect re-requested itself ${di}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function Oa(e){if(e.disposed)return;e.disposed=!0;let n=pi.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(n)try{n.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Dt(e)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",t)}try{On(e.subscriber)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",t)}}function P(e,n){if(B(typeof e=="function","effect: argument must be a function."),J())return()=>{};let t={fn:e,onError:n?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};t.onCleanup=s=>{t.userCleanups.push(s)};let r=t.onError;t.bodyFn=r?()=>{try{t.fn(t.onCleanup)}catch(s){r(s)}}:()=>{t.fn(t.onCleanup)};let o=(()=>{if(!t.disposed){if(t.running){t.rerunPending=!0;return}t.running=!0;try{t.rerunPending=!1,t.userCleanups.length>0&&Dt(t),Y(t.bodyFn,o),t.rerunPending&&fi(t)}finally{t.running=!1,t.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,t.subscriber=o,t.running=!0;try{Y(t.bodyFn,t.subscriber),t.rerunPending&&fi(t)}finally{t.running=!1,t.rerunPending=!1}let i=pi.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("effect:create",{effectFn:e}),()=>Oa(t)}var De=0,Ot=new Set;function Pa(e){De++;try{return e()}finally{De--,De===0&&Ba()}}function $a(e){return De===0?!1:(Ot.add(e),!0)}function Ia(){return De>0}function Ba(){try{for(let e of Ot)$n(e)}finally{Ot.clear()}Pn()}var bi=Symbol.for("sibujs.reactive.batch.v1");function Fa(){let e=globalThis,n=e[bi];if(n)return n;let t={batch:Pa,enqueueBatchedSignal:$a,isBatching:Ia};return e[bi]=t,t}var Pt=Fa(),z=Pt.batch,oe=Pt.enqueueBatchedSignal,gi=Pt.isBatching;var $t=globalThis,Ze=_();function L(e,n){let t={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=Ze?n?.name:void 0,o=n?.equals;r&&(t.__name=r);function i(){return he(t),t.value}i.__signal=t,r&&(i.__name=r);let s;if(o?s=a=>{let c=t.value,l=typeof a=="function"?a(c):a;if(!o(c,l)){if(t.value=l,t.__v++,Ze){let u=$t.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&u.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:l})}oe(t)||ye(t)}}:Ze?s=a=>{let c=t.value,l=typeof a=="function"?a(c):a;if(Object.is(l,c))return;t.value=l,t.__v++;let u=$t.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&u.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:l}),oe(t)||ye(t)}:s=a=>{let c=t.value,l=typeof a=="function"?a(c):a;Object.is(l,c)||(t.value=l,t.__v++,oe(t)||ye(t))},Ze){let a=$t.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:t,name:r,getter:i,initial:e})}return[i,s]}var za=`
|
|
5
|
+
`?2:1);let a=Number.parseInt(i,16),c=a===0||a>1114111||a>=55296&&a<=57343;n+=c?"\uFFFD":String.fromCodePoint(a),t=s-1;continue}n+=o,t+=1}return n}function be(e){if(!Ws.test(e))return e;let t=(e.includes("\\")?Us(e):e).toLowerCase().replace(/\s+/g,"");return t.includes("url(")||t.includes("expression(")||t.includes("javascript:")||t.includes("vbscript:")||t.includes("-moz-binding")||t.includes("behavior:")||t.includes("@import")||t.includes("image-set(")||t.includes("filter:progid")?"":e}function Fe(e){let n=String(e);if(n.trim()==="")return"";if(typeof document>"u")return be(n)===""?"":n;let t=document.createElement("div");try{t.style.cssText=n}catch{return""}let r=[];for(let o=0;o<t.style.length;o++){let i=t.style[o],s=t.style.getPropertyValue(i);if(be(s)===""||be(`${i}:${s}`)==="")continue;let a=t.style.getPropertyPriority(i);r.push(`${i}: ${s}${a?` !${a}`:""}`)}return r.join("; ")}var Js=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),Gs=new Set(["srcdoc"]);function pn(e){return Gs.has(e.toLowerCase())}function mn(e,n){let t=e.toLowerCase();return t==="srcset"?js(n):Js.has(t)?fn(n):t==="style"?Fe(n):n}var bn=_(),Ys="http://www.w3.org/1999/xhtml",Zs="http://www.w3.org/2000/svg",Qs="http://www.w3.org/1999/xlink",Xs="http://www.w3.org/XML/1998/namespace",ea=new Set(["checked","disabled","selected"]);function ta(e){return e.namespaceURI===null||e.namespaceURI===Ys}function gn(e,n,t){e[n]=t}function na(e,n){if(e.namespaceURI!==Zs)return null;let t=n.toLowerCase();return t.startsWith("xlink:")?Qs:t.startsWith("xml:")?Xs:null}function V(e,n,t,r={}){let o=na(e,n),i=o?n.slice(n.indexOf(":")+1):n;if(ge(n))return bn&&R(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${n}". Its value would be evaluated as JavaScript. Use on:{ ${n.slice(2)}: fn } instead.`),o?e.removeAttributeNS(o,i):e.removeAttribute(n),!1;if(t==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(n),!0;if(pn(n))return bn&&R(`${r.label??"setSafeAttribute"}: refusing to set "${n}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(n),!1;let s=ta(e),a=s?n.toLowerCase():n;if(typeof t=="boolean")return s&&ea.has(a)&&a in e?gn(e,a,t):t?o?e.setAttributeNS(o,n,""):e.setAttribute(n,""):o?e.removeAttributeNS(o,i):e.removeAttribute(n),!0;let c=String(t);if(r.syncValueProperty!==!1&&s&&(a==="value"||a==="checked")&&a in e)return gn(e,a,a==="checked"?!!t:c),!0;let l=mn(n,c);return(o?e.getAttributeNS(o,i):e.getAttribute(n))===l||(o?e.setAttributeNS(o,n,l):e.setAttribute(n,l)),!0}var ra=4096,ct=[];function oa(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function ia(e,n,t){let r=ct.pop();if(r)return r.sig=e,r.sub=n,r.epoch=t,r;let o=oa();return o.sig=e,o.sub=n,o.epoch=t,o}function hn(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,ct.length<ra&&ct.push(e)}function sa(e,n){let t=e.subsHead??null;n.sigPrev=null,n.sigNext=t,t?t.sigPrev=n:e.subsTail=n,e.subsHead=n,e.__sc=(e.__sc??0)+1}function yn(e){let n=e.sig;if(!n)return;let t=e.sigPrev,r=e.sigNext;t?t.sigNext=r:n.subsHead=r,r?r.sigPrev=t:n.subsTail=t,n.__sc=(n.__sc??1)-1,n.__activeNode===e&&(n.__activeNode=e.prevActive),n.__sc===0&&(n.subsHead=null,n.subsTail=null)}function aa(e,n){let t=e.depsTail??null;n.subPrev=t,n.subNext=null,t?t.subNext=n:e.depsHead=n,e.depsTail=n}function ca(e){let n=e.sub;if(!n)return;let t=e.subPrev,r=e.subNext;t?t.subNext=r:n.depsHead=r,r?r.subPrev=t:n.depsTail=t}var W=null,ut=null,te=0,ne=[],j=new Set,ua=[];function la(e){try{e()}catch(n){let t=e;A(n,{phase:t._errorPhase??"effect",name:t.__name,node:t._errorNode})}}function da(e){let n=e.depsHead??null;if(n===null)return!0;for(;n!==null;){let t=n.sig;if(t===null)return!0;if(t._d===!0&&t._validate!==void 0)try{t._validate()}catch{return!0}if(n.depVersion!==t.__v)return!0;n=n.subNext}return!1}var ze=0,dt=!1;function ft(){ze===0&&(ut=W,W=null,dt=!0),ze++}function pt(){ze--,ze===0&&(W=ut,ut=null,dt=!1)}function vn(){return dt}function xn(e){ft();try{return e()}finally{pt()}}var fa=0;function mt(e,n){let t=W;W=n;let r=n,o=++fa;r._epoch=o,r._structDirty=!1;for(let i=r.depsHead??null;i!==null;i=i.subNext){let s=i.sig;i.prevActive=s.__activeNode??null,s.__activeNode=i}try{e()}finally{W=t;let i=r.depsHead??null;for(;i!==null;){let s=i.subNext,a=i.sig;a.__activeNode=i.prevActive,i.prevActive=null,i.epoch!==o&&(ca(i),yn(i),hn(i)),i=s}}}function Sn(e,n){if(!n)return bt(e);Ce(n);let t=W;W=n;try{e()}finally{W=t;let o=n;for(let i=o.depsHead??null;i!==null;i=i.subNext){let s=i.sig;s.__activeNode=i.prevActive,i.prevActive=null}}let r=n;return r._dispose??(r._dispose=()=>Ce(n))}function bt(e,n){let t=()=>{let o=r;if(!(o._disposed||o._reentrant)){o._reentrant=!0;try{mt(e,r)}finally{o._reentrant=!1}}},r=t;return r.depsHead=null,r.depsTail=null,r._epoch=0,r._structDirty=!1,r._hasComputedDep=!1,r._runEpoch=0,r._runs=0,r._reentrant=!1,r._disposed=!1,r._errorPhase="binding",r._errorNode=n,t(),r._dispose??(r._dispose=()=>{r._disposed=!0,r._errorNode=void 0,Ce(r)})}function Tn(e){if(!W)return;let n=W,t=e,r=n._epoch??0,o=t.__activeNode??null;if(o!==null&&o.sub===n){o.epoch=r,o.depVersion=t.__v??Number.NaN;return}t._validate!==void 0&&(n._hasComputedDep=!0);let i=ia(e,n,r);i.depVersion=t.__v??Number.NaN,i.prevActive=o,t.__activeNode=i,aa(n,i),sa(t,i),n._structDirty=!0}function Ce(e){let n=e,t=n.depsHead??null;for(n.depsHead=null,n.depsTail=null;t;){let r=t.subNext;yn(t),hn(t),t=r}}var qe=1e3,Ve=1e6,je=0,ce=new Set;function En(e){let n=qe;return Number.isFinite(e)&&e>0&&(qe=Math.floor(e)),n}function wn(e){let n=Ve;return Number.isFinite(e)&&e>0&&(Ve=Math.floor(e)),n}function pa(e){let n=e;return n._runEpoch!==je?(n._runEpoch=je,n._runs=1,!1):(n._runs=(n._runs??0)+1,n._runs>qe)}function ma(e){let n=e.__name??"<unnamed>";A(new Error(`subscriber "${n}" fired more than ${qe} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:n})}function ba(){A(new Error(`Notification drain exceeded ${Ve} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function kn(){let e=0;for(;e<ne.length;){if(e>=Ve){ba();break}let n=ne[e++];if(j.delete(n),!(ce.size>0&&ce.has(n))&&!(n._hasComputedDep===!0&&!da(n))){if(pa(n)){ma(n),ce.add(n);continue}la(n)}}}function An(){if(!(te>0)){te++,je++;try{kn()}finally{te--,te===0&&(ne.length=0,j.clear(),ce.size>0&&ce.clear())}}}function lt(e){e();let n=e._sig;if(!n)return;let t=ua,r=t.length;for(t.push(n);t.length>r;){let i=t.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?a._d||(a._d=!0,t.push(a)):s()}else j.has(s)||(j.add(s),ne.push(s));i=i.sigNext}}}function _n(e){let t=e.subsHead??null;for(;t;){let r=t.sub;r&&(r._c?lt(r):j.has(r)||(j.add(r),ne.push(r))),t=t.sigNext}}function Cn(e){let t=e.subsHead;if(t){if(te>0){let r=t;for(;r;){let o=r.sub;o&&(o._c?lt(o):j.has(o)||(j.add(o),ne.push(o))),r=r.sigNext}return}te++,je++;try{let r=t;for(;r;){let o=r.sub;o&&(o._c?lt(o):j.has(o)||(j.add(o),ne.push(o))),r=r.sigNext}kn()}finally{te--,te===0&&(ne.length=0,j.clear(),ce.size>0&&ce.clear())}}}function Nn(e){return e.__sc??0}function Ln(e){let n=e,t=[],r=n.depsHead??null;for(;r;)r.sig&&t.push(r.sig),r=r.subNext;return t}function Rn(e,n){let t=e.subsHead??null;for(;t;){let r=t.sub;r&&n(r),t=t.sigNext}}var ha=_(),Mn="4.0.1",Hn=Symbol.for("sibujs.reactive.v1");function ya(){let e=globalThis,n=e[Hn];if(n)return ha&&!n.__dupWarned&&(n.__dupWarned=!0,R(`Multiple instances of the reactive runtime detected on this page (active: ${n.version}, duplicate: ${Mn}). Reactivity still works \u2014 all copies share the first one \u2014 but de-duplicate sibujs in your bundler (e.g. Vite optimizeDeps.exclude: ['sibujs'] or resolve.dedupe: ['sibujs']).`)),n;let t={suspendTracking:ft,resumeTracking:pt,isTrackingSuspended:vn,untracked:xn,retrack:mt,track:Sn,reactiveBinding:bt,recordDependency:Tn,cleanup:Ce,setMaxSubscriberRepeats:En,setMaxDrainIterations:wn,drainNotificationQueue:An,queueSignalNotification:_n,notifySubscribers:Cn,getSubscriberCount:Nn,getSubscriberDeps:Ln,forEachSubscriber:Rn,version:Mn};return e[Hn]=t,t}var P=ya(),Ne=P.suspendTracking,Le=P.resumeTracking,Dn=P.isTrackingSuspended,he=P.untracked,Z=P.retrack,$=P.track,U=P.reactiveBinding,ye=P.recordDependency,On=P.cleanup,Ec=P.setMaxSubscriberRepeats,gt=P.setMaxDrainIterations,Pn=P.drainNotificationQueue,$n=P.queueSignalNotification,ve=P.notifySubscribers,wc=P.getSubscriberCount,kc=P.getSubscriberDeps,Ac=P.forEachSubscriber;function We(e,n,t){if(ge(n))return V(e,n,"",{label:`bindAttribute("${n}")`}),()=>{};function r(){let o;try{o=t()}catch(i){A(i,{phase:"binding",name:`bindAttribute("${n}")`,node:e});return}V(e,n,o,{label:`bindAttribute("${n}")`})}return U(r,e)}function ht(e,n,t){let r=null;function o(){let s;try{s=typeof n=="function"?n():n}catch(c){A(c,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof t=="function"?t():t}catch(c){A(c,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),V(e,s,a,{label:"bindDynamic"})&&(r=s)}let i=U(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var va=_();function ue(e,n){let t=[];function r(){let o;try{o=n()}catch(l){A(l,{phase:"binding",name:"bindChildNode",node:e});return}if(o==null||typeof o=="boolean"){for(let l=0;l<t.length;l++){let u=t[l];M(u),u.parentNode&&u.parentNode.removeChild(u)}t.length=0;return}let i=e.parentNode;if(!i){t.length=0;return}let s;if(Array.isArray(o)){s=[];let l=new Set;for(let u=0;u<o.length;u++){let f=o[u];if(f==null||typeof f=="boolean")continue;let b=f instanceof Node?f:document.createTextNode(String(f));if(l.has(b)){va&&R("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}l.add(b),s.push(b)}}else s=[o instanceof Node?o:document.createTextNode(String(o))];let a;if(t.length>0&&s.length>0){let l=new Set(t);a=new Set;for(let u=0;u<s.length;u++)l.has(s[u])&&a.add(s[u])}for(let l=0;l<t.length;l++){let u=t[l];a?.has(u)||(M(u),u.parentNode&&u.parentNode.removeChild(u))}let c=e;for(let l=0;l<s.length;l++){let u=s[l];c.nextSibling!==u&&i.insertBefore(u,c.nextSibling),c=u}t=s}return U(r,e)}var N="http://www.w3.org/2000/svg",yt=_(),xa=new Set(["script","iframe","object","embed","frame","frameset"]);function Sa(e){return xa.has(e.toLowerCase())}var Ta=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);function Ea(e){let n=e.trim();if(!n)return!1;let t=n.split(/\s+/),r=!1;for(let o=0;o<t.length;o++){let i=t[o];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(i))return!1;/[-:/0-9]/.test(i)&&(r=!0)}return r}var In=new Map;function wa(e){let n=In.get(e);return n!==void 0||(n=e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),In.set(e,n)),n}function ka(e,n){if(typeof n=="function"){let r=U(()=>{e.setAttribute("style",Fe(String(n())))},e);S(e,r);return}if(typeof n=="string"){e.setAttribute("style",Fe(n));return}let t=e;for(let r in n){let o=n[r],i=wa(r);if(typeof o=="function"){let s=o,a=U(()=>{t.style.setProperty(i,be(String(s())))},e);S(e,a)}else t.style.setProperty(i,be(String(o)))}}function Aa(e,n){if(typeof n=="string"){e.setAttribute("class",n);return}if(typeof n=="function"){let i=U(()=>{e.setAttribute("class",n())},e);S(e,i);return}let t=n,r=!1,o="";for(let i in t){let s=t[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=U(()=>{let a="";for(let c in t){let l=t[c];(typeof l=="function"?l():l)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)},e);S(e,s)}else e.setAttribute("class",o)}function vt(e,n){if(typeof n=="string"){e.textContent=n;return}if(typeof n=="number"){e.textContent=String(n);return}if(!(typeof n=="boolean"||n==null)){if(typeof n=="function"){let t=document.createComment("");e.appendChild(t),S(e,ue(t,n));return}if(n instanceof Node){e.appendChild(n);return}if(Array.isArray(n))for(let t=0;t<n.length;t++){let r=n[t];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),S(e,ue(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),S(e,ue(s,i))}else i instanceof Node?e.appendChild(i):i!=null&&typeof i!="boolean"&&e.appendChild(document.createTextNode(String(i)))}else r!=null&&typeof r!="boolean"&&e.appendChild(document.createTextNode(String(r)))}}}var d=(e,n)=>{let t=Sa(e);return(r,o)=>{if(t)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);let i=n?document.createElementNS(n,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),vt(i,o),i):(yt&&Ea(r)&&R(`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return vt(i,r),i;let s=r,a=s.class;a!=null&&Aa(i,a);let c=s.id;c!=null&&(yt&&typeof c=="string"&&Ta.has(c.toLowerCase())&&R(`tagFactory: element id="${c}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=c);let l=o!==void 0?o:s.nodes;l!=null&&vt(i,l);let u=s.on;if(u)for(let m in u){let p=u[m];typeof p=="function"?i.addEventListener(m,p):yt&&R(`tagFactory: on.${m} handler is not a function (got ${typeof p}). Event listener was not attached.`)}let f=s.style;f!=null&&ka(i,f);let b=s.ref;b&&(b.current=i);for(let m in s)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let p=s[m];if(p==null||ge(m))continue;typeof p=="function"?S(i,We(i,m,p)):V(i,m,p,{syncValueProperty:!1,label:"tagFactory"})}}return s.onElement&&typeof s.onElement=="function"&&s.onElement(i),i}};var Uc=d("html"),Bn=d("head"),Fn=d("body"),zn=d("title"),k=d("div"),H=d("span"),qn=d("section"),Vn=d("article"),jn=d("header"),Wn=d("footer"),Kn=d("nav"),Un=d("main"),Jn=d("aside"),Gn=d("address"),Ke=d("p"),Yn=d("h1"),Zn=d("h2"),Ue=d("h3"),Qn=d("h4"),Xn=d("h5"),er=d("h6"),tr=d("blockquote"),nr=d("dd"),rr=d("dl"),or=d("dt"),ir=d("figcaption"),sr=d("figure"),ar=d("hr"),cr=d("li"),ur=d("ol"),lr=d("ul"),Je=d("pre"),dr=d("a"),fr=d("abbr"),pr=d("b"),mr=d("bdi"),br=d("bdo"),gr=d("br"),hr=d("cite"),Ge=d("code"),yr=d("data"),vr=d("dfn"),xr=d("em"),Sr=d("i"),Tr=d("kbd"),Er=d("mark"),wr=d("q"),kr=d("rp"),Ar=d("rt"),_r=d("ruby"),Cr=d("s"),Nr=d("samp"),Lr=d("small"),Rr=d("strong"),Mr=d("sub"),Hr=d("sup"),Dr=d("time"),Or=d("u"),Pr=d("var"),$r=d("area"),Ir=d("audio"),Br=d("img"),Fr=d("map"),zr=d("track"),qr=d("video"),Vr=d("embed"),jr=d("iframe"),Wr=d("object"),Kr=d("param"),Ur=d("picture"),Jr=d("portal"),Gr=d("source"),Yr=d("svg",N),Zr=d("math"),Qr=d("canvas"),Xr=d("noscript"),eo=d("script"),to=d("del"),no=d("ins"),ro=d("caption"),oo=d("col"),io=d("colgroup"),so=d("table"),ao=d("tbody"),co=d("td"),uo=d("tfoot"),lo=d("th"),fo=d("thead"),po=d("tr"),xe=d("button"),mo=d("datalist"),bo=d("fieldset"),go=d("form"),ho=d("input"),yo=d("label"),vo=d("legend"),xo=d("meter"),So=d("optgroup"),To=d("option"),Eo=d("output"),wo=d("progress"),ko=d("select"),Ao=d("textarea"),_o=d("details"),Co=d("dialog"),No=d("menu"),Lo=d("summary"),Ro=d("slot"),Mo=d("template"),Ho=d("base"),Do=d("link"),Oo=d("meta"),re=d("style"),Po=d("circle",N),$o=d("ellipse",N),Io=d("g",N),Bo=d("line",N),Fo=d("path",N),zo=d("polygon",N),qo=d("polyline",N),Vo=d("rect",N),jo=d("text",N),Wo=d("tspan",N),Ko=d("defs",N),Uo=d("clipPath",N),Jo=d("mask",N),Go=d("pattern",N),Yo=d("linearGradient",N),Zo=d("radialGradient",N),Qo=d("stop",N),Xo=d("use",N),ei=d("symbol",N),ti=d("marker",N),ni=d("center"),ri=d("font"),oi=d("marquee"),ii=e=>d(e);var xt="__sibuPendingError";function si(e,n){let t=()=>e.parentNode?(A(n,{phase:"render",name:"lazy",node:e}),!0):!1;t()||queueMicrotask(()=>{t()||(e[xt]=n)})}function Re(e){let n=e,t=n[xt];if(t instanceof Error)return delete n[xt],t}function St(e){let n=null;return function(){if(n)return n();let r=k({class:"sibu-lazy"}),o=!1;return e().then(i=>{if(o)return;n=i.default;let s=n();q(r,s)}).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));q(r,k({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),si(r,s)}),r.appendChild(H("sibu-lazy-loading","Loading...")),S(r,()=>{o=!0}),r}}function Tt({nodes:e,fallback:n}){let t=k({class:"sibu-suspense"}),r=n();t.appendChild(r);let o=!1,i=null,s=null;return S(t,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!t.contains(s)&&M(s)}),queueMicrotask(()=>{if(!o)try{let a=e();if(s=a,a.classList.contains("sibu-lazy")){if(!a.querySelector(".sibu-lazy-loading")){q(t,a);return}i=new MutationObserver(()=>{if(o)return;a.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,q(t,a))}),i.observe(a,{childList:!0,subtree:!0})}else q(t,a)}catch(a){let c=a instanceof Error?a:new Error(String(a));si(t,c)}}),t}function At(e,n){try{return e()}catch(t){let r=n.toLowerCase().includes("unmount")?"cleanup":"effect";A(t,{phase:r,name:n});return}}function Et(e,n,t){let r=At(e,n);typeof r=="function"&&t&&S(t,r)}var Se=new WeakMap,le=new WeakMap,Q=new Set,X=new Set,Te=null,Ye=0,_a=256;function wt(e){let n=Se.get(e);if(n){Se.delete(e),Q.delete(e);for(let t of n)try{t()}catch{}}}function kt(e){le.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let t=le.get(e);if(t){le.delete(e),X.delete(e);for(let r of t)try{r()}catch{}}})}function Ca(e){if(Q.size===0||e.nodeType!==1)return;let n=e;if(Q.has(n)&&n.isConnected&&wt(n),n.firstElementChild)for(let t of Array.from(Q))t!==n&&t.isConnected&&n.contains(t)&&wt(t)}function Na(e){if(X.size===0||e.nodeType!==1)return;let n=e;if(X.has(n)&&!n.isConnected&&kt(n),n.firstElementChild)for(let t of Array.from(X))t!==n&&!t.isConnected&&n.contains(t)&&kt(t)}function La(){if(Q.size>0)for(let e of Array.from(Q))e.isConnected&&wt(e);if(X.size>0)for(let e of Array.from(X))e.isConnected||kt(e)}function ai(){Te||typeof document>"u"||(Te=new MutationObserver(e=>{for(let n of e)if(n.type==="childList"){if(n.addedNodes.length>0)for(let t=0;t<n.addedNodes.length;t++)Ca(n.addedNodes[t]);if(n.removedNodes.length>0)for(let t=0;t<n.removedNodes.length;t++)Na(n.removedNodes[t])}Ye+=e.length,Ye>=_a&&(Ye=0,La()),_t()}),Te.observe(document.body,{childList:!0,subtree:!0}))}function _t(){Te&&Q.size===0&&X.size===0&&(Te.disconnect(),Te=null,Ye=0)}function Ra(e,n){let t=Se.get(e);return t||(t=[],Se.set(e,t)),t.push(n),Q.add(e),ai(),()=>{let r=Se.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(Se.delete(e),Q.delete(e))}_t()}}function Ma(e,n){let t=le.get(e);return t||(t=[],le.set(e,t)),t.push(n),X.add(e),ai(),()=>{let r=le.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(le.delete(e),X.delete(e))}_t()}}function Me(e,n){if(!(typeof document>"u"))if(n){let t=!1;if(S(n,()=>{t=!0}),n.isConnected){queueMicrotask(()=>{t||Et(e,"onMount",n)});return}queueMicrotask(()=>{if(t)return;if(n.isConnected){Et(e,"onMount",n);return}let r=Ra(n,()=>{t||Et(e,"onMount",n)});S(n,r)})}else queueMicrotask(()=>{At(e,"onMount")})}function ci(e,n){if(typeof document>"u")return;let t=!1,r=()=>{t||(t=!0,At(e,"onUnmount"))};S(n,r);let o=()=>{if(t)return;let i=Ma(n,r);S(n,i)};n.isConnected?o():Me(()=>{o()},n)}function ui(e,n){S(n,e)}var Ct=Symbol.for("sibujs.ssr.v1");function Ha(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let n=null,t=process.getBuiltinModule;typeof t=="function"?n=t("node:async_hooks"):typeof rt=="function"&&(n=rt("async_hooks")),n&&(e=new n.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var de=globalThis[Ct]??(globalThis[Ct]=Ha()),He=de.als,J=de.fallbackStore;de.fallbackDepth??(de.fallbackDepth=0);var li=!1;function Da(){if(li||He||!(typeof process<"u"&&!!process.versions?.node))return;li=!0;let n=process.versions.node;R(`SSR request isolation is UNAVAILABLE on this runtime (Node ${n}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function oe(){if(He){let e=He.getStore();if(e)return e}return J}function G(){return oe().ssr}function Nt(e){if(!G())return null;let n=oe(),t=n.caches??(n.caches=new Map),r=t.get(e);return r||(r=new Map,t.set(e,r)),r}function Lt(){oe().ssr=!0}function Rt(){oe().ssr=!1}function Mt(e){let n={ssr:!0,suspenseIdCounter:0,locale:void 0};if(He)return He.run(n,e);Da();let t=J.ssr,r=J.suspenseIdCounter,o=J.locale;J.ssr=!0,J.suspenseIdCounter=0,J.locale=void 0,de.fallbackDepth++;try{return e()}finally{de.fallbackDepth--,J.ssr=t,J.suspenseIdCounter=r,J.locale=o}}function Ht(e){let n=oe(),t=n.ssr;n.ssr=!0;try{return e()}finally{t||(n.ssr=!1)}}var pi=globalThis;function mi(e,n){let t,r=!0;return()=>{let o=e();if(r)r=!1,t=o,he(()=>n(o,void 0));else{let i=t;t=o,he(()=>n(o,i))}}}var di=100;function Dt(e){let n=e.userCleanups;if(n.length!==0){e.userCleanups=[];for(let t=n.length-1;t>=0;t--)try{n[t]()}catch(r){A(r,{phase:"cleanup"})}}}function fi(e){let n=1;do e.rerunPending=!1,e.userCleanups.length>0&&Dt(e),Z(e.bodyFn,e.subscriber);while(e.rerunPending&&++n<=di);e.rerunPending&&(e.rerunPending=!1,A(new Error(`effect re-requested itself ${di}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function Oa(e){if(e.disposed)return;e.disposed=!0;let n=pi.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(n)try{n.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Dt(e)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",t)}try{On(e.subscriber)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",t)}}function O(e,n){if(B(typeof e=="function","effect: argument must be a function."),G())return()=>{};let t={fn:e,onError:n?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};t.onCleanup=s=>{t.userCleanups.push(s)};let r=t.onError;t.bodyFn=r?()=>{try{t.fn(t.onCleanup)}catch(s){r(s)}}:()=>{t.fn(t.onCleanup)};let o=(()=>{if(!t.disposed){if(t.running){t.rerunPending=!0;return}t.running=!0;try{t.rerunPending=!1,t.userCleanups.length>0&&Dt(t),Z(t.bodyFn,o),t.rerunPending&&fi(t)}finally{t.running=!1,t.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,t.subscriber=o,t.running=!0;try{Z(t.bodyFn,t.subscriber),t.rerunPending&&fi(t)}finally{t.running=!1,t.rerunPending=!1}let i=pi.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("effect:create",{effectFn:e}),()=>Oa(t)}var De=0,Ot=new Set;function Pa(e){De++;try{return e()}finally{De--,De===0&&Ba()}}function $a(e){return De===0?!1:(Ot.add(e),!0)}function Ia(){return De>0}function Ba(){try{for(let e of Ot)$n(e)}finally{Ot.clear()}Pn()}var bi=Symbol.for("sibujs.reactive.batch.v1");function Fa(){let e=globalThis,n=e[bi];if(n)return n;let t={batch:Pa,enqueueBatchedSignal:$a,isBatching:Ia};return e[bi]=t,t}var Pt=Fa(),z=Pt.batch,ie=Pt.enqueueBatchedSignal,gi=Pt.isBatching;var $t=globalThis,Ze=_();function L(e,n){let t={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=Ze?n?.name:void 0,o=n?.equals;r&&(t.__name=r);function i(){return ye(t),t.value}i.__signal=t,r&&(i.__name=r);let s;if(o?s=a=>{let c=t.value,l=typeof a=="function"?a(c):a;if(!o(c,l)){if(t.value=l,t.__v++,Ze){let u=$t.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&u.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:l})}ie(t)||ve(t)}}:Ze?s=a=>{let c=t.value,l=typeof a=="function"?a(c):a;if(Object.is(l,c))return;t.value=l,t.__v++;let u=$t.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&u.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:l}),ie(t)||ve(t)}:s=a=>{let c=t.value,l=typeof a=="function"?a(c):a;Object.is(l,c)||(t.value=l,t.__v++,ie(t)||ve(t))},Ze){let a=$t.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:t,name:r,getter:i,initial:e})}return[i,s]}var za=`
|
|
6
6
|
.sibu-error-display {
|
|
7
7
|
border: 1px solid var(--sibu-err-border, #e5484d);
|
|
8
8
|
border-radius: 10px;
|
|
@@ -183,11 +183,11 @@
|
|
|
183
183
|
border: 1px solid #3a3a4e;
|
|
184
184
|
}
|
|
185
185
|
.sibu-error-display .sibu-err-btn-reload:hover { background: #2a2b40; }
|
|
186
|
-
`,hi=!1;function qa(){if(hi||typeof document>"u")return;let e=
|
|
186
|
+
`,hi=!1;function qa(){if(hi||typeof document>"u")return;let e=re({nodes:za});document.head.appendChild(e),hi=!0}function Va(e){let n=[],t=e.split(`
|
|
187
187
|
`);for(let r of t){let o=r.trim(),i=o.match(/^at\s+(?:(.+?)\s+\((.+)\)|(.+))$/);if(i){n.push({fn:i[1]||"(anonymous)",loc:i[2]||i[3]||""});continue}let s=o.match(/^(.+?)@(.+)$/);s&&n.push({fn:s[1]||"(anonymous)",loc:s[2]||""})}return n}function yi(e){if(e instanceof Error){let n=e.code??e.name??"ERROR",t=e.message||"Unknown error",r=e.stack??"",o=Va(r),i=e.cause,s=i!=null?yi(i):null;return{code:n,message:t,stack:r,frames:o,cause:s}}return{code:"NON_ERROR",message:typeof e=="string"?e:JSON.stringify(e),stack:"",frames:[],cause:null}}function ja(e,n,t){let r=[];r.push(t),r.push(`[${e.code}] ${e.message}`),e.stack&&(r.push(""),r.push("Stack Trace:"),r.push(e.stack));let o=e.cause;for(;o;){if(r.push(""),r.push("Caused by:"),r.push(` [${o.code}] ${o.message}`),o.stack){let i=o.stack.split(`
|
|
188
188
|
`).map(s=>` ${s}`).join(`
|
|
189
189
|
`);r.push(i)}o=o.cause}if(n&&Object.keys(n).length>0){r.push(""),r.push("Metadata:");for(let[i,s]of Object.entries(n))r.push(` ${i}: ${String(s)}`)}return r.push(""),r.push("Environment:"),r.push(` Timestamp: ${new Date().toISOString()}`),typeof location<"u"&&r.push(` URL: ${location.href}`),typeof navigator<"u"&&navigator.userAgent&&r.push(` User Agent: ${navigator.userAgent}`),r.join(`
|
|
190
|
-
`)}function vi(e){let n=e.map((t,r)=>k({class:"sibu-err-frame",nodes:[
|
|
190
|
+
`)}function vi(e){let n=e.map((t,r)=>k({class:"sibu-err-frame",nodes:[H({class:"sibu-err-line",nodes:String(r+1)}),H({class:"sibu-err-fn",nodes:t.fn}),H({class:"sibu-err-loc",nodes:` \u2014 ${t.loc}`})]}));return Je({class:"sibu-err-stack",nodes:n})}function xi(e){return e?[k({class:"sibu-err-cause-label",nodes:"Caused by"}),k({class:"sibu-err-section",nodes:[k({class:"sibu-err-section-head",nodes:[H({nodes:`[${e.code}] ${e.message}`}),H({nodes:""})]}),e.frames.length>0?vi(e.frames):k({class:"sibu-err-stack",nodes:"(no stack)"})]}),...xi(e.cause)]:[]}function Wa(e){let n=[];for(let[r,o]of Object.entries(e)){n.push(document.createElement("dt")),n[n.length-1].textContent=r;let i=document.createElement("dd");i.textContent=o==null?"(null)":String(o),n.push(i)}let t=document.createElement("dl");t.className="sibu-err-meta";for(let r of n)t.appendChild(r);return t}function Qe(e){qa();let n=e.severity??"error",t=yi(e.error),r=e.alwaysShowDetails??_(),o=e.title??t.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=L("Copy"),c=xe({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let m=ja(t,e.metadata,o);typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(m).then(()=>{a("Copied!"),setTimeout(()=>a("Copy"),1500)},()=>{a("Copy failed"),setTimeout(()=>a("Copy"),1500)})}}}),l=k({class:"sibu-err-header",nodes:[Ge({class:"sibu-err-icon",nodes:t.code}),Ue({class:"sibu-err-title",nodes:o}),c,H({class:"sibu-err-timestamp",nodes:i})]}),u=[Ke({class:"sibu-err-message",nodes:t.message})];r&&t.frames.length>0&&u.push(k({class:"sibu-err-section",nodes:[k({class:"sibu-err-section-head",nodes:[H({nodes:"Stack Trace"})]}),vi(t.frames)]})),r&&u.push(...xi(t.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&u.push(k({class:"sibu-err-section",nodes:[k({class:"sibu-err-section-head",nodes:[H({nodes:"Metadata"})]}),Wa(e.metadata)]}));let f=[];e.onRetry&&f.push(xe({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&f.push(xe({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),f.length>0&&u.push(k({class:"sibu-err-actions",nodes:f}));let b=k({class:"sibu-err-body",nodes:u});return k({class:"sibu-error-display","data-severity":n,nodes:[l,b]})}var Ka=`
|
|
191
191
|
.sibu-error-boundary {
|
|
192
192
|
position: relative;
|
|
193
193
|
}
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
.sibu-error-fallback .sibu-error-btn-reload:hover {
|
|
342
342
|
background: #3a3a4e;
|
|
343
343
|
}
|
|
344
|
-
`,Ua=Symbol("sibujs.ErrorBoundary.resetKeyThrew"),Si=!1;function Ja(){if(!Si&&typeof document<"u"){let e=
|
|
344
|
+
`,Ua=Symbol("sibujs.ErrorBoundary.resetKeyThrew"),Si=!1;function Ja(){if(!Si&&typeof document<"u"){let e=re({nodes:Ka});document.head.appendChild(e),Si=!0}}function Ti(e,n){let t=typeof e=="function"?e:n,r=typeof e=="function"?{}:e,{fallback:o,onError:i,resetKeys:s}=r;Ja();let[a,c]=L(null),l=()=>{f(),c(null)},u=null,f=()=>{if(!u)return;let h=u;u=null,h()},b=h=>{let T=new Array(h.length);for(let E=0;E<h.length;E++)try{T[E]=h[E]()}catch(D){A(D,{phase:"effect",name:"ErrorBoundary.resetKeys"}),T[E]=Ua}return T},m=()=>{let h=s;if(!h||h.length===0)return;f();let T=null;u=O(()=>{let E=b(h);if(T===null){T=E;return}let D=E.length!==T.length;if(!D){for(let I=0;I<E.length;I++)if(!Object.is(E[I],T[I])){D=!0;break}}T=E,D&&l()})},p=h=>{let T=at(h);if(c(T),m(),i)try{i(T)}catch(E){A(E,{phase:"render",name:"ErrorBoundary onError callback"})}return T},g=(h,T)=>Qe({error:h,severity:"error",onRetry:T}),x=h=>{let T=o||g;try{return T(h,l)}catch(E){return queueMicrotask(()=>{A(E,{phase:"render",name:"ErrorBoundary fallback",node:y.parentNode?y:void 0})}),document.createComment("error-boundary-failed")}},y=k({class:"sibu-error-boundary",nodes:()=>{let h=a();if(h)return x(h);try{let T=t();if(T&&typeof T.then=="function"){let E=k({class:"sibu-error-async"});E.appendChild(H({class:"sibu-lazy-loading",nodes:"Loading..."}));let D=!1;return S(E,()=>{D=!0}),T.then(I=>{if(D){M(I);return}q(E,I)}).catch(I=>{if(D)return;let me=p(I);q(E,x(me))}),E}return T}catch(T){let E=p(T);return x(E)}}}),w=h=>{if(a())return;let E=h.detail?.error;E&&(h.preventDefault(),h.stopPropagation(),p(E))};return y.addEventListener("sibu:error-propagate",w),Me(()=>{let h=document.createTreeWalker(y,NodeFilter.SHOW_ELEMENT),T=[],E=h.currentNode;for(;E;){let D=Re(E);D&&T.push(D),E=h.nextNode()}if(T.length===1)p(T[0]);else if(T.length>1){let D=globalThis.AggregateError;p(D?new D(T,`${T.length} pre-mount errors caught by ErrorBoundary`):new Error(T.map(I=>I.message).join("; ")))}},y),S(y,()=>{f(),y.removeEventListener("sibu:error-propagate",w)}),y}var Ga=`
|
|
345
345
|
@keyframes sibu-spin {
|
|
346
346
|
to { transform: rotate(360deg); }
|
|
347
347
|
}
|
|
@@ -394,5 +394,5 @@
|
|
|
394
394
|
.sibu-loading-lg .sibu-loading-spinner { width: 40px; height: 40px; border-width: 4px; }
|
|
395
395
|
.sibu-loading-lg .sibu-loading-dot { width: 12px; height: 12px; }
|
|
396
396
|
.sibu-loading-lg .sibu-loading-dots { gap: 6px; }
|
|
397
|
-
`,Ei=!1;function Ya(){!Ei&&typeof document<"u"&&(document.head.appendChild(
|
|
398
|
-
`||t[r]==="\r");)r++}function s(){if(t.charCodeAt(r)!==0)return-1;let m=r;r++;let p=0;for(;r<o&&t.charCodeAt(r)!==0;)p=p*10+(t.charCodeAt(r)-48),r++;return r<o&&r++,p<0||p>=n?(r=m,-1):p}function a(){let m=r;for(;r<o;){let p=t.charCodeAt(r);if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57||p===45)r++;else break}return t.slice(m,r)}function c(){if(i(),t[r]!=="=")return{kind:"bool"};r++,i();let m=s();if(m>=0)return{kind:"expr",idx:m};let p=t[r];if(p==='"'||p==="'"){r++;let g=[],x=[],y="";for(;r<o&&t[r]!==p;){let w=s();w>=0?(g.push(y),y="",x.push(w)):y+=t[r++]}return r<o&&r++,g.push(y),x.length===0?{kind:"static",value:g[0]}:{kind:"mixed",statics:g,exprs:x}}{let g=[],x=[],y="";for(;r<o;){let w=t.charCodeAt(r);if(w===32||w===9||w===10||w===13||w===62)break;let h=s();h>=0?(g.push(y),y="",x.push(h)):y+=t[r++]}return g.push(y),x.length===0?{kind:"static",value:g[0]}:{kind:"mixed",statics:g,exprs:x}}}function l(){let m=[];for(;r<o&&(i(),!(t[r]===">"||t[r]==="/"));){let p=r;for(;r<o;){let y=t.charCodeAt(r);if(y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||y===45||y===58||y===95||y===46)r++;else break}let g=t.slice(p,r);if(!g)break;let x=c();g.startsWith("on:")?x.kind==="expr"&&m.push({t:3,name:g.slice(3),idx:x.idx}):x.kind==="bool"?m.push({t:4,name:g}):x.kind==="static"?m.push({t:0,name:g,value:x.value}):x.kind==="expr"?m.push({t:1,name:g,idx:x.idx}):x.kind==="mixed"&&m.push({t:2,name:g,statics:x.statics,exprs:x.exprs})}return m}function u(m){return m.replace(/\s+/g," ")}function f(m){let p="";for(;r<o&&t[r]!=="<";){let x=s();if(x>=0){let y=u(p);y&&m.push({t:1,value:y}),p="",m.push({t:2,idx:x})}else p+=t[r++]}let g=u(p);g&&m.push({t:1,value:g})}function b(){let m=[];for(;r<o&&!(t[r]==="<"&&r+1<o&&t[r+1]==="/");)if(t[r]==="<"){let p=t[r+1];if(p==="!"){if(t.startsWith("<!--",r)){let h=t.indexOf("-->",r+4);r=h===-1?o:h+3}else if(t.startsWith("<![CDATA[",r)){let h=t.indexOf("]]>",r+9);r=h===-1?o:h+3}else{let h=t.indexOf(">",r);r=h===-1?o:h+1}continue}if(p==="?"){let h=t.indexOf(">",r);r=h===-1?o:h+1;continue}if(!(p>="a"&&p<="z")&&!(p>="A"&&p<="Z")){m.push({t:1,value:"<"}),r++;continue}r++;let g=a(),x=l();i();let y=tc.has(g),w=t[r]==="/";if(w&&r++,r<o&&r++,y||w)m.push({t:0,el:{tag:g,svg:ji.has(g),attrs:x,children:[]}});else{let h=b();if(ec.has(g.toLowerCase())){for(let T=0;T<h.length;T++)if(h[T].t===2)throw new Error(`html: dynamic \${...} expressions are not allowed inside <${g}> (raw-text context). Build the content separately and append it as a Node.`)}t[r]==="<"&&r+1<o&&t[r+1]==="/"&&(r+=2,a(),i(),r<o&&t[r]===">"&&r++),m.push({t:0,el:{tag:g,svg:ji.has(g),attrs:x,children:h}})}}else f(m);return m}return b()}function Gt(e,n){let t=e.svg?document.createElementNS(N,e.tag):document.createElement(e.tag);for(let r=0;r<e.attrs.length;r++){let o=e.attrs[r];switch(o.t){case 0:t.setAttribute(o.name,o.value);break;case 1:{let i=o.name,s=n[o.idx];typeof s=="function"?S(t,We(t,i,s)):V(t,i,s,{syncValueProperty:!1,label:"html"});break}case 2:{let i=o.statics[0];for(let s=0;s<o.exprs.length;s++){let a=n[o.exprs[s]];i+=(a==null?"":String(a))+o.statics[s+1]}V(t,o.name,i,{syncValueProperty:!1,label:"html"});break}case 3:{let i=n[o.idx];typeof i=="function"?t.addEventListener(o.name,i):Xa&&R(`html: on:${o.name} handler is not a function (got ${typeof i}). Event listener was not attached.`);break}case 4:t.setAttribute(o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:t.appendChild(Gt(o.el,n));break;case 1:t.appendChild(document.createTextNode(o.value));break;case 2:{let i=n[o.idx];if(typeof i=="function"){let s=document.createComment("");t.appendChild(s),S(t,ce(s,i))}else if(i instanceof Node)t.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?t.appendChild(a):a!=null&&typeof a!="boolean"&&t.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&t.appendChild(document.createTextNode(String(i)));break}}}return t}function Yt(e,...n){let t=Wi.get(e);if(t||(t=nc(e),Wi.set(e,t)),t.length===1&&t[0].t===0)return Gt(t[0].el,n);let r=document.createElement("div");for(let o=0;o<t.length;o++){let i=t[o];switch(i.t){case 0:r.appendChild(Gt(i.el,n));break;case 1:r.appendChild(document.createTextNode(i.value));break;case 2:{let s=n[i.idx];if(s instanceof Node)r.appendChild(s);else if(typeof s=="function"){let a=document.createComment("bind:htm");r.appendChild(a),S(r,ce(a,s))}else if(Array.isArray(s))for(let a=0;a<s.length;a++){let c=s[a];c instanceof Node?r.appendChild(c):c!=null&&typeof c!="boolean"&&r.appendChild(document.createTextNode(String(c)))}else s!=null&&typeof s!="boolean"&&r.appendChild(document.createTextNode(String(s)));break}}}return r.childNodes.length===1&&r.firstChild instanceof Element?r.firstChild:r}function Ki(e,n,t){let r=document.createComment("keep-alive"),o=new Map,i=[],s=t?.max??10;s===0&&_()&&R("KeepAlive: unbounded cache (max: 0). Cached subtrees will never be evicted \u2014 set `max` to bound memory.");let a,c=null,l=!1,u=!1,f=()=>{if(u)return;let m=e(),p=r.parentNode;if(!p||l&&m===a)return;c?.parentNode&&p.removeChild(c),a=m;let g=o.get(m);if(g){let x=i.indexOf(m);x!==-1&&(i.splice(x,1),i.push(m))}else{let x=n[m];if(!x){c=null,l=!0;return}if(g=x(),g instanceof DocumentFragment){let y=document.createElement("div");y.style.display="contents",y.appendChild(g),g=y}if(o.set(m,g),i.push(m),s>0&&i.length>s){let y=i.shift(),w=o.get(y);w&&(M(w),w.parentNode&&w.parentNode.removeChild(w),o.delete(y))}}p.insertBefore(g,r.nextSibling),c=g,l=!0},b=H(f);return l||queueMicrotask(()=>{!l&&r.parentNode&&f()}),S(r,()=>{u=!0,b();for(let m of o.values())M(m),m.parentNode&&m.parentNode.removeChild(m);o.clear(),i.length=0,c=null}),r}function Ui(e,n){if(!n)throw new Error("[SibuJS mount] container element not found. Make sure the DOM element exists before calling mount().");B(typeof e=="function"||e instanceof Node,"mount: first argument must be a component function or a DOM Node.");let t=typeof performance<"u"?performance.now():0,r=typeof e=="function"?e():e,o=typeof performance<"u"?performance.now()-t:0;n.appendChild(r);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:r,container:n,duration:o}),{node:r,unmount(){i&&i.emit("app:unmount",{rootElement:r}),M(r),r.parentNode&&r.parentNode.removeChild(r)}}}function Ji(e,n){let t=document.createComment("portal"),r=n||document.body,o=null,i=!1;return queueMicrotask(()=>{if(!i)try{o=e(),r.appendChild(o)}catch(s){queueMicrotask(()=>{A(s,{phase:"render",name:"Portal",node:t.parentNode?t:void 0})})}}),S(t,()=>{i=!0,o&&(M(o),o.remove(),o=null)}),t}function Gi(e,n="default"){return e?.[n]}function Yi(e=[]){let[n,t]=L([...e]);return[n,{push(...o){t(i=>[...i,...o])},pop(){let o;return t(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return t(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){t(i=>[...o,...i])},splice(o,i=0,...s){let a=[];return t(c=>{let l=[...c];return a=l.splice(o,i,...s),l}),a},remove(o){t(i=>i.filter((s,a)=>a!==o))},removeWhere(o){t(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((a,c)=>c!==s)})},set(o){t([...o])},update(o,i){t(s=>s.map((a,c)=>c===o?i:a))},updateWhere(o,i){t(s=>s.map(a=>o(a)?i(a):a))},sort(o){t(i=>[...i].sort(o))},reverse(){t(o=>[...o].reverse())},filter(o){t(i=>i.filter(o))},map(o){t(i=>i.map(o))},clear(){t([])}}]}function Zi(e=[]){let n=[...e],t=null,r={__v:0};function o(){t=null,r.__v++,oe(r)||ye(r)}function i(){if(he(r),t===null){let a=n.slice();t=Object.freeze(a)}return t}return[i,{push(...a){a.length!==0&&(n.push(...a),o())},pop(){if(n.length===0)return;let a=n.pop();return o(),a},shift(){if(n.length===0)return;let a=n.shift();return o(),a},unshift(...a){a.length!==0&&(n.unshift(...a),o())},splice(a,c=0,...l){let u=n.splice(a,c,...l);return(u.length>0||l.length>0)&&o(),u},remove(a){a<0||a>=n.length||(n.splice(a,1),o())},removeWhere(a){let c=n.findIndex(a);c!==-1&&(n.splice(c,1),o())},set(a){n=[...a],o()},update(a,c){a<0||a>=n.length||Object.is(n[a],c)||(n[a]=c,o())},updateWhere(a,c){let l=!1;for(let u=0;u<n.length;u++)if(a(n[u])){let f=c(n[u]);Object.is(n[u],f)||(n[u]=f,l=!0)}l&&o()},sort(a){n.length<=1||(n.sort(a),o())},reverse(){n.length<=1||(n.reverse(),o())},filter(a){let c=n.filter(a);c.length!==n.length&&(n=c,o())},map(a){let c=!1;for(let l=0;l<n.length;l++){let u=a(n[l],l);Object.is(n[l],u)||(n[l]=u,c=!0)}c&&o()},clear(){n.length!==0&&(n=[],o())}}]}function Qi(e,n){let[t,r]=L(n),[o,i]=L(!1),[s,a]=L(null),[c,l]=L(0),u=0,f=!1,b=null,m=()=>{if(b===null)return;let g=b;b=null;try{g.abort()}catch{}},p=P(()=>{if(c(),f)return;m();let g=++u,x=typeof AbortController<"u"?new AbortController:null;b=x,z(()=>{i(!0),a(null)});let y=()=>f||g!==u,w;try{w=e({signal:x?x.signal:void 0})}catch(h){if(y())return;z(()=>{a(h),i(!1)});return}w.then(h=>{y()||(b=null,z(()=>{r(h),i(!1)}))},h=>{y()||(b=null,z(()=>{a(h),i(!1)}))})});return{value:t,loading:o,error:s,refresh:()=>{f||l(g=>g+1)},dispose:()=>{f||(f=!0,p(),m())}}}function Te(e,n,t){if(Object.is(e,n))return!0;if(e==null||n==null||typeof e!=typeof n||typeof e!="object")return!1;let r=e,o=n;if(r.constructor!==o.constructor)return!1;if(e instanceof Date)return e.getTime()===n.getTime();if(e instanceof RegExp){let c=n;return e.source===c.source&&e.flags===c.flags}t||(t=new Map);let i=t.get(r);if(i?.has(o))return!0;if(i||(i=new Set,t.set(r,i)),i.add(o),e instanceof Map){let c=n;if(e.size!==c.size)return!1;for(let[l,u]of e)if(!c.has(l)||!Te(u,c.get(l),t))return!1;return!0}if(e instanceof Set){let c=n;if(e.size!==c.size)return!1;for(let l of e)if(!c.has(l))return!1;return!0}if(e instanceof ArrayBuffer){let c=new Uint8Array(e),l=new Uint8Array(n);if(c.length!==l.length)return!1;for(let u=0;u<c.length;u++)if(c[u]!==l[u])return!1;return!0}if(e instanceof DataView){if(!(n instanceof DataView)||e.byteLength!==n.byteLength)return!1;for(let c=0;c<e.byteLength;c++)if(e.getUint8(c)!==n.getUint8(c))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){let c=e,l=n;if(c.length!==l.length)return!1;for(let u=0;u<c.length;u++)if(c[u]!==l[u])return!1;return!0}if(Array.isArray(e))return!Array.isArray(n)||e.length!==n.length?!1:e.every((c,l)=>Te(c,n[l],t));let s=Object.keys(r),a=Object.keys(o);return s.length!==a.length?!1:s.every(c=>Object.hasOwn(o,c)&&Te(r[c],o[c],t))}function Xi(e){return L(e,{equals:(n,t)=>Te(n,t)})}function Xe(e,n){B(typeof e=="function","derived: argument must be a getter function.");let t=n?.name,r=n?.equals,o={};o._d=!1,o._init=!1,o._g=e,o.__v=0;let i=()=>{o._d||(o._d=!0)};i._c=1,i._sig=o;let s=()=>{let f=e();o._v=r&&o._init&&r(o._v,f)?o._v:f,o._d=!1,o._init=!0};H(()=>{let f=!0;try{o._v=e(),o._d=!1,o._init=!0,f=!1}finally{f&&(o._d=!0)}},i);let a=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,c=!1,l=()=>{if(!o._d)return;let f=o._v;c=!0;try{Y(s,i),Object.is(f,o._v)||o.__v++}finally{c=!1}a&&!Object.is(f,o._v)&&a.emit("computed:update",{signal:o,oldValue:f,newValue:o._v})};o._validate=l;function u(){if(c)throw new Error(`[SibuJS] Circular dependency detected in derived${t?` "${t}"`:""}. A derived signal cannot read itself (directly or through a chain).`);return Dn()?(o._d&&l(),o._v):(o._d&&l(),he(o),o._v)}return t&&(u.__name=t,o.__name=t),u.__signal=o,a&&a.emit("computed:create",{signal:o,name:t,getter:u}),u}function es(e){let[n,t]=L(e);return{get current(){return n()},set current(r){t(r)}}}function ts(e){B(e!==null&&typeof e=="object"&&!Array.isArray(e),"store: argument must be a plain object. For arrays, use array() instead.");let n={};Object.keys(e).forEach(c=>{let[l,u]=L(e[c]);n[c]=[l,u]});let t=new Proxy({},{get(c,l){if(typeof l=="string"&&Object.hasOwn(n,l)){let u=n[l][0];return u()}return Reflect.get(c,l)},set(){throw new Error("[SibuJS store] Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),r=()=>{let c={};return Object.keys(n).forEach(l=>{c[l]=n[l][0]()}),c};return[t,{setState:c=>{let l=r(),u=typeof c=="function"?c(l):c;z(()=>{Object.entries(u).forEach(([f,b])=>{Object.hasOwn(n,f)&&n[f][1](b)})})},reset:()=>{z(()=>{Object.keys(e).forEach(c=>{let l=n[c][1];l(e[c])})})},subscribe:c=>{let l=!0;return P(()=>{let u=r();if(l){l=!1;return}Ce();try{c(u)}finally{Ne()}})},subscribeKey:(c,l)=>{let u,f=!0;return P(()=>{let b=n[c][0]();if(f){u=b,f=!1;return}if(!Object.is(b,u)){let m=u;u=b,Ce();try{l(b,m)}finally{Ne()}}})},getSnapshot:r}]}function ns(e,n){if(B(typeof e=="function","watch: first argument must be a getter function."),B(typeof n=="function","watch: second argument must be a callback function."),J())return()=>{};let t,r=!0;return H(()=>{let s=e();if(r){t=s,r=!1;return}if(!Object.is(s,t)){let a=t;t=s,Ce();try{n(s,a)}finally{Ne()}}})}function rs(e,n,t){return[Xe(e,t),i=>{z(()=>n(i))}]}function os(e){let n=e();return _()&&queueMicrotask(()=>{try{e()}catch(t){console.warn("[SibuJS strict] second run threw:",t)}}),n}function is(e){if(!_())return P(e);let n=P(e),t=null;return queueMicrotask(()=>{try{t=P(e)}catch(r){console.warn("[SibuJS strictEffect] second run threw:",r)}}),()=>{n(),t&&t()}}var Zt="data-sibu-enhanced",Qt=new WeakMap;function ss(e,n){let t=0;for(;e.length>0;){let r=e.splice(0);for(let o=0;o<r.length;o++){if(t>=ke){let i=r.length-o+e.length;e.length=0,Ae(n,t,i);return}t++;try{r[o]()}catch(i){typeof console<"u"&&console.error(`[SibuJS ${n}] teardown error:`,i)}}}}function as(e,n){if(n==null)return e;if(typeof n!="string")return n;let t=n.startsWith("@")?`[data-ref="${n.slice(1)}"]`:n;try{return e.querySelector(t)}catch{return null}}function rc(e){if(e instanceof HTMLInputElement){if(e.type==="checkbox")return e.checked;if(e.type==="number"||e.type==="range")return e.value===""?null:Number(e.value)}return e instanceof HTMLSelectElement&&e.multiple?Array.from(e.selectedOptions,n=>n.value):e.value}function oc(e,n){if(e instanceof HTMLInputElement&&e.type==="checkbox"){e.checked=!!n;return}if(e instanceof HTMLSelectElement&&e.multiple){let r=Array.isArray(n)?n.map(String):[];for(let o of Array.from(e.options))o.selected=r.includes(o.value);return}let t=n==null?"":String(n);e.value!==t&&(e.value=t)}function Oe(e,n){let t=typeof e=="string"?typeof document<"u"?document.querySelector(e):null:e;if(!t)return typeof console<"u"&&console.warn(`[SibuJS enhance] no element matched ${JSON.stringify(e)} \u2014 nothing enhanced.`),()=>{};if(t.getAttribute(Zt)==="true")return _()&&typeof console<"u"&&console.warn("[SibuJS enhance] element is already enhanced; ignoring re-enhance.",t),()=>{};let r=[],o=Symbol("sibujs.enhance"),i=!1,s=(u,f)=>{let b=as(t,u);if(!b){typeof console<"u"&&console.warn(`[SibuJS enhance] target ${JSON.stringify(u)} not found under`,t);return}f(b)},a={root:t,ref:u=>as(t,u),refs:u=>{let f=u.startsWith("@")?`[data-ref="${u.slice(1)}"]`:u;try{return Array.from(t.querySelectorAll(f))}catch{return[]}},on:(u,f,b,m)=>{s(u,p=>{let g=x=>b(x,p);p.addEventListener(f,g,m),r.push(()=>p.removeEventListener(f,g,m))})},text:(u,f)=>{s(u,b=>{r.push(P(()=>{let m=f(),p=m==null?"":String(m);b.textContent!==p&&(b.textContent=p)}))})},attr:(u,f,b)=>{s(u,m=>{r.push(P(()=>{let p=b(),g=p==null?null:String(p);V(m,f,g,{syncValueProperty:!1,label:"enhance attr()"})}))})},classed:(u,f,b)=>{s(u,m=>{r.push(P(()=>{m.classList.toggle(f,!!b())}))})},show:(u,f)=>{s(u,b=>{let m=b.hidden;r.push(P(()=>{b.hidden=!f()})),r.push(()=>{b.hidden=m})})},model:(u,f,b)=>{s(u,m=>{let p=m,[g,x]=f,y=b?.event??(p instanceof HTMLSelectElement||p instanceof HTMLInputElement&&(p.type==="checkbox"||p.type==="radio")?"change":"input");r.push(P(()=>{oc(p,g())}));let w=()=>x(rc(p));p.addEventListener(y,w),r.push(()=>p.removeEventListener(y,w))})},cleanup:u=>{r.push(u)}},c;try{c=n(a)}catch(u){throw ss(r,"enhance"),u}typeof c=="function"&&r.push(c);let l=()=>{i||(i=!0,Qt.get(t)===o&&(Qt.delete(t),t.removeAttribute(Zt)),Be(t,l),ss(r,"enhance"))};return S(t,l),Qt.set(t,o),t.setAttribute(Zt,"true"),l}function cs(e,n){if(typeof document>"u")return()=>{};let t=[];try{for(let r of Array.from(document.querySelectorAll(e)))t.push(Oe(r,n))}catch(r){for(let o=t.length-1;o>=0;o--)try{t[o]()}catch(i){typeof console<"u"&&console.error("[SibuJS enhanceAll] rollback error:",i)}throw t.length=0,r}return()=>{for(let r of t.splice(0))r()}}function us(e,n){let t=globalThis;return t[e]??(t[e]=n())}var ic=/^[A-Za-z0-9_-]+$/,ls=Symbol.for("sibujs.islands.lazy"),et=us(Symbol.for("sibujs.islands.registry.v1"),()=>new Map);function ds(e){return e[ls]=!0,e}function fs(e,n){if(!ic.test(e))throw new Error(`[SibuJS islands] name must match [A-Za-z0-9_-]+ (got: ${JSON.stringify(e.slice(0,32))})`);et.set(e,n)}function ps(e){et.delete(e)}async function sc(e){if(typeof e=="function"&&e[ls]){let n=await e(),t=n.default??n;return typeof t=="function"?t:null}return e}function ms(e=typeof document<"u"?document:null,n={}){if(!e||typeof e.querySelectorAll!="function")return()=>{};let t=[],r=[],o=!1;for(let i of Array.from(e.querySelectorAll("[data-sibu-island]"))){if(i.getAttribute("data-sibu-enhanced")==="true")continue;let s=i.getAttribute("data-sibu-island")??"";if(!et.has(s)){typeof console<"u"&&console.warn(`[SibuJS islands] no island registered for "${s}" \u2014 skipping. Call registerIsland("${s}", ...).`);continue}let a=!1,c=()=>{if(a||o)return;a=!0;let u=et.get(s);u&&sc(u).then(f=>{if(!o){if(!f){typeof console<"u"&&console.warn(`[SibuJS islands] "${s}" loader produced no setup.`);return}try{let b=Oe(i,f);if(o){b();return}r.push(b),i.setAttribute("data-sibu-hydrated","true")}catch(b){typeof console<"u"&&console.error(`[SibuJS islands] "${s}" failed to mount:`,b)}}}).catch(f=>{typeof console<"u"&&console.error(`[SibuJS islands] "${s}" failed to load:`,f)})},l=i.getAttribute("data-sibu-load")||"load";t.push(ac(l,i,c,n))}return()=>{o=!0;for(let i of t.splice(0))i();for(let i of r.splice(0))i()}}function ac(e,n,t,r){switch(e){case"idle":{if(typeof requestIdleCallback<"u"){let i=requestIdleCallback(t);return()=>cancelIdleCallback(i)}let o=setTimeout(t,1);return()=>clearTimeout(o)}case"visible":{if(typeof IntersectionObserver>"u")return queueMicrotask(t),()=>{};let o=new IntersectionObserver(i=>{for(let s of i)s.isIntersecting&&(o.disconnect(),t())},{rootMargin:r.rootMargin,threshold:r.threshold});return o.observe(n),()=>o.disconnect()}case"interaction":{let o=["pointerdown","focusin","keydown","touchstart"],i=()=>{s(),t()},s=()=>{for(let a of o)n.removeEventListener(a,i)};for(let a of o)n.addEventListener(a,i,{passive:!0});return s}case"media":{let o=n.getAttribute("data-sibu-media")||"(min-width: 0px)";if(typeof matchMedia>"u")return queueMicrotask(t),()=>{};let i=matchMedia(o);if(i.matches)return queueMicrotask(t),()=>{};let s=()=>{i.matches&&(i.removeEventListener("change",s),t())};return i.addEventListener("change",s),()=>i.removeEventListener("change",s)}default:return queueMicrotask(t),()=>{}}}var id=_();function Xt(e){return e}var sd=1024*1024;function gs(e){let[n,t]=L(e()),r=!1,o=!1,i=n(),s=()=>{r=!1,!o&&t(i)},a=()=>{r||(r=!0,queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(s):s()}))},c=H(()=>{i=e(),a()}),l=(()=>n());return l.dispose=()=>{o||(o=!0,c())},l}var bs=16;function cc(e){let n=globalThis;if(typeof n.requestIdleCallback=="function"){n.requestIdleCallback(e,{timeout:bs*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,bs)}function hs(){let[e,n]=L(!1);function t(r){n(!0),cc(()=>{let o;try{o=r()}catch{n(!1);return}o&&typeof o.then=="function"?o.then(()=>n(!1),()=>n(!1)):n(!1)})}return{pending:e,start:t}}function ys(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}typeof window<"u"&&(window.Sibu=en);return Rs(uc);})();
|
|
397
|
+
`,Ei=!1;function Ya(){!Ei&&typeof document<"u"&&(document.head.appendChild(re({nodes:Ga})),Ei=!0)}function wi(e={}){Ya();let{text:n,variant:t="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return t==="dots"?k({class:`sibu-loading${o}`,role:"status","aria-live":"polite","aria-label":n?void 0:"Loading",nodes:[k({class:"sibu-loading-dots",nodes:[H({class:"sibu-loading-dot"}),H({class:"sibu-loading-dot"}),H({class:"sibu-loading-dot"})]}),n?H({class:"sibu-loading-text",nodes:n}):null].filter(Boolean)}):k({class:`sibu-loading${o}`,role:"status","aria-live":"polite","aria-label":n?void 0:"Loading",nodes:[k({class:"sibu-loading-spinner"}),n?H({class:"sibu-loading-text",nodes:n}):null].filter(Boolean)})}var It=Symbol.for("sibujs.actions.v1"),ki=globalThis[It]??(globalThis[It]=new Map);function fe(e,n){ki.set(e,n)}function Bt(e){return ki.get(e)}function Ai(e,n,t){let r=typeof n=="string"?Bt(n):n;if(!r)throw new Error(`[SibuJS] No action registered under the name "${n}". Register it with registerAction() before applying it by name.`);let o=r(e,t);typeof o=="function"&&S(e,o)}var Ft=(e,n)=>{let t=r=>{e.contains(r.target)||n()};return document.addEventListener("pointerdown",t,!0),()=>document.removeEventListener("pointerdown",t,!0)},zt=(e,n)=>{let t=n.duration??500,r=null,o=()=>{r=setTimeout(()=>{n.callback(),r=null},t)},i=()=>{r!==null&&(clearTimeout(r),r=null)};return e.addEventListener("pointerdown",o),e.addEventListener("pointerup",i),e.addEventListener("pointerleave",i),()=>{i(),e.removeEventListener("pointerdown",o),e.removeEventListener("pointerup",i),e.removeEventListener("pointerleave",i)}},qt=(e,n)=>{let t=()=>{let r=typeof n=="function"?n():e.textContent??"";navigator.clipboard.writeText(r)};return e.addEventListener("click",t),()=>e.removeEventListener("click",t)},Vt=e=>{let n=()=>{e.style.overflow="hidden",e.style.height="auto",e.style.height=`${e.scrollHeight}px`};return n(),e.addEventListener("input",n),()=>e.removeEventListener("input",n)},jt=e=>{let n='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',t=r=>{if(r.key!=="Tab")return;let o=Array.from(e.querySelectorAll(n));if(o.length===0)return;let i=o[0],s=o[o.length-1];r.shiftKey&&document.activeElement===i?(r.preventDefault(),s.focus()):!r.shiftKey&&document.activeElement===s&&(r.preventDefault(),i.focus())};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)};fe("clickOutside",Ft);fe("longPress",zt);fe("copyOnClick",qt);fe("autoResize",Vt);fe("trapFocus",jt);var pe=null;function _i(e,n){try{let t=e();return t&&typeof t.then=="function"&&t.catch(r=>{n?n(r,"async"):pe?pe(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),t}catch(t){return n?n(t,"sync"):pe?pe(t,"sync"):console.error("Unhandled error in Sibu.catchError:",t),null}}async function Ci(e,n){try{return await e()}catch(t){return n?n(t,"async"):pe?pe(t,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",t),null}}function Ni(e){pe=e}var Li=_();function Ri(e){let[n,t]=L(e),r=i=>{!Li||!G()||R(`context.${i}() called during SSR. SibuJS context() is application-global \u2014 it is NOT isolated per request, so a concurrent request can observe this value. Do not use context() for request-specific SSR data; pass it explicitly or use request-scoped storage instead.`)};return{provide(i){r("provide");let s=n();return t(i),()=>t(s)},use(){return n},get(){return n()},set(i){r("set"),t(i)},withContext(i,s){r("withContext");let a=n();t(i);try{let c=s();return Li&&c!==null&&typeof c?.then=="function"&&R("context.withContext() received an async callback. Scoping is synchronous only \u2014 the previous value is restored as soon as the callback returns its promise, so anything after an `await` runs outside the scope."),c}finally{t(a)}}}}var Wt=Symbol.for("sibujs.createId.v1"),Kt=globalThis[Wt]??(globalThis[Wt]={n:0});function Mi(e="sibu"){return Kt.n++,`${e}-${Kt.n}`}function Hi(){Kt.n=0}function Di(e,n){return S(n,$(()=>{n.style.display=e()?"":"none"})),n}function Oi(e,n,t){let r=document.createComment("when"),o=null,i,s=!1,a=()=>{let c=e(),l=r.parentNode;if(!l||s&&c===i)return;i=c,o?.parentNode&&(M(o),o.parentNode.removeChild(o),o=null);let u=c?n():t?t():null;if(u!=null){let f=u instanceof Node?u:document.createTextNode(String(u));l.insertBefore(f,r.nextSibling),o=f}s=!0};return S(r,$(a)),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function Pi(e,n,t){let r=document.createComment("match"),o=null,i,s=!1,a=()=>{let c=String(e()),l=r.parentNode;if(!l||s&&c===i)return;i=c,o?.parentNode&&(M(o),o.parentNode.removeChild(o),o=null);let u=n[c]||t;if(u){let f=u();if(f!=null){let b=f instanceof Node?f:document.createTextNode(String(f));l.insertBefore(b,r.nextSibling),o=b}}s=!0};return S(r,$(a)),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}var Ut=new Map;function $i(e,n){Ut.set(e,n)}function Ii(e){Ut.delete(e)}function Jt(e){let n=Ut.get(e);return n?n():k({nodes:`[Component "${e}" not found]`})}function Bi(e){let n=k({class:"sibu-dynamic"});function t(){let o=e(),i;typeof o=="function"?i=o():i=Jt(o),q(n,i)}let r=$(t);return S(n,r),n}var Za=_();function Fi(e){return typeof e=="function"?Fi(e()):e instanceof Node?e:document.createTextNode(String(e))}function Qa(e,n){if(n===0)return[];let t=[],r=new Array(n);for(let a=0;a<n;a++){let c=e[a],l=0,u=t.length;for(;l<u;){let f=l+u>>1;e[t[f]]<c?l=f+1:u=f}t[l]=a,r[a]=l>0?t[l-1]:-1}let o=t.length,i=new Array(o),s=t[o-1];for(let a=o-1;a>=0;a--)i[a]=s,s=r[s];return i}function zi(e,n,t){B(typeof e=="function","each: first argument must be a function that returns an array."),B(typeof n=="function","each: second argument must be a render function."),B(t&&typeof t.key=="function","each: options.key must be a function that returns a unique key per item.");let r=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],a=i,c=0,l=new Map,u=new Map,f=[],b=[],m=[],p=0,g=[],x=[],y=new Uint8Array(0),w=new Map,h=[],T=[],E=new Map,D=!1,I=!1,me=!1,vs=t.key,tn=()=>{if(me)return;let K=e(),C=K.length,se=r.parentNode;if(!se)return;I||(se.insertBefore(o,r.nextSibling),I=!0),x.length<C&&(x=new Array(C));for(let v=0;v<C;v++)x[v]=vs(K[v]);let ee=x;g.length<C&&(g=new Array(C)),u.clear(),E.clear();for(let v=0;v<C;v++)Za&&E.has(ee[v])&&R(`each: duplicate key "${String(ee[v])}" at index ${v} (first seen at ${E.get(ee[v])}). Keys must be unique \u2014 duplicates cause rows to be dropped or mis-ordered.`),E.set(ee[v],v);p=0;for(let v=0;v<C;v++){let F=ee[v],rn=l.get(F),we;if(rn!==void 0)we=rn,f[p]=we,b[p]=K[v],m[p]=v,p++;else{let[on,Es]=L(K[v]),[sn,ws]=L(v),tt;try{tt=Fi(n(on,sn))}catch(ks){let As=ee[v];tt=document.createComment(`each:error:${v}`),queueMicrotask(()=>{A(ks,{phase:"render",name:`each row (key="${String(As)}")`,node:r.parentNode?r:void 0})})}we={node:tt,item:on,setItem:Es,index:sn,setIndex:ws}}u.set(F,we),g[v]=we.node}for(let[v,F]of l)u.has(v)||(M(F.node),F.node.parentNode&&se.removeChild(F.node));if(C===0){c=0;let v=l;l=u,u=v,D=!0,p=0;return}w.clear();for(let v=0;v<c;v++)w.set(a[v],v);h.length<C&&(h=new Array(C),T=new Array(C));let Pe=0;for(let v=0;v<C;v++){let F=w.get(ee[v]);F!==void 0&&(h[Pe]=v,T[Pe]=F,Pe++)}let nn=Qa(T,Pe);y.length<C?y=new Uint8Array(C):y.fill(0,0,C);for(let v=0;v<nn.length;v++)y[h[nn[v]]]=1;let $e=o;for(let v=C-1;v>=0;v--){let F=g[v];y[v]||F.nextSibling!==$e&&se.insertBefore(F,$e),$e=F}let Ie=a===i?s:i;Ie.length<C&&(Ie.length=C);for(let v=0;v<C;v++)Ie[v]=ee[v];a=Ie,c=C;let Ts=l;l=u,u=Ts,D=!0,xs()};function xs(){if(p===0)return;let K=p;p=0,z(()=>{for(let C=0;C<K;C++){let se=f[C];se.setItem(b[C]),se.setIndex(m[C]),f[C]=void 0,b[C]=void 0}})}let Ss=$(tn);return S(r,()=>{if(!me){me=!0,Ss();for(let K of l.values())M(K.node),K.node.parentNode?.removeChild(K.node);o.parentNode&&o.parentNode.removeChild(o),I=!1,l.clear(),u.clear(),E.clear(),w.clear(),c=0,f.length=0,b.length=0,m.length=0,p=0}}),D||queueMicrotask(()=>{!D&&!me&&r.parentNode&&tn()}),r}function Vi(e){let n=document.createDocumentFragment();for(let t of e)if(!(t==null||typeof t=="boolean"))if(Array.isArray(t))for(let r of t)r==null||typeof r=="boolean"||n.appendChild(qi(r));else n.appendChild(qi(t));return n}function qi(e){if(e==null)return document.createTextNode("");if(e instanceof Node)return e;if(typeof e=="function"){let n=e();return n instanceof Node?n:document.createTextNode(String(n??""))}return document.createTextNode(String(e))}var Xa=_(),ec=new Set(["script","style"]),tc=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ji=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),Wi=new WeakMap;function nc(e){let n=e.length-1,t=e[0];for(let m=0;m<n;m++)t+=`\0${m}\0${e[m+1]}`;let r=0,o=t.length;function i(){for(;r<o&&(t[r]===" "||t[r]===" "||t[r]===`
|
|
398
|
+
`||t[r]==="\r");)r++}function s(){if(t.charCodeAt(r)!==0)return-1;let m=r;r++;let p=0;for(;r<o&&t.charCodeAt(r)!==0;)p=p*10+(t.charCodeAt(r)-48),r++;return r<o&&r++,p<0||p>=n?(r=m,-1):p}function a(){let m=r;for(;r<o;){let p=t.charCodeAt(r);if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57||p===45)r++;else break}return t.slice(m,r)}function c(){if(i(),t[r]!=="=")return{kind:"bool"};r++,i();let m=s();if(m>=0)return{kind:"expr",idx:m};let p=t[r];if(p==='"'||p==="'"){r++;let g=[],x=[],y="";for(;r<o&&t[r]!==p;){let w=s();w>=0?(g.push(y),y="",x.push(w)):y+=t[r++]}return r<o&&r++,g.push(y),x.length===0?{kind:"static",value:g[0]}:{kind:"mixed",statics:g,exprs:x}}{let g=[],x=[],y="";for(;r<o;){let w=t.charCodeAt(r);if(w===32||w===9||w===10||w===13||w===62)break;let h=s();h>=0?(g.push(y),y="",x.push(h)):y+=t[r++]}return g.push(y),x.length===0?{kind:"static",value:g[0]}:{kind:"mixed",statics:g,exprs:x}}}function l(){let m=[];for(;r<o&&(i(),!(t[r]===">"||t[r]==="/"));){let p=r;for(;r<o;){let y=t.charCodeAt(r);if(y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||y===45||y===58||y===95||y===46)r++;else break}let g=t.slice(p,r);if(!g)break;let x=c();g.startsWith("on:")?x.kind==="expr"&&m.push({t:3,name:g.slice(3),idx:x.idx}):x.kind==="bool"?m.push({t:4,name:g}):x.kind==="static"?m.push({t:0,name:g,value:x.value}):x.kind==="expr"?m.push({t:1,name:g,idx:x.idx}):x.kind==="mixed"&&m.push({t:2,name:g,statics:x.statics,exprs:x.exprs})}return m}function u(m){return m.replace(/\s+/g," ")}function f(m){let p="";for(;r<o&&t[r]!=="<";){let x=s();if(x>=0){let y=u(p);y&&m.push({t:1,value:y}),p="",m.push({t:2,idx:x})}else p+=t[r++]}let g=u(p);g&&m.push({t:1,value:g})}function b(){let m=[];for(;r<o&&!(t[r]==="<"&&r+1<o&&t[r+1]==="/");)if(t[r]==="<"){let p=t[r+1];if(p==="!"){if(t.startsWith("<!--",r)){let h=t.indexOf("-->",r+4);r=h===-1?o:h+3}else if(t.startsWith("<![CDATA[",r)){let h=t.indexOf("]]>",r+9);r=h===-1?o:h+3}else{let h=t.indexOf(">",r);r=h===-1?o:h+1}continue}if(p==="?"){let h=t.indexOf(">",r);r=h===-1?o:h+1;continue}if(!(p>="a"&&p<="z")&&!(p>="A"&&p<="Z")){m.push({t:1,value:"<"}),r++;continue}r++;let g=a(),x=l();i();let y=tc.has(g),w=t[r]==="/";if(w&&r++,r<o&&r++,y||w)m.push({t:0,el:{tag:g,svg:ji.has(g),attrs:x,children:[]}});else{let h=b();if(ec.has(g.toLowerCase())){for(let T=0;T<h.length;T++)if(h[T].t===2)throw new Error(`html: dynamic \${...} expressions are not allowed inside <${g}> (raw-text context). Build the content separately and append it as a Node.`)}t[r]==="<"&&r+1<o&&t[r+1]==="/"&&(r+=2,a(),i(),r<o&&t[r]===">"&&r++),m.push({t:0,el:{tag:g,svg:ji.has(g),attrs:x,children:h}})}}else f(m);return m}return b()}function Gt(e,n){let t=e.svg?document.createElementNS(N,e.tag):document.createElement(e.tag);for(let r=0;r<e.attrs.length;r++){let o=e.attrs[r];switch(o.t){case 0:t.setAttribute(o.name,o.value);break;case 1:{let i=o.name,s=n[o.idx];typeof s=="function"?S(t,We(t,i,s)):V(t,i,s,{syncValueProperty:!1,label:"html"});break}case 2:{let i=o.statics[0];for(let s=0;s<o.exprs.length;s++){let a=n[o.exprs[s]];i+=(a==null?"":String(a))+o.statics[s+1]}V(t,o.name,i,{syncValueProperty:!1,label:"html"});break}case 3:{let i=n[o.idx];typeof i=="function"?t.addEventListener(o.name,i):Xa&&R(`html: on:${o.name} handler is not a function (got ${typeof i}). Event listener was not attached.`);break}case 4:t.setAttribute(o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:t.appendChild(Gt(o.el,n));break;case 1:t.appendChild(document.createTextNode(o.value));break;case 2:{let i=n[o.idx];if(typeof i=="function"){let s=document.createComment("");t.appendChild(s),S(t,ue(s,i))}else if(i instanceof Node)t.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?t.appendChild(a):a!=null&&typeof a!="boolean"&&t.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&t.appendChild(document.createTextNode(String(i)));break}}}return t}function Yt(e,...n){let t=Wi.get(e);if(t||(t=nc(e),Wi.set(e,t)),t.length===1&&t[0].t===0)return Gt(t[0].el,n);let r=document.createElement("div");for(let o=0;o<t.length;o++){let i=t[o];switch(i.t){case 0:r.appendChild(Gt(i.el,n));break;case 1:r.appendChild(document.createTextNode(i.value));break;case 2:{let s=n[i.idx];if(s instanceof Node)r.appendChild(s);else if(typeof s=="function"){let a=document.createComment("bind:htm");r.appendChild(a),S(r,ue(a,s))}else if(Array.isArray(s))for(let a=0;a<s.length;a++){let c=s[a];c instanceof Node?r.appendChild(c):c!=null&&typeof c!="boolean"&&r.appendChild(document.createTextNode(String(c)))}else s!=null&&typeof s!="boolean"&&r.appendChild(document.createTextNode(String(s)));break}}}return r.childNodes.length===1&&r.firstChild instanceof Element?r.firstChild:r}function Ki(e,n,t){let r=document.createComment("keep-alive"),o=new Map,i=[],s=t?.max??10;s===0&&_()&&R("KeepAlive: unbounded cache (max: 0). Cached subtrees will never be evicted \u2014 set `max` to bound memory.");let a,c=null,l=!1,u=!1,f=()=>{if(u)return;let m=e(),p=r.parentNode;if(!p||l&&m===a)return;c?.parentNode&&p.removeChild(c),a=m;let g=o.get(m);if(g){let x=i.indexOf(m);x!==-1&&(i.splice(x,1),i.push(m))}else{let x=n[m];if(!x){c=null,l=!0;return}if(g=x(),g instanceof DocumentFragment){let y=document.createElement("div");y.style.display="contents",y.appendChild(g),g=y}if(o.set(m,g),i.push(m),s>0&&i.length>s){let y=i.shift(),w=o.get(y);w&&(M(w),w.parentNode&&w.parentNode.removeChild(w),o.delete(y))}}p.insertBefore(g,r.nextSibling),c=g,l=!0},b=$(f);return l||queueMicrotask(()=>{!l&&r.parentNode&&f()}),S(r,()=>{u=!0,b();for(let m of o.values())M(m),m.parentNode&&m.parentNode.removeChild(m);o.clear(),i.length=0,c=null}),r}function Ui(e,n){if(!n)throw new Error("[SibuJS mount] container element not found. Make sure the DOM element exists before calling mount().");B(typeof e=="function"||e instanceof Node,"mount: first argument must be a component function or a DOM Node.");let t=typeof performance<"u"?performance.now():0,r=typeof e=="function"?e():e,o=typeof performance<"u"?performance.now()-t:0;n.appendChild(r);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:r,container:n,duration:o}),{node:r,unmount(){i&&i.emit("app:unmount",{rootElement:r}),M(r),r.parentNode&&r.parentNode.removeChild(r)}}}function Ji(e,n){let t=document.createComment("portal"),r=n||document.body,o=null,i=!1;return queueMicrotask(()=>{if(!i)try{o=e(),r.appendChild(o)}catch(s){queueMicrotask(()=>{A(s,{phase:"render",name:"Portal",node:t.parentNode?t:void 0})})}}),S(t,()=>{i=!0,o&&(M(o),o.remove(),o=null)}),t}function Gi(e,n="default"){return e?.[n]}function Yi(e=[]){let[n,t]=L([...e]);return[n,{push(...o){t(i=>[...i,...o])},pop(){let o;return t(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return t(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){t(i=>[...o,...i])},splice(o,i=0,...s){let a=[];return t(c=>{let l=[...c];return a=l.splice(o,i,...s),l}),a},remove(o){t(i=>i.filter((s,a)=>a!==o))},removeWhere(o){t(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((a,c)=>c!==s)})},set(o){t([...o])},update(o,i){t(s=>s.map((a,c)=>c===o?i:a))},updateWhere(o,i){t(s=>s.map(a=>o(a)?i(a):a))},sort(o){t(i=>[...i].sort(o))},reverse(){t(o=>[...o].reverse())},filter(o){t(i=>i.filter(o))},map(o){t(i=>i.map(o))},clear(){t([])}}]}function Zi(e=[]){let n=[...e],t=null,r={__v:0};function o(){t=null,r.__v++,ie(r)||ve(r)}function i(){if(ye(r),t===null){let a=n.slice();t=Object.freeze(a)}return t}return[i,{push(...a){a.length!==0&&(n.push(...a),o())},pop(){if(n.length===0)return;let a=n.pop();return o(),a},shift(){if(n.length===0)return;let a=n.shift();return o(),a},unshift(...a){a.length!==0&&(n.unshift(...a),o())},splice(a,c=0,...l){let u=n.splice(a,c,...l);return(u.length>0||l.length>0)&&o(),u},remove(a){a<0||a>=n.length||(n.splice(a,1),o())},removeWhere(a){let c=n.findIndex(a);c!==-1&&(n.splice(c,1),o())},set(a){n=[...a],o()},update(a,c){a<0||a>=n.length||Object.is(n[a],c)||(n[a]=c,o())},updateWhere(a,c){let l=!1;for(let u=0;u<n.length;u++)if(a(n[u])){let f=c(n[u]);Object.is(n[u],f)||(n[u]=f,l=!0)}l&&o()},sort(a){n.length<=1||(n.sort(a),o())},reverse(){n.length<=1||(n.reverse(),o())},filter(a){let c=n.filter(a);c.length!==n.length&&(n=c,o())},map(a){let c=!1;for(let l=0;l<n.length;l++){let u=a(n[l],l);Object.is(n[l],u)||(n[l]=u,c=!0)}c&&o()},clear(){n.length!==0&&(n=[],o())}}]}function Qi(e,n){let[t,r]=L(n),[o,i]=L(!1),[s,a]=L(null),[c,l]=L(0),u=0,f=!1,b=null,m=()=>{if(b===null)return;let g=b;b=null;try{g.abort()}catch{}},p=O(()=>{if(c(),f)return;m();let g=++u,x=typeof AbortController<"u"?new AbortController:null;b=x,z(()=>{i(!0),a(null)});let y=()=>f||g!==u,w;try{w=e({signal:x?x.signal:void 0})}catch(h){if(y())return;z(()=>{a(h),i(!1)});return}w.then(h=>{y()||(b=null,z(()=>{r(h),i(!1)}))},h=>{y()||(b=null,z(()=>{a(h),i(!1)}))})});return{value:t,loading:o,error:s,refresh:()=>{f||l(g=>g+1)},dispose:()=>{f||(f=!0,p(),m())}}}function Ee(e,n,t){if(Object.is(e,n))return!0;if(e==null||n==null||typeof e!=typeof n||typeof e!="object")return!1;let r=e,o=n;if(r.constructor!==o.constructor)return!1;if(e instanceof Date)return e.getTime()===n.getTime();if(e instanceof RegExp){let c=n;return e.source===c.source&&e.flags===c.flags}t||(t=new Map);let i=t.get(r);if(i?.has(o))return!0;if(i||(i=new Set,t.set(r,i)),i.add(o),e instanceof Map){let c=n;if(e.size!==c.size)return!1;for(let[l,u]of e)if(!c.has(l)||!Ee(u,c.get(l),t))return!1;return!0}if(e instanceof Set){let c=n;if(e.size!==c.size)return!1;for(let l of e)if(!c.has(l))return!1;return!0}if(e instanceof ArrayBuffer){let c=new Uint8Array(e),l=new Uint8Array(n);if(c.length!==l.length)return!1;for(let u=0;u<c.length;u++)if(c[u]!==l[u])return!1;return!0}if(e instanceof DataView){if(!(n instanceof DataView)||e.byteLength!==n.byteLength)return!1;for(let c=0;c<e.byteLength;c++)if(e.getUint8(c)!==n.getUint8(c))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){let c=e,l=n;if(c.length!==l.length)return!1;for(let u=0;u<c.length;u++)if(c[u]!==l[u])return!1;return!0}if(Array.isArray(e))return!Array.isArray(n)||e.length!==n.length?!1:e.every((c,l)=>Ee(c,n[l],t));let s=Object.keys(r),a=Object.keys(o);return s.length!==a.length?!1:s.every(c=>Object.hasOwn(o,c)&&Ee(r[c],o[c],t))}function Xi(e){return L(e,{equals:(n,t)=>Ee(n,t)})}function Xe(e,n){B(typeof e=="function","derived: argument must be a getter function.");let t=n?.name,r=n?.equals,o={};o._d=!1,o._init=!1,o._g=e,o.__v=0;let i=()=>{o._d||(o._d=!0)};i._c=1,i._sig=o;let s=()=>{let f=e();o._v=r&&o._init&&r(o._v,f)?o._v:f,o._d=!1,o._init=!0};$(()=>{let f=!0;try{o._v=e(),o._d=!1,o._init=!0,f=!1}finally{f&&(o._d=!0)}},i);let a=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,c=!1,l=()=>{if(!o._d)return;let f=o._v;c=!0;try{Z(s,i),Object.is(f,o._v)||o.__v++}finally{c=!1}a&&!Object.is(f,o._v)&&a.emit("computed:update",{signal:o,oldValue:f,newValue:o._v})};o._validate=l;function u(){if(c)throw new Error(`[SibuJS] Circular dependency detected in derived${t?` "${t}"`:""}. A derived signal cannot read itself (directly or through a chain).`);return Dn()?(o._d&&l(),o._v):(o._d&&l(),ye(o),o._v)}return t&&(u.__name=t,o.__name=t),u.__signal=o,a&&a.emit("computed:create",{signal:o,name:t,getter:u}),u}function es(e){let[n,t]=L(e);return{get current(){return n()},set current(r){t(r)}}}function ts(e){B(e!==null&&typeof e=="object"&&!Array.isArray(e),"store: argument must be a plain object. For arrays, use array() instead.");let n={};Object.keys(e).forEach(c=>{let[l,u]=L(e[c]);n[c]=[l,u]});let t=new Proxy({},{get(c,l){if(typeof l=="string"&&Object.hasOwn(n,l)){let u=n[l][0];return u()}return Reflect.get(c,l)},set(){throw new Error("[SibuJS store] Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),r=()=>{let c={};return Object.keys(n).forEach(l=>{c[l]=n[l][0]()}),c};return[t,{setState:c=>{let l=r(),u=typeof c=="function"?c(l):c;z(()=>{Object.entries(u).forEach(([f,b])=>{Object.hasOwn(n,f)&&n[f][1](b)})})},reset:()=>{z(()=>{Object.keys(e).forEach(c=>{let l=n[c][1];l(e[c])})})},subscribe:c=>{let l=!0;return O(()=>{let u=r();if(l){l=!1;return}Ne();try{c(u)}finally{Le()}})},subscribeKey:(c,l)=>{let u,f=!0;return O(()=>{let b=n[c][0]();if(f){u=b,f=!1;return}if(!Object.is(b,u)){let m=u;u=b,Ne();try{l(b,m)}finally{Le()}}})},getSnapshot:r}]}function ns(e,n){if(B(typeof e=="function","watch: first argument must be a getter function."),B(typeof n=="function","watch: second argument must be a callback function."),G())return()=>{};let t,r=!0;return $(()=>{let s=e();if(r){t=s,r=!1;return}if(!Object.is(s,t)){let a=t;t=s,Ne();try{n(s,a)}finally{Le()}}})}function rs(e,n,t){return[Xe(e,t),i=>{z(()=>n(i))}]}function os(e){let n=e();return _()&&queueMicrotask(()=>{try{e()}catch(t){console.warn("[SibuJS strict] second run threw:",t)}}),n}function is(e){if(!_())return O(e);let n=O(e),t=null;return queueMicrotask(()=>{try{t=O(e)}catch(r){console.warn("[SibuJS strictEffect] second run threw:",r)}}),()=>{n(),t&&t()}}var Zt="data-sibu-enhanced",Qt=new WeakMap;function ss(e,n){let t=0;for(;e.length>0;){let r=e.splice(0);for(let o=0;o<r.length;o++){if(t>=Ae){let i=r.length-o+e.length;e.length=0,_e(n,t,i);return}t++;try{r[o]()}catch(i){typeof console<"u"&&console.error(`[SibuJS ${n}] teardown error:`,i)}}}}function as(e,n){if(n==null)return e;if(typeof n!="string")return n;let t=n.startsWith("@")?`[data-ref="${n.slice(1)}"]`:n;try{return e.querySelector(t)}catch{return null}}function rc(e){if(e instanceof HTMLInputElement){if(e.type==="checkbox")return e.checked;if(e.type==="number"||e.type==="range")return e.value===""?null:Number(e.value)}return e instanceof HTMLSelectElement&&e.multiple?Array.from(e.selectedOptions,n=>n.value):e.value}function oc(e,n){if(e instanceof HTMLInputElement&&e.type==="checkbox"){e.checked=!!n;return}if(e instanceof HTMLSelectElement&&e.multiple){let r=Array.isArray(n)?n.map(String):[];for(let o of Array.from(e.options))o.selected=r.includes(o.value);return}let t=n==null?"":String(n);e.value!==t&&(e.value=t)}function Oe(e,n){let t=typeof e=="string"?typeof document<"u"?document.querySelector(e):null:e;if(!t)return typeof console<"u"&&console.warn(`[SibuJS enhance] no element matched ${JSON.stringify(e)} \u2014 nothing enhanced.`),()=>{};if(t.getAttribute(Zt)==="true")return _()&&typeof console<"u"&&console.warn("[SibuJS enhance] element is already enhanced; ignoring re-enhance.",t),()=>{};let r=[],o=Symbol("sibujs.enhance"),i=!1,s=(u,f)=>{let b=as(t,u);if(!b){typeof console<"u"&&console.warn(`[SibuJS enhance] target ${JSON.stringify(u)} not found under`,t);return}f(b)},a={root:t,ref:u=>as(t,u),refs:u=>{let f=u.startsWith("@")?`[data-ref="${u.slice(1)}"]`:u;try{return Array.from(t.querySelectorAll(f))}catch{return[]}},on:(u,f,b,m)=>{s(u,p=>{let g=x=>b(x,p);p.addEventListener(f,g,m),r.push(()=>p.removeEventListener(f,g,m))})},text:(u,f)=>{s(u,b=>{r.push(O(()=>{let m=f(),p=m==null?"":String(m);b.textContent!==p&&(b.textContent=p)}))})},attr:(u,f,b)=>{s(u,m=>{r.push(O(()=>{let p=b(),g=p==null?null:String(p);V(m,f,g,{syncValueProperty:!1,label:"enhance attr()"})}))})},classed:(u,f,b)=>{s(u,m=>{r.push(O(()=>{m.classList.toggle(f,!!b())}))})},show:(u,f)=>{s(u,b=>{let m=b.hidden;r.push(O(()=>{b.hidden=!f()})),r.push(()=>{b.hidden=m})})},model:(u,f,b)=>{s(u,m=>{let p=m,[g,x]=f,y=b?.event??(p instanceof HTMLSelectElement||p instanceof HTMLInputElement&&(p.type==="checkbox"||p.type==="radio")?"change":"input");r.push(O(()=>{oc(p,g())}));let w=()=>x(rc(p));p.addEventListener(y,w),r.push(()=>p.removeEventListener(y,w))})},cleanup:u=>{r.push(u)}},c;try{c=n(a)}catch(u){throw ss(r,"enhance"),u}typeof c=="function"&&r.push(c);let l=()=>{i||(i=!0,Qt.get(t)===o&&(Qt.delete(t),t.removeAttribute(Zt)),Be(t,l),ss(r,"enhance"))};return S(t,l),Qt.set(t,o),t.setAttribute(Zt,"true"),l}function cs(e,n){if(typeof document>"u")return()=>{};let t=[];try{for(let r of Array.from(document.querySelectorAll(e)))t.push(Oe(r,n))}catch(r){for(let o=t.length-1;o>=0;o--)try{t[o]()}catch(i){typeof console<"u"&&console.error("[SibuJS enhanceAll] rollback error:",i)}throw t.length=0,r}return()=>{for(let r of t.splice(0))r()}}function us(e,n){let t=globalThis;return t[e]??(t[e]=n())}var ic=/^[A-Za-z0-9_-]+$/,ls=Symbol.for("sibujs.islands.lazy"),et=us(Symbol.for("sibujs.islands.registry.v1"),()=>new Map);function ds(e){return e[ls]=!0,e}function fs(e,n){if(!ic.test(e))throw new Error(`[SibuJS islands] name must match [A-Za-z0-9_-]+ (got: ${JSON.stringify(e.slice(0,32))})`);et.set(e,n)}function ps(e){et.delete(e)}async function sc(e){if(typeof e=="function"&&e[ls]){let n=await e(),t=n.default??n;return typeof t=="function"?t:null}return e}function ms(e=typeof document<"u"?document:null,n={}){if(!e||typeof e.querySelectorAll!="function")return()=>{};let t=[],r=[],o=!1;for(let i of Array.from(e.querySelectorAll("[data-sibu-island]"))){if(i.getAttribute("data-sibu-enhanced")==="true")continue;let s=i.getAttribute("data-sibu-island")??"";if(!et.has(s)){typeof console<"u"&&console.warn(`[SibuJS islands] no island registered for "${s}" \u2014 skipping. Call registerIsland("${s}", ...).`);continue}let a=!1,c=()=>{if(a||o)return;a=!0;let u=et.get(s);u&&sc(u).then(f=>{if(!o){if(!f){typeof console<"u"&&console.warn(`[SibuJS islands] "${s}" loader produced no setup.`);return}try{let b=Oe(i,f);if(o){b();return}r.push(b),i.setAttribute("data-sibu-hydrated","true")}catch(b){typeof console<"u"&&console.error(`[SibuJS islands] "${s}" failed to mount:`,b)}}}).catch(f=>{typeof console<"u"&&console.error(`[SibuJS islands] "${s}" failed to load:`,f)})},l=i.getAttribute("data-sibu-load")||"load";t.push(ac(l,i,c,n))}return()=>{o=!0;for(let i of t.splice(0))i();for(let i of r.splice(0))i()}}function ac(e,n,t,r){switch(e){case"idle":{if(typeof requestIdleCallback<"u"){let i=requestIdleCallback(t);return()=>cancelIdleCallback(i)}let o=setTimeout(t,1);return()=>clearTimeout(o)}case"visible":{if(typeof IntersectionObserver>"u")return queueMicrotask(t),()=>{};let o=new IntersectionObserver(i=>{for(let s of i)s.isIntersecting&&(o.disconnect(),t())},{rootMargin:r.rootMargin,threshold:r.threshold});return o.observe(n),()=>o.disconnect()}case"interaction":{let o=["pointerdown","focusin","keydown","touchstart"],i=()=>{s(),t()},s=()=>{for(let a of o)n.removeEventListener(a,i)};for(let a of o)n.addEventListener(a,i,{passive:!0});return s}case"media":{let o=n.getAttribute("data-sibu-media")||"(min-width: 0px)";if(typeof matchMedia>"u")return queueMicrotask(t),()=>{};let i=matchMedia(o);if(i.matches)return queueMicrotask(t),()=>{};let s=()=>{i.matches&&(i.removeEventListener("change",s),t())};return i.addEventListener("change",s),()=>i.removeEventListener("change",s)}default:return queueMicrotask(t),()=>{}}}var id=_();function Xt(e){return e}var sd=1024*1024;function gs(e){let[n,t]=L(e()),r=!1,o=!1,i=n(),s=()=>{r=!1,!o&&t(i)},a=()=>{r||(r=!0,queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(s):s()}))},c=$(()=>{i=e(),a()}),l=(()=>n());return l.dispose=()=>{o||(o=!0,c())},l}var bs=16;function cc(e){let n=globalThis;if(typeof n.requestIdleCallback=="function"){n.requestIdleCallback(e,{timeout:bs*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,bs)}function hs(){let[e,n]=L(!1);function t(r){n(!0),cc(()=>{let o;try{o=r()}catch{n(!1);return}o&&typeof o.then=="function"?o.then(()=>n(!1),()=>n(!1)):n(!1)})}return{pending:e,start:t}}function ys(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}typeof window<"u"&&(window.Sibu=en);return Rs(uc);})();
|
|
@@ -6,18 +6,18 @@ import {
|
|
|
6
6
|
} from "./chunk-7ZHH77QA.js";
|
|
7
7
|
import {
|
|
8
8
|
effect
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XDOMTQHM.js";
|
|
10
10
|
import {
|
|
11
11
|
dispose
|
|
12
12
|
} from "./chunk-DHDZ7IVN.js";
|
|
13
13
|
import {
|
|
14
14
|
signal
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TVURNWDK.js";
|
|
16
16
|
import {
|
|
17
17
|
forEachSubscriber,
|
|
18
18
|
getSubscriberCount,
|
|
19
19
|
getSubscriberDeps
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JYXQCELN.js";
|
|
21
21
|
import {
|
|
22
22
|
isDev
|
|
23
23
|
} from "./chunk-VPP2FONR.js";
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
} from "./chunk-WWV3SJ3L.js";
|
|
4
4
|
import {
|
|
5
5
|
tagFactory
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QD4I7ZGZ.js";
|
|
7
7
|
import {
|
|
8
8
|
derived
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AD5YSZAN.js";
|
|
10
10
|
import {
|
|
11
11
|
effect
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XDOMTQHM.js";
|
|
13
13
|
import {
|
|
14
14
|
batch,
|
|
15
15
|
signal
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TVURNWDK.js";
|
|
17
17
|
|
|
18
18
|
// src/ecosystem/adapters/mobx.ts
|
|
19
19
|
function mobXAdapter(options) {
|