sibujs 1.5.0 → 2.0.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.
Files changed (207) hide show
  1. package/dist/browser.cjs +238 -69
  2. package/dist/browser.d.cts +5 -0
  3. package/dist/browser.d.ts +5 -0
  4. package/dist/browser.js +6 -6
  5. package/dist/build.cjs +916 -292
  6. package/dist/build.js +15 -13
  7. package/dist/cdn.global.js +17 -16
  8. package/dist/chunk-2RA7SHDA.js +65 -0
  9. package/dist/chunk-2UPRY23K.js +80 -0
  10. package/dist/chunk-3JHCYHWN.js +125 -0
  11. package/dist/{chunk-VAPYJN4X.js → chunk-3LR7GLWQ.js} +93 -23
  12. package/dist/{chunk-RJ46C3CS.js → chunk-3NSGB5JN.js} +71 -20
  13. package/dist/{chunk-XUEEGU5O.js → chunk-52YJLLRO.js} +16 -4
  14. package/dist/{chunk-XHK6BDAJ.js → chunk-54EDRCEF.js} +25 -8
  15. package/dist/chunk-7JDB7I65.js +1327 -0
  16. package/dist/{chunk-WZSPOOER.js → chunk-CC65Y57T.js} +8 -5
  17. package/dist/{chunk-23VV7YD3.js → chunk-DFPFITST.js} +25 -30
  18. package/dist/{chunk-BGN5ZMP4.js → chunk-GTBNNBJ6.js} +14 -2
  19. package/dist/chunk-HB24TBAF.js +121 -0
  20. package/dist/{chunk-CZUGLNJS.js → chunk-ITX6OO3F.js} +3 -3
  21. package/dist/{chunk-BGTHZHJ5.js → chunk-JA6667UN.js} +188 -44
  22. package/dist/{chunk-7GRNSCFT.js → chunk-JXMMDLBY.js} +306 -183
  23. package/dist/{chunk-3X2YG6YM.js → chunk-JYD2PWXH.js} +59 -28
  24. package/dist/{chunk-SFKNRVCU.js → chunk-KLRMB5ZS.js} +135 -79
  25. package/dist/{chunk-5X6PP2UK.js → chunk-LMLD24FC.js} +2 -2
  26. package/dist/{chunk-M4NLBH4I.js → chunk-LYTCUZ7H.js} +3 -2
  27. package/dist/{chunk-BMPL52BF.js → chunk-MIUAXB7K.js} +118 -66
  28. package/dist/{chunk-JCDUJN2F.js → chunk-ND2664SF.js} +486 -153
  29. package/dist/{chunk-VQDZK23A.js → chunk-O2MNQFLP.js} +181 -66
  30. package/dist/{chunk-NHUC2QWH.js → chunk-R73P76YZ.js} +1 -1
  31. package/dist/{chunk-2BYQDGN3.js → chunk-SAHNHTFC.js} +234 -63
  32. package/dist/chunk-UCS6AMJ7.js +79 -0
  33. package/dist/{chunk-K4G4ZQNR.js → chunk-VLPPXTYG.js} +84 -38
  34. package/dist/{chunk-OUZZEE4S.js → chunk-WOMYAHHI.js} +17 -11
  35. package/dist/{customElement-BL3Uo8dL.d.cts → customElement-CPfIrbvg.d.cts} +14 -10
  36. package/dist/{customElement-BL3Uo8dL.d.ts → customElement-CPfIrbvg.d.ts} +14 -10
  37. package/dist/data.cjs +410 -99
  38. package/dist/data.d.cts +20 -2
  39. package/dist/data.d.ts +20 -2
  40. package/dist/data.js +11 -9
  41. package/dist/devtools.cjs +513 -223
  42. package/dist/devtools.d.cts +1 -1
  43. package/dist/devtools.d.ts +1 -1
  44. package/dist/devtools.js +12 -6
  45. package/dist/ecosystem.cjs +475 -144
  46. package/dist/ecosystem.d.cts +9 -7
  47. package/dist/ecosystem.d.ts +9 -7
  48. package/dist/ecosystem.js +12 -11
  49. package/dist/extras.cjs +3355 -1541
  50. package/dist/extras.d.cts +9 -9
  51. package/dist/extras.d.ts +9 -9
  52. package/dist/extras.js +58 -45
  53. package/dist/index.cjs +920 -292
  54. package/dist/index.d.cts +71 -8
  55. package/dist/index.d.ts +71 -8
  56. package/dist/index.js +28 -16
  57. package/dist/{introspect-BumjnBKr.d.cts → introspect-BWNjNw64.d.cts} +22 -2
  58. package/dist/{introspect-CZrlcaYy.d.ts → introspect-cY2pg9pW.d.ts} +22 -2
  59. package/dist/motion.cjs +77 -34
  60. package/dist/motion.js +4 -4
  61. package/dist/patterns.cjs +335 -69
  62. package/dist/patterns.d.cts +11 -12
  63. package/dist/patterns.d.ts +11 -12
  64. package/dist/patterns.js +7 -7
  65. package/dist/performance.cjs +279 -108
  66. package/dist/performance.d.cts +23 -16
  67. package/dist/performance.d.ts +23 -16
  68. package/dist/performance.js +13 -8
  69. package/dist/plugin-D30wlGW5.d.cts +71 -0
  70. package/dist/plugin-D30wlGW5.d.ts +71 -0
  71. package/dist/plugins.cjs +635 -260
  72. package/dist/plugins.d.cts +10 -3
  73. package/dist/plugins.d.ts +10 -3
  74. package/dist/plugins.js +106 -38
  75. package/dist/{ssr-Do_SiVoL.d.cts → ssr-CrVNy6Pa.d.cts} +9 -15
  76. package/dist/{ssr-Do_SiVoL.d.ts → ssr-CrVNy6Pa.d.ts} +9 -15
  77. package/dist/{ssr-4PBXAOO3.js → ssr-FXD2PPMC.js} +4 -3
  78. package/dist/ssr.cjs +642 -222
  79. package/dist/ssr.d.cts +26 -6
  80. package/dist/ssr.d.ts +26 -6
  81. package/dist/ssr.js +12 -11
  82. package/dist/{tagFactory-DaJ0YWX6.d.cts → tagFactory-S17H2qxu.d.cts} +9 -1
  83. package/dist/{tagFactory-DaJ0YWX6.d.ts → tagFactory-S17H2qxu.d.ts} +9 -1
  84. package/dist/testing.cjs +252 -63
  85. package/dist/testing.d.cts +17 -4
  86. package/dist/testing.d.ts +17 -4
  87. package/dist/testing.js +100 -44
  88. package/dist/ui.cjs +463 -137
  89. package/dist/ui.d.cts +1 -1
  90. package/dist/ui.d.ts +1 -1
  91. package/dist/ui.js +20 -17
  92. package/dist/widgets.cjs +977 -94
  93. package/dist/widgets.d.cts +104 -2
  94. package/dist/widgets.d.ts +104 -2
  95. package/dist/widgets.js +9 -7
  96. package/package.json +8 -2
  97. package/dist/chunk-32DY64NT.js +0 -282
  98. package/dist/chunk-3AIRKM3B.js +0 -1263
  99. package/dist/chunk-3ARAQO7B.js +0 -398
  100. package/dist/chunk-3CRQALYP.js +0 -877
  101. package/dist/chunk-4EI4AG32.js +0 -482
  102. package/dist/chunk-4MYMUBRS.js +0 -21
  103. package/dist/chunk-5ZYQ6KDD.js +0 -154
  104. package/dist/chunk-6BMPXPUW.js +0 -26
  105. package/dist/chunk-6HLLIF3K.js +0 -398
  106. package/dist/chunk-6LSNVCS2.js +0 -937
  107. package/dist/chunk-6SA3QQES.js +0 -61
  108. package/dist/chunk-77L6NL3X.js +0 -1097
  109. package/dist/chunk-7BF6TK55.js +0 -1097
  110. package/dist/chunk-7TQKR4PP.js +0 -294
  111. package/dist/chunk-7V26P53V.js +0 -712
  112. package/dist/chunk-AZ3ISID5.js +0 -298
  113. package/dist/chunk-B7SWRFUT.js +0 -332
  114. package/dist/chunk-BTU3TJDS.js +0 -365
  115. package/dist/chunk-BW3WT46K.js +0 -937
  116. package/dist/chunk-C6KFWOFV.js +0 -616
  117. package/dist/chunk-CHF5OHIA.js +0 -61
  118. package/dist/chunk-CHJ27IGK.js +0 -26
  119. package/dist/chunk-CMBFNA7L.js +0 -27
  120. package/dist/chunk-DAHRH4ON.js +0 -331
  121. package/dist/chunk-DKOHBI74.js +0 -924
  122. package/dist/chunk-DTCOOBMX.js +0 -725
  123. package/dist/chunk-EBGIRKQY.js +0 -616
  124. package/dist/chunk-EUZND3CB.js +0 -27
  125. package/dist/chunk-EVCZO745.js +0 -365
  126. package/dist/chunk-EWFVA3TJ.js +0 -282
  127. package/dist/chunk-F3FA4F32.js +0 -292
  128. package/dist/chunk-FGOEVHY3.js +0 -60
  129. package/dist/chunk-G3BOQPVO.js +0 -365
  130. package/dist/chunk-GCOK2LC3.js +0 -282
  131. package/dist/chunk-GJPXRJ45.js +0 -37
  132. package/dist/chunk-HGMJFBC7.js +0 -654
  133. package/dist/chunk-JAKHTMQU.js +0 -1000
  134. package/dist/chunk-JCI5M6U6.js +0 -956
  135. package/dist/chunk-K5ZUMYVS.js +0 -89
  136. package/dist/chunk-KQPDEVVS.js +0 -398
  137. package/dist/chunk-L6JRBDNS.js +0 -60
  138. package/dist/chunk-LA6KQEDU.js +0 -712
  139. package/dist/chunk-MB6QFH3I.js +0 -2776
  140. package/dist/chunk-MDVXJWFN.js +0 -304
  141. package/dist/chunk-MEZVEBPN.js +0 -2008
  142. package/dist/chunk-MK4ERFYL.js +0 -2249
  143. package/dist/chunk-MLKGABMK.js +0 -9
  144. package/dist/chunk-MQ5GOYPH.js +0 -2249
  145. package/dist/chunk-MYRV7VDM.js +0 -742
  146. package/dist/chunk-N6IZB6KJ.js +0 -567
  147. package/dist/chunk-NEKUBFPT.js +0 -60
  148. package/dist/chunk-NMRUZALC.js +0 -1097
  149. package/dist/chunk-NYVAC6P5.js +0 -37
  150. package/dist/chunk-NZIIMDWI.js +0 -84
  151. package/dist/chunk-OF7UZIVB.js +0 -725
  152. package/dist/chunk-P3XWXJZU.js +0 -282
  153. package/dist/chunk-P6W3STU4.js +0 -2249
  154. package/dist/chunk-PBHF5WKN.js +0 -616
  155. package/dist/chunk-PDZQY43A.js +0 -616
  156. package/dist/chunk-PTQJDMRT.js +0 -146
  157. package/dist/chunk-PZEGYCF5.js +0 -61
  158. package/dist/chunk-QBMDLBU2.js +0 -975
  159. package/dist/chunk-QWZG56ET.js +0 -2744
  160. package/dist/chunk-RQGQSLQK.js +0 -725
  161. package/dist/chunk-SDLZDHKP.js +0 -107
  162. package/dist/chunk-TDGZL5CU.js +0 -365
  163. package/dist/chunk-TNQWPPE6.js +0 -37
  164. package/dist/chunk-TSOKIX5Z.js +0 -654
  165. package/dist/chunk-UHNL42EF.js +0 -2730
  166. package/dist/chunk-UNXCEF6S.js +0 -21
  167. package/dist/chunk-V2XTI523.js +0 -347
  168. package/dist/chunk-VAU366PN.js +0 -2241
  169. package/dist/chunk-VMVDTCXB.js +0 -712
  170. package/dist/chunk-VQNQZCWJ.js +0 -61
  171. package/dist/chunk-VRW3FULF.js +0 -725
  172. package/dist/chunk-WADYRCO2.js +0 -304
  173. package/dist/chunk-WILQZRO4.js +0 -282
  174. package/dist/chunk-WR5D4EGH.js +0 -26
  175. package/dist/chunk-WUHJISPP.js +0 -298
  176. package/dist/chunk-XYU6TZOW.js +0 -182
  177. package/dist/chunk-Y6GP4QGG.js +0 -276
  178. package/dist/chunk-YECR7UIA.js +0 -347
  179. package/dist/chunk-YUTWTI4B.js +0 -654
  180. package/dist/chunk-Z65KYU7I.js +0 -26
  181. package/dist/chunk-Z6POF5YC.js +0 -975
  182. package/dist/chunk-ZBJP6WFL.js +0 -482
  183. package/dist/chunk-ZD6OAMTH.js +0 -277
  184. package/dist/chunk-ZWKZCBO6.js +0 -317
  185. package/dist/contracts-DDrwxvJ-.d.cts +0 -245
  186. package/dist/contracts-DDrwxvJ-.d.ts +0 -245
  187. package/dist/contracts-DOrhwbke.d.cts +0 -245
  188. package/dist/contracts-DOrhwbke.d.ts +0 -245
  189. package/dist/contracts-xo5ckdRP.d.cts +0 -240
  190. package/dist/contracts-xo5ckdRP.d.ts +0 -240
  191. package/dist/customElement-BKQfbSZQ.d.cts +0 -262
  192. package/dist/customElement-BKQfbSZQ.d.ts +0 -262
  193. package/dist/customElement-D2DJp_xn.d.cts +0 -313
  194. package/dist/customElement-D2DJp_xn.d.ts +0 -313
  195. package/dist/customElement-yz8uyk-0.d.cts +0 -308
  196. package/dist/customElement-yz8uyk-0.d.ts +0 -308
  197. package/dist/introspect-Cb0zgpi2.d.cts +0 -477
  198. package/dist/introspect-Y2xNXGSf.d.ts +0 -477
  199. package/dist/plugin-Bek4RhJY.d.cts +0 -43
  200. package/dist/plugin-Bek4RhJY.d.ts +0 -43
  201. package/dist/ssr-3RXHP5ES.js +0 -38
  202. package/dist/ssr-6GIMY5MX.js +0 -38
  203. package/dist/ssr-BA6sxxUd.d.cts +0 -135
  204. package/dist/ssr-BA6sxxUd.d.ts +0 -135
  205. package/dist/ssr-WKUPVSSK.js +0 -36
  206. package/dist/tagFactory-Dl8QCLga.d.cts +0 -23
  207. package/dist/tagFactory-Dl8QCLga.d.ts +0 -23
package/dist/build.js CHANGED
@@ -1,19 +1,21 @@
1
1
  import {
2
2
  index_exports
3
- } from "./chunk-JCDUJN2F.js";
3
+ } from "./chunk-ND2664SF.js";
4
4
  import "./chunk-YT6HQ6AM.js";
5
- import "./chunk-P3XWXJZU.js";
6
- import "./chunk-GJPXRJ45.js";
7
- import "./chunk-6BMPXPUW.js";
8
- import "./chunk-SFKNRVCU.js";
9
- import "./chunk-5ZYQ6KDD.js";
10
- import "./chunk-XHK6BDAJ.js";
11
- import "./chunk-CMBFNA7L.js";
12
- import "./chunk-VQNQZCWJ.js";
13
- import "./chunk-EUZND3CB.js";
14
- import "./chunk-NZIIMDWI.js";
15
- import "./chunk-K4G4ZQNR.js";
16
- import "./chunk-5X6PP2UK.js";
5
+ import "./chunk-R73P76YZ.js";
6
+ import "./chunk-ITX6OO3F.js";
7
+ import "./chunk-JYD2PWXH.js";
8
+ import "./chunk-GTBNNBJ6.js";
9
+ import "./chunk-KLRMB5ZS.js";
10
+ import "./chunk-DFPFITST.js";
11
+ import "./chunk-54EDRCEF.js";
12
+ import "./chunk-2UPRY23K.js";
13
+ import "./chunk-UCS6AMJ7.js";
14
+ import "./chunk-HB24TBAF.js";
15
+ import "./chunk-2RA7SHDA.js";
16
+ import "./chunk-CC65Y57T.js";
17
+ import "./chunk-VLPPXTYG.js";
18
+ import "./chunk-LMLD24FC.js";
17
19
 
18
20
  // src/build/compileTemplates.ts
19
21
  var VOID_ELEMENTS = /* @__PURE__ */ new Set([
@@ -1,5 +1,5 @@
1
- "use strict";var Sibu=(()=>{var _e=Object.defineProperty;var Po=Object.getOwnPropertyDescriptor;var Do=Object.getOwnPropertyNames;var Fo=Object.prototype.hasOwnProperty;var Ye=(e,t)=>{for(var n in t)_e(e,n,{get:t[n],enumerable:!0})},Ho=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Do(t))!Fo.call(e,o)&&o!==n&&_e(e,o,{get:()=>t[o],enumerable:!(r=Po(t,o))||r.enumerable});return e};var Bo=e=>Ho(_e({},"__esModule",{value:!0}),e);var pi={};Ye(pi,{DynamicComponent:()=>Hr,ErrorBoundary:()=>_o,ErrorDisplay:()=>Ce,Fragment:()=>Or,KeepAlive:()=>$r,Loading:()=>Lo,Portal:()=>Pr,SVG_NS:()=>k,Suspense:()=>Ke,__resetIdCounter:()=>Zr,a:()=>Rt,abbr:()=>Ot,action:()=>qr,address:()=>gt,area:()=>on,array:()=>co,article:()=>ut,aside:()=>bt,asyncDerived:()=>fo,audio:()=>sn,autoResize:()=>Wr,b:()=>Pt,base:()=>er,batch:()=>ke,bdi:()=>Dt,bdo:()=>Ft,bindDynamic:()=>Le,blockquote:()=>kt,body:()=>at,br:()=>Ht,button:()=>X,canvas:()=>vn,caption:()=>Sn,catchError:()=>Jr,catchErrorAsync:()=>Qr,center:()=>Er,checkLeaks:()=>ot,circle:()=>rr,cite:()=>Bt,clickOutside:()=>Kr,clipPath:()=>mr,code:()=>Te,col:()=>Cn,colgroup:()=>An,context:()=>go,copyOnClick:()=>Vr,createId:()=>Yr,customElement:()=>Cr,data:()=>zt,datalist:()=>Dn,dd:()=>Et,deepEqual:()=>ee,deepSignal:()=>uo,defer:()=>To,defs:()=>fr,del:()=>En,derived:()=>we,details:()=>Gn,dfn:()=>It,dialog:()=>Jn,disableSSR:()=>Ie,dispose:()=>R,div:()=>h,dl:()=>wt,dt:()=>St,each:()=>Mr,effect:()=>P,ellipse:()=>or,em:()=>jt,embed:()=>dn,enableSSR:()=>ze,enqueueBatchedSignal:()=>Y,fieldset:()=>Fn,figcaption:()=>Ct,figure:()=>At,font:()=>wr,footer:()=>pt,form:()=>Hn,g:()=>ir,getSlot:()=>Br,h1:()=>ht,h2:()=>yt,h3:()=>xe,h4:()=>xt,h5:()=>vt,h6:()=>Tt,head:()=>st,header:()=>dt,hr:()=>_t,html:()=>Oe,i:()=>$t,iframe:()=>pn,img:()=>an,input:()=>Bn,ins:()=>wn,isBatching:()=>eo,isSSR:()=>Z,kbd:()=>qt,label:()=>zn,lazy:()=>qe,legend:()=>In,li:()=>Nt,line:()=>sr,linearGradient:()=>hr,link:()=>tr,longPress:()=>Ur,main:()=>mt,map:()=>cn,mark:()=>Kt,marker:()=>kr,marquee:()=>Sr,mask:()=>br,match:()=>jr,math:()=>xn,menu:()=>Qn,meta:()=>nr,meter:()=>jn,mount:()=>Nr,nav:()=>ft,nextTick:()=>xo,noscript:()=>Tn,object:()=>fn,ol:()=>Lt,on:()=>oo,onCleanup:()=>bo,onMount:()=>$e,onUnmount:()=>mo,optgroup:()=>$n,option:()=>qn,output:()=>Kn,p:()=>ye,param:()=>mn,path:()=>ar,pattern:()=>gr,picture:()=>bn,polygon:()=>cr,polyline:()=>lr,portal:()=>gn,pre:()=>ve,progress:()=>Un,q:()=>Ut,radialGradient:()=>yr,reactiveArray:()=>lo,rect:()=>ur,ref:()=>ao,registerComponent:()=>Dr,registerDisposer:()=>E,resolveComponent:()=>De,rp:()=>Vt,rt:()=>Wt,ruby:()=>Gt,s:()=>Jt,samp:()=>Qt,script:()=>kn,section:()=>lt,select:()=>Vn,setGlobalErrorHandler:()=>Xr,show:()=>zr,signal:()=>w,slot:()=>Yn,small:()=>Xt,source:()=>hn,span:()=>S,stop:()=>xr,store:()=>so,strict:()=>ho,strictEffect:()=>yo,strong:()=>Yt,style:()=>z,sub:()=>Zt,summary:()=>Xn,sup:()=>en,svg:()=>yn,symbol:()=>Tr,table:()=>_n,tagFactory:()=>c,tbody:()=>Nn,td:()=>Ln,template:()=>Zn,text:()=>dr,textarea:()=>Wn,tfoot:()=>Mn,th:()=>Rn,thead:()=>On,time:()=>tn,title:()=>ct,tr:()=>Pn,track:()=>ln,transition:()=>ko,trapFocus:()=>Gr,tspan:()=>pr,u:()=>nn,ul:()=>Mt,unregisterComponent:()=>Fr,untracked:()=>J,use:()=>vr,var_:()=>rn,video:()=>un,watch:()=>io,when:()=>Ir,withSSR:()=>no,writable:()=>po});var Ve={};Ye(Ve,{DynamicComponent:()=>Hr,ErrorBoundary:()=>_o,ErrorDisplay:()=>Ce,Fragment:()=>Or,KeepAlive:()=>$r,Loading:()=>Lo,Portal:()=>Pr,SVG_NS:()=>k,Suspense:()=>Ke,__resetIdCounter:()=>Zr,a:()=>Rt,abbr:()=>Ot,action:()=>qr,address:()=>gt,area:()=>on,array:()=>co,article:()=>ut,aside:()=>bt,asyncDerived:()=>fo,audio:()=>sn,autoResize:()=>Wr,b:()=>Pt,base:()=>er,batch:()=>ke,bdi:()=>Dt,bdo:()=>Ft,bindDynamic:()=>Le,blockquote:()=>kt,body:()=>at,br:()=>Ht,button:()=>X,canvas:()=>vn,caption:()=>Sn,catchError:()=>Jr,catchErrorAsync:()=>Qr,center:()=>Er,checkLeaks:()=>ot,circle:()=>rr,cite:()=>Bt,clickOutside:()=>Kr,clipPath:()=>mr,code:()=>Te,col:()=>Cn,colgroup:()=>An,context:()=>go,copyOnClick:()=>Vr,createId:()=>Yr,customElement:()=>Cr,data:()=>zt,datalist:()=>Dn,dd:()=>Et,deepEqual:()=>ee,deepSignal:()=>uo,defer:()=>To,defs:()=>fr,del:()=>En,derived:()=>we,details:()=>Gn,dfn:()=>It,dialog:()=>Jn,disableSSR:()=>Ie,dispose:()=>R,div:()=>h,dl:()=>wt,dt:()=>St,each:()=>Mr,effect:()=>P,ellipse:()=>or,em:()=>jt,embed:()=>dn,enableSSR:()=>ze,enqueueBatchedSignal:()=>Y,fieldset:()=>Fn,figcaption:()=>Ct,figure:()=>At,font:()=>wr,footer:()=>pt,form:()=>Hn,g:()=>ir,getSlot:()=>Br,h1:()=>ht,h2:()=>yt,h3:()=>xe,h4:()=>xt,h5:()=>vt,h6:()=>Tt,head:()=>st,header:()=>dt,hr:()=>_t,html:()=>Oe,i:()=>$t,iframe:()=>pn,img:()=>an,input:()=>Bn,ins:()=>wn,isBatching:()=>eo,isSSR:()=>Z,kbd:()=>qt,label:()=>zn,lazy:()=>qe,legend:()=>In,li:()=>Nt,line:()=>sr,linearGradient:()=>hr,link:()=>tr,longPress:()=>Ur,main:()=>mt,map:()=>cn,mark:()=>Kt,marker:()=>kr,marquee:()=>Sr,mask:()=>br,match:()=>jr,math:()=>xn,menu:()=>Qn,meta:()=>nr,meter:()=>jn,mount:()=>Nr,nav:()=>ft,nextTick:()=>xo,noscript:()=>Tn,object:()=>fn,ol:()=>Lt,on:()=>oo,onCleanup:()=>bo,onMount:()=>$e,onUnmount:()=>mo,optgroup:()=>$n,option:()=>qn,output:()=>Kn,p:()=>ye,param:()=>mn,path:()=>ar,pattern:()=>gr,picture:()=>bn,polygon:()=>cr,polyline:()=>lr,portal:()=>gn,pre:()=>ve,progress:()=>Un,q:()=>Ut,radialGradient:()=>yr,reactiveArray:()=>lo,rect:()=>ur,ref:()=>ao,registerComponent:()=>Dr,registerDisposer:()=>E,resolveComponent:()=>De,rp:()=>Vt,rt:()=>Wt,ruby:()=>Gt,s:()=>Jt,samp:()=>Qt,script:()=>kn,section:()=>lt,select:()=>Vn,setGlobalErrorHandler:()=>Xr,show:()=>zr,signal:()=>w,slot:()=>Yn,small:()=>Xt,source:()=>hn,span:()=>S,stop:()=>xr,store:()=>so,strict:()=>ho,strictEffect:()=>yo,strong:()=>Yt,style:()=>z,sub:()=>Zt,summary:()=>Xn,sup:()=>en,svg:()=>yn,symbol:()=>Tr,table:()=>_n,tagFactory:()=>c,tbody:()=>Nn,td:()=>Ln,template:()=>Zn,text:()=>dr,textarea:()=>Wn,tfoot:()=>Mn,th:()=>Rn,thead:()=>On,time:()=>tn,title:()=>ct,tr:()=>Pn,track:()=>ln,transition:()=>ko,trapFocus:()=>Gr,tspan:()=>pr,u:()=>nn,ul:()=>Mt,unregisterComponent:()=>Fr,untracked:()=>J,use:()=>vr,var_:()=>rn,video:()=>un,watch:()=>io,when:()=>Ir,withSSR:()=>no,writable:()=>po});function _(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var Ze=_();function L(e,t){if(Ze&&!e)throw new Error(`[Sibu] ${t}`)}function M(e){Ze&&console.warn(`[Sibu] ${e}`)}function j(e){let t=e.replace(/[\x00-\x20\x7f-\x9f]+/g,"").trim();if(!t)return"";let n=t.toLowerCase();return n.startsWith("javascript:")||n.startsWith("data:")||n.startsWith("vbscript:")||n.startsWith("blob:")?"":t}function Ne(e){let t=e.toLowerCase().replace(/\s+/g,"");return t.includes("url(")||t.includes("expression(")||t.includes("javascript:")||t.includes("-moz-binding")?"":e}var zo=new Set(["href","src","action","formaction","cite","poster","background","srcset"]);function $(e){return zo.has(e)}var Io=_(),W=new Array(32),G=32,F=-1,B=null,jo=new WeakMap,q="__s",H=0,A=[],O=new Set;function re(e){try{e()}catch(t){Io&&M(`Subscriber threw during notification: ${t instanceof Error?t.message:String(t)}`)}}var de=0,pe=!1;function x(e,t){t||(t=e),tt(t),++F,F>=G&&(G*=2,W.length=G),W[F]=t,B=t;try{e()}finally{F--,B=F>=0?W[F]:null}return()=>tt(t)}function $o(){de===0&&(++F,F>=G&&(G*=2,W.length=G),W[F]=null,B=null,pe=!0),de++}function qo(){de--,de===0&&(F--,B=F>=0?W[F]:null,pe=!1)}function J(e){$o();try{return e()}finally{qo()}}function Q(e){if(!B)return;let t=B;if(t._dep===e)return;let n=t._deps;if(n){if(n.has(e))return;n.add(e)}else if(t._dep!==void 0){let o=new Set;o.add(t._dep),o.add(e),t._deps=o,t._dep=void 0}else t._dep=e;let r=e[q];r||(r=new Set,jo.set(e,r),e[q]=r),r.add(B),r.size===1?e.__f=B:e.__f!==void 0&&(e.__f=void 0)}function nt(e){let t=e[q];if(t)for(let n of t)n._c?V(n):O.has(n)||(O.add(n),A.push(n))}var et=1e3;function rt(){if(!(H>0)){H++;try{let e=0;for(;e<A.length;){if(e>=et){typeof console<"u"&&console.error(`[SibuJS] Notification queue exceeded ${et} iterations \u2014 likely an effect that writes to a signal it reads. Breaking to prevent infinite loop.`);break}re(A[e]),e++}}finally{A.length=0,O.clear(),H--}}}function V(e){e();let t=e._sig;for(;t;){let n=t.__f;if(n){if(n._c){let i=n._sig;i._d=!0,t=i;continue}O.has(n)||(O.add(n),A.push(n));break}let r=t[q];if(!r)break;let o;for(let i of r)if(i._c){i();let s=i._sig;s&&!o?o=s:s&&V(i)}else O.has(i)||(O.add(i),A.push(i));t=o}}function fe(e){let t=e.__f;if(t){if(H>0){t._c?V(t):O.has(t)||(O.add(t),A.push(t));return}H++;try{t._c?V(t):re(t);let r=0;for(;r<A.length;)re(A[r]),r++}finally{A.length=0,O.clear(),H--}return}let n=e[q];if(!(!n||n.size===0)){if(H>0){for(let r of n)r._c?V(r):O.has(r)||(O.add(r),A.push(r));return}H++;try{let r=0;for(let i of n)A[r++]=i;for(let i=0;i<r;i++)A[i]._c&&V(A[i]);for(let i=0;i<r;i++)A[i]._c||O.has(A[i])||re(A[i]);let o=r;for(;o<A.length;)re(A[o]),o++}finally{A.length=0,O.clear(),H--}}}function tt(e){let t=e,n=t._dep;if(n!==void 0){let o=n[q];o&&(o.delete(e),n.__f===e&&(n.__f=void 0)),t._dep=void 0;return}let r=t._deps;if(!(!r||r.size===0)){for(let o of r){let i=o[q];i&&(i.delete(e),o.__f===e&&(o.__f=void 0))}r.clear()}}var me=_();function Ko(e){if(e.length<3)return!1;let t=e.toLowerCase();return t[0]==="o"&&t[1]==="n"&&t.charCodeAt(2)>=97&&t.charCodeAt(2)<=122}function be(e,t,n){if(Ko(t))return me&&M(`bindAttribute: refusing to bind event-handler attribute "${t}". Use on:{ ${t.slice(2)}: fn } instead.`),()=>{};function r(){let i;try{i=n()}catch(a){me&&M(`bindAttribute: getter for "${t}" threw: ${a instanceof Error?a.message:String(a)}`);return}if(typeof i=="boolean"){t in e&&(t==="checked"||t==="disabled"||t==="selected")?e[t]=i:i?e.setAttribute(t,""):e.removeAttribute(t);return}let s=String(i);(t==="value"||t==="checked")&&t in e?e[t]=t==="checked"?!!i:s:e.setAttribute(t,$(t)?j(s):s)}return x(r)}function Le(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){me&&M(`bindDynamic: name getter threw: ${l instanceof Error?l.message:String(l)}`);return}let a;try{a=typeof n=="function"?n():n}catch(l){me&&M(`bindDynamic: value getter threw: ${l instanceof Error?l.message:String(l)}`);return}if((s[0]==="o"||s[0]==="O")&&(s[1]==="n"||s[1]==="N"))return;r!==null&&r!==s&&e.removeAttribute(r);let u=String(a);(s==="value"||s==="checked")&&s in e?e[s]=s==="checked"?!!a:u:e.setAttribute(s,$(s)?j(u):u),r=s}let i=x(o);return()=>{i(),r!==null&&e.removeAttribute(r)}}var Uo=_();function K(e,t){let n=[];function r(){let o;try{o=t()}catch(l){Uo&&M(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}if(o==null||typeof o=="boolean"){for(let l=0;l<n.length;l++){let d=n[l];d.parentNode&&d.parentNode.removeChild(d)}n.length=0;return}let i=e.parentNode;if(!i){n.length=0;return}let s;if(Array.isArray(o)){s=[];for(let l=0;l<o.length;l++){let d=o[l];d==null||typeof d=="boolean"||s.push(d instanceof Node?d:document.createTextNode(String(d)))}}else s=[o instanceof Node?o:document.createTextNode(String(o))];let a=n.length>0&&s.length>0?new Set:void 0;if(a){for(let l=0;l<s.length;l++)for(let d=0;d<n.length;d++)if(s[l]===n[d]){a.add(s[l]);break}}for(let l=0;l<n.length;l++){let d=n[l];a?.has(d)||d.parentNode&&d.parentNode.removeChild(d)}let u=e.nextSibling;for(let l=0;l<s.length;l++){let d=s[l];a?.has(d)&&d.parentNode===i?d.nextSibling!==u&&i.insertBefore(d,u):i.insertBefore(d,u)}n=s}return x(r)}var ge=new WeakMap,he=_(),oe=0;function E(e,t){let n=ge.get(e);n||(n=[],ge.set(e,n)),n.push(t),he&&oe++}function R(e){let t=[e],n=[];for(;t.length>0;){let r=t.pop();n.push(r);let o=r.childNodes;for(let i=0;i<o.length;i++)t.push(o[i])}for(let r=n.length-1;r>=0;r--){let o=n[r],i=ge.get(o);if(i){he&&(oe-=i.length);for(let s of i)try{s()}catch(a){he&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",a)}ge.delete(o)}}}function ot(e=0){return he?(e>0&&oe>e&&M(`checkLeaks: ${oe} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),oe):0}var k="http://www.w3.org/2000/svg",it=new Map;function Vo(e){let t=it.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),it.set(e,t)),t}function Wo(e,t){if(typeof t=="function"){let r=x(()=>{e.setAttribute("style",t())});E(e,r);return}if(typeof t=="string"){e.setAttribute("style",t);return}let n=e;for(let r in t){let o=t[r],i=Vo(r);if(typeof o=="function"){let s=o,a=x(()=>{n.style.setProperty(i,Ne(String(s())))});E(e,a)}else n.style.setProperty(i,Ne(String(o)))}}function Go(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=x(()=>{e.setAttribute("class",t())});E(e,i);return}let n=t,r=!1,o="";for(let i in n){let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=x(()=>{let a="";for(let u in n){let l=n[u];(typeof l=="function"?l():l)&&(a=a?`${a} ${u}`:u)}e.setAttribute("class",a)});E(e,s)}else e.setAttribute("class",o)}function Me(e,t){if(typeof t=="string"){e.textContent=t;return}if(typeof t=="number"){e.textContent=String(t);return}if(!(typeof t=="boolean"||t==null)){if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),E(e,K(n,t));return}if(t instanceof Node){e.appendChild(t);return}if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),E(e,K(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),E(e,K(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 c=(e,t)=>(n,r)=>{let o=t?document.createElementNS(t,e):document.createElement(e);if(n===void 0)return o;if(typeof n=="string")return r!==void 0?(o.setAttribute("class",n),Me(o,r),o):(o.textContent=n,o);if(typeof n=="number")return o.textContent=String(n),o;if(Array.isArray(n)||n instanceof Node||typeof n=="function")return Me(o,n),o;let i=n,s=i.class;s!=null&&Go(o,s);let a=i.id;a!=null&&(o.id=a);let u=r!==void 0?r:i.nodes;u!=null&&Me(o,u);let l=i.on;if(l)for(let m in l)o.addEventListener(m,l[m]);let d=i.style;d!=null&&Wo(o,d);let f=i.ref;f&&(f.current=o);for(let m in i)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let p=i[m];if(p==null||m[0]==="o"&&m[1]==="n")continue;if(typeof p=="function")E(o,be(o,m,p));else if(typeof p=="boolean")m in o&&(m==="checked"||m==="disabled"||m==="selected")?o[m]=p:p?o.setAttribute(m,""):o.removeAttribute(m);else{let b=String(p);o.setAttribute(m,$(m)?j(b):b)}}}return i.onElement&&typeof i.onElement=="function"&&i.onElement(o),o};var Pi=c("html"),st=c("head"),at=c("body"),ct=c("title"),h=c("div"),S=c("span"),lt=c("section"),ut=c("article"),dt=c("header"),pt=c("footer"),ft=c("nav"),mt=c("main"),bt=c("aside"),gt=c("address"),ye=c("p"),ht=c("h1"),yt=c("h2"),xe=c("h3"),xt=c("h4"),vt=c("h5"),Tt=c("h6"),kt=c("blockquote"),Et=c("dd"),wt=c("dl"),St=c("dt"),Ct=c("figcaption"),At=c("figure"),_t=c("hr"),Nt=c("li"),Lt=c("ol"),Mt=c("ul"),ve=c("pre"),Rt=c("a"),Ot=c("abbr"),Pt=c("b"),Dt=c("bdi"),Ft=c("bdo"),Ht=c("br"),Bt=c("cite"),Te=c("code"),zt=c("data"),It=c("dfn"),jt=c("em"),$t=c("i"),qt=c("kbd"),Kt=c("mark"),Ut=c("q"),Vt=c("rp"),Wt=c("rt"),Gt=c("ruby"),Jt=c("s"),Qt=c("samp"),Xt=c("small"),Yt=c("strong"),Zt=c("sub"),en=c("sup"),tn=c("time"),nn=c("u"),rn=c("var"),on=c("area"),sn=c("audio"),an=c("img"),cn=c("map"),ln=c("track"),un=c("video"),dn=c("embed"),pn=c("iframe"),fn=c("object"),mn=c("param"),bn=c("picture"),gn=c("portal"),hn=c("source"),yn=c("svg",k),xn=c("math"),vn=c("canvas"),Tn=c("noscript"),kn=c("script"),En=c("del"),wn=c("ins"),Sn=c("caption"),Cn=c("col"),An=c("colgroup"),_n=c("table"),Nn=c("tbody"),Ln=c("td"),Mn=c("tfoot"),Rn=c("th"),On=c("thead"),Pn=c("tr"),X=c("button"),Dn=c("datalist"),Fn=c("fieldset"),Hn=c("form"),Bn=c("input"),zn=c("label"),In=c("legend"),jn=c("meter"),$n=c("optgroup"),qn=c("option"),Kn=c("output"),Un=c("progress"),Vn=c("select"),Wn=c("textarea"),Gn=c("details"),Jn=c("dialog"),Qn=c("menu"),Xn=c("summary"),Yn=c("slot"),Zn=c("template"),er=c("base"),tr=c("link"),nr=c("meta"),z=c("style"),rr=c("circle",k),or=c("ellipse",k),ir=c("g",k),sr=c("line",k),ar=c("path",k),cr=c("polygon",k),lr=c("polyline",k),ur=c("rect",k),dr=c("text",k),pr=c("tspan",k),fr=c("defs",k),mr=c("clipPath",k),br=c("mask",k),gr=c("pattern",k),hr=c("linearGradient",k),yr=c("radialGradient",k),xr=c("stop",k),vr=c("use",k),Tr=c("symbol",k),kr=c("marker",k),Er=c("center"),wr=c("font"),Sr=c("marquee"),Cr=e=>c(e);var Jo=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Ar=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),_r=new WeakMap;function Qo(e){let t=e.length-1,n=e[0];for(let p=0;p<t;p++)n+=`\0${p}\0${e[p+1]}`;let r=0,o=n.length;function i(){for(;r<o&&(n[r]===" "||n[r]===" "||n[r]===`
2
- `||n[r]==="\r");)r++}function s(){if(n.charCodeAt(r)!==0)return-1;let p=r;r++;let b=0;for(;r<o&&n.charCodeAt(r)!==0;)b=b*10+(n.charCodeAt(r)-48),r++;return r<o&&r++,b<0||b>=t?(r=p,-1):b}function a(){let p=r;for(;r<o;){let b=n.charCodeAt(r);if(b>=97&&b<=122||b>=65&&b<=90||b>=48&&b<=57||b===45)r++;else break}return n.slice(p,r)}function u(){if(i(),n[r]!=="=")return{kind:"bool"};r++,i();let p=s();if(p>=0)return{kind:"expr",idx:p};let b=n[r];if(b==='"'||b==="'"){r++;let y=[],D=[],I="";for(;r<o&&n[r]!==b;){let se=s();se>=0?(y.push(I),I="",D.push(se)):I+=n[r++]}return r<o&&r++,y.push(I),D.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:D}}let T=r;for(;r<o;){let y=n.charCodeAt(r);if(y===32||y===9||y===10||y===13||y===62||y===47)break;r++}return{kind:"static",value:n.slice(T,r)}}function l(){let p=[];for(;r<o&&(i(),!(n[r]===">"||n[r]==="/"));){let b=r;for(;r<o;){let y=n.charCodeAt(r);if(y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||y===45||y===58||y===95||y===46)r++;else break}let T=n.slice(b,r);if(!T)break;let v=u();T.startsWith("on:")?v.kind==="expr"&&p.push({t:3,name:T.slice(3),idx:v.idx}):v.kind==="bool"?p.push({t:4,name:T}):v.kind==="static"?p.push({t:0,name:T,value:v.value}):v.kind==="expr"?p.push({t:1,name:T,idx:v.idx}):v.kind==="mixed"&&p.push({t:2,name:T,statics:v.statics,exprs:v.exprs})}return p}function d(p){return p.replace(/\s+/g," ")}function f(p){let b="";for(;r<o&&n[r]!=="<";){let v=s();if(v>=0){let y=d(b);y&&p.push({t:1,value:y}),b="",p.push({t:2,idx:v})}else b+=n[r++]}let T=d(b);T&&p.push({t:1,value:T})}function m(){let p=[];for(;r<o&&!(n[r]==="<"&&r+1<o&&n[r+1]==="/");)if(n[r]==="<"){r++;let b=a(),T=l();i();let v=Jo.has(b),y=n[r]==="/";if(y&&r++,r<o&&r++,v||y)p.push({t:0,el:{tag:b,svg:Ar.has(b),attrs:T,children:[]}});else{let D=m();n[r]==="<"&&r+1<o&&n[r+1]==="/"&&(r+=2,a(),i(),r<o&&n[r]===">"&&r++),p.push({t:0,el:{tag:b,svg:Ar.has(b),attrs:T,children:D}})}}else f(p);return p}return m()}function Re(e,t){let n=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:n.setAttribute(o.name,o.value);break;case 1:{let i=o.name;if(i[0]==="o"&&i[1]==="n")break;let s=t[o.idx];if(typeof s=="function")E(n,be(n,i,s));else if(s!=null){let a=String(s);n.setAttribute(i,$(i)?j(a):a)}break}case 2:{let i=o.statics[0];for(let s=0;s<o.exprs.length;s++)i+=String(t[o.exprs[s]])+o.statics[s+1];n.setAttribute(o.name,i);break}case 3:n.addEventListener(o.name,t[o.idx]);break;case 4:n.setAttribute(o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:n.appendChild(Re(o.el,t));break;case 1:n.appendChild(document.createTextNode(o.value));break;case 2:{let i=t[o.idx];if(typeof i=="function"){let s=document.createComment("");n.appendChild(s),E(n,K(s,i))}else if(i instanceof Node)n.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?n.appendChild(a):a!=null&&typeof a!="boolean"&&n.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&n.appendChild(document.createTextNode(String(i)));break}}}return n}function Oe(e,...t){let n=_r.get(e);if(n||(n=Qo(e),_r.set(e,n)),n.length===1&&n[0].t===0)return Re(n[0].el,t);let r=document.createElement("div");for(let o=0;o<n.length;o++){let i=n[o];switch(i.t){case 0:r.appendChild(Re(i.el,t));break;case 1:r.appendChild(document.createTextNode(i.value));break;case 2:{let s=t[i.idx];if(s instanceof Node)r.appendChild(s);else if(typeof s=="function"){let a=document.createComment("bind:htm");r.appendChild(a),E(r,K(a,s))}else if(Array.isArray(s))for(let a=0;a<s.length;a++){let u=s[a];u instanceof Node?r.appendChild(u):u!=null&&typeof u!="boolean"&&r.appendChild(document.createTextNode(String(u)))}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 Nr(e,t){if(!t)throw new Error("[Sibu] mount: container element not found. Make sure the DOM element exists before calling mount().");L(typeof e=="function"||e instanceof Node,"mount: first argument must be a component function or a DOM Node.");let n=typeof performance<"u"?performance.now():0,r=typeof e=="function"?e():e,o=typeof performance<"u"?performance.now()-n:0;t.appendChild(r);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:r,container:t,duration:o}),{node:r,unmount(){i&&i.emit("app:unmount",{rootElement:r}),R(r),r.parentNode&&r.parentNode.removeChild(r)}}}var Xo=_();function Lr(e){return typeof e=="function"?Lr(e()):e instanceof Node?e:document.createTextNode(String(e))}function Yo(e,t){if(t===0)return[];let n=[],r=new Array(t);for(let a=0;a<t;a++){let u=e[a],l=0,d=n.length;for(;l<d;){let f=l+d>>1;e[n[f]]<u?l=f+1:d=f}n[l]=a,r[a]=l>0?n[l-1]:-1}let o=n.length,i=new Array(o),s=n[o-1];for(let a=o-1;a>=0;a--)i[a]=s,s=r[s];return i}function Mr(e,t,n){L(typeof e=="function","each: first argument must be a function that returns an array."),L(typeof t=="function","each: second argument must be a render function."),L(n&&typeof n.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,u=0,l=new Map,d=new Map,f=[],m=[],p=new Uint8Array(0),b=new Map,T=[],v=[],y=new Map,D=!1,I=!1,se=n.key,We=()=>{let Ge=e(),C=Ge.length,ae=r.parentNode;if(!ae)return;I||(ae.insertBefore(o,r.nextSibling),I=!0),m.length<C&&(m=new Array(C));for(let g=0;g<C;g++)m[g]=se(Ge[g]);let te=m;f.length<C&&(f=new Array(C)),d.clear(),y.clear();for(let g=0;g<C;g++)y.set(te[g],g);for(let g=0;g<C;g++){let N=te[g],Qe=l.get(N),ne;if(Qe!==void 0)ne=Qe;else{let Xe=N,Ro=()=>e()[y.get(Xe)],Oo=()=>y.get(Xe);try{ne=Lr(t(Ro,Oo))}catch(Ae){Xo&&M(`each: render threw for item at index ${g} (key="${te[g]}"): ${Ae instanceof Error?Ae.message:String(Ae)}`),ne=document.createComment(`each:error:${g}`)}}d.set(N,ne),f[g]=ne}for(let[g,N]of l)d.has(g)||(R(N),N.parentNode&&ae.removeChild(N));if(C===0){u=0;let g=l;l=d,d=g;return}b.clear();for(let g=0;g<u;g++)b.set(a[g],g);T.length<C&&(T=new Array(C),v=new Array(C));let ce=0;for(let g=0;g<C;g++){let N=b.get(te[g]);N!==void 0&&(T[ce]=g,v[ce]=N,ce++)}let Je=Yo(v,ce);p.length<C?p=new Uint8Array(C):p.fill(0,0,C);for(let g=0;g<Je.length;g++)p[T[Je[g]]]=1;let le=o;for(let g=C-1;g>=0;g--){let N=f[g];p[g]||N.nextSibling!==le&&ae.insertBefore(N,le),le=N}let ue=a===i?s:i;ue.length<C&&(ue.length=C);for(let g=0;g<C;g++)ue[g]=te[g];a=ue,u=C;let Mo=l;l=d,d=Mo,D=!0};return x(We),D||queueMicrotask(()=>{!D&&r.parentNode&&We()}),r}function Or(e){let t=document.createDocumentFragment();for(let n of e)if(!(n==null||typeof n=="boolean"))if(Array.isArray(n))for(let r of n)r==null||typeof r=="boolean"||t.appendChild(Rr(r));else t.appendChild(Rr(n));return t}function Rr(e){if(e==null)return document.createTextNode("");if(e instanceof Node)return e;if(typeof e=="function"){let t=e();return t instanceof Node?t:document.createTextNode(String(t??""))}return document.createTextNode(String(e))}function Pr(e,t){let n=document.createComment("portal"),r=t||document.body,o=null;return queueMicrotask(()=>{try{o=e(),r.appendChild(o)}catch(i){typeof console<"u"&&console.error("[Portal] Render error:",i)}}),E(n,()=>{o&&(R(o),o.remove(),o=null)}),n}var Pe=new Map;function Dr(e,t){Pe.set(e,t)}function Fr(e){Pe.delete(e)}function De(e){let t=Pe.get(e);return t?t():h({nodes:`[Component "${e}" not found]`})}function Hr(e){let t=h({class:"sibu-dynamic"});function n(){let r=e(),o;typeof r=="function"?o=r():o=De(r);for(let i of Array.from(t.childNodes))R(i);t.replaceChildren(o)}return x(n),t}function Br(e,t="default"){return e?.[t]}function zr(e,t){return x(()=>{t.style.display=e()?"":"none"}),t}function Ir(e,t,n){let r=document.createComment("when"),o=null,i,s=!1,a=()=>{let u=e(),l=r.parentNode;if(!l||s&&u===i)return;i=u,o?.parentNode&&(R(o),o.parentNode.removeChild(o),o=null);let d=u?t():n?n():null;if(d!=null){let f=d instanceof Node?d:document.createTextNode(String(d));l.insertBefore(f,r.nextSibling),o=f}s=!0};return x(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function jr(e,t,n){let r=document.createComment("match"),o=null,i,s=!1,a=()=>{let u=String(e()),l=r.parentNode;if(!l||s&&u===i)return;i=u,o?.parentNode&&(R(o),o.parentNode.removeChild(o),o=null);let d=t[u]||n;if(d){let f=d();if(f!=null){let m=f instanceof Node?f:document.createTextNode(String(f));l.insertBefore(m,r.nextSibling),o=m}}s=!0};return x(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function $r(e,t,n){let r=document.createComment("keep-alive"),o=new Map,i=[],s=n?.max??0,a,u=null,l=!1,d=()=>{let f=e(),m=r.parentNode;if(!m||l&&f===a)return;u?.parentNode&&m.removeChild(u),a=f;let p=o.get(f);if(p){let b=i.indexOf(f);b!==-1&&(i.splice(b,1),i.push(f))}else{let b=t[f];if(!b){u=null,l=!0;return}if(p=b(),o.set(f,p),i.push(f),s>0&&i.length>s){let T=i.shift(),v=o.get(T);v&&(R(v),v.parentNode&&v.parentNode.removeChild(v),o.delete(T))}}m.insertBefore(p,r.nextSibling),u=p,l=!0};return x(d),l||queueMicrotask(()=>{!l&&r.parentNode&&d()}),r}function qr(e,t,n){let r=t(e,n);typeof r=="function"&&E(e,r)}var Kr=(e,t)=>{let n=r=>{e.contains(r.target)||t()};return document.addEventListener("pointerdown",n,!0),()=>document.removeEventListener("pointerdown",n,!0)},Ur=(e,t)=>{let n=t.duration??500,r=null,o=()=>{r=setTimeout(()=>{t.callback(),r=null},n)},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)}},Vr=(e,t)=>{let n=()=>{let r=typeof t=="function"?t():e.textContent??"";navigator.clipboard.writeText(r)};return e.addEventListener("click",n),()=>e.removeEventListener("click",n)},Wr=e=>{let t=()=>{e.style.overflow="hidden",e.style.height="auto",e.style.height=`${e.scrollHeight}px`};return t(),e.addEventListener("input",t),()=>e.removeEventListener("input",t)},Gr=e=>{let t='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',n=r=>{if(r.key!=="Tab")return;let o=Array.from(e.querySelectorAll(t));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",n),()=>e.removeEventListener("keydown",n)};var U=null;function Jr(e,t){try{let n=e();return n&&typeof n.then=="function"&&n.catch(r=>{t?t(r,"async"):U?U(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),n}catch(n){return t?t(n,"sync"):U?U(n,"sync"):console.error("Unhandled error in Sibu.catchError:",n),null}}async function Qr(e,t){try{return await e()}catch(n){return t?t(n,"async"):U?U(n,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",n),null}}function Xr(e){U=e}var Fe=0;function Yr(e="sibu"){return Fe++,`${e}-${Fe}`}function Zr(){Fe=0}var ie=0,He=new Set;function ke(e){ie++;try{return e()}finally{ie--,ie===0&&Zo()}}function Y(e){return ie===0?!1:(He.add(e),!0)}function eo(){return ie>0}function Zo(){for(let e of He)nt(e);He.clear(),rt()}var to=globalThis,Be=_();function w(e,t){let n={value:e},r=Be?t?.name:void 0,o=t?.equals;r&&(n.__name=r);function i(){return Q(n),n.value}i.__signal=n,r&&(i.__name=r);function s(a){let u=typeof a=="function"?a(n.value):a;if(!(o?o(n.value,u):Object.is(u,n.value))){if(Be){let l=n.value;n.value=u;let d=to.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:n,name:r,oldValue:l,newValue:u})}else n.value=u;Y(n)||fe(n)}}if(Be){let a=to.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}var Ee=!1;function Z(){return Ee}function ze(){Ee=!0}function Ie(){Ee=!1}function no(e){let t=Ee;ze();try{return e()}finally{t||Ie()}}var ro=globalThis;function oo(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,J(()=>t(o,void 0));else{let i=n;n=o,J(()=>t(o,i))}}}function P(e,t){if(L(typeof e=="function","effect: argument must be a function."),Z())return()=>{};let n=t?.onError,r=n?()=>{try{e()}catch(a){n(a)}}:e,o=()=>{},i=()=>{o(),o=x(r,i)};o=x(r,i);let s=ro.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return s&&s.emit("effect:create",{effectFn:e}),()=>{let a=ro.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("effect:destroy",{effectFn:e}),o()}}function we(e,t){L(typeof e=="function","derived: argument must be a getter function.");let n=t?.name,r={};r._d=!1,r._g=e;let o=()=>{r._d||(r._d=!0)};o._c=1,o._sig=r,x(()=>{r._d=!1,r._v=e()},o);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,s=!1;function a(){if(s)throw new Error(`[SibuJS] Circular dependency detected in derived${n?` "${n}"`:""}. A derived signal cannot read itself (directly or through a chain).`);if(pe){if(r._d){s=!0;try{r._d=!1,r._v=e()}finally{s=!1}}return r._v}if(Q(r),r._d){let u=r._v;s=!0;try{x(()=>{r._d=!1,r._v=e()},o)}finally{s=!1}i&&u!==r._v&&i.emit("computed:update",{signal:r,oldValue:u,newValue:r._v})}return r._v}return n&&(a.__name=n,r.__name=n),a.__signal=r,i&&i.emit("computed:create",{signal:r,name:n,getter:a}),a}function io(e,t){if(L(typeof e=="function","watch: first argument must be a getter function."),L(typeof t=="function","watch: second argument must be a callback function."),Z())return()=>{};let n,r=!0;return x(()=>{let s=e();if(r){n=s,r=!1;return}Object.is(s,n)||(t(s,n),n=s)})}function so(e){L(e!==null&&typeof e=="object"&&!Array.isArray(e),"store: argument must be a plain object. For arrays, use array() instead.");let t={};Object.keys(e).forEach(u=>{let[l,d]=w(e[u]);t[u]=[l,d]});let n=new Proxy({},{get(u,l){if(l in t){let d=t[l][0];return d()}},set(){throw new Error("[Sibu] store: Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),r=()=>{let u={};return Object.keys(t).forEach(l=>{u[l]=t[l][0]()}),u};return[n,{setState:u=>{let l=r(),d=typeof u=="function"?u(l):u;Object.entries(d).forEach(([f,m])=>{f in t&&t[f][1](m)})},reset:()=>{Object.keys(e).forEach(u=>{let l=t[u][1];l(e[u])})},subscribe:u=>{let l=!0;return P(()=>{let d=r();if(l){l=!1;return}u(d)})},subscribeKey:(u,l)=>{let d,f=!0;return P(()=>{let m=t[u][0]();if(f){d=m,f=!1;return}if(!Object.is(m,d)){let p=d;d=m,l(m,p)}})},getSnapshot:r}]}function ao(e){let[t,n]=w(e);return{get current(){return t()},set current(r){n(r)}}}function co(e=[]){let[t,n]=w([...e]);return[t,{push(...o){n(i=>[...i,...o])},pop(){let o;return n(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return n(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){n(i=>[...o,...i])},splice(o,i=0,...s){let a=[];return n(u=>{let l=[...u];return a=l.splice(o,i,...s),l}),a},remove(o){n(i=>i.filter((s,a)=>a!==o))},removeWhere(o){n(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((a,u)=>u!==s)})},set(o){n([...o])},update(o,i){n(s=>s.map((a,u)=>u===o?i:a))},updateWhere(o,i){n(s=>s.map(a=>o(a)?i(a):a))},sort(o){n(i=>[...i].sort(o))},reverse(){n(o=>[...o].reverse())},filter(o){n(i=>i.filter(o))},map(o){n(i=>i.map(o))},clear(){n([])}}]}function lo(e=[]){let t=[...e],n=null,r={};function o(){n=null,Y(r)||fe(r)}function i(){return Q(r),n===null&&(n=Object.freeze([...t])),n}return[i,{push(...a){a.length!==0&&(t.push(...a),o())},pop(){if(t.length===0)return;let a=t.pop();return o(),a},shift(){if(t.length===0)return;let a=t.shift();return o(),a},unshift(...a){a.length!==0&&(t.unshift(...a),o())},splice(a,u=0,...l){let d=t.splice(a,u,...l);return(d.length>0||l.length>0)&&o(),d},remove(a){a<0||a>=t.length||(t.splice(a,1),o())},removeWhere(a){let u=t.findIndex(a);u!==-1&&(t.splice(u,1),o())},set(a){t=[...a],o()},update(a,u){a<0||a>=t.length||Object.is(t[a],u)||(t[a]=u,o())},updateWhere(a,u){let l=!1;for(let d=0;d<t.length;d++)if(a(t[d])){let f=u(t[d]);Object.is(t[d],f)||(t[d]=f,l=!0)}l&&o()},sort(a){t.length<=1||(t.sort(a),o())},reverse(){t.length<=1||(t.reverse(),o())},filter(a){let u=t.filter(a);u.length!==t.length&&(t=u,o())},map(a){let u=!1;for(let l=0;l<t.length;l++){let d=a(t[l],l);Object.is(t[l],d)||(t[l]=d,u=!0)}u&&o()},clear(){t.length!==0&&(t=[],o())}}]}function ee(e,t,n){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!="object")return!1;let r=e,o=t;if(r.constructor!==o.constructor)return!1;if(e instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp){let u=t;return e.source===u.source&&e.flags===u.flags}n||(n=new Map);let i=n.get(r);if(i?.has(o))return!0;if(i||(i=new Set,n.set(r,i)),i.add(o),e instanceof Map){let u=t;if(e.size!==u.size)return!1;for(let[l,d]of e)if(!u.has(l)||!ee(d,u.get(l),n))return!1;return!0}if(e instanceof Set){let u=t;if(e.size!==u.size)return!1;for(let l of e)if(!u.has(l))return!1;return!0}if(e instanceof ArrayBuffer){let u=new Uint8Array(e),l=new Uint8Array(t);if(u.length!==l.length)return!1;for(let d=0;d<u.length;d++)if(u[d]!==l[d])return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){let u=e,l=t;if(u.length!==l.length)return!1;for(let d=0;d<u.length;d++)if(u[d]!==l[d])return!1;return!0}if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.every((u,l)=>ee(u,t[l],n));let s=Object.keys(r),a=Object.keys(o);return s.length!==a.length?!1:s.every(u=>ee(r[u],o[u],n))}function uo(e){return w(e,{equals:(t,n)=>ee(t,n)})}function po(e,t,n){return[we(e,n),i=>{ke(()=>t(i))}]}function fo(e,t){let[n,r]=w(t),[o,i]=w(!1),[s,a]=w(null),[u,l]=w(0),d=0;return P(()=>{u();let f=++d;i(!0),a(null);let m;try{m=e()}catch(p){a(p),i(!1);return}m.then(p=>{f===d&&(r(p),i(!1))},p=>{f===d&&(a(p),i(!1))})}),{value:n,loading:o,error:s,refresh:()=>l(f=>f+1)}}function Se(e,t){try{return e()}catch(n){M(`${t}: callback threw: ${n instanceof Error?n.message:String(n)}`);return}}function je(e,t,n){let r=Se(e,t);typeof r=="function"&&n&&E(n,r)}function $e(e,t){if(!(typeof document>"u"))if(t){if(t.isConnected){queueMicrotask(()=>je(e,"onMount",t));return}let n=new MutationObserver(()=>{t.isConnected&&(n.disconnect(),je(e,"onMount",t))});E(t,()=>n.disconnect()),queueMicrotask(()=>{t.isConnected?je(e,"onMount",t):n.observe(document.body,{childList:!0,subtree:!0})})}else queueMicrotask(()=>{Se(e,"onMount")})}function mo(e,t){E(t,()=>Se(e,"onUnmount"));let n=()=>{let r=new MutationObserver(()=>{t.isConnected||(r.disconnect(),Se(e,"onUnmount"))});r.observe(document.body,{childList:!0,subtree:!0}),E(t,()=>r.disconnect())};t.isConnected?n():$e(()=>{n()},t)}function bo(e,t){E(t,e)}function go(e){let[t,n]=w(e);return{provide(r){n(r)},use(){return t},get(){return t()},set(r){n(r)}}}function ho(e){let t=e();return _()&&queueMicrotask(()=>{try{e()}catch(n){console.warn("[Sibu strict] second run threw:",n)}}),t}function yo(e){if(!_())return P(e);let t=P(e),n=null;return queueMicrotask(()=>{try{n=P(e)}catch(r){console.warn("[Sibu strictEffect] second run threw:",r)}}),()=>{t(),n&&n()}}function xo(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}function To(e){let[t,n]=w(e()),r=!1,o=t(),i=()=>{r=!1,n(o)},s=()=>{r||(r=!0,queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(i):i()}))};return x(()=>{o=e(),s()}),t}var vo=16;function ei(e){let t=globalThis;if(typeof t.requestIdleCallback=="function"){t.requestIdleCallback(e,{timeout:vo*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,vo)}function ko(){let[e,t]=w(!1);function n(r){t(!0),ei(()=>{let o;try{o=r()}catch{t(!1);return}o&&typeof o.then=="function"?o.then(()=>t(!1),()=>t(!1)):t(!1)})}return{pending:e,start:n}}function qe(e){let t=null;return function(){if(t)return t();let r=h({class:"sibu-lazy"}),o=!1;e().then(s=>{if(o)return;t=s.default;let a=t();r.replaceChildren(a)}).catch(s=>{if(o)return;let a=s instanceof Error?s:new Error(String(s));r.replaceChildren(h("sibu-lazy-error",`Failed to load component: ${a.message}`))}),r.appendChild(S("sibu-lazy-loading","Loading..."));let i=r.remove.bind(r);return r.remove=()=>{o=!0,i()},r}}function Ke({nodes:e,fallback:t}){let n=h({class:"sibu-suspense"}),r=t();return n.appendChild(r),queueMicrotask(()=>{try{let o=e();if(o.classList.contains("sibu-lazy")){let i=new MutationObserver(()=>{o.querySelector(".sibu-lazy-loading")||(i.disconnect(),n.replaceChildren(o))});i.observe(o,{childList:!0,subtree:!0}),o.querySelector(".sibu-lazy-loading")||n.replaceChildren(o)}else n.replaceChildren(o)}catch{}}),n}var ti=_(),ni=`
1
+ "use strict";var Sibu=(()=>{var Fe=Object.defineProperty;var si=Object.getOwnPropertyDescriptor;var ai=Object.getOwnPropertyNames;var ci=Object.prototype.hasOwnProperty;var ht=(e,t)=>{for(var n in t)Fe(e,n,{get:t[n],enumerable:!0})},li=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ai(t))!ci.call(e,o)&&o!==n&&Fe(e,o,{get:()=>t[o],enumerable:!(r=si(t,o))||r.enumerable});return e};var ui=e=>li(Fe({},"__esModule",{value:!0}),e);var Zi={};ht(Zi,{DynamicComponent:()=>oo,ErrorBoundary:()=>Xo,ErrorDisplay:()=>ze,Fragment:()=>eo,KeepAlive:()=>lo,Loading:()=>ti,Portal:()=>to,SVG_NS:()=>k,Suspense:()=>st,__resetIdCounter:()=>To,a:()=>Qt,abbr:()=>Xt,action:()=>uo,address:()=>Dt,area:()=>En,array:()=>Ro,article:()=>Nt,aside:()=>Ot,asyncDerived:()=>Do,audio:()=>Cn,autoResize:()=>go,b:()=>en,base:()=>vr,batch:()=>z,bdi:()=>tn,bdo:()=>nn,bindDynamic:()=>je,blockquote:()=>qt,body:()=>At,br:()=>rn,button:()=>ae,canvas:()=>Bn,caption:()=>Un,catchError:()=>ho,catchErrorAsync:()=>yo,center:()=>jr,checkLeaks:()=>wt,circle:()=>wr,cite:()=>on,clickOutside:()=>fo,clipPath:()=>Hr,code:()=>Oe,col:()=>Kn,colgroup:()=>Wn,context:()=>Bo,copyOnClick:()=>mo,createId:()=>vo,customElement:()=>Kr,data:()=>sn,datalist:()=>tr,dd:()=>jt,deepEqual:()=>fe,deepSignal:()=>Ho,defer:()=>Uo,defs:()=>$r,del:()=>jn,derived:()=>De,details:()=>mr,dfn:()=>an,dialog:()=>gr,disableSSR:()=>Eo,dispose:()=>M,div:()=>T,dl:()=>Vt,dt:()=>Ut,each:()=>Qr,effect:()=>O,ellipse:()=>kr,em:()=>cn,embed:()=>Mn,enableSSR:()=>ko,enqueueBatchedSignal:()=>ce,fieldset:()=>nr,figcaption:()=>Kt,figure:()=>Wt,font:()=>Vr,footer:()=>Rt,form:()=>rr,g:()=>Er,getSSRStore:()=>ue,getSlot:()=>io,h1:()=>Pt,h2:()=>zt,h3:()=>$e,h4:()=>Ft,h5:()=>Bt,h6:()=>It,head:()=>Ct,header:()=>Mt,hr:()=>Jt,html:()=>Ke,i:()=>ln,iframe:()=>Rn,img:()=>An,input:()=>or,ins:()=>Vn,isBatching:()=>So,isSSR:()=>de,kbd:()=>un,label:()=>ir,lazy:()=>it,legend:()=>sr,li:()=>Gt,line:()=>Cr,linearGradient:()=>Pr,link:()=>Tr,longPress:()=>po,main:()=>Ht,map:()=>_n,mark:()=>dn,marker:()=>qr,marquee:()=>Ur,mask:()=>Or,match:()=>co,math:()=>Fn,menu:()=>br,meta:()=>Sr,meter:()=>ar,mount:()=>Gr,nav:()=>$t,nextTick:()=>jo,noscript:()=>In,object:()=>$n,ol:()=>Zt,on:()=>_o,onCleanup:()=>Fo,onMount:()=>ve,onUnmount:()=>zo,optgroup:()=>cr,option:()=>lr,output:()=>ur,p:()=>Re,param:()=>Hn,path:()=>Ar,pattern:()=>Dr,picture:()=>On,polygon:()=>_r,polyline:()=>Lr,portal:()=>Dn,pre:()=>He,progress:()=>dr,q:()=>fn,radialGradient:()=>zr,reactiveArray:()=>$o,rect:()=>Nr,ref:()=>Mo,registerComponent:()=>no,registerDisposer:()=>v,resolveComponent:()=>Je,rp:()=>pn,rt:()=>mn,ruby:()=>gn,runInSSRContext:()=>Co,s:()=>bn,samp:()=>hn,script:()=>qn,section:()=>Lt,select:()=>fr,setGlobalErrorHandler:()=>xo,show:()=>so,signal:()=>C,slot:()=>yr,small:()=>yn,source:()=>Pn,span:()=>A,stop:()=>Fr,store:()=>No,strict:()=>Io,strictEffect:()=>qo,strong:()=>xn,style:()=>K,sub:()=>vn,summary:()=>hr,sup:()=>Tn,svg:()=>zn,symbol:()=>Ir,table:()=>Jn,tagFactory:()=>u,takePendingError:()=>Te,tbody:()=>Gn,td:()=>Zn,template:()=>xr,text:()=>Mr,textarea:()=>pr,tfoot:()=>Yn,th:()=>Qn,thead:()=>Xn,time:()=>Sn,title:()=>_t,tr:()=>er,track:()=>Ln,transition:()=>Ko,trapFocus:()=>bo,trustHTML:()=>at,tspan:()=>Rr,u:()=>wn,ul:()=>Yt,unregisterComponent:()=>ro,untracked:()=>U,use:()=>Br,var_:()=>kn,video:()=>Nn,watch:()=>Lo,when:()=>ao,withSSR:()=>Ao,writable:()=>Oo});var lt={};ht(lt,{DynamicComponent:()=>oo,ErrorBoundary:()=>Xo,ErrorDisplay:()=>ze,Fragment:()=>eo,KeepAlive:()=>lo,Loading:()=>ti,Portal:()=>to,SVG_NS:()=>k,Suspense:()=>st,__resetIdCounter:()=>To,a:()=>Qt,abbr:()=>Xt,action:()=>uo,address:()=>Dt,area:()=>En,array:()=>Ro,article:()=>Nt,aside:()=>Ot,asyncDerived:()=>Do,audio:()=>Cn,autoResize:()=>go,b:()=>en,base:()=>vr,batch:()=>z,bdi:()=>tn,bdo:()=>nn,bindDynamic:()=>je,blockquote:()=>qt,body:()=>At,br:()=>rn,button:()=>ae,canvas:()=>Bn,caption:()=>Un,catchError:()=>ho,catchErrorAsync:()=>yo,center:()=>jr,checkLeaks:()=>wt,circle:()=>wr,cite:()=>on,clickOutside:()=>fo,clipPath:()=>Hr,code:()=>Oe,col:()=>Kn,colgroup:()=>Wn,context:()=>Bo,copyOnClick:()=>mo,createId:()=>vo,customElement:()=>Kr,data:()=>sn,datalist:()=>tr,dd:()=>jt,deepEqual:()=>fe,deepSignal:()=>Ho,defer:()=>Uo,defs:()=>$r,del:()=>jn,derived:()=>De,details:()=>mr,dfn:()=>an,dialog:()=>gr,disableSSR:()=>Eo,dispose:()=>M,div:()=>T,dl:()=>Vt,dt:()=>Ut,each:()=>Qr,effect:()=>O,ellipse:()=>kr,em:()=>cn,embed:()=>Mn,enableSSR:()=>ko,enqueueBatchedSignal:()=>ce,fieldset:()=>nr,figcaption:()=>Kt,figure:()=>Wt,font:()=>Vr,footer:()=>Rt,form:()=>rr,g:()=>Er,getSSRStore:()=>ue,getSlot:()=>io,h1:()=>Pt,h2:()=>zt,h3:()=>$e,h4:()=>Ft,h5:()=>Bt,h6:()=>It,head:()=>Ct,header:()=>Mt,hr:()=>Jt,html:()=>Ke,i:()=>ln,iframe:()=>Rn,img:()=>An,input:()=>or,ins:()=>Vn,isBatching:()=>So,isSSR:()=>de,kbd:()=>un,label:()=>ir,lazy:()=>it,legend:()=>sr,li:()=>Gt,line:()=>Cr,linearGradient:()=>Pr,link:()=>Tr,longPress:()=>po,main:()=>Ht,map:()=>_n,mark:()=>dn,marker:()=>qr,marquee:()=>Ur,mask:()=>Or,match:()=>co,math:()=>Fn,menu:()=>br,meta:()=>Sr,meter:()=>ar,mount:()=>Gr,nav:()=>$t,nextTick:()=>jo,noscript:()=>In,object:()=>$n,ol:()=>Zt,on:()=>_o,onCleanup:()=>Fo,onMount:()=>ve,onUnmount:()=>zo,optgroup:()=>cr,option:()=>lr,output:()=>ur,p:()=>Re,param:()=>Hn,path:()=>Ar,pattern:()=>Dr,picture:()=>On,polygon:()=>_r,polyline:()=>Lr,portal:()=>Dn,pre:()=>He,progress:()=>dr,q:()=>fn,radialGradient:()=>zr,reactiveArray:()=>$o,rect:()=>Nr,ref:()=>Mo,registerComponent:()=>no,registerDisposer:()=>v,resolveComponent:()=>Je,rp:()=>pn,rt:()=>mn,ruby:()=>gn,runInSSRContext:()=>Co,s:()=>bn,samp:()=>hn,script:()=>qn,section:()=>Lt,select:()=>fr,setGlobalErrorHandler:()=>xo,show:()=>so,signal:()=>C,slot:()=>yr,small:()=>yn,source:()=>Pn,span:()=>A,stop:()=>Fr,store:()=>No,strict:()=>Io,strictEffect:()=>qo,strong:()=>xn,style:()=>K,sub:()=>vn,summary:()=>hr,sup:()=>Tn,svg:()=>zn,symbol:()=>Ir,table:()=>Jn,tagFactory:()=>u,takePendingError:()=>Te,tbody:()=>Gn,td:()=>Zn,template:()=>xr,text:()=>Mr,textarea:()=>pr,tfoot:()=>Yn,th:()=>Qn,thead:()=>Xn,time:()=>Sn,title:()=>_t,tr:()=>er,track:()=>Ln,transition:()=>Ko,trapFocus:()=>bo,trustHTML:()=>at,tspan:()=>Rr,u:()=>wn,ul:()=>Yt,unregisterComponent:()=>ro,untracked:()=>U,use:()=>Br,var_:()=>kn,video:()=>Nn,watch:()=>Lo,when:()=>ao,withSSR:()=>Ao,writable:()=>Oo});function E(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var yt=E();function $(e,t){if(yt&&!e)throw new Error(`[SibuJS] ${t}`)}function w(e){yt&&console.warn(`[SibuJS] ${e}`)}var di=["http:","https:","mailto:","tel:","ftp:"];function I(e){let t=e.replace(/[\x00-\x20\x7f-\x9f]+/g,"").trim();if(!t)return"";let n=t.toLowerCase(),r=-1;for(let i=0;i<n.length;i++){let s=n.charCodeAt(i);if(s===58){r=i;break}if(s===47||s===63||s===35)break}if(r===-1)return t;let o=n.slice(0,r+1);return/^[a-z][a-z0-9+.-]*:$/.test(o)&&di.indexOf(o)===-1?"":t}function he(e){let t=e.split(","),n=[];for(let r=0;r<t.length;r++){let o=t[r].trim();if(!o)continue;let i=o.match(/^(\S+)(\s+.+)?$/);if(!i)continue;let s=I(i[1]);s&&n.push(i[2]?`${s}${i[2]}`:s)}return n.join(", ")}function Be(e){let n=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 n.includes("url(")||n.includes("expression(")||n.includes("javascript:")||n.includes("vbscript:")||n.includes("-moz-binding")||n.includes("behavior:")||n.includes("@import")||n.includes("image-set(")||n.includes("filter:progid")?"":e}var fi=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data"]);function V(e){return fi.has(e)}var pi=E(),te=new Array(32),ne=32,P=-1,B=null,W="__s",D=0,L=[],H=new Set,mi=[];function X(e){try{e()}catch(t){pi&&w(`Subscriber threw during notification: ${t instanceof Error?t.message:String(t)}`)}}var Ae=0,_e=!1;function Ie(e,t){let n=B;B=t;try{e()}finally{B=n}}function S(e,t){t||(t=e),xt(t),++P,P>=ne&&(ne*=2,te.length=ne),te[P]=t,B=t;try{e()}finally{P--,B=P>=0?te[P]:null}return()=>xt(t)}function gi(){Ae===0&&(++P,P>=ne&&(ne*=2,te.length=ne),te[P]=null,B=null,_e=!0),Ae++}function bi(){Ae--,Ae===0&&(P--,B=P>=0?te[P]:null,_e=!1)}function U(e){gi();try{return e()}finally{bi()}}function re(e){if(!B)return;let t=B;if(t._dep===e)return;let n=t._deps;if(n){if(n.has(e))return;n.add(e)}else if(t._dep!==void 0){let o=new Set;o.add(t._dep),o.add(e),t._deps=o,t._dep=void 0}else t._dep=e;let r=e[W];r||(r=new Set,e[W]=r),r.add(B),r.size===1?e.__f=B:e.__f!==void 0&&(e.__f=void 0)}function vt(e){let t=e[W];if(t)for(let n of t)n._c?ye(n):H.has(n)||(H.add(n),L.push(n))}var ee=1e5;function Tt(){if(!(D>0)){D++;try{let e=0;for(;e<L.length;){if(e>=ee){typeof console<"u"&&console.error(`[SibuJS] Notification queue exceeded ${ee} iterations \u2014 likely an effect that writes to a signal it reads. Breaking to prevent infinite loop.`);break}X(L[e]),e++}}finally{D--,D===0&&(L.length=0,H.clear())}}}function ye(e){e();let t=e._sig;if(!t)return;let n=mi,r=n.length;for(n.push(t);n.length>r;){let o=n.pop(),i=o.__f;if(i){if(i._c){let a=i._sig;a._d||(a._d=!0,n.push(a))}else H.has(i)||(H.add(i),L.push(i));continue}let s=o[W];if(s)for(let a of s)if(a._c){let c=a._sig;c&&!c._d?(c._d=!0,n.push(c)):c||a()}else H.has(a)||(H.add(a),L.push(a))}}function Le(e){let t=e.__f;if(t){if(D>0){t._c?ye(t):H.has(t)||(H.add(t),L.push(t));return}D++;try{t._c?ye(t):X(t);let r=0;for(;r<L.length;){if(r>=ee){typeof console<"u"&&console.error(`[SibuJS] Notification queue exceeded ${ee} iterations \u2014 likely an effect that writes to a signal it reads. Breaking to prevent infinite loop.`);break}X(L[r]),r++}}finally{D--,D===0&&(L.length=0,H.clear())}return}let n=e[W];if(!(!n||n.size===0)){if(D>0){for(let r of n)r._c?ye(r):H.has(r)||(H.add(r),L.push(r));return}D++;try{let r=0,o=!1;for(let s of n)s._c&&(o=!0),L[r++]=s;if(o){for(let s=0;s<r;s++)L[s]._c&&ye(L[s]);for(let s=0;s<r;s++){let a=L[s];!a._c&&!H.has(a)&&(H.add(a),X(a))}}else for(let s=0;s<r;s++)X(L[s]);let i=r;for(;i<L.length;){if(i-r>=ee){typeof console<"u"&&console.error(`[SibuJS] Notification queue exceeded ${ee} iterations \u2014 likely an effect that writes to a signal it reads. Breaking to prevent infinite loop.`);break}X(L[i]),i++}}finally{D--,D===0&&(L.length=0,H.clear())}}}function xt(e){let t=e,n=t._dep;if(n!==void 0){let o=n[W];o&&(o.delete(e),n.__f===e?n.__f=o.size===1?o.values().next().value:void 0:o.size===1&&n.__f===void 0&&(n.__f=o.values().next().value)),t._dep=void 0;return}let r=t._deps;if(!(!r||r.size===0)){for(let o of r){let i=o[W];i&&(i.delete(e),o.__f===e?o.__f=i.size===1?i.values().next().value:void 0:i.size===1&&o.__f===void 0&&(o.__f=i.values().next().value))}r.clear()}}var Ne=E();function qe(e,t,n){e[t]=n}function hi(e){if(e.length<3)return!1;let t=e.toLowerCase();return t[0]==="o"&&t[1]==="n"&&t.charCodeAt(2)>=97&&t.charCodeAt(2)<=122}function Me(e,t,n){if(hi(t))return Ne&&w(`bindAttribute: refusing to bind event-handler attribute "${t}". Use on:{ ${t.slice(2)}: fn } instead.`),()=>{};function r(){let i;try{i=n()}catch(a){Ne&&w(`bindAttribute: getter for "${t}" threw: ${a instanceof Error?a.message:String(a)}`);return}if(typeof i=="boolean"){t in e&&(t==="checked"||t==="disabled"||t==="selected")?qe(e,t,i):i?e.setAttribute(t,""):e.removeAttribute(t);return}let s=String(i);(t==="value"||t==="checked")&&t in e?qe(e,t,t==="checked"?!!i:s):e.setAttribute(t,V(t)?I(s):s)}return S(r)}function je(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){Ne&&w(`bindDynamic: name getter threw: ${l instanceof Error?l.message:String(l)}`);return}let a;try{a=typeof n=="function"?n():n}catch(l){Ne&&w(`bindDynamic: value getter threw: ${l instanceof Error?l.message:String(l)}`);return}if((s[0]==="o"||s[0]==="O")&&(s[1]==="n"||s[1]==="N"))return;r!==null&&r!==s&&e.removeAttribute(r);let c=String(a);(s==="value"||s==="checked")&&s in e?qe(e,s,s==="checked"?!!a:c):e.setAttribute(s,V(s)?I(c):c),r=s}let i=S(o);return()=>{i(),r!==null&&e.removeAttribute(r)}}var St=E();function J(e,t){let n=[];function r(){let o;try{o=t()}catch(l){St&&w(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}if(o==null||typeof o=="boolean"){for(let l=0;l<n.length;l++){let d=n[l];d.parentNode&&d.parentNode.removeChild(d)}n.length=0;return}let i=e.parentNode;if(!i){n.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 b=m instanceof Node?m:document.createTextNode(String(m));if(l.has(b)){St&&w("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}l.add(b),s.push(b)}}else s=[o instanceof Node?o:document.createTextNode(String(o))];let a;if(n.length>0&&s.length>0){let l=new Set(n);a=new Set;for(let d=0;d<s.length;d++)l.has(s[d])&&a.add(s[d])}for(let l=0;l<n.length;l++){let d=n[l];a?.has(d)||d.parentNode&&d.parentNode.removeChild(d)}let c=e.nextSibling;for(let l=0;l<s.length;l++){let d=s[l];a?.has(d)&&d.parentNode===i?d.nextSibling!==c&&i.insertBefore(d,c):i.insertBefore(d,c)}n=s}return S(r)}var oe=new WeakMap,ie=E(),se=0;function v(e,t){let n=oe.get(e);n||(n=[],oe.set(e,n)),n.push(t),ie&&se++}function M(e){let t=[e],n=[];for(;t.length>0;){let r=t.pop();n.push(r);let o=Array.from(r.childNodes);for(let i=0;i<o.length;i++)t.push(o[i])}for(let r=n.length-1;r>=0;r--){let o=n[r],i=oe.get(o);if(i){let s=i.slice();oe.delete(o),ie&&(se-=s.length);for(let c of s)try{c()}catch(l){ie&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",l)}let a=0;for(;a++<8;){let c=oe.get(o);if(!c||c.length===0)break;let l=c.slice();oe.delete(o),ie&&(se-=l.length);for(let d of l)try{d()}catch(m){ie&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",m)}}}}}function wt(e=0){return ie?(e>0&&se>e&&w(`checkLeaks: ${se} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),se):0}var k="http://www.w3.org/2000/svg",kt=E(),yi=new Set(["script","iframe","object","embed","frame","frameset"]);function xi(e){let t=e.toLowerCase();if(yi.has(t))throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`)}var vi=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);function Ti(e,t,n){e[t]=n}var Et=new Map;function Si(e){let t=Et.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Et.set(e,t)),t}function wi(e,t){if(typeof t=="function"){let r=S(()=>{e.setAttribute("style",t())});v(e,r);return}if(typeof t=="string"){e.setAttribute("style",t);return}let n=e;for(let r in t){let o=t[r],i=Si(r);if(typeof o=="function"){let s=o,a=S(()=>{n.style.setProperty(i,Be(String(s())))});v(e,a)}else n.style.setProperty(i,Be(String(o)))}}function ki(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=S(()=>{e.setAttribute("class",t())});v(e,i);return}let n=t,r=!1,o="";for(let i in n){let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=S(()=>{let a="";for(let c in n){let l=n[c];(typeof l=="function"?l():l)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)});v(e,s)}else e.setAttribute("class",o)}function Ve(e,t){if(typeof t=="string"){e.textContent=t;return}if(typeof t=="number"){e.textContent=String(t);return}if(!(typeof t=="boolean"||t==null)){if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),v(e,J(n,t));return}if(t instanceof Node){e.appendChild(t);return}if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),v(e,J(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,J(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,t)=>(n,r)=>{xi(e);let o=t?document.createElementNS(t,e):document.createElement(e);if(n===void 0)return o;if(typeof n=="string")return r!==void 0?(o.setAttribute("class",n),Ve(o,r),o):(o.textContent=n,o);if(typeof n=="number")return o.textContent=String(n),o;if(Array.isArray(n)||n instanceof Node||typeof n=="function")return Ve(o,n),o;let i=n,s=i.class;s!=null&&ki(o,s);let a=i.id;a!=null&&(kt&&typeof a=="string"&&vi.has(a.toLowerCase())&&w(`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&&Ve(o,c);let l=i.on;if(l)for(let b in l){let f=l[b];typeof f=="function"?o.addEventListener(b,f):kt&&w(`tagFactory: on.${b} handler is not a function (got ${typeof f}). Event listener was not attached.`)}let d=i.style;d!=null&&wi(o,d);let m=i.ref;m&&(m.current=o);for(let b in i)switch(b){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let f=i[b];if(f==null)continue;let p=b.toLowerCase();if(p[0]==="o"&&p[1]==="n")continue;if(typeof f=="function")v(o,Me(o,b,f));else if(typeof f=="boolean")b in o&&(b==="checked"||b==="disabled"||b==="selected")?Ti(o,b,f):f?o.setAttribute(b,""):o.removeAttribute(b);else{let g=String(f);p==="srcset"?o.setAttribute(b,he(g)):V(p)?o.setAttribute(b,I(g)):o.setAttribute(b,g)}}}return i.onElement&&typeof i.onElement=="function"&&i.onElement(o),o};var xs=u("html"),Ct=u("head"),At=u("body"),_t=u("title"),T=u("div"),A=u("span"),Lt=u("section"),Nt=u("article"),Mt=u("header"),Rt=u("footer"),$t=u("nav"),Ht=u("main"),Ot=u("aside"),Dt=u("address"),Re=u("p"),Pt=u("h1"),zt=u("h2"),$e=u("h3"),Ft=u("h4"),Bt=u("h5"),It=u("h6"),qt=u("blockquote"),jt=u("dd"),Vt=u("dl"),Ut=u("dt"),Kt=u("figcaption"),Wt=u("figure"),Jt=u("hr"),Gt=u("li"),Zt=u("ol"),Yt=u("ul"),He=u("pre"),Qt=u("a"),Xt=u("abbr"),en=u("b"),tn=u("bdi"),nn=u("bdo"),rn=u("br"),on=u("cite"),Oe=u("code"),sn=u("data"),an=u("dfn"),cn=u("em"),ln=u("i"),un=u("kbd"),dn=u("mark"),fn=u("q"),pn=u("rp"),mn=u("rt"),gn=u("ruby"),bn=u("s"),hn=u("samp"),yn=u("small"),xn=u("strong"),vn=u("sub"),Tn=u("sup"),Sn=u("time"),wn=u("u"),kn=u("var"),En=u("area"),Cn=u("audio"),An=u("img"),_n=u("map"),Ln=u("track"),Nn=u("video"),Mn=u("embed"),Rn=u("iframe"),$n=u("object"),Hn=u("param"),On=u("picture"),Dn=u("portal"),Pn=u("source"),zn=u("svg",k),Fn=u("math"),Bn=u("canvas"),In=u("noscript"),qn=u("script"),jn=u("del"),Vn=u("ins"),Un=u("caption"),Kn=u("col"),Wn=u("colgroup"),Jn=u("table"),Gn=u("tbody"),Zn=u("td"),Yn=u("tfoot"),Qn=u("th"),Xn=u("thead"),er=u("tr"),ae=u("button"),tr=u("datalist"),nr=u("fieldset"),rr=u("form"),or=u("input"),ir=u("label"),sr=u("legend"),ar=u("meter"),cr=u("optgroup"),lr=u("option"),ur=u("output"),dr=u("progress"),fr=u("select"),pr=u("textarea"),mr=u("details"),gr=u("dialog"),br=u("menu"),hr=u("summary"),yr=u("slot"),xr=u("template"),vr=u("base"),Tr=u("link"),Sr=u("meta"),K=u("style"),wr=u("circle",k),kr=u("ellipse",k),Er=u("g",k),Cr=u("line",k),Ar=u("path",k),_r=u("polygon",k),Lr=u("polyline",k),Nr=u("rect",k),Mr=u("text",k),Rr=u("tspan",k),$r=u("defs",k),Hr=u("clipPath",k),Or=u("mask",k),Dr=u("pattern",k),Pr=u("linearGradient",k),zr=u("radialGradient",k),Fr=u("stop",k),Br=u("use",k),Ir=u("symbol",k),qr=u("marker",k),jr=u("center"),Vr=u("font"),Ur=u("marquee"),Kr=e=>u(e);var Ei=E(),Ci=new Set(["script","style"]),Ai=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Wr=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),Jr=new WeakMap;function _i(e){let t=e.length-1,n=e[0];for(let f=0;f<t;f++)n+=`\0${f}\0${e[f+1]}`;let r=0,o=n.length;function i(){for(;r<o&&(n[r]===" "||n[r]===" "||n[r]===`
2
+ `||n[r]==="\r");)r++}function s(){if(n.charCodeAt(r)!==0)return-1;let f=r;r++;let p=0;for(;r<o&&n.charCodeAt(r)!==0;)p=p*10+(n.charCodeAt(r)-48),r++;return r<o&&r++,p<0||p>=t?(r=f,-1):p}function a(){let f=r;for(;r<o;){let p=n.charCodeAt(r);if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57||p===45)r++;else break}return n.slice(f,r)}function c(){if(i(),n[r]!=="=")return{kind:"bool"};r++,i();let f=s();if(f>=0)return{kind:"expr",idx:f};let p=n[r];if(p==='"'||p==="'"){r++;let y=[],N=[],F="";for(;r<o&&n[r]!==p;){let Se=s();Se>=0?(y.push(F),F="",N.push(Se)):F+=n[r++]}return r<o&&r++,y.push(F),N.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:N}}let g=r;for(;r<o;){let y=n.charCodeAt(r);if(y===32||y===9||y===10||y===13||y===62||y===47)break;r++}return{kind:"static",value:n.slice(g,r)}}function l(){let f=[];for(;r<o&&(i(),!(n[r]===">"||n[r]==="/"));){let p=r;for(;r<o;){let y=n.charCodeAt(r);if(y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||y===45||y===58||y===95||y===46)r++;else break}let g=n.slice(p,r);if(!g)break;let x=c();g.startsWith("on:")?x.kind==="expr"&&f.push({t:3,name:g.slice(3),idx:x.idx}):x.kind==="bool"?f.push({t:4,name:g}):x.kind==="static"?f.push({t:0,name:g,value:x.value}):x.kind==="expr"?f.push({t:1,name:g,idx:x.idx}):x.kind==="mixed"&&f.push({t:2,name:g,statics:x.statics,exprs:x.exprs})}return f}function d(f){return f.replace(/\s+/g," ")}function m(f){let p="";for(;r<o&&n[r]!=="<";){let x=s();if(x>=0){let y=d(p);y&&f.push({t:1,value:y}),p="",f.push({t:2,idx:x})}else p+=n[r++]}let g=d(p);g&&f.push({t:1,value:g})}function b(){let f=[];for(;r<o&&!(n[r]==="<"&&r+1<o&&n[r+1]==="/");)if(n[r]==="<"){r++;let p=a(),g=l();i();let x=Ai.has(p),y=n[r]==="/";if(y&&r++,r<o&&r++,x||y)f.push({t:0,el:{tag:p,svg:Wr.has(p),attrs:g,children:[]}});else{let N=b();if(Ci.has(p.toLowerCase())){for(let F=0;F<N.length;F++)if(N[F].t===2)throw new Error(`html: dynamic \${...} expressions are not allowed inside <${p}> (raw-text context). Build the content separately and append it as a Node.`)}n[r]==="<"&&r+1<o&&n[r+1]==="/"&&(r+=2,a(),i(),r<o&&n[r]===">"&&r++),f.push({t:0,el:{tag:p,svg:Wr.has(p),attrs:g,children:N}})}}else m(f);return f}return b()}function Ue(e,t){let n=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:n.setAttribute(o.name,o.value);break;case 1:{let i=o.name,s=i.toLowerCase();if(s[0]==="o"&&s[1]==="n")break;let a=t[o.idx];if(typeof a=="function")v(n,Me(n,i,a));else if(a!=null){let c=String(a);s==="srcset"?n.setAttribute(i,he(c)):V(s)?n.setAttribute(i,I(c)):n.setAttribute(i,c)}break}case 2:{let i=o.statics[0];for(let a=0;a<o.exprs.length;a++){let c=t[o.exprs[a]];i+=(c==null?"":String(c))+o.statics[a+1]}let s=o.name.toLowerCase();s==="srcset"?n.setAttribute(o.name,he(i)):V(s)?n.setAttribute(o.name,I(i)):n.setAttribute(o.name,i);break}case 3:{let i=t[o.idx];typeof i=="function"?n.addEventListener(o.name,i):Ei&&w(`html: on:${o.name} handler is not a function (got ${typeof i}). Event listener was not attached.`);break}case 4:n.setAttribute(o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:n.appendChild(Ue(o.el,t));break;case 1:n.appendChild(document.createTextNode(o.value));break;case 2:{let i=t[o.idx];if(typeof i=="function"){let s=document.createComment("");n.appendChild(s),v(n,J(s,i))}else if(i instanceof Node)n.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?n.appendChild(a):a!=null&&typeof a!="boolean"&&n.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&n.appendChild(document.createTextNode(String(i)));break}}}return n}function Ke(e,...t){let n=Jr.get(e);if(n||(n=_i(e),Jr.set(e,n)),n.length===1&&n[0].t===0)return Ue(n[0].el,t);let r=document.createElement("div");for(let o=0;o<n.length;o++){let i=n[o];switch(i.t){case 0:r.appendChild(Ue(i.el,t));break;case 1:r.appendChild(document.createTextNode(i.value));break;case 2:{let s=t[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,J(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 Gr(e,t){if(!t)throw new Error("[SibuJS mount] container element not found. Make sure the DOM element exists before calling mount().");$(typeof e=="function"||e instanceof Node,"mount: first argument must be a component function or a DOM Node.");let n=typeof performance<"u"?performance.now():0,r=typeof e=="function"?e():e,o=typeof performance<"u"?performance.now()-n:0;t.appendChild(r);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:r,container:t,duration:o}),{node:r,unmount(){i&&i.emit("app:unmount",{rootElement:r}),M(r),r.parentNode&&r.parentNode.removeChild(r)}}}var Zr=E();function Yr(e){return typeof e=="function"?Yr(e()):e instanceof Node?e:document.createTextNode(String(e))}function Li(e,t){if(t===0)return[];let n=[],r=new Array(t);for(let a=0;a<t;a++){let c=e[a],l=0,d=n.length;for(;l<d;){let m=l+d>>1;e[n[m]]<c?l=m+1:d=m}n[l]=a,r[a]=l>0?n[l-1]:-1}let o=n.length,i=new Array(o),s=n[o-1];for(let a=o-1;a>=0;a--)i[a]=s,s=r[s];return i}function Qr(e,t,n){$(typeof e=="function","each: first argument must be a function that returns an array."),$(typeof t=="function","each: second argument must be a render function."),$(n&&typeof n.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=[],b=[],f=new Uint8Array(0),p=new Map,g=[],x=[],y=new Map,N=!1,F=!1,Se=n.key,ut=()=>{let dt=e(),_=dt.length,we=r.parentNode;if(!we)return;F||(we.insertBefore(o,r.nextSibling),F=!0),b.length<_&&(b=new Array(_));for(let h=0;h<_;h++)b[h]=Se(dt[h]);let ge=b;m.length<_&&(m=new Array(_)),d.clear(),y.clear();for(let h=0;h<_;h++)y.set(ge[h],h);for(let h=0;h<_;h++){let R=ge[h],pt=l.get(R),be;if(pt!==void 0)be=pt;else{let mt=R,oi=()=>U(()=>e()[y.get(mt)]),ii=()=>y.get(mt);try{be=Yr(t(oi,ii))}catch(Q){Zr&&w(`each: render threw for item at index ${h} (key="${ge[h]}"): ${Q instanceof Error?Q.message:String(Q)}`),be=document.createComment(`each:error:${h}`);let gt=Q instanceof Error?Q:new Error(String(Q));queueMicrotask(()=>{try{let bt=r.parentNode;bt?.dispatchEvent?bt.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:gt}})):Zr&&w(`each: error not surfaced \u2014 anchor detached: ${gt.message}`)}catch{}})}}d.set(R,be),m[h]=be}for(let[h,R]of l)d.has(h)||(M(R),R.parentNode&&we.removeChild(R));if(_===0){c=0;let h=l;l=d,d=h;return}p.clear();for(let h=0;h<c;h++)p.set(a[h],h);g.length<_&&(g=new Array(_),x=new Array(_));let ke=0;for(let h=0;h<_;h++){let R=p.get(ge[h]);R!==void 0&&(g[ke]=h,x[ke]=R,ke++)}let ft=Li(x,ke);f.length<_?f=new Uint8Array(_):f.fill(0,0,_);for(let h=0;h<ft.length;h++)f[g[ft[h]]]=1;let Ee=o;for(let h=_-1;h>=0;h--){let R=m[h];f[h]||R.nextSibling!==Ee&&we.insertBefore(R,Ee),Ee=R}let Ce=a===i?s:i;Ce.length<_&&(Ce.length=_);for(let h=0;h<_;h++)Ce[h]=ge[h];a=Ce,c=_;let ri=l;l=d,d=ri,N=!0},ni=S(ut);return v(r,ni),N||queueMicrotask(()=>{!N&&r.parentNode&&ut()}),r}function eo(e){let t=document.createDocumentFragment();for(let n of e)if(!(n==null||typeof n=="boolean"))if(Array.isArray(n))for(let r of n)r==null||typeof r=="boolean"||t.appendChild(Xr(r));else t.appendChild(Xr(n));return t}function Xr(e){if(e==null)return document.createTextNode("");if(e instanceof Node)return e;if(typeof e=="function"){let t=e();return t instanceof Node?t:document.createTextNode(String(t??""))}return document.createTextNode(String(e))}function to(e,t){let n=document.createComment("portal"),r=t||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=n.parentNode;c?.dispatchEvent&&c.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:a}}))}catch{}})}}),v(n,()=>{i=!0,o&&(M(o),o.remove(),o=null)}),n}var We=new Map;function no(e,t){We.set(e,t)}function ro(e){We.delete(e)}function Je(e){let t=We.get(e);return t?t():T({nodes:`[Component "${e}" not found]`})}function oo(e){let t=T({class:"sibu-dynamic"});function n(){let o=e(),i;typeof o=="function"?i=o():i=Je(o);for(let s of Array.from(t.childNodes))M(s);t.replaceChildren(i)}let r=S(n);return v(t,r),t}function io(e,t="default"){return e?.[t]}function so(e,t){return S(()=>{t.style.display=e()?"":"none"}),t}function ao(e,t,n){let r=document.createComment("when"),o=null,i,s=!1,a=()=>{let c=e(),l=r.parentNode;if(!l||s&&c===i)return;i=c,o?.parentNode&&(M(o),o.parentNode.removeChild(o),o=null);let d=c?t():n?n():null;if(d!=null){let m=d instanceof Node?d:document.createTextNode(String(d));l.insertBefore(m,r.nextSibling),o=m}s=!0};return S(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function co(e,t,n){let r=document.createComment("match"),o=null,i,s=!1,a=()=>{let c=String(e()),l=r.parentNode;if(!l||s&&c===i)return;i=c,o?.parentNode&&(M(o),o.parentNode.removeChild(o),o=null);let d=t[c]||n;if(d){let m=d();if(m!=null){let b=m instanceof Node?m:document.createTextNode(String(m));l.insertBefore(b,r.nextSibling),o=b}}s=!0};return S(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function lo(e,t,n){let r=document.createComment("keep-alive"),o=new Map,i=[],s=n?.max??10;s===0&&E()&&w("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(),p=r.parentNode;if(!p||l&&f===a)return;c?.parentNode&&p.removeChild(c),a=f;let g=o.get(f);if(g){let x=i.indexOf(f);x!==-1&&(i.splice(x,1),i.push(f))}else{let x=t[f];if(!x){c=null,l=!0;return}if(g=x(),o.set(f,g),i.push(f),s>0&&i.length>s){let y=i.shift(),N=o.get(y);N&&(M(N),N.parentNode&&N.parentNode.removeChild(N),o.delete(y))}}p.insertBefore(g,r.nextSibling),c=g,l=!0},b=S(m);return l||queueMicrotask(()=>{!l&&r.parentNode&&m()}),v(r,()=>{d=!0,b();for(let f of o.values())M(f),f.parentNode&&f.parentNode.removeChild(f);o.clear(),i.length=0,c=null}),r}function uo(e,t,n){let r=t(e,n);typeof r=="function"&&v(e,r)}var fo=(e,t)=>{let n=r=>{e.contains(r.target)||t()};return document.addEventListener("pointerdown",n,!0),()=>document.removeEventListener("pointerdown",n,!0)},po=(e,t)=>{let n=t.duration??500,r=null,o=()=>{r=setTimeout(()=>{t.callback(),r=null},n)},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)}},mo=(e,t)=>{let n=()=>{let r=typeof t=="function"?t():e.textContent??"";navigator.clipboard.writeText(r)};return e.addEventListener("click",n),()=>e.removeEventListener("click",n)},go=e=>{let t=()=>{e.style.overflow="hidden",e.style.height="auto",e.style.height=`${e.scrollHeight}px`};return t(),e.addEventListener("input",t),()=>e.removeEventListener("input",t)},bo=e=>{let t='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',n=r=>{if(r.key!=="Tab")return;let o=Array.from(e.querySelectorAll(t));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",n),()=>e.removeEventListener("keydown",n)};var G=null;function ho(e,t){try{let n=e();return n&&typeof n.then=="function"&&n.catch(r=>{t?t(r,"async"):G?G(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),n}catch(n){return t?t(n,"sync"):G?G(n,"sync"):console.error("Unhandled error in Sibu.catchError:",n),null}}async function yo(e,t){try{return await e()}catch(n){return t?t(n,"async"):G?G(n,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",n),null}}function xo(e){G=e}var Ge=0;function vo(e="sibu"){return Ge++,`${e}-${Ge}`}function To(){Ge=0}var xe=0,Ze=new Set;function z(e){xe++;try{return e()}finally{xe--,xe===0&&Ni()}}function ce(e){return xe===0?!1:(Ze.add(e),!0)}function So(){return xe>0}function Ni(){try{for(let e of Ze)vt(e)}finally{Ze.clear()}Tt()}var wo=globalThis,Ye=E();function C(e,t){let n={value:e},r=Ye?t?.name:void 0,o=t?.equals;r&&(n.__name=r);function i(){return re(n),n.value}i.__signal=n,r&&(i.__name=r);function s(a){let c=typeof a=="function"?a(n.value):a;if(!(o?o(n.value,c):Object.is(c,n.value))){if(Ye){let l=n.value;n.value=c;let d=wo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:n,name:r,oldValue:l,newValue:c})}else n.value=c;ce(n)||Le(n)}}if(Ye){let a=wo.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}var le=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let e=Function("return typeof require==='function'?require:null")();if(e){let t=e("node:async_hooks");le=new t.AsyncLocalStorage}}}catch{le=null}var Z={ssr:!1,suspenseIdCounter:0};function ue(){if(le){let e=le.getStore();if(e)return e}return Z}function de(){return ue().ssr}function ko(){ue().ssr=!0}function Eo(){ue().ssr=!1}function Co(e){let t={ssr:!0,suspenseIdCounter:0};if(le)return le.run(t,e);let n=Z.ssr,r=Z.suspenseIdCounter;Z.ssr=!0,Z.suspenseIdCounter=0;try{return e()}finally{Z.ssr=n,Z.suspenseIdCounter=r}}function Ao(e){let t=ue(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var Qe=globalThis;function _o(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,U(()=>t(o,void 0));else{let i=n;n=o,U(()=>t(o,i))}}}function O(e,t){if($(typeof e=="function","effect: argument must be a function."),de())return()=>{};let n=t?.onError,r=[],o=f=>{r.push(f)},i=()=>{if(r.length===0)return;let f=r;r=[];for(let p=f.length-1;p>=0;p--)try{f[p]()}catch(g){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw:",g)}},s=()=>e(o),a=n?()=>{try{s()}catch(f){n(f)}}:s,c=()=>{},l=!1,d=()=>{if(l){Qe.__SIBU_DEV_WARN__!==!1&&typeof console<"u"&&console.warn("[SibuJS] effect re-entered itself while running \u2014 the triggering update will be ignored. Wrap mutual writes in `batch()` or split the effect to avoid this.");return}l=!0;try{i(),c(),c=S(a,d)}finally{l=!1}};l=!0;try{c=S(a,d)}finally{l=!1}let m=Qe.__SIBU_DEVTOOLS_GLOBAL_HOOK__;m&&m.emit("effect:create",{effectFn:e});let b=!1;return()=>{if(b)return;b=!0;let f=Qe.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(f)try{f.emit("effect:destroy",{effectFn:e})}catch{}try{i()}catch(p){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",p)}try{c()}catch(p){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",p)}}}function De(e,t){$(typeof e=="function","derived: argument must be a getter function.");let n=t?.name,r=t?.equals,o={};o._d=!1,o._g=e;let i=()=>{o._d||(o._d=!0)};i._c=1,i._sig=o,S(()=>{let l=!0;try{o._v=e(),o._d=!1,l=!1}finally{l&&(o._d=!0)}},i);let s=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,a=!1;function c(){if(a)throw new Error(`[SibuJS] Circular dependency detected in derived${n?` "${n}"`:""}. A derived signal cannot read itself (directly or through a chain).`);if(_e){if(o._d){a=!0;let l=!0;try{Ie(()=>{o._v=e(),o._d=!1,l=!1},i)}finally{a=!1,l&&(o._d=!0)}}return o._v}if(re(o),o._d){let l=o._v;a=!0;let d=!0;try{Ie(()=>{let m=e();o._v=r&&o._v!==void 0&&r(o._v,m)?o._v:m,o._d=!1,d=!1},i)}finally{a=!1,d&&(o._d=!0)}s&&l!==o._v&&s.emit("computed:update",{signal:o,oldValue:l,newValue:o._v})}return o._v}return n&&(c.__name=n,o.__name=n),c.__signal=o,s&&s.emit("computed:create",{signal:o,name:n,getter:c}),c}function Lo(e,t){if($(typeof e=="function","watch: first argument must be a getter function."),$(typeof t=="function","watch: second argument must be a callback function."),de())return()=>{};let n,r=!0;return S(()=>{let s=e();if(r){n=s,r=!1;return}Object.is(s,n)||(t(s,n),n=s)})}function No(e){$(e!==null&&typeof e=="object"&&!Array.isArray(e),"store: argument must be a plain object. For arrays, use array() instead.");let t={};Object.keys(e).forEach(c=>{let[l,d]=C(e[c]);t[c]=[l,d]});let n=new Proxy({},{get(c,l){if(l in t){let d=t[l][0];return d()}},set(){throw new Error("[SibuJS store] Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),r=()=>{let c={};return Object.keys(t).forEach(l=>{c[l]=t[l][0]()}),c};return[n,{setState:c=>{let l=r(),d=typeof c=="function"?c(l):c;z(()=>{Object.entries(d).forEach(([m,b])=>{m in t&&t[m][1](b)})})},reset:()=>{z(()=>{Object.keys(e).forEach(c=>{let l=t[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 b=t[c][0]();if(m){d=b,m=!1;return}if(!Object.is(b,d)){let f=d;d=b,l(b,f)}})},getSnapshot:r}]}function Mo(e){let[t,n]=C(e);return{get current(){return t()},set current(r){n(r)}}}function Ro(e=[]){let[t,n]=C([...e]);return[t,{push(...o){n(i=>[...i,...o])},pop(){let o;return n(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return n(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){n(i=>[...o,...i])},splice(o,i=0,...s){let a=[];return n(c=>{let l=[...c];return a=l.splice(o,i,...s),l}),a},remove(o){n(i=>i.filter((s,a)=>a!==o))},removeWhere(o){n(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((a,c)=>c!==s)})},set(o){n([...o])},update(o,i){n(s=>s.map((a,c)=>c===o?i:a))},updateWhere(o,i){n(s=>s.map(a=>o(a)?i(a):a))},sort(o){n(i=>[...i].sort(o))},reverse(){n(o=>[...o].reverse())},filter(o){n(i=>i.filter(o))},map(o){n(i=>i.map(o))},clear(){n([])}}]}function $o(e=[]){let t=[...e],n=null,r={};function o(){n=null,ce(r)||Le(r)}function i(){if(re(r),n===null){let a=t.slice();n=Object.freeze(a)}return n}return[i,{push(...a){a.length!==0&&(t.push(...a),o())},pop(){if(t.length===0)return;let a=t.pop();return o(),a},shift(){if(t.length===0)return;let a=t.shift();return o(),a},unshift(...a){a.length!==0&&(t.unshift(...a),o())},splice(a,c=0,...l){let d=t.splice(a,c,...l);return(d.length>0||l.length>0)&&o(),d},remove(a){a<0||a>=t.length||(t.splice(a,1),o())},removeWhere(a){let c=t.findIndex(a);c!==-1&&(t.splice(c,1),o())},set(a){t=[...a],o()},update(a,c){a<0||a>=t.length||Object.is(t[a],c)||(t[a]=c,o())},updateWhere(a,c){let l=!1;for(let d=0;d<t.length;d++)if(a(t[d])){let m=c(t[d]);Object.is(t[d],m)||(t[d]=m,l=!0)}l&&o()},sort(a){t.length<=1||(t.sort(a),o())},reverse(){t.length<=1||(t.reverse(),o())},filter(a){let c=t.filter(a);c.length!==t.length&&(t=c,o())},map(a){let c=!1;for(let l=0;l<t.length;l++){let d=a(t[l],l);Object.is(t[l],d)||(t[l]=d,c=!0)}c&&o()},clear(){t.length!==0&&(t=[],o())}}]}function fe(e,t,n){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!="object")return!1;let r=e,o=t;if(r.constructor!==o.constructor)return!1;if(e instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp){let c=t;return e.source===c.source&&e.flags===c.flags}n||(n=new Map);let i=n.get(r);if(i?.has(o))return!0;if(i||(i=new Set,n.set(r,i)),i.add(o),e instanceof Map){let c=t;if(e.size!==c.size)return!1;for(let[l,d]of e)if(!c.has(l)||!fe(d,c.get(l),n))return!1;return!0}if(e instanceof Set){let c=t;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(t);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(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){let c=e,l=t;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(t)||e.length!==t.length?!1:e.every((c,l)=>fe(c,t[l],n));let s=Object.keys(r),a=Object.keys(o);return s.length!==a.length?!1:s.every(c=>fe(r[c],o[c],n))}function Ho(e){return C(e,{equals:(t,n)=>fe(t,n)})}function Oo(e,t,n){return[De(e,n),i=>{z(()=>t(i))}]}function Do(e,t){let[n,r]=C(t),[o,i]=C(!1),[s,a]=C(null),[c,l]=C(0),d=0;return O(()=>{c();let m=++d;z(()=>{i(!0),a(null)});let b;try{b=e()}catch(f){z(()=>{a(f),i(!1)});return}b.then(f=>{m===d&&z(()=>{r(f),i(!1)})},f=>{m===d&&z(()=>{a(f),i(!1)})})}),{value:n,loading:o,error:s,refresh:()=>l(m=>m+1)}}function nt(e,t){try{return e()}catch(n){w(`${t}: callback threw: ${n instanceof Error?n.message:String(n)}`);return}}function Xe(e,t,n){let r=nt(e,t);typeof r=="function"&&n&&v(n,r)}var pe=new WeakMap,Y=new WeakMap,q=new Set,j=new Set,me=null,Pe=0,Mi=256;function et(e){let t=pe.get(e);if(t){pe.delete(e),q.delete(e);for(let n of t)try{n()}catch{}}}function tt(e){Y.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Y.get(e);if(n){Y.delete(e),j.delete(e);for(let r of n)try{r()}catch{}}})}function Ri(e){if(q.size===0||e.nodeType!==1)return;let t=e;if(q.has(t)&&t.isConnected&&et(t),t.firstElementChild)for(let n of Array.from(q))n!==t&&n.isConnected&&t.contains(n)&&et(n)}function $i(e){if(j.size===0||e.nodeType!==1)return;let t=e;if(j.has(t)&&!t.isConnected&&tt(t),t.firstElementChild)for(let n of Array.from(j))n!==t&&!n.isConnected&&t.contains(n)&&tt(n)}function Hi(){if(q.size>0)for(let e of Array.from(q))e.isConnected&&et(e);if(j.size>0)for(let e of Array.from(j))e.isConnected||tt(e)}function Po(){me||typeof document>"u"||(me=new MutationObserver(e=>{for(let t of e)if(t.type==="childList"){if(t.addedNodes.length>0)for(let n=0;n<t.addedNodes.length;n++)Ri(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)$i(t.removedNodes[n])}Pe+=e.length,Pe>=Mi&&(Pe=0,Hi()),rt()}),me.observe(document.body,{childList:!0,subtree:!0}))}function rt(){me&&q.size===0&&j.size===0&&(me.disconnect(),me=null,Pe=0)}function Oi(e,t){let n=pe.get(e);return n||(n=[],pe.set(e,n)),n.push(t),q.add(e),Po(),()=>{let r=pe.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(pe.delete(e),q.delete(e))}rt()}}function Di(e,t){let n=Y.get(e);return n||(n=[],Y.set(e,n)),n.push(t),j.add(e),Po(),()=>{let r=Y.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Y.delete(e),j.delete(e))}rt()}}function ve(e,t){if(!(typeof document>"u"))if(t){let n=!1;if(v(t,()=>{n=!0}),t.isConnected){queueMicrotask(()=>{n||Xe(e,"onMount",t)});return}queueMicrotask(()=>{if(n)return;if(t.isConnected){Xe(e,"onMount",t);return}let r=Oi(t,()=>{n||Xe(e,"onMount",t)});v(t,r)})}else queueMicrotask(()=>{nt(e,"onMount")})}function zo(e,t){if(typeof document>"u")return;let n=!1,r=()=>{n||(n=!0,nt(e,"onUnmount"))};v(t,r);let o=()=>{if(n)return;let i=Di(t,r);v(t,i)};t.isConnected?o():ve(()=>{o()},t)}function Fo(e,t){v(t,e)}function Bo(e){let[t,n]=C(e);return{provide(o){let i=t();return n(o),()=>n(i)},use(){return t},get(){return t()},set(o){n(o)},withContext(o,i){let s=t();n(o);try{return i()}finally{n(s)}}}}function Io(e){let t=e();return E()&&queueMicrotask(()=>{try{e()}catch(n){console.warn("[SibuJS strict] second run threw:",n)}}),t}function qo(e){if(!E())return O(e);let t=O(e),n=null;return queueMicrotask(()=>{try{n=O(e)}catch(r){console.warn("[SibuJS strictEffect] second run threw:",r)}}),()=>{t(),n&&n()}}function jo(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}function Uo(e){let[t,n]=C(e()),r=!1,o=!1,i=t(),s=()=>{r=!1,!o&&n(i)},a=()=>{r||(r=!0,queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(s):s()}))},c=S(()=>{i=e(),a()}),l=(()=>t());return l.dispose=()=>{o||(o=!0,c())},l}var Vo=16;function Pi(e){let t=globalThis;if(typeof t.requestIdleCallback=="function"){t.requestIdleCallback(e,{timeout:Vo*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,Vo)}function Ko(){let[e,t]=C(!1);function n(r){t(!0),Pi(()=>{let o;try{o=r()}catch{t(!1);return}o&&typeof o.then=="function"?o.then(()=>t(!1),()=>t(!1)):t(!1)})}return{pending:e,start:n}}var ot="__sibuPendingError";function Wo(e,t){let n=()=>{try{return e.parentNode?(e.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:t}})),!0):!1}catch{return!1}};e.parentNode&&n()||queueMicrotask(()=>{n()||(e[ot]=t)})}function Te(e){let t=e,n=t[ot];if(n instanceof Error)return delete t[ot],n}function it(e){let t=null;return function(){if(t)return t();let r=T({class:"sibu-lazy"}),o=!1;return e().then(i=>{if(o)return;t=i.default;let s=t();r.replaceChildren(s)}).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));w(`[SibuJS] lazy() failed to load component: ${s.message}`),r.replaceChildren(T({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),Wo(r,s)}),r.appendChild(A("sibu-lazy-loading","Loading...")),v(r,()=>{o=!0}),r}}function st({nodes:e,fallback:t}){let n=T({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null;return v(n,()=>{o=!0,i&&(i.disconnect(),i=null)}),queueMicrotask(()=>{if(!o)try{let s=e();if(s.classList.contains("sibu-lazy")){if(!s.querySelector(".sibu-lazy-loading")){n.replaceChildren(s);return}i=new MutationObserver(()=>{if(o)return;s.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,n.replaceChildren(s))}),i.observe(s,{childList:!0,subtree:!0})}else n.replaceChildren(s)}catch(s){let a=s instanceof Error?s:new Error(String(s));w(`[SibuJS] Suspense nodes() threw: ${a.message}`),Wo(n,a)}}),n}var tc=E();function at(e){return e}var nc=1024*1024;var zi=E(),Fi=`
3
3
  .sibu-error-display {
4
4
  border: 1px solid var(--sibu-err-border, #e5484d);
5
5
  border-radius: 10px;
@@ -84,20 +84,21 @@
84
84
  font-weight: 600;
85
85
  }
86
86
  .sibu-error-display .sibu-err-copy-btn {
87
- background: transparent;
88
- border: 1px solid #3a3a4e;
87
+ background: rgba(0, 0, 0, 0.22);
88
+ border: 1px solid rgba(255, 255, 255, 0.15);
89
89
  border-radius: 4px;
90
- color: #a0a3b8;
90
+ color: rgba(255, 255, 255, 0.85);
91
91
  cursor: pointer;
92
92
  padding: 2px 10px;
93
- font-size: 0.95em;
93
+ font-size: 0.78em;
94
94
  font-family: inherit;
95
95
  transition: all 0.12s ease;
96
+ flex-shrink: 0;
96
97
  }
97
98
  .sibu-error-display .sibu-err-copy-btn:hover {
98
- background: #2a2a3e;
99
- color: #e5e7eb;
100
- border-color: #4a4a5e;
99
+ background: rgba(0, 0, 0, 0.35);
100
+ color: white;
101
+ border-color: rgba(255, 255, 255, 0.3);
101
102
  }
102
103
 
103
104
  .sibu-error-display .sibu-err-stack {
@@ -179,11 +180,11 @@
179
180
  border: 1px solid #3a3a4e;
180
181
  }
181
182
  .sibu-error-display .sibu-err-btn-reload:hover { background: #2a2b40; }
182
- `,Eo=!1;function ri(){if(Eo||typeof document>"u")return;let e=z({nodes:ni});document.head.appendChild(e),Eo=!0}function oi(e){let t=[],n=e.split(`
183
- `);for(let r of n){let o=r.trim(),i=o.match(/^at\s+(?:(.+?)\s+\((.+)\)|(.+))$/);if(i){t.push({fn:i[1]||"(anonymous)",loc:i[2]||i[3]||""});continue}let s=o.match(/^(.+?)@(.+)$/);s&&t.push({fn:s[1]||"(anonymous)",loc:s[2]||""})}return t}function wo(e){if(e instanceof Error){let t=e.code??e.name??"ERROR",n=e.message||"Unknown error",r=e.stack??"",o=oi(r),i=e.cause,s=i!=null?wo(i):null;return{code:t,message:n,stack:r,frames:o,cause:s}}return{code:"NON_ERROR",message:typeof e=="string"?e:JSON.stringify(e),stack:"",frames:[],cause:null}}function ii(e,t){let n=[];if(n.push(`[${e.code}] ${e.message}`),e.stack&&(n.push(""),n.push(e.stack)),e.cause&&(n.push(""),n.push("Caused by:"),n.push(` [${e.cause.code}] ${e.cause.message}`),e.cause.stack)){let r=e.cause.stack.split(`
184
- `).map(o=>` ${o}`).join(`
185
- `);n.push(r)}if(t&&Object.keys(t).length>0){n.push(""),n.push("Metadata:");for(let[r,o]of Object.entries(t))n.push(` ${r}: ${String(o)}`)}return n.push(""),n.push(`At: ${new Date().toISOString()}`),typeof navigator<"u"&&navigator.userAgent&&n.push(`UA: ${navigator.userAgent}`),n.join(`
186
- `)}function So(e){let t=e.map((n,r)=>h({class:"sibu-err-frame",nodes:[S({class:"sibu-err-line",nodes:String(r+1)}),S({class:"sibu-err-fn",nodes:n.fn}),S({class:"sibu-err-loc",nodes:` \u2014 ${n.loc}`})]}));return ve({class:"sibu-err-stack",nodes:t})}function Co(e){return e?[h({class:"sibu-err-cause-label",nodes:"Caused by"}),h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:`[${e.code}] ${e.message}`}),S({nodes:""})]}),e.frames.length>0?So(e.frames):h({class:"sibu-err-stack",nodes:"(no stack)"})]}),...Co(e.cause)]:[]}function si(e){let t=[];for(let[r,o]of Object.entries(e)){t.push(document.createElement("dt")),t[t.length-1].textContent=r;let i=document.createElement("dd");i.textContent=o==null?"(null)":String(o),t.push(i)}let n=document.createElement("dl");n.className="sibu-err-meta";for(let r of t)n.appendChild(r);return n}function Ce(e){ri();let t=e.severity??"error",n=wo(e.error),r=e.alwaysShowDetails??ti,o=e.title??n.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=w("Copy"),u=X({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let p=ii(n,e.metadata);typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(p).then(()=>{a("Copied!"),setTimeout(()=>a("Copy"),1500)},()=>{a("Copy failed"),setTimeout(()=>a("Copy"),1500)})}}}),l=h({class:"sibu-err-header",nodes:[Te({class:"sibu-err-icon",nodes:n.code}),xe({class:"sibu-err-title",nodes:o}),S({class:"sibu-err-timestamp",nodes:i})]}),d=[ye({class:"sibu-err-message",nodes:n.message})];r&&n.frames.length>0?d.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Stack Trace"}),u]}),So(n.frames)]})):r&&d.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Details"}),u]}),h({class:"sibu-err-stack",nodes:"(no stack available)"})]})),r&&d.push(...Co(n.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&d.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Metadata"})]}),si(e.metadata)]})),r&&typeof navigator<"u"&&navigator.userAgent&&d.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Environment"})]}),h({class:"sibu-err-meta",nodes:(()=>{let p=document.createElement("dl");p.className="sibu-err-meta";let b=[["User Agent",navigator.userAgent],["URL",typeof location<"u"?location.href:"(n/a)"],["Timestamp",new Date().toISOString()]];for(let[T,v]of b){let y=document.createElement("dt");y.textContent=T;let D=document.createElement("dd");D.textContent=v,p.appendChild(y),p.appendChild(D)}return p})()})]}));let f=[];e.onRetry&&f.push(X({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&f.push(X({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),f.length>0&&d.push(h({class:"sibu-err-actions",nodes:f}));let m=h({class:"sibu-err-body",nodes:d});return h({class:"sibu-error-display","data-severity":t,nodes:[l,m]})}var ai=`
183
+ `,Jo=!1;function Bi(){if(Jo||typeof document>"u")return;let e=K({nodes:Fi});document.head.appendChild(e),Jo=!0}function Ii(e){let t=[],n=e.split(`
184
+ `);for(let r of n){let o=r.trim(),i=o.match(/^at\s+(?:(.+?)\s+\((.+)\)|(.+))$/);if(i){t.push({fn:i[1]||"(anonymous)",loc:i[2]||i[3]||""});continue}let s=o.match(/^(.+?)@(.+)$/);s&&t.push({fn:s[1]||"(anonymous)",loc:s[2]||""})}return t}function Go(e){if(e instanceof Error){let t=e.code??e.name??"ERROR",n=e.message||"Unknown error",r=e.stack??"",o=Ii(r),i=e.cause,s=i!=null?Go(i):null;return{code:t,message:n,stack:r,frames:o,cause:s}}return{code:"NON_ERROR",message:typeof e=="string"?e:JSON.stringify(e),stack:"",frames:[],cause:null}}function qi(e,t,n){let r=[];r.push(n),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
+ `).map(s=>` ${s}`).join(`
186
+ `);r.push(i)}o=o.cause}if(t&&Object.keys(t).length>0){r.push(""),r.push("Metadata:");for(let[i,s]of Object.entries(t))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 Zo(e){let t=e.map((n,r)=>T({class:"sibu-err-frame",nodes:[A({class:"sibu-err-line",nodes:String(r+1)}),A({class:"sibu-err-fn",nodes:n.fn}),A({class:"sibu-err-loc",nodes:` \u2014 ${n.loc}`})]}));return He({class:"sibu-err-stack",nodes:t})}function Yo(e){return e?[T({class:"sibu-err-cause-label",nodes:"Caused by"}),T({class:"sibu-err-section",nodes:[T({class:"sibu-err-section-head",nodes:[A({nodes:`[${e.code}] ${e.message}`}),A({nodes:""})]}),e.frames.length>0?Zo(e.frames):T({class:"sibu-err-stack",nodes:"(no stack)"})]}),...Yo(e.cause)]:[]}function ji(e){let t=[];for(let[r,o]of Object.entries(e)){t.push(document.createElement("dt")),t[t.length-1].textContent=r;let i=document.createElement("dd");i.textContent=o==null?"(null)":String(o),t.push(i)}let n=document.createElement("dl");n.className="sibu-err-meta";for(let r of t)n.appendChild(r);return n}function ze(e){Bi();let t=e.severity??"error",n=Go(e.error),r=e.alwaysShowDetails??zi,o=e.title??n.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=C("Copy"),c=ae({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let f=qi(n,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=T({class:"sibu-err-header",nodes:[Oe({class:"sibu-err-icon",nodes:n.code}),$e({class:"sibu-err-title",nodes:o}),c,A({class:"sibu-err-timestamp",nodes:i})]}),d=[Re({class:"sibu-err-message",nodes:n.message})];r&&n.frames.length>0&&d.push(T({class:"sibu-err-section",nodes:[T({class:"sibu-err-section-head",nodes:[A({nodes:"Stack Trace"})]}),Zo(n.frames)]})),r&&d.push(...Yo(n.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&d.push(T({class:"sibu-err-section",nodes:[T({class:"sibu-err-section-head",nodes:[A({nodes:"Metadata"})]}),ji(e.metadata)]}));let m=[];e.onRetry&&m.push(ae({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&m.push(ae({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),m.length>0&&d.push(T({class:"sibu-err-actions",nodes:m}));let b=T({class:"sibu-err-body",nodes:d});return T({class:"sibu-error-display","data-severity":t,nodes:[l,b]})}var Vi=`
187
188
  .sibu-error-boundary {
188
189
  position: relative;
189
190
  }
@@ -337,7 +338,7 @@
337
338
  .sibu-error-fallback .sibu-error-btn-reload:hover {
338
339
  background: #3a3a4e;
339
340
  }
340
- `,Ao=!1;function ci(){if(!Ao&&typeof document<"u"){let e=z({nodes:ai});document.head.appendChild(e),Ao=!0}}var Ue=new WeakMap;function li(e,t,n){let r=Ue.get(e);r||(r=new Map,Ue.set(e,r));let o=t.message;return r.has(o)||r.set(o,e(t,n)),r.get(o)}function _o({nodes:e,fallback:t,onError:n,resetKeys:r}){ci();let[o,i]=w(null),s=()=>{t&&Ue.delete(t),i(null)};if(r&&r.length>0){let f=!1;P(()=>{for(let m of r)try{m()}catch{}if(!f){f=!0;return}o()!==null&&s()})}let a=f=>{let m=f instanceof Error?f:new Error(String(f));return i(m),n?.(m),m},u=(f,m)=>Ce({error:f,severity:"error",onRetry:m}),l=f=>{let m=t||u;try{return li(m,f,s)}catch(p){let b=p instanceof Error?p:new Error(String(p));return queueMicrotask(()=>{d.parentNode&&d.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:b}}))}),document.createComment("error-boundary-failed")}},d=h({class:"sibu-error-boundary",nodes:()=>{let f=o();if(f)return l(f);try{let m=e();if(m&&typeof m.then=="function"){let p=h({class:"sibu-error-async"});return p.appendChild(S({class:"sibu-lazy-loading",nodes:"Loading..."})),m.then(b=>{p.replaceChildren(b)}).catch(b=>{let T=a(b);p.replaceChildren(l(T))}),p}return m}catch(m){let p=a(m);return l(p)}}});return d.addEventListener("sibu:error-propagate",f=>{if(o())return;f.stopPropagation();let p=f.detail?.error;p&&a(p)}),d}var ui=`
341
+ `,Qo=!1;function Ui(){if(!Qo&&typeof document<"u"){let e=K({nodes:Vi});document.head.appendChild(e),Qo=!0}}var Ki=50,ct=new WeakMap;function Wi(e,t,n){let r=ct.get(e);r||(r=new Map,ct.set(e,r));let o=t.message,i=r.get(o);if(i)r.delete(o),r.set(o,i);else if(i=()=>e(t,n),r.set(o,i),r.size>Ki){let s=r.keys().next().value;s!==void 0&&r.delete(s)}return i()}function Xo({nodes:e,fallback:t,onError:n,resetKeys:r}){Ui();let[o,i]=C(null),s=()=>{if(t){let f=o(),p=ct.get(t);f&&p&&p.delete(f.message)}i(null)},a=null;if(r&&r.length>0){let f=!1;a=O(()=>{for(let p of r)try{p()}catch(g){typeof console<"u"&&console.warn("[SibuJS ErrorBoundary] resetKeys getter threw:",g)}if(!f){f=!0;return}o()!==null&&s()})}let c=f=>{let p=f instanceof Error?f:new Error(String(f));if(i(p),n)try{n(p)}catch(g){typeof console<"u"&&console.error("[SibuJS ErrorBoundary] onError callback threw:",g)}return p},l=(f,p)=>ze({error:f,severity:"error",onRetry:p}),d=f=>{let p=t||l;try{return Wi(p,f,s)}catch(g){let x=g instanceof Error?g:new Error(String(g));return queueMicrotask(()=>{m.parentNode&&m.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:x}}))}),document.createComment("error-boundary-failed")}},m=T({class:"sibu-error-boundary",nodes:()=>{let f=o();if(f)return d(f);try{let p=e();if(p&&typeof p.then=="function"){let g=T({class:"sibu-error-async"});return g.appendChild(A({class:"sibu-lazy-loading",nodes:"Loading..."})),p.then(x=>{g.replaceChildren(x)}).catch(x=>{let y=c(x);g.replaceChildren(d(y))}),g}return p}catch(p){let g=c(p);return d(g)}}}),b=f=>{if(o())return;f.stopPropagation();let g=f.detail?.error;g&&c(g)};return m.addEventListener("sibu:error-propagate",b),ve(()=>{let f=document.createTreeWalker(m,NodeFilter.SHOW_ELEMENT),p=[],g=f.currentNode;for(;g;){let x=Te(g);x&&p.push(x),g=f.nextNode()}if(p.length===1)c(p[0]);else if(p.length>1){let x=globalThis.AggregateError;c(x?new x(p,`${p.length} pre-mount errors caught by ErrorBoundary`):new Error(p.map(y=>y.message).join("; ")))}},m),v(m,()=>{a&&a(),m.removeEventListener("sibu:error-propagate",b)}),m}var Ji=`
341
342
  @keyframes sibu-spin {
342
343
  to { transform: rotate(360deg); }
343
344
  }
@@ -390,4 +391,4 @@
390
391
  .sibu-loading-lg .sibu-loading-spinner { width: 40px; height: 40px; border-width: 4px; }
391
392
  .sibu-loading-lg .sibu-loading-dot { width: 12px; height: 12px; }
392
393
  .sibu-loading-lg .sibu-loading-dots { gap: 6px; }
393
- `,No=!1;function di(){!No&&typeof document<"u"&&(document.head.appendChild(z({nodes:ui})),No=!0)}function Lo(e={}){di();let{text:t,variant:n="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return n==="dots"?h({class:`sibu-loading${o}`,nodes:[h({class:"sibu-loading-dots",nodes:[S({class:"sibu-loading-dot"}),S({class:"sibu-loading-dot"}),S({class:"sibu-loading-dot"})]}),t?S({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)}):h({class:`sibu-loading${o}`,nodes:[h({class:"sibu-loading-spinner"}),t?S({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)})}typeof window<"u"&&(window.Sibu=Ve);return Bo(pi);})();
394
+ `,ei=!1;function Gi(){!ei&&typeof document<"u"&&(document.head.appendChild(K({nodes:Ji})),ei=!0)}function ti(e={}){Gi();let{text:t,variant:n="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return n==="dots"?T({class:`sibu-loading${o}`,nodes:[T({class:"sibu-loading-dots",nodes:[A({class:"sibu-loading-dot"}),A({class:"sibu-loading-dot"}),A({class:"sibu-loading-dot"})]}),t?A({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)}):T({class:`sibu-loading${o}`,nodes:[T({class:"sibu-loading-spinner"}),t?A({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)})}typeof window<"u"&&(window.Sibu=lt);return ui(Zi);})();
@@ -0,0 +1,65 @@
1
+ // src/core/ssr-context.ts
2
+ var als = null;
3
+ try {
4
+ if (typeof process !== "undefined" && process.versions && process.versions.node) {
5
+ const req = Function("return typeof require==='function'?require:null")();
6
+ if (req) {
7
+ const mod = req("node:async_hooks");
8
+ als = new mod.AsyncLocalStorage();
9
+ }
10
+ }
11
+ } catch {
12
+ als = null;
13
+ }
14
+ var fallbackStore = { ssr: false, suspenseIdCounter: 0 };
15
+ function getSSRStore() {
16
+ if (als) {
17
+ const s = als.getStore();
18
+ if (s) return s;
19
+ }
20
+ return fallbackStore;
21
+ }
22
+ function isSSR() {
23
+ return getSSRStore().ssr;
24
+ }
25
+ function enableSSR() {
26
+ getSSRStore().ssr = true;
27
+ }
28
+ function disableSSR() {
29
+ getSSRStore().ssr = false;
30
+ }
31
+ function runInSSRContext(fn) {
32
+ const store = { ssr: true, suspenseIdCounter: 0 };
33
+ if (als) {
34
+ return als.run(store, fn);
35
+ }
36
+ const prevSSR = fallbackStore.ssr;
37
+ const prevCounter = fallbackStore.suspenseIdCounter;
38
+ fallbackStore.ssr = true;
39
+ fallbackStore.suspenseIdCounter = 0;
40
+ try {
41
+ return fn();
42
+ } finally {
43
+ fallbackStore.ssr = prevSSR;
44
+ fallbackStore.suspenseIdCounter = prevCounter;
45
+ }
46
+ }
47
+ function withSSR(fn) {
48
+ const store = getSSRStore();
49
+ const wasSSR = store.ssr;
50
+ store.ssr = true;
51
+ try {
52
+ return fn();
53
+ } finally {
54
+ if (!wasSSR) store.ssr = false;
55
+ }
56
+ }
57
+
58
+ export {
59
+ getSSRStore,
60
+ isSSR,
61
+ enableSSR,
62
+ disableSSR,
63
+ runInSSRContext,
64
+ withSSR
65
+ };
@@ -0,0 +1,80 @@
1
+ import {
2
+ devWarn,
3
+ isDev
4
+ } from "./chunk-LMLD24FC.js";
5
+
6
+ // src/core/rendering/dispose.ts
7
+ var elementDisposers = /* @__PURE__ */ new WeakMap();
8
+ var _isDev = isDev();
9
+ var activeBindingCount = 0;
10
+ function registerDisposer(node, teardown) {
11
+ let disposers = elementDisposers.get(node);
12
+ if (!disposers) {
13
+ disposers = [];
14
+ elementDisposers.set(node, disposers);
15
+ }
16
+ disposers.push(teardown);
17
+ if (_isDev) activeBindingCount++;
18
+ }
19
+ function dispose(node) {
20
+ const stack = [node];
21
+ const order = [];
22
+ while (stack.length > 0) {
23
+ const current = stack.pop();
24
+ order.push(current);
25
+ const children = Array.from(current.childNodes);
26
+ for (let i = 0; i < children.length; i++) {
27
+ stack.push(children[i]);
28
+ }
29
+ }
30
+ for (let i = order.length - 1; i >= 0; i--) {
31
+ const current = order[i];
32
+ const disposers = elementDisposers.get(current);
33
+ if (disposers) {
34
+ const snapshot = disposers.slice();
35
+ elementDisposers.delete(current);
36
+ if (_isDev) activeBindingCount -= snapshot.length;
37
+ for (const d of snapshot) {
38
+ try {
39
+ d();
40
+ } catch (err) {
41
+ if (_isDev && typeof console !== "undefined") {
42
+ console.warn("[SibuJS] Disposer threw during cleanup:", err);
43
+ }
44
+ }
45
+ }
46
+ let extraPasses = 0;
47
+ while (extraPasses++ < 8) {
48
+ const added = elementDisposers.get(current);
49
+ if (!added || added.length === 0) break;
50
+ const moreSnapshot = added.slice();
51
+ elementDisposers.delete(current);
52
+ if (_isDev) activeBindingCount -= moreSnapshot.length;
53
+ for (const d of moreSnapshot) {
54
+ try {
55
+ d();
56
+ } catch (err) {
57
+ if (_isDev && typeof console !== "undefined") {
58
+ console.warn("[SibuJS] Disposer threw during cleanup:", err);
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ function checkLeaks(warnThreshold = 0) {
67
+ if (!_isDev) return 0;
68
+ if (warnThreshold > 0 && activeBindingCount > warnThreshold) {
69
+ devWarn(
70
+ `checkLeaks: ${activeBindingCount} active DOM bindings detected. Expected \u2264${warnThreshold}. This may indicate a component was removed from the DOM without calling dispose().`
71
+ );
72
+ }
73
+ return activeBindingCount;
74
+ }
75
+
76
+ export {
77
+ registerDisposer,
78
+ dispose,
79
+ checkLeaks
80
+ };
@@ -0,0 +1,125 @@
1
+ // src/plugins/plugin.ts
2
+ function createPluginRegistry() {
3
+ const installedPlugins = /* @__PURE__ */ new Set();
4
+ const hooks = { init: [], mount: [], unmount: [], error: [] };
5
+ const provided = /* @__PURE__ */ new Map();
6
+ const registry = {
7
+ installedPlugins,
8
+ hooks,
9
+ provided,
10
+ plugin(p, options) {
11
+ if (installedPlugins.has(p.name)) {
12
+ console.warn(`[Plugin] "${p.name}" is already installed.`);
13
+ return;
14
+ }
15
+ const ctx = {
16
+ onInit: (cb) => hooks.init.push(cb),
17
+ onMount: (cb) => hooks.mount.push(cb),
18
+ onUnmount: (cb) => hooks.unmount.push(cb),
19
+ onError: (cb) => hooks.error.push(cb),
20
+ provide: (key, value) => provided.set(key, value)
21
+ };
22
+ const initHooksBefore = hooks.init.length;
23
+ p.install(ctx, options);
24
+ installedPlugins.add(p.name);
25
+ const justAdded = hooks.init.slice(initHooksBefore);
26
+ for (const cb of justAdded) {
27
+ try {
28
+ cb();
29
+ } catch (e) {
30
+ console.error(`[Plugin] "${p.name}" init error:`, e);
31
+ }
32
+ }
33
+ },
34
+ inject(key, defaultValue) {
35
+ if (provided.has(key)) return provided.get(key);
36
+ if (defaultValue !== void 0) return defaultValue;
37
+ throw new Error(`[Plugin] No provider found for key "${key}"`);
38
+ },
39
+ triggerMount(element) {
40
+ const snapshot = hooks.mount.slice();
41
+ for (const hook of snapshot) {
42
+ try {
43
+ hook(element);
44
+ } catch (e) {
45
+ console.error("[Plugin] Mount hook error:", e);
46
+ }
47
+ }
48
+ },
49
+ triggerUnmount(element) {
50
+ const snapshot = hooks.unmount.slice();
51
+ for (const hook of snapshot) {
52
+ try {
53
+ hook(element);
54
+ } catch (e) {
55
+ console.error("[Plugin] Unmount hook error:", e);
56
+ }
57
+ }
58
+ },
59
+ triggerError(error) {
60
+ const snapshot = hooks.error.slice();
61
+ for (const hook of snapshot) {
62
+ try {
63
+ hook(error);
64
+ } catch (e) {
65
+ console.error("[Plugin] Error hook error:", e);
66
+ }
67
+ }
68
+ },
69
+ reset() {
70
+ installedPlugins.clear();
71
+ hooks.init.length = 0;
72
+ hooks.mount.length = 0;
73
+ hooks.unmount.length = 0;
74
+ hooks.error.length = 0;
75
+ provided.clear();
76
+ }
77
+ };
78
+ return registry;
79
+ }
80
+ var defaultRegistry = createPluginRegistry();
81
+ var defaultRegistryTouched = false;
82
+ function createPlugin(name, install) {
83
+ return { name, install };
84
+ }
85
+ function plugin(plugin2, options) {
86
+ defaultRegistryTouched = true;
87
+ defaultRegistry.plugin(plugin2, options);
88
+ }
89
+ function inject(key, defaultValue) {
90
+ return defaultRegistry.inject(key, defaultValue);
91
+ }
92
+ function triggerPluginMount(element) {
93
+ defaultRegistry.triggerMount(element);
94
+ }
95
+ function triggerPluginUnmount(element) {
96
+ defaultRegistry.triggerUnmount(element);
97
+ }
98
+ function triggerPluginError(error) {
99
+ defaultRegistry.triggerError(error);
100
+ }
101
+ function resetPlugins() {
102
+ defaultRegistry.reset();
103
+ defaultRegistryTouched = false;
104
+ }
105
+ function setDefaultPluginRegistry(registry) {
106
+ if (defaultRegistryTouched && defaultRegistry.installedPlugins.size > 0) {
107
+ console.warn(
108
+ "[Plugin] Replacing default plugin registry while plugins are already installed on the singleton. This may indicate mixed singleton/registry usage."
109
+ );
110
+ }
111
+ defaultRegistry = registry;
112
+ defaultRegistryTouched = true;
113
+ }
114
+
115
+ export {
116
+ createPluginRegistry,
117
+ createPlugin,
118
+ plugin,
119
+ inject,
120
+ triggerPluginMount,
121
+ triggerPluginUnmount,
122
+ triggerPluginError,
123
+ resetPlugins,
124
+ setDefaultPluginRegistry
125
+ };