sibujs 3.3.2 → 3.3.3

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 (73) hide show
  1. package/dist/browser.cjs +21 -4
  2. package/dist/browser.js +4 -4
  3. package/dist/build.cjs +10 -3
  4. package/dist/build.js +11 -11
  5. package/dist/cdn.global.js +7 -7
  6. package/dist/{chunk-N5TQVEKE.js → chunk-23VT3KZB.js} +1 -1
  7. package/dist/{chunk-IQJ36UTJ.js → chunk-25LY5SRH.js} +31 -24
  8. package/dist/{chunk-6TCOWMGY.js → chunk-5K6RVA2S.js} +1 -1
  9. package/dist/{chunk-YUBEOWII.js → chunk-5Y34FWED.js} +16 -5
  10. package/dist/chunk-7ZHH77QA.js +9 -0
  11. package/dist/{chunk-G6N3LMO2.js → chunk-F3HO2MP7.js} +1 -1
  12. package/dist/{chunk-FJIRS3FM.js → chunk-F7HW2NI5.js} +1 -3
  13. package/dist/{chunk-AEOLHSSQ.js → chunk-IEYFHN5V.js} +72 -25
  14. package/dist/{chunk-FJO2ZL4Q.js → chunk-IQN5W7GE.js} +73 -16
  15. package/dist/{chunk-JCQG2I2G.js → chunk-IWFE4AHO.js} +1 -1
  16. package/dist/{chunk-2ARSB7NG.js → chunk-MYXEBADX.js} +27 -20
  17. package/dist/{chunk-A7CZH3GN.js → chunk-QCQQ2N5H.js} +41 -20
  18. package/dist/{chunk-Q46YIQYW.js → chunk-QTOOBABV.js} +22 -5
  19. package/dist/{chunk-ZEUP4TUD.js → chunk-RZKGMHH4.js} +6 -6
  20. package/dist/{chunk-QCFBIVIQ.js → chunk-SBPUXWCE.js} +1 -1
  21. package/dist/{chunk-RLTFJYDN.js → chunk-TBDTU7UO.js} +1 -1
  22. package/dist/{chunk-P7C7SEJV.js → chunk-TVCCXPU2.js} +5 -5
  23. package/dist/{chunk-4NJEAPLI.js → chunk-UOMYIAG6.js} +1 -1
  24. package/dist/{chunk-655B7MMR.js → chunk-WFUUT6TG.js} +15 -8
  25. package/dist/{chunk-YUR5SX7F.js → chunk-WTFMV2RU.js} +70 -59
  26. package/dist/{chunk-3JHCYHWN.js → chunk-WWV3SJ3L.js} +19 -13
  27. package/dist/{chunk-62V653X2.js → chunk-Y35NQNLG.js} +79 -44
  28. package/dist/{chunk-5VH3GIDX.js → chunk-ZXCZWMZT.js} +1 -1
  29. package/dist/data.cjs +16 -2
  30. package/dist/data.js +7 -6
  31. package/dist/devtools.cjs +71 -21
  32. package/dist/devtools.d.cts +12 -5
  33. package/dist/devtools.d.ts +12 -5
  34. package/dist/devtools.js +6 -5
  35. package/dist/ecosystem.cjs +11 -2
  36. package/dist/ecosystem.js +10 -9
  37. package/dist/extras.cjs +454 -250
  38. package/dist/extras.d.cts +1 -1
  39. package/dist/extras.d.ts +1 -1
  40. package/dist/extras.js +26 -22
  41. package/dist/index.cjs +10 -3
  42. package/dist/index.d.cts +4 -1
  43. package/dist/index.d.ts +4 -1
  44. package/dist/index.js +19 -19
  45. package/dist/motion.cjs +223 -204
  46. package/dist/motion.d.cts +8 -1
  47. package/dist/motion.d.ts +8 -1
  48. package/dist/motion.js +6 -3
  49. package/dist/patterns.cjs +13 -6
  50. package/dist/patterns.d.cts +4 -1
  51. package/dist/patterns.d.ts +4 -1
  52. package/dist/patterns.js +5 -5
  53. package/dist/performance.cjs +70 -56
  54. package/dist/performance.js +6 -5
  55. package/dist/plugins.cjs +98 -42
  56. package/dist/plugins.d.cts +2 -1
  57. package/dist/plugins.d.ts +2 -1
  58. package/dist/plugins.js +90 -37
  59. package/dist/ssr.cjs +112 -91
  60. package/dist/ssr.d.cts +8 -1
  61. package/dist/ssr.d.ts +8 -1
  62. package/dist/ssr.js +9 -8
  63. package/dist/testing.cjs +18 -4
  64. package/dist/testing.js +18 -7
  65. package/dist/ui.cjs +322 -281
  66. package/dist/ui.d.cts +0 -20
  67. package/dist/ui.d.ts +0 -20
  68. package/dist/ui.js +28 -22
  69. package/dist/widgets.cjs +75 -13
  70. package/dist/widgets.d.cts +6 -1
  71. package/dist/widgets.d.ts +6 -1
  72. package/dist/widgets.js +7 -6
  73. package/package.json +1 -1
package/dist/browser.cjs CHANGED
@@ -497,7 +497,7 @@ function forEachSubscriber(signal2, visit) {
497
497
 
498
498
  // src/reactivity/track.ts
499
499
  var _isDev3 = isDev();
500
- var _runtimeVersion = true ? "3.3.2" : "dev";
500
+ var _runtimeVersion = true ? "3.3.3" : "dev";
501
501
  var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
502
502
  function resolveReactiveApi() {
503
503
  const g = globalThis;
@@ -1013,7 +1013,7 @@ function battery() {
1013
1013
  let disposed = false;
1014
1014
  if (typeof navigator !== "undefined" && "getBattery" in navigator) {
1015
1015
  setSupported(true);
1016
- navigator.getBattery().then((bm) => {
1016
+ const batteryPromise = navigator.getBattery().then((bm) => {
1017
1017
  if (disposed) return;
1018
1018
  battery2 = bm;
1019
1019
  batch(() => {
@@ -1031,6 +1031,9 @@ function battery() {
1031
1031
  bm.addEventListener("chargingtimechange", onChargingTimeChange);
1032
1032
  bm.addEventListener("dischargingtimechange", onDischargingTimeChange);
1033
1033
  });
1034
+ batteryPromise.catch(() => {
1035
+ if (!disposed) setSupported(false);
1036
+ });
1034
1037
  }
1035
1038
  function dispose() {
1036
1039
  disposed = true;
@@ -1588,9 +1591,17 @@ function wakeLock() {
1588
1591
  }
1589
1592
  const api = navigator.wakeLock;
1590
1593
  let sentinel = null;
1594
+ let disposed = false;
1591
1595
  async function request() {
1596
+ if (disposed) return;
1592
1597
  try {
1593
- sentinel = await api.request("screen");
1598
+ const s = await api.request("screen");
1599
+ if (disposed) {
1600
+ s.release().catch(() => {
1601
+ });
1602
+ return;
1603
+ }
1604
+ sentinel = s;
1594
1605
  setActive(true);
1595
1606
  sentinel.addEventListener("release", () => {
1596
1607
  setActive(false);
@@ -1617,6 +1628,7 @@ function wakeLock() {
1617
1628
  };
1618
1629
  document.addEventListener("visibilitychange", onVisibility);
1619
1630
  function dispose() {
1631
+ disposed = true;
1620
1632
  document.removeEventListener("visibilitychange", onVisibility);
1621
1633
  release().catch((err) => {
1622
1634
  if (typeof console !== "undefined") {
@@ -1648,6 +1660,7 @@ function animationFrame(options = {}) {
1648
1660
  let id = null;
1649
1661
  let prev = -1;
1650
1662
  let start = -1;
1663
+ let disposed = false;
1651
1664
  const minFrameMs = options.fpsLimit ? 1e3 / options.fpsLimit : 0;
1652
1665
  const step = (now) => {
1653
1666
  if (start < 0) start = now;
@@ -1661,7 +1674,7 @@ function animationFrame(options = {}) {
1661
1674
  id = requestAnimationFrame(step);
1662
1675
  };
1663
1676
  function resume() {
1664
- if (id !== null) return;
1677
+ if (disposed || id !== null) return;
1665
1678
  setRunning(true);
1666
1679
  id = requestAnimationFrame(step);
1667
1680
  }
@@ -1675,6 +1688,7 @@ function animationFrame(options = {}) {
1675
1688
  start = -1;
1676
1689
  }
1677
1690
  function dispose() {
1691
+ disposed = true;
1678
1692
  pause();
1679
1693
  }
1680
1694
  if (options.immediate !== false) resume();
@@ -1733,7 +1747,9 @@ function bounds(target) {
1733
1747
  }
1734
1748
  };
1735
1749
  }
1750
+ let disposed = false;
1736
1751
  function refresh() {
1752
+ if (disposed) return;
1737
1753
  setRect(readRect(target));
1738
1754
  }
1739
1755
  refresh();
@@ -1745,6 +1761,7 @@ function bounds(target) {
1745
1761
  const onScroll = () => refresh();
1746
1762
  window.addEventListener("scroll", onScroll, { passive: true, capture: true });
1747
1763
  function dispose() {
1764
+ disposed = true;
1748
1765
  resizeObserver?.disconnect();
1749
1766
  window.removeEventListener("scroll", onScroll, { capture: true });
1750
1767
  }
package/dist/browser.js CHANGED
@@ -35,12 +35,12 @@ import {
35
35
  visibility,
36
36
  wakeLock,
37
37
  windowSize
38
- } from "./chunk-Q46YIQYW.js";
38
+ } from "./chunk-QTOOBABV.js";
39
39
  import "./chunk-H3SRKIYX.js";
40
- import "./chunk-N5TQVEKE.js";
40
+ import "./chunk-23VT3KZB.js";
41
41
  import "./chunk-S3NFJO6L.js";
42
- import "./chunk-JCQG2I2G.js";
43
- import "./chunk-4NJEAPLI.js";
42
+ import "./chunk-IWFE4AHO.js";
43
+ import "./chunk-UOMYIAG6.js";
44
44
  import "./chunk-COY6PUD2.js";
45
45
  export {
46
46
  animationFrame,
package/dist/build.cjs CHANGED
@@ -1793,7 +1793,7 @@ function forEachSubscriber(signal2, visit) {
1793
1793
 
1794
1794
  // src/reactivity/track.ts
1795
1795
  var _isDev3 = isDev();
1796
- var _runtimeVersion = true ? "3.3.2" : "dev";
1796
+ var _runtimeVersion = true ? "3.3.3" : "dev";
1797
1797
  var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
1798
1798
  function resolveReactiveApi() {
1799
1799
  const g2 = globalThis;
@@ -4888,7 +4888,6 @@ function trustHTML(html3) {
4888
4888
  var DEFAULT_MAX_SSR_BYTES = 1024 * 1024;
4889
4889
 
4890
4890
  // src/components/ErrorDisplay.ts
4891
- var _isDev12 = isDev();
4892
4891
  var STYLES = `
4893
4892
  .sibu-error-display {
4894
4893
  border: 1px solid var(--sibu-err-border, #e5484d);
@@ -5199,7 +5198,7 @@ function ErrorDisplay(props) {
5199
5198
  injectStyles();
5200
5199
  const severity = props.severity ?? "error";
5201
5200
  const normalized = normalizeError(props.error);
5202
- const showDetails = props.alwaysShowDetails ?? _isDev12;
5201
+ const showDetails = props.alwaysShowDetails ?? isDev();
5203
5202
  const headline = props.title ?? normalized.message;
5204
5203
  const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace("T", " ").slice(0, 19);
5205
5204
  const [copyLabel, setCopyLabel] = signal("Copy");
@@ -5686,6 +5685,11 @@ function Loading(props = {}) {
5686
5685
  if (variant === "dots") {
5687
5686
  return div({
5688
5687
  class: `sibu-loading${sizeClass}`,
5688
+ role: "status",
5689
+ "aria-live": "polite",
5690
+ // When there's no visible text, give the live region an accessible name
5691
+ // so it isn't announced as an empty status.
5692
+ "aria-label": text2 ? void 0 : "Loading",
5689
5693
  nodes: [
5690
5694
  div({
5691
5695
  class: "sibu-loading-dots",
@@ -5701,6 +5705,9 @@ function Loading(props = {}) {
5701
5705
  }
5702
5706
  return div({
5703
5707
  class: `sibu-loading${sizeClass}`,
5708
+ role: "status",
5709
+ "aria-live": "polite",
5710
+ "aria-label": text2 ? void 0 : "Loading",
5704
5711
  nodes: [
5705
5712
  div({ class: "sibu-loading-spinner" }),
5706
5713
  text2 ? span({ class: "sibu-loading-text", nodes: text2 }) : null
package/dist/build.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  index_exports
3
- } from "./chunk-2ARSB7NG.js";
3
+ } from "./chunk-MYXEBADX.js";
4
+ import "./chunk-5K6RVA2S.js";
5
+ import "./chunk-TBDTU7UO.js";
4
6
  import "./chunk-CCSJMTRN.js";
5
- import "./chunk-6TCOWMGY.js";
6
- import "./chunk-RLTFJYDN.js";
7
7
  import "./chunk-EX77FXTT.js";
8
- import "./chunk-5VH3GIDX.js";
9
- import "./chunk-ZEUP4TUD.js";
10
- import "./chunk-QCFBIVIQ.js";
11
- import "./chunk-G6N3LMO2.js";
12
- import "./chunk-5VGSK6D2.js";
8
+ import "./chunk-ZXCZWMZT.js";
9
+ import "./chunk-RZKGMHH4.js";
10
+ import "./chunk-SBPUXWCE.js";
11
+ import "./chunk-F3HO2MP7.js";
13
12
  import "./chunk-L3GAGWCC.js";
14
- import "./chunk-N5TQVEKE.js";
13
+ import "./chunk-23VT3KZB.js";
15
14
  import "./chunk-S3NFJO6L.js";
16
- import "./chunk-JCQG2I2G.js";
17
- import "./chunk-4NJEAPLI.js";
15
+ import "./chunk-5VGSK6D2.js";
16
+ import "./chunk-IWFE4AHO.js";
17
+ import "./chunk-UOMYIAG6.js";
18
18
  import "./chunk-COY6PUD2.js";
19
19
 
20
20
  // src/build/compileTemplates.ts
@@ -1,5 +1,5 @@
1
- "use strict";var Sibu=(()=>{var qe=Object.defineProperty;var Gi=Object.getOwnPropertyDescriptor;var Yi=Object.getOwnPropertyNames;var Qi=Object.prototype.hasOwnProperty;var qt=(e,n)=>{for(var t in n)qe(e,t,{get:n[t],enumerable:!0})},Zi=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of Yi(n))!Qi.call(e,o)&&o!==t&&qe(e,o,{get:()=>n[o],enumerable:!(r=Gi(n,o))||r.enumerable});return e};var Xi=e=>Zi(qe({},"__esModule",{value:!0}),e);var oa={};qt(oa,{DynamicComponent:()=>Jo,ErrorBoundary:()=>ji,ErrorDisplay:()=>je,Fragment:()=>Wo,KeepAlive:()=>Xo,Loading:()=>Wi,Portal:()=>Vo,SVG_NS:()=>_,Suspense:()=>Rt,__resetIdCounter:()=>si,a:()=>qn,abbr:()=>Wn,action:()=>ti,address:()=>An,area:()=>gr,array:()=>Si,article:()=>Sn,aside:()=>_n,asyncDerived:()=>wi,audio:()=>br,autoResize:()=>gt,b:()=>Vn,base:()=>lo,batch:()=>$,bdi:()=>Kn,bdo:()=>Un,bindDynamic:()=>nt,blockquote:()=>Hn,body:()=>yn,br:()=>Jn,button:()=>ue,canvas:()=>Lr,caption:()=>Or,catchError:()=>ni,catchErrorAsync:()=>ri,center:()=>Do,checkLeaks:()=>mn,circle:()=>mo,cite:()=>Gn,clickOutside:()=>ft,clipPath:()=>wo,code:()=>Be,col:()=>$r,colgroup:()=>Br,context:()=>Ni,copyOnClick:()=>mt,createId:()=>ii,customElement:()=>Bo,data:()=>Yn,datalist:()=>Vr,dd:()=>Dn,deepEqual:()=>le,deepSignal:()=>ki,defer:()=>Di,defs:()=>Eo,del:()=>Hr,derived:()=>Ie,details:()=>oo,dfn:()=>Qn,dialog:()=>io,disableSSR:()=>fi,dispose:()=>N,div:()=>E,dl:()=>On,dt:()=>$n,each:()=>jo,effect:()=>O,ellipse:()=>go,em:()=>Zn,embed:()=>Sr,enableSSR:()=>di,enqueueBatchedSignal:()=>J,fieldset:()=>Kr,figcaption:()=>Bn,figure:()=>Pn,font:()=>Oo,footer:()=>kn,form:()=>Ur,g:()=>bo,getAction:()=>dt,getRequestScopedCache:()=>li,getSSRStore:()=>ee,getSlot:()=>Go,h1:()=>Cn,h2:()=>Nn,h3:()=>Oe,h4:()=>Ln,h5:()=>Mn,h6:()=>Rn,head:()=>hn,header:()=>Tn,hr:()=>Fn,html:()=>st,i:()=>Xn,iframe:()=>Tr,img:()=>hr,input:()=>Jr,ins:()=>Dr,isBatching:()=>ci,isSSR:()=>te,kbd:()=>er,label:()=>Gr,lazy:()=>Mt,legend:()=>Yr,li:()=>In,line:()=>ho,linearGradient:()=>Co,link:()=>fo,longPress:()=>pt,main:()=>wn,map:()=>yr,mark:()=>tr,marker:()=>Ho,marquee:()=>$o,mask:()=>_o,match:()=>Zo,math:()=>Nr,menu:()=>so,meta:()=>po,meter:()=>Qr,mount:()=>Io,nav:()=>En,nextTick:()=>Ri,noscript:()=>Mr,object:()=>kr,ol:()=>zn,on:()=>hi,onCleanup:()=>Ci,onMount:()=>Se,onUnmount:()=>Ai,optgroup:()=>Zr,option:()=>Xr,output:()=>eo,p:()=>De,param:()=>Er,path:()=>yo,pattern:()=>Ao,picture:()=>wr,polygon:()=>xo,polyline:()=>vo,portal:()=>_r,pre:()=>$e,progress:()=>to,q:()=>nr,radialGradient:()=>No,reactiveArray:()=>Ti,rect:()=>So,ref:()=>vi,registerAction:()=>Q,registerComponent:()=>Ko,registerDisposer:()=>v,resolveComponent:()=>ut,retrack:()=>F,rp:()=>rr,rt:()=>or,ruby:()=>ir,runInSSRContext:()=>pi,s:()=>sr,samp:()=>ar,script:()=>Rr,section:()=>vn,select:()=>no,setGlobalErrorHandler:()=>oi,setMaxDrainIterations:()=>et,show:()=>Yo,signal:()=>A,slot:()=>co,small:()=>cr,source:()=>Ar,span:()=>L,stop:()=>Lo,store:()=>xi,strict:()=>Li,strictEffect:()=>Mi,strong:()=>ur,style:()=>U,sub:()=>lr,summary:()=>ao,sup:()=>dr,svg:()=>Cr,symbol:()=>Ro,table:()=>Pr,tagFactory:()=>l,takePendingError:()=>Te,tbody:()=>Fr,td:()=>Ir,template:()=>uo,text:()=>To,textarea:()=>ro,tfoot:()=>zr,th:()=>jr,thead:()=>qr,time:()=>fr,title:()=>xn,tr:()=>Wr,track:()=>xr,transition:()=>Oi,trapFocus:()=>bt,trustHTML:()=>Ht,tspan:()=>ko,u:()=>pr,ul:()=>jn,unregisterComponent:()=>Uo,untracked:()=>K,use:()=>Mo,var_:()=>mr,video:()=>vr,watch:()=>yi,when:()=>Qo,withSSR:()=>mi,writable:()=>Ei});var Ot={};qt(Ot,{DynamicComponent:()=>Jo,ErrorBoundary:()=>ji,ErrorDisplay:()=>je,Fragment:()=>Wo,KeepAlive:()=>Xo,Loading:()=>Wi,Portal:()=>Vo,SVG_NS:()=>_,Suspense:()=>Rt,__resetIdCounter:()=>si,a:()=>qn,abbr:()=>Wn,action:()=>ti,address:()=>An,area:()=>gr,array:()=>Si,article:()=>Sn,aside:()=>_n,asyncDerived:()=>wi,audio:()=>br,autoResize:()=>gt,b:()=>Vn,base:()=>lo,batch:()=>$,bdi:()=>Kn,bdo:()=>Un,bindDynamic:()=>nt,blockquote:()=>Hn,body:()=>yn,br:()=>Jn,button:()=>ue,canvas:()=>Lr,caption:()=>Or,catchError:()=>ni,catchErrorAsync:()=>ri,center:()=>Do,checkLeaks:()=>mn,circle:()=>mo,cite:()=>Gn,clickOutside:()=>ft,clipPath:()=>wo,code:()=>Be,col:()=>$r,colgroup:()=>Br,context:()=>Ni,copyOnClick:()=>mt,createId:()=>ii,customElement:()=>Bo,data:()=>Yn,datalist:()=>Vr,dd:()=>Dn,deepEqual:()=>le,deepSignal:()=>ki,defer:()=>Di,defs:()=>Eo,del:()=>Hr,derived:()=>Ie,details:()=>oo,dfn:()=>Qn,dialog:()=>io,disableSSR:()=>fi,dispose:()=>N,div:()=>E,dl:()=>On,dt:()=>$n,each:()=>jo,effect:()=>O,ellipse:()=>go,em:()=>Zn,embed:()=>Sr,enableSSR:()=>di,enqueueBatchedSignal:()=>J,fieldset:()=>Kr,figcaption:()=>Bn,figure:()=>Pn,font:()=>Oo,footer:()=>kn,form:()=>Ur,g:()=>bo,getAction:()=>dt,getRequestScopedCache:()=>li,getSSRStore:()=>ee,getSlot:()=>Go,h1:()=>Cn,h2:()=>Nn,h3:()=>Oe,h4:()=>Ln,h5:()=>Mn,h6:()=>Rn,head:()=>hn,header:()=>Tn,hr:()=>Fn,html:()=>st,i:()=>Xn,iframe:()=>Tr,img:()=>hr,input:()=>Jr,ins:()=>Dr,isBatching:()=>ci,isSSR:()=>te,kbd:()=>er,label:()=>Gr,lazy:()=>Mt,legend:()=>Yr,li:()=>In,line:()=>ho,linearGradient:()=>Co,link:()=>fo,longPress:()=>pt,main:()=>wn,map:()=>yr,mark:()=>tr,marker:()=>Ho,marquee:()=>$o,mask:()=>_o,match:()=>Zo,math:()=>Nr,menu:()=>so,meta:()=>po,meter:()=>Qr,mount:()=>Io,nav:()=>En,nextTick:()=>Ri,noscript:()=>Mr,object:()=>kr,ol:()=>zn,on:()=>hi,onCleanup:()=>Ci,onMount:()=>Se,onUnmount:()=>Ai,optgroup:()=>Zr,option:()=>Xr,output:()=>eo,p:()=>De,param:()=>Er,path:()=>yo,pattern:()=>Ao,picture:()=>wr,polygon:()=>xo,polyline:()=>vo,portal:()=>_r,pre:()=>$e,progress:()=>to,q:()=>nr,radialGradient:()=>No,reactiveArray:()=>Ti,rect:()=>So,ref:()=>vi,registerAction:()=>Q,registerComponent:()=>Ko,registerDisposer:()=>v,resolveComponent:()=>ut,retrack:()=>F,rp:()=>rr,rt:()=>or,ruby:()=>ir,runInSSRContext:()=>pi,s:()=>sr,samp:()=>ar,script:()=>Rr,section:()=>vn,select:()=>no,setGlobalErrorHandler:()=>oi,setMaxDrainIterations:()=>et,show:()=>Yo,signal:()=>A,slot:()=>co,small:()=>cr,source:()=>Ar,span:()=>L,stop:()=>Lo,store:()=>xi,strict:()=>Li,strictEffect:()=>Mi,strong:()=>ur,style:()=>U,sub:()=>lr,summary:()=>ao,sup:()=>dr,svg:()=>Cr,symbol:()=>Ro,table:()=>Pr,tagFactory:()=>l,takePendingError:()=>Te,tbody:()=>Fr,td:()=>Ir,template:()=>uo,text:()=>To,textarea:()=>ro,tfoot:()=>zr,th:()=>jr,thead:()=>qr,time:()=>fr,title:()=>xn,tr:()=>Wr,track:()=>xr,transition:()=>Oi,trapFocus:()=>bt,trustHTML:()=>Ht,tspan:()=>ko,u:()=>pr,ul:()=>jn,unregisterComponent:()=>Uo,untracked:()=>K,use:()=>Mo,var_:()=>mr,video:()=>vr,watch:()=>yi,when:()=>Qo,withSSR:()=>mi,writable:()=>Ei});function w(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var Wt=w();function D(e,n){if(Wt&&!e)throw new Error(`[SibuJS] ${n}`)}function k(e){Wt&&console.warn(`[SibuJS] ${e}`)}function es(e){return e.replace(/[\x00-\x20\x7f-\x9f]+/g,"")}function G(e){if(e.length<3)return!1;let n=e.toLowerCase();return n[0]==="o"&&n[1]==="n"&&n.charCodeAt(2)>=97&&n.charCodeAt(2)<=122}var ts=["http:","https:","mailto:","tel:","ftp:"];function me(e){let n=es(e).trim();if(!n)return"";let t=n.toLowerCase(),r=-1;for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);if(s===58){r=i;break}if(s===47||s===63||s===35)break}if(r===-1)return n;let o=t.slice(0,r+1);return/^[a-z][a-z0-9+.-]*:$/.test(o)&&ts.indexOf(o)===-1?"":n}function Ae(e){let n=e.split(","),t=[];for(let r=0;r<n.length;r++){let o=n[r].trim();if(!o)continue;let i=o.match(/^(\S+)(\s+.+)?$/);if(!i)continue;let s=me(i[1]);s&&t.push(i[2]?`${s}${i[2]}`:s)}return t.join(", ")}var ns=/[(:@\\]/;function We(e){if(!ns.test(e))return e;let t=e.replace(/\\([0-9a-fA-F]{1,6})\s?/g,(r,o)=>{let i=Number.parseInt(o,16);if(!Number.isFinite(i)||i<0||i>1114111)return"";try{return String.fromCodePoint(i)}catch{return""}}).toLowerCase().replace(/\s+/g,"");return t.includes("url(")||t.includes("expression(")||t.includes("javascript:")||t.includes("vbscript:")||t.includes("-moz-binding")||t.includes("behavior:")||t.includes("@import")||t.includes("image-set(")||t.includes("filter:progid")?"":e}var Vt=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data"]);function Ve(e){return Vt.has(e.toLowerCase())}function ge(e,n){let t=e.toLowerCase();return t==="srcset"?Ae(n):Vt.has(t)?me(n):n}var rs=w(),os=4096,Ke=[];function is(){return{sig:null,sub:null,epoch:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function ss(e,n,t){let r=Ke.pop();if(r)return r.sig=e,r.sub=n,r.epoch=t,r;let o=is();return o.sig=e,o.sub=n,o.epoch=t,o}function Kt(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Ke.length<os&&Ke.push(e)}function as(e,n){let t=e.subsHead??null;n.sigPrev=null,n.sigNext=t,t?t.sigPrev=n:e.subsTail=n,e.subsHead=n,e.__sc=(e.__sc??0)+1}function Ut(e){let n=e.sig;if(!n)return;let t=e.sigPrev,r=e.sigNext;t?t.sigNext=r:n.subsHead=r,r?r.sigPrev=t:n.subsTail=t,n.__sc=(n.__sc??1)-1,n.__activeNode===e&&(n.__activeNode=e.prevActive),n.__sc===0&&(n.subsHead=null,n.subsTail=null)}function cs(e,n){let t=e.depsTail??null;n.subPrev=t,n.subNext=null,t?t.subNext=n:e.depsHead=n,e.depsTail=n}function us(e){let n=e.sub;if(!n)return;let t=e.subPrev,r=e.subNext;t?t.subNext=r:n.depsHead=r,r?r.subPrev=t:n.depsTail=t}var P=null,Ue=null,W=0,V=[],B=new Set,ls=[];function ds(e){try{e()}catch(n){rs&&k(`Subscriber threw during notification: ${n instanceof Error?n.message:String(n)}`)}}var Ce=0,Ge=!1;function Ye(){Ce===0&&(Ue=P,P=null,Ge=!0),Ce++}function Qe(){Ce--,Ce===0&&(P=Ue,Ue=null,Ge=!1)}function Jt(){return Ge}function Gt(e){Ye();try{return e()}finally{Qe()}}var fs=0;function Ze(e,n){let t=P;P=n;let r=n,o=++fs;r._epoch=o,r._structDirty=!1;for(let i=r.depsHead??null;i!==null;i=i.subNext){let s=i.sig;i.prevActive=s.__activeNode??null,s.__activeNode=i}try{e()}finally{P=t;let i=r.depsHead??null;for(;i!==null;){let s=i.subNext,a=i.sig;a.__activeNode=i.prevActive,i.prevActive=null,i.epoch!==o&&(us(i),Ut(i),Kt(i)),i=s}}}function Yt(e,n){if(!n)return Xe(e);be(n);let t=P;P=n;try{e()}finally{P=t;let o=n;for(let i=o.depsHead??null;i!==null;i=i.subNext){let s=i.sig;s.__activeNode=i.prevActive,i.prevActive=null}}let r=n;return r._dispose??(r._dispose=()=>be(n))}function Xe(e){let n=()=>{let r=t;if(!(r._disposed||r._reentrant)){r._reentrant=!0;try{Ze(e,t)}finally{r._reentrant=!1}}},t=n;return t.depsHead=null,t.depsTail=null,t._epoch=0,t._structDirty=!1,t._runEpoch=0,t._runs=0,t._reentrant=!1,t._disposed=!1,n(),t._dispose??(t._dispose=()=>{t._disposed=!0,be(t)})}function Qt(e){if(!P)return;let n=P,t=e,r=n._epoch??0,o=t.__activeNode??null;if(o!==null&&o.sub===n){o.epoch=r;return}let i=ss(e,n,r);i.prevActive=o,t.__activeNode=i,cs(n,i),as(t,i),n._structDirty=!0}function be(e){let n=e,t=n.depsHead??null;for(n.depsHead=null,n.depsTail=null;t;){let r=t.subNext;Ut(t),Kt(t),t=r}}var Ne=50,Le=1e6,Me=0;function Zt(e){let n=Ne;return Number.isFinite(e)&&e>0&&(Ne=Math.floor(e)),n}function Xt(e){let n=Le;return Number.isFinite(e)&&e>0&&(Le=Math.floor(e)),n}function ps(e){let n=e;return n._runEpoch!==Me?(n._runEpoch=Me,n._runs=1,!1):(n._runs=(n._runs??0)+1,n._runs>Ne)}function ms(e){if(typeof console<"u"){let n=e.__name??"<unnamed>";console.error(`[SibuJS] subscriber "${n}" fired more than ${Ne} times \u2014 likely a write-reads-self cycle between effects/signals. Breaking to prevent infinite loop.`)}}function gs(){typeof console<"u"&&console.error(`[SibuJS] Notification drain exceeded ${Le} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`)}function en(){let e=0;for(;e<V.length;){if(e>=Le){gs();break}let n=V[e++];if(ps(n)){ms(n);break}B.delete(n),ds(n)}}function tn(){if(!(W>0)){W++,Me++;try{en()}finally{W--,W===0&&(V.length=0,B.clear())}}}function Je(e){e();let n=e._sig;if(!n)return;let t=ls,r=t.length;for(t.push(n);t.length>r;){let i=t.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?a._d||(a._d=!0,t.push(a)):s()}else B.has(s)||(B.add(s),V.push(s));i=i.sigNext}}}function nn(e){let t=e.subsHead??null;for(;t;){let r=t.sub;r&&(r._c?Je(r):B.has(r)||(B.add(r),V.push(r))),t=t.sigNext}}function rn(e){let t=e.subsHead;if(t){if(W>0){let r=t;for(;r;){let o=r.sub;o&&(o._c?Je(o):B.has(o)||(B.add(o),V.push(o))),r=r.sigNext}return}W++,Me++;try{let r=t;for(;r;){let o=r.sub;o&&(o._c?Je(o):B.has(o)||(B.add(o),V.push(o))),r=r.sigNext}en()}finally{W--,W===0&&(V.length=0,B.clear())}}}function on(e){return e.__sc??0}function sn(e){let n=e,t=[],r=n.depsHead??null;for(;r;)r.sig&&t.push(r.sig),r=r.subNext;return t}function an(e,n){let t=e.subsHead??null;for(;t;){let r=t.sub;r&&n(r),t=t.sigNext}}var hs=w(),cn="3.3.2",un=Symbol.for("sibujs.reactive.v1");function ys(){let e=globalThis,n=e[un];if(n)return hs&&!n.__dupWarned&&(n.__dupWarned=!0,k(`Multiple instances of the reactive runtime detected on this page (active: ${n.version}, duplicate: ${cn}). Reactivity still works \u2014 all copies share the first one \u2014 but de-duplicate sibujs in your bundler (e.g. Vite optimizeDeps.exclude: ['sibujs'] or resolve.dedupe: ['sibujs']).`)),n;let t={suspendTracking:Ye,resumeTracking:Qe,isTrackingSuspended:Jt,untracked:Gt,retrack:Ze,track:Yt,reactiveBinding:Xe,recordDependency:Qt,cleanup:be,setMaxSubscriberRepeats:Zt,setMaxDrainIterations:Xt,drainNotificationQueue:tn,queueSignalNotification:nn,notifySubscribers:rn,getSubscriberCount:on,getSubscriberDeps:sn,forEachSubscriber:an,version:cn};return e[un]=t,t}var R=ys(),he=R.suspendTracking,ye=R.resumeTracking,ln=R.isTrackingSuspended,K=R.untracked,F=R.retrack,C=R.track,xe=R.reactiveBinding,oe=R.recordDependency,dn=R.cleanup,la=R.setMaxSubscriberRepeats,et=R.setMaxDrainIterations,fn=R.drainNotificationQueue,pn=R.queueSignalNotification,ie=R.notifySubscribers,da=R.getSubscriberCount,fa=R.getSubscriberDeps,pa=R.forEachSubscriber;var Re=w();function tt(e,n,t){e[n]=t}function He(e,n,t){if(G(n))return Re&&k(`bindAttribute: refusing to bind event-handler attribute "${n}". Use on:{ ${n.slice(2)}: fn } instead.`),()=>{};function r(){let o;try{o=t()}catch(s){Re&&k(`bindAttribute: getter for "${n}" threw: ${s instanceof Error?s.message:String(s)}`);return}if(typeof o=="boolean"){n in e&&(n==="checked"||n==="disabled"||n==="selected")?tt(e,n,o):o?e.setAttribute(n,""):e.removeAttribute(n);return}let i=String(o);(n==="value"||n==="checked")&&n in e?tt(e,n,n==="checked"?!!o:i):e.setAttribute(n,ge(n,i))}return xe(r)}function nt(e,n,t){let r=null;function o(){let s;try{s=typeof n=="function"?n():n}catch(u){Re&&k(`bindDynamic: name getter threw: ${u instanceof Error?u.message:String(u)}`);return}let a;try{a=typeof t=="function"?t():t}catch(u){Re&&k(`bindDynamic: value getter threw: ${u instanceof Error?u.message:String(u)}`);return}if(G(s))return;r!==null&&r!==s&&e.removeAttribute(r);let c=String(a);(s==="value"||s==="checked")&&s in e?tt(e,s,s==="checked"?!!a:c):e.setAttribute(s,ge(s,c)),r=s}let i=xe(o);return()=>{i(),r!==null&&e.removeAttribute(r)}}var se=new WeakMap,ae=w(),ce=0;function v(e,n){let t=se.get(e);t||(t=[],se.set(e,t)),t.push(n),ae&&ce++}function N(e){let n=[e],t=[];for(;n.length>0;){let r=n.pop();t.push(r);let o=Array.from(r.childNodes);for(let i=0;i<o.length;i++)n.push(o[i])}for(let r=t.length-1;r>=0;r--){let o=t[r],i=se.get(o);if(i){let s=i.slice();se.delete(o),ae&&(ce-=s.length);for(let c of s)try{c()}catch(u){ae&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",u)}let a=0;for(;a++<8;){let c=se.get(o);if(!c||c.length===0)break;let u=c.slice();se.delete(o),ae&&(ce-=u.length);for(let d of u)try{d()}catch(g){ae&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",g)}}}}}function mn(e=0){return ae?(e>0&&ce>e&&k(`checkLeaks: ${ce} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),ce):0}var gn=w();function Y(e,n){let t=[];function r(){let o;try{o=n()}catch(u){gn&&k(`bindChildNode: getter threw: ${u instanceof Error?u.message:String(u)}`);return}if(o==null||typeof o=="boolean"){for(let u=0;u<t.length;u++){let d=t[u];N(d),d.parentNode&&d.parentNode.removeChild(d)}t.length=0;return}let i=e.parentNode;if(!i){t.length=0;return}let s;if(Array.isArray(o)){s=[];let u=new Set;for(let d=0;d<o.length;d++){let g=o[d];if(g==null||typeof g=="boolean")continue;let S=g instanceof Node?g:document.createTextNode(String(g));if(u.has(S)){gn&&k("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}u.add(S),s.push(S)}}else s=[o instanceof Node?o:document.createTextNode(String(o))];let a;if(t.length>0&&s.length>0){let u=new Set(t);a=new Set;for(let d=0;d<s.length;d++)u.has(s[d])&&a.add(s[d])}for(let u=0;u<t.length;u++){let d=t[u];a?.has(d)||(N(d),d.parentNode&&d.parentNode.removeChild(d))}let c=e;for(let u=0;u<s.length;u++){let d=s[u];c.nextSibling!==d&&i.insertBefore(d,c.nextSibling),c=d}t=s}return xe(r)}var _="http://www.w3.org/2000/svg",rt=w(),xs=new Set(["script","iframe","object","embed","frame","frameset"]);function vs(e){return xs.has(e.toLowerCase())}var Ss=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);function Ts(e,n,t){e[n]=t}function ks(e){let n=e.trim();if(!n)return!1;let t=n.split(/\s+/),r=!1;for(let o=0;o<t.length;o++){let i=t[o];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(i))return!1;/[-:/0-9]/.test(i)&&(r=!0)}return r}var bn=new Map;function Es(e){let n=bn.get(e);return n!==void 0||(n=e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),bn.set(e,n)),n}function ws(e,n){if(typeof n=="function"){let r=C(()=>{e.setAttribute("style",n())});v(e,r);return}if(typeof n=="string"){e.setAttribute("style",n);return}let t=e;for(let r in n){let o=n[r],i=Es(r);if(typeof o=="function"){let s=o,a=C(()=>{t.style.setProperty(i,We(String(s())))});v(e,a)}else t.style.setProperty(i,We(String(o)))}}function _s(e,n){if(typeof n=="string"){e.setAttribute("class",n);return}if(typeof n=="function"){let i=C(()=>{e.setAttribute("class",n())});v(e,i);return}let t=n,r=!1,o="";for(let i in t){let s=t[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=C(()=>{let a="";for(let c in t){let u=t[c];(typeof u=="function"?u():u)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)});v(e,s)}else e.setAttribute("class",o)}function ot(e,n){if(typeof n=="string"){e.textContent=n;return}if(typeof n=="number"){e.textContent=String(n);return}if(!(typeof n=="boolean"||n==null)){if(typeof n=="function"){let t=document.createComment("");e.appendChild(t),v(e,Y(t,n));return}if(n instanceof Node){e.appendChild(n);return}if(Array.isArray(n))for(let t=0;t<n.length;t++){let r=n[t];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),v(e,Y(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,Y(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 l=(e,n)=>{let t=vs(e);return(r,o)=>{if(t)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);let i=n?document.createElementNS(n,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),ot(i,o),i):(rt&&ks(r)&&k(`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return ot(i,r),i;let s=r,a=s.class;a!=null&&_s(i,a);let c=s.id;c!=null&&(rt&&typeof c=="string"&&Ss.has(c.toLowerCase())&&k(`tagFactory: element id="${c}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=c);let u=o!==void 0?o:s.nodes;u!=null&&ot(i,u);let d=s.on;if(d)for(let f in d){let m=d[f];typeof m=="function"?i.addEventListener(f,m):rt&&k(`tagFactory: on.${f} handler is not a function (got ${typeof m}). Event listener was not attached.`)}let g=s.style;g!=null&&ws(i,g);let S=s.ref;S&&(S.current=i);for(let f in s)switch(f){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let m=s[f];if(m==null||G(f))continue;typeof m=="function"?v(i,He(i,f,m)):typeof m=="boolean"?f in i&&(f==="checked"||f==="disabled"||f==="selected")?Ts(i,f,m):m?i.setAttribute(f,""):i.removeAttribute(f):i.setAttribute(f,ge(f,String(m)))}}return s.onElement&&typeof s.onElement=="function"&&s.onElement(i),i}};var Ha=l("html"),hn=l("head"),yn=l("body"),xn=l("title"),E=l("div"),L=l("span"),vn=l("section"),Sn=l("article"),Tn=l("header"),kn=l("footer"),En=l("nav"),wn=l("main"),_n=l("aside"),An=l("address"),De=l("p"),Cn=l("h1"),Nn=l("h2"),Oe=l("h3"),Ln=l("h4"),Mn=l("h5"),Rn=l("h6"),Hn=l("blockquote"),Dn=l("dd"),On=l("dl"),$n=l("dt"),Bn=l("figcaption"),Pn=l("figure"),Fn=l("hr"),In=l("li"),zn=l("ol"),jn=l("ul"),$e=l("pre"),qn=l("a"),Wn=l("abbr"),Vn=l("b"),Kn=l("bdi"),Un=l("bdo"),Jn=l("br"),Gn=l("cite"),Be=l("code"),Yn=l("data"),Qn=l("dfn"),Zn=l("em"),Xn=l("i"),er=l("kbd"),tr=l("mark"),nr=l("q"),rr=l("rp"),or=l("rt"),ir=l("ruby"),sr=l("s"),ar=l("samp"),cr=l("small"),ur=l("strong"),lr=l("sub"),dr=l("sup"),fr=l("time"),pr=l("u"),mr=l("var"),gr=l("area"),br=l("audio"),hr=l("img"),yr=l("map"),xr=l("track"),vr=l("video"),Sr=l("embed"),Tr=l("iframe"),kr=l("object"),Er=l("param"),wr=l("picture"),_r=l("portal"),Ar=l("source"),Cr=l("svg",_),Nr=l("math"),Lr=l("canvas"),Mr=l("noscript"),Rr=l("script"),Hr=l("del"),Dr=l("ins"),Or=l("caption"),$r=l("col"),Br=l("colgroup"),Pr=l("table"),Fr=l("tbody"),Ir=l("td"),zr=l("tfoot"),jr=l("th"),qr=l("thead"),Wr=l("tr"),ue=l("button"),Vr=l("datalist"),Kr=l("fieldset"),Ur=l("form"),Jr=l("input"),Gr=l("label"),Yr=l("legend"),Qr=l("meter"),Zr=l("optgroup"),Xr=l("option"),eo=l("output"),to=l("progress"),no=l("select"),ro=l("textarea"),oo=l("details"),io=l("dialog"),so=l("menu"),ao=l("summary"),co=l("slot"),uo=l("template"),lo=l("base"),fo=l("link"),po=l("meta"),U=l("style"),mo=l("circle",_),go=l("ellipse",_),bo=l("g",_),ho=l("line",_),yo=l("path",_),xo=l("polygon",_),vo=l("polyline",_),So=l("rect",_),To=l("text",_),ko=l("tspan",_),Eo=l("defs",_),wo=l("clipPath",_),_o=l("mask",_),Ao=l("pattern",_),Co=l("linearGradient",_),No=l("radialGradient",_),Lo=l("stop",_),Mo=l("use",_),Ro=l("symbol",_),Ho=l("marker",_),Do=l("center"),Oo=l("font"),$o=l("marquee"),Bo=e=>l(e);var As=w(),Cs=new Set(["script","style"]),Ns=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Po=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),Fo=new WeakMap;function Ls(e){let n=e.length-1,t=e[0];for(let f=0;f<n;f++)t+=`\0${f}\0${e[f+1]}`;let r=0,o=t.length;function i(){for(;r<o&&(t[r]===" "||t[r]===" "||t[r]===`
2
- `||t[r]==="\r");)r++}function s(){if(t.charCodeAt(r)!==0)return-1;let f=r;r++;let m=0;for(;r<o&&t.charCodeAt(r)!==0;)m=m*10+(t.charCodeAt(r)-48),r++;return r<o&&r++,m<0||m>=n?(r=f,-1):m}function a(){let f=r;for(;r<o;){let m=t.charCodeAt(r);if(m>=97&&m<=122||m>=65&&m<=90||m>=48&&m<=57||m===45)r++;else break}return t.slice(f,r)}function c(){if(i(),t[r]!=="=")return{kind:"bool"};r++,i();let f=s();if(f>=0)return{kind:"expr",idx:f};let m=t[r];if(m==='"'||m==="'"){r++;let y=[],b=[],p="";for(;r<o&&t[r]!==m;){let x=s();x>=0?(y.push(p),p="",b.push(x)):p+=t[r++]}return r<o&&r++,y.push(p),b.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:b}}{let y=[],b=[],p="";for(;r<o;){let x=t.charCodeAt(r);if(x===32||x===9||x===10||x===13||x===62)break;let T=s();T>=0?(y.push(p),p="",b.push(T)):p+=t[r++]}return y.push(p),b.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:b}}}function u(){let f=[];for(;r<o&&(i(),!(t[r]===">"||t[r]==="/"));){let m=r;for(;r<o;){let p=t.charCodeAt(r);if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57||p===45||p===58||p===95||p===46)r++;else break}let y=t.slice(m,r);if(!y)break;let b=c();y.startsWith("on:")?b.kind==="expr"&&f.push({t:3,name:y.slice(3),idx:b.idx}):b.kind==="bool"?f.push({t:4,name:y}):b.kind==="static"?f.push({t:0,name:y,value:b.value}):b.kind==="expr"?f.push({t:1,name:y,idx:b.idx}):b.kind==="mixed"&&f.push({t:2,name:y,statics:b.statics,exprs:b.exprs})}return f}function d(f){return f.replace(/\s+/g," ")}function g(f){let m="";for(;r<o&&t[r]!=="<";){let b=s();if(b>=0){let p=d(m);p&&f.push({t:1,value:p}),m="",f.push({t:2,idx:b})}else m+=t[r++]}let y=d(m);y&&f.push({t:1,value:y})}function S(){let f=[];for(;r<o&&!(t[r]==="<"&&r+1<o&&t[r+1]==="/");)if(t[r]==="<"){let m=t[r+1];if(m==="!"){if(t.startsWith("<!--",r)){let T=t.indexOf("-->",r+4);r=T===-1?o:T+3}else if(t.startsWith("<![CDATA[",r)){let T=t.indexOf("]]>",r+9);r=T===-1?o:T+3}else{let T=t.indexOf(">",r);r=T===-1?o:T+1}continue}if(m==="?"){let T=t.indexOf(">",r);r=T===-1?o:T+1;continue}if(!(m>="a"&&m<="z")&&!(m>="A"&&m<="Z")){f.push({t:1,value:"<"}),r++;continue}r++;let y=a(),b=u();i();let p=Ns.has(y),x=t[r]==="/";if(x&&r++,r<o&&r++,p||x)f.push({t:0,el:{tag:y,svg:Po.has(y),attrs:b,children:[]}});else{let T=S();if(Cs.has(y.toLowerCase())){for(let I=0;I<T.length;I++)if(T[I].t===2)throw new Error(`html: dynamic \${...} expressions are not allowed inside <${y}> (raw-text context). Build the content separately and append it as a Node.`)}t[r]==="<"&&r+1<o&&t[r+1]==="/"&&(r+=2,a(),i(),r<o&&t[r]===">"&&r++),f.push({t:0,el:{tag:y,svg:Po.has(y),attrs:b,children:T}})}}else g(f);return f}return S()}function it(e,n){let t=e.svg?document.createElementNS(_,e.tag):document.createElement(e.tag);for(let r=0;r<e.attrs.length;r++){let o=e.attrs[r];switch(o.t){case 0:t.setAttribute(o.name,o.value);break;case 1:{let i=o.name,s=i.toLowerCase();if(G(i))break;let a=n[o.idx];if(typeof a=="function")v(t,He(t,i,a));else if(a!=null){let c=String(a);s==="srcset"?t.setAttribute(i,Ae(c)):Ve(s)?t.setAttribute(i,me(c)):t.setAttribute(i,c)}break}case 2:{let i=o.statics[0];for(let a=0;a<o.exprs.length;a++){let c=n[o.exprs[a]];i+=(c==null?"":String(c))+o.statics[a+1]}let s=o.name.toLowerCase();s==="srcset"?t.setAttribute(o.name,Ae(i)):Ve(s)?t.setAttribute(o.name,me(i)):t.setAttribute(o.name,i);break}case 3:{let i=n[o.idx];typeof i=="function"?t.addEventListener(o.name,i):As&&k(`html: on:${o.name} handler is not a function (got ${typeof i}). Event listener was not attached.`);break}case 4:t.setAttribute(o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:t.appendChild(it(o.el,n));break;case 1:t.appendChild(document.createTextNode(o.value));break;case 2:{let i=n[o.idx];if(typeof i=="function"){let s=document.createComment("");t.appendChild(s),v(t,Y(s,i))}else if(i instanceof Node)t.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?t.appendChild(a):a!=null&&typeof a!="boolean"&&t.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&t.appendChild(document.createTextNode(String(i)));break}}}return t}function st(e,...n){let t=Fo.get(e);if(t||(t=Ls(e),Fo.set(e,t)),t.length===1&&t[0].t===0)return it(t[0].el,n);let r=document.createElement("div");for(let o=0;o<t.length;o++){let i=t[o];switch(i.t){case 0:r.appendChild(it(i.el,n));break;case 1:r.appendChild(document.createTextNode(i.value));break;case 2:{let s=n[i.idx];if(s instanceof Node)r.appendChild(s);else if(typeof s=="function"){let a=document.createComment("bind:htm");r.appendChild(a),v(r,Y(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 Io(e,n){if(!n)throw new Error("[SibuJS mount] container element not found. Make sure the DOM element exists before calling mount().");D(typeof e=="function"||e instanceof Node,"mount: first argument must be a component function or a DOM Node.");let t=typeof performance<"u"?performance.now():0,r=typeof e=="function"?e():e,o=typeof performance<"u"?performance.now()-t:0;n.appendChild(r);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:r,container:n,duration:o}),{node:r,unmount(){i&&i.emit("app:unmount",{rootElement:r}),N(r),r.parentNode&&r.parentNode.removeChild(r)}}}var at=w();function zo(e){return typeof e=="function"?zo(e()):e instanceof Node?e:document.createTextNode(String(e))}function Ms(e,n){if(n===0)return[];let t=[],r=new Array(n);for(let a=0;a<n;a++){let c=e[a],u=0,d=t.length;for(;u<d;){let g=u+d>>1;e[t[g]]<c?u=g+1:d=g}t[u]=a,r[a]=u>0?t[u-1]:-1}let o=t.length,i=new Array(o),s=t[o-1];for(let a=o-1;a>=0;a--)i[a]=s,s=r[s];return i}function jo(e,n,t){D(typeof e=="function","each: first argument must be a function that returns an array."),D(typeof n=="function","each: second argument must be a render function."),D(t&&typeof t.key=="function","each: options.key must be a function that returns a unique key per item.");let r=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],a=i,c=0,u=new Map,d=new Map,g=[],S=[],f=new Uint8Array(0),m=new Map,y=[],b=[],p=new Map,x=!1,T=!1,I=t.key,$t=()=>{let Bt=e(),M=Bt.length,ke=r.parentNode;if(!ke)return;T||(ke.insertBefore(o,r.nextSibling),T=!0),S.length<M&&(S=new Array(M));for(let h=0;h<M;h++)S[h]=I(Bt[h]);let q=S;g.length<M&&(g=new Array(M)),d.clear(),p.clear();for(let h=0;h<M;h++)at&&p.has(q[h])&&k(`each: duplicate key "${String(q[h])}" at index ${h} (first seen at ${p.get(q[h])}). Keys must be unique \u2014 duplicates cause rows to be dropped or mis-ordered.`),p.set(q[h],h);for(let h=0;h<M;h++){let H=q[h],Ft=u.get(H),pe;if(Ft!==void 0)pe=Ft;else{let It=H,Ui=()=>K(()=>e()[p.get(It)]),Ji=()=>p.get(It);try{pe=zo(n(Ui,Ji))}catch(re){at&&k(`each: render threw for item at index ${h} (key="${q[h]}"): ${re instanceof Error?re.message:String(re)}`),pe=document.createComment(`each:error:${h}`);let zt=re instanceof Error?re:new Error(String(re));queueMicrotask(()=>{try{let jt=r.parentNode;jt?.dispatchEvent?jt.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:zt}})):at&&k(`each: error not surfaced \u2014 anchor detached: ${zt.message}`)}catch{}})}}d.set(H,pe),g[h]=pe}for(let[h,H]of u)d.has(h)||(N(H),H.parentNode&&ke.removeChild(H));if(M===0){c=0;let h=u;u=d,d=h;return}m.clear();for(let h=0;h<c;h++)m.set(a[h],h);y.length<M&&(y=new Array(M),b=new Array(M));let Ee=0;for(let h=0;h<M;h++){let H=m.get(q[h]);H!==void 0&&(y[Ee]=h,b[Ee]=H,Ee++)}let Pt=Ms(b,Ee);f.length<M?f=new Uint8Array(M):f.fill(0,0,M);for(let h=0;h<Pt.length;h++)f[y[Pt[h]]]=1;let we=o;for(let h=M-1;h>=0;h--){let H=g[h];f[h]||H.nextSibling!==we&&ke.insertBefore(H,we),we=H}let _e=a===i?s:i;_e.length<M&&(_e.length=M);for(let h=0;h<M;h++)_e[h]=q[h];a=_e,c=M;let Ki=u;u=d,d=Ki,x=!0},Vi=C($t);return v(r,Vi),x||queueMicrotask(()=>{!x&&r.parentNode&&$t()}),r}function Wo(e){let n=document.createDocumentFragment();for(let t of e)if(!(t==null||typeof t=="boolean"))if(Array.isArray(t))for(let r of t)r==null||typeof r=="boolean"||n.appendChild(qo(r));else n.appendChild(qo(t));return n}function qo(e){if(e==null)return document.createTextNode("");if(e instanceof Node)return e;if(typeof e=="function"){let n=e();return n instanceof Node?n:document.createTextNode(String(n??""))}return document.createTextNode(String(e))}function Vo(e,n){let t=document.createComment("portal"),r=n||document.body,o=null,i=!1;return queueMicrotask(()=>{if(!i)try{o=e(),r.appendChild(o)}catch(s){typeof console<"u"&&console.error("[Portal] Render error:",s);let a=s instanceof Error?s:new Error(String(s));queueMicrotask(()=>{try{let c=t.parentNode;c?.dispatchEvent&&c.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:a}}))}catch{}})}}),v(t,()=>{i=!0,o&&(N(o),o.remove(),o=null)}),t}var ct=new Map;function Ko(e,n){ct.set(e,n)}function Uo(e){ct.delete(e)}function ut(e){let n=ct.get(e);return n?n():E({nodes:`[Component "${e}" not found]`})}function Jo(e){let n=E({class:"sibu-dynamic"});function t(){let o=e(),i;typeof o=="function"?i=o():i=ut(o);for(let s of Array.from(n.childNodes))N(s);n.replaceChildren(i)}let r=C(t);return v(n,r),n}function Go(e,n="default"){return e?.[n]}function Yo(e,n){return v(n,C(()=>{n.style.display=e()?"":"none"})),n}function Qo(e,n,t){let r=document.createComment("when"),o=null,i,s=!1,a=()=>{let c=e(),u=r.parentNode;if(!u||s&&c===i)return;i=c,o?.parentNode&&(N(o),o.parentNode.removeChild(o),o=null);let d=c?n():t?t():null;if(d!=null){let g=d instanceof Node?d:document.createTextNode(String(d));u.insertBefore(g,r.nextSibling),o=g}s=!0};return v(r,C(a)),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function Zo(e,n,t){let r=document.createComment("match"),o=null,i,s=!1,a=()=>{let c=String(e()),u=r.parentNode;if(!u||s&&c===i)return;i=c,o?.parentNode&&(N(o),o.parentNode.removeChild(o),o=null);let d=n[c]||t;if(d){let g=d();if(g!=null){let S=g instanceof Node?g:document.createTextNode(String(g));u.insertBefore(S,r.nextSibling),o=S}}s=!0};return v(r,C(a)),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function Xo(e,n,t){let r=document.createComment("keep-alive"),o=new Map,i=[],s=t?.max??10;s===0&&w()&&k("KeepAlive: unbounded cache (max: 0). Cached subtrees will never be evicted \u2014 set `max` to bound memory.");let a,c=null,u=!1,d=!1,g=()=>{if(d)return;let f=e(),m=r.parentNode;if(!m||u&&f===a)return;c?.parentNode&&m.removeChild(c),a=f;let y=o.get(f);if(y){let b=i.indexOf(f);b!==-1&&(i.splice(b,1),i.push(f))}else{let b=n[f];if(!b){c=null,u=!0;return}if(y=b(),y instanceof DocumentFragment){let p=document.createElement("div");p.style.display="contents",p.appendChild(y),y=p}if(o.set(f,y),i.push(f),s>0&&i.length>s){let p=i.shift(),x=o.get(p);x&&(N(x),x.parentNode&&x.parentNode.removeChild(x),o.delete(p))}}m.insertBefore(y,r.nextSibling),c=y,u=!0},S=C(g);return u||queueMicrotask(()=>{!u&&r.parentNode&&g()}),v(r,()=>{d=!0,S();for(let f of o.values())N(f),f.parentNode&&f.parentNode.removeChild(f);o.clear(),i.length=0,c=null}),r}var lt=Symbol.for("sibujs.actions.v1"),ei=globalThis[lt]??(globalThis[lt]=new Map);function Q(e,n){ei.set(e,n)}function dt(e){return ei.get(e)}function ti(e,n,t){let r=typeof n=="string"?dt(n):n;if(!r)throw new Error(`[SibuJS] No action registered under the name "${n}". Register it with registerAction() before applying it by name.`);let o=r(e,t);typeof o=="function"&&v(e,o)}var ft=(e,n)=>{let t=r=>{e.contains(r.target)||n()};return document.addEventListener("pointerdown",t,!0),()=>document.removeEventListener("pointerdown",t,!0)},pt=(e,n)=>{let t=n.duration??500,r=null,o=()=>{r=setTimeout(()=>{n.callback(),r=null},t)},i=()=>{r!==null&&(clearTimeout(r),r=null)};return e.addEventListener("pointerdown",o),e.addEventListener("pointerup",i),e.addEventListener("pointerleave",i),()=>{i(),e.removeEventListener("pointerdown",o),e.removeEventListener("pointerup",i),e.removeEventListener("pointerleave",i)}},mt=(e,n)=>{let t=()=>{let r=typeof n=="function"?n():e.textContent??"";navigator.clipboard.writeText(r)};return e.addEventListener("click",t),()=>e.removeEventListener("click",t)},gt=e=>{let n=()=>{e.style.overflow="hidden",e.style.height="auto",e.style.height=`${e.scrollHeight}px`};return n(),e.addEventListener("input",n),()=>e.removeEventListener("input",n)},bt=e=>{let n='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',t=r=>{if(r.key!=="Tab")return;let o=Array.from(e.querySelectorAll(n));if(o.length===0)return;let i=o[0],s=o[o.length-1];r.shiftKey&&document.activeElement===i?(r.preventDefault(),s.focus()):!r.shiftKey&&document.activeElement===s&&(r.preventDefault(),i.focus())};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)};Q("clickOutside",ft);Q("longPress",pt);Q("copyOnClick",mt);Q("autoResize",gt);Q("trapFocus",bt);var Z=null;function ni(e,n){try{let t=e();return t&&typeof t.then=="function"&&t.catch(r=>{n?n(r,"async"):Z?Z(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),t}catch(t){return n?n(t,"sync"):Z?Z(t,"sync"):console.error("Unhandled error in Sibu.catchError:",t),null}}async function ri(e,n){try{return await e()}catch(t){return n?n(t,"async"):Z?Z(t,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",t),null}}function oi(e){Z=e}var ht=Symbol.for("sibujs.createId.v1"),yt=globalThis[ht]??(globalThis[ht]={n:0});function ii(e="sibu"){return yt.n++,`${e}-${yt.n}`}function si(){yt.n=0}var ve=0,xt=new Set;function Rs(e){ve++;try{return e()}finally{ve--,ve===0&&Os()}}function Hs(e){return ve===0?!1:(xt.add(e),!0)}function Ds(){return ve>0}function Os(){try{for(let e of xt)pn(e)}finally{xt.clear()}fn()}var ai=Symbol.for("sibujs.reactive.batch.v1");function $s(){let e=globalThis,n=e[ai];if(n)return n;let t={batch:Rs,enqueueBatchedSignal:Hs,isBatching:Ds};return e[ai]=t,t}var vt=$s(),$=vt.batch,J=vt.enqueueBatchedSignal,ci=vt.isBatching;var St=globalThis,Pe=w();function A(e,n){let t={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0},r=Pe?n?.name:void 0,o=n?.equals;r&&(t.__name=r);function i(){return oe(t),t.value}i.__signal=t,r&&(i.__name=r);let s;if(o?s=a=>{let c=t.value,u=typeof a=="function"?a(c):a;if(!o(c,u)){if(t.value=u,t.__v++,Pe){let d=St.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:u})}J(t)||ie(t)}}:Pe?s=a=>{let c=t.value,u=typeof a=="function"?a(c):a;if(Object.is(u,c))return;t.value=u,t.__v++;let d=St.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:u}),J(t)||ie(t)}:s=a=>{let c=t.value,u=typeof a=="function"?a(c):a;Object.is(u,c)||(t.value=u,t.__v++,J(t)||ie(t))},Pe){let a=St.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:t,name:r,getter:i,initial:e})}return[i,s]}var Tt=Symbol.for("sibujs.ssr.v1");function Bs(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let n=null,t=process.getBuiltinModule;if(typeof t=="function")n=t("node:async_hooks");else{let r=Function("return typeof require==='function'?require:null")();r&&(n=r("node:async_hooks"))}n&&(e=new n.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0}}}var ui=globalThis[Tt]??(globalThis[Tt]=Bs()),Fe=ui.als,X=ui.fallbackStore;function ee(){if(Fe){let e=Fe.getStore();if(e)return e}return X}function te(){return ee().ssr}function li(e){if(!te())return null;let n=ee(),t=n.caches??(n.caches=new Map),r=t.get(e);return r||(r=new Map,t.set(e,r)),r}function di(){ee().ssr=!0}function fi(){ee().ssr=!1}function pi(e){let n={ssr:!0,suspenseIdCounter:0};if(Fe)return Fe.run(n,e);let t=X.ssr,r=X.suspenseIdCounter;X.ssr=!0,X.suspenseIdCounter=0;try{return e()}finally{X.ssr=t,X.suspenseIdCounter=r}}function mi(e){let n=ee(),t=n.ssr;n.ssr=!0;try{return e()}finally{t||(n.ssr=!1)}}var kt=globalThis;function hi(e,n){let t,r=!0;return()=>{let o=e();if(r)r=!1,t=o,K(()=>n(o,void 0));else{let i=t;t=o,K(()=>n(o,i))}}}var gi=100;function Et(e){let n=e.userCleanups;if(n.length!==0){e.userCleanups=[];for(let t=n.length-1;t>=0;t--)try{n[t]()}catch(r){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw:",r)}}}function bi(e){let n=1;do e.rerunPending=!1,e.userCleanups.length>0&&Et(e),F(e.bodyFn,e.subscriber);while(e.rerunPending&&++n<=gi);e.rerunPending&&(e.rerunPending=!1,kt.__SIBU_DEV_WARN__!==!1&&typeof console<"u"&&console.error(`[SibuJS] effect re-requested itself ${gi}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`))}function Ps(e){if(e.disposed)return;e.disposed=!0;let n=kt.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(n)try{n.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Et(e)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",t)}try{dn(e.subscriber)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",t)}}function O(e,n){if(D(typeof e=="function","effect: argument must be a function."),te())return()=>{};let t={fn:e,onError:n?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};t.onCleanup=s=>{t.userCleanups.push(s)};let r=t.onError;t.bodyFn=r?()=>{try{t.fn(t.onCleanup)}catch(s){r(s)}}:()=>{t.fn(t.onCleanup)};let o=(()=>{if(!t.disposed){if(t.running){t.rerunPending=!0;return}t.running=!0;try{t.rerunPending=!1,t.userCleanups.length>0&&Et(t),F(t.bodyFn,o),t.rerunPending&&bi(t)}finally{t.running=!1,t.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._runEpoch=0,o._runs=0,t.subscriber=o,t.running=!0;try{F(t.bodyFn,t.subscriber),t.rerunPending&&bi(t)}finally{t.running=!1,t.rerunPending=!1}let i=kt.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("effect:create",{effectFn:e}),()=>Ps(t)}function Ie(e,n){D(typeof e=="function","derived: argument must be a getter function.");let t=n?.name,r=n?.equals,o={};o._d=!1,o._init=!1,o._g=e,o.__v=0;let i=()=>{o._d||(o._d=!0)};i._c=1,i._sig=o;let s=()=>{let d=e();o._v=r&&o._init&&r(o._v,d)?o._v:d,o._d=!1,o._init=!0};C(()=>{let d=!0;try{o._v=e(),o._d=!1,o._init=!0,d=!1}finally{d&&(o._d=!0)}},i);let a=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,c=!1;function u(){if(c)throw new Error(`[SibuJS] Circular dependency detected in derived${t?` "${t}"`:""}. A derived signal cannot read itself (directly or through a chain).`);if(ln()){if(o._d){let d=o._v;c=!0;try{F(s,i),Object.is(d,o._v)||o.__v++}finally{c=!1}}return o._v}if(oe(o),o._d){let d=o._v;c=!0;try{F(s,i),Object.is(d,o._v)||o.__v++}finally{c=!1}a&&d!==o._v&&a.emit("computed:update",{signal:o,oldValue:d,newValue:o._v})}return o._v}return t&&(u.__name=t,o.__name=t),u.__signal=o,a&&a.emit("computed:create",{signal:o,name:t,getter:u}),u}function yi(e,n){if(D(typeof e=="function","watch: first argument must be a getter function."),D(typeof n=="function","watch: second argument must be a callback function."),te())return()=>{};let t,r=!0;return C(()=>{let s=e();if(r){t=s,r=!1;return}if(!Object.is(s,t)){let a=t;t=s,he();try{n(s,a)}finally{ye()}}})}function xi(e){D(e!==null&&typeof e=="object"&&!Array.isArray(e),"store: argument must be a plain object. For arrays, use array() instead.");let n={};Object.keys(e).forEach(c=>{let[u,d]=A(e[c]);n[c]=[u,d]});let t=new Proxy({},{get(c,u){if(typeof u=="string"&&Object.hasOwn(n,u)){let d=n[u][0];return d()}return Reflect.get(c,u)},set(){throw new Error("[SibuJS store] Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),r=()=>{let c={};return Object.keys(n).forEach(u=>{c[u]=n[u][0]()}),c};return[t,{setState:c=>{let u=r(),d=typeof c=="function"?c(u):c;$(()=>{Object.entries(d).forEach(([g,S])=>{Object.hasOwn(n,g)&&n[g][1](S)})})},reset:()=>{$(()=>{Object.keys(e).forEach(c=>{let u=n[c][1];u(e[c])})})},subscribe:c=>{let u=!0;return O(()=>{let d=r();if(u){u=!1;return}he();try{c(d)}finally{ye()}})},subscribeKey:(c,u)=>{let d,g=!0;return O(()=>{let S=n[c][0]();if(g){d=S,g=!1;return}if(!Object.is(S,d)){let f=d;d=S,he();try{u(S,f)}finally{ye()}}})},getSnapshot:r}]}function vi(e){let[n,t]=A(e);return{get current(){return n()},set current(r){t(r)}}}function Si(e=[]){let[n,t]=A([...e]);return[n,{push(...o){t(i=>[...i,...o])},pop(){let o;return t(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return t(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){t(i=>[...o,...i])},splice(o,i=0,...s){let a=[];return t(c=>{let u=[...c];return a=u.splice(o,i,...s),u}),a},remove(o){t(i=>i.filter((s,a)=>a!==o))},removeWhere(o){t(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((a,c)=>c!==s)})},set(o){t([...o])},update(o,i){t(s=>s.map((a,c)=>c===o?i:a))},updateWhere(o,i){t(s=>s.map(a=>o(a)?i(a):a))},sort(o){t(i=>[...i].sort(o))},reverse(){t(o=>[...o].reverse())},filter(o){t(i=>i.filter(o))},map(o){t(i=>i.map(o))},clear(){t([])}}]}function Ti(e=[]){let n=[...e],t=null,r={};function o(){t=null,J(r)||ie(r)}function i(){if(oe(r),t===null){let a=n.slice();t=Object.freeze(a)}return t}return[i,{push(...a){a.length!==0&&(n.push(...a),o())},pop(){if(n.length===0)return;let a=n.pop();return o(),a},shift(){if(n.length===0)return;let a=n.shift();return o(),a},unshift(...a){a.length!==0&&(n.unshift(...a),o())},splice(a,c=0,...u){let d=n.splice(a,c,...u);return(d.length>0||u.length>0)&&o(),d},remove(a){a<0||a>=n.length||(n.splice(a,1),o())},removeWhere(a){let c=n.findIndex(a);c!==-1&&(n.splice(c,1),o())},set(a){n=[...a],o()},update(a,c){a<0||a>=n.length||Object.is(n[a],c)||(n[a]=c,o())},updateWhere(a,c){let u=!1;for(let d=0;d<n.length;d++)if(a(n[d])){let g=c(n[d]);Object.is(n[d],g)||(n[d]=g,u=!0)}u&&o()},sort(a){n.length<=1||(n.sort(a),o())},reverse(){n.length<=1||(n.reverse(),o())},filter(a){let c=n.filter(a);c.length!==n.length&&(n=c,o())},map(a){let c=!1;for(let u=0;u<n.length;u++){let d=a(n[u],u);Object.is(n[u],d)||(n[u]=d,c=!0)}c&&o()},clear(){n.length!==0&&(n=[],o())}}]}function le(e,n,t){if(Object.is(e,n))return!0;if(e==null||n==null||typeof e!=typeof n||typeof e!="object")return!1;let r=e,o=n;if(r.constructor!==o.constructor)return!1;if(e instanceof Date)return e.getTime()===n.getTime();if(e instanceof RegExp){let c=n;return e.source===c.source&&e.flags===c.flags}t||(t=new Map);let i=t.get(r);if(i?.has(o))return!0;if(i||(i=new Set,t.set(r,i)),i.add(o),e instanceof Map){let c=n;if(e.size!==c.size)return!1;for(let[u,d]of e)if(!c.has(u)||!le(d,c.get(u),t))return!1;return!0}if(e instanceof Set){let c=n;if(e.size!==c.size)return!1;for(let u of e)if(!c.has(u))return!1;return!0}if(e instanceof ArrayBuffer){let c=new Uint8Array(e),u=new Uint8Array(n);if(c.length!==u.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==u[d])return!1;return!0}if(e instanceof DataView){if(!(n instanceof DataView)||e.byteLength!==n.byteLength)return!1;for(let c=0;c<e.byteLength;c++)if(e.getUint8(c)!==n.getUint8(c))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){let c=e,u=n;if(c.length!==u.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==u[d])return!1;return!0}if(Array.isArray(e))return!Array.isArray(n)||e.length!==n.length?!1:e.every((c,u)=>le(c,n[u],t));let s=Object.keys(r),a=Object.keys(o);return s.length!==a.length?!1:s.every(c=>Object.hasOwn(o,c)&&le(r[c],o[c],t))}function ki(e){return A(e,{equals:(n,t)=>le(n,t)})}function Ei(e,n,t){return[Ie(e,t),i=>{$(()=>n(i))}]}function wi(e,n){let[t,r]=A(n),[o,i]=A(!1),[s,a]=A(null),[c,u]=A(0),d=0;return O(()=>{c();let g=++d;$(()=>{i(!0),a(null)});let S;try{S=e()}catch(f){$(()=>{a(f),i(!1)});return}S.then(f=>{g===d&&$(()=>{r(f),i(!1)})},f=>{g===d&&$(()=>{a(f),i(!1)})})}),{value:t,loading:o,error:s,refresh:()=>u(g=>g+1)}}function Ct(e,n){try{return e()}catch(t){k(`${n}: callback threw: ${t instanceof Error?t.message:String(t)}`);return}}function wt(e,n,t){let r=Ct(e,n);typeof r=="function"&&t&&v(t,r)}var de=new WeakMap,ne=new WeakMap,z=new Set,j=new Set,fe=null,ze=0,Fs=256;function _t(e){let n=de.get(e);if(n){de.delete(e),z.delete(e);for(let t of n)try{t()}catch{}}}function At(e){ne.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let t=ne.get(e);if(t){ne.delete(e),j.delete(e);for(let r of t)try{r()}catch{}}})}function Is(e){if(z.size===0||e.nodeType!==1)return;let n=e;if(z.has(n)&&n.isConnected&&_t(n),n.firstElementChild)for(let t of Array.from(z))t!==n&&t.isConnected&&n.contains(t)&&_t(t)}function zs(e){if(j.size===0||e.nodeType!==1)return;let n=e;if(j.has(n)&&!n.isConnected&&At(n),n.firstElementChild)for(let t of Array.from(j))t!==n&&!t.isConnected&&n.contains(t)&&At(t)}function js(){if(z.size>0)for(let e of Array.from(z))e.isConnected&&_t(e);if(j.size>0)for(let e of Array.from(j))e.isConnected||At(e)}function _i(){fe||typeof document>"u"||(fe=new MutationObserver(e=>{for(let n of e)if(n.type==="childList"){if(n.addedNodes.length>0)for(let t=0;t<n.addedNodes.length;t++)Is(n.addedNodes[t]);if(n.removedNodes.length>0)for(let t=0;t<n.removedNodes.length;t++)zs(n.removedNodes[t])}ze+=e.length,ze>=Fs&&(ze=0,js()),Nt()}),fe.observe(document.body,{childList:!0,subtree:!0}))}function Nt(){fe&&z.size===0&&j.size===0&&(fe.disconnect(),fe=null,ze=0)}function qs(e,n){let t=de.get(e);return t||(t=[],de.set(e,t)),t.push(n),z.add(e),_i(),()=>{let r=de.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(de.delete(e),z.delete(e))}Nt()}}function Ws(e,n){let t=ne.get(e);return t||(t=[],ne.set(e,t)),t.push(n),j.add(e),_i(),()=>{let r=ne.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(ne.delete(e),j.delete(e))}Nt()}}function Se(e,n){if(!(typeof document>"u"))if(n){let t=!1;if(v(n,()=>{t=!0}),n.isConnected){queueMicrotask(()=>{t||wt(e,"onMount",n)});return}queueMicrotask(()=>{if(t)return;if(n.isConnected){wt(e,"onMount",n);return}let r=qs(n,()=>{t||wt(e,"onMount",n)});v(n,r)})}else queueMicrotask(()=>{Ct(e,"onMount")})}function Ai(e,n){if(typeof document>"u")return;let t=!1,r=()=>{t||(t=!0,Ct(e,"onUnmount"))};v(n,r);let o=()=>{if(t)return;let i=Ws(n,r);v(n,i)};n.isConnected?o():Se(()=>{o()},n)}function Ci(e,n){v(n,e)}function Ni(e){let[n,t]=A(e);return{provide(o){let i=n();return t(o),()=>t(i)},use(){return n},get(){return n()},set(o){t(o)},withContext(o,i){let s=n();t(o);try{return i()}finally{t(s)}}}}function Li(e){let n=e();return w()&&queueMicrotask(()=>{try{e()}catch(t){console.warn("[SibuJS strict] second run threw:",t)}}),n}function Mi(e){if(!w())return O(e);let n=O(e),t=null;return queueMicrotask(()=>{try{t=O(e)}catch(r){console.warn("[SibuJS strictEffect] second run threw:",r)}}),()=>{n(),t&&t()}}function Ri(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}function Di(e){let[n,t]=A(e()),r=!1,o=!1,i=n(),s=()=>{r=!1,!o&&t(i)},a=()=>{r||(r=!0,queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(s):s()}))},c=C(()=>{i=e(),a()}),u=(()=>n());return u.dispose=()=>{o||(o=!0,c())},u}var Hi=16;function Vs(e){let n=globalThis;if(typeof n.requestIdleCallback=="function"){n.requestIdleCallback(e,{timeout:Hi*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,Hi)}function Oi(){let[e,n]=A(!1);function t(r){n(!0),Vs(()=>{let o;try{o=r()}catch{n(!1);return}o&&typeof o.then=="function"?o.then(()=>n(!1),()=>n(!1)):n(!1)})}return{pending:e,start:t}}var Lt="__sibuPendingError";function $i(e,n){let t=()=>{try{return e.parentNode?(e.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:n}})),!0):!1}catch{return!1}};e.parentNode&&t()||queueMicrotask(()=>{t()||(e[Lt]=n)})}function Te(e){let n=e,t=n[Lt];if(t instanceof Error)return delete n[Lt],t}function Mt(e){let n=null;return function(){if(n)return n();let r=E({class:"sibu-lazy"}),o=!1;return e().then(i=>{if(o)return;n=i.default;let s=n();r.replaceChildren(s)}).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));k(`[SibuJS] lazy() failed to load component: ${s.message}`),r.replaceChildren(E({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),$i(r,s)}),r.appendChild(L("sibu-lazy-loading","Loading...")),v(r,()=>{o=!0}),r}}function Rt({nodes:e,fallback:n}){let t=E({class:"sibu-suspense"}),r=n();t.appendChild(r);let o=!1,i=null,s=null;return v(t,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!t.contains(s)&&N(s)}),queueMicrotask(()=>{if(!o)try{let a=e();if(s=a,a.classList.contains("sibu-lazy")){if(!a.querySelector(".sibu-lazy-loading")){t.replaceChildren(a);return}i=new MutationObserver(()=>{if(o)return;a.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,t.replaceChildren(a))}),i.observe(a,{childList:!0,subtree:!0})}else t.replaceChildren(a)}catch(a){let c=a instanceof Error?a:new Error(String(a));k(`[SibuJS] Suspense nodes() threw: ${c.message}`),$i(t,c)}}),t}var bu=w();function Ht(e){return e}var hu=1024*1024;var Ks=w(),Us=`
1
+ "use strict";var Sibu=(()=>{var qe=Object.defineProperty;var Gi=Object.getOwnPropertyDescriptor;var Yi=Object.getOwnPropertyNames;var Qi=Object.prototype.hasOwnProperty;var qt=(e,n)=>{for(var t in n)qe(e,t,{get:n[t],enumerable:!0})},Zi=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of Yi(n))!Qi.call(e,o)&&o!==t&&qe(e,o,{get:()=>n[o],enumerable:!(r=Gi(n,o))||r.enumerable});return e};var Xi=e=>Zi(qe({},"__esModule",{value:!0}),e);var ra={};qt(ra,{DynamicComponent:()=>Jo,ErrorBoundary:()=>ji,ErrorDisplay:()=>je,Fragment:()=>Wo,KeepAlive:()=>Xo,Loading:()=>Wi,Portal:()=>Vo,SVG_NS:()=>_,Suspense:()=>Rt,__resetIdCounter:()=>si,a:()=>qn,abbr:()=>Wn,action:()=>ti,address:()=>An,area:()=>gr,array:()=>Si,article:()=>Sn,aside:()=>_n,asyncDerived:()=>wi,audio:()=>br,autoResize:()=>gt,b:()=>Vn,base:()=>lo,batch:()=>$,bdi:()=>Kn,bdo:()=>Un,bindDynamic:()=>nt,blockquote:()=>Hn,body:()=>yn,br:()=>Jn,button:()=>ue,canvas:()=>Lr,caption:()=>Or,catchError:()=>ni,catchErrorAsync:()=>ri,center:()=>Do,checkLeaks:()=>mn,circle:()=>mo,cite:()=>Gn,clickOutside:()=>ft,clipPath:()=>wo,code:()=>Be,col:()=>$r,colgroup:()=>Br,context:()=>Ni,copyOnClick:()=>mt,createId:()=>ii,customElement:()=>Bo,data:()=>Yn,datalist:()=>Vr,dd:()=>Dn,deepEqual:()=>le,deepSignal:()=>ki,defer:()=>Di,defs:()=>Eo,del:()=>Hr,derived:()=>Ie,details:()=>oo,dfn:()=>Qn,dialog:()=>io,disableSSR:()=>fi,dispose:()=>N,div:()=>E,dl:()=>On,dt:()=>$n,each:()=>jo,effect:()=>O,ellipse:()=>go,em:()=>Zn,embed:()=>Sr,enableSSR:()=>di,enqueueBatchedSignal:()=>J,fieldset:()=>Kr,figcaption:()=>Bn,figure:()=>Pn,font:()=>Oo,footer:()=>kn,form:()=>Ur,g:()=>bo,getAction:()=>dt,getRequestScopedCache:()=>li,getSSRStore:()=>ee,getSlot:()=>Go,h1:()=>Cn,h2:()=>Nn,h3:()=>Oe,h4:()=>Ln,h5:()=>Mn,h6:()=>Rn,head:()=>hn,header:()=>Tn,hr:()=>Fn,html:()=>st,i:()=>Xn,iframe:()=>Tr,img:()=>hr,input:()=>Jr,ins:()=>Dr,isBatching:()=>ci,isSSR:()=>te,kbd:()=>er,label:()=>Gr,lazy:()=>Mt,legend:()=>Yr,li:()=>In,line:()=>ho,linearGradient:()=>Co,link:()=>fo,longPress:()=>pt,main:()=>wn,map:()=>yr,mark:()=>tr,marker:()=>Ho,marquee:()=>$o,mask:()=>_o,match:()=>Zo,math:()=>Nr,menu:()=>so,meta:()=>po,meter:()=>Qr,mount:()=>Io,nav:()=>En,nextTick:()=>Ri,noscript:()=>Mr,object:()=>kr,ol:()=>zn,on:()=>hi,onCleanup:()=>Ci,onMount:()=>Se,onUnmount:()=>Ai,optgroup:()=>Zr,option:()=>Xr,output:()=>eo,p:()=>De,param:()=>Er,path:()=>yo,pattern:()=>Ao,picture:()=>wr,polygon:()=>xo,polyline:()=>vo,portal:()=>_r,pre:()=>$e,progress:()=>to,q:()=>nr,radialGradient:()=>No,reactiveArray:()=>Ti,rect:()=>So,ref:()=>vi,registerAction:()=>Q,registerComponent:()=>Ko,registerDisposer:()=>v,resolveComponent:()=>ut,retrack:()=>F,rp:()=>rr,rt:()=>or,ruby:()=>ir,runInSSRContext:()=>pi,s:()=>sr,samp:()=>ar,script:()=>Rr,section:()=>vn,select:()=>no,setGlobalErrorHandler:()=>oi,setMaxDrainIterations:()=>et,show:()=>Yo,signal:()=>A,slot:()=>co,small:()=>cr,source:()=>Ar,span:()=>L,stop:()=>Lo,store:()=>xi,strict:()=>Li,strictEffect:()=>Mi,strong:()=>ur,style:()=>U,sub:()=>lr,summary:()=>ao,sup:()=>dr,svg:()=>Cr,symbol:()=>Ro,table:()=>Pr,tagFactory:()=>l,takePendingError:()=>Te,tbody:()=>Fr,td:()=>Ir,template:()=>uo,text:()=>To,textarea:()=>ro,tfoot:()=>zr,th:()=>jr,thead:()=>qr,time:()=>fr,title:()=>xn,tr:()=>Wr,track:()=>xr,transition:()=>Oi,trapFocus:()=>bt,trustHTML:()=>Ht,tspan:()=>ko,u:()=>pr,ul:()=>jn,unregisterComponent:()=>Uo,untracked:()=>K,use:()=>Mo,var_:()=>mr,video:()=>vr,watch:()=>yi,when:()=>Qo,withSSR:()=>mi,writable:()=>Ei});var Ot={};qt(Ot,{DynamicComponent:()=>Jo,ErrorBoundary:()=>ji,ErrorDisplay:()=>je,Fragment:()=>Wo,KeepAlive:()=>Xo,Loading:()=>Wi,Portal:()=>Vo,SVG_NS:()=>_,Suspense:()=>Rt,__resetIdCounter:()=>si,a:()=>qn,abbr:()=>Wn,action:()=>ti,address:()=>An,area:()=>gr,array:()=>Si,article:()=>Sn,aside:()=>_n,asyncDerived:()=>wi,audio:()=>br,autoResize:()=>gt,b:()=>Vn,base:()=>lo,batch:()=>$,bdi:()=>Kn,bdo:()=>Un,bindDynamic:()=>nt,blockquote:()=>Hn,body:()=>yn,br:()=>Jn,button:()=>ue,canvas:()=>Lr,caption:()=>Or,catchError:()=>ni,catchErrorAsync:()=>ri,center:()=>Do,checkLeaks:()=>mn,circle:()=>mo,cite:()=>Gn,clickOutside:()=>ft,clipPath:()=>wo,code:()=>Be,col:()=>$r,colgroup:()=>Br,context:()=>Ni,copyOnClick:()=>mt,createId:()=>ii,customElement:()=>Bo,data:()=>Yn,datalist:()=>Vr,dd:()=>Dn,deepEqual:()=>le,deepSignal:()=>ki,defer:()=>Di,defs:()=>Eo,del:()=>Hr,derived:()=>Ie,details:()=>oo,dfn:()=>Qn,dialog:()=>io,disableSSR:()=>fi,dispose:()=>N,div:()=>E,dl:()=>On,dt:()=>$n,each:()=>jo,effect:()=>O,ellipse:()=>go,em:()=>Zn,embed:()=>Sr,enableSSR:()=>di,enqueueBatchedSignal:()=>J,fieldset:()=>Kr,figcaption:()=>Bn,figure:()=>Pn,font:()=>Oo,footer:()=>kn,form:()=>Ur,g:()=>bo,getAction:()=>dt,getRequestScopedCache:()=>li,getSSRStore:()=>ee,getSlot:()=>Go,h1:()=>Cn,h2:()=>Nn,h3:()=>Oe,h4:()=>Ln,h5:()=>Mn,h6:()=>Rn,head:()=>hn,header:()=>Tn,hr:()=>Fn,html:()=>st,i:()=>Xn,iframe:()=>Tr,img:()=>hr,input:()=>Jr,ins:()=>Dr,isBatching:()=>ci,isSSR:()=>te,kbd:()=>er,label:()=>Gr,lazy:()=>Mt,legend:()=>Yr,li:()=>In,line:()=>ho,linearGradient:()=>Co,link:()=>fo,longPress:()=>pt,main:()=>wn,map:()=>yr,mark:()=>tr,marker:()=>Ho,marquee:()=>$o,mask:()=>_o,match:()=>Zo,math:()=>Nr,menu:()=>so,meta:()=>po,meter:()=>Qr,mount:()=>Io,nav:()=>En,nextTick:()=>Ri,noscript:()=>Mr,object:()=>kr,ol:()=>zn,on:()=>hi,onCleanup:()=>Ci,onMount:()=>Se,onUnmount:()=>Ai,optgroup:()=>Zr,option:()=>Xr,output:()=>eo,p:()=>De,param:()=>Er,path:()=>yo,pattern:()=>Ao,picture:()=>wr,polygon:()=>xo,polyline:()=>vo,portal:()=>_r,pre:()=>$e,progress:()=>to,q:()=>nr,radialGradient:()=>No,reactiveArray:()=>Ti,rect:()=>So,ref:()=>vi,registerAction:()=>Q,registerComponent:()=>Ko,registerDisposer:()=>v,resolveComponent:()=>ut,retrack:()=>F,rp:()=>rr,rt:()=>or,ruby:()=>ir,runInSSRContext:()=>pi,s:()=>sr,samp:()=>ar,script:()=>Rr,section:()=>vn,select:()=>no,setGlobalErrorHandler:()=>oi,setMaxDrainIterations:()=>et,show:()=>Yo,signal:()=>A,slot:()=>co,small:()=>cr,source:()=>Ar,span:()=>L,stop:()=>Lo,store:()=>xi,strict:()=>Li,strictEffect:()=>Mi,strong:()=>ur,style:()=>U,sub:()=>lr,summary:()=>ao,sup:()=>dr,svg:()=>Cr,symbol:()=>Ro,table:()=>Pr,tagFactory:()=>l,takePendingError:()=>Te,tbody:()=>Fr,td:()=>Ir,template:()=>uo,text:()=>To,textarea:()=>ro,tfoot:()=>zr,th:()=>jr,thead:()=>qr,time:()=>fr,title:()=>xn,tr:()=>Wr,track:()=>xr,transition:()=>Oi,trapFocus:()=>bt,trustHTML:()=>Ht,tspan:()=>ko,u:()=>pr,ul:()=>jn,unregisterComponent:()=>Uo,untracked:()=>K,use:()=>Mo,var_:()=>mr,video:()=>vr,watch:()=>yi,when:()=>Qo,withSSR:()=>mi,writable:()=>Ei});function w(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var Wt=w();function D(e,n){if(Wt&&!e)throw new Error(`[SibuJS] ${n}`)}function k(e){Wt&&console.warn(`[SibuJS] ${e}`)}function es(e){return e.replace(/[\x00-\x20\x7f-\x9f]+/g,"")}function G(e){if(e.length<3)return!1;let n=e.toLowerCase();return n[0]==="o"&&n[1]==="n"&&n.charCodeAt(2)>=97&&n.charCodeAt(2)<=122}var ts=["http:","https:","mailto:","tel:","ftp:"];function me(e){let n=es(e).trim();if(!n)return"";let t=n.toLowerCase(),r=-1;for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);if(s===58){r=i;break}if(s===47||s===63||s===35)break}if(r===-1)return n;let o=t.slice(0,r+1);return/^[a-z][a-z0-9+.-]*:$/.test(o)&&ts.indexOf(o)===-1?"":n}function Ae(e){let n=e.split(","),t=[];for(let r=0;r<n.length;r++){let o=n[r].trim();if(!o)continue;let i=o.match(/^(\S+)(\s+.+)?$/);if(!i)continue;let s=me(i[1]);s&&t.push(i[2]?`${s}${i[2]}`:s)}return t.join(", ")}var ns=/[(:@\\]/;function We(e){if(!ns.test(e))return e;let t=e.replace(/\\([0-9a-fA-F]{1,6})\s?/g,(r,o)=>{let i=Number.parseInt(o,16);if(!Number.isFinite(i)||i<0||i>1114111)return"";try{return String.fromCodePoint(i)}catch{return""}}).toLowerCase().replace(/\s+/g,"");return t.includes("url(")||t.includes("expression(")||t.includes("javascript:")||t.includes("vbscript:")||t.includes("-moz-binding")||t.includes("behavior:")||t.includes("@import")||t.includes("image-set(")||t.includes("filter:progid")?"":e}var Vt=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data"]);function Ve(e){return Vt.has(e.toLowerCase())}function ge(e,n){let t=e.toLowerCase();return t==="srcset"?Ae(n):Vt.has(t)?me(n):n}var rs=w(),os=4096,Ke=[];function is(){return{sig:null,sub:null,epoch:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function ss(e,n,t){let r=Ke.pop();if(r)return r.sig=e,r.sub=n,r.epoch=t,r;let o=is();return o.sig=e,o.sub=n,o.epoch=t,o}function Kt(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Ke.length<os&&Ke.push(e)}function as(e,n){let t=e.subsHead??null;n.sigPrev=null,n.sigNext=t,t?t.sigPrev=n:e.subsTail=n,e.subsHead=n,e.__sc=(e.__sc??0)+1}function Ut(e){let n=e.sig;if(!n)return;let t=e.sigPrev,r=e.sigNext;t?t.sigNext=r:n.subsHead=r,r?r.sigPrev=t:n.subsTail=t,n.__sc=(n.__sc??1)-1,n.__activeNode===e&&(n.__activeNode=e.prevActive),n.__sc===0&&(n.subsHead=null,n.subsTail=null)}function cs(e,n){let t=e.depsTail??null;n.subPrev=t,n.subNext=null,t?t.subNext=n:e.depsHead=n,e.depsTail=n}function us(e){let n=e.sub;if(!n)return;let t=e.subPrev,r=e.subNext;t?t.subNext=r:n.depsHead=r,r?r.subPrev=t:n.depsTail=t}var P=null,Ue=null,W=0,V=[],B=new Set,ls=[];function ds(e){try{e()}catch(n){rs&&k(`Subscriber threw during notification: ${n instanceof Error?n.message:String(n)}`)}}var Ce=0,Ge=!1;function Ye(){Ce===0&&(Ue=P,P=null,Ge=!0),Ce++}function Qe(){Ce--,Ce===0&&(P=Ue,Ue=null,Ge=!1)}function Jt(){return Ge}function Gt(e){Ye();try{return e()}finally{Qe()}}var fs=0;function Ze(e,n){let t=P;P=n;let r=n,o=++fs;r._epoch=o,r._structDirty=!1;for(let i=r.depsHead??null;i!==null;i=i.subNext){let s=i.sig;i.prevActive=s.__activeNode??null,s.__activeNode=i}try{e()}finally{P=t;let i=r.depsHead??null;for(;i!==null;){let s=i.subNext,a=i.sig;a.__activeNode=i.prevActive,i.prevActive=null,i.epoch!==o&&(us(i),Ut(i),Kt(i)),i=s}}}function Yt(e,n){if(!n)return Xe(e);be(n);let t=P;P=n;try{e()}finally{P=t;let o=n;for(let i=o.depsHead??null;i!==null;i=i.subNext){let s=i.sig;s.__activeNode=i.prevActive,i.prevActive=null}}let r=n;return r._dispose??(r._dispose=()=>be(n))}function Xe(e){let n=()=>{let r=t;if(!(r._disposed||r._reentrant)){r._reentrant=!0;try{Ze(e,t)}finally{r._reentrant=!1}}},t=n;return t.depsHead=null,t.depsTail=null,t._epoch=0,t._structDirty=!1,t._runEpoch=0,t._runs=0,t._reentrant=!1,t._disposed=!1,n(),t._dispose??(t._dispose=()=>{t._disposed=!0,be(t)})}function Qt(e){if(!P)return;let n=P,t=e,r=n._epoch??0,o=t.__activeNode??null;if(o!==null&&o.sub===n){o.epoch=r;return}let i=ss(e,n,r);i.prevActive=o,t.__activeNode=i,cs(n,i),as(t,i),n._structDirty=!0}function be(e){let n=e,t=n.depsHead??null;for(n.depsHead=null,n.depsTail=null;t;){let r=t.subNext;Ut(t),Kt(t),t=r}}var Ne=50,Le=1e6,Me=0;function Zt(e){let n=Ne;return Number.isFinite(e)&&e>0&&(Ne=Math.floor(e)),n}function Xt(e){let n=Le;return Number.isFinite(e)&&e>0&&(Le=Math.floor(e)),n}function ps(e){let n=e;return n._runEpoch!==Me?(n._runEpoch=Me,n._runs=1,!1):(n._runs=(n._runs??0)+1,n._runs>Ne)}function ms(e){if(typeof console<"u"){let n=e.__name??"<unnamed>";console.error(`[SibuJS] subscriber "${n}" fired more than ${Ne} times \u2014 likely a write-reads-self cycle between effects/signals. Breaking to prevent infinite loop.`)}}function gs(){typeof console<"u"&&console.error(`[SibuJS] Notification drain exceeded ${Le} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`)}function en(){let e=0;for(;e<V.length;){if(e>=Le){gs();break}let n=V[e++];if(ps(n)){ms(n);break}B.delete(n),ds(n)}}function tn(){if(!(W>0)){W++,Me++;try{en()}finally{W--,W===0&&(V.length=0,B.clear())}}}function Je(e){e();let n=e._sig;if(!n)return;let t=ls,r=t.length;for(t.push(n);t.length>r;){let i=t.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?a._d||(a._d=!0,t.push(a)):s()}else B.has(s)||(B.add(s),V.push(s));i=i.sigNext}}}function nn(e){let t=e.subsHead??null;for(;t;){let r=t.sub;r&&(r._c?Je(r):B.has(r)||(B.add(r),V.push(r))),t=t.sigNext}}function rn(e){let t=e.subsHead;if(t){if(W>0){let r=t;for(;r;){let o=r.sub;o&&(o._c?Je(o):B.has(o)||(B.add(o),V.push(o))),r=r.sigNext}return}W++,Me++;try{let r=t;for(;r;){let o=r.sub;o&&(o._c?Je(o):B.has(o)||(B.add(o),V.push(o))),r=r.sigNext}en()}finally{W--,W===0&&(V.length=0,B.clear())}}}function on(e){return e.__sc??0}function sn(e){let n=e,t=[],r=n.depsHead??null;for(;r;)r.sig&&t.push(r.sig),r=r.subNext;return t}function an(e,n){let t=e.subsHead??null;for(;t;){let r=t.sub;r&&n(r),t=t.sigNext}}var hs=w(),cn="3.3.3",un=Symbol.for("sibujs.reactive.v1");function ys(){let e=globalThis,n=e[un];if(n)return hs&&!n.__dupWarned&&(n.__dupWarned=!0,k(`Multiple instances of the reactive runtime detected on this page (active: ${n.version}, duplicate: ${cn}). Reactivity still works \u2014 all copies share the first one \u2014 but de-duplicate sibujs in your bundler (e.g. Vite optimizeDeps.exclude: ['sibujs'] or resolve.dedupe: ['sibujs']).`)),n;let t={suspendTracking:Ye,resumeTracking:Qe,isTrackingSuspended:Jt,untracked:Gt,retrack:Ze,track:Yt,reactiveBinding:Xe,recordDependency:Qt,cleanup:be,setMaxSubscriberRepeats:Zt,setMaxDrainIterations:Xt,drainNotificationQueue:tn,queueSignalNotification:nn,notifySubscribers:rn,getSubscriberCount:on,getSubscriberDeps:sn,forEachSubscriber:an,version:cn};return e[un]=t,t}var R=ys(),he=R.suspendTracking,ye=R.resumeTracking,ln=R.isTrackingSuspended,K=R.untracked,F=R.retrack,C=R.track,xe=R.reactiveBinding,oe=R.recordDependency,dn=R.cleanup,ua=R.setMaxSubscriberRepeats,et=R.setMaxDrainIterations,fn=R.drainNotificationQueue,pn=R.queueSignalNotification,ie=R.notifySubscribers,la=R.getSubscriberCount,da=R.getSubscriberDeps,fa=R.forEachSubscriber;var Re=w();function tt(e,n,t){e[n]=t}function He(e,n,t){if(G(n))return Re&&k(`bindAttribute: refusing to bind event-handler attribute "${n}". Use on:{ ${n.slice(2)}: fn } instead.`),()=>{};function r(){let o;try{o=t()}catch(s){Re&&k(`bindAttribute: getter for "${n}" threw: ${s instanceof Error?s.message:String(s)}`);return}if(typeof o=="boolean"){n in e&&(n==="checked"||n==="disabled"||n==="selected")?tt(e,n,o):o?e.setAttribute(n,""):e.removeAttribute(n);return}let i=String(o);(n==="value"||n==="checked")&&n in e?tt(e,n,n==="checked"?!!o:i):e.setAttribute(n,ge(n,i))}return xe(r)}function nt(e,n,t){let r=null;function o(){let s;try{s=typeof n=="function"?n():n}catch(u){Re&&k(`bindDynamic: name getter threw: ${u instanceof Error?u.message:String(u)}`);return}let a;try{a=typeof t=="function"?t():t}catch(u){Re&&k(`bindDynamic: value getter threw: ${u instanceof Error?u.message:String(u)}`);return}if(G(s))return;r!==null&&r!==s&&e.removeAttribute(r);let c=String(a);(s==="value"||s==="checked")&&s in e?tt(e,s,s==="checked"?!!a:c):e.setAttribute(s,ge(s,c)),r=s}let i=xe(o);return()=>{i(),r!==null&&e.removeAttribute(r)}}var se=new WeakMap,ae=w(),ce=0;function v(e,n){let t=se.get(e);t||(t=[],se.set(e,t)),t.push(n),ae&&ce++}function N(e){let n=[e],t=[];for(;n.length>0;){let r=n.pop();t.push(r);let o=Array.from(r.childNodes);for(let i=0;i<o.length;i++)n.push(o[i])}for(let r=t.length-1;r>=0;r--){let o=t[r],i=se.get(o);if(i){let s=i.slice();se.delete(o),ae&&(ce-=s.length);for(let c of s)try{c()}catch(u){ae&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",u)}let a=0;for(;a++<8;){let c=se.get(o);if(!c||c.length===0)break;let u=c.slice();se.delete(o),ae&&(ce-=u.length);for(let d of u)try{d()}catch(g){ae&&typeof console<"u"&&console.warn("[SibuJS] Disposer threw during cleanup:",g)}}}}}function mn(e=0){return ae?(e>0&&ce>e&&k(`checkLeaks: ${ce} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),ce):0}var gn=w();function Y(e,n){let t=[];function r(){let o;try{o=n()}catch(u){gn&&k(`bindChildNode: getter threw: ${u instanceof Error?u.message:String(u)}`);return}if(o==null||typeof o=="boolean"){for(let u=0;u<t.length;u++){let d=t[u];N(d),d.parentNode&&d.parentNode.removeChild(d)}t.length=0;return}let i=e.parentNode;if(!i){t.length=0;return}let s;if(Array.isArray(o)){s=[];let u=new Set;for(let d=0;d<o.length;d++){let g=o[d];if(g==null||typeof g=="boolean")continue;let S=g instanceof Node?g:document.createTextNode(String(g));if(u.has(S)){gn&&k("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}u.add(S),s.push(S)}}else s=[o instanceof Node?o:document.createTextNode(String(o))];let a;if(t.length>0&&s.length>0){let u=new Set(t);a=new Set;for(let d=0;d<s.length;d++)u.has(s[d])&&a.add(s[d])}for(let u=0;u<t.length;u++){let d=t[u];a?.has(d)||(N(d),d.parentNode&&d.parentNode.removeChild(d))}let c=e;for(let u=0;u<s.length;u++){let d=s[u];c.nextSibling!==d&&i.insertBefore(d,c.nextSibling),c=d}t=s}return xe(r)}var _="http://www.w3.org/2000/svg",rt=w(),xs=new Set(["script","iframe","object","embed","frame","frameset"]);function vs(e){return xs.has(e.toLowerCase())}var Ss=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);function Ts(e,n,t){e[n]=t}function ks(e){let n=e.trim();if(!n)return!1;let t=n.split(/\s+/),r=!1;for(let o=0;o<t.length;o++){let i=t[o];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(i))return!1;/[-:/0-9]/.test(i)&&(r=!0)}return r}var bn=new Map;function Es(e){let n=bn.get(e);return n!==void 0||(n=e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),bn.set(e,n)),n}function ws(e,n){if(typeof n=="function"){let r=C(()=>{e.setAttribute("style",n())});v(e,r);return}if(typeof n=="string"){e.setAttribute("style",n);return}let t=e;for(let r in n){let o=n[r],i=Es(r);if(typeof o=="function"){let s=o,a=C(()=>{t.style.setProperty(i,We(String(s())))});v(e,a)}else t.style.setProperty(i,We(String(o)))}}function _s(e,n){if(typeof n=="string"){e.setAttribute("class",n);return}if(typeof n=="function"){let i=C(()=>{e.setAttribute("class",n())});v(e,i);return}let t=n,r=!1,o="";for(let i in t){let s=t[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=C(()=>{let a="";for(let c in t){let u=t[c];(typeof u=="function"?u():u)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)});v(e,s)}else e.setAttribute("class",o)}function ot(e,n){if(typeof n=="string"){e.textContent=n;return}if(typeof n=="number"){e.textContent=String(n);return}if(!(typeof n=="boolean"||n==null)){if(typeof n=="function"){let t=document.createComment("");e.appendChild(t),v(e,Y(t,n));return}if(n instanceof Node){e.appendChild(n);return}if(Array.isArray(n))for(let t=0;t<n.length;t++){let r=n[t];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),v(e,Y(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,Y(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 l=(e,n)=>{let t=vs(e);return(r,o)=>{if(t)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);let i=n?document.createElementNS(n,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),ot(i,o),i):(rt&&ks(r)&&k(`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return ot(i,r),i;let s=r,a=s.class;a!=null&&_s(i,a);let c=s.id;c!=null&&(rt&&typeof c=="string"&&Ss.has(c.toLowerCase())&&k(`tagFactory: element id="${c}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=c);let u=o!==void 0?o:s.nodes;u!=null&&ot(i,u);let d=s.on;if(d)for(let f in d){let m=d[f];typeof m=="function"?i.addEventListener(f,m):rt&&k(`tagFactory: on.${f} handler is not a function (got ${typeof m}). Event listener was not attached.`)}let g=s.style;g!=null&&ws(i,g);let S=s.ref;S&&(S.current=i);for(let f in s)switch(f){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let m=s[f];if(m==null||G(f))continue;typeof m=="function"?v(i,He(i,f,m)):typeof m=="boolean"?f in i&&(f==="checked"||f==="disabled"||f==="selected")?Ts(i,f,m):m?i.setAttribute(f,""):i.removeAttribute(f):i.setAttribute(f,ge(f,String(m)))}}return s.onElement&&typeof s.onElement=="function"&&s.onElement(i),i}};var Ra=l("html"),hn=l("head"),yn=l("body"),xn=l("title"),E=l("div"),L=l("span"),vn=l("section"),Sn=l("article"),Tn=l("header"),kn=l("footer"),En=l("nav"),wn=l("main"),_n=l("aside"),An=l("address"),De=l("p"),Cn=l("h1"),Nn=l("h2"),Oe=l("h3"),Ln=l("h4"),Mn=l("h5"),Rn=l("h6"),Hn=l("blockquote"),Dn=l("dd"),On=l("dl"),$n=l("dt"),Bn=l("figcaption"),Pn=l("figure"),Fn=l("hr"),In=l("li"),zn=l("ol"),jn=l("ul"),$e=l("pre"),qn=l("a"),Wn=l("abbr"),Vn=l("b"),Kn=l("bdi"),Un=l("bdo"),Jn=l("br"),Gn=l("cite"),Be=l("code"),Yn=l("data"),Qn=l("dfn"),Zn=l("em"),Xn=l("i"),er=l("kbd"),tr=l("mark"),nr=l("q"),rr=l("rp"),or=l("rt"),ir=l("ruby"),sr=l("s"),ar=l("samp"),cr=l("small"),ur=l("strong"),lr=l("sub"),dr=l("sup"),fr=l("time"),pr=l("u"),mr=l("var"),gr=l("area"),br=l("audio"),hr=l("img"),yr=l("map"),xr=l("track"),vr=l("video"),Sr=l("embed"),Tr=l("iframe"),kr=l("object"),Er=l("param"),wr=l("picture"),_r=l("portal"),Ar=l("source"),Cr=l("svg",_),Nr=l("math"),Lr=l("canvas"),Mr=l("noscript"),Rr=l("script"),Hr=l("del"),Dr=l("ins"),Or=l("caption"),$r=l("col"),Br=l("colgroup"),Pr=l("table"),Fr=l("tbody"),Ir=l("td"),zr=l("tfoot"),jr=l("th"),qr=l("thead"),Wr=l("tr"),ue=l("button"),Vr=l("datalist"),Kr=l("fieldset"),Ur=l("form"),Jr=l("input"),Gr=l("label"),Yr=l("legend"),Qr=l("meter"),Zr=l("optgroup"),Xr=l("option"),eo=l("output"),to=l("progress"),no=l("select"),ro=l("textarea"),oo=l("details"),io=l("dialog"),so=l("menu"),ao=l("summary"),co=l("slot"),uo=l("template"),lo=l("base"),fo=l("link"),po=l("meta"),U=l("style"),mo=l("circle",_),go=l("ellipse",_),bo=l("g",_),ho=l("line",_),yo=l("path",_),xo=l("polygon",_),vo=l("polyline",_),So=l("rect",_),To=l("text",_),ko=l("tspan",_),Eo=l("defs",_),wo=l("clipPath",_),_o=l("mask",_),Ao=l("pattern",_),Co=l("linearGradient",_),No=l("radialGradient",_),Lo=l("stop",_),Mo=l("use",_),Ro=l("symbol",_),Ho=l("marker",_),Do=l("center"),Oo=l("font"),$o=l("marquee"),Bo=e=>l(e);var As=w(),Cs=new Set(["script","style"]),Ns=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Po=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),Fo=new WeakMap;function Ls(e){let n=e.length-1,t=e[0];for(let f=0;f<n;f++)t+=`\0${f}\0${e[f+1]}`;let r=0,o=t.length;function i(){for(;r<o&&(t[r]===" "||t[r]===" "||t[r]===`
2
+ `||t[r]==="\r");)r++}function s(){if(t.charCodeAt(r)!==0)return-1;let f=r;r++;let m=0;for(;r<o&&t.charCodeAt(r)!==0;)m=m*10+(t.charCodeAt(r)-48),r++;return r<o&&r++,m<0||m>=n?(r=f,-1):m}function a(){let f=r;for(;r<o;){let m=t.charCodeAt(r);if(m>=97&&m<=122||m>=65&&m<=90||m>=48&&m<=57||m===45)r++;else break}return t.slice(f,r)}function c(){if(i(),t[r]!=="=")return{kind:"bool"};r++,i();let f=s();if(f>=0)return{kind:"expr",idx:f};let m=t[r];if(m==='"'||m==="'"){r++;let y=[],b=[],p="";for(;r<o&&t[r]!==m;){let x=s();x>=0?(y.push(p),p="",b.push(x)):p+=t[r++]}return r<o&&r++,y.push(p),b.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:b}}{let y=[],b=[],p="";for(;r<o;){let x=t.charCodeAt(r);if(x===32||x===9||x===10||x===13||x===62)break;let T=s();T>=0?(y.push(p),p="",b.push(T)):p+=t[r++]}return y.push(p),b.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:b}}}function u(){let f=[];for(;r<o&&(i(),!(t[r]===">"||t[r]==="/"));){let m=r;for(;r<o;){let p=t.charCodeAt(r);if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57||p===45||p===58||p===95||p===46)r++;else break}let y=t.slice(m,r);if(!y)break;let b=c();y.startsWith("on:")?b.kind==="expr"&&f.push({t:3,name:y.slice(3),idx:b.idx}):b.kind==="bool"?f.push({t:4,name:y}):b.kind==="static"?f.push({t:0,name:y,value:b.value}):b.kind==="expr"?f.push({t:1,name:y,idx:b.idx}):b.kind==="mixed"&&f.push({t:2,name:y,statics:b.statics,exprs:b.exprs})}return f}function d(f){return f.replace(/\s+/g," ")}function g(f){let m="";for(;r<o&&t[r]!=="<";){let b=s();if(b>=0){let p=d(m);p&&f.push({t:1,value:p}),m="",f.push({t:2,idx:b})}else m+=t[r++]}let y=d(m);y&&f.push({t:1,value:y})}function S(){let f=[];for(;r<o&&!(t[r]==="<"&&r+1<o&&t[r+1]==="/");)if(t[r]==="<"){let m=t[r+1];if(m==="!"){if(t.startsWith("<!--",r)){let T=t.indexOf("-->",r+4);r=T===-1?o:T+3}else if(t.startsWith("<![CDATA[",r)){let T=t.indexOf("]]>",r+9);r=T===-1?o:T+3}else{let T=t.indexOf(">",r);r=T===-1?o:T+1}continue}if(m==="?"){let T=t.indexOf(">",r);r=T===-1?o:T+1;continue}if(!(m>="a"&&m<="z")&&!(m>="A"&&m<="Z")){f.push({t:1,value:"<"}),r++;continue}r++;let y=a(),b=u();i();let p=Ns.has(y),x=t[r]==="/";if(x&&r++,r<o&&r++,p||x)f.push({t:0,el:{tag:y,svg:Po.has(y),attrs:b,children:[]}});else{let T=S();if(Cs.has(y.toLowerCase())){for(let I=0;I<T.length;I++)if(T[I].t===2)throw new Error(`html: dynamic \${...} expressions are not allowed inside <${y}> (raw-text context). Build the content separately and append it as a Node.`)}t[r]==="<"&&r+1<o&&t[r+1]==="/"&&(r+=2,a(),i(),r<o&&t[r]===">"&&r++),f.push({t:0,el:{tag:y,svg:Po.has(y),attrs:b,children:T}})}}else g(f);return f}return S()}function it(e,n){let t=e.svg?document.createElementNS(_,e.tag):document.createElement(e.tag);for(let r=0;r<e.attrs.length;r++){let o=e.attrs[r];switch(o.t){case 0:t.setAttribute(o.name,o.value);break;case 1:{let i=o.name,s=i.toLowerCase();if(G(i))break;let a=n[o.idx];if(typeof a=="function")v(t,He(t,i,a));else if(a!=null){let c=String(a);s==="srcset"?t.setAttribute(i,Ae(c)):Ve(s)?t.setAttribute(i,me(c)):t.setAttribute(i,c)}break}case 2:{let i=o.statics[0];for(let a=0;a<o.exprs.length;a++){let c=n[o.exprs[a]];i+=(c==null?"":String(c))+o.statics[a+1]}let s=o.name.toLowerCase();s==="srcset"?t.setAttribute(o.name,Ae(i)):Ve(s)?t.setAttribute(o.name,me(i)):t.setAttribute(o.name,i);break}case 3:{let i=n[o.idx];typeof i=="function"?t.addEventListener(o.name,i):As&&k(`html: on:${o.name} handler is not a function (got ${typeof i}). Event listener was not attached.`);break}case 4:t.setAttribute(o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:t.appendChild(it(o.el,n));break;case 1:t.appendChild(document.createTextNode(o.value));break;case 2:{let i=n[o.idx];if(typeof i=="function"){let s=document.createComment("");t.appendChild(s),v(t,Y(s,i))}else if(i instanceof Node)t.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?t.appendChild(a):a!=null&&typeof a!="boolean"&&t.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&t.appendChild(document.createTextNode(String(i)));break}}}return t}function st(e,...n){let t=Fo.get(e);if(t||(t=Ls(e),Fo.set(e,t)),t.length===1&&t[0].t===0)return it(t[0].el,n);let r=document.createElement("div");for(let o=0;o<t.length;o++){let i=t[o];switch(i.t){case 0:r.appendChild(it(i.el,n));break;case 1:r.appendChild(document.createTextNode(i.value));break;case 2:{let s=n[i.idx];if(s instanceof Node)r.appendChild(s);else if(typeof s=="function"){let a=document.createComment("bind:htm");r.appendChild(a),v(r,Y(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 Io(e,n){if(!n)throw new Error("[SibuJS mount] container element not found. Make sure the DOM element exists before calling mount().");D(typeof e=="function"||e instanceof Node,"mount: first argument must be a component function or a DOM Node.");let t=typeof performance<"u"?performance.now():0,r=typeof e=="function"?e():e,o=typeof performance<"u"?performance.now()-t:0;n.appendChild(r);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:r,container:n,duration:o}),{node:r,unmount(){i&&i.emit("app:unmount",{rootElement:r}),N(r),r.parentNode&&r.parentNode.removeChild(r)}}}var at=w();function zo(e){return typeof e=="function"?zo(e()):e instanceof Node?e:document.createTextNode(String(e))}function Ms(e,n){if(n===0)return[];let t=[],r=new Array(n);for(let a=0;a<n;a++){let c=e[a],u=0,d=t.length;for(;u<d;){let g=u+d>>1;e[t[g]]<c?u=g+1:d=g}t[u]=a,r[a]=u>0?t[u-1]:-1}let o=t.length,i=new Array(o),s=t[o-1];for(let a=o-1;a>=0;a--)i[a]=s,s=r[s];return i}function jo(e,n,t){D(typeof e=="function","each: first argument must be a function that returns an array."),D(typeof n=="function","each: second argument must be a render function."),D(t&&typeof t.key=="function","each: options.key must be a function that returns a unique key per item.");let r=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],a=i,c=0,u=new Map,d=new Map,g=[],S=[],f=new Uint8Array(0),m=new Map,y=[],b=[],p=new Map,x=!1,T=!1,I=t.key,$t=()=>{let Bt=e(),M=Bt.length,ke=r.parentNode;if(!ke)return;T||(ke.insertBefore(o,r.nextSibling),T=!0),S.length<M&&(S=new Array(M));for(let h=0;h<M;h++)S[h]=I(Bt[h]);let q=S;g.length<M&&(g=new Array(M)),d.clear(),p.clear();for(let h=0;h<M;h++)at&&p.has(q[h])&&k(`each: duplicate key "${String(q[h])}" at index ${h} (first seen at ${p.get(q[h])}). Keys must be unique \u2014 duplicates cause rows to be dropped or mis-ordered.`),p.set(q[h],h);for(let h=0;h<M;h++){let H=q[h],Ft=u.get(H),pe;if(Ft!==void 0)pe=Ft;else{let It=H,Ui=()=>K(()=>e()[p.get(It)]),Ji=()=>p.get(It);try{pe=zo(n(Ui,Ji))}catch(re){at&&k(`each: render threw for item at index ${h} (key="${q[h]}"): ${re instanceof Error?re.message:String(re)}`),pe=document.createComment(`each:error:${h}`);let zt=re instanceof Error?re:new Error(String(re));queueMicrotask(()=>{try{let jt=r.parentNode;jt?.dispatchEvent?jt.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:zt}})):at&&k(`each: error not surfaced \u2014 anchor detached: ${zt.message}`)}catch{}})}}d.set(H,pe),g[h]=pe}for(let[h,H]of u)d.has(h)||(N(H),H.parentNode&&ke.removeChild(H));if(M===0){c=0;let h=u;u=d,d=h;return}m.clear();for(let h=0;h<c;h++)m.set(a[h],h);y.length<M&&(y=new Array(M),b=new Array(M));let Ee=0;for(let h=0;h<M;h++){let H=m.get(q[h]);H!==void 0&&(y[Ee]=h,b[Ee]=H,Ee++)}let Pt=Ms(b,Ee);f.length<M?f=new Uint8Array(M):f.fill(0,0,M);for(let h=0;h<Pt.length;h++)f[y[Pt[h]]]=1;let we=o;for(let h=M-1;h>=0;h--){let H=g[h];f[h]||H.nextSibling!==we&&ke.insertBefore(H,we),we=H}let _e=a===i?s:i;_e.length<M&&(_e.length=M);for(let h=0;h<M;h++)_e[h]=q[h];a=_e,c=M;let Ki=u;u=d,d=Ki,x=!0},Vi=C($t);return v(r,Vi),x||queueMicrotask(()=>{!x&&r.parentNode&&$t()}),r}function Wo(e){let n=document.createDocumentFragment();for(let t of e)if(!(t==null||typeof t=="boolean"))if(Array.isArray(t))for(let r of t)r==null||typeof r=="boolean"||n.appendChild(qo(r));else n.appendChild(qo(t));return n}function qo(e){if(e==null)return document.createTextNode("");if(e instanceof Node)return e;if(typeof e=="function"){let n=e();return n instanceof Node?n:document.createTextNode(String(n??""))}return document.createTextNode(String(e))}function Vo(e,n){let t=document.createComment("portal"),r=n||document.body,o=null,i=!1;return queueMicrotask(()=>{if(!i)try{o=e(),r.appendChild(o)}catch(s){typeof console<"u"&&console.error("[Portal] Render error:",s);let a=s instanceof Error?s:new Error(String(s));queueMicrotask(()=>{try{let c=t.parentNode;c?.dispatchEvent&&c.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:a}}))}catch{}})}}),v(t,()=>{i=!0,o&&(N(o),o.remove(),o=null)}),t}var ct=new Map;function Ko(e,n){ct.set(e,n)}function Uo(e){ct.delete(e)}function ut(e){let n=ct.get(e);return n?n():E({nodes:`[Component "${e}" not found]`})}function Jo(e){let n=E({class:"sibu-dynamic"});function t(){let o=e(),i;typeof o=="function"?i=o():i=ut(o);for(let s of Array.from(n.childNodes))N(s);n.replaceChildren(i)}let r=C(t);return v(n,r),n}function Go(e,n="default"){return e?.[n]}function Yo(e,n){return v(n,C(()=>{n.style.display=e()?"":"none"})),n}function Qo(e,n,t){let r=document.createComment("when"),o=null,i,s=!1,a=()=>{let c=e(),u=r.parentNode;if(!u||s&&c===i)return;i=c,o?.parentNode&&(N(o),o.parentNode.removeChild(o),o=null);let d=c?n():t?t():null;if(d!=null){let g=d instanceof Node?d:document.createTextNode(String(d));u.insertBefore(g,r.nextSibling),o=g}s=!0};return v(r,C(a)),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function Zo(e,n,t){let r=document.createComment("match"),o=null,i,s=!1,a=()=>{let c=String(e()),u=r.parentNode;if(!u||s&&c===i)return;i=c,o?.parentNode&&(N(o),o.parentNode.removeChild(o),o=null);let d=n[c]||t;if(d){let g=d();if(g!=null){let S=g instanceof Node?g:document.createTextNode(String(g));u.insertBefore(S,r.nextSibling),o=S}}s=!0};return v(r,C(a)),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function Xo(e,n,t){let r=document.createComment("keep-alive"),o=new Map,i=[],s=t?.max??10;s===0&&w()&&k("KeepAlive: unbounded cache (max: 0). Cached subtrees will never be evicted \u2014 set `max` to bound memory.");let a,c=null,u=!1,d=!1,g=()=>{if(d)return;let f=e(),m=r.parentNode;if(!m||u&&f===a)return;c?.parentNode&&m.removeChild(c),a=f;let y=o.get(f);if(y){let b=i.indexOf(f);b!==-1&&(i.splice(b,1),i.push(f))}else{let b=n[f];if(!b){c=null,u=!0;return}if(y=b(),y instanceof DocumentFragment){let p=document.createElement("div");p.style.display="contents",p.appendChild(y),y=p}if(o.set(f,y),i.push(f),s>0&&i.length>s){let p=i.shift(),x=o.get(p);x&&(N(x),x.parentNode&&x.parentNode.removeChild(x),o.delete(p))}}m.insertBefore(y,r.nextSibling),c=y,u=!0},S=C(g);return u||queueMicrotask(()=>{!u&&r.parentNode&&g()}),v(r,()=>{d=!0,S();for(let f of o.values())N(f),f.parentNode&&f.parentNode.removeChild(f);o.clear(),i.length=0,c=null}),r}var lt=Symbol.for("sibujs.actions.v1"),ei=globalThis[lt]??(globalThis[lt]=new Map);function Q(e,n){ei.set(e,n)}function dt(e){return ei.get(e)}function ti(e,n,t){let r=typeof n=="string"?dt(n):n;if(!r)throw new Error(`[SibuJS] No action registered under the name "${n}". Register it with registerAction() before applying it by name.`);let o=r(e,t);typeof o=="function"&&v(e,o)}var ft=(e,n)=>{let t=r=>{e.contains(r.target)||n()};return document.addEventListener("pointerdown",t,!0),()=>document.removeEventListener("pointerdown",t,!0)},pt=(e,n)=>{let t=n.duration??500,r=null,o=()=>{r=setTimeout(()=>{n.callback(),r=null},t)},i=()=>{r!==null&&(clearTimeout(r),r=null)};return e.addEventListener("pointerdown",o),e.addEventListener("pointerup",i),e.addEventListener("pointerleave",i),()=>{i(),e.removeEventListener("pointerdown",o),e.removeEventListener("pointerup",i),e.removeEventListener("pointerleave",i)}},mt=(e,n)=>{let t=()=>{let r=typeof n=="function"?n():e.textContent??"";navigator.clipboard.writeText(r)};return e.addEventListener("click",t),()=>e.removeEventListener("click",t)},gt=e=>{let n=()=>{e.style.overflow="hidden",e.style.height="auto",e.style.height=`${e.scrollHeight}px`};return n(),e.addEventListener("input",n),()=>e.removeEventListener("input",n)},bt=e=>{let n='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',t=r=>{if(r.key!=="Tab")return;let o=Array.from(e.querySelectorAll(n));if(o.length===0)return;let i=o[0],s=o[o.length-1];r.shiftKey&&document.activeElement===i?(r.preventDefault(),s.focus()):!r.shiftKey&&document.activeElement===s&&(r.preventDefault(),i.focus())};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)};Q("clickOutside",ft);Q("longPress",pt);Q("copyOnClick",mt);Q("autoResize",gt);Q("trapFocus",bt);var Z=null;function ni(e,n){try{let t=e();return t&&typeof t.then=="function"&&t.catch(r=>{n?n(r,"async"):Z?Z(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),t}catch(t){return n?n(t,"sync"):Z?Z(t,"sync"):console.error("Unhandled error in Sibu.catchError:",t),null}}async function ri(e,n){try{return await e()}catch(t){return n?n(t,"async"):Z?Z(t,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",t),null}}function oi(e){Z=e}var ht=Symbol.for("sibujs.createId.v1"),yt=globalThis[ht]??(globalThis[ht]={n:0});function ii(e="sibu"){return yt.n++,`${e}-${yt.n}`}function si(){yt.n=0}var ve=0,xt=new Set;function Rs(e){ve++;try{return e()}finally{ve--,ve===0&&Os()}}function Hs(e){return ve===0?!1:(xt.add(e),!0)}function Ds(){return ve>0}function Os(){try{for(let e of xt)pn(e)}finally{xt.clear()}fn()}var ai=Symbol.for("sibujs.reactive.batch.v1");function $s(){let e=globalThis,n=e[ai];if(n)return n;let t={batch:Rs,enqueueBatchedSignal:Hs,isBatching:Ds};return e[ai]=t,t}var vt=$s(),$=vt.batch,J=vt.enqueueBatchedSignal,ci=vt.isBatching;var St=globalThis,Pe=w();function A(e,n){let t={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0},r=Pe?n?.name:void 0,o=n?.equals;r&&(t.__name=r);function i(){return oe(t),t.value}i.__signal=t,r&&(i.__name=r);let s;if(o?s=a=>{let c=t.value,u=typeof a=="function"?a(c):a;if(!o(c,u)){if(t.value=u,t.__v++,Pe){let d=St.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:u})}J(t)||ie(t)}}:Pe?s=a=>{let c=t.value,u=typeof a=="function"?a(c):a;if(Object.is(u,c))return;t.value=u,t.__v++;let d=St.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:t,name:r,oldValue:c,newValue:u}),J(t)||ie(t)}:s=a=>{let c=t.value,u=typeof a=="function"?a(c):a;Object.is(u,c)||(t.value=u,t.__v++,J(t)||ie(t))},Pe){let a=St.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:t,name:r,getter:i,initial:e})}return[i,s]}var Tt=Symbol.for("sibujs.ssr.v1");function Bs(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let n=null,t=process.getBuiltinModule;if(typeof t=="function")n=t("node:async_hooks");else{let r=Function("return typeof require==='function'?require:null")();r&&(n=r("node:async_hooks"))}n&&(e=new n.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0}}}var ui=globalThis[Tt]??(globalThis[Tt]=Bs()),Fe=ui.als,X=ui.fallbackStore;function ee(){if(Fe){let e=Fe.getStore();if(e)return e}return X}function te(){return ee().ssr}function li(e){if(!te())return null;let n=ee(),t=n.caches??(n.caches=new Map),r=t.get(e);return r||(r=new Map,t.set(e,r)),r}function di(){ee().ssr=!0}function fi(){ee().ssr=!1}function pi(e){let n={ssr:!0,suspenseIdCounter:0};if(Fe)return Fe.run(n,e);let t=X.ssr,r=X.suspenseIdCounter;X.ssr=!0,X.suspenseIdCounter=0;try{return e()}finally{X.ssr=t,X.suspenseIdCounter=r}}function mi(e){let n=ee(),t=n.ssr;n.ssr=!0;try{return e()}finally{t||(n.ssr=!1)}}var kt=globalThis;function hi(e,n){let t,r=!0;return()=>{let o=e();if(r)r=!1,t=o,K(()=>n(o,void 0));else{let i=t;t=o,K(()=>n(o,i))}}}var gi=100;function Et(e){let n=e.userCleanups;if(n.length!==0){e.userCleanups=[];for(let t=n.length-1;t>=0;t--)try{n[t]()}catch(r){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw:",r)}}}function bi(e){let n=1;do e.rerunPending=!1,e.userCleanups.length>0&&Et(e),F(e.bodyFn,e.subscriber);while(e.rerunPending&&++n<=gi);e.rerunPending&&(e.rerunPending=!1,kt.__SIBU_DEV_WARN__!==!1&&typeof console<"u"&&console.error(`[SibuJS] effect re-requested itself ${gi}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`))}function Ps(e){if(e.disposed)return;e.disposed=!0;let n=kt.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(n)try{n.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Et(e)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",t)}try{dn(e.subscriber)}catch(t){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",t)}}function O(e,n){if(D(typeof e=="function","effect: argument must be a function."),te())return()=>{};let t={fn:e,onError:n?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};t.onCleanup=s=>{t.userCleanups.push(s)};let r=t.onError;t.bodyFn=r?()=>{try{t.fn(t.onCleanup)}catch(s){r(s)}}:()=>{t.fn(t.onCleanup)};let o=(()=>{if(!t.disposed){if(t.running){t.rerunPending=!0;return}t.running=!0;try{t.rerunPending=!1,t.userCleanups.length>0&&Et(t),F(t.bodyFn,o),t.rerunPending&&bi(t)}finally{t.running=!1,t.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._runEpoch=0,o._runs=0,t.subscriber=o,t.running=!0;try{F(t.bodyFn,t.subscriber),t.rerunPending&&bi(t)}finally{t.running=!1,t.rerunPending=!1}let i=kt.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("effect:create",{effectFn:e}),()=>Ps(t)}function Ie(e,n){D(typeof e=="function","derived: argument must be a getter function.");let t=n?.name,r=n?.equals,o={};o._d=!1,o._init=!1,o._g=e,o.__v=0;let i=()=>{o._d||(o._d=!0)};i._c=1,i._sig=o;let s=()=>{let d=e();o._v=r&&o._init&&r(o._v,d)?o._v:d,o._d=!1,o._init=!0};C(()=>{let d=!0;try{o._v=e(),o._d=!1,o._init=!0,d=!1}finally{d&&(o._d=!0)}},i);let a=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__,c=!1;function u(){if(c)throw new Error(`[SibuJS] Circular dependency detected in derived${t?` "${t}"`:""}. A derived signal cannot read itself (directly or through a chain).`);if(ln()){if(o._d){let d=o._v;c=!0;try{F(s,i),Object.is(d,o._v)||o.__v++}finally{c=!1}}return o._v}if(oe(o),o._d){let d=o._v;c=!0;try{F(s,i),Object.is(d,o._v)||o.__v++}finally{c=!1}a&&d!==o._v&&a.emit("computed:update",{signal:o,oldValue:d,newValue:o._v})}return o._v}return t&&(u.__name=t,o.__name=t),u.__signal=o,a&&a.emit("computed:create",{signal:o,name:t,getter:u}),u}function yi(e,n){if(D(typeof e=="function","watch: first argument must be a getter function."),D(typeof n=="function","watch: second argument must be a callback function."),te())return()=>{};let t,r=!0;return C(()=>{let s=e();if(r){t=s,r=!1;return}if(!Object.is(s,t)){let a=t;t=s,he();try{n(s,a)}finally{ye()}}})}function xi(e){D(e!==null&&typeof e=="object"&&!Array.isArray(e),"store: argument must be a plain object. For arrays, use array() instead.");let n={};Object.keys(e).forEach(c=>{let[u,d]=A(e[c]);n[c]=[u,d]});let t=new Proxy({},{get(c,u){if(typeof u=="string"&&Object.hasOwn(n,u)){let d=n[u][0];return d()}return Reflect.get(c,u)},set(){throw new Error("[SibuJS store] Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),r=()=>{let c={};return Object.keys(n).forEach(u=>{c[u]=n[u][0]()}),c};return[t,{setState:c=>{let u=r(),d=typeof c=="function"?c(u):c;$(()=>{Object.entries(d).forEach(([g,S])=>{Object.hasOwn(n,g)&&n[g][1](S)})})},reset:()=>{$(()=>{Object.keys(e).forEach(c=>{let u=n[c][1];u(e[c])})})},subscribe:c=>{let u=!0;return O(()=>{let d=r();if(u){u=!1;return}he();try{c(d)}finally{ye()}})},subscribeKey:(c,u)=>{let d,g=!0;return O(()=>{let S=n[c][0]();if(g){d=S,g=!1;return}if(!Object.is(S,d)){let f=d;d=S,he();try{u(S,f)}finally{ye()}}})},getSnapshot:r}]}function vi(e){let[n,t]=A(e);return{get current(){return n()},set current(r){t(r)}}}function Si(e=[]){let[n,t]=A([...e]);return[n,{push(...o){t(i=>[...i,...o])},pop(){let o;return t(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return t(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){t(i=>[...o,...i])},splice(o,i=0,...s){let a=[];return t(c=>{let u=[...c];return a=u.splice(o,i,...s),u}),a},remove(o){t(i=>i.filter((s,a)=>a!==o))},removeWhere(o){t(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((a,c)=>c!==s)})},set(o){t([...o])},update(o,i){t(s=>s.map((a,c)=>c===o?i:a))},updateWhere(o,i){t(s=>s.map(a=>o(a)?i(a):a))},sort(o){t(i=>[...i].sort(o))},reverse(){t(o=>[...o].reverse())},filter(o){t(i=>i.filter(o))},map(o){t(i=>i.map(o))},clear(){t([])}}]}function Ti(e=[]){let n=[...e],t=null,r={};function o(){t=null,J(r)||ie(r)}function i(){if(oe(r),t===null){let a=n.slice();t=Object.freeze(a)}return t}return[i,{push(...a){a.length!==0&&(n.push(...a),o())},pop(){if(n.length===0)return;let a=n.pop();return o(),a},shift(){if(n.length===0)return;let a=n.shift();return o(),a},unshift(...a){a.length!==0&&(n.unshift(...a),o())},splice(a,c=0,...u){let d=n.splice(a,c,...u);return(d.length>0||u.length>0)&&o(),d},remove(a){a<0||a>=n.length||(n.splice(a,1),o())},removeWhere(a){let c=n.findIndex(a);c!==-1&&(n.splice(c,1),o())},set(a){n=[...a],o()},update(a,c){a<0||a>=n.length||Object.is(n[a],c)||(n[a]=c,o())},updateWhere(a,c){let u=!1;for(let d=0;d<n.length;d++)if(a(n[d])){let g=c(n[d]);Object.is(n[d],g)||(n[d]=g,u=!0)}u&&o()},sort(a){n.length<=1||(n.sort(a),o())},reverse(){n.length<=1||(n.reverse(),o())},filter(a){let c=n.filter(a);c.length!==n.length&&(n=c,o())},map(a){let c=!1;for(let u=0;u<n.length;u++){let d=a(n[u],u);Object.is(n[u],d)||(n[u]=d,c=!0)}c&&o()},clear(){n.length!==0&&(n=[],o())}}]}function le(e,n,t){if(Object.is(e,n))return!0;if(e==null||n==null||typeof e!=typeof n||typeof e!="object")return!1;let r=e,o=n;if(r.constructor!==o.constructor)return!1;if(e instanceof Date)return e.getTime()===n.getTime();if(e instanceof RegExp){let c=n;return e.source===c.source&&e.flags===c.flags}t||(t=new Map);let i=t.get(r);if(i?.has(o))return!0;if(i||(i=new Set,t.set(r,i)),i.add(o),e instanceof Map){let c=n;if(e.size!==c.size)return!1;for(let[u,d]of e)if(!c.has(u)||!le(d,c.get(u),t))return!1;return!0}if(e instanceof Set){let c=n;if(e.size!==c.size)return!1;for(let u of e)if(!c.has(u))return!1;return!0}if(e instanceof ArrayBuffer){let c=new Uint8Array(e),u=new Uint8Array(n);if(c.length!==u.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==u[d])return!1;return!0}if(e instanceof DataView){if(!(n instanceof DataView)||e.byteLength!==n.byteLength)return!1;for(let c=0;c<e.byteLength;c++)if(e.getUint8(c)!==n.getUint8(c))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){let c=e,u=n;if(c.length!==u.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==u[d])return!1;return!0}if(Array.isArray(e))return!Array.isArray(n)||e.length!==n.length?!1:e.every((c,u)=>le(c,n[u],t));let s=Object.keys(r),a=Object.keys(o);return s.length!==a.length?!1:s.every(c=>Object.hasOwn(o,c)&&le(r[c],o[c],t))}function ki(e){return A(e,{equals:(n,t)=>le(n,t)})}function Ei(e,n,t){return[Ie(e,t),i=>{$(()=>n(i))}]}function wi(e,n){let[t,r]=A(n),[o,i]=A(!1),[s,a]=A(null),[c,u]=A(0),d=0;return O(()=>{c();let g=++d;$(()=>{i(!0),a(null)});let S;try{S=e()}catch(f){$(()=>{a(f),i(!1)});return}S.then(f=>{g===d&&$(()=>{r(f),i(!1)})},f=>{g===d&&$(()=>{a(f),i(!1)})})}),{value:t,loading:o,error:s,refresh:()=>u(g=>g+1)}}function Ct(e,n){try{return e()}catch(t){k(`${n}: callback threw: ${t instanceof Error?t.message:String(t)}`);return}}function wt(e,n,t){let r=Ct(e,n);typeof r=="function"&&t&&v(t,r)}var de=new WeakMap,ne=new WeakMap,z=new Set,j=new Set,fe=null,ze=0,Fs=256;function _t(e){let n=de.get(e);if(n){de.delete(e),z.delete(e);for(let t of n)try{t()}catch{}}}function At(e){ne.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let t=ne.get(e);if(t){ne.delete(e),j.delete(e);for(let r of t)try{r()}catch{}}})}function Is(e){if(z.size===0||e.nodeType!==1)return;let n=e;if(z.has(n)&&n.isConnected&&_t(n),n.firstElementChild)for(let t of Array.from(z))t!==n&&t.isConnected&&n.contains(t)&&_t(t)}function zs(e){if(j.size===0||e.nodeType!==1)return;let n=e;if(j.has(n)&&!n.isConnected&&At(n),n.firstElementChild)for(let t of Array.from(j))t!==n&&!t.isConnected&&n.contains(t)&&At(t)}function js(){if(z.size>0)for(let e of Array.from(z))e.isConnected&&_t(e);if(j.size>0)for(let e of Array.from(j))e.isConnected||At(e)}function _i(){fe||typeof document>"u"||(fe=new MutationObserver(e=>{for(let n of e)if(n.type==="childList"){if(n.addedNodes.length>0)for(let t=0;t<n.addedNodes.length;t++)Is(n.addedNodes[t]);if(n.removedNodes.length>0)for(let t=0;t<n.removedNodes.length;t++)zs(n.removedNodes[t])}ze+=e.length,ze>=Fs&&(ze=0,js()),Nt()}),fe.observe(document.body,{childList:!0,subtree:!0}))}function Nt(){fe&&z.size===0&&j.size===0&&(fe.disconnect(),fe=null,ze=0)}function qs(e,n){let t=de.get(e);return t||(t=[],de.set(e,t)),t.push(n),z.add(e),_i(),()=>{let r=de.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(de.delete(e),z.delete(e))}Nt()}}function Ws(e,n){let t=ne.get(e);return t||(t=[],ne.set(e,t)),t.push(n),j.add(e),_i(),()=>{let r=ne.get(e);if(r){let o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&(ne.delete(e),j.delete(e))}Nt()}}function Se(e,n){if(!(typeof document>"u"))if(n){let t=!1;if(v(n,()=>{t=!0}),n.isConnected){queueMicrotask(()=>{t||wt(e,"onMount",n)});return}queueMicrotask(()=>{if(t)return;if(n.isConnected){wt(e,"onMount",n);return}let r=qs(n,()=>{t||wt(e,"onMount",n)});v(n,r)})}else queueMicrotask(()=>{Ct(e,"onMount")})}function Ai(e,n){if(typeof document>"u")return;let t=!1,r=()=>{t||(t=!0,Ct(e,"onUnmount"))};v(n,r);let o=()=>{if(t)return;let i=Ws(n,r);v(n,i)};n.isConnected?o():Se(()=>{o()},n)}function Ci(e,n){v(n,e)}function Ni(e){let[n,t]=A(e);return{provide(o){let i=n();return t(o),()=>t(i)},use(){return n},get(){return n()},set(o){t(o)},withContext(o,i){let s=n();t(o);try{return i()}finally{t(s)}}}}function Li(e){let n=e();return w()&&queueMicrotask(()=>{try{e()}catch(t){console.warn("[SibuJS strict] second run threw:",t)}}),n}function Mi(e){if(!w())return O(e);let n=O(e),t=null;return queueMicrotask(()=>{try{t=O(e)}catch(r){console.warn("[SibuJS strictEffect] second run threw:",r)}}),()=>{n(),t&&t()}}function Ri(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}function Di(e){let[n,t]=A(e()),r=!1,o=!1,i=n(),s=()=>{r=!1,!o&&t(i)},a=()=>{r||(r=!0,queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(s):s()}))},c=C(()=>{i=e(),a()}),u=(()=>n());return u.dispose=()=>{o||(o=!0,c())},u}var Hi=16;function Vs(e){let n=globalThis;if(typeof n.requestIdleCallback=="function"){n.requestIdleCallback(e,{timeout:Hi*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,Hi)}function Oi(){let[e,n]=A(!1);function t(r){n(!0),Vs(()=>{let o;try{o=r()}catch{n(!1);return}o&&typeof o.then=="function"?o.then(()=>n(!1),()=>n(!1)):n(!1)})}return{pending:e,start:t}}var Lt="__sibuPendingError";function $i(e,n){let t=()=>{try{return e.parentNode?(e.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:n}})),!0):!1}catch{return!1}};e.parentNode&&t()||queueMicrotask(()=>{t()||(e[Lt]=n)})}function Te(e){let n=e,t=n[Lt];if(t instanceof Error)return delete n[Lt],t}function Mt(e){let n=null;return function(){if(n)return n();let r=E({class:"sibu-lazy"}),o=!1;return e().then(i=>{if(o)return;n=i.default;let s=n();r.replaceChildren(s)}).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));k(`[SibuJS] lazy() failed to load component: ${s.message}`),r.replaceChildren(E({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),$i(r,s)}),r.appendChild(L("sibu-lazy-loading","Loading...")),v(r,()=>{o=!0}),r}}function Rt({nodes:e,fallback:n}){let t=E({class:"sibu-suspense"}),r=n();t.appendChild(r);let o=!1,i=null,s=null;return v(t,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!t.contains(s)&&N(s)}),queueMicrotask(()=>{if(!o)try{let a=e();if(s=a,a.classList.contains("sibu-lazy")){if(!a.querySelector(".sibu-lazy-loading")){t.replaceChildren(a);return}i=new MutationObserver(()=>{if(o)return;a.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,t.replaceChildren(a))}),i.observe(a,{childList:!0,subtree:!0})}else t.replaceChildren(a)}catch(a){let c=a instanceof Error?a:new Error(String(a));k(`[SibuJS] Suspense nodes() threw: ${c.message}`),$i(t,c)}}),t}var gu=w();function Ht(e){return e}var bu=1024*1024;var Ks=`
3
3
  .sibu-error-display {
4
4
  border: 1px solid var(--sibu-err-border, #e5484d);
5
5
  border-radius: 10px;
@@ -180,11 +180,11 @@
180
180
  border: 1px solid #3a3a4e;
181
181
  }
182
182
  .sibu-error-display .sibu-err-btn-reload:hover { background: #2a2b40; }
183
- `,Bi=!1;function Js(){if(Bi||typeof document>"u")return;let e=U({nodes:Us});document.head.appendChild(e),Bi=!0}function Gs(e){let n=[],t=e.split(`
184
- `);for(let r of t){let o=r.trim(),i=o.match(/^at\s+(?:(.+?)\s+\((.+)\)|(.+))$/);if(i){n.push({fn:i[1]||"(anonymous)",loc:i[2]||i[3]||""});continue}let s=o.match(/^(.+?)@(.+)$/);s&&n.push({fn:s[1]||"(anonymous)",loc:s[2]||""})}return n}function Pi(e){if(e instanceof Error){let n=e.code??e.name??"ERROR",t=e.message||"Unknown error",r=e.stack??"",o=Gs(r),i=e.cause,s=i!=null?Pi(i):null;return{code:n,message:t,stack:r,frames:o,cause:s}}return{code:"NON_ERROR",message:typeof e=="string"?e:JSON.stringify(e),stack:"",frames:[],cause:null}}function Ys(e,n,t){let r=[];r.push(t),r.push(`[${e.code}] ${e.message}`),e.stack&&(r.push(""),r.push("Stack Trace:"),r.push(e.stack));let o=e.cause;for(;o;){if(r.push(""),r.push("Caused by:"),r.push(` [${o.code}] ${o.message}`),o.stack){let i=o.stack.split(`
183
+ `,Bi=!1;function Us(){if(Bi||typeof document>"u")return;let e=U({nodes:Ks});document.head.appendChild(e),Bi=!0}function Js(e){let n=[],t=e.split(`
184
+ `);for(let r of t){let o=r.trim(),i=o.match(/^at\s+(?:(.+?)\s+\((.+)\)|(.+))$/);if(i){n.push({fn:i[1]||"(anonymous)",loc:i[2]||i[3]||""});continue}let s=o.match(/^(.+?)@(.+)$/);s&&n.push({fn:s[1]||"(anonymous)",loc:s[2]||""})}return n}function Pi(e){if(e instanceof Error){let n=e.code??e.name??"ERROR",t=e.message||"Unknown error",r=e.stack??"",o=Js(r),i=e.cause,s=i!=null?Pi(i):null;return{code:n,message:t,stack:r,frames:o,cause:s}}return{code:"NON_ERROR",message:typeof e=="string"?e:JSON.stringify(e),stack:"",frames:[],cause:null}}function Gs(e,n,t){let r=[];r.push(t),r.push(`[${e.code}] ${e.message}`),e.stack&&(r.push(""),r.push("Stack Trace:"),r.push(e.stack));let o=e.cause;for(;o;){if(r.push(""),r.push("Caused by:"),r.push(` [${o.code}] ${o.message}`),o.stack){let i=o.stack.split(`
185
185
  `).map(s=>` ${s}`).join(`
186
186
  `);r.push(i)}o=o.cause}if(n&&Object.keys(n).length>0){r.push(""),r.push("Metadata:");for(let[i,s]of Object.entries(n))r.push(` ${i}: ${String(s)}`)}return r.push(""),r.push("Environment:"),r.push(` Timestamp: ${new Date().toISOString()}`),typeof location<"u"&&r.push(` URL: ${location.href}`),typeof navigator<"u"&&navigator.userAgent&&r.push(` User Agent: ${navigator.userAgent}`),r.join(`
187
- `)}function Fi(e){let n=e.map((t,r)=>E({class:"sibu-err-frame",nodes:[L({class:"sibu-err-line",nodes:String(r+1)}),L({class:"sibu-err-fn",nodes:t.fn}),L({class:"sibu-err-loc",nodes:` \u2014 ${t.loc}`})]}));return $e({class:"sibu-err-stack",nodes:n})}function Ii(e){return e?[E({class:"sibu-err-cause-label",nodes:"Caused by"}),E({class:"sibu-err-section",nodes:[E({class:"sibu-err-section-head",nodes:[L({nodes:`[${e.code}] ${e.message}`}),L({nodes:""})]}),e.frames.length>0?Fi(e.frames):E({class:"sibu-err-stack",nodes:"(no stack)"})]}),...Ii(e.cause)]:[]}function Qs(e){let n=[];for(let[r,o]of Object.entries(e)){n.push(document.createElement("dt")),n[n.length-1].textContent=r;let i=document.createElement("dd");i.textContent=o==null?"(null)":String(o),n.push(i)}let t=document.createElement("dl");t.className="sibu-err-meta";for(let r of n)t.appendChild(r);return t}function je(e){Js();let n=e.severity??"error",t=Pi(e.error),r=e.alwaysShowDetails??Ks,o=e.title??t.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=A("Copy"),c=ue({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let f=Ys(t,e.metadata,o);typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(f).then(()=>{a("Copied!"),setTimeout(()=>a("Copy"),1500)},()=>{a("Copy failed"),setTimeout(()=>a("Copy"),1500)})}}}),u=E({class:"sibu-err-header",nodes:[Be({class:"sibu-err-icon",nodes:t.code}),Oe({class:"sibu-err-title",nodes:o}),c,L({class:"sibu-err-timestamp",nodes:i})]}),d=[De({class:"sibu-err-message",nodes:t.message})];r&&t.frames.length>0&&d.push(E({class:"sibu-err-section",nodes:[E({class:"sibu-err-section-head",nodes:[L({nodes:"Stack Trace"})]}),Fi(t.frames)]})),r&&d.push(...Ii(t.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&d.push(E({class:"sibu-err-section",nodes:[E({class:"sibu-err-section-head",nodes:[L({nodes:"Metadata"})]}),Qs(e.metadata)]}));let g=[];e.onRetry&&g.push(ue({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&g.push(ue({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),g.length>0&&d.push(E({class:"sibu-err-actions",nodes:g}));let S=E({class:"sibu-err-body",nodes:d});return E({class:"sibu-error-display","data-severity":n,nodes:[u,S]})}var Zs=`
187
+ `)}function Fi(e){let n=e.map((t,r)=>E({class:"sibu-err-frame",nodes:[L({class:"sibu-err-line",nodes:String(r+1)}),L({class:"sibu-err-fn",nodes:t.fn}),L({class:"sibu-err-loc",nodes:` \u2014 ${t.loc}`})]}));return $e({class:"sibu-err-stack",nodes:n})}function Ii(e){return e?[E({class:"sibu-err-cause-label",nodes:"Caused by"}),E({class:"sibu-err-section",nodes:[E({class:"sibu-err-section-head",nodes:[L({nodes:`[${e.code}] ${e.message}`}),L({nodes:""})]}),e.frames.length>0?Fi(e.frames):E({class:"sibu-err-stack",nodes:"(no stack)"})]}),...Ii(e.cause)]:[]}function Ys(e){let n=[];for(let[r,o]of Object.entries(e)){n.push(document.createElement("dt")),n[n.length-1].textContent=r;let i=document.createElement("dd");i.textContent=o==null?"(null)":String(o),n.push(i)}let t=document.createElement("dl");t.className="sibu-err-meta";for(let r of n)t.appendChild(r);return t}function je(e){Us();let n=e.severity??"error",t=Pi(e.error),r=e.alwaysShowDetails??w(),o=e.title??t.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=A("Copy"),c=ue({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let f=Gs(t,e.metadata,o);typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(f).then(()=>{a("Copied!"),setTimeout(()=>a("Copy"),1500)},()=>{a("Copy failed"),setTimeout(()=>a("Copy"),1500)})}}}),u=E({class:"sibu-err-header",nodes:[Be({class:"sibu-err-icon",nodes:t.code}),Oe({class:"sibu-err-title",nodes:o}),c,L({class:"sibu-err-timestamp",nodes:i})]}),d=[De({class:"sibu-err-message",nodes:t.message})];r&&t.frames.length>0&&d.push(E({class:"sibu-err-section",nodes:[E({class:"sibu-err-section-head",nodes:[L({nodes:"Stack Trace"})]}),Fi(t.frames)]})),r&&d.push(...Ii(t.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&d.push(E({class:"sibu-err-section",nodes:[E({class:"sibu-err-section-head",nodes:[L({nodes:"Metadata"})]}),Ys(e.metadata)]}));let g=[];e.onRetry&&g.push(ue({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&g.push(ue({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),g.length>0&&d.push(E({class:"sibu-err-actions",nodes:g}));let S=E({class:"sibu-err-body",nodes:d});return E({class:"sibu-error-display","data-severity":n,nodes:[u,S]})}var Qs=`
188
188
  .sibu-error-boundary {
189
189
  position: relative;
190
190
  }
@@ -338,7 +338,7 @@
338
338
  .sibu-error-fallback .sibu-error-btn-reload:hover {
339
339
  background: #3a3a4e;
340
340
  }
341
- `,zi=!1;function Xs(){if(!zi&&typeof document<"u"){let e=U({nodes:Zs});document.head.appendChild(e),zi=!0}}var ea=50,Dt=new WeakMap;function ta(e,n,t){let r=Dt.get(e);r||(r=new Map,Dt.set(e,r));let o=n.message,i=r.get(o);if(i)r.delete(o),r.set(o,i);else if(i=()=>e(n,t),r.set(o,i),r.size>ea){let s=r.keys().next().value;s!==void 0&&r.delete(s)}return i()}function ji(e,n){let t=typeof e=="function"?e:n,r=typeof e=="function"?{}:e,{fallback:o,onError:i,resetKeys:s}=r;Xs();let[a,c]=A(null),u=()=>{if(o){let b=a(),p=Dt.get(o);b&&p&&p.delete(b.message)}c(null)},d=null;if(s&&s.length>0){let b=!1;d=O(()=>{for(let p of s)try{p()}catch(x){typeof console<"u"&&console.warn("[SibuJS ErrorBoundary] resetKeys getter threw:",x)}if(!b){b=!0;return}a()!==null&&u()})}let g=b=>{let p=b instanceof Error?b:new Error(String(b));if(c(p),i)try{i(p)}catch(x){typeof console<"u"&&console.error("[SibuJS ErrorBoundary] onError callback threw:",x)}return p},S=(b,p)=>je({error:b,severity:"error",onRetry:p}),f=b=>{let p=o||S;try{return ta(p,b,u)}catch(x){let T=x instanceof Error?x:new Error(String(x));return queueMicrotask(()=>{m.parentNode&&m.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:T}}))}),document.createComment("error-boundary-failed")}},m=E({class:"sibu-error-boundary",nodes:()=>{let b=a();if(b)return f(b);try{let p=t();if(p&&typeof p.then=="function"){let x=E({class:"sibu-error-async"});return x.appendChild(L({class:"sibu-lazy-loading",nodes:"Loading..."})),p.then(T=>{x.replaceChildren(T)}).catch(T=>{let I=g(T);x.replaceChildren(f(I))}),x}return p}catch(p){let x=g(p);return f(x)}}}),y=b=>{if(a())return;b.stopPropagation();let x=b.detail?.error;x&&g(x)};return m.addEventListener("sibu:error-propagate",y),Se(()=>{let b=document.createTreeWalker(m,NodeFilter.SHOW_ELEMENT),p=[],x=b.currentNode;for(;x;){let T=Te(x);T&&p.push(T),x=b.nextNode()}if(p.length===1)g(p[0]);else if(p.length>1){let T=globalThis.AggregateError;g(T?new T(p,`${p.length} pre-mount errors caught by ErrorBoundary`):new Error(p.map(I=>I.message).join("; ")))}},m),v(m,()=>{d&&d(),m.removeEventListener("sibu:error-propagate",y)}),m}var na=`
341
+ `,zi=!1;function Zs(){if(!zi&&typeof document<"u"){let e=U({nodes:Qs});document.head.appendChild(e),zi=!0}}var Xs=50,Dt=new WeakMap;function ea(e,n,t){let r=Dt.get(e);r||(r=new Map,Dt.set(e,r));let o=n.message,i=r.get(o);if(i)r.delete(o),r.set(o,i);else if(i=()=>e(n,t),r.set(o,i),r.size>Xs){let s=r.keys().next().value;s!==void 0&&r.delete(s)}return i()}function ji(e,n){let t=typeof e=="function"?e:n,r=typeof e=="function"?{}:e,{fallback:o,onError:i,resetKeys:s}=r;Zs();let[a,c]=A(null),u=()=>{if(o){let b=a(),p=Dt.get(o);b&&p&&p.delete(b.message)}c(null)},d=null;if(s&&s.length>0){let b=!1;d=O(()=>{for(let p of s)try{p()}catch(x){typeof console<"u"&&console.warn("[SibuJS ErrorBoundary] resetKeys getter threw:",x)}if(!b){b=!0;return}a()!==null&&u()})}let g=b=>{let p=b instanceof Error?b:new Error(String(b));if(c(p),i)try{i(p)}catch(x){typeof console<"u"&&console.error("[SibuJS ErrorBoundary] onError callback threw:",x)}return p},S=(b,p)=>je({error:b,severity:"error",onRetry:p}),f=b=>{let p=o||S;try{return ea(p,b,u)}catch(x){let T=x instanceof Error?x:new Error(String(x));return queueMicrotask(()=>{m.parentNode&&m.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:T}}))}),document.createComment("error-boundary-failed")}},m=E({class:"sibu-error-boundary",nodes:()=>{let b=a();if(b)return f(b);try{let p=t();if(p&&typeof p.then=="function"){let x=E({class:"sibu-error-async"});return x.appendChild(L({class:"sibu-lazy-loading",nodes:"Loading..."})),p.then(T=>{x.replaceChildren(T)}).catch(T=>{let I=g(T);x.replaceChildren(f(I))}),x}return p}catch(p){let x=g(p);return f(x)}}}),y=b=>{if(a())return;b.stopPropagation();let x=b.detail?.error;x&&g(x)};return m.addEventListener("sibu:error-propagate",y),Se(()=>{let b=document.createTreeWalker(m,NodeFilter.SHOW_ELEMENT),p=[],x=b.currentNode;for(;x;){let T=Te(x);T&&p.push(T),x=b.nextNode()}if(p.length===1)g(p[0]);else if(p.length>1){let T=globalThis.AggregateError;g(T?new T(p,`${p.length} pre-mount errors caught by ErrorBoundary`):new Error(p.map(I=>I.message).join("; ")))}},m),v(m,()=>{d&&d(),m.removeEventListener("sibu:error-propagate",y)}),m}var ta=`
342
342
  @keyframes sibu-spin {
343
343
  to { transform: rotate(360deg); }
344
344
  }
@@ -391,4 +391,4 @@
391
391
  .sibu-loading-lg .sibu-loading-spinner { width: 40px; height: 40px; border-width: 4px; }
392
392
  .sibu-loading-lg .sibu-loading-dot { width: 12px; height: 12px; }
393
393
  .sibu-loading-lg .sibu-loading-dots { gap: 6px; }
394
- `,qi=!1;function ra(){!qi&&typeof document<"u"&&(document.head.appendChild(U({nodes:na})),qi=!0)}function Wi(e={}){ra();let{text:n,variant:t="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return t==="dots"?E({class:`sibu-loading${o}`,nodes:[E({class:"sibu-loading-dots",nodes:[L({class:"sibu-loading-dot"}),L({class:"sibu-loading-dot"}),L({class:"sibu-loading-dot"})]}),n?L({class:"sibu-loading-text",nodes:n}):null].filter(Boolean)}):E({class:`sibu-loading${o}`,nodes:[E({class:"sibu-loading-spinner"}),n?L({class:"sibu-loading-text",nodes:n}):null].filter(Boolean)})}typeof window<"u"&&(window.Sibu=Ot);return Xi(oa);})();
394
+ `,qi=!1;function na(){!qi&&typeof document<"u"&&(document.head.appendChild(U({nodes:ta})),qi=!0)}function Wi(e={}){na();let{text:n,variant:t="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return t==="dots"?E({class:`sibu-loading${o}`,role:"status","aria-live":"polite","aria-label":n?void 0:"Loading",nodes:[E({class:"sibu-loading-dots",nodes:[L({class:"sibu-loading-dot"}),L({class:"sibu-loading-dot"}),L({class:"sibu-loading-dot"})]}),n?L({class:"sibu-loading-text",nodes:n}):null].filter(Boolean)}):E({class:`sibu-loading${o}`,role:"status","aria-live":"polite","aria-label":n?void 0:"Loading",nodes:[E({class:"sibu-loading-spinner"}),n?L({class:"sibu-loading-text",nodes:n}):null].filter(Boolean)})}typeof window<"u"&&(window.Sibu=Ot);return Xi(ra);})();
@@ -5,7 +5,7 @@ import {
5
5
  cleanup,
6
6
  retrack,
7
7
  untracked
8
- } from "./chunk-4NJEAPLI.js";
8
+ } from "./chunk-UOMYIAG6.js";
9
9
  import {
10
10
  devAssert
11
11
  } from "./chunk-COY6PUD2.js";