sibujs 3.2.2 → 3.3.0
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 +7 -1
- package/dist/browser.js +5 -5
- package/dist/build.cjs +49 -22
- package/dist/build.js +14 -14
- package/dist/cdn.global.js +7 -7
- package/dist/{chunk-5N74TKLD.js → chunk-24DBWDTK.js} +1 -1
- package/dist/{chunk-2C4E3HBM.js → chunk-4WXWJ4SW.js} +5 -5
- package/dist/{chunk-C427DVQF.js → chunk-5K72I3UQ.js} +2 -2
- package/dist/{chunk-2UPRY23K.js → chunk-5VGSK6D2.js} +1 -1
- package/dist/{chunk-NPIEEKPT.js → chunk-6G6UNHZI.js} +6 -6
- package/dist/{chunk-FDY42FIU.js → chunk-7JHWAGRQ.js} +2 -2
- package/dist/{chunk-V2MTG5FT.js → chunk-BEIKESVL.js} +33 -16
- package/dist/{chunk-LMLD24FC.js → chunk-COY6PUD2.js} +7 -1
- package/dist/{chunk-JYXOEYI4.js → chunk-CVMMULHO.js} +2 -2
- package/dist/{chunk-H6PCHJZQ.js → chunk-F4UM7QBJ.js} +11 -3
- package/dist/{chunk-BGNLPNGV.js → chunk-IHBVTURX.js} +4 -4
- package/dist/{chunk-YFDGQWDA.js → chunk-JBXNCZSC.js} +1 -1
- package/dist/{chunk-HMJFCBRR.js → chunk-L3GAGWCC.js} +10 -1
- package/dist/{chunk-GOUM4JCT.js → chunk-M6WSIGYW.js} +2 -2
- package/dist/{chunk-VOCE4NNK.js → chunk-MWZFOIBG.js} +5 -5
- package/dist/{chunk-X67UYC74.js → chunk-NUWKIEHE.js} +14 -24
- package/dist/{chunk-RLUJL2MV.js → chunk-Q2ERM6NT.js} +6 -7
- package/dist/{chunk-HXMS4SNP.js → chunk-R3QEDXFS.js} +2 -2
- package/dist/{chunk-NFYWLRUO.js → chunk-S4FHR5ZZ.js} +3 -3
- package/dist/{chunk-7XDYVJLE.js → chunk-SLCUP2EK.js} +6 -6
- package/dist/{chunk-OYLPZO4N.js → chunk-USDR2GFV.js} +4 -4
- package/dist/{chunk-4JCAUOLN.js → chunk-WVJJUFPC.js} +22 -12
- package/dist/{chunk-Z2FWAE4B.js → chunk-X3NHE2DK.js} +3 -1
- package/dist/{chunk-FOI23UJL.js → chunk-XQ7XSGYP.js} +1 -1
- package/dist/{chunk-RDRSWYNP.js → chunk-ZUVLC7TM.js} +1 -1
- package/dist/data.cjs +7 -1
- package/dist/data.js +8 -8
- package/dist/devtools.cjs +7 -1
- package/dist/devtools.js +7 -7
- package/dist/ecosystem.cjs +22 -19
- package/dist/ecosystem.js +10 -10
- package/dist/extras.cjs +62 -28
- package/dist/extras.js +24 -24
- package/dist/index.cjs +49 -22
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +14 -14
- package/dist/motion.cjs +7 -1
- package/dist/motion.js +4 -4
- package/dist/patterns.cjs +7 -1
- package/dist/patterns.js +6 -6
- package/dist/performance.cjs +47 -9
- package/dist/performance.js +8 -8
- package/dist/plugins.cjs +24 -18
- package/dist/plugins.js +12 -12
- package/dist/{ssr-2QDQ27EV.js → ssr-6D67RAVB.js} +3 -3
- package/dist/ssr.cjs +22 -19
- package/dist/ssr.js +11 -11
- package/dist/testing.cjs +19 -7
- package/dist/testing.js +16 -10
- package/dist/ui.cjs +27 -4
- package/dist/ui.js +9 -9
- package/dist/widgets.cjs +32 -2
- package/dist/widgets.js +8 -8
- package/package.json +1 -1
package/dist/browser.cjs
CHANGED
|
@@ -61,7 +61,13 @@ module.exports = __toCommonJS(browser_exports);
|
|
|
61
61
|
|
|
62
62
|
// src/core/dev.ts
|
|
63
63
|
function isDev() {
|
|
64
|
-
return typeof globalThis.__SIBU_DEV__ !== "undefined" ? !!globalThis.__SIBU_DEV__ :
|
|
64
|
+
return typeof globalThis.__SIBU_DEV__ !== "undefined" ? !!globalThis.__SIBU_DEV__ : (
|
|
65
|
+
// The bare `__SIBU_DEV__` is a bundler define that only exists in
|
|
66
|
+
// production builds; under the test runner it is always undefined, so
|
|
67
|
+
// this branch is unreachable here.
|
|
68
|
+
/* v8 ignore next 2 */
|
|
69
|
+
typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : typeof process !== "undefined" && process.env?.NODE_ENV !== "production"
|
|
70
|
+
);
|
|
65
71
|
}
|
|
66
72
|
var _isDev = isDev();
|
|
67
73
|
function devAssert(condition, message) {
|
package/dist/browser.js
CHANGED
|
@@ -35,13 +35,13 @@ import {
|
|
|
35
35
|
visibility,
|
|
36
36
|
wakeLock,
|
|
37
37
|
windowSize
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-M6WSIGYW.js";
|
|
39
39
|
import "./chunk-H3SRKIYX.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-7JHWAGRQ.js";
|
|
41
41
|
import "./chunk-GOJMFRBL.js";
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-5K72I3UQ.js";
|
|
43
|
+
import "./chunk-X3NHE2DK.js";
|
|
44
|
+
import "./chunk-COY6PUD2.js";
|
|
45
45
|
export {
|
|
46
46
|
animationFrame,
|
|
47
47
|
battery,
|
package/dist/build.cjs
CHANGED
|
@@ -1270,7 +1270,13 @@ __export(index_exports, {
|
|
|
1270
1270
|
|
|
1271
1271
|
// src/core/dev.ts
|
|
1272
1272
|
function isDev() {
|
|
1273
|
-
return typeof globalThis.__SIBU_DEV__ !== "undefined" ? !!globalThis.__SIBU_DEV__ :
|
|
1273
|
+
return typeof globalThis.__SIBU_DEV__ !== "undefined" ? !!globalThis.__SIBU_DEV__ : (
|
|
1274
|
+
// The bare `__SIBU_DEV__` is a bundler define that only exists in
|
|
1275
|
+
// production builds; under the test runner it is always undefined, so
|
|
1276
|
+
// this branch is unreachable here.
|
|
1277
|
+
/* v8 ignore next 2 */
|
|
1278
|
+
typeof __SIBU_DEV__ !== "undefined" ? __SIBU_DEV__ : typeof process !== "undefined" && process.env?.NODE_ENV !== "production"
|
|
1279
|
+
);
|
|
1274
1280
|
}
|
|
1275
1281
|
var _isDev = isDev();
|
|
1276
1282
|
function devAssert(condition, message) {
|
|
@@ -1327,7 +1333,9 @@ function sanitizeSrcset(value) {
|
|
|
1327
1333
|
}
|
|
1328
1334
|
return out.join(", ");
|
|
1329
1335
|
}
|
|
1336
|
+
var CSS_DANGER_GATE = /[(:@\\]/;
|
|
1330
1337
|
function sanitizeCSSValue(value) {
|
|
1338
|
+
if (!CSS_DANGER_GATE.test(value)) return value;
|
|
1331
1339
|
const decoded = value.replace(/\\([0-9a-fA-F]{1,6})\s?/g, (_m, hex) => {
|
|
1332
1340
|
const code2 = Number.parseInt(hex, 16);
|
|
1333
1341
|
if (!Number.isFinite(code2) || code2 < 0 || code2 > 1114111) return "";
|
|
@@ -1360,6 +1368,12 @@ var URL_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
|
1360
1368
|
function isUrlAttribute(attr) {
|
|
1361
1369
|
return URL_ATTRIBUTES.has(attr.toLowerCase());
|
|
1362
1370
|
}
|
|
1371
|
+
function sanitizeAttributeString(attr, value) {
|
|
1372
|
+
const lower = attr.toLowerCase();
|
|
1373
|
+
if (lower === "srcset") return sanitizeSrcset(value);
|
|
1374
|
+
if (URL_ATTRIBUTES.has(lower)) return sanitizeUrl(value);
|
|
1375
|
+
return value;
|
|
1376
|
+
}
|
|
1363
1377
|
|
|
1364
1378
|
// src/reactivity/track.ts
|
|
1365
1379
|
var _isDev2 = isDev();
|
|
@@ -1783,7 +1797,7 @@ function bindAttribute(el, attr, getter) {
|
|
|
1783
1797
|
if ((attr === "value" || attr === "checked") && attr in el) {
|
|
1784
1798
|
setProp(el, attr, attr === "checked" ? Boolean(value) : str);
|
|
1785
1799
|
} else {
|
|
1786
|
-
el.setAttribute(attr,
|
|
1800
|
+
el.setAttribute(attr, sanitizeAttributeString(attr, str));
|
|
1787
1801
|
}
|
|
1788
1802
|
}
|
|
1789
1803
|
return reactiveBinding(commit);
|
|
@@ -1813,7 +1827,7 @@ function bindDynamic(el, nameGetter, valueGetter) {
|
|
|
1813
1827
|
if ((name === "value" || name === "checked") && name in el) {
|
|
1814
1828
|
setProp(el, name, name === "checked" ? Boolean(value) : str);
|
|
1815
1829
|
} else {
|
|
1816
|
-
el.setAttribute(name,
|
|
1830
|
+
el.setAttribute(name, sanitizeAttributeString(name, str));
|
|
1817
1831
|
}
|
|
1818
1832
|
prevName = name;
|
|
1819
1833
|
}
|
|
@@ -1973,11 +1987,8 @@ function bindChildNode(placeholder, getter) {
|
|
|
1973
1987
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
1974
1988
|
var _isDev6 = isDev();
|
|
1975
1989
|
var BLOCKED_TAGS = /* @__PURE__ */ new Set(["script", "iframe", "object", "embed", "frame", "frameset"]);
|
|
1976
|
-
function
|
|
1977
|
-
|
|
1978
|
-
if (BLOCKED_TAGS.has(lower)) {
|
|
1979
|
-
throw new Error(`tagFactory: refusing to create <${tag}> \u2014 tag is blocked for security reasons.`);
|
|
1980
|
-
}
|
|
1990
|
+
function isBlockedTag(tag) {
|
|
1991
|
+
return BLOCKED_TAGS.has(tag.toLowerCase());
|
|
1981
1992
|
}
|
|
1982
1993
|
var CLOBBER_RISKY_IDS = /* @__PURE__ */ new Set([
|
|
1983
1994
|
"config",
|
|
@@ -2132,8 +2143,11 @@ function appendChildren(el, nodes) {
|
|
|
2132
2143
|
}
|
|
2133
2144
|
}
|
|
2134
2145
|
var tagFactory = (tag, ns) => {
|
|
2146
|
+
const blocked = isBlockedTag(tag);
|
|
2135
2147
|
return (first, second) => {
|
|
2136
|
-
|
|
2148
|
+
if (blocked) {
|
|
2149
|
+
throw new Error(`tagFactory: refusing to create <${tag}> \u2014 tag is blocked for security reasons.`);
|
|
2150
|
+
}
|
|
2137
2151
|
const el = ns ? document.createElementNS(ns, tag) : document.createElement(tag);
|
|
2138
2152
|
if (first === void 0) return el;
|
|
2139
2153
|
if (typeof first === "string") {
|
|
@@ -2203,7 +2217,6 @@ var tagFactory = (tag, ns) => {
|
|
|
2203
2217
|
default: {
|
|
2204
2218
|
const value = props[key];
|
|
2205
2219
|
if (value == null) continue;
|
|
2206
|
-
const lkey = key.toLowerCase();
|
|
2207
2220
|
if (isEventHandlerAttr(key)) continue;
|
|
2208
2221
|
if (typeof value === "function") {
|
|
2209
2222
|
registerDisposer(el, bindAttribute(el, key, value));
|
|
@@ -2216,14 +2229,7 @@ var tagFactory = (tag, ns) => {
|
|
|
2216
2229
|
el.removeAttribute(key);
|
|
2217
2230
|
}
|
|
2218
2231
|
} else {
|
|
2219
|
-
|
|
2220
|
-
if (lkey === "srcset") {
|
|
2221
|
-
el.setAttribute(key, sanitizeSrcset(str));
|
|
2222
|
-
} else if (isUrlAttribute(lkey)) {
|
|
2223
|
-
el.setAttribute(key, sanitizeUrl(str));
|
|
2224
|
-
} else {
|
|
2225
|
-
el.setAttribute(key, str);
|
|
2226
|
-
}
|
|
2232
|
+
el.setAttribute(key, sanitizeAttributeString(key, String(value)));
|
|
2227
2233
|
}
|
|
2228
2234
|
}
|
|
2229
2235
|
}
|
|
@@ -3813,8 +3819,14 @@ function watch(getter, callback) {
|
|
|
3813
3819
|
return;
|
|
3814
3820
|
}
|
|
3815
3821
|
if (!Object.is(newValue, oldValue)) {
|
|
3816
|
-
|
|
3822
|
+
const prev = oldValue;
|
|
3817
3823
|
oldValue = newValue;
|
|
3824
|
+
suspendTracking();
|
|
3825
|
+
try {
|
|
3826
|
+
callback(newValue, prev);
|
|
3827
|
+
} finally {
|
|
3828
|
+
resumeTracking();
|
|
3829
|
+
}
|
|
3818
3830
|
}
|
|
3819
3831
|
};
|
|
3820
3832
|
const teardown = track(subscriber);
|
|
@@ -3880,7 +3892,12 @@ function store(initialState) {
|
|
|
3880
3892
|
first = false;
|
|
3881
3893
|
return;
|
|
3882
3894
|
}
|
|
3883
|
-
|
|
3895
|
+
suspendTracking();
|
|
3896
|
+
try {
|
|
3897
|
+
callback(snapshot);
|
|
3898
|
+
} finally {
|
|
3899
|
+
resumeTracking();
|
|
3900
|
+
}
|
|
3884
3901
|
});
|
|
3885
3902
|
};
|
|
3886
3903
|
const subscribeKey = (key, callback) => {
|
|
@@ -3896,7 +3913,12 @@ function store(initialState) {
|
|
|
3896
3913
|
if (!Object.is(current, prev)) {
|
|
3897
3914
|
const oldPrev = prev;
|
|
3898
3915
|
prev = current;
|
|
3899
|
-
|
|
3916
|
+
suspendTracking();
|
|
3917
|
+
try {
|
|
3918
|
+
callback(current, oldPrev);
|
|
3919
|
+
} finally {
|
|
3920
|
+
resumeTracking();
|
|
3921
|
+
}
|
|
3900
3922
|
}
|
|
3901
3923
|
});
|
|
3902
3924
|
};
|
|
@@ -5446,7 +5468,12 @@ function ErrorBoundary(optionsOrChildren, maybeChildren) {
|
|
|
5446
5468
|
} else if (collected.length > 1) {
|
|
5447
5469
|
const Agg = globalThis.AggregateError;
|
|
5448
5470
|
handleError(
|
|
5449
|
-
Agg ? new Agg(collected, `${collected.length} pre-mount errors caught by ErrorBoundary`) :
|
|
5471
|
+
Agg ? new Agg(collected, `${collected.length} pre-mount errors caught by ErrorBoundary`) : (
|
|
5472
|
+
// AggregateError is ES2021 and present in every supported runtime
|
|
5473
|
+
// (matches the browserslist targets), so this fallback is defensive.
|
|
5474
|
+
/* v8 ignore next */
|
|
5475
|
+
new Error(collected.map((e) => e.message).join("; "))
|
|
5476
|
+
)
|
|
5450
5477
|
);
|
|
5451
5478
|
}
|
|
5452
5479
|
return void 0;
|
package/dist/build.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
index_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BEIKESVL.js";
|
|
4
4
|
import "./chunk-YT6HQ6AM.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-24DBWDTK.js";
|
|
6
|
+
import "./chunk-F4UM7QBJ.js";
|
|
7
|
+
import "./chunk-R3QEDXFS.js";
|
|
8
|
+
import "./chunk-JBXNCZSC.js";
|
|
9
|
+
import "./chunk-NUWKIEHE.js";
|
|
10
|
+
import "./chunk-Q2ERM6NT.js";
|
|
11
|
+
import "./chunk-CVMMULHO.js";
|
|
12
|
+
import "./chunk-5VGSK6D2.js";
|
|
13
|
+
import "./chunk-L3GAGWCC.js";
|
|
14
|
+
import "./chunk-7JHWAGRQ.js";
|
|
15
15
|
import "./chunk-GOJMFRBL.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-5K72I3UQ.js";
|
|
17
|
+
import "./chunk-X3NHE2DK.js";
|
|
18
|
+
import "./chunk-COY6PUD2.js";
|
|
19
19
|
|
|
20
20
|
// src/build/compileTemplates.ts
|
|
21
21
|
var VOID_ELEMENTS = /* @__PURE__ */ new Set([
|
package/dist/cdn.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var Sibu=(()=>{var Be=Object.defineProperty;var gi=Object.getOwnPropertyDescriptor;var bi=Object.getOwnPropertyNames;var hi=Object.prototype.hasOwnProperty;var wt=(e,n)=>{for(var t in n)Be(e,t,{get:n[t],enumerable:!0})},yi=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of bi(n))!hi.call(e,o)&&o!==t&&Be(e,o,{get:()=>n[o],enumerable:!(r=gi(n,o))||r.enumerable});return e};var xi=e=>yi(Be({},"__esModule",{value:!0}),e);var ys={};wt(ys,{DynamicComponent:()=>fo,ErrorBoundary:()=>ci,ErrorDisplay:()=>Fe,Fragment:()=>ao,KeepAlive:()=>ho,Loading:()=>ui,Portal:()=>co,SVG_NS:()=>k,Suspense:()=>ft,__resetIdCounter:()=>Ao,a:()=>an,abbr:()=>cn,action:()=>yo,address:()=>qt,area:()=>Hn,array:()=>Io,article:()=>Ft,aside:()=>Wt,asyncDerived:()=>Vo,audio:()=>On,autoResize:()=>So,b:()=>ln,base:()=>Ar,batch:()=>$,bdi:()=>un,bdo:()=>dn,bindDynamic:()=>Ke,blockquote:()=>Zt,body:()=>$t,br:()=>fn,button:()=>ue,canvas:()=>Jn,caption:()=>Yn,catchError:()=>Eo,catchErrorAsync:()=>ko,center:()=>Xr,checkLeaks:()=>Mt,circle:()=>Mr,cite:()=>pn,clickOutside:()=>xo,clipPath:()=>jr,code:()=>Oe,col:()=>er,colgroup:()=>tr,context:()=>Go,copyOnClick:()=>To,createId:()=>_o,customElement:()=>eo,data:()=>mn,datalist:()=>lr,dd:()=>Xt,deepEqual:()=>fe,deepSignal:()=>Wo,defer:()=>ei,defs:()=>Ir,del:()=>Xn,derived:()=>Pe,details:()=>Sr,dfn:()=>gn,dialog:()=>wr,disableSSR:()=>Ro,dispose:()=>N,div:()=>w,dl:()=>Qt,dt:()=>Yt,each:()=>io,effect:()=>O,ellipse:()=>Rr,em:()=>bn,embed:()=>Bn,enableSSR:()=>Mo,enqueueBatchedSignal:()=>G,fieldset:()=>ur,figcaption:()=>en,figure:()=>tn,font:()=>Qr,footer:()=>zt,form:()=>dr,g:()=>Hr,getRequestScopedCache:()=>Lo,getSSRStore:()=>ee,getSlot:()=>po,h1:()=>Vt,h2:()=>Kt,h3:()=>Re,h4:()=>Ut,h5:()=>Jt,h6:()=>Gt,head:()=>Ot,header:()=>Bt,hr:()=>nn,html:()=>Ze,i:()=>hn,iframe:()=>zn,img:()=>$n,input:()=>fr,ins:()=>Qn,isBatching:()=>No,isSSR:()=>te,kbd:()=>yn,label:()=>pr,lazy:()=>dt,legend:()=>mr,li:()=>rn,line:()=>Or,linearGradient:()=>Vr,link:()=>Nr,longPress:()=>vo,main:()=>jt,map:()=>Pn,mark:()=>xn,marker:()=>Zr,marquee:()=>Yr,mask:()=>Wr,match:()=>bo,math:()=>Un,menu:()=>Er,meta:()=>Lr,meter:()=>gr,mount:()=>ro,nav:()=>It,nextTick:()=>Qo,noscript:()=>Gn,object:()=>In,ol:()=>on,on:()=>Do,onCleanup:()=>Jo,onMount:()=>xe,onUnmount:()=>Uo,optgroup:()=>br,option:()=>hr,output:()=>yr,p:()=>Me,param:()=>jn,path:()=>$r,pattern:()=>qr,picture:()=>Wn,polygon:()=>Pr,polyline:()=>Dr,portal:()=>qn,pre:()=>He,progress:()=>xr,q:()=>vn,radialGradient:()=>Kr,reactiveArray:()=>jo,rect:()=>Fr,ref:()=>zo,registerComponent:()=>lo,registerDisposer:()=>T,resolveComponent:()=>Ye,retrack:()=>F,rp:()=>Tn,rt:()=>Sn,ruby:()=>wn,runInSSRContext:()=>Ho,s:()=>En,samp:()=>kn,script:()=>Zn,section:()=>Dt,select:()=>vr,setGlobalErrorHandler:()=>Co,setMaxDrainIterations:()=>qe,show:()=>mo,signal:()=>_,slot:()=>Cr,small:()=>Cn,source:()=>Vn,span:()=>L,stop:()=>Ur,store:()=>Bo,strict:()=>Zo,strictEffect:()=>Xo,strong:()=>_n,style:()=>J,sub:()=>An,summary:()=>kr,sup:()=>Nn,svg:()=>Kn,symbol:()=>Gr,table:()=>nr,tagFactory:()=>u,takePendingError:()=>ve,tbody:()=>rr,td:()=>or,template:()=>_r,text:()=>Br,textarea:()=>Tr,tfoot:()=>ir,th:()=>sr,thead:()=>ar,time:()=>Ln,title:()=>Pt,tr:()=>cr,track:()=>Dn,transition:()=>ti,trapFocus:()=>wo,trustHTML:()=>pt,tspan:()=>zr,u:()=>Mn,ul:()=>sn,unregisterComponent:()=>uo,untracked:()=>U,use:()=>Jr,var_:()=>Rn,video:()=>Fn,watch:()=>Fo,when:()=>go,withSSR:()=>Oo,writable:()=>qo});var gt={};wt(gt,{DynamicComponent:()=>fo,ErrorBoundary:()=>ci,ErrorDisplay:()=>Fe,Fragment:()=>ao,KeepAlive:()=>ho,Loading:()=>ui,Portal:()=>co,SVG_NS:()=>k,Suspense:()=>ft,__resetIdCounter:()=>Ao,a:()=>an,abbr:()=>cn,action:()=>yo,address:()=>qt,area:()=>Hn,array:()=>Io,article:()=>Ft,aside:()=>Wt,asyncDerived:()=>Vo,audio:()=>On,autoResize:()=>So,b:()=>ln,base:()=>Ar,batch:()=>$,bdi:()=>un,bdo:()=>dn,bindDynamic:()=>Ke,blockquote:()=>Zt,body:()=>$t,br:()=>fn,button:()=>ue,canvas:()=>Jn,caption:()=>Yn,catchError:()=>Eo,catchErrorAsync:()=>ko,center:()=>Xr,checkLeaks:()=>Mt,circle:()=>Mr,cite:()=>pn,clickOutside:()=>xo,clipPath:()=>jr,code:()=>Oe,col:()=>er,colgroup:()=>tr,context:()=>Go,copyOnClick:()=>To,createId:()=>_o,customElement:()=>eo,data:()=>mn,datalist:()=>lr,dd:()=>Xt,deepEqual:()=>fe,deepSignal:()=>Wo,defer:()=>ei,defs:()=>Ir,del:()=>Xn,derived:()=>Pe,details:()=>Sr,dfn:()=>gn,dialog:()=>wr,disableSSR:()=>Ro,dispose:()=>N,div:()=>w,dl:()=>Qt,dt:()=>Yt,each:()=>io,effect:()=>O,ellipse:()=>Rr,em:()=>bn,embed:()=>Bn,enableSSR:()=>Mo,enqueueBatchedSignal:()=>G,fieldset:()=>ur,figcaption:()=>en,figure:()=>tn,font:()=>Qr,footer:()=>zt,form:()=>dr,g:()=>Hr,getRequestScopedCache:()=>Lo,getSSRStore:()=>ee,getSlot:()=>po,h1:()=>Vt,h2:()=>Kt,h3:()=>Re,h4:()=>Ut,h5:()=>Jt,h6:()=>Gt,head:()=>Ot,header:()=>Bt,hr:()=>nn,html:()=>Ze,i:()=>hn,iframe:()=>zn,img:()=>$n,input:()=>fr,ins:()=>Qn,isBatching:()=>No,isSSR:()=>te,kbd:()=>yn,label:()=>pr,lazy:()=>dt,legend:()=>mr,li:()=>rn,line:()=>Or,linearGradient:()=>Vr,link:()=>Nr,longPress:()=>vo,main:()=>jt,map:()=>Pn,mark:()=>xn,marker:()=>Zr,marquee:()=>Yr,mask:()=>Wr,match:()=>bo,math:()=>Un,menu:()=>Er,meta:()=>Lr,meter:()=>gr,mount:()=>ro,nav:()=>It,nextTick:()=>Qo,noscript:()=>Gn,object:()=>In,ol:()=>on,on:()=>Do,onCleanup:()=>Jo,onMount:()=>xe,onUnmount:()=>Uo,optgroup:()=>br,option:()=>hr,output:()=>yr,p:()=>Me,param:()=>jn,path:()=>$r,pattern:()=>qr,picture:()=>Wn,polygon:()=>Pr,polyline:()=>Dr,portal:()=>qn,pre:()=>He,progress:()=>xr,q:()=>vn,radialGradient:()=>Kr,reactiveArray:()=>jo,rect:()=>Fr,ref:()=>zo,registerComponent:()=>lo,registerDisposer:()=>T,resolveComponent:()=>Ye,retrack:()=>F,rp:()=>Tn,rt:()=>Sn,ruby:()=>wn,runInSSRContext:()=>Ho,s:()=>En,samp:()=>kn,script:()=>Zn,section:()=>Dt,select:()=>vr,setGlobalErrorHandler:()=>Co,setMaxDrainIterations:()=>qe,show:()=>mo,signal:()=>_,slot:()=>Cr,small:()=>Cn,source:()=>Vn,span:()=>L,stop:()=>Ur,store:()=>Bo,strict:()=>Zo,strictEffect:()=>Xo,strong:()=>_n,style:()=>J,sub:()=>An,summary:()=>kr,sup:()=>Nn,svg:()=>Kn,symbol:()=>Gr,table:()=>nr,tagFactory:()=>u,takePendingError:()=>ve,tbody:()=>rr,td:()=>or,template:()=>_r,text:()=>Br,textarea:()=>Tr,tfoot:()=>ir,th:()=>sr,thead:()=>ar,time:()=>Ln,title:()=>Pt,tr:()=>cr,track:()=>Dn,transition:()=>ti,trapFocus:()=>wo,trustHTML:()=>pt,tspan:()=>zr,u:()=>Mn,ul:()=>sn,unregisterComponent:()=>uo,untracked:()=>U,use:()=>Jr,var_:()=>Rn,video:()=>Fn,watch:()=>Fo,when:()=>go,withSSR:()=>Oo,writable:()=>qo});function C(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var Et=C();function H(e,n){if(Et&&!e)throw new Error(`[SibuJS] ${n}`)}function E(e){Et&&console.warn(`[SibuJS] ${e}`)}function vi(e){return e.replace(/[\x00-\x20\x7f-\x9f]+/g,"")}function Z(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 Ti=["http:","https:","mailto:","tel:","ftp:"];function z(e){let n=vi(e).trim();if(!n)return"";let t=n.toLowerCase(),r=-1;for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);if(s===58){r=i;break}if(s===47||s===63||s===35)break}if(r===-1)return n;let o=t.slice(0,r+1);return/^[a-z][a-z0-9+.-]*:$/.test(o)&&Ti.indexOf(o)===-1?"":n}function be(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)continue;let s=z(i[1]);s&&t.push(i[2]?`${s}${i[2]}`:s)}return t.join(", ")}function ze(e){let t=e.replace(/\\([0-9a-fA-F]{1,6})\s?/g,(r,o)=>{let i=Number.parseInt(o,16);if(!Number.isFinite(i)||i<0||i>1114111)return"";try{return String.fromCodePoint(i)}catch{return""}}).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}var Si=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data"]);function q(e){return Si.has(e.toLowerCase())}var wi=C(),Ei=4096,Ie=[];function ki(){return{sig:null,sub:null,epoch:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function Ci(e,n,t){let r=Ie.pop();if(r)return r.sig=e,r.sub=n,r.epoch=t,r;let o=ki();return o.sig=e,o.sub=n,o.epoch=t,o}function kt(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Ie.length<Ei&&Ie.push(e)}function _i(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 Ct(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 Ai(e,n){let t=e.depsTail??null;n.subPrev=t,n.subNext=null,t?t.subNext=n:e.depsHead=n,e.depsTail=n}function Ni(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 D=null,je=null,V=0,K=[],P=new Set,Li=[];function Mi(e){try{e()}catch(n){wi&&E(`Subscriber threw during notification: ${n instanceof Error?n.message:String(n)}`)}}var ke=0,Ae=!1;function Ri(){ke===0&&(je=D,D=null,Ae=!0),ke++}function Hi(){ke--,ke===0&&(D=je,je=null,Ae=!1)}function U(e){Ri();try{return e()}finally{Hi()}}var Oi=0;function F(e,n){let t=D;D=n;let r=n,o=++Oi;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{D=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&&(Ni(i),Ct(i),kt(i)),i=s}}}function A(e,n){if(!n)return oe(e);he(n);let t=D;D=n;try{e()}finally{D=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=()=>he(n))}function oe(e){let n=()=>{let r=t;if(!(r._disposed||r._reentrant)){r._reentrant=!0;try{F(e,t)}finally{r._reentrant=!1}}},t=n;return t.depsHead=null,t.depsTail=null,t._epoch=0,t._structDirty=!1,t._runEpoch=0,t._runs=0,t._reentrant=!1,t._disposed=!1,n(),t._dispose??(t._dispose=()=>{t._disposed=!0,he(t)})}function ie(e){if(!D)return;let n=D,t=e,r=n._epoch??0,o=t.__activeNode??null;if(o!==null&&o.sub===n){o.epoch=r;return}let i=Ci(e,n,r);i.prevActive=o,t.__activeNode=i,Ai(n,i),_i(t,i),n._structDirty=!0}function he(e){let n=e,t=n.depsHead??null;for(n.depsHead=null,n.depsTail=null;t;){let r=t.subNext;Ct(t),kt(t),t=r}}var _t=50,Ce=1e6,_e=0;function qe(e){let n=Ce;return Number.isFinite(e)&&e>0&&(Ce=Math.floor(e)),n}function $i(e){let n=e;return n._runEpoch!==_e?(n._runEpoch=_e,n._runs=1,!1):(n._runs=(n._runs??0)+1,n._runs>_t)}function Pi(e){if(typeof console<"u"){let n=e.__name??"<unnamed>";console.error(`[SibuJS] subscriber "${n}" fired more than ${_t} times \u2014 likely a write-reads-self cycle between effects/signals. Breaking to prevent infinite loop.`)}}function Di(){typeof console<"u"&&console.error(`[SibuJS] Notification drain exceeded ${Ce} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`)}function At(){let e=0;for(;e<K.length;){if(e>=Ce){Di();break}let n=K[e++];if($i(n)){Pi(n);break}P.delete(n),Mi(n)}}function Nt(){if(!(V>0)){V++,_e++;try{At()}finally{V--,V===0&&(K.length=0,P.clear())}}}function We(e){e();let n=e._sig;if(!n)return;let t=Li,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 P.has(s)||(P.add(s),K.push(s));i=i.sigNext}}}function Lt(e){let t=e.subsHead??null;for(;t;){let r=t.sub;r&&(r._c?We(r):P.has(r)||(P.add(r),K.push(r))),t=t.sigNext}}function se(e){let t=e.subsHead;if(t){if(V>0){let r=t;for(;r;){let o=r.sub;o&&(o._c?We(o):P.has(o)||(P.add(o),K.push(o))),r=r.sigNext}return}V++,_e++;try{let r=t;for(;r;){let o=r.sub;o&&(o._c?We(o):P.has(o)||(P.add(o),K.push(o))),r=r.sigNext}At()}finally{V--,V===0&&(K.length=0,P.clear())}}}var Ne=C();function Ve(e,n,t){e[n]=t}function Le(e,n,t){if(Z(n))return Ne&&E(`bindAttribute: refusing to bind event-handler attribute "${n}". Use on:{ ${n.slice(2)}: fn } instead.`),()=>{};function r(){let o;try{o=t()}catch(s){Ne&&E(`bindAttribute: getter for "${n}" threw: ${s instanceof Error?s.message:String(s)}`);return}if(typeof o=="boolean"){n in e&&(n==="checked"||n==="disabled"||n==="selected")?Ve(e,n,o):o?e.setAttribute(n,""):e.removeAttribute(n);return}let i=String(o);(n==="value"||n==="checked")&&n in e?Ve(e,n,n==="checked"?!!o:i):e.setAttribute(n,q(n)?z(i):i)}return oe(r)}function Ke(e,n,t){let r=null;function o(){let s;try{s=typeof n=="function"?n():n}catch(l){Ne&&E(`bindDynamic: name getter threw: ${l instanceof Error?l.message:String(l)}`);return}let a;try{a=typeof t=="function"?t():t}catch(l){Ne&&E(`bindDynamic: value getter threw: ${l instanceof Error?l.message:String(l)}`);return}if(Z(s))return;r!==null&&r!==s&&e.removeAttribute(r);let c=String(a);(s==="value"||s==="checked")&&s in e?Ve(e,s,s==="checked"?!!a:c):e.setAttribute(s,q(s)?z(c):c),r=s}let i=oe(o);return()=>{i(),r!==null&&e.removeAttribute(r)}}var ae=new WeakMap,ce=C(),le=0;function T(e,n){let t=ae.get(e);t||(t=[],ae.set(e,t)),t.push(n),ce&&le++}function N(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],i=ae.get(o);if(i){let s=i.slice();ae.delete(o),ce&&(le-=s.length);for(let c of s)try{c()}catch(l){ce&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",l)}let a=0;for(;a++<8;){let c=ae.get(o);if(!c||c.length===0)break;let l=c.slice();ae.delete(o),ce&&(le-=l.length);for(let d of l)try{d()}catch(m){ce&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",m)}}}}}function Mt(e=0){return ce?(e>0&&le>e&&E(`checkLeaks: ${le} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),le):0}var Rt=C();function X(e,n){let t=[];function r(){let o;try{o=n()}catch(l){Rt&&E(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}if(o==null||typeof o=="boolean"){for(let l=0;l<t.length;l++){let d=t[l];N(d),d.parentNode&&d.parentNode.removeChild(d)}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 d=0;d<o.length;d++){let m=o[d];if(m==null||typeof m=="boolean")continue;let h=m instanceof Node?m:document.createTextNode(String(m));if(l.has(h)){Rt&&E("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}l.add(h),s.push(h)}}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 d=0;d<s.length;d++)l.has(s[d])&&a.add(s[d])}for(let l=0;l<t.length;l++){let d=t[l];a?.has(d)||(N(d),d.parentNode&&d.parentNode.removeChild(d))}let c=e;for(let l=0;l<s.length;l++){let d=s[l];c.nextSibling!==d&&i.insertBefore(d,c.nextSibling),c=d}t=s}return oe(r)}var k="http://www.w3.org/2000/svg",Ue=C(),Fi=new Set(["script","iframe","object","embed","frame","frameset"]);function Bi(e){let n=e.toLowerCase();if(Fi.has(n))throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`)}var zi=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);function Ii(e,n,t){e[n]=t}function ji(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 Ht=new Map;function Wi(e){let n=Ht.get(e);return n!==void 0||(n=e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),Ht.set(e,n)),n}function qi(e,n){if(typeof n=="function"){let r=A(()=>{e.setAttribute("style",n())});T(e,r);return}if(typeof n=="string"){e.setAttribute("style",n);return}let t=e;for(let r in n){let o=n[r],i=Wi(r);if(typeof o=="function"){let s=o,a=A(()=>{t.style.setProperty(i,ze(String(s())))});T(e,a)}else t.style.setProperty(i,ze(String(o)))}}function Vi(e,n){if(typeof n=="string"){e.setAttribute("class",n);return}if(typeof n=="function"){let i=A(()=>{e.setAttribute("class",n())});T(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=A(()=>{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)});T(e,s)}else e.setAttribute("class",o)}function Je(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),T(e,X(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),T(e,X(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),T(e,X(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 u=(e,n)=>(t,r)=>{Bi(e);let o=n?document.createElementNS(n,e):document.createElement(e);if(t===void 0)return o;if(typeof t=="string")return r!==void 0?(o.setAttribute("class",t),Je(o,r),o):(Ue&&ji(t)&&E(`tagFactory: lone string "${t}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${t}" }) \u2014 or ${e}("${t}", children) to set the class AND add children.`),o.textContent=t,o);if(typeof t=="number")return o.textContent=String(t),o;if(Array.isArray(t)||t instanceof Node||typeof t=="function")return Je(o,t),o;let i=t,s=i.class;s!=null&&Vi(o,s);let a=i.id;a!=null&&(Ue&&typeof a=="string"&&zi.has(a.toLowerCase())&&E(`tagFactory: element id="${a}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),o.id=a);let c=r!==void 0?r:i.nodes;c!=null&&Je(o,c);let l=i.on;if(l)for(let h in l){let f=l[h];typeof f=="function"?o.addEventListener(h,f):Ue&&E(`tagFactory: on.${h} handler is not a function (got ${typeof f}). Event listener was not attached.`)}let d=i.style;d!=null&&qi(o,d);let m=i.ref;m&&(m.current=o);for(let h in i)switch(h){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let f=i[h];if(f==null)continue;let b=h.toLowerCase();if(Z(h))continue;if(typeof f=="function")T(o,Le(o,h,f));else if(typeof f=="boolean")h in o&&(h==="checked"||h==="disabled"||h==="selected")?Ii(o,h,f):f?o.setAttribute(h,""):o.removeAttribute(h);else{let y=String(f);b==="srcset"?o.setAttribute(h,be(y)):q(b)?o.setAttribute(h,z(y)):o.setAttribute(h,y)}}}return i.onElement&&typeof i.onElement=="function"&&i.onElement(o),o};var js=u("html"),Ot=u("head"),$t=u("body"),Pt=u("title"),w=u("div"),L=u("span"),Dt=u("section"),Ft=u("article"),Bt=u("header"),zt=u("footer"),It=u("nav"),jt=u("main"),Wt=u("aside"),qt=u("address"),Me=u("p"),Vt=u("h1"),Kt=u("h2"),Re=u("h3"),Ut=u("h4"),Jt=u("h5"),Gt=u("h6"),Zt=u("blockquote"),Xt=u("dd"),Qt=u("dl"),Yt=u("dt"),en=u("figcaption"),tn=u("figure"),nn=u("hr"),rn=u("li"),on=u("ol"),sn=u("ul"),He=u("pre"),an=u("a"),cn=u("abbr"),ln=u("b"),un=u("bdi"),dn=u("bdo"),fn=u("br"),pn=u("cite"),Oe=u("code"),mn=u("data"),gn=u("dfn"),bn=u("em"),hn=u("i"),yn=u("kbd"),xn=u("mark"),vn=u("q"),Tn=u("rp"),Sn=u("rt"),wn=u("ruby"),En=u("s"),kn=u("samp"),Cn=u("small"),_n=u("strong"),An=u("sub"),Nn=u("sup"),Ln=u("time"),Mn=u("u"),Rn=u("var"),Hn=u("area"),On=u("audio"),$n=u("img"),Pn=u("map"),Dn=u("track"),Fn=u("video"),Bn=u("embed"),zn=u("iframe"),In=u("object"),jn=u("param"),Wn=u("picture"),qn=u("portal"),Vn=u("source"),Kn=u("svg",k),Un=u("math"),Jn=u("canvas"),Gn=u("noscript"),Zn=u("script"),Xn=u("del"),Qn=u("ins"),Yn=u("caption"),er=u("col"),tr=u("colgroup"),nr=u("table"),rr=u("tbody"),or=u("td"),ir=u("tfoot"),sr=u("th"),ar=u("thead"),cr=u("tr"),ue=u("button"),lr=u("datalist"),ur=u("fieldset"),dr=u("form"),fr=u("input"),pr=u("label"),mr=u("legend"),gr=u("meter"),br=u("optgroup"),hr=u("option"),yr=u("output"),xr=u("progress"),vr=u("select"),Tr=u("textarea"),Sr=u("details"),wr=u("dialog"),Er=u("menu"),kr=u("summary"),Cr=u("slot"),_r=u("template"),Ar=u("base"),Nr=u("link"),Lr=u("meta"),J=u("style"),Mr=u("circle",k),Rr=u("ellipse",k),Hr=u("g",k),Or=u("line",k),$r=u("path",k),Pr=u("polygon",k),Dr=u("polyline",k),Fr=u("rect",k),Br=u("text",k),zr=u("tspan",k),Ir=u("defs",k),jr=u("clipPath",k),Wr=u("mask",k),qr=u("pattern",k),Vr=u("linearGradient",k),Kr=u("radialGradient",k),Ur=u("stop",k),Jr=u("use",k),Gr=u("symbol",k),Zr=u("marker",k),Xr=u("center"),Qr=u("font"),Yr=u("marquee"),eo=e=>u(e);var Ki=C(),Ui=new Set(["script","style"]),Ji=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),to=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),no=new WeakMap;function Gi(e){let n=e.length-1,t=e[0];for(let f=0;f<n;f++)t+=`\0${f}\0${e[f+1]}`;let r=0,o=t.length;function i(){for(;r<o&&(t[r]===" "||t[r]===" "||t[r]===`
|
|
2
|
-
`||t[r]==="\r");)r++}function s(){if(t.charCodeAt(r)!==0)return-1;let f=r;r++;let b=0;for(;r<o&&t.charCodeAt(r)!==0;)b=b*10+(t.charCodeAt(r)-48),r++;return r<o&&r++,b<0||b>=n?(r=f,-1):b}function a(){let f=r;for(;r<o;){let b=t.charCodeAt(r);if(b>=97&&b<=122||b>=65&&b<=90||b>=48&&b<=57||b===45)r++;else break}return t.slice(f,r)}function c(){if(i(),t[r]!=="=")return{kind:"bool"};r++,i();let f=s();if(f>=0)return{kind:"expr",idx:f};let b=t[r];if(b==='"'||b==="'"){r++;let y=[],g=[],p="";for(;r<o&&t[r]!==b;){let v=s();v>=0?(y.push(p),p="",g.push(v)):p+=t[r++]}return r<o&&r++,y.push(p),g.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:g}}{let y=[],g=[],p="";for(;r<o;){let v=t.charCodeAt(r);if(v===32||v===9||v===10||v===13||v===62)break;let S=s();S>=0?(y.push(p),p="",g.push(S)):p+=t[r++]}return y.push(p),g.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:g}}}function l(){let f=[];for(;r<o&&(i(),!(t[r]===">"||t[r]==="/"));){let b=r;for(;r<o;){let p=t.charCodeAt(r);if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57||p===45||p===58||p===95||p===46)r++;else break}let y=t.slice(b,r);if(!y)break;let g=c();y.startsWith("on:")?g.kind==="expr"&&f.push({t:3,name:y.slice(3),idx:g.idx}):g.kind==="bool"?f.push({t:4,name:y}):g.kind==="static"?f.push({t:0,name:y,value:g.value}):g.kind==="expr"?f.push({t:1,name:y,idx:g.idx}):g.kind==="mixed"&&f.push({t:2,name:y,statics:g.statics,exprs:g.exprs})}return f}function d(f){return f.replace(/\s+/g," ")}function m(f){let b="";for(;r<o&&t[r]!=="<";){let g=s();if(g>=0){let p=d(b);p&&f.push({t:1,value:p}),b="",f.push({t:2,idx:g})}else b+=t[r++]}let y=d(b);y&&f.push({t:1,value:y})}function h(){let f=[];for(;r<o&&!(t[r]==="<"&&r+1<o&&t[r+1]==="/");)if(t[r]==="<"){let b=t[r+1];if(b==="!"){if(t.startsWith("<!--",r)){let S=t.indexOf("-->",r+4);r=S===-1?o:S+3}else if(t.startsWith("<![CDATA[",r)){let S=t.indexOf("]]>",r+9);r=S===-1?o:S+3}else{let S=t.indexOf(">",r);r=S===-1?o:S+1}continue}if(b==="?"){let S=t.indexOf(">",r);r=S===-1?o:S+1;continue}if(!(b>="a"&&b<="z")&&!(b>="A"&&b<="Z")){f.push({t:1,value:"<"}),r++;continue}r++;let y=a(),g=l();i();let p=Ji.has(y),v=t[r]==="/";if(v&&r++,r<o&&r++,p||v)f.push({t:0,el:{tag:y,svg:to.has(y),attrs:g,children:[]}});else{let S=h();if(Ui.has(y.toLowerCase())){for(let B=0;B<S.length;B++)if(S[B].t===2)throw new Error(`html: dynamic \${...} expressions are not allowed inside <${y}> (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++),f.push({t:0,el:{tag:y,svg:to.has(y),attrs:g,children:S}})}}else m(f);return f}return h()}function Ge(e,n){let t=e.svg?document.createElementNS(k,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=i.toLowerCase();if(Z(i))break;let a=n[o.idx];if(typeof a=="function")T(t,Le(t,i,a));else if(a!=null){let c=String(a);s==="srcset"?t.setAttribute(i,be(c)):q(s)?t.setAttribute(i,z(c)):t.setAttribute(i,c)}break}case 2:{let i=o.statics[0];for(let a=0;a<o.exprs.length;a++){let c=n[o.exprs[a]];i+=(c==null?"":String(c))+o.statics[a+1]}let s=o.name.toLowerCase();s==="srcset"?t.setAttribute(o.name,be(i)):q(s)?t.setAttribute(o.name,z(i)):t.setAttribute(o.name,i);break}case 3:{let i=n[o.idx];typeof i=="function"?t.addEventListener(o.name,i):Ki&&E(`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(Ge(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),T(t,X(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 Ze(e,...n){let t=no.get(e);if(t||(t=Gi(e),no.set(e,t)),t.length===1&&t[0].t===0)return Ge(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(Ge(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),T(r,X(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 ro(e,n){if(!n)throw new Error("[SibuJS mount] container element not found. Make sure the DOM element exists before calling mount().");H(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}),N(r),r.parentNode&&r.parentNode.removeChild(r)}}}var Xe=C();function oo(e){return typeof e=="function"?oo(e()):e instanceof Node?e:document.createTextNode(String(e))}function Zi(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,d=t.length;for(;l<d;){let m=l+d>>1;e[t[m]]<c?l=m+1:d=m}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 io(e,n,t){H(typeof e=="function","each: first argument must be a function that returns an array."),H(typeof n=="function","each: second argument must be a render function."),H(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,d=new Map,m=[],h=[],f=new Uint8Array(0),b=new Map,y=[],g=[],p=new Map,v=!1,S=!1,B=t.key,bt=()=>{let ht=e(),M=ht.length,Te=r.parentNode;if(!Te)return;S||(Te.insertBefore(o,r.nextSibling),S=!0),h.length<M&&(h=new Array(M));for(let x=0;x<M;x++)h[x]=B(ht[x]);let W=h;m.length<M&&(m=new Array(M)),d.clear(),p.clear();for(let x=0;x<M;x++)Xe&&p.has(W[x])&&E(`each: duplicate key "${String(W[x])}" at index ${x} (first seen at ${p.get(W[x])}). Keys must be unique \u2014 duplicates cause rows to be dropped or mis-ordered.`),p.set(W[x],x);for(let x=0;x<M;x++){let R=W[x],xt=l.get(R),ge;if(xt!==void 0)ge=xt;else{let vt=R,pi=()=>U(()=>e()[p.get(vt)]),mi=()=>p.get(vt);try{ge=oo(n(pi,mi))}catch(re){Xe&&E(`each: render threw for item at index ${x} (key="${W[x]}"): ${re instanceof Error?re.message:String(re)}`),ge=document.createComment(`each:error:${x}`);let Tt=re instanceof Error?re:new Error(String(re));queueMicrotask(()=>{try{let St=r.parentNode;St?.dispatchEvent?St.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:Tt}})):Xe&&E(`each: error not surfaced \u2014 anchor detached: ${Tt.message}`)}catch{}})}}d.set(R,ge),m[x]=ge}for(let[x,R]of l)d.has(x)||(N(R),R.parentNode&&Te.removeChild(R));if(M===0){c=0;let x=l;l=d,d=x;return}b.clear();for(let x=0;x<c;x++)b.set(a[x],x);y.length<M&&(y=new Array(M),g=new Array(M));let Se=0;for(let x=0;x<M;x++){let R=b.get(W[x]);R!==void 0&&(y[Se]=x,g[Se]=R,Se++)}let yt=Zi(g,Se);f.length<M?f=new Uint8Array(M):f.fill(0,0,M);for(let x=0;x<yt.length;x++)f[y[yt[x]]]=1;let we=o;for(let x=M-1;x>=0;x--){let R=m[x];f[x]||R.nextSibling!==we&&Te.insertBefore(R,we),we=R}let Ee=a===i?s:i;Ee.length<M&&(Ee.length=M);for(let x=0;x<M;x++)Ee[x]=W[x];a=Ee,c=M;let fi=l;l=d,d=fi,v=!0},di=A(bt);return T(r,di),v||queueMicrotask(()=>{!v&&r.parentNode&&bt()}),r}function ao(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(so(r));else n.appendChild(so(t));return n}function so(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))}function co(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){typeof console<"u"&&console.error("[Portal] Render error:",s);let a=s instanceof Error?s:new Error(String(s));queueMicrotask(()=>{try{let c=t.parentNode;c?.dispatchEvent&&c.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:a}}))}catch{}})}}),T(t,()=>{i=!0,o&&(N(o),o.remove(),o=null)}),t}var Qe=new Map;function lo(e,n){Qe.set(e,n)}function uo(e){Qe.delete(e)}function Ye(e){let n=Qe.get(e);return n?n():w({nodes:`[Component "${e}" not found]`})}function fo(e){let n=w({class:"sibu-dynamic"});function t(){let o=e(),i;typeof o=="function"?i=o():i=Ye(o);for(let s of Array.from(n.childNodes))N(s);n.replaceChildren(i)}let r=A(t);return T(n,r),n}function po(e,n="default"){return e?.[n]}function mo(e,n){return T(n,A(()=>{n.style.display=e()?"":"none"})),n}function go(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&&(N(o),o.parentNode.removeChild(o),o=null);let d=c?n():t?t():null;if(d!=null){let m=d instanceof Node?d:document.createTextNode(String(d));l.insertBefore(m,r.nextSibling),o=m}s=!0};return T(r,A(a)),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function bo(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&&(N(o),o.parentNode.removeChild(o),o=null);let d=n[c]||t;if(d){let m=d();if(m!=null){let h=m instanceof Node?m:document.createTextNode(String(m));l.insertBefore(h,r.nextSibling),o=h}}s=!0};return T(r,A(a)),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function ho(e,n,t){let r=document.createComment("keep-alive"),o=new Map,i=[],s=t?.max??10;s===0&&C()&&E("KeepAlive: unbounded cache (max: 0). Cached subtrees will never be evicted \u2014 set `max` to bound memory.");let a,c=null,l=!1,d=!1,m=()=>{if(d)return;let f=e(),b=r.parentNode;if(!b||l&&f===a)return;c?.parentNode&&b.removeChild(c),a=f;let y=o.get(f);if(y){let g=i.indexOf(f);g!==-1&&(i.splice(g,1),i.push(f))}else{let g=n[f];if(!g){c=null,l=!0;return}if(y=g(),y instanceof DocumentFragment){let p=document.createElement("div");p.style.display="contents",p.appendChild(y),y=p}if(o.set(f,y),i.push(f),s>0&&i.length>s){let p=i.shift(),v=o.get(p);v&&(N(v),v.parentNode&&v.parentNode.removeChild(v),o.delete(p))}}b.insertBefore(y,r.nextSibling),c=y,l=!0},h=A(m);return l||queueMicrotask(()=>{!l&&r.parentNode&&m()}),T(r,()=>{d=!0,h();for(let f of o.values())N(f),f.parentNode&&f.parentNode.removeChild(f);o.clear(),i.length=0,c=null}),r}function yo(e,n,t){let r=n(e,t);typeof r=="function"&&T(e,r)}var xo=(e,n)=>{let t=r=>{e.contains(r.target)||n()};return document.addEventListener("pointerdown",t,!0),()=>document.removeEventListener("pointerdown",t,!0)},vo=(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)}},To=(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)},So=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)},wo=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)};var Q=null;function Eo(e,n){try{let t=e();return t&&typeof t.then=="function"&&t.catch(r=>{n?n(r,"async"):Q?Q(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),t}catch(t){return n?n(t,"sync"):Q?Q(t,"sync"):console.error("Unhandled error in Sibu.catchError:",t),null}}async function ko(e,n){try{return await e()}catch(t){return n?n(t,"async"):Q?Q(t,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",t),null}}function Co(e){Q=e}var et=0;function _o(e="sibu"){return et++,`${e}-${et}`}function Ao(){et=0}var ye=0,tt=new Set;function $(e){ye++;try{return e()}finally{ye--,ye===0&&Xi()}}function G(e){return ye===0?!1:(tt.add(e),!0)}function No(){return ye>0}function Xi(){try{for(let e of tt)Lt(e)}finally{tt.clear()}Nt()}var nt=globalThis,$e=C();function _(e,n){let t={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0},r=$e?n?.name:void 0,o=n?.equals;r&&(t.__name=r);function i(){return ie(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++,$e){let d=nt.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:l})}G(t)||se(t)}}:$e?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 d=nt.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:l}),G(t)||se(t)}:s=a=>{let c=t.value,l=typeof a=="function"?a(c):a;Object.is(l,c)||(t.value=l,t.__v++,G(t)||se(t))},$e){let a=nt.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:t,name:r,getter:i,initial:e})}return[i,s]}var de=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let e=null,n=process.getBuiltinModule;if(typeof n=="function")e=n("node:async_hooks");else{let t=Function("return typeof require==='function'?require:null")();t&&(e=t("node:async_hooks"))}e&&(de=new e.AsyncLocalStorage)}}catch{de=null}var Y={ssr:!1,suspenseIdCounter:0};function ee(){if(de){let e=de.getStore();if(e)return e}return Y}function te(){return ee().ssr}function Lo(e){if(!te())return null;let n=ee(),t=n.caches??(n.caches=new Map),r=t.get(e);return r||(r=new Map,t.set(e,r)),r}function Mo(){ee().ssr=!0}function Ro(){ee().ssr=!1}function Ho(e){let n={ssr:!0,suspenseIdCounter:0};if(de)return de.run(n,e);let t=Y.ssr,r=Y.suspenseIdCounter;Y.ssr=!0,Y.suspenseIdCounter=0;try{return e()}finally{Y.ssr=t,Y.suspenseIdCounter=r}}function Oo(e){let n=ee(),t=n.ssr;n.ssr=!0;try{return e()}finally{t||(n.ssr=!1)}}var rt=globalThis;function Do(e,n){let t,r=!0;return()=>{let o=e();if(r)r=!1,t=o,U(()=>n(o,void 0));else{let i=t;t=o,U(()=>n(o,i))}}}var $o=100;function ot(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){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw:",r)}}}function Po(e){let n=1;do e.rerunPending=!1,e.userCleanups.length>0&&ot(e),F(e.bodyFn,e.subscriber);while(e.rerunPending&&++n<=$o);e.rerunPending&&(e.rerunPending=!1,rt.__SIBU_DEV_WARN__!==!1&&typeof console<"u"&&console.error(`[SibuJS] effect re-requested itself ${$o}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`))}function Qi(e){if(e.disposed)return;e.disposed=!0;let n=rt.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(n)try{n.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&ot(e)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",t)}try{he(e.subscriber)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",t)}}function O(e,n){if(H(typeof e=="function","effect: argument must be a function."),te())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&&ot(t),F(t.bodyFn,o),t.rerunPending&&Po(t)}finally{t.running=!1,t.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._runEpoch=0,o._runs=0,t.subscriber=o,t.running=!0;try{F(t.bodyFn,t.subscriber),t.rerunPending&&Po(t)}finally{t.running=!1,t.rerunPending=!1}let i=rt.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("effect:create",{effectFn:e}),()=>Qi(t)}function Pe(e,n){H(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 d=e();o._v=r&&o._init&&r(o._v,d)?o._v:d,o._d=!1,o._init=!0};A(()=>{let d=!0;try{o._v=e(),o._d=!1,o._init=!0,d=!1}finally{d&&(o._d=!0)}},i);let a=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,c=!1;function l(){if(c)throw new Error(`[SibuJS] Circular dependency detected in derived${t?` "${t}"`:""}. A derived signal cannot read itself (directly or through a chain).`);if(Ae){if(o._d){let d=o._v;c=!0;try{F(s,i),Object.is(d,o._v)||o.__v++}finally{c=!1}}return o._v}if(ie(o),o._d){let d=o._v;c=!0;try{F(s,i),Object.is(d,o._v)||o.__v++}finally{c=!1}a&&d!==o._v&&a.emit("computed:update",{signal:o,oldValue:d,newValue:o._v})}return o._v}return t&&(l.__name=t,o.__name=t),l.__signal=o,a&&a.emit("computed:create",{signal:o,name:t,getter:l}),l}function Fo(e,n){if(H(typeof e=="function","watch: first argument must be a getter function."),H(typeof n=="function","watch: second argument must be a callback function."),te())return()=>{};let t,r=!0;return A(()=>{let s=e();if(r){t=s,r=!1;return}Object.is(s,t)||(n(s,t),t=s)})}function Bo(e){H(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,d]=_(e[c]);n[c]=[l,d]});let t=new Proxy({},{get(c,l){if(typeof l=="string"&&Object.hasOwn(n,l)){let d=n[l][0];return d()}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(),d=typeof c=="function"?c(l):c;$(()=>{Object.entries(d).forEach(([m,h])=>{Object.hasOwn(n,m)&&n[m][1](h)})})},reset:()=>{$(()=>{Object.keys(e).forEach(c=>{let l=n[c][1];l(e[c])})})},subscribe:c=>{let l=!0;return O(()=>{let d=r();if(l){l=!1;return}c(d)})},subscribeKey:(c,l)=>{let d,m=!0;return O(()=>{let h=n[c][0]();if(m){d=h,m=!1;return}if(!Object.is(h,d)){let f=d;d=h,l(h,f)}})},getSnapshot:r}]}function zo(e){let[n,t]=_(e);return{get current(){return n()},set current(r){t(r)}}}function Io(e=[]){let[n,t]=_([...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 jo(e=[]){let n=[...e],t=null,r={};function o(){t=null,G(r)||se(r)}function i(){if(ie(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 d=n.splice(a,c,...l);return(d.length>0||l.length>0)&&o(),d},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 d=0;d<n.length;d++)if(a(n[d])){let m=c(n[d]);Object.is(n[d],m)||(n[d]=m,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 d=a(n[l],l);Object.is(n[l],d)||(n[l]=d,c=!0)}c&&o()},clear(){n.length!==0&&(n=[],o())}}]}function fe(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,d]of e)if(!c.has(l)||!fe(d,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 d=0;d<c.length;d++)if(c[d]!==l[d])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 d=0;d<c.length;d++)if(c[d]!==l[d])return!1;return!0}if(Array.isArray(e))return!Array.isArray(n)||e.length!==n.length?!1:e.every((c,l)=>fe(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)&&fe(r[c],o[c],t))}function Wo(e){return _(e,{equals:(n,t)=>fe(n,t)})}function qo(e,n,t){return[Pe(e,t),i=>{$(()=>n(i))}]}function Vo(e,n){let[t,r]=_(n),[o,i]=_(!1),[s,a]=_(null),[c,l]=_(0),d=0;return O(()=>{c();let m=++d;$(()=>{i(!0),a(null)});let h;try{h=e()}catch(f){$(()=>{a(f),i(!1)});return}h.then(f=>{m===d&&$(()=>{r(f),i(!1)})},f=>{m===d&&$(()=>{a(f),i(!1)})})}),{value:t,loading:o,error:s,refresh:()=>l(m=>m+1)}}function ct(e,n){try{return e()}catch(t){E(`${n}: callback threw: ${t instanceof Error?t.message:String(t)}`);return}}function it(e,n,t){let r=ct(e,n);typeof r=="function"&&t&&T(t,r)}var pe=new WeakMap,ne=new WeakMap,I=new Set,j=new Set,me=null,De=0,Yi=256;function st(e){let n=pe.get(e);if(n){pe.delete(e),I.delete(e);for(let t of n)try{t()}catch{}}}function at(e){ne.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let t=ne.get(e);if(t){ne.delete(e),j.delete(e);for(let r of t)try{r()}catch{}}})}function es(e){if(I.size===0||e.nodeType!==1)return;let n=e;if(I.has(n)&&n.isConnected&&st(n),n.firstElementChild)for(let t of Array.from(I))t!==n&&t.isConnected&&n.contains(t)&&st(t)}function ts(e){if(j.size===0||e.nodeType!==1)return;let n=e;if(j.has(n)&&!n.isConnected&&at(n),n.firstElementChild)for(let t of Array.from(j))t!==n&&!t.isConnected&&n.contains(t)&&at(t)}function ns(){if(I.size>0)for(let e of Array.from(I))e.isConnected&&st(e);if(j.size>0)for(let e of Array.from(j))e.isConnected||at(e)}function Ko(){me||typeof document>"u"||(me=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++)es(n.addedNodes[t]);if(n.removedNodes.length>0)for(let t=0;t<n.removedNodes.length;t++)ts(n.removedNodes[t])}De+=e.length,De>=Yi&&(De=0,ns()),lt()}),me.observe(document.body,{childList:!0,subtree:!0}))}function lt(){me&&I.size===0&&j.size===0&&(me.disconnect(),me=null,De=0)}function rs(e,n){let t=pe.get(e);return t||(t=[],pe.set(e,t)),t.push(n),I.add(e),Ko(),()=>{let r=pe.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(pe.delete(e),I.delete(e))}lt()}}function os(e,n){let t=ne.get(e);return t||(t=[],ne.set(e,t)),t.push(n),j.add(e),Ko(),()=>{let r=ne.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(ne.delete(e),j.delete(e))}lt()}}function xe(e,n){if(!(typeof document>"u"))if(n){let t=!1;if(T(n,()=>{t=!0}),n.isConnected){queueMicrotask(()=>{t||it(e,"onMount",n)});return}queueMicrotask(()=>{if(t)return;if(n.isConnected){it(e,"onMount",n);return}let r=rs(n,()=>{t||it(e,"onMount",n)});T(n,r)})}else queueMicrotask(()=>{ct(e,"onMount")})}function Uo(e,n){if(typeof document>"u")return;let t=!1,r=()=>{t||(t=!0,ct(e,"onUnmount"))};T(n,r);let o=()=>{if(t)return;let i=os(n,r);T(n,i)};n.isConnected?o():xe(()=>{o()},n)}function Jo(e,n){T(n,e)}function Go(e){let[n,t]=_(e);return{provide(o){let i=n();return t(o),()=>t(i)},use(){return n},get(){return n()},set(o){t(o)},withContext(o,i){let s=n();t(o);try{return i()}finally{t(s)}}}}function Zo(e){let n=e();return C()&&queueMicrotask(()=>{try{e()}catch(t){console.warn("[SibuJS strict] second run threw:",t)}}),n}function Xo(e){if(!C())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()}}function Qo(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}function ei(e){let[n,t]=_(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=A(()=>{i=e(),a()}),l=(()=>n());return l.dispose=()=>{o||(o=!0,c())},l}var Yo=16;function is(e){let n=globalThis;if(typeof n.requestIdleCallback=="function"){n.requestIdleCallback(e,{timeout:Yo*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,Yo)}function ti(){let[e,n]=_(!1);function t(r){n(!0),is(()=>{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}}var ut="__sibuPendingError";function ni(e,n){let t=()=>{try{return e.parentNode?(e.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:n}})),!0):!1}catch{return!1}};e.parentNode&&t()||queueMicrotask(()=>{t()||(e[ut]=n)})}function ve(e){let n=e,t=n[ut];if(t instanceof Error)return delete n[ut],t}function dt(e){let n=null;return function(){if(n)return n();let r=w({class:"sibu-lazy"}),o=!1;return e().then(i=>{if(o)return;n=i.default;let s=n();r.replaceChildren(s)}).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));E(`[SibuJS] lazy() failed to load component: ${s.message}`),r.replaceChildren(w({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),ni(r,s)}),r.appendChild(L("sibu-lazy-loading","Loading...")),T(r,()=>{o=!0}),r}}function ft({nodes:e,fallback:n}){let t=w({class:"sibu-suspense"}),r=n();t.appendChild(r);let o=!1,i=null,s=null;return T(t,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!t.contains(s)&&N(s)}),queueMicrotask(()=>{if(!o)try{let a=e();if(s=a,a.classList.contains("sibu-lazy")){if(!a.querySelector(".sibu-lazy-loading")){t.replaceChildren(a);return}i=new MutationObserver(()=>{if(o)return;a.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,t.replaceChildren(a))}),i.observe(a,{childList:!0,subtree:!0})}else t.replaceChildren(a)}catch(a){let c=a instanceof Error?a:new Error(String(a));E(`[SibuJS] Suspense nodes() threw: ${c.message}`),ni(t,c)}}),t}var Ec=C();function pt(e){return e}var kc=1024*1024;var ss=C(),as=`
|
|
1
|
+
"use strict";var Sibu=(()=>{var Ie=Object.defineProperty;var xi=Object.getOwnPropertyDescriptor;var vi=Object.getOwnPropertyNames;var Ti=Object.prototype.hasOwnProperty;var Ct=(e,n)=>{for(var t in n)Ie(e,t,{get:n[t],enumerable:!0})},Si=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of vi(n))!Ti.call(e,o)&&o!==t&&Ie(e,o,{get:()=>n[o],enumerable:!(r=xi(n,o))||r.enumerable});return e};var wi=e=>Si(Ie({},"__esModule",{value:!0}),e);var vs={};Ct(vs,{DynamicComponent:()=>bo,ErrorBoundary:()=>fi,ErrorDisplay:()=>ze,Fragment:()=>fo,KeepAlive:()=>To,Loading:()=>mi,Portal:()=>po,SVG_NS:()=>k,Suspense:()=>gt,__resetIdCounter:()=>Ro,a:()=>dn,abbr:()=>fn,action:()=>So,address:()=>Jt,area:()=>Dn,array:()=>Vo,article:()=>jt,aside:()=>Ut,asyncDerived:()=>Go,audio:()=>Fn,autoResize:()=>Co,b:()=>pn,base:()=>Rr,batch:()=>$,bdi:()=>mn,bdo:()=>gn,bindDynamic:()=>Ge,blockquote:()=>en,body:()=>Bt,br:()=>bn,button:()=>ue,canvas:()=>Qn,caption:()=>rr,catchError:()=>Ao,catchErrorAsync:()=>No,center:()=>to,checkLeaks:()=>$t,circle:()=>$r,cite:()=>hn,clickOutside:()=>wo,clipPath:()=>Kr,code:()=>Pe,col:()=>or,colgroup:()=>ir,context:()=>Yo,copyOnClick:()=>ko,createId:()=>Mo,customElement:()=>oo,data:()=>yn,datalist:()=>pr,dd:()=>tn,deepEqual:()=>fe,deepSignal:()=>Uo,defer:()=>oi,defs:()=>Vr,del:()=>tr,derived:()=>Fe,details:()=>Cr,dfn:()=>xn,dialog:()=>_r,disableSSR:()=>Po,dispose:()=>N,div:()=>w,dl:()=>nn,dt:()=>rn,each:()=>lo,effect:()=>O,ellipse:()=>Pr,em:()=>vn,embed:()=>Wn,enableSSR:()=>$o,enqueueBatchedSignal:()=>U,fieldset:()=>mr,figcaption:()=>on,figure:()=>sn,font:()=>no,footer:()=>qt,form:()=>gr,g:()=>Dr,getRequestScopedCache:()=>Oo,getSSRStore:()=>Q,getSlot:()=>ho,h1:()=>Gt,h2:()=>Zt,h3:()=>Oe,h4:()=>Xt,h5:()=>Qt,h6:()=>Yt,head:()=>Ft,header:()=>Wt,hr:()=>an,html:()=>Ye,i:()=>Tn,iframe:()=>qn,img:()=>Bn,input:()=>br,ins:()=>nr,isBatching:()=>Ho,isSSR:()=>Y,kbd:()=>Sn,label:()=>hr,lazy:()=>mt,legend:()=>yr,li:()=>cn,line:()=>Fr,linearGradient:()=>Gr,link:()=>Hr,longPress:()=>Eo,main:()=>Kt,map:()=>zn,mark:()=>wn,marker:()=>eo,marquee:()=>ro,mask:()=>Ur,match:()=>vo,math:()=>Xn,menu:()=>Ar,meta:()=>Or,meter:()=>xr,mount:()=>ao,nav:()=>Vt,nextTick:()=>ni,noscript:()=>Yn,object:()=>Vn,ol:()=>ln,on:()=>Io,onCleanup:()=>Qo,onMount:()=>ve,onUnmount:()=>Xo,optgroup:()=>vr,option:()=>Tr,output:()=>Sr,p:()=>He,param:()=>Kn,path:()=>Br,pattern:()=>Jr,picture:()=>Un,polygon:()=>zr,polyline:()=>Ir,portal:()=>Jn,pre:()=>$e,progress:()=>wr,q:()=>En,radialGradient:()=>Zr,reactiveArray:()=>Ko,rect:()=>jr,ref:()=>qo,registerComponent:()=>mo,registerDisposer:()=>v,resolveComponent:()=>nt,retrack:()=>F,rp:()=>kn,rt:()=>Cn,ruby:()=>_n,runInSSRContext:()=>Do,s:()=>An,samp:()=>Nn,script:()=>er,section:()=>It,select:()=>Er,setGlobalErrorHandler:()=>Lo,setMaxDrainIterations:()=>Ue,show:()=>yo,signal:()=>_,slot:()=>Lr,small:()=>Ln,source:()=>Gn,span:()=>L,stop:()=>Xr,store:()=>Wo,strict:()=>ei,strictEffect:()=>ti,strong:()=>Mn,style:()=>K,sub:()=>Rn,summary:()=>Nr,sup:()=>Hn,svg:()=>Zn,symbol:()=>Yr,table:()=>sr,tagFactory:()=>u,takePendingError:()=>Te,tbody:()=>ar,td:()=>cr,template:()=>Mr,text:()=>Wr,textarea:()=>kr,tfoot:()=>lr,th:()=>ur,thead:()=>dr,time:()=>On,title:()=>zt,tr:()=>fr,track:()=>In,transition:()=>ii,trapFocus:()=>_o,trustHTML:()=>bt,tspan:()=>qr,u:()=>$n,ul:()=>un,unregisterComponent:()=>go,untracked:()=>V,use:()=>Qr,var_:()=>Pn,video:()=>jn,watch:()=>jo,when:()=>xo,withSSR:()=>Fo,writable:()=>Jo});var yt={};Ct(yt,{DynamicComponent:()=>bo,ErrorBoundary:()=>fi,ErrorDisplay:()=>ze,Fragment:()=>fo,KeepAlive:()=>To,Loading:()=>mi,Portal:()=>po,SVG_NS:()=>k,Suspense:()=>gt,__resetIdCounter:()=>Ro,a:()=>dn,abbr:()=>fn,action:()=>So,address:()=>Jt,area:()=>Dn,array:()=>Vo,article:()=>jt,aside:()=>Ut,asyncDerived:()=>Go,audio:()=>Fn,autoResize:()=>Co,b:()=>pn,base:()=>Rr,batch:()=>$,bdi:()=>mn,bdo:()=>gn,bindDynamic:()=>Ge,blockquote:()=>en,body:()=>Bt,br:()=>bn,button:()=>ue,canvas:()=>Qn,caption:()=>rr,catchError:()=>Ao,catchErrorAsync:()=>No,center:()=>to,checkLeaks:()=>$t,circle:()=>$r,cite:()=>hn,clickOutside:()=>wo,clipPath:()=>Kr,code:()=>Pe,col:()=>or,colgroup:()=>ir,context:()=>Yo,copyOnClick:()=>ko,createId:()=>Mo,customElement:()=>oo,data:()=>yn,datalist:()=>pr,dd:()=>tn,deepEqual:()=>fe,deepSignal:()=>Uo,defer:()=>oi,defs:()=>Vr,del:()=>tr,derived:()=>Fe,details:()=>Cr,dfn:()=>xn,dialog:()=>_r,disableSSR:()=>Po,dispose:()=>N,div:()=>w,dl:()=>nn,dt:()=>rn,each:()=>lo,effect:()=>O,ellipse:()=>Pr,em:()=>vn,embed:()=>Wn,enableSSR:()=>$o,enqueueBatchedSignal:()=>U,fieldset:()=>mr,figcaption:()=>on,figure:()=>sn,font:()=>no,footer:()=>qt,form:()=>gr,g:()=>Dr,getRequestScopedCache:()=>Oo,getSSRStore:()=>Q,getSlot:()=>ho,h1:()=>Gt,h2:()=>Zt,h3:()=>Oe,h4:()=>Xt,h5:()=>Qt,h6:()=>Yt,head:()=>Ft,header:()=>Wt,hr:()=>an,html:()=>Ye,i:()=>Tn,iframe:()=>qn,img:()=>Bn,input:()=>br,ins:()=>nr,isBatching:()=>Ho,isSSR:()=>Y,kbd:()=>Sn,label:()=>hr,lazy:()=>mt,legend:()=>yr,li:()=>cn,line:()=>Fr,linearGradient:()=>Gr,link:()=>Hr,longPress:()=>Eo,main:()=>Kt,map:()=>zn,mark:()=>wn,marker:()=>eo,marquee:()=>ro,mask:()=>Ur,match:()=>vo,math:()=>Xn,menu:()=>Ar,meta:()=>Or,meter:()=>xr,mount:()=>ao,nav:()=>Vt,nextTick:()=>ni,noscript:()=>Yn,object:()=>Vn,ol:()=>ln,on:()=>Io,onCleanup:()=>Qo,onMount:()=>ve,onUnmount:()=>Xo,optgroup:()=>vr,option:()=>Tr,output:()=>Sr,p:()=>He,param:()=>Kn,path:()=>Br,pattern:()=>Jr,picture:()=>Un,polygon:()=>zr,polyline:()=>Ir,portal:()=>Jn,pre:()=>$e,progress:()=>wr,q:()=>En,radialGradient:()=>Zr,reactiveArray:()=>Ko,rect:()=>jr,ref:()=>qo,registerComponent:()=>mo,registerDisposer:()=>v,resolveComponent:()=>nt,retrack:()=>F,rp:()=>kn,rt:()=>Cn,ruby:()=>_n,runInSSRContext:()=>Do,s:()=>An,samp:()=>Nn,script:()=>er,section:()=>It,select:()=>Er,setGlobalErrorHandler:()=>Lo,setMaxDrainIterations:()=>Ue,show:()=>yo,signal:()=>_,slot:()=>Lr,small:()=>Ln,source:()=>Gn,span:()=>L,stop:()=>Xr,store:()=>Wo,strict:()=>ei,strictEffect:()=>ti,strong:()=>Mn,style:()=>K,sub:()=>Rn,summary:()=>Nr,sup:()=>Hn,svg:()=>Zn,symbol:()=>Yr,table:()=>sr,tagFactory:()=>u,takePendingError:()=>Te,tbody:()=>ar,td:()=>cr,template:()=>Mr,text:()=>Wr,textarea:()=>kr,tfoot:()=>lr,th:()=>ur,thead:()=>dr,time:()=>On,title:()=>zt,tr:()=>fr,track:()=>In,transition:()=>ii,trapFocus:()=>_o,trustHTML:()=>bt,tspan:()=>qr,u:()=>$n,ul:()=>un,unregisterComponent:()=>go,untracked:()=>V,use:()=>Qr,var_:()=>Pn,video:()=>jn,watch:()=>jo,when:()=>xo,withSSR:()=>Fo,writable:()=>Jo});function C(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var _t=C();function H(e,n){if(_t&&!e)throw new Error(`[SibuJS] ${n}`)}function E(e){_t&&console.warn(`[SibuJS] ${e}`)}function Ei(e){return e.replace(/[\x00-\x20\x7f-\x9f]+/g,"")}function J(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 ki=["http:","https:","mailto:","tel:","ftp:"];function be(e){let n=Ei(e).trim();if(!n)return"";let t=n.toLowerCase(),r=-1;for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);if(s===58){r=i;break}if(s===47||s===63||s===35)break}if(r===-1)return n;let o=t.slice(0,r+1);return/^[a-z][a-z0-9+.-]*:$/.test(o)&&ki.indexOf(o)===-1?"":n}function Ce(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)continue;let s=be(i[1]);s&&t.push(i[2]?`${s}${i[2]}`:s)}return t.join(", ")}var Ci=/[(:@\\]/;function je(e){if(!Ci.test(e))return e;let t=e.replace(/\\([0-9a-fA-F]{1,6})\s?/g,(r,o)=>{let i=Number.parseInt(o,16);if(!Number.isFinite(i)||i<0||i>1114111)return"";try{return String.fromCodePoint(i)}catch{return""}}).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}var At=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data"]);function We(e){return At.has(e.toLowerCase())}function he(e,n){let t=e.toLowerCase();return t==="srcset"?Ce(n):At.has(t)?be(n):n}var _i=C(),Ai=4096,qe=[];function Ni(){return{sig:null,sub:null,epoch:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function Li(e,n,t){let r=qe.pop();if(r)return r.sig=e,r.sub=n,r.epoch=t,r;let o=Ni();return o.sig=e,o.sub=n,o.epoch=t,o}function Nt(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,qe.length<Ai&&qe.push(e)}function Mi(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 Lt(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 Ri(e,n){let t=e.depsTail??null;n.subPrev=t,n.subNext=null,t?t.subNext=n:e.depsHead=n,e.depsTail=n}function Hi(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 D=null,Ve=null,W=0,q=[],P=new Set,Oi=[];function $i(e){try{e()}catch(n){_i&&E(`Subscriber threw during notification: ${n instanceof Error?n.message:String(n)}`)}}var _e=0,Le=!1;function ne(){_e===0&&(Ve=D,D=null,Le=!0),_e++}function re(){_e--,_e===0&&(D=Ve,Ve=null,Le=!1)}function V(e){ne();try{return e()}finally{re()}}var Pi=0;function F(e,n){let t=D;D=n;let r=n,o=++Pi;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{D=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&&(Hi(i),Lt(i),Nt(i)),i=s}}}function A(e,n){if(!n)return oe(e);ye(n);let t=D;D=n;try{e()}finally{D=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=()=>ye(n))}function oe(e){let n=()=>{let r=t;if(!(r._disposed||r._reentrant)){r._reentrant=!0;try{F(e,t)}finally{r._reentrant=!1}}},t=n;return t.depsHead=null,t.depsTail=null,t._epoch=0,t._structDirty=!1,t._runEpoch=0,t._runs=0,t._reentrant=!1,t._disposed=!1,n(),t._dispose??(t._dispose=()=>{t._disposed=!0,ye(t)})}function ie(e){if(!D)return;let n=D,t=e,r=n._epoch??0,o=t.__activeNode??null;if(o!==null&&o.sub===n){o.epoch=r;return}let i=Li(e,n,r);i.prevActive=o,t.__activeNode=i,Ri(n,i),Mi(t,i),n._structDirty=!0}function ye(e){let n=e,t=n.depsHead??null;for(n.depsHead=null,n.depsTail=null;t;){let r=t.subNext;Lt(t),Nt(t),t=r}}var Mt=50,Ae=1e6,Ne=0;function Ue(e){let n=Ae;return Number.isFinite(e)&&e>0&&(Ae=Math.floor(e)),n}function Di(e){let n=e;return n._runEpoch!==Ne?(n._runEpoch=Ne,n._runs=1,!1):(n._runs=(n._runs??0)+1,n._runs>Mt)}function Fi(e){if(typeof console<"u"){let n=e.__name??"<unnamed>";console.error(`[SibuJS] subscriber "${n}" fired more than ${Mt} times \u2014 likely a write-reads-self cycle between effects/signals. Breaking to prevent infinite loop.`)}}function Bi(){typeof console<"u"&&console.error(`[SibuJS] Notification drain exceeded ${Ae} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`)}function Rt(){let e=0;for(;e<q.length;){if(e>=Ae){Bi();break}let n=q[e++];if(Di(n)){Fi(n);break}P.delete(n),$i(n)}}function Ht(){if(!(W>0)){W++,Ne++;try{Rt()}finally{W--,W===0&&(q.length=0,P.clear())}}}function Ke(e){e();let n=e._sig;if(!n)return;let t=Oi,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 P.has(s)||(P.add(s),q.push(s));i=i.sigNext}}}function Ot(e){let t=e.subsHead??null;for(;t;){let r=t.sub;r&&(r._c?Ke(r):P.has(r)||(P.add(r),q.push(r))),t=t.sigNext}}function se(e){let t=e.subsHead;if(t){if(W>0){let r=t;for(;r;){let o=r.sub;o&&(o._c?Ke(o):P.has(o)||(P.add(o),q.push(o))),r=r.sigNext}return}W++,Ne++;try{let r=t;for(;r;){let o=r.sub;o&&(o._c?Ke(o):P.has(o)||(P.add(o),q.push(o))),r=r.sigNext}Rt()}finally{W--,W===0&&(q.length=0,P.clear())}}}var Me=C();function Je(e,n,t){e[n]=t}function Re(e,n,t){if(J(n))return Me&&E(`bindAttribute: refusing to bind event-handler attribute "${n}". Use on:{ ${n.slice(2)}: fn } instead.`),()=>{};function r(){let o;try{o=t()}catch(s){Me&&E(`bindAttribute: getter for "${n}" threw: ${s instanceof Error?s.message:String(s)}`);return}if(typeof o=="boolean"){n in e&&(n==="checked"||n==="disabled"||n==="selected")?Je(e,n,o):o?e.setAttribute(n,""):e.removeAttribute(n);return}let i=String(o);(n==="value"||n==="checked")&&n in e?Je(e,n,n==="checked"?!!o:i):e.setAttribute(n,he(n,i))}return oe(r)}function Ge(e,n,t){let r=null;function o(){let s;try{s=typeof n=="function"?n():n}catch(l){Me&&E(`bindDynamic: name getter threw: ${l instanceof Error?l.message:String(l)}`);return}let a;try{a=typeof t=="function"?t():t}catch(l){Me&&E(`bindDynamic: value getter threw: ${l instanceof Error?l.message:String(l)}`);return}if(J(s))return;r!==null&&r!==s&&e.removeAttribute(r);let c=String(a);(s==="value"||s==="checked")&&s in e?Je(e,s,s==="checked"?!!a:c):e.setAttribute(s,he(s,c)),r=s}let i=oe(o);return()=>{i(),r!==null&&e.removeAttribute(r)}}var ae=new WeakMap,ce=C(),le=0;function v(e,n){let t=ae.get(e);t||(t=[],ae.set(e,t)),t.push(n),ce&&le++}function N(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],i=ae.get(o);if(i){let s=i.slice();ae.delete(o),ce&&(le-=s.length);for(let c of s)try{c()}catch(l){ce&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",l)}let a=0;for(;a++<8;){let c=ae.get(o);if(!c||c.length===0)break;let l=c.slice();ae.delete(o),ce&&(le-=l.length);for(let d of l)try{d()}catch(g){ce&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",g)}}}}}function $t(e=0){return ce?(e>0&&le>e&&E(`checkLeaks: ${le} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),le):0}var Pt=C();function G(e,n){let t=[];function r(){let o;try{o=n()}catch(l){Pt&&E(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}if(o==null||typeof o=="boolean"){for(let l=0;l<t.length;l++){let d=t[l];N(d),d.parentNode&&d.parentNode.removeChild(d)}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 d=0;d<o.length;d++){let g=o[d];if(g==null||typeof g=="boolean")continue;let T=g instanceof Node?g:document.createTextNode(String(g));if(l.has(T)){Pt&&E("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}l.add(T),s.push(T)}}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 d=0;d<s.length;d++)l.has(s[d])&&a.add(s[d])}for(let l=0;l<t.length;l++){let d=t[l];a?.has(d)||(N(d),d.parentNode&&d.parentNode.removeChild(d))}let c=e;for(let l=0;l<s.length;l++){let d=s[l];c.nextSibling!==d&&i.insertBefore(d,c.nextSibling),c=d}t=s}return oe(r)}var k="http://www.w3.org/2000/svg",Ze=C(),zi=new Set(["script","iframe","object","embed","frame","frameset"]);function Ii(e){return zi.has(e.toLowerCase())}var ji=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);function Wi(e,n,t){e[n]=t}function qi(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 Dt=new Map;function Vi(e){let n=Dt.get(e);return n!==void 0||(n=e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),Dt.set(e,n)),n}function Ki(e,n){if(typeof n=="function"){let r=A(()=>{e.setAttribute("style",n())});v(e,r);return}if(typeof n=="string"){e.setAttribute("style",n);return}let t=e;for(let r in n){let o=n[r],i=Vi(r);if(typeof o=="function"){let s=o,a=A(()=>{t.style.setProperty(i,je(String(s())))});v(e,a)}else t.style.setProperty(i,je(String(o)))}}function Ui(e,n){if(typeof n=="string"){e.setAttribute("class",n);return}if(typeof n=="function"){let i=A(()=>{e.setAttribute("class",n())});v(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=A(()=>{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)});v(e,s)}else e.setAttribute("class",o)}function Xe(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),v(e,G(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),v(e,G(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),v(e,G(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 u=(e,n)=>{let t=Ii(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),Xe(i,o),i):(Ze&&qi(r)&&E(`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 Xe(i,r),i;let s=r,a=s.class;a!=null&&Ui(i,a);let c=s.id;c!=null&&(Ze&&typeof c=="string"&&ji.has(c.toLowerCase())&&E(`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&&Xe(i,l);let d=s.on;if(d)for(let f in d){let m=d[f];typeof m=="function"?i.addEventListener(f,m):Ze&&E(`tagFactory: on.${f} handler is not a function (got ${typeof m}). Event listener was not attached.`)}let g=s.style;g!=null&&Ki(i,g);let T=s.ref;T&&(T.current=i);for(let f in s)switch(f){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let m=s[f];if(m==null||J(f))continue;typeof m=="function"?v(i,Re(i,f,m)):typeof m=="boolean"?f in i&&(f==="checked"||f==="disabled"||f==="selected")?Wi(i,f,m):m?i.setAttribute(f,""):i.removeAttribute(f):i.setAttribute(f,he(f,String(m)))}}return s.onElement&&typeof s.onElement=="function"&&s.onElement(i),i}};var qs=u("html"),Ft=u("head"),Bt=u("body"),zt=u("title"),w=u("div"),L=u("span"),It=u("section"),jt=u("article"),Wt=u("header"),qt=u("footer"),Vt=u("nav"),Kt=u("main"),Ut=u("aside"),Jt=u("address"),He=u("p"),Gt=u("h1"),Zt=u("h2"),Oe=u("h3"),Xt=u("h4"),Qt=u("h5"),Yt=u("h6"),en=u("blockquote"),tn=u("dd"),nn=u("dl"),rn=u("dt"),on=u("figcaption"),sn=u("figure"),an=u("hr"),cn=u("li"),ln=u("ol"),un=u("ul"),$e=u("pre"),dn=u("a"),fn=u("abbr"),pn=u("b"),mn=u("bdi"),gn=u("bdo"),bn=u("br"),hn=u("cite"),Pe=u("code"),yn=u("data"),xn=u("dfn"),vn=u("em"),Tn=u("i"),Sn=u("kbd"),wn=u("mark"),En=u("q"),kn=u("rp"),Cn=u("rt"),_n=u("ruby"),An=u("s"),Nn=u("samp"),Ln=u("small"),Mn=u("strong"),Rn=u("sub"),Hn=u("sup"),On=u("time"),$n=u("u"),Pn=u("var"),Dn=u("area"),Fn=u("audio"),Bn=u("img"),zn=u("map"),In=u("track"),jn=u("video"),Wn=u("embed"),qn=u("iframe"),Vn=u("object"),Kn=u("param"),Un=u("picture"),Jn=u("portal"),Gn=u("source"),Zn=u("svg",k),Xn=u("math"),Qn=u("canvas"),Yn=u("noscript"),er=u("script"),tr=u("del"),nr=u("ins"),rr=u("caption"),or=u("col"),ir=u("colgroup"),sr=u("table"),ar=u("tbody"),cr=u("td"),lr=u("tfoot"),ur=u("th"),dr=u("thead"),fr=u("tr"),ue=u("button"),pr=u("datalist"),mr=u("fieldset"),gr=u("form"),br=u("input"),hr=u("label"),yr=u("legend"),xr=u("meter"),vr=u("optgroup"),Tr=u("option"),Sr=u("output"),wr=u("progress"),Er=u("select"),kr=u("textarea"),Cr=u("details"),_r=u("dialog"),Ar=u("menu"),Nr=u("summary"),Lr=u("slot"),Mr=u("template"),Rr=u("base"),Hr=u("link"),Or=u("meta"),K=u("style"),$r=u("circle",k),Pr=u("ellipse",k),Dr=u("g",k),Fr=u("line",k),Br=u("path",k),zr=u("polygon",k),Ir=u("polyline",k),jr=u("rect",k),Wr=u("text",k),qr=u("tspan",k),Vr=u("defs",k),Kr=u("clipPath",k),Ur=u("mask",k),Jr=u("pattern",k),Gr=u("linearGradient",k),Zr=u("radialGradient",k),Xr=u("stop",k),Qr=u("use",k),Yr=u("symbol",k),eo=u("marker",k),to=u("center"),no=u("font"),ro=u("marquee"),oo=e=>u(e);var Ji=C(),Gi=new Set(["script","style"]),Zi=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),io=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),so=new WeakMap;function Xi(e){let n=e.length-1,t=e[0];for(let f=0;f<n;f++)t+=`\0${f}\0${e[f+1]}`;let r=0,o=t.length;function i(){for(;r<o&&(t[r]===" "||t[r]===" "||t[r]===`
|
|
2
|
+
`||t[r]==="\r");)r++}function s(){if(t.charCodeAt(r)!==0)return-1;let f=r;r++;let m=0;for(;r<o&&t.charCodeAt(r)!==0;)m=m*10+(t.charCodeAt(r)-48),r++;return r<o&&r++,m<0||m>=n?(r=f,-1):m}function a(){let f=r;for(;r<o;){let m=t.charCodeAt(r);if(m>=97&&m<=122||m>=65&&m<=90||m>=48&&m<=57||m===45)r++;else break}return t.slice(f,r)}function c(){if(i(),t[r]!=="=")return{kind:"bool"};r++,i();let f=s();if(f>=0)return{kind:"expr",idx:f};let m=t[r];if(m==='"'||m==="'"){r++;let y=[],b=[],p="";for(;r<o&&t[r]!==m;){let x=s();x>=0?(y.push(p),p="",b.push(x)):p+=t[r++]}return r<o&&r++,y.push(p),b.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:b}}{let y=[],b=[],p="";for(;r<o;){let x=t.charCodeAt(r);if(x===32||x===9||x===10||x===13||x===62)break;let S=s();S>=0?(y.push(p),p="",b.push(S)):p+=t[r++]}return y.push(p),b.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:b}}}function l(){let f=[];for(;r<o&&(i(),!(t[r]===">"||t[r]==="/"));){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||p===58||p===95||p===46)r++;else break}let y=t.slice(m,r);if(!y)break;let b=c();y.startsWith("on:")?b.kind==="expr"&&f.push({t:3,name:y.slice(3),idx:b.idx}):b.kind==="bool"?f.push({t:4,name:y}):b.kind==="static"?f.push({t:0,name:y,value:b.value}):b.kind==="expr"?f.push({t:1,name:y,idx:b.idx}):b.kind==="mixed"&&f.push({t:2,name:y,statics:b.statics,exprs:b.exprs})}return f}function d(f){return f.replace(/\s+/g," ")}function g(f){let m="";for(;r<o&&t[r]!=="<";){let b=s();if(b>=0){let p=d(m);p&&f.push({t:1,value:p}),m="",f.push({t:2,idx:b})}else m+=t[r++]}let y=d(m);y&&f.push({t:1,value:y})}function T(){let f=[];for(;r<o&&!(t[r]==="<"&&r+1<o&&t[r+1]==="/");)if(t[r]==="<"){let m=t[r+1];if(m==="!"){if(t.startsWith("<!--",r)){let S=t.indexOf("-->",r+4);r=S===-1?o:S+3}else if(t.startsWith("<![CDATA[",r)){let S=t.indexOf("]]>",r+9);r=S===-1?o:S+3}else{let S=t.indexOf(">",r);r=S===-1?o:S+1}continue}if(m==="?"){let S=t.indexOf(">",r);r=S===-1?o:S+1;continue}if(!(m>="a"&&m<="z")&&!(m>="A"&&m<="Z")){f.push({t:1,value:"<"}),r++;continue}r++;let y=a(),b=l();i();let p=Zi.has(y),x=t[r]==="/";if(x&&r++,r<o&&r++,p||x)f.push({t:0,el:{tag:y,svg:io.has(y),attrs:b,children:[]}});else{let S=T();if(Gi.has(y.toLowerCase())){for(let B=0;B<S.length;B++)if(S[B].t===2)throw new Error(`html: dynamic \${...} expressions are not allowed inside <${y}> (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++),f.push({t:0,el:{tag:y,svg:io.has(y),attrs:b,children:S}})}}else g(f);return f}return T()}function Qe(e,n){let t=e.svg?document.createElementNS(k,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=i.toLowerCase();if(J(i))break;let a=n[o.idx];if(typeof a=="function")v(t,Re(t,i,a));else if(a!=null){let c=String(a);s==="srcset"?t.setAttribute(i,Ce(c)):We(s)?t.setAttribute(i,be(c)):t.setAttribute(i,c)}break}case 2:{let i=o.statics[0];for(let a=0;a<o.exprs.length;a++){let c=n[o.exprs[a]];i+=(c==null?"":String(c))+o.statics[a+1]}let s=o.name.toLowerCase();s==="srcset"?t.setAttribute(o.name,Ce(i)):We(s)?t.setAttribute(o.name,be(i)):t.setAttribute(o.name,i);break}case 3:{let i=n[o.idx];typeof i=="function"?t.addEventListener(o.name,i):Ji&&E(`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(Qe(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),v(t,G(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 Ye(e,...n){let t=so.get(e);if(t||(t=Xi(e),so.set(e,t)),t.length===1&&t[0].t===0)return Qe(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(Qe(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),v(r,G(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 ao(e,n){if(!n)throw new Error("[SibuJS mount] container element not found. Make sure the DOM element exists before calling mount().");H(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}),N(r),r.parentNode&&r.parentNode.removeChild(r)}}}var et=C();function co(e){return typeof e=="function"?co(e()):e instanceof Node?e:document.createTextNode(String(e))}function Qi(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,d=t.length;for(;l<d;){let g=l+d>>1;e[t[g]]<c?l=g+1:d=g}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 lo(e,n,t){H(typeof e=="function","each: first argument must be a function that returns an array."),H(typeof n=="function","each: second argument must be a render function."),H(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,d=new Map,g=[],T=[],f=new Uint8Array(0),m=new Map,y=[],b=[],p=new Map,x=!1,S=!1,B=t.key,xt=()=>{let vt=e(),M=vt.length,Se=r.parentNode;if(!Se)return;S||(Se.insertBefore(o,r.nextSibling),S=!0),T.length<M&&(T=new Array(M));for(let h=0;h<M;h++)T[h]=B(vt[h]);let j=T;g.length<M&&(g=new Array(M)),d.clear(),p.clear();for(let h=0;h<M;h++)et&&p.has(j[h])&&E(`each: duplicate key "${String(j[h])}" at index ${h} (first seen at ${p.get(j[h])}). Keys must be unique \u2014 duplicates cause rows to be dropped or mis-ordered.`),p.set(j[h],h);for(let h=0;h<M;h++){let R=j[h],St=l.get(R),ge;if(St!==void 0)ge=St;else{let wt=R,hi=()=>V(()=>e()[p.get(wt)]),yi=()=>p.get(wt);try{ge=co(n(hi,yi))}catch(te){et&&E(`each: render threw for item at index ${h} (key="${j[h]}"): ${te instanceof Error?te.message:String(te)}`),ge=document.createComment(`each:error:${h}`);let Et=te instanceof Error?te:new Error(String(te));queueMicrotask(()=>{try{let kt=r.parentNode;kt?.dispatchEvent?kt.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:Et}})):et&&E(`each: error not surfaced \u2014 anchor detached: ${Et.message}`)}catch{}})}}d.set(R,ge),g[h]=ge}for(let[h,R]of l)d.has(h)||(N(R),R.parentNode&&Se.removeChild(R));if(M===0){c=0;let h=l;l=d,d=h;return}m.clear();for(let h=0;h<c;h++)m.set(a[h],h);y.length<M&&(y=new Array(M),b=new Array(M));let we=0;for(let h=0;h<M;h++){let R=m.get(j[h]);R!==void 0&&(y[we]=h,b[we]=R,we++)}let Tt=Qi(b,we);f.length<M?f=new Uint8Array(M):f.fill(0,0,M);for(let h=0;h<Tt.length;h++)f[y[Tt[h]]]=1;let Ee=o;for(let h=M-1;h>=0;h--){let R=g[h];f[h]||R.nextSibling!==Ee&&Se.insertBefore(R,Ee),Ee=R}let ke=a===i?s:i;ke.length<M&&(ke.length=M);for(let h=0;h<M;h++)ke[h]=j[h];a=ke,c=M;let bi=l;l=d,d=bi,x=!0},gi=A(xt);return v(r,gi),x||queueMicrotask(()=>{!x&&r.parentNode&&xt()}),r}function fo(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(uo(r));else n.appendChild(uo(t));return n}function uo(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))}function po(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){typeof console<"u"&&console.error("[Portal] Render error:",s);let a=s instanceof Error?s:new Error(String(s));queueMicrotask(()=>{try{let c=t.parentNode;c?.dispatchEvent&&c.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:a}}))}catch{}})}}),v(t,()=>{i=!0,o&&(N(o),o.remove(),o=null)}),t}var tt=new Map;function mo(e,n){tt.set(e,n)}function go(e){tt.delete(e)}function nt(e){let n=tt.get(e);return n?n():w({nodes:`[Component "${e}" not found]`})}function bo(e){let n=w({class:"sibu-dynamic"});function t(){let o=e(),i;typeof o=="function"?i=o():i=nt(o);for(let s of Array.from(n.childNodes))N(s);n.replaceChildren(i)}let r=A(t);return v(n,r),n}function ho(e,n="default"){return e?.[n]}function yo(e,n){return v(n,A(()=>{n.style.display=e()?"":"none"})),n}function xo(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&&(N(o),o.parentNode.removeChild(o),o=null);let d=c?n():t?t():null;if(d!=null){let g=d instanceof Node?d:document.createTextNode(String(d));l.insertBefore(g,r.nextSibling),o=g}s=!0};return v(r,A(a)),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function vo(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&&(N(o),o.parentNode.removeChild(o),o=null);let d=n[c]||t;if(d){let g=d();if(g!=null){let T=g instanceof Node?g:document.createTextNode(String(g));l.insertBefore(T,r.nextSibling),o=T}}s=!0};return v(r,A(a)),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function To(e,n,t){let r=document.createComment("keep-alive"),o=new Map,i=[],s=t?.max??10;s===0&&C()&&E("KeepAlive: unbounded cache (max: 0). Cached subtrees will never be evicted \u2014 set `max` to bound memory.");let a,c=null,l=!1,d=!1,g=()=>{if(d)return;let f=e(),m=r.parentNode;if(!m||l&&f===a)return;c?.parentNode&&m.removeChild(c),a=f;let y=o.get(f);if(y){let b=i.indexOf(f);b!==-1&&(i.splice(b,1),i.push(f))}else{let b=n[f];if(!b){c=null,l=!0;return}if(y=b(),y instanceof DocumentFragment){let p=document.createElement("div");p.style.display="contents",p.appendChild(y),y=p}if(o.set(f,y),i.push(f),s>0&&i.length>s){let p=i.shift(),x=o.get(p);x&&(N(x),x.parentNode&&x.parentNode.removeChild(x),o.delete(p))}}m.insertBefore(y,r.nextSibling),c=y,l=!0},T=A(g);return l||queueMicrotask(()=>{!l&&r.parentNode&&g()}),v(r,()=>{d=!0,T();for(let f of o.values())N(f),f.parentNode&&f.parentNode.removeChild(f);o.clear(),i.length=0,c=null}),r}function So(e,n,t){let r=n(e,t);typeof r=="function"&&v(e,r)}var wo=(e,n)=>{let t=r=>{e.contains(r.target)||n()};return document.addEventListener("pointerdown",t,!0),()=>document.removeEventListener("pointerdown",t,!0)},Eo=(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)}},ko=(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)},Co=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)},_o=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)};var Z=null;function Ao(e,n){try{let t=e();return t&&typeof t.then=="function"&&t.catch(r=>{n?n(r,"async"):Z?Z(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),t}catch(t){return n?n(t,"sync"):Z?Z(t,"sync"):console.error("Unhandled error in Sibu.catchError:",t),null}}async function No(e,n){try{return await e()}catch(t){return n?n(t,"async"):Z?Z(t,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",t),null}}function Lo(e){Z=e}var rt=0;function Mo(e="sibu"){return rt++,`${e}-${rt}`}function Ro(){rt=0}var xe=0,ot=new Set;function $(e){xe++;try{return e()}finally{xe--,xe===0&&Yi()}}function U(e){return xe===0?!1:(ot.add(e),!0)}function Ho(){return xe>0}function Yi(){try{for(let e of ot)Ot(e)}finally{ot.clear()}Ht()}var it=globalThis,De=C();function _(e,n){let t={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0},r=De?n?.name:void 0,o=n?.equals;r&&(t.__name=r);function i(){return ie(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++,De){let d=it.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:l})}U(t)||se(t)}}:De?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 d=it.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:l}),U(t)||se(t)}:s=a=>{let c=t.value,l=typeof a=="function"?a(c):a;Object.is(l,c)||(t.value=l,t.__v++,U(t)||se(t))},De){let a=it.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:t,name:r,getter:i,initial:e})}return[i,s]}var de=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let e=null,n=process.getBuiltinModule;if(typeof n=="function")e=n("node:async_hooks");else{let t=Function("return typeof require==='function'?require:null")();t&&(e=t("node:async_hooks"))}e&&(de=new e.AsyncLocalStorage)}}catch{de=null}var X={ssr:!1,suspenseIdCounter:0};function Q(){if(de){let e=de.getStore();if(e)return e}return X}function Y(){return Q().ssr}function Oo(e){if(!Y())return null;let n=Q(),t=n.caches??(n.caches=new Map),r=t.get(e);return r||(r=new Map,t.set(e,r)),r}function $o(){Q().ssr=!0}function Po(){Q().ssr=!1}function Do(e){let n={ssr:!0,suspenseIdCounter:0};if(de)return de.run(n,e);let t=X.ssr,r=X.suspenseIdCounter;X.ssr=!0,X.suspenseIdCounter=0;try{return e()}finally{X.ssr=t,X.suspenseIdCounter=r}}function Fo(e){let n=Q(),t=n.ssr;n.ssr=!0;try{return e()}finally{t||(n.ssr=!1)}}var st=globalThis;function Io(e,n){let t,r=!0;return()=>{let o=e();if(r)r=!1,t=o,V(()=>n(o,void 0));else{let i=t;t=o,V(()=>n(o,i))}}}var Bo=100;function at(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){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw:",r)}}}function zo(e){let n=1;do e.rerunPending=!1,e.userCleanups.length>0&&at(e),F(e.bodyFn,e.subscriber);while(e.rerunPending&&++n<=Bo);e.rerunPending&&(e.rerunPending=!1,st.__SIBU_DEV_WARN__!==!1&&typeof console<"u"&&console.error(`[SibuJS] effect re-requested itself ${Bo}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`))}function es(e){if(e.disposed)return;e.disposed=!0;let n=st.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(n)try{n.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&at(e)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",t)}try{ye(e.subscriber)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",t)}}function O(e,n){if(H(typeof e=="function","effect: argument must be a function."),Y())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&&at(t),F(t.bodyFn,o),t.rerunPending&&zo(t)}finally{t.running=!1,t.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._runEpoch=0,o._runs=0,t.subscriber=o,t.running=!0;try{F(t.bodyFn,t.subscriber),t.rerunPending&&zo(t)}finally{t.running=!1,t.rerunPending=!1}let i=st.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("effect:create",{effectFn:e}),()=>es(t)}function Fe(e,n){H(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 d=e();o._v=r&&o._init&&r(o._v,d)?o._v:d,o._d=!1,o._init=!0};A(()=>{let d=!0;try{o._v=e(),o._d=!1,o._init=!0,d=!1}finally{d&&(o._d=!0)}},i);let a=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,c=!1;function l(){if(c)throw new Error(`[SibuJS] Circular dependency detected in derived${t?` "${t}"`:""}. A derived signal cannot read itself (directly or through a chain).`);if(Le){if(o._d){let d=o._v;c=!0;try{F(s,i),Object.is(d,o._v)||o.__v++}finally{c=!1}}return o._v}if(ie(o),o._d){let d=o._v;c=!0;try{F(s,i),Object.is(d,o._v)||o.__v++}finally{c=!1}a&&d!==o._v&&a.emit("computed:update",{signal:o,oldValue:d,newValue:o._v})}return o._v}return t&&(l.__name=t,o.__name=t),l.__signal=o,a&&a.emit("computed:create",{signal:o,name:t,getter:l}),l}function jo(e,n){if(H(typeof e=="function","watch: first argument must be a getter function."),H(typeof n=="function","watch: second argument must be a callback function."),Y())return()=>{};let t,r=!0;return A(()=>{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{re()}}})}function Wo(e){H(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,d]=_(e[c]);n[c]=[l,d]});let t=new Proxy({},{get(c,l){if(typeof l=="string"&&Object.hasOwn(n,l)){let d=n[l][0];return d()}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(),d=typeof c=="function"?c(l):c;$(()=>{Object.entries(d).forEach(([g,T])=>{Object.hasOwn(n,g)&&n[g][1](T)})})},reset:()=>{$(()=>{Object.keys(e).forEach(c=>{let l=n[c][1];l(e[c])})})},subscribe:c=>{let l=!0;return O(()=>{let d=r();if(l){l=!1;return}ne();try{c(d)}finally{re()}})},subscribeKey:(c,l)=>{let d,g=!0;return O(()=>{let T=n[c][0]();if(g){d=T,g=!1;return}if(!Object.is(T,d)){let f=d;d=T,ne();try{l(T,f)}finally{re()}}})},getSnapshot:r}]}function qo(e){let[n,t]=_(e);return{get current(){return n()},set current(r){t(r)}}}function Vo(e=[]){let[n,t]=_([...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 Ko(e=[]){let n=[...e],t=null,r={};function o(){t=null,U(r)||se(r)}function i(){if(ie(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 d=n.splice(a,c,...l);return(d.length>0||l.length>0)&&o(),d},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 d=0;d<n.length;d++)if(a(n[d])){let g=c(n[d]);Object.is(n[d],g)||(n[d]=g,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 d=a(n[l],l);Object.is(n[l],d)||(n[l]=d,c=!0)}c&&o()},clear(){n.length!==0&&(n=[],o())}}]}function fe(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,d]of e)if(!c.has(l)||!fe(d,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 d=0;d<c.length;d++)if(c[d]!==l[d])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 d=0;d<c.length;d++)if(c[d]!==l[d])return!1;return!0}if(Array.isArray(e))return!Array.isArray(n)||e.length!==n.length?!1:e.every((c,l)=>fe(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)&&fe(r[c],o[c],t))}function Uo(e){return _(e,{equals:(n,t)=>fe(n,t)})}function Jo(e,n,t){return[Fe(e,t),i=>{$(()=>n(i))}]}function Go(e,n){let[t,r]=_(n),[o,i]=_(!1),[s,a]=_(null),[c,l]=_(0),d=0;return O(()=>{c();let g=++d;$(()=>{i(!0),a(null)});let T;try{T=e()}catch(f){$(()=>{a(f),i(!1)});return}T.then(f=>{g===d&&$(()=>{r(f),i(!1)})},f=>{g===d&&$(()=>{a(f),i(!1)})})}),{value:t,loading:o,error:s,refresh:()=>l(g=>g+1)}}function dt(e,n){try{return e()}catch(t){E(`${n}: callback threw: ${t instanceof Error?t.message:String(t)}`);return}}function ct(e,n,t){let r=dt(e,n);typeof r=="function"&&t&&v(t,r)}var pe=new WeakMap,ee=new WeakMap,z=new Set,I=new Set,me=null,Be=0,ts=256;function lt(e){let n=pe.get(e);if(n){pe.delete(e),z.delete(e);for(let t of n)try{t()}catch{}}}function ut(e){ee.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let t=ee.get(e);if(t){ee.delete(e),I.delete(e);for(let r of t)try{r()}catch{}}})}function ns(e){if(z.size===0||e.nodeType!==1)return;let n=e;if(z.has(n)&&n.isConnected&<(n),n.firstElementChild)for(let t of Array.from(z))t!==n&&t.isConnected&&n.contains(t)&<(t)}function rs(e){if(I.size===0||e.nodeType!==1)return;let n=e;if(I.has(n)&&!n.isConnected&&ut(n),n.firstElementChild)for(let t of Array.from(I))t!==n&&!t.isConnected&&n.contains(t)&&ut(t)}function os(){if(z.size>0)for(let e of Array.from(z))e.isConnected&<(e);if(I.size>0)for(let e of Array.from(I))e.isConnected||ut(e)}function Zo(){me||typeof document>"u"||(me=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++)ns(n.addedNodes[t]);if(n.removedNodes.length>0)for(let t=0;t<n.removedNodes.length;t++)rs(n.removedNodes[t])}Be+=e.length,Be>=ts&&(Be=0,os()),ft()}),me.observe(document.body,{childList:!0,subtree:!0}))}function ft(){me&&z.size===0&&I.size===0&&(me.disconnect(),me=null,Be=0)}function is(e,n){let t=pe.get(e);return t||(t=[],pe.set(e,t)),t.push(n),z.add(e),Zo(),()=>{let r=pe.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(pe.delete(e),z.delete(e))}ft()}}function ss(e,n){let t=ee.get(e);return t||(t=[],ee.set(e,t)),t.push(n),I.add(e),Zo(),()=>{let r=ee.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(ee.delete(e),I.delete(e))}ft()}}function ve(e,n){if(!(typeof document>"u"))if(n){let t=!1;if(v(n,()=>{t=!0}),n.isConnected){queueMicrotask(()=>{t||ct(e,"onMount",n)});return}queueMicrotask(()=>{if(t)return;if(n.isConnected){ct(e,"onMount",n);return}let r=is(n,()=>{t||ct(e,"onMount",n)});v(n,r)})}else queueMicrotask(()=>{dt(e,"onMount")})}function Xo(e,n){if(typeof document>"u")return;let t=!1,r=()=>{t||(t=!0,dt(e,"onUnmount"))};v(n,r);let o=()=>{if(t)return;let i=ss(n,r);v(n,i)};n.isConnected?o():ve(()=>{o()},n)}function Qo(e,n){v(n,e)}function Yo(e){let[n,t]=_(e);return{provide(o){let i=n();return t(o),()=>t(i)},use(){return n},get(){return n()},set(o){t(o)},withContext(o,i){let s=n();t(o);try{return i()}finally{t(s)}}}}function ei(e){let n=e();return C()&&queueMicrotask(()=>{try{e()}catch(t){console.warn("[SibuJS strict] second run threw:",t)}}),n}function ti(e){if(!C())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()}}function ni(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}function oi(e){let[n,t]=_(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=A(()=>{i=e(),a()}),l=(()=>n());return l.dispose=()=>{o||(o=!0,c())},l}var ri=16;function as(e){let n=globalThis;if(typeof n.requestIdleCallback=="function"){n.requestIdleCallback(e,{timeout:ri*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,ri)}function ii(){let[e,n]=_(!1);function t(r){n(!0),as(()=>{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}}var pt="__sibuPendingError";function si(e,n){let t=()=>{try{return e.parentNode?(e.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:n}})),!0):!1}catch{return!1}};e.parentNode&&t()||queueMicrotask(()=>{t()||(e[pt]=n)})}function Te(e){let n=e,t=n[pt];if(t instanceof Error)return delete n[pt],t}function mt(e){let n=null;return function(){if(n)return n();let r=w({class:"sibu-lazy"}),o=!1;return e().then(i=>{if(o)return;n=i.default;let s=n();r.replaceChildren(s)}).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));E(`[SibuJS] lazy() failed to load component: ${s.message}`),r.replaceChildren(w({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),si(r,s)}),r.appendChild(L("sibu-lazy-loading","Loading...")),v(r,()=>{o=!0}),r}}function gt({nodes:e,fallback:n}){let t=w({class:"sibu-suspense"}),r=n();t.appendChild(r);let o=!1,i=null,s=null;return v(t,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!t.contains(s)&&N(s)}),queueMicrotask(()=>{if(!o)try{let a=e();if(s=a,a.classList.contains("sibu-lazy")){if(!a.querySelector(".sibu-lazy-loading")){t.replaceChildren(a);return}i=new MutationObserver(()=>{if(o)return;a.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,t.replaceChildren(a))}),i.observe(a,{childList:!0,subtree:!0})}else t.replaceChildren(a)}catch(a){let c=a instanceof Error?a:new Error(String(a));E(`[SibuJS] Suspense nodes() threw: ${c.message}`),si(t,c)}}),t}var _c=C();function bt(e){return e}var Ac=1024*1024;var cs=C(),ls=`
|
|
3
3
|
.sibu-error-display {
|
|
4
4
|
border: 1px solid var(--sibu-err-border, #e5484d);
|
|
5
5
|
border-radius: 10px;
|
|
@@ -180,11 +180,11 @@
|
|
|
180
180
|
border: 1px solid #3a3a4e;
|
|
181
181
|
}
|
|
182
182
|
.sibu-error-display .sibu-err-btn-reload:hover { background: #2a2b40; }
|
|
183
|
-
`,
|
|
184
|
-
`);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
|
|
183
|
+
`,ai=!1;function us(){if(ai||typeof document>"u")return;let e=K({nodes:ls});document.head.appendChild(e),ai=!0}function ds(e){let n=[],t=e.split(`
|
|
184
|
+
`);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 ci(e){if(e instanceof Error){let n=e.code??e.name??"ERROR",t=e.message||"Unknown error",r=e.stack??"",o=ds(r),i=e.cause,s=i!=null?ci(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 fs(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(`
|
|
185
185
|
`).map(s=>` ${s}`).join(`
|
|
186
186
|
`);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(`
|
|
187
|
-
`)}function
|
|
187
|
+
`)}function li(e){let n=e.map((t,r)=>w({class:"sibu-err-frame",nodes:[L({class:"sibu-err-line",nodes:String(r+1)}),L({class:"sibu-err-fn",nodes:t.fn}),L({class:"sibu-err-loc",nodes:` \u2014 ${t.loc}`})]}));return $e({class:"sibu-err-stack",nodes:n})}function ui(e){return e?[w({class:"sibu-err-cause-label",nodes:"Caused by"}),w({class:"sibu-err-section",nodes:[w({class:"sibu-err-section-head",nodes:[L({nodes:`[${e.code}] ${e.message}`}),L({nodes:""})]}),e.frames.length>0?li(e.frames):w({class:"sibu-err-stack",nodes:"(no stack)"})]}),...ui(e.cause)]:[]}function ps(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 ze(e){us();let n=e.severity??"error",t=ci(e.error),r=e.alwaysShowDetails??cs,o=e.title??t.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=_("Copy"),c=ue({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let f=fs(t,e.metadata,o);typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(f).then(()=>{a("Copied!"),setTimeout(()=>a("Copy"),1500)},()=>{a("Copy failed"),setTimeout(()=>a("Copy"),1500)})}}}),l=w({class:"sibu-err-header",nodes:[Pe({class:"sibu-err-icon",nodes:t.code}),Oe({class:"sibu-err-title",nodes:o}),c,L({class:"sibu-err-timestamp",nodes:i})]}),d=[He({class:"sibu-err-message",nodes:t.message})];r&&t.frames.length>0&&d.push(w({class:"sibu-err-section",nodes:[w({class:"sibu-err-section-head",nodes:[L({nodes:"Stack Trace"})]}),li(t.frames)]})),r&&d.push(...ui(t.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&d.push(w({class:"sibu-err-section",nodes:[w({class:"sibu-err-section-head",nodes:[L({nodes:"Metadata"})]}),ps(e.metadata)]}));let g=[];e.onRetry&&g.push(ue({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&g.push(ue({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),g.length>0&&d.push(w({class:"sibu-err-actions",nodes:g}));let T=w({class:"sibu-err-body",nodes:d});return w({class:"sibu-error-display","data-severity":n,nodes:[l,T]})}var ms=`
|
|
188
188
|
.sibu-error-boundary {
|
|
189
189
|
position: relative;
|
|
190
190
|
}
|
|
@@ -338,7 +338,7 @@
|
|
|
338
338
|
.sibu-error-fallback .sibu-error-btn-reload:hover {
|
|
339
339
|
background: #3a3a4e;
|
|
340
340
|
}
|
|
341
|
-
`,
|
|
341
|
+
`,di=!1;function gs(){if(!di&&typeof document<"u"){let e=K({nodes:ms});document.head.appendChild(e),di=!0}}var bs=50,ht=new WeakMap;function hs(e,n,t){let r=ht.get(e);r||(r=new Map,ht.set(e,r));let o=n.message,i=r.get(o);if(i)r.delete(o),r.set(o,i);else if(i=()=>e(n,t),r.set(o,i),r.size>bs){let s=r.keys().next().value;s!==void 0&&r.delete(s)}return i()}function fi(e,n){let t=typeof e=="function"?e:n,r=typeof e=="function"?{}:e,{fallback:o,onError:i,resetKeys:s}=r;gs();let[a,c]=_(null),l=()=>{if(o){let b=a(),p=ht.get(o);b&&p&&p.delete(b.message)}c(null)},d=null;if(s&&s.length>0){let b=!1;d=O(()=>{for(let p of s)try{p()}catch(x){typeof console<"u"&&console.warn("[SibuJS ErrorBoundary] resetKeys getter threw:",x)}if(!b){b=!0;return}a()!==null&&l()})}let g=b=>{let p=b instanceof Error?b:new Error(String(b));if(c(p),i)try{i(p)}catch(x){typeof console<"u"&&console.error("[SibuJS ErrorBoundary] onError callback threw:",x)}return p},T=(b,p)=>ze({error:b,severity:"error",onRetry:p}),f=b=>{let p=o||T;try{return hs(p,b,l)}catch(x){let S=x instanceof Error?x:new Error(String(x));return queueMicrotask(()=>{m.parentNode&&m.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:S}}))}),document.createComment("error-boundary-failed")}},m=w({class:"sibu-error-boundary",nodes:()=>{let b=a();if(b)return f(b);try{let p=t();if(p&&typeof p.then=="function"){let x=w({class:"sibu-error-async"});return x.appendChild(L({class:"sibu-lazy-loading",nodes:"Loading..."})),p.then(S=>{x.replaceChildren(S)}).catch(S=>{let B=g(S);x.replaceChildren(f(B))}),x}return p}catch(p){let x=g(p);return f(x)}}}),y=b=>{if(a())return;b.stopPropagation();let x=b.detail?.error;x&&g(x)};return m.addEventListener("sibu:error-propagate",y),ve(()=>{let b=document.createTreeWalker(m,NodeFilter.SHOW_ELEMENT),p=[],x=b.currentNode;for(;x;){let S=Te(x);S&&p.push(S),x=b.nextNode()}if(p.length===1)g(p[0]);else if(p.length>1){let S=globalThis.AggregateError;g(S?new S(p,`${p.length} pre-mount errors caught by ErrorBoundary`):new Error(p.map(B=>B.message).join("; ")))}},m),v(m,()=>{d&&d(),m.removeEventListener("sibu:error-propagate",y)}),m}var ys=`
|
|
342
342
|
@keyframes sibu-spin {
|
|
343
343
|
to { transform: rotate(360deg); }
|
|
344
344
|
}
|
|
@@ -391,4 +391,4 @@
|
|
|
391
391
|
.sibu-loading-lg .sibu-loading-spinner { width: 40px; height: 40px; border-width: 4px; }
|
|
392
392
|
.sibu-loading-lg .sibu-loading-dot { width: 12px; height: 12px; }
|
|
393
393
|
.sibu-loading-lg .sibu-loading-dots { gap: 6px; }
|
|
394
|
-
`,
|
|
394
|
+
`,pi=!1;function xs(){!pi&&typeof document<"u"&&(document.head.appendChild(K({nodes:ys})),pi=!0)}function mi(e={}){xs();let{text:n,variant:t="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return t==="dots"?w({class:`sibu-loading${o}`,nodes:[w({class:"sibu-loading-dots",nodes:[L({class:"sibu-loading-dot"}),L({class:"sibu-loading-dot"}),L({class:"sibu-loading-dot"})]}),n?L({class:"sibu-loading-text",nodes:n}):null].filter(Boolean)}):w({class:`sibu-loading${o}`,nodes:[w({class:"sibu-loading-spinner"}),n?L({class:"sibu-loading-text",nodes:n}):null].filter(Boolean)})}typeof window<"u"&&(window.Sibu=yt);return wi(vs);})();
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
watch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F4UM7QBJ.js";
|
|
4
4
|
import {
|
|
5
5
|
derived
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CVMMULHO.js";
|
|
7
7
|
import {
|
|
8
8
|
stripHtml
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-L3GAGWCC.js";
|
|
10
10
|
import {
|
|
11
11
|
effect
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7JHWAGRQ.js";
|
|
13
13
|
import {
|
|
14
14
|
batch,
|
|
15
15
|
signal
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5K72I3UQ.js";
|
|
17
17
|
|
|
18
18
|
// src/widgets/Combobox.ts
|
|
19
19
|
var comboboxIdCounter = 0;
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
notifySubscribers,
|
|
4
4
|
queueSignalNotification,
|
|
5
5
|
recordDependency
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-X3NHE2DK.js";
|
|
7
7
|
import {
|
|
8
8
|
isDev
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-COY6PUD2.js";
|
|
10
10
|
|
|
11
11
|
// src/reactivity/batch.ts
|
|
12
12
|
var batchDepth = 0;
|