sibujs 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/README.md +29 -25
  2. package/dist/browser.cjs +804 -2
  3. package/dist/browser.d.cts +591 -1
  4. package/dist/browser.d.ts +591 -1
  5. package/dist/browser.js +50 -8
  6. package/dist/build.cjs +654 -144
  7. package/dist/build.js +14 -12
  8. package/dist/cdn.global.js +188 -7
  9. package/dist/chunk-2BYQDGN3.js +742 -0
  10. package/dist/chunk-32DY64NT.js +282 -0
  11. package/dist/chunk-3AIRKM3B.js +1263 -0
  12. package/dist/chunk-3X2YG6YM.js +505 -0
  13. package/dist/chunk-5X6PP2UK.js +28 -0
  14. package/dist/chunk-77L6NL3X.js +1097 -0
  15. package/dist/chunk-BGN5ZMP4.js +26 -0
  16. package/dist/chunk-BTU3TJDS.js +365 -0
  17. package/dist/chunk-CHF5OHIA.js +61 -0
  18. package/dist/chunk-CMBFNA7L.js +27 -0
  19. package/dist/chunk-DAHRH4ON.js +331 -0
  20. package/dist/chunk-EBGIRKQY.js +616 -0
  21. package/dist/chunk-EUZND3CB.js +27 -0
  22. package/dist/chunk-F3FA4F32.js +292 -0
  23. package/dist/chunk-JAKHTMQU.js +1000 -0
  24. package/dist/chunk-JCI5M6U6.js +956 -0
  25. package/dist/chunk-KQPDEVVS.js +398 -0
  26. package/dist/chunk-NEKUBFPT.js +60 -0
  27. package/dist/chunk-NYVAC6P5.js +37 -0
  28. package/dist/chunk-PTQJDMRT.js +146 -0
  29. package/dist/chunk-QWZG56ET.js +2744 -0
  30. package/dist/chunk-TSOKIX5Z.js +654 -0
  31. package/dist/chunk-VRW3FULF.js +725 -0
  32. package/dist/chunk-WZSPOOER.js +84 -0
  33. package/dist/chunk-YT6HQ6AM.js +14 -0
  34. package/dist/chunk-ZD6OAMTH.js +277 -0
  35. package/dist/contracts-DDrwxvJ-.d.cts +245 -0
  36. package/dist/contracts-DDrwxvJ-.d.ts +245 -0
  37. package/dist/data.cjs +35 -2
  38. package/dist/data.d.cts +7 -0
  39. package/dist/data.d.ts +7 -0
  40. package/dist/data.js +9 -8
  41. package/dist/devtools.cjs +122 -0
  42. package/dist/devtools.d.cts +69 -461
  43. package/dist/devtools.d.ts +69 -461
  44. package/dist/devtools.js +127 -6
  45. package/dist/ecosystem.cjs +23 -6
  46. package/dist/ecosystem.d.cts +1 -1
  47. package/dist/ecosystem.d.ts +1 -1
  48. package/dist/ecosystem.js +10 -9
  49. package/dist/extras.cjs +1207 -65
  50. package/dist/extras.d.cts +5 -5
  51. package/dist/extras.d.ts +5 -5
  52. package/dist/extras.js +69 -24
  53. package/dist/index.cjs +663 -144
  54. package/dist/index.d.cts +397 -17
  55. package/dist/index.d.ts +397 -17
  56. package/dist/index.js +39 -17
  57. package/dist/introspect-BumjnBKr.d.cts +477 -0
  58. package/dist/introspect-CZrlcaYy.d.ts +477 -0
  59. package/dist/introspect-Cb0zgpi2.d.cts +477 -0
  60. package/dist/introspect-Y2xNXGSf.d.ts +477 -0
  61. package/dist/motion.js +4 -4
  62. package/dist/patterns.cjs +51 -2
  63. package/dist/patterns.d.cts +18 -8
  64. package/dist/patterns.d.ts +18 -8
  65. package/dist/patterns.js +7 -7
  66. package/dist/performance.js +4 -4
  67. package/dist/plugins.cjs +428 -81
  68. package/dist/plugins.d.cts +27 -4
  69. package/dist/plugins.d.ts +27 -4
  70. package/dist/plugins.js +156 -37
  71. package/dist/ssr-4PBXAOO3.js +40 -0
  72. package/dist/ssr-Do_SiVoL.d.cts +201 -0
  73. package/dist/ssr-Do_SiVoL.d.ts +201 -0
  74. package/dist/ssr.cjs +312 -60
  75. package/dist/ssr.d.cts +10 -1
  76. package/dist/ssr.d.ts +10 -1
  77. package/dist/ssr.js +13 -10
  78. package/dist/tagFactory-DaJ0YWX6.d.cts +47 -0
  79. package/dist/tagFactory-DaJ0YWX6.d.ts +47 -0
  80. package/dist/testing.cjs +233 -2
  81. package/dist/testing.d.cts +42 -1
  82. package/dist/testing.d.ts +42 -1
  83. package/dist/testing.js +129 -2
  84. package/dist/ui.cjs +374 -3
  85. package/dist/ui.d.cts +252 -2
  86. package/dist/ui.d.ts +252 -2
  87. package/dist/ui.js +328 -8
  88. package/dist/widgets.js +7 -7
  89. package/package.json +1 -1
package/dist/build.js CHANGED
@@ -1,17 +1,19 @@
1
1
  import {
2
2
  index_exports
3
- } from "./chunk-P6W3STU4.js";
4
- import "./chunk-GCOK2LC3.js";
5
- import "./chunk-TNQWPPE6.js";
6
- import "./chunk-WR5D4EGH.js";
7
- import "./chunk-B7SWRFUT.js";
8
- import "./chunk-23VV7YD3.js";
9
- import "./chunk-L6JRBDNS.js";
10
- import "./chunk-6SA3QQES.js";
11
- import "./chunk-CHJ27IGK.js";
12
- import "./chunk-V2XTI523.js";
13
- import "./chunk-UNXCEF6S.js";
14
- import "./chunk-MLKGABMK.js";
3
+ } from "./chunk-QWZG56ET.js";
4
+ import "./chunk-YT6HQ6AM.js";
5
+ import "./chunk-32DY64NT.js";
6
+ import "./chunk-NYVAC6P5.js";
7
+ import "./chunk-BGN5ZMP4.js";
8
+ import "./chunk-F3FA4F32.js";
9
+ import "./chunk-PTQJDMRT.js";
10
+ import "./chunk-NEKUBFPT.js";
11
+ import "./chunk-CMBFNA7L.js";
12
+ import "./chunk-CHF5OHIA.js";
13
+ import "./chunk-EUZND3CB.js";
14
+ import "./chunk-WZSPOOER.js";
15
+ import "./chunk-ZD6OAMTH.js";
16
+ import "./chunk-5X6PP2UK.js";
15
17
 
16
18
  // src/build/compileTemplates.ts
17
19
  var VOID_ELEMENTS = /* @__PURE__ */ new Set([
@@ -1,5 +1,189 @@
1
- "use strict";var Sibu=(()=>{var Se=Object.defineProperty;var yo=Object.getOwnPropertyDescriptor;var vo=Object.getOwnPropertyNames;var To=Object.prototype.hasOwnProperty;var Ge=(t,e)=>{for(var r in e)Se(t,r,{get:e[r],enumerable:!0})},ko=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of vo(e))!To.call(t,o)&&o!==r&&Se(t,o,{get:()=>e[o],enumerable:!(n=yo(e,o))||n.enumerable});return t};var So=t=>ko(Se({},"__esModule",{value:!0}),t);var Uo={};Ge(Uo,{DynamicComponent:()=>Rr,ErrorBoundary:()=>fo,Fragment:()=>Ar,KeepAlive:()=>Kr,Loading:()=>go,Portal:()=>Lr,SVG_NS:()=>k,Suspense:()=>Pe,a:()=>_t,abbr:()=>Nt,action:()=>Fr,address:()=>ut,area:()=>en,array:()=>oo,article:()=>it,aside:()=>dt,audio:()=>tn,autoResize:()=>Wr,b:()=>At,base:()=>Zn,batch:()=>Te,bdi:()=>Lt,bdo:()=>Mt,bindDynamic:()=>Ce,blockquote:()=>ht,body:()=>nt,br:()=>Ot,button:()=>K,canvas:()=>bn,caption:()=>Tn,catchError:()=>Ur,catchErrorAsync:()=>Ir,center:()=>yr,checkLeaks:()=>Ye,circle:()=>Yn,cite:()=>Rt,clickOutside:()=>Pr,clipPath:()=>dr,code:()=>Ht,col:()=>kn,colgroup:()=>Sn,context:()=>uo,copyOnClick:()=>qr,customElement:()=>kr,data:()=>Dt,datalist:()=>Mn,dd:()=>xt,deepEqual:()=>ce,deepSignal:()=>so,defs:()=>lr,del:()=>yn,derived:()=>F,details:()=>$n,dfn:()=>Bt,dialog:()=>Un,disableSSR:()=>ze,dispose:()=>R,div:()=>x,dl:()=>yt,dt:()=>vt,each:()=>_r,effect:()=>ae,ellipse:()=>er,em:()=>zt,embed:()=>an,enableSSR:()=>Be,enqueueBatchedSignal:()=>X,fieldset:()=>On,figcaption:()=>Tt,figure:()=>kt,font:()=>vr,footer:()=>at,form:()=>Rn,g:()=>tr,getSlot:()=>Hr,h1:()=>pt,h2:()=>ft,h3:()=>ie,h4:()=>mt,h5:()=>gt,h6:()=>bt,head:()=>tt,header:()=>st,hr:()=>St,html:()=>Le,i:()=>Kt,iframe:()=>cn,img:()=>nn,input:()=>Hn,ins:()=>vn,isBatching:()=>Gr,isSSR:()=>Y,kbd:()=>Ft,label:()=>Dn,lazy:()=>Fe,legend:()=>Bn,li:()=>Et,line:()=>nr,linearGradient:()=>fr,link:()=>Jn,longPress:()=>jr,main:()=>lt,map:()=>rn,mark:()=>Pt,marker:()=>xr,marquee:()=>Tr,mask:()=>ur,match:()=>zr,math:()=>gn,memo:()=>no,memoFn:()=>ro,menu:()=>In,meta:()=>Xn,meter:()=>zn,mount:()=>wr,nav:()=>ct,noscript:()=>hn,object:()=>ln,ol:()=>wt,on:()=>Xr,onCleanup:()=>lo,onMount:()=>Ke,onUnmount:()=>co,optgroup:()=>Kn,option:()=>Fn,output:()=>Pn,p:()=>oe,param:()=>dn,path:()=>rr,pattern:()=>pr,picture:()=>un,polygon:()=>or,polyline:()=>ir,portal:()=>pn,pre:()=>ve,progress:()=>jn,q:()=>jt,radialGradient:()=>mr,reactiveArray:()=>io,rect:()=>sr,ref:()=>to,registerComponent:()=>Mr,registerDisposer:()=>w,resolveComponent:()=>Oe,rp:()=>qt,rt:()=>Wt,ruby:()=>$t,s:()=>Ut,samp:()=>It,script:()=>xn,section:()=>ot,select:()=>qn,setGlobalErrorHandler:()=>Vr,show:()=>Dr,signal:()=>_,slot:()=>Gn,small:()=>Vt,source:()=>fn,span:()=>C,stop:()=>gr,store:()=>eo,strong:()=>Gt,style:()=>J,sub:()=>Qt,summary:()=>Vn,sup:()=>Zt,svg:()=>mn,symbol:()=>hr,table:()=>En,tagFactory:()=>a,tbody:()=>wn,td:()=>Cn,template:()=>Qn,text:()=>ar,textarea:()=>Wn,tfoot:()=>_n,th:()=>Nn,thead:()=>An,time:()=>Jt,title:()=>rt,tr:()=>Ln,track:()=>on,trapFocus:()=>$r,tspan:()=>cr,u:()=>Xt,ul:()=>Ct,unregisterComponent:()=>Or,untracked:()=>Q,use:()=>br,var_:()=>Yt,video:()=>sn,watch:()=>Yr,when:()=>Br,withSSR:()=>Zr,writable:()=>ao});var qe={};Ge(qe,{DynamicComponent:()=>Rr,ErrorBoundary:()=>fo,Fragment:()=>Ar,KeepAlive:()=>Kr,Loading:()=>go,Portal:()=>Lr,SVG_NS:()=>k,Suspense:()=>Pe,a:()=>_t,abbr:()=>Nt,action:()=>Fr,address:()=>ut,area:()=>en,array:()=>oo,article:()=>it,aside:()=>dt,audio:()=>tn,autoResize:()=>Wr,b:()=>At,base:()=>Zn,batch:()=>Te,bdi:()=>Lt,bdo:()=>Mt,bindDynamic:()=>Ce,blockquote:()=>ht,body:()=>nt,br:()=>Ot,button:()=>K,canvas:()=>bn,caption:()=>Tn,catchError:()=>Ur,catchErrorAsync:()=>Ir,center:()=>yr,checkLeaks:()=>Ye,circle:()=>Yn,cite:()=>Rt,clickOutside:()=>Pr,clipPath:()=>dr,code:()=>Ht,col:()=>kn,colgroup:()=>Sn,context:()=>uo,copyOnClick:()=>qr,customElement:()=>kr,data:()=>Dt,datalist:()=>Mn,dd:()=>xt,deepEqual:()=>ce,deepSignal:()=>so,defs:()=>lr,del:()=>yn,derived:()=>F,details:()=>$n,dfn:()=>Bt,dialog:()=>Un,disableSSR:()=>ze,dispose:()=>R,div:()=>x,dl:()=>yt,dt:()=>vt,each:()=>_r,effect:()=>ae,ellipse:()=>er,em:()=>zt,embed:()=>an,enableSSR:()=>Be,enqueueBatchedSignal:()=>X,fieldset:()=>On,figcaption:()=>Tt,figure:()=>kt,font:()=>vr,footer:()=>at,form:()=>Rn,g:()=>tr,getSlot:()=>Hr,h1:()=>pt,h2:()=>ft,h3:()=>ie,h4:()=>mt,h5:()=>gt,h6:()=>bt,head:()=>tt,header:()=>st,hr:()=>St,html:()=>Le,i:()=>Kt,iframe:()=>cn,img:()=>nn,input:()=>Hn,ins:()=>vn,isBatching:()=>Gr,isSSR:()=>Y,kbd:()=>Ft,label:()=>Dn,lazy:()=>Fe,legend:()=>Bn,li:()=>Et,line:()=>nr,linearGradient:()=>fr,link:()=>Jn,longPress:()=>jr,main:()=>lt,map:()=>rn,mark:()=>Pt,marker:()=>xr,marquee:()=>Tr,mask:()=>ur,match:()=>zr,math:()=>gn,memo:()=>no,memoFn:()=>ro,menu:()=>In,meta:()=>Xn,meter:()=>zn,mount:()=>wr,nav:()=>ct,noscript:()=>hn,object:()=>ln,ol:()=>wt,on:()=>Xr,onCleanup:()=>lo,onMount:()=>Ke,onUnmount:()=>co,optgroup:()=>Kn,option:()=>Fn,output:()=>Pn,p:()=>oe,param:()=>dn,path:()=>rr,pattern:()=>pr,picture:()=>un,polygon:()=>or,polyline:()=>ir,portal:()=>pn,pre:()=>ve,progress:()=>jn,q:()=>jt,radialGradient:()=>mr,reactiveArray:()=>io,rect:()=>sr,ref:()=>to,registerComponent:()=>Mr,registerDisposer:()=>w,resolveComponent:()=>Oe,rp:()=>qt,rt:()=>Wt,ruby:()=>$t,s:()=>Ut,samp:()=>It,script:()=>xn,section:()=>ot,select:()=>qn,setGlobalErrorHandler:()=>Vr,show:()=>Dr,signal:()=>_,slot:()=>Gn,small:()=>Vt,source:()=>fn,span:()=>C,stop:()=>gr,store:()=>eo,strong:()=>Gt,style:()=>J,sub:()=>Qt,summary:()=>Vn,sup:()=>Zt,svg:()=>mn,symbol:()=>hr,table:()=>En,tagFactory:()=>a,tbody:()=>wn,td:()=>Cn,template:()=>Qn,text:()=>ar,textarea:()=>Wn,tfoot:()=>_n,th:()=>Nn,thead:()=>An,time:()=>Jt,title:()=>rt,tr:()=>Ln,track:()=>on,trapFocus:()=>$r,tspan:()=>cr,u:()=>Xt,ul:()=>Ct,unregisterComponent:()=>Or,untracked:()=>Q,use:()=>br,var_:()=>Yt,video:()=>sn,watch:()=>Yr,when:()=>Br,withSSR:()=>Zr,writable:()=>ao});function A(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var Qe=A();function L(t,e){if(Qe&&!t)throw new Error(`[Sibu] ${e}`)}function M(t){Qe&&console.warn(`[Sibu] ${t}`)}function j(t){let e=t.replace(/[\x00-\x20\x7f-\x9f]+/g,"").trim();if(!e)return"";let r=e.toLowerCase();return r.startsWith("javascript:")||r.startsWith("data:")||r.startsWith("vbscript:")||r.startsWith("blob:")?"":e}function Ee(t){let e=t.toLowerCase().replace(/\s+/g,"");return e.includes("url(")||e.includes("expression(")||e.includes("javascript:")||e.includes("-moz-binding")?"":t}var Eo=new Set(["href","src","action","formaction","cite","poster","background","srcset"]);function q(t){return Eo.has(t)}var wo=A(),V=new Array(32),G=32,H=-1,z=null,Co=new WeakMap,W="__s",B=0,E=[],O=new Set;function ne(t){try{t()}catch(e){wo&&M(`Subscriber threw during notification: ${e instanceof Error?e.message:String(e)}`)}}var ge=0,be=!1;function v(t,e){e||(e=t),Ze(e),++H,H>=G&&(G*=2,V.length=G),V[H]=e,z=e;try{t()}finally{H--,z=H>=0?V[H]:null}return()=>Ze(e)}function _o(){ge===0&&(++H,H>=G&&(G*=2,V.length=G),V[H]=null,z=null,be=!0),ge++}function No(){ge--,ge===0&&(H--,z=H>=0?V[H]:null,be=!1)}function Q(t){_o();try{return t()}finally{No()}}function Z(t){if(!z)return;let e=z;if(e._dep===t)return;let r=e._deps;if(r){if(r.has(t))return;r.add(t)}else if(e._dep!==void 0){let o=new Set;o.add(e._dep),o.add(t),e._deps=o,e._dep=void 0}else e._dep=t;let n=t[W];n||(n=new Set,Co.set(t,n),t[W]=n),n.add(z),n.size===1?t.__f=z:t.__f!==void 0&&(t.__f=void 0)}function Je(t){let e=t[W];if(e)for(let r of e)r._c?I(r):O.has(r)||(O.add(r),E.push(r))}function Xe(){if(!(B>0)){B++;try{let t=0;for(;t<E.length;)ne(E[t]),t++}finally{E.length=0,O.clear(),B--}}}function I(t){t();let e=t._sig;for(;e;){let r=e.__f;if(r){if(r._c){let i=r._sig;i._d=!0,e=i;continue}O.has(r)||(O.add(r),E.push(r));break}let n=e[W];if(!n)break;let o;for(let i of n)if(i._c){i();let s=i._sig;s&&!o?o=s:s&&I(i)}else O.has(i)||(O.add(i),E.push(i));e=o}}function he(t){let e=t.__f;if(e){if(B>0){e._c?I(e):O.has(e)||(O.add(e),E.push(e));return}B++;try{e._c?I(e):ne(e);let n=0;for(;n<E.length;)ne(E[n]),n++}finally{E.length=0,O.clear(),B--}return}let r=t[W];if(!(!r||r.size===0)){if(B>0){for(let n of r)n._c?I(n):O.has(n)||(O.add(n),E.push(n));return}B++;try{let n=0;for(let i of r)E[n++]=i;for(let i=0;i<n;i++)E[i]._c&&I(E[i]);for(let i=0;i<n;i++)E[i]._c||O.has(E[i])||ne(E[i]);let o=n;for(;o<E.length;)ne(E[o]),o++}finally{E.length=0,O.clear(),B--}}}function Ze(t){let e=t,r=e._dep;if(r!==void 0){let o=r[W];o&&(o.delete(t),r.__f===t&&(r.__f=void 0)),e._dep=void 0;return}let n=e._deps;if(!(!n||n.size===0)){for(let o of n){let i=o[W];i&&(i.delete(t),o.__f===t&&(o.__f=void 0))}n.clear()}}var we=A();function xe(t,e,r){function n(){let i;try{i=r()}catch(c){we&&M(`bindAttribute: getter for "${e}" threw: ${c instanceof Error?c.message:String(c)}`);return}if(typeof i=="boolean"){e in t&&(e==="checked"||e==="disabled"||e==="selected")?t[e]=i:i?t.setAttribute(e,""):t.removeAttribute(e);return}let s=String(i);(e==="value"||e==="checked")&&e in t?t[e]=e==="checked"?!!i:s:t.setAttribute(e,q(e)?j(s):s)}return v(n)}function Ce(t,e,r){let n=null;function o(){let s;try{s=typeof e=="function"?e():e}catch(l){we&&M(`bindDynamic: name getter threw: ${l instanceof Error?l.message:String(l)}`);return}let c;try{c=typeof r=="function"?r():r}catch(l){we&&M(`bindDynamic: value getter threw: ${l instanceof Error?l.message:String(l)}`);return}if((s[0]==="o"||s[0]==="O")&&(s[1]==="n"||s[1]==="N"))return;n!==null&&n!==s&&t.removeAttribute(n);let u=String(c);(s==="value"||s==="checked")&&s in t?t[s]=s==="checked"?!!c:u:t.setAttribute(s,q(s)?j(u):u),n=s}let i=v(o);return()=>{i(),n!==null&&t.removeAttribute(n)}}var Ao=A();function $(t,e){let r=[];function n(){let o;try{o=e()}catch(l){Ao&&M(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}if(o==null||typeof o=="boolean"){for(let l=0;l<r.length;l++){let d=r[l];d.parentNode&&d.parentNode.removeChild(d)}r.length=0;return}let i=t.parentNode;if(!i){r.length=0;return}let s;if(Array.isArray(o)){s=[];for(let l=0;l<o.length;l++){let d=o[l];d==null||typeof d=="boolean"||s.push(d instanceof Node?d:document.createTextNode(String(d)))}}else s=[o instanceof Node?o:document.createTextNode(String(o))];let c=r.length>0&&s.length>0?new Set:void 0;if(c){for(let l=0;l<s.length;l++)for(let d=0;d<r.length;d++)if(s[l]===r[d]){c.add(s[l]);break}}for(let l=0;l<r.length;l++){let d=r[l];c?.has(d)||d.parentNode&&d.parentNode.removeChild(d)}let u=t.nextSibling;for(let l=0;l<s.length;l++){let d=s[l];c?.has(d)&&d.parentNode===i?d.nextSibling!==u&&i.insertBefore(d,u):i.insertBefore(d,u)}r=s}return v(n)}var ye=new WeakMap,_e=A(),re=0;function w(t,e){let r=ye.get(t);r||(r=[],ye.set(t,r)),r.push(e),_e&&re++}function R(t){let e=[t],r=[];for(;e.length>0;){let n=e.pop();r.push(n);let o=n.childNodes;for(let i=0;i<o.length;i++)e.push(o[i])}for(let n=r.length-1;n>=0;n--){let o=r[n],i=ye.get(o);if(i){_e&&(re-=i.length);for(let s of i)s();ye.delete(o)}}}function Ye(t=0){return _e?(t>0&&re>t&&M(`checkLeaks: ${re} active DOM bindings detected. Expected \u2264${t}. This may indicate a component was removed from the DOM without calling dispose().`),re):0}var k="http://www.w3.org/2000/svg",et=new Map;function Lo(t){let e=et.get(t);return e!==void 0||(e=t.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`),et.set(t,e)),e}function Mo(t,e){if(typeof e=="function"){let n=v(()=>{t.setAttribute("style",e())});w(t,n);return}if(typeof e=="string"){t.setAttribute("style",e);return}let r=t;for(let n in e){let o=e[n],i=Lo(n);if(typeof o=="function"){let s=o,c=v(()=>{r.style.setProperty(i,Ee(String(s())))});w(t,c)}else r.style.setProperty(i,Ee(String(o)))}}function Oo(t,e){if(typeof e=="string"){t.setAttribute("class",e);return}if(typeof e=="function"){let i=v(()=>{t.setAttribute("class",e())});w(t,i);return}let r=e,n=!1,o="";for(let i in r){let s=r[i];if(typeof s=="function"){n=!0;break}s&&(o=o?`${o} ${i}`:i)}if(n){let s=v(()=>{let c="";for(let u in r){let l=r[u];(typeof l=="function"?l():l)&&(c=c?`${c} ${u}`:u)}t.setAttribute("class",c)});w(t,s)}else t.setAttribute("class",o)}function Ne(t,e){if(typeof e=="string"){t.textContent=e;return}if(typeof e=="number"){t.textContent=String(e);return}if(!(typeof e=="boolean"||e==null)){if(typeof e=="function"){let r=document.createComment("");t.appendChild(r),w(t,$(r,e));return}if(e instanceof Node){t.appendChild(e);return}if(Array.isArray(e))for(let r=0;r<e.length;r++){let n=e[r];if(typeof n=="function"){let o=document.createComment("");t.appendChild(o),w(t,$(o,n))}else if(n instanceof Node)t.appendChild(n);else if(Array.isArray(n))for(let o=0;o<n.length;o++){let i=n[o];if(typeof i=="function"){let s=document.createComment("");t.appendChild(s),w(t,$(s,i))}else i instanceof Node?t.appendChild(i):i!=null&&typeof i!="boolean"&&t.appendChild(document.createTextNode(String(i)))}else n!=null&&typeof n!="boolean"&&t.appendChild(document.createTextNode(String(n)))}}}var a=(t,e)=>(r,n)=>{let o=e?document.createElementNS(e,t):document.createElement(t);if(r===void 0)return o;if(n===void 0&&typeof r=="string")return o.textContent=r,o;if(n!==void 0)return o.setAttribute("class",r),Ne(o,n),o;if(Array.isArray(r)||r instanceof Node)return Ne(o,r),o;let i=r,s=i.class;s!=null&&Oo(o,s);let c=i.id;c!=null&&(o.id=c);let u=i.nodes;u!=null&&Ne(o,u);let l=i.on;if(l)for(let f in l)o.addEventListener(f,l[f]);let d=i.style;d!=null&&Mo(o,d);let m=i.ref;m&&(m.current=o);for(let f in i)switch(f){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let p=i[f];if(p==null||f[0]==="o"&&f[1]==="n")continue;if(typeof p=="function")w(o,xe(o,f,p));else if(typeof p=="boolean")f in o&&(f==="checked"||f==="disabled"||f==="selected")?o[f]=p:p?o.setAttribute(f,""):o.removeAttribute(f);else{let g=String(p);o.setAttribute(f,q(f)?j(g):g)}}}return i.onElement&&typeof i.onElement=="function"&&i.onElement(o),o};var fi=a("html"),tt=a("head"),nt=a("body"),rt=a("title"),x=a("div"),C=a("span"),ot=a("section"),it=a("article"),st=a("header"),at=a("footer"),ct=a("nav"),lt=a("main"),dt=a("aside"),ut=a("address"),oe=a("p"),pt=a("h1"),ft=a("h2"),ie=a("h3"),mt=a("h4"),gt=a("h5"),bt=a("h6"),ht=a("blockquote"),xt=a("dd"),yt=a("dl"),vt=a("dt"),Tt=a("figcaption"),kt=a("figure"),St=a("hr"),Et=a("li"),wt=a("ol"),Ct=a("ul"),ve=a("pre"),_t=a("a"),Nt=a("abbr"),At=a("b"),Lt=a("bdi"),Mt=a("bdo"),Ot=a("br"),Rt=a("cite"),Ht=a("code"),Dt=a("data"),Bt=a("dfn"),zt=a("em"),Kt=a("i"),Ft=a("kbd"),Pt=a("mark"),jt=a("q"),qt=a("rp"),Wt=a("rt"),$t=a("ruby"),Ut=a("s"),It=a("samp"),Vt=a("small"),Gt=a("strong"),Qt=a("sub"),Zt=a("sup"),Jt=a("time"),Xt=a("u"),Yt=a("var"),en=a("area"),tn=a("audio"),nn=a("img"),rn=a("map"),on=a("track"),sn=a("video"),an=a("embed"),cn=a("iframe"),ln=a("object"),dn=a("param"),un=a("picture"),pn=a("portal"),fn=a("source"),mn=a("svg",k),gn=a("math"),bn=a("canvas"),hn=a("noscript"),xn=a("script"),yn=a("del"),vn=a("ins"),Tn=a("caption"),kn=a("col"),Sn=a("colgroup"),En=a("table"),wn=a("tbody"),Cn=a("td"),_n=a("tfoot"),Nn=a("th"),An=a("thead"),Ln=a("tr"),K=a("button"),Mn=a("datalist"),On=a("fieldset"),Rn=a("form"),Hn=a("input"),Dn=a("label"),Bn=a("legend"),zn=a("meter"),Kn=a("optgroup"),Fn=a("option"),Pn=a("output"),jn=a("progress"),qn=a("select"),Wn=a("textarea"),$n=a("details"),Un=a("dialog"),In=a("menu"),Vn=a("summary"),Gn=a("slot"),Qn=a("template"),Zn=a("base"),Jn=a("link"),Xn=a("meta"),J=a("style"),Yn=a("circle",k),er=a("ellipse",k),tr=a("g",k),nr=a("line",k),rr=a("path",k),or=a("polygon",k),ir=a("polyline",k),sr=a("rect",k),ar=a("text",k),cr=a("tspan",k),lr=a("defs",k),dr=a("clipPath",k),ur=a("mask",k),pr=a("pattern",k),fr=a("linearGradient",k),mr=a("radialGradient",k),gr=a("stop",k),br=a("use",k),hr=a("symbol",k),xr=a("marker",k),yr=a("center"),vr=a("font"),Tr=a("marquee"),kr=t=>a(t);var Ro=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Sr=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),Er=new WeakMap;function Ho(t){let e=t.length-1,r=t[0];for(let p=0;p<e;p++)r+=`\0${p}\0${t[p+1]}`;let n=0,o=r.length;function i(){for(;n<o&&(r[n]===" "||r[n]===" "||r[n]===`
2
- `||r[n]==="\r");)n++}function s(){if(r.charCodeAt(n)!==0)return-1;let p=n;n++;let g=0;for(;n<o&&r.charCodeAt(n)!==0;)g=g*10+(r.charCodeAt(n)-48),n++;return n<o&&n++,g<0||g>=e?(n=p,-1):g}function c(){let p=n;for(;n<o;){let g=r.charCodeAt(n);if(g>=97&&g<=122||g>=65&&g<=90||g>=48&&g<=57||g===45)n++;else break}return r.slice(p,n)}function u(){if(i(),r[n]!=="=")return{kind:"bool"};n++,i();let p=s();if(p>=0)return{kind:"expr",idx:p};let g=r[n];if(g==='"'||g==="'"){n++;let h=[],D=[],P="";for(;n<o&&r[n]!==g;){let de=s();de>=0?(h.push(P),P="",D.push(de)):P+=r[n++]}return n<o&&n++,h.push(P),D.length===0?{kind:"static",value:h[0]}:{kind:"mixed",statics:h,exprs:D}}let T=n;for(;n<o;){let h=r.charCodeAt(n);if(h===32||h===9||h===10||h===13||h===62||h===47)break;n++}return{kind:"static",value:r.slice(T,n)}}function l(){let p=[];for(;n<o&&(i(),!(r[n]===">"||r[n]==="/"));){let g=n;for(;n<o;){let h=r.charCodeAt(n);if(h>=97&&h<=122||h>=65&&h<=90||h>=48&&h<=57||h===45||h===58||h===95||h===46)n++;else break}let T=r.slice(g,n);if(!T)break;let y=u();T.startsWith("on:")?y.kind==="expr"&&p.push({t:3,name:T.slice(3),idx:y.idx}):y.kind==="bool"?p.push({t:4,name:T}):y.kind==="static"?p.push({t:0,name:T,value:y.value}):y.kind==="expr"?p.push({t:1,name:T,idx:y.idx}):y.kind==="mixed"&&p.push({t:2,name:T,statics:y.statics,exprs:y.exprs})}return p}function d(p){return p.replace(/\s+/g," ")}function m(p){let g="";for(;n<o&&r[n]!=="<";){let y=s();if(y>=0){let h=d(g);h&&p.push({t:1,value:h}),g="",p.push({t:2,idx:y})}else g+=r[n++]}let T=d(g);T&&p.push({t:1,value:T})}function f(){let p=[];for(;n<o&&!(r[n]==="<"&&n+1<o&&r[n+1]==="/");)if(r[n]==="<"){n++;let g=c(),T=l();i();let y=Ro.has(g),h=r[n]==="/";if(h&&n++,n<o&&n++,y||h)p.push({t:0,el:{tag:g,svg:Sr.has(g),attrs:T,children:[]}});else{let D=f();r[n]==="<"&&n+1<o&&r[n+1]==="/"&&(n+=2,c(),i(),n<o&&r[n]===">"&&n++),p.push({t:0,el:{tag:g,svg:Sr.has(g),attrs:T,children:D}})}}else m(p);return p}return f()}function Ae(t,e){let r=t.svg?document.createElementNS(k,t.tag):document.createElement(t.tag);for(let n=0;n<t.attrs.length;n++){let o=t.attrs[n];switch(o.t){case 0:r.setAttribute(o.name,o.value);break;case 1:{let i=o.name;if(i[0]==="o"&&i[1]==="n")break;let s=e[o.idx];if(typeof s=="function")w(r,xe(r,i,s));else if(s!=null){let c=String(s);r.setAttribute(i,q(i)?j(c):c)}break}case 2:{let i=o.statics[0];for(let s=0;s<o.exprs.length;s++)i+=String(e[o.exprs[s]])+o.statics[s+1];r.setAttribute(o.name,i);break}case 3:r.addEventListener(o.name,e[o.idx]);break;case 4:r.setAttribute(o.name,"");break}}for(let n=0;n<t.children.length;n++){let o=t.children[n];switch(o.t){case 0:r.appendChild(Ae(o.el,e));break;case 1:r.appendChild(document.createTextNode(o.value));break;case 2:{let i=e[o.idx];if(typeof i=="function"){let s=document.createComment("");r.appendChild(s),w(r,$(s,i))}else if(i instanceof Node)r.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let c=i[s];c instanceof Node?r.appendChild(c):c!=null&&typeof c!="boolean"&&r.appendChild(document.createTextNode(String(c)))}else i!=null&&typeof i!="boolean"&&r.appendChild(document.createTextNode(String(i)));break}}}return r}function Le(t,...e){let r=Er.get(t);if(r||(r=Ho(t),Er.set(t,r)),r.length===1&&r[0].t===0)return Ae(r[0].el,e);let n=document.createElement("div");for(let o=0;o<r.length;o++){let i=r[o];switch(i.t){case 0:n.appendChild(Ae(i.el,e));break;case 1:n.appendChild(document.createTextNode(i.value));break;case 2:{let s=e[i.idx];if(s instanceof Node)n.appendChild(s);else if(typeof s=="function"){let c=document.createComment("bind:htm");n.appendChild(c),w(n,$(c,s))}else if(Array.isArray(s))for(let c=0;c<s.length;c++){let u=s[c];u instanceof Node?n.appendChild(u):u!=null&&typeof u!="boolean"&&n.appendChild(document.createTextNode(String(u)))}else s!=null&&typeof s!="boolean"&&n.appendChild(document.createTextNode(String(s)));break}}}return n.childNodes.length===1&&n.firstChild instanceof Element?n.firstChild:n}function wr(t,e){if(!e)throw new Error("[Sibu] mount: container element not found. Make sure the DOM element exists before calling mount().");L(typeof t=="function"||t instanceof Node,"mount: first argument must be a component function or a DOM Node.");let r=typeof performance<"u"?performance.now():0,n=typeof t=="function"?t():t,o=typeof performance<"u"?performance.now()-r:0;e.appendChild(n);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:n,container:e,duration:o}),{node:n,unmount(){i&&i.emit("app:unmount",{rootElement:n}),R(n),n.parentNode&&n.parentNode.removeChild(n)}}}var Do=A();function Cr(t){return typeof t=="function"?Cr(t()):t instanceof Node?t:document.createTextNode(String(t))}function Bo(t,e){if(e===0)return[];let r=[],n=new Array(e);for(let c=0;c<e;c++){let u=t[c],l=0,d=r.length;for(;l<d;){let m=l+d>>1;t[r[m]]<u?l=m+1:d=m}r[l]=c,n[c]=l>0?r[l-1]:-1}let o=r.length,i=new Array(o),s=r[o-1];for(let c=o-1;c>=0;c--)i[c]=s,s=n[s];return i}function _r(t,e,r){L(typeof t=="function","each: first argument must be a function that returns an array."),L(typeof e=="function","each: second argument must be a render function."),L(r&&typeof r.key=="function","each: options.key must be a function that returns a unique key per item.");let n=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],c=i,u=0,l=new Map,d=new Map,m=[],f=[],p=new Uint8Array(0),g=new Map,T=[],y=[],h=new Map,D=!1,P=!1,de=r.key,We=()=>{let $e=t(),S=$e.length,ue=n.parentNode;if(!ue)return;P||(ue.insertBefore(o,n.nextSibling),P=!0),f.length<S&&(f=new Array(S));for(let b=0;b<S;b++)f[b]=de($e[b]);let ee=f;m.length<S&&(m=new Array(S)),d.clear(),h.clear();for(let b=0;b<S;b++)h.set(ee[b],b);for(let b=0;b<S;b++){let N=ee[b],Ie=l.get(N),te;if(Ie!==void 0)te=Ie;else{let Ve=N,ho=()=>t()[h.get(Ve)],xo=()=>h.get(Ve);try{te=Cr(e(ho,xo))}catch(ke){Do&&M(`each: render threw for item at index ${b} (key="${ee[b]}"): ${ke instanceof Error?ke.message:String(ke)}`),te=document.createComment(`each:error:${b}`)}}d.set(N,te),m[b]=te}for(let[b,N]of l)d.has(b)||(R(N),N.parentNode&&ue.removeChild(N));if(S===0){u=0;let b=l;l=d,d=b;return}g.clear();for(let b=0;b<u;b++)g.set(c[b],b);T.length<S&&(T=new Array(S),y=new Array(S));let pe=0;for(let b=0;b<S;b++){let N=g.get(ee[b]);N!==void 0&&(T[pe]=b,y[pe]=N,pe++)}let Ue=Bo(y,pe);p.length<S?p=new Uint8Array(S):p.fill(0,0,S);for(let b=0;b<Ue.length;b++)p[T[Ue[b]]]=1;let fe=o;for(let b=S-1;b>=0;b--){let N=m[b];p[b]||N.nextSibling!==fe&&ue.insertBefore(N,fe),fe=N}let me=c===i?s:i;me.length<S&&(me.length=S);for(let b=0;b<S;b++)me[b]=ee[b];c=me,u=S;let bo=l;l=d,d=bo,D=!0};return v(We),D||queueMicrotask(()=>{!D&&n.parentNode&&We()}),n}function Ar(t){let e=document.createDocumentFragment();for(let r of t)if(!(r==null||typeof r=="boolean"))if(Array.isArray(r))for(let n of r)n==null||typeof n=="boolean"||e.appendChild(Nr(n));else e.appendChild(Nr(r));return e}function Nr(t){if(t==null)return document.createTextNode("");if(t instanceof Node)return t;if(typeof t=="function"){let e=t();return e instanceof Node?e:document.createTextNode(String(e??""))}return document.createTextNode(String(t))}function Lr(t,e){let r=document.createComment("portal"),n=e||document.body,o=null;queueMicrotask(()=>{try{o=t(),n.appendChild(o)}catch(s){console.error("[Portal] Render error:",s)}});let i=new MutationObserver(()=>{!r.isConnected&&o&&(o.remove(),o=null,i.disconnect())});return queueMicrotask(()=>{r.parentNode&&i.observe(r.parentNode,{childList:!0})}),r}var Me=new Map;function Mr(t,e){Me.set(t,e)}function Or(t){Me.delete(t)}function Oe(t){let e=Me.get(t);return e?e():x({nodes:`[Component "${t}" not found]`})}function Rr(t){let e=x({class:"sibu-dynamic"});function r(){let n=t(),o;typeof n=="function"?o=n():o=Oe(n);for(let i of Array.from(e.childNodes))R(i);e.replaceChildren(o)}return v(r),e}function Hr(t,e="default"){return t?.[e]}function Dr(t,e){return v(()=>{e.style.display=t()?"":"none"}),e}function Br(t,e,r){let n=document.createComment("when"),o=null,i,s=!1,c=()=>{let u=t(),l=n.parentNode;if(!l||s&&u===i)return;i=u,o?.parentNode&&(R(o),o.parentNode.removeChild(o),o=null);let d=u?e():r?r():null;if(d!=null){let m=d instanceof Node?d:document.createTextNode(String(d));l.insertBefore(m,n.nextSibling),o=m}s=!0};return v(c),s||queueMicrotask(()=>{!s&&n.parentNode&&c()}),n}function zr(t,e,r){let n=document.createComment("match"),o=null,i,s=!1,c=()=>{let u=String(t()),l=n.parentNode;if(!l||s&&u===i)return;i=u,o?.parentNode&&(R(o),o.parentNode.removeChild(o),o=null);let d=e[u]||r;if(d){let m=d();if(m!=null){let f=m instanceof Node?m:document.createTextNode(String(m));l.insertBefore(f,n.nextSibling),o=f}}s=!0};return v(c),s||queueMicrotask(()=>{!s&&n.parentNode&&c()}),n}function Kr(t,e,r){let n=document.createComment("keep-alive"),o=new Map,i=[],s=r?.max??0,c,u=null,l=!1,d=()=>{let m=t(),f=n.parentNode;if(!f||l&&m===c)return;u?.parentNode&&f.removeChild(u),c=m;let p=o.get(m);if(p){let g=i.indexOf(m);g!==-1&&(i.splice(g,1),i.push(m))}else{let g=e[m];if(!g){u=null,l=!0;return}if(p=g(),o.set(m,p),i.push(m),s>0&&i.length>s){let T=i.shift(),y=o.get(T);y&&(R(y),y.parentNode&&y.parentNode.removeChild(y),o.delete(T))}}f.insertBefore(p,n.nextSibling),u=p,l=!0};return v(d),l||queueMicrotask(()=>{!l&&n.parentNode&&d()}),n}function Fr(t,e,r){let n=e(t,r);typeof n=="function"&&w(t,n)}var Pr=(t,e)=>{let r=n=>{t.contains(n.target)||e()};return document.addEventListener("pointerdown",r,!0),()=>document.removeEventListener("pointerdown",r,!0)},jr=(t,e)=>{let r=e.duration??500,n=null,o=()=>{n=setTimeout(()=>{e.callback(),n=null},r)},i=()=>{n!==null&&(clearTimeout(n),n=null)};return t.addEventListener("pointerdown",o),t.addEventListener("pointerup",i),t.addEventListener("pointerleave",i),()=>{i(),t.removeEventListener("pointerdown",o),t.removeEventListener("pointerup",i),t.removeEventListener("pointerleave",i)}},qr=(t,e)=>{let r=()=>{let n=typeof e=="function"?e():t.textContent??"";navigator.clipboard.writeText(n)};return t.addEventListener("click",r),()=>t.removeEventListener("click",r)},Wr=t=>{let e=()=>{t.style.overflow="hidden",t.style.height="auto",t.style.height=`${t.scrollHeight}px`};return e(),t.addEventListener("input",e),()=>t.removeEventListener("input",e)},$r=t=>{let e='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',r=n=>{if(n.key!=="Tab")return;let o=Array.from(t.querySelectorAll(e));if(o.length===0)return;let i=o[0],s=o[o.length-1];n.shiftKey&&document.activeElement===i?(n.preventDefault(),s.focus()):!n.shiftKey&&document.activeElement===s&&(n.preventDefault(),i.focus())};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)};var U=null;function Ur(t,e){try{let r=t();return r&&typeof r.then=="function"&&r.catch(n=>{e?e(n,"async"):U?U(n,"async"):console.error("Unhandled async error in Sibu.catchError:",n)}),r}catch(r){return e?e(r,"sync"):U?U(r,"sync"):console.error("Unhandled error in Sibu.catchError:",r),null}}async function Ir(t,e){try{return await t()}catch(r){return e?e(r,"async"):U?U(r,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",r),null}}function Vr(t){U=t}var se=0,Re=new Set;function Te(t){se++;try{return t()}finally{se--,se===0&&zo()}}function X(t){return se===0?!1:(Re.add(t),!0)}function Gr(){return se>0}function zo(){for(let t of Re)Je(t);Re.clear(),Xe()}var Qr=globalThis,He=A();function _(t,e){let r={value:t},n=He?e?.name:void 0,o=e?.equals;n&&(r.__name=n);function i(){return Z(r),r.value}i.__signal=r,n&&(i.__name=n);function s(c){let u=typeof c=="function"?c(r.value):c;if(!(o?o(r.value,u):Object.is(u,r.value))){if(He){let l=r.value;r.value=u;let d=Qr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&d.emit("signal:update",{signal:r,name:n,oldValue:l,newValue:u})}else r.value=u;X(r)||he(r)}}if(He){let c=Qr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&c.emit("signal:create",{signal:r,name:n,getter:i,initial:t})}return[i,s]}var De=!1;function Y(){return De}function Be(){De=!0}function ze(){De=!1}function Zr(t){Be();try{return t()}finally{ze()}}var Jr=globalThis;function Xr(t,e){let r,n=!0;return()=>{let o=t();if(n)n=!1,r=o,Q(()=>e(o,void 0));else{let i=r;r=o,Q(()=>e(o,i))}}}function ae(t,e){if(L(typeof t=="function","effect: argument must be a function."),Y())return()=>{};let r=e?.onError,n=r?()=>{try{t()}catch(c){r(c)}}:t,o=()=>{},i=()=>{o(),o=v(n,i)};o=v(n,i);let s=Jr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return s&&s.emit("effect:create",{effectFn:t}),()=>{let c=Jr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&c.emit("effect:destroy",{effectFn:t}),o()}}function F(t,e){L(typeof t=="function","derived: argument must be a getter function.");let r=e?.name,n={};n._d=!1,n._g=t;let o=()=>{n._d||(n._d=!0)};o._c=1,o._sig=n,v(()=>{n._d=!1,n._v=t()},o);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;function s(){if(be)return n._d&&(n._d=!1,n._v=t()),n._v;if(Z(n),n._d){let c=n._v;v(()=>{n._d=!1,n._v=t()},o),i&&c!==n._v&&i.emit("computed:update",{signal:n,oldValue:c,newValue:n._v})}return n._v}return r&&(s.__name=r,n.__name=r),s.__signal=n,i&&i.emit("computed:create",{signal:n,name:r,getter:s}),s}function Yr(t,e){if(L(typeof t=="function","watch: first argument must be a getter function."),L(typeof e=="function","watch: second argument must be a callback function."),Y())return()=>{};let r,n=!0;return v(()=>{let s=t();if(n){r=s,n=!1;return}Object.is(s,r)||(e(s,r),r=s)})}function eo(t){L(t!==null&&typeof t=="object"&&!Array.isArray(t),"store: argument must be a plain object. For arrays, use array() instead.");let e={};Object.keys(t).forEach(u=>{let[l,d]=_(t[u]);e[u]=[l,d]});let r=new Proxy({},{get(u,l){if(l in e){let d=e[l][0];return d()}},set(){throw new Error("[Sibu] store: Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),n=()=>{let u={};return Object.keys(e).forEach(l=>{u[l]=e[l][0]()}),u};return[r,{setState:u=>{let l=n(),d=typeof u=="function"?u(l):u;Object.entries(d).forEach(([m,f])=>{m in e&&e[m][1](f)})},reset:()=>{Object.keys(t).forEach(u=>{let l=e[u][1];l(t[u])})},subscribe:u=>{let l=!0;return ae(()=>{let d=n();if(l){l=!1;return}u(d)})},subscribeKey:(u,l)=>{let d,m=!0;return ae(()=>{let f=e[u][0]();if(m){d=f,m=!1;return}if(!Object.is(f,d)){let p=d;d=f,l(f,p)}})},getSnapshot:n}]}function to(t){let[e,r]=_(t);return{get current(){return e()},set current(n){r(n)}}}function no(t){return F(t)}function ro(t){return F(t)}function oo(t=[]){let[e,r]=_([...t]);return[e,{push(...o){r(i=>[...i,...o])},pop(){let o;return r(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return r(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){r(i=>[...o,...i])},splice(o,i=0,...s){let c=[];return r(u=>{let l=[...u];return c=l.splice(o,i,...s),l}),c},remove(o){r(i=>i.filter((s,c)=>c!==o))},removeWhere(o){r(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((c,u)=>u!==s)})},set(o){r([...o])},update(o,i){r(s=>s.map((c,u)=>u===o?i:c))},updateWhere(o,i){r(s=>s.map(c=>o(c)?i(c):c))},sort(o){r(i=>[...i].sort(o))},reverse(){r(o=>[...o].reverse())},filter(o){r(i=>i.filter(o))},map(o){r(i=>i.map(o))},clear(){r([])}}]}function io(t=[]){let e=[...t],r=null,n={};function o(){r=null,X(n)||he(n)}function i(){return Z(n),r===null&&(r=Object.freeze([...e])),r}return[i,{push(...c){c.length!==0&&(e.push(...c),o())},pop(){if(e.length===0)return;let c=e.pop();return o(),c},shift(){if(e.length===0)return;let c=e.shift();return o(),c},unshift(...c){c.length!==0&&(e.unshift(...c),o())},splice(c,u=0,...l){let d=e.splice(c,u,...l);return(d.length>0||l.length>0)&&o(),d},remove(c){c<0||c>=e.length||(e.splice(c,1),o())},removeWhere(c){let u=e.findIndex(c);u!==-1&&(e.splice(u,1),o())},set(c){e=[...c],o()},update(c,u){c<0||c>=e.length||Object.is(e[c],u)||(e[c]=u,o())},updateWhere(c,u){let l=!1;for(let d=0;d<e.length;d++)if(c(e[d])){let m=u(e[d]);Object.is(e[d],m)||(e[d]=m,l=!0)}l&&o()},sort(c){e.length<=1||(e.sort(c),o())},reverse(){e.length<=1||(e.reverse(),o())},filter(c){let u=e.filter(c);u.length!==e.length&&(e=u,o())},map(c){let u=!1;for(let l=0;l<e.length;l++){let d=c(e[l],l);Object.is(e[l],d)||(e[l]=d,u=!0)}u&&o()},clear(){e.length!==0&&(e=[],o())}}]}function ce(t,e,r){if(Object.is(t,e))return!0;if(t==null||e==null||typeof t!=typeof e||typeof t!="object")return!1;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(t instanceof RegExp&&e instanceof RegExp)return t.toString()===e.toString();if(r||(r=new Set),r.has(t))return!0;if(r.add(t),Array.isArray(t))return!Array.isArray(e)||t.length!==e.length?!1:t.every((i,s)=>ce(i,e[s],r));let n=Object.keys(t),o=Object.keys(e);return n.length!==o.length?!1:n.every(i=>ce(t[i],e[i],r))}function so(t){return _(t,{equals:(e,r)=>ce(e,r)})}function ao(t,e,r){return[F(t,r),i=>{Te(()=>e(i))}]}function le(t,e){try{t()}catch(r){M(`${e}: callback threw: ${r instanceof Error?r.message:String(r)}`)}}function Ke(t,e){if(!(typeof document>"u"))if(e){if(e.isConnected){queueMicrotask(()=>{le(t,"onMount")});return}let r=new MutationObserver(()=>{e.isConnected&&(r.disconnect(),le(t,"onMount"))});queueMicrotask(()=>{e.isConnected?le(t,"onMount"):r.observe(document.body,{childList:!0,subtree:!0})})}else queueMicrotask(()=>{le(t,"onMount")})}function co(t,e){let r=()=>{let n=new MutationObserver(()=>{e.isConnected||(n.disconnect(),le(t,"onUnmount"))});n.observe(document.body,{childList:!0,subtree:!0})};e.isConnected?r():Ke(()=>{r()},e)}function lo(t,e){w(e,t)}function uo(t){let[e,r]=_(t);return{provide(n){r(n)},use(){return e},get(){return e()},set(n){r(n)}}}function Fe(t){let e=null;return function(){if(e)return e();let[n,o]=_("loading"),[i,s]=_(null),c=x({class:"sibu-lazy"});return t().then(u=>{e=u.default;let l=e();c.replaceChildren(l),o("loaded")}).catch(u=>{let l=u instanceof Error?u:new Error(String(u));s(l),o("error"),c.replaceChildren(x({class:"sibu-lazy-error",nodes:`Failed to load component: ${l.message}`}))}),c.appendChild(C({class:"sibu-lazy-loading",nodes:"Loading..."})),c}}function Pe({nodes:t,fallback:e}){let r=x({class:"sibu-suspense"}),n=e();return r.appendChild(n),queueMicrotask(()=>{try{let o=t();if(o.classList.contains("sibu-lazy")){let i=new MutationObserver(()=>{o.querySelector(".sibu-lazy-loading")||(i.disconnect(),r.replaceChildren(o))});i.observe(o,{childList:!0,subtree:!0}),o.querySelector(".sibu-lazy-loading")||r.replaceChildren(o)}else r.replaceChildren(o)}catch{}}),r}var Ko=A(),Fo=`
1
+ "use strict";var Sibu=(()=>{var Ae=Object.defineProperty;var Po=Object.getOwnPropertyDescriptor;var Do=Object.getOwnPropertyNames;var Fo=Object.prototype.hasOwnProperty;var Ye=(e,t)=>{for(var n in t)Ae(e,n,{get:t[n],enumerable:!0})},Ho=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Do(t))!Fo.call(e,o)&&o!==n&&Ae(e,o,{get:()=>t[o],enumerable:!(r=Po(t,o))||r.enumerable});return e};var Bo=e=>Ho(Ae({},"__esModule",{value:!0}),e);var pi={};Ye(pi,{DynamicComponent:()=>Dr,ErrorBoundary:()=>_o,ErrorDisplay:()=>we,Fragment:()=>Mr,KeepAlive:()=>Ir,Loading:()=>Lo,Portal:()=>Rr,SVG_NS:()=>k,Suspense:()=>je,__resetIdCounter:()=>Yr,a:()=>Lt,abbr:()=>Mt,action:()=>qr,address:()=>mt,area:()=>nn,array:()=>co,article:()=>ct,aside:()=>ft,asyncDerived:()=>fo,audio:()=>rn,autoResize:()=>Ur,b:()=>Rt,base:()=>Zn,batch:()=>Ee,bdi:()=>Ot,bdo:()=>Pt,bindDynamic:()=>Ne,blockquote:()=>vt,body:()=>it,br:()=>Dt,button:()=>Z,canvas:()=>yn,caption:()=>En,catchError:()=>Wr,catchErrorAsync:()=>Gr,center:()=>Tr,checkLeaks:()=>nt,circle:()=>tr,cite:()=>Ft,clickOutside:()=>$r,clipPath:()=>pr,code:()=>ke,col:()=>Sn,colgroup:()=>wn,context:()=>go,copyOnClick:()=>Kr,createId:()=>Qr,customElement:()=>Sr,data:()=>Ht,datalist:()=>On,dd:()=>Tt,deepEqual:()=>se,deepSignal:()=>uo,defer:()=>To,defs:()=>ur,del:()=>Tn,derived:()=>I,details:()=>Vn,dfn:()=>Bt,dialog:()=>Wn,disableSSR:()=>Ie,dispose:()=>O,div:()=>h,dl:()=>kt,dt:()=>Et,each:()=>Nr,effect:()=>P,ellipse:()=>nr,em:()=>zt,embed:()=>ln,enableSSR:()=>ze,enqueueBatchedSignal:()=>X,fieldset:()=>Pn,figcaption:()=>St,figure:()=>wt,font:()=>kr,footer:()=>dt,form:()=>Dn,g:()=>rr,getSlot:()=>Fr,h1:()=>bt,h2:()=>gt,h3:()=>ve,h4:()=>ht,h5:()=>yt,h6:()=>xt,head:()=>ot,header:()=>lt,hr:()=>Ct,html:()=>Oe,i:()=>It,iframe:()=>dn,img:()=>on,input:()=>Fn,ins:()=>kn,isBatching:()=>Zr,isSSR:()=>ee,kbd:()=>qt,label:()=>Hn,lazy:()=>$e,legend:()=>Bn,li:()=>At,line:()=>or,linearGradient:()=>br,link:()=>Xn,longPress:()=>jr,main:()=>pt,map:()=>sn,mark:()=>$t,marker:()=>vr,marquee:()=>Er,mask:()=>fr,match:()=>zr,math:()=>hn,memo:()=>so,memoFn:()=>ao,menu:()=>Gn,meta:()=>er,meter:()=>zn,mount:()=>Ar,nav:()=>ut,nextTick:()=>xo,noscript:()=>xn,object:()=>un,ol:()=>_t,on:()=>no,onCleanup:()=>bo,onMount:()=>qe,onUnmount:()=>mo,optgroup:()=>In,option:()=>qn,output:()=>$n,p:()=>xe,param:()=>pn,path:()=>ir,pattern:()=>mr,picture:()=>fn,polygon:()=>sr,polyline:()=>ar,portal:()=>mn,pre:()=>Te,progress:()=>jn,q:()=>jt,radialGradient:()=>gr,reactiveArray:()=>lo,rect:()=>cr,ref:()=>io,registerComponent:()=>Or,registerDisposer:()=>A,resolveComponent:()=>De,rp:()=>Kt,rt:()=>Ut,ruby:()=>Vt,s:()=>Wt,samp:()=>Gt,script:()=>vn,section:()=>at,select:()=>Kn,setGlobalErrorHandler:()=>Jr,show:()=>Hr,signal:()=>E,slot:()=>Qn,small:()=>Jt,source:()=>bn,span:()=>S,stop:()=>hr,store:()=>oo,strict:()=>ho,strictEffect:()=>yo,strong:()=>Qt,style:()=>z,sub:()=>Yt,summary:()=>Jn,sup:()=>Zt,svg:()=>gn,symbol:()=>xr,table:()=>Cn,tagFactory:()=>c,tbody:()=>An,td:()=>_n,template:()=>Yn,text:()=>lr,textarea:()=>Un,tfoot:()=>Nn,th:()=>Ln,thead:()=>Mn,time:()=>Xt,title:()=>st,tr:()=>Rn,track:()=>an,transition:()=>ko,trapFocus:()=>Vr,tspan:()=>dr,u:()=>en,ul:()=>Nt,unregisterComponent:()=>Pr,untracked:()=>Q,use:()=>yr,var_:()=>tn,video:()=>cn,watch:()=>ro,when:()=>Br,withSSR:()=>eo,writable:()=>po});var Ue={};Ye(Ue,{DynamicComponent:()=>Dr,ErrorBoundary:()=>_o,ErrorDisplay:()=>we,Fragment:()=>Mr,KeepAlive:()=>Ir,Loading:()=>Lo,Portal:()=>Rr,SVG_NS:()=>k,Suspense:()=>je,__resetIdCounter:()=>Yr,a:()=>Lt,abbr:()=>Mt,action:()=>qr,address:()=>mt,area:()=>nn,array:()=>co,article:()=>ct,aside:()=>ft,asyncDerived:()=>fo,audio:()=>rn,autoResize:()=>Ur,b:()=>Rt,base:()=>Zn,batch:()=>Ee,bdi:()=>Ot,bdo:()=>Pt,bindDynamic:()=>Ne,blockquote:()=>vt,body:()=>it,br:()=>Dt,button:()=>Z,canvas:()=>yn,caption:()=>En,catchError:()=>Wr,catchErrorAsync:()=>Gr,center:()=>Tr,checkLeaks:()=>nt,circle:()=>tr,cite:()=>Ft,clickOutside:()=>$r,clipPath:()=>pr,code:()=>ke,col:()=>Sn,colgroup:()=>wn,context:()=>go,copyOnClick:()=>Kr,createId:()=>Qr,customElement:()=>Sr,data:()=>Ht,datalist:()=>On,dd:()=>Tt,deepEqual:()=>se,deepSignal:()=>uo,defer:()=>To,defs:()=>ur,del:()=>Tn,derived:()=>I,details:()=>Vn,dfn:()=>Bt,dialog:()=>Wn,disableSSR:()=>Ie,dispose:()=>O,div:()=>h,dl:()=>kt,dt:()=>Et,each:()=>Nr,effect:()=>P,ellipse:()=>nr,em:()=>zt,embed:()=>ln,enableSSR:()=>ze,enqueueBatchedSignal:()=>X,fieldset:()=>Pn,figcaption:()=>St,figure:()=>wt,font:()=>kr,footer:()=>dt,form:()=>Dn,g:()=>rr,getSlot:()=>Fr,h1:()=>bt,h2:()=>gt,h3:()=>ve,h4:()=>ht,h5:()=>yt,h6:()=>xt,head:()=>ot,header:()=>lt,hr:()=>Ct,html:()=>Oe,i:()=>It,iframe:()=>dn,img:()=>on,input:()=>Fn,ins:()=>kn,isBatching:()=>Zr,isSSR:()=>ee,kbd:()=>qt,label:()=>Hn,lazy:()=>$e,legend:()=>Bn,li:()=>At,line:()=>or,linearGradient:()=>br,link:()=>Xn,longPress:()=>jr,main:()=>pt,map:()=>sn,mark:()=>$t,marker:()=>vr,marquee:()=>Er,mask:()=>fr,match:()=>zr,math:()=>hn,memo:()=>so,memoFn:()=>ao,menu:()=>Gn,meta:()=>er,meter:()=>zn,mount:()=>Ar,nav:()=>ut,nextTick:()=>xo,noscript:()=>xn,object:()=>un,ol:()=>_t,on:()=>no,onCleanup:()=>bo,onMount:()=>qe,onUnmount:()=>mo,optgroup:()=>In,option:()=>qn,output:()=>$n,p:()=>xe,param:()=>pn,path:()=>ir,pattern:()=>mr,picture:()=>fn,polygon:()=>sr,polyline:()=>ar,portal:()=>mn,pre:()=>Te,progress:()=>jn,q:()=>jt,radialGradient:()=>gr,reactiveArray:()=>lo,rect:()=>cr,ref:()=>io,registerComponent:()=>Or,registerDisposer:()=>A,resolveComponent:()=>De,rp:()=>Kt,rt:()=>Ut,ruby:()=>Vt,s:()=>Wt,samp:()=>Gt,script:()=>vn,section:()=>at,select:()=>Kn,setGlobalErrorHandler:()=>Jr,show:()=>Hr,signal:()=>E,slot:()=>Qn,small:()=>Jt,source:()=>bn,span:()=>S,stop:()=>hr,store:()=>oo,strict:()=>ho,strictEffect:()=>yo,strong:()=>Qt,style:()=>z,sub:()=>Yt,summary:()=>Jn,sup:()=>Zt,svg:()=>gn,symbol:()=>xr,table:()=>Cn,tagFactory:()=>c,tbody:()=>An,td:()=>_n,template:()=>Yn,text:()=>lr,textarea:()=>Un,tfoot:()=>Nn,th:()=>Ln,thead:()=>Mn,time:()=>Xt,title:()=>st,tr:()=>Rn,track:()=>an,transition:()=>ko,trapFocus:()=>Vr,tspan:()=>dr,u:()=>en,ul:()=>Nt,unregisterComponent:()=>Pr,untracked:()=>Q,use:()=>yr,var_:()=>tn,video:()=>cn,watch:()=>ro,when:()=>Br,withSSR:()=>eo,writable:()=>po});function _(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:typeof process<"u"&&process.env?.NODE_ENV!=="production"}var Ze=_();function L(e,t){if(Ze&&!e)throw new Error(`[Sibu] ${t}`)}function M(e){Ze&&console.warn(`[Sibu] ${e}`)}function $(e){let t=e.replace(/[\x00-\x20\x7f-\x9f]+/g,"").trim();if(!t)return"";let n=t.toLowerCase();return n.startsWith("javascript:")||n.startsWith("data:")||n.startsWith("vbscript:")||n.startsWith("blob:")?"":t}function _e(e){let t=e.toLowerCase().replace(/\s+/g,"");return t.includes("url(")||t.includes("expression(")||t.includes("javascript:")||t.includes("-moz-binding")?"":e}var zo=new Set(["href","src","action","formaction","cite","poster","background","srcset"]);function j(e){return zo.has(e)}var Io=_(),G=new Array(32),J=32,F=-1,B=null,qo=new WeakMap,K="__s",H=0,C=[],R=new Set;function re(e){try{e()}catch(t){Io&&M(`Subscriber threw during notification: ${t instanceof Error?t.message:String(t)}`)}}var fe=0,me=!1;function x(e,t){t||(t=e),Xe(t),++F,F>=J&&(J*=2,G.length=J),G[F]=t,B=t;try{e()}finally{F--,B=F>=0?G[F]:null}return()=>Xe(t)}function $o(){fe===0&&(++F,F>=J&&(J*=2,G.length=J),G[F]=null,B=null,me=!0),fe++}function jo(){fe--,fe===0&&(F--,B=F>=0?G[F]:null,me=!1)}function Q(e){$o();try{return e()}finally{jo()}}function Y(e){if(!B)return;let t=B;if(t._dep===e)return;let n=t._deps;if(n){if(n.has(e))return;n.add(e)}else if(t._dep!==void 0){let o=new Set;o.add(t._dep),o.add(e),t._deps=o,t._dep=void 0}else t._dep=e;let r=e[K];r||(r=new Set,qo.set(e,r),e[K]=r),r.add(B),r.size===1?e.__f=B:e.__f!==void 0&&(e.__f=void 0)}function et(e){let t=e[K];if(t)for(let n of t)n._c?W(n):R.has(n)||(R.add(n),C.push(n))}function tt(){if(!(H>0)){H++;try{let e=0;for(;e<C.length;)re(C[e]),e++}finally{C.length=0,R.clear(),H--}}}function W(e){e();let t=e._sig;for(;t;){let n=t.__f;if(n){if(n._c){let i=n._sig;i._d=!0,t=i;continue}R.has(n)||(R.add(n),C.push(n));break}let r=t[K];if(!r)break;let o;for(let i of r)if(i._c){i();let s=i._sig;s&&!o?o=s:s&&W(i)}else R.has(i)||(R.add(i),C.push(i));t=o}}function be(e){let t=e.__f;if(t){if(H>0){t._c?W(t):R.has(t)||(R.add(t),C.push(t));return}H++;try{t._c?W(t):re(t);let r=0;for(;r<C.length;)re(C[r]),r++}finally{C.length=0,R.clear(),H--}return}let n=e[K];if(!(!n||n.size===0)){if(H>0){for(let r of n)r._c?W(r):R.has(r)||(R.add(r),C.push(r));return}H++;try{let r=0;for(let i of n)C[r++]=i;for(let i=0;i<r;i++)C[i]._c&&W(C[i]);for(let i=0;i<r;i++)C[i]._c||R.has(C[i])||re(C[i]);let o=r;for(;o<C.length;)re(C[o]),o++}finally{C.length=0,R.clear(),H--}}}function Xe(e){let t=e,n=t._dep;if(n!==void 0){let o=n[K];o&&(o.delete(e),n.__f===e&&(n.__f=void 0)),t._dep=void 0;return}let r=t._deps;if(!(!r||r.size===0)){for(let o of r){let i=o[K];i&&(i.delete(e),o.__f===e&&(o.__f=void 0))}r.clear()}}var ge=_();function Ko(e){if(e.length<3)return!1;let t=e.toLowerCase();return t[0]==="o"&&t[1]==="n"&&t.charCodeAt(2)>=97&&t.charCodeAt(2)<=122}function he(e,t,n){if(Ko(t))return ge&&M(`bindAttribute: refusing to bind event-handler attribute "${t}". Use on:{ ${t.slice(2)}: fn } instead.`),()=>{};function r(){let i;try{i=n()}catch(a){ge&&M(`bindAttribute: getter for "${t}" threw: ${a instanceof Error?a.message:String(a)}`);return}if(typeof i=="boolean"){t in e&&(t==="checked"||t==="disabled"||t==="selected")?e[t]=i:i?e.setAttribute(t,""):e.removeAttribute(t);return}let s=String(i);(t==="value"||t==="checked")&&t in e?e[t]=t==="checked"?!!i:s:e.setAttribute(t,j(t)?$(s):s)}return x(r)}function Ne(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){ge&&M(`bindDynamic: name getter threw: ${l instanceof Error?l.message:String(l)}`);return}let a;try{a=typeof n=="function"?n():n}catch(l){ge&&M(`bindDynamic: value getter threw: ${l instanceof Error?l.message:String(l)}`);return}if((s[0]==="o"||s[0]==="O")&&(s[1]==="n"||s[1]==="N"))return;r!==null&&r!==s&&e.removeAttribute(r);let d=String(a);(s==="value"||s==="checked")&&s in e?e[s]=s==="checked"?!!a:d:e.setAttribute(s,j(s)?$(d):d),r=s}let i=x(o);return()=>{i(),r!==null&&e.removeAttribute(r)}}var Uo=_();function U(e,t){let n=[];function r(){let o;try{o=t()}catch(l){Uo&&M(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}if(o==null||typeof o=="boolean"){for(let l=0;l<n.length;l++){let u=n[l];u.parentNode&&u.parentNode.removeChild(u)}n.length=0;return}let i=e.parentNode;if(!i){n.length=0;return}let s;if(Array.isArray(o)){s=[];for(let l=0;l<o.length;l++){let u=o[l];u==null||typeof u=="boolean"||s.push(u instanceof Node?u:document.createTextNode(String(u)))}}else s=[o instanceof Node?o:document.createTextNode(String(o))];let a=n.length>0&&s.length>0?new Set:void 0;if(a){for(let l=0;l<s.length;l++)for(let u=0;u<n.length;u++)if(s[l]===n[u]){a.add(s[l]);break}}for(let l=0;l<n.length;l++){let u=n[l];a?.has(u)||u.parentNode&&u.parentNode.removeChild(u)}let d=e.nextSibling;for(let l=0;l<s.length;l++){let u=s[l];a?.has(u)&&u.parentNode===i?u.nextSibling!==d&&i.insertBefore(u,d):i.insertBefore(u,d)}n=s}return x(r)}var ye=new WeakMap,Le=_(),oe=0;function A(e,t){let n=ye.get(e);n||(n=[],ye.set(e,n)),n.push(t),Le&&oe++}function O(e){let t=[e],n=[];for(;t.length>0;){let r=t.pop();n.push(r);let o=r.childNodes;for(let i=0;i<o.length;i++)t.push(o[i])}for(let r=n.length-1;r>=0;r--){let o=n[r],i=ye.get(o);if(i){Le&&(oe-=i.length);for(let s of i)s();ye.delete(o)}}}function nt(e=0){return Le?(e>0&&oe>e&&M(`checkLeaks: ${oe} active DOM bindings detected. Expected \u2264${e}. This may indicate a component was removed from the DOM without calling dispose().`),oe):0}var k="http://www.w3.org/2000/svg",rt=new Map;function Vo(e){let t=rt.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),rt.set(e,t)),t}function Wo(e,t){if(typeof t=="function"){let r=x(()=>{e.setAttribute("style",t())});A(e,r);return}if(typeof t=="string"){e.setAttribute("style",t);return}let n=e;for(let r in t){let o=t[r],i=Vo(r);if(typeof o=="function"){let s=o,a=x(()=>{n.style.setProperty(i,_e(String(s())))});A(e,a)}else n.style.setProperty(i,_e(String(o)))}}function Go(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=x(()=>{e.setAttribute("class",t())});A(e,i);return}let n=t,r=!1,o="";for(let i in n){let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=x(()=>{let a="";for(let d in n){let l=n[d];(typeof l=="function"?l():l)&&(a=a?`${a} ${d}`:d)}e.setAttribute("class",a)});A(e,s)}else e.setAttribute("class",o)}function Me(e,t){if(typeof t=="string"){e.textContent=t;return}if(typeof t=="number"){e.textContent=String(t);return}if(!(typeof t=="boolean"||t==null)){if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),A(e,U(n,t));return}if(t instanceof Node){e.appendChild(t);return}if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),A(e,U(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),A(e,U(s,i))}else i instanceof Node?e.appendChild(i):i!=null&&typeof i!="boolean"&&e.appendChild(document.createTextNode(String(i)))}else r!=null&&typeof r!="boolean"&&e.appendChild(document.createTextNode(String(r)))}}}var c=(e,t)=>(n,r)=>{let o=t?document.createElementNS(t,e):document.createElement(e);if(n===void 0)return o;if(typeof n=="string")return r!==void 0?(o.setAttribute("class",n),Me(o,r),o):(o.textContent=n,o);if(typeof n=="number")return o.textContent=String(n),o;if(Array.isArray(n)||n instanceof Node||typeof n=="function")return Me(o,n),o;let i=n,s=i.class;s!=null&&Go(o,s);let a=i.id;a!=null&&(o.id=a);let d=r!==void 0?r:i.nodes;d!=null&&Me(o,d);let l=i.on;if(l)for(let m in l)o.addEventListener(m,l[m]);let u=i.style;u!=null&&Wo(o,u);let f=i.ref;f&&(f.current=o);for(let m in i)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let p=i[m];if(p==null||m[0]==="o"&&m[1]==="n")continue;if(typeof p=="function")A(o,he(o,m,p));else if(typeof p=="boolean")m in o&&(m==="checked"||m==="disabled"||m==="selected")?o[m]=p:p?o.setAttribute(m,""):o.removeAttribute(m);else{let b=String(p);o.setAttribute(m,j(m)?$(b):b)}}}return i.onElement&&typeof i.onElement=="function"&&i.onElement(o),o};var Pi=c("html"),ot=c("head"),it=c("body"),st=c("title"),h=c("div"),S=c("span"),at=c("section"),ct=c("article"),lt=c("header"),dt=c("footer"),ut=c("nav"),pt=c("main"),ft=c("aside"),mt=c("address"),xe=c("p"),bt=c("h1"),gt=c("h2"),ve=c("h3"),ht=c("h4"),yt=c("h5"),xt=c("h6"),vt=c("blockquote"),Tt=c("dd"),kt=c("dl"),Et=c("dt"),St=c("figcaption"),wt=c("figure"),Ct=c("hr"),At=c("li"),_t=c("ol"),Nt=c("ul"),Te=c("pre"),Lt=c("a"),Mt=c("abbr"),Rt=c("b"),Ot=c("bdi"),Pt=c("bdo"),Dt=c("br"),Ft=c("cite"),ke=c("code"),Ht=c("data"),Bt=c("dfn"),zt=c("em"),It=c("i"),qt=c("kbd"),$t=c("mark"),jt=c("q"),Kt=c("rp"),Ut=c("rt"),Vt=c("ruby"),Wt=c("s"),Gt=c("samp"),Jt=c("small"),Qt=c("strong"),Yt=c("sub"),Zt=c("sup"),Xt=c("time"),en=c("u"),tn=c("var"),nn=c("area"),rn=c("audio"),on=c("img"),sn=c("map"),an=c("track"),cn=c("video"),ln=c("embed"),dn=c("iframe"),un=c("object"),pn=c("param"),fn=c("picture"),mn=c("portal"),bn=c("source"),gn=c("svg",k),hn=c("math"),yn=c("canvas"),xn=c("noscript"),vn=c("script"),Tn=c("del"),kn=c("ins"),En=c("caption"),Sn=c("col"),wn=c("colgroup"),Cn=c("table"),An=c("tbody"),_n=c("td"),Nn=c("tfoot"),Ln=c("th"),Mn=c("thead"),Rn=c("tr"),Z=c("button"),On=c("datalist"),Pn=c("fieldset"),Dn=c("form"),Fn=c("input"),Hn=c("label"),Bn=c("legend"),zn=c("meter"),In=c("optgroup"),qn=c("option"),$n=c("output"),jn=c("progress"),Kn=c("select"),Un=c("textarea"),Vn=c("details"),Wn=c("dialog"),Gn=c("menu"),Jn=c("summary"),Qn=c("slot"),Yn=c("template"),Zn=c("base"),Xn=c("link"),er=c("meta"),z=c("style"),tr=c("circle",k),nr=c("ellipse",k),rr=c("g",k),or=c("line",k),ir=c("path",k),sr=c("polygon",k),ar=c("polyline",k),cr=c("rect",k),lr=c("text",k),dr=c("tspan",k),ur=c("defs",k),pr=c("clipPath",k),fr=c("mask",k),mr=c("pattern",k),br=c("linearGradient",k),gr=c("radialGradient",k),hr=c("stop",k),yr=c("use",k),xr=c("symbol",k),vr=c("marker",k),Tr=c("center"),kr=c("font"),Er=c("marquee"),Sr=e=>c(e);var Jo=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),wr=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),Cr=new WeakMap;function Qo(e){let t=e.length-1,n=e[0];for(let p=0;p<t;p++)n+=`\0${p}\0${e[p+1]}`;let r=0,o=n.length;function i(){for(;r<o&&(n[r]===" "||n[r]===" "||n[r]===`
2
+ `||n[r]==="\r");)r++}function s(){if(n.charCodeAt(r)!==0)return-1;let p=r;r++;let b=0;for(;r<o&&n.charCodeAt(r)!==0;)b=b*10+(n.charCodeAt(r)-48),r++;return r<o&&r++,b<0||b>=t?(r=p,-1):b}function a(){let p=r;for(;r<o;){let b=n.charCodeAt(r);if(b>=97&&b<=122||b>=65&&b<=90||b>=48&&b<=57||b===45)r++;else break}return n.slice(p,r)}function d(){if(i(),n[r]!=="=")return{kind:"bool"};r++,i();let p=s();if(p>=0)return{kind:"expr",idx:p};let b=n[r];if(b==='"'||b==="'"){r++;let y=[],D=[],q="";for(;r<o&&n[r]!==b;){let ce=s();ce>=0?(y.push(q),q="",D.push(ce)):q+=n[r++]}return r<o&&r++,y.push(q),D.length===0?{kind:"static",value:y[0]}:{kind:"mixed",statics:y,exprs:D}}let T=r;for(;r<o;){let y=n.charCodeAt(r);if(y===32||y===9||y===10||y===13||y===62||y===47)break;r++}return{kind:"static",value:n.slice(T,r)}}function l(){let p=[];for(;r<o&&(i(),!(n[r]===">"||n[r]==="/"));){let b=r;for(;r<o;){let y=n.charCodeAt(r);if(y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||y===45||y===58||y===95||y===46)r++;else break}let T=n.slice(b,r);if(!T)break;let v=d();T.startsWith("on:")?v.kind==="expr"&&p.push({t:3,name:T.slice(3),idx:v.idx}):v.kind==="bool"?p.push({t:4,name:T}):v.kind==="static"?p.push({t:0,name:T,value:v.value}):v.kind==="expr"?p.push({t:1,name:T,idx:v.idx}):v.kind==="mixed"&&p.push({t:2,name:T,statics:v.statics,exprs:v.exprs})}return p}function u(p){return p.replace(/\s+/g," ")}function f(p){let b="";for(;r<o&&n[r]!=="<";){let v=s();if(v>=0){let y=u(b);y&&p.push({t:1,value:y}),b="",p.push({t:2,idx:v})}else b+=n[r++]}let T=u(b);T&&p.push({t:1,value:T})}function m(){let p=[];for(;r<o&&!(n[r]==="<"&&r+1<o&&n[r+1]==="/");)if(n[r]==="<"){r++;let b=a(),T=l();i();let v=Jo.has(b),y=n[r]==="/";if(y&&r++,r<o&&r++,v||y)p.push({t:0,el:{tag:b,svg:wr.has(b),attrs:T,children:[]}});else{let D=m();n[r]==="<"&&r+1<o&&n[r+1]==="/"&&(r+=2,a(),i(),r<o&&n[r]===">"&&r++),p.push({t:0,el:{tag:b,svg:wr.has(b),attrs:T,children:D}})}}else f(p);return p}return m()}function Re(e,t){let n=e.svg?document.createElementNS(k,e.tag):document.createElement(e.tag);for(let r=0;r<e.attrs.length;r++){let o=e.attrs[r];switch(o.t){case 0:n.setAttribute(o.name,o.value);break;case 1:{let i=o.name;if(i[0]==="o"&&i[1]==="n")break;let s=t[o.idx];if(typeof s=="function")A(n,he(n,i,s));else if(s!=null){let a=String(s);n.setAttribute(i,j(i)?$(a):a)}break}case 2:{let i=o.statics[0];for(let s=0;s<o.exprs.length;s++)i+=String(t[o.exprs[s]])+o.statics[s+1];n.setAttribute(o.name,i);break}case 3:n.addEventListener(o.name,t[o.idx]);break;case 4:n.setAttribute(o.name,"");break}}for(let r=0;r<e.children.length;r++){let o=e.children[r];switch(o.t){case 0:n.appendChild(Re(o.el,t));break;case 1:n.appendChild(document.createTextNode(o.value));break;case 2:{let i=t[o.idx];if(typeof i=="function"){let s=document.createComment("");n.appendChild(s),A(n,U(s,i))}else if(i instanceof Node)n.appendChild(i);else if(Array.isArray(i))for(let s=0;s<i.length;s++){let a=i[s];a instanceof Node?n.appendChild(a):a!=null&&typeof a!="boolean"&&n.appendChild(document.createTextNode(String(a)))}else i!=null&&typeof i!="boolean"&&n.appendChild(document.createTextNode(String(i)));break}}}return n}function Oe(e,...t){let n=Cr.get(e);if(n||(n=Qo(e),Cr.set(e,n)),n.length===1&&n[0].t===0)return Re(n[0].el,t);let r=document.createElement("div");for(let o=0;o<n.length;o++){let i=n[o];switch(i.t){case 0:r.appendChild(Re(i.el,t));break;case 1:r.appendChild(document.createTextNode(i.value));break;case 2:{let s=t[i.idx];if(s instanceof Node)r.appendChild(s);else if(typeof s=="function"){let a=document.createComment("bind:htm");r.appendChild(a),A(r,U(a,s))}else if(Array.isArray(s))for(let a=0;a<s.length;a++){let d=s[a];d instanceof Node?r.appendChild(d):d!=null&&typeof d!="boolean"&&r.appendChild(document.createTextNode(String(d)))}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 Ar(e,t){if(!t)throw new Error("[Sibu] mount: container element not found. Make sure the DOM element exists before calling mount().");L(typeof e=="function"||e instanceof Node,"mount: first argument must be a component function or a DOM Node.");let n=typeof performance<"u"?performance.now():0,r=typeof e=="function"?e():e,o=typeof performance<"u"?performance.now()-n:0;t.appendChild(r);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:r,container:t,duration:o}),{node:r,unmount(){i&&i.emit("app:unmount",{rootElement:r}),O(r),r.parentNode&&r.parentNode.removeChild(r)}}}var Yo=_();function _r(e){return typeof e=="function"?_r(e()):e instanceof Node?e:document.createTextNode(String(e))}function Zo(e,t){if(t===0)return[];let n=[],r=new Array(t);for(let a=0;a<t;a++){let d=e[a],l=0,u=n.length;for(;l<u;){let f=l+u>>1;e[n[f]]<d?l=f+1:u=f}n[l]=a,r[a]=l>0?n[l-1]:-1}let o=n.length,i=new Array(o),s=n[o-1];for(let a=o-1;a>=0;a--)i[a]=s,s=r[s];return i}function Nr(e,t,n){L(typeof e=="function","each: first argument must be a function that returns an array."),L(typeof t=="function","each: second argument must be a render function."),L(n&&typeof n.key=="function","each: options.key must be a function that returns a unique key per item.");let r=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],s=[],a=i,d=0,l=new Map,u=new Map,f=[],m=[],p=new Uint8Array(0),b=new Map,T=[],v=[],y=new Map,D=!1,q=!1,ce=n.key,Ve=()=>{let We=e(),w=We.length,le=r.parentNode;if(!le)return;q||(le.insertBefore(o,r.nextSibling),q=!0),m.length<w&&(m=new Array(w));for(let g=0;g<w;g++)m[g]=ce(We[g]);let te=m;f.length<w&&(f=new Array(w)),u.clear(),y.clear();for(let g=0;g<w;g++)y.set(te[g],g);for(let g=0;g<w;g++){let N=te[g],Je=l.get(N),ne;if(Je!==void 0)ne=Je;else{let Qe=N,Ro=()=>e()[y.get(Qe)],Oo=()=>y.get(Qe);try{ne=_r(t(Ro,Oo))}catch(Ce){Yo&&M(`each: render threw for item at index ${g} (key="${te[g]}"): ${Ce instanceof Error?Ce.message:String(Ce)}`),ne=document.createComment(`each:error:${g}`)}}u.set(N,ne),f[g]=ne}for(let[g,N]of l)u.has(g)||(O(N),N.parentNode&&le.removeChild(N));if(w===0){d=0;let g=l;l=u,u=g;return}b.clear();for(let g=0;g<d;g++)b.set(a[g],g);T.length<w&&(T=new Array(w),v=new Array(w));let de=0;for(let g=0;g<w;g++){let N=b.get(te[g]);N!==void 0&&(T[de]=g,v[de]=N,de++)}let Ge=Zo(v,de);p.length<w?p=new Uint8Array(w):p.fill(0,0,w);for(let g=0;g<Ge.length;g++)p[T[Ge[g]]]=1;let ue=o;for(let g=w-1;g>=0;g--){let N=f[g];p[g]||N.nextSibling!==ue&&le.insertBefore(N,ue),ue=N}let pe=a===i?s:i;pe.length<w&&(pe.length=w);for(let g=0;g<w;g++)pe[g]=te[g];a=pe,d=w;let Mo=l;l=u,u=Mo,D=!0};return x(Ve),D||queueMicrotask(()=>{!D&&r.parentNode&&Ve()}),r}function Mr(e){let t=document.createDocumentFragment();for(let n of e)if(!(n==null||typeof n=="boolean"))if(Array.isArray(n))for(let r of n)r==null||typeof r=="boolean"||t.appendChild(Lr(r));else t.appendChild(Lr(n));return t}function Lr(e){if(e==null)return document.createTextNode("");if(e instanceof Node)return e;if(typeof e=="function"){let t=e();return t instanceof Node?t:document.createTextNode(String(t??""))}return document.createTextNode(String(e))}function Rr(e,t){let n=document.createComment("portal"),r=t||document.body,o=null;queueMicrotask(()=>{try{o=e(),r.appendChild(o)}catch(s){console.error("[Portal] Render error:",s)}});let i=new MutationObserver(()=>{!n.isConnected&&o&&(o.remove(),o=null,i.disconnect())});return queueMicrotask(()=>{n.parentNode&&i.observe(n.parentNode,{childList:!0})}),n}var Pe=new Map;function Or(e,t){Pe.set(e,t)}function Pr(e){Pe.delete(e)}function De(e){let t=Pe.get(e);return t?t():h({nodes:`[Component "${e}" not found]`})}function Dr(e){let t=h({class:"sibu-dynamic"});function n(){let r=e(),o;typeof r=="function"?o=r():o=De(r);for(let i of Array.from(t.childNodes))O(i);t.replaceChildren(o)}return x(n),t}function Fr(e,t="default"){return e?.[t]}function Hr(e,t){return x(()=>{t.style.display=e()?"":"none"}),t}function Br(e,t,n){let r=document.createComment("when"),o=null,i,s=!1,a=()=>{let d=e(),l=r.parentNode;if(!l||s&&d===i)return;i=d,o?.parentNode&&(O(o),o.parentNode.removeChild(o),o=null);let u=d?t():n?n():null;if(u!=null){let f=u instanceof Node?u:document.createTextNode(String(u));l.insertBefore(f,r.nextSibling),o=f}s=!0};return x(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function zr(e,t,n){let r=document.createComment("match"),o=null,i,s=!1,a=()=>{let d=String(e()),l=r.parentNode;if(!l||s&&d===i)return;i=d,o?.parentNode&&(O(o),o.parentNode.removeChild(o),o=null);let u=t[d]||n;if(u){let f=u();if(f!=null){let m=f instanceof Node?f:document.createTextNode(String(f));l.insertBefore(m,r.nextSibling),o=m}}s=!0};return x(a),s||queueMicrotask(()=>{!s&&r.parentNode&&a()}),r}function Ir(e,t,n){let r=document.createComment("keep-alive"),o=new Map,i=[],s=n?.max??0,a,d=null,l=!1,u=()=>{let f=e(),m=r.parentNode;if(!m||l&&f===a)return;d?.parentNode&&m.removeChild(d),a=f;let p=o.get(f);if(p){let b=i.indexOf(f);b!==-1&&(i.splice(b,1),i.push(f))}else{let b=t[f];if(!b){d=null,l=!0;return}if(p=b(),o.set(f,p),i.push(f),s>0&&i.length>s){let T=i.shift(),v=o.get(T);v&&(O(v),v.parentNode&&v.parentNode.removeChild(v),o.delete(T))}}m.insertBefore(p,r.nextSibling),d=p,l=!0};return x(u),l||queueMicrotask(()=>{!l&&r.parentNode&&u()}),r}function qr(e,t,n){let r=t(e,n);typeof r=="function"&&A(e,r)}var $r=(e,t)=>{let n=r=>{e.contains(r.target)||t()};return document.addEventListener("pointerdown",n,!0),()=>document.removeEventListener("pointerdown",n,!0)},jr=(e,t)=>{let n=t.duration??500,r=null,o=()=>{r=setTimeout(()=>{t.callback(),r=null},n)},i=()=>{r!==null&&(clearTimeout(r),r=null)};return e.addEventListener("pointerdown",o),e.addEventListener("pointerup",i),e.addEventListener("pointerleave",i),()=>{i(),e.removeEventListener("pointerdown",o),e.removeEventListener("pointerup",i),e.removeEventListener("pointerleave",i)}},Kr=(e,t)=>{let n=()=>{let r=typeof t=="function"?t():e.textContent??"";navigator.clipboard.writeText(r)};return e.addEventListener("click",n),()=>e.removeEventListener("click",n)},Ur=e=>{let t=()=>{e.style.overflow="hidden",e.style.height="auto",e.style.height=`${e.scrollHeight}px`};return t(),e.addEventListener("input",t),()=>e.removeEventListener("input",t)},Vr=e=>{let t='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',n=r=>{if(r.key!=="Tab")return;let o=Array.from(e.querySelectorAll(t));if(o.length===0)return;let i=o[0],s=o[o.length-1];r.shiftKey&&document.activeElement===i?(r.preventDefault(),s.focus()):!r.shiftKey&&document.activeElement===s&&(r.preventDefault(),i.focus())};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)};var V=null;function Wr(e,t){try{let n=e();return n&&typeof n.then=="function"&&n.catch(r=>{t?t(r,"async"):V?V(r,"async"):console.error("Unhandled async error in Sibu.catchError:",r)}),n}catch(n){return t?t(n,"sync"):V?V(n,"sync"):console.error("Unhandled error in Sibu.catchError:",n),null}}async function Gr(e,t){try{return await e()}catch(n){return t?t(n,"async"):V?V(n,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",n),null}}function Jr(e){V=e}var Fe=0;function Qr(e="sibu"){return Fe++,`${e}-${Fe}`}function Yr(){Fe=0}var ie=0,He=new Set;function Ee(e){ie++;try{return e()}finally{ie--,ie===0&&Xo()}}function X(e){return ie===0?!1:(He.add(e),!0)}function Zr(){return ie>0}function Xo(){for(let e of He)et(e);He.clear(),tt()}var Xr=globalThis,Be=_();function E(e,t){let n={value:e},r=Be?t?.name:void 0,o=t?.equals;r&&(n.__name=r);function i(){return Y(n),n.value}i.__signal=n,r&&(i.__name=r);function s(a){let d=typeof a=="function"?a(n.value):a;if(!(o?o(n.value,d):Object.is(d,n.value))){if(Be){let l=n.value;n.value=d;let u=Xr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&u.emit("signal:update",{signal:n,name:r,oldValue:l,newValue:d})}else n.value=d;X(n)||be(n)}}if(Be){let a=Xr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}var Se=!1;function ee(){return Se}function ze(){Se=!0}function Ie(){Se=!1}function eo(e){let t=Se;ze();try{return e()}finally{t||Ie()}}var to=globalThis;function no(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,Q(()=>t(o,void 0));else{let i=n;n=o,Q(()=>t(o,i))}}}function P(e,t){if(L(typeof e=="function","effect: argument must be a function."),ee())return()=>{};let n=t?.onError,r=n?()=>{try{e()}catch(a){n(a)}}:e,o=()=>{},i=()=>{o(),o=x(r,i)};o=x(r,i);let s=to.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return s&&s.emit("effect:create",{effectFn:e}),()=>{let a=to.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&a.emit("effect:destroy",{effectFn:e}),o()}}function I(e,t){L(typeof e=="function","derived: argument must be a getter function.");let n=t?.name,r={};r._d=!1,r._g=e;let o=()=>{r._d||(r._d=!0)};o._c=1,o._sig=r,x(()=>{r._d=!1,r._v=e()},o);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;function s(){if(me)return r._d&&(r._d=!1,r._v=e()),r._v;if(Y(r),r._d){let a=r._v;x(()=>{r._d=!1,r._v=e()},o),i&&a!==r._v&&i.emit("computed:update",{signal:r,oldValue:a,newValue:r._v})}return r._v}return n&&(s.__name=n,r.__name=n),s.__signal=r,i&&i.emit("computed:create",{signal:r,name:n,getter:s}),s}function ro(e,t){if(L(typeof e=="function","watch: first argument must be a getter function."),L(typeof t=="function","watch: second argument must be a callback function."),ee())return()=>{};let n,r=!0;return x(()=>{let s=e();if(r){n=s,r=!1;return}Object.is(s,n)||(t(s,n),n=s)})}function oo(e){L(e!==null&&typeof e=="object"&&!Array.isArray(e),"store: argument must be a plain object. For arrays, use array() instead.");let t={};Object.keys(e).forEach(d=>{let[l,u]=E(e[d]);t[d]=[l,u]});let n=new Proxy({},{get(d,l){if(l in t){let u=t[l][0];return u()}},set(){throw new Error("[Sibu] store: Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),r=()=>{let d={};return Object.keys(t).forEach(l=>{d[l]=t[l][0]()}),d};return[n,{setState:d=>{let l=r(),u=typeof d=="function"?d(l):d;Object.entries(u).forEach(([f,m])=>{f in t&&t[f][1](m)})},reset:()=>{Object.keys(e).forEach(d=>{let l=t[d][1];l(e[d])})},subscribe:d=>{let l=!0;return P(()=>{let u=r();if(l){l=!1;return}d(u)})},subscribeKey:(d,l)=>{let u,f=!0;return P(()=>{let m=t[d][0]();if(f){u=m,f=!1;return}if(!Object.is(m,u)){let p=u;u=m,l(m,p)}})},getSnapshot:r}]}function io(e){let[t,n]=E(e);return{get current(){return t()},set current(r){n(r)}}}function so(e){return I(e)}function ao(e){return I(e)}function co(e=[]){let[t,n]=E([...e]);return[t,{push(...o){n(i=>[...i,...o])},pop(){let o;return n(i=>{let s=[...i];return o=s.pop(),s}),o},shift(){let o;return n(i=>{let s=[...i];return o=s.shift(),s}),o},unshift(...o){n(i=>[...o,...i])},splice(o,i=0,...s){let a=[];return n(d=>{let l=[...d];return a=l.splice(o,i,...s),l}),a},remove(o){n(i=>i.filter((s,a)=>a!==o))},removeWhere(o){n(i=>{let s=i.findIndex(o);return s===-1?i:i.filter((a,d)=>d!==s)})},set(o){n([...o])},update(o,i){n(s=>s.map((a,d)=>d===o?i:a))},updateWhere(o,i){n(s=>s.map(a=>o(a)?i(a):a))},sort(o){n(i=>[...i].sort(o))},reverse(){n(o=>[...o].reverse())},filter(o){n(i=>i.filter(o))},map(o){n(i=>i.map(o))},clear(){n([])}}]}function lo(e=[]){let t=[...e],n=null,r={};function o(){n=null,X(r)||be(r)}function i(){return Y(r),n===null&&(n=Object.freeze([...t])),n}return[i,{push(...a){a.length!==0&&(t.push(...a),o())},pop(){if(t.length===0)return;let a=t.pop();return o(),a},shift(){if(t.length===0)return;let a=t.shift();return o(),a},unshift(...a){a.length!==0&&(t.unshift(...a),o())},splice(a,d=0,...l){let u=t.splice(a,d,...l);return(u.length>0||l.length>0)&&o(),u},remove(a){a<0||a>=t.length||(t.splice(a,1),o())},removeWhere(a){let d=t.findIndex(a);d!==-1&&(t.splice(d,1),o())},set(a){t=[...a],o()},update(a,d){a<0||a>=t.length||Object.is(t[a],d)||(t[a]=d,o())},updateWhere(a,d){let l=!1;for(let u=0;u<t.length;u++)if(a(t[u])){let f=d(t[u]);Object.is(t[u],f)||(t[u]=f,l=!0)}l&&o()},sort(a){t.length<=1||(t.sort(a),o())},reverse(){t.length<=1||(t.reverse(),o())},filter(a){let d=t.filter(a);d.length!==t.length&&(t=d,o())},map(a){let d=!1;for(let l=0;l<t.length;l++){let u=a(t[l],l);Object.is(t[l],u)||(t[l]=u,d=!0)}d&&o()},clear(){t.length!==0&&(t=[],o())}}]}function se(e,t,n){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!="object")return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.toString()===t.toString();if(n||(n=new Set),n.has(e))return!0;if(n.add(e),Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.every((i,s)=>se(i,t[s],n));let r=Object.keys(e),o=Object.keys(t);return r.length!==o.length?!1:r.every(i=>se(e[i],t[i],n))}function uo(e){return E(e,{equals:(t,n)=>se(t,n)})}function po(e,t,n){return[I(e,n),i=>{Ee(()=>t(i))}]}function fo(e,t){let[n,r]=E(t),[o,i]=E(!1),[s,a]=E(null),[d,l]=E(0),u=0;return P(()=>{d();let f=++u;i(!0),a(null);let m;try{m=e()}catch(p){a(p),i(!1);return}m.then(p=>{f===u&&(r(p),i(!1))},p=>{f===u&&(a(p),i(!1))})}),{value:n,loading:o,error:s,refresh:()=>l(f=>f+1)}}function ae(e,t){try{e()}catch(n){M(`${t}: callback threw: ${n instanceof Error?n.message:String(n)}`)}}function qe(e,t){if(!(typeof document>"u"))if(t){if(t.isConnected){queueMicrotask(()=>{ae(e,"onMount")});return}let n=new MutationObserver(()=>{t.isConnected&&(n.disconnect(),ae(e,"onMount"))});queueMicrotask(()=>{t.isConnected?ae(e,"onMount"):n.observe(document.body,{childList:!0,subtree:!0})})}else queueMicrotask(()=>{ae(e,"onMount")})}function mo(e,t){let n=()=>{let r=new MutationObserver(()=>{t.isConnected||(r.disconnect(),ae(e,"onUnmount"))});r.observe(document.body,{childList:!0,subtree:!0})};t.isConnected?n():qe(()=>{n()},t)}function bo(e,t){A(t,e)}function go(e){let[t,n]=E(e);return{provide(r){n(r)},use(){return t},get(){return t()},set(r){n(r)}}}function ho(e){let t=e();return _()&&queueMicrotask(()=>{try{e()}catch(n){console.warn("[Sibu strict] second run threw:",n)}}),t}function yo(e){if(!_())return P(e);let t=P(e),n=null;return queueMicrotask(()=>{try{n=P(e)}catch(r){console.warn("[Sibu strictEffect] second run threw:",r)}}),()=>{t(),n&&n()}}function xo(){return new Promise(e=>{queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):e()})})}function To(e){let[t,n]=E(e()),r=!1,o=t(),i=()=>{r=!1,n(o)},s=()=>{r||(r=!0,queueMicrotask(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(i):i()}))};return x(()=>{o=e(),s()}),t}var vo=16;function ei(e){let t=globalThis;if(typeof t.requestIdleCallback=="function"){t.requestIdleCallback(e,{timeout:vo*4});return}if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}setTimeout(e,vo)}function ko(){let[e,t]=E(!1);function n(r){t(!0),ei(()=>{let o;try{o=r()}catch{t(!1);return}o&&typeof o.then=="function"?o.then(()=>t(!1),()=>t(!1)):t(!1)})}return{pending:e,start:n}}function $e(e){let t=null;return function(){if(t)return t();let[r,o]=E("loading"),[i,s]=E(null),a=h({class:"sibu-lazy"});return e().then(d=>{t=d.default;let l=t();a.replaceChildren(l),o("loaded")}).catch(d=>{let l=d instanceof Error?d:new Error(String(d));s(l),o("error"),a.replaceChildren(h({class:"sibu-lazy-error",nodes:`Failed to load component: ${l.message}`}))}),a.appendChild(S({class:"sibu-lazy-loading",nodes:"Loading..."})),a}}function je({nodes:e,fallback:t}){let n=h({class:"sibu-suspense"}),r=t();return n.appendChild(r),queueMicrotask(()=>{try{let o=e();if(o.classList.contains("sibu-lazy")){let i=new MutationObserver(()=>{o.querySelector(".sibu-lazy-loading")||(i.disconnect(),n.replaceChildren(o))});i.observe(o,{childList:!0,subtree:!0}),o.querySelector(".sibu-lazy-loading")||n.replaceChildren(o)}else n.replaceChildren(o)}catch{}}),n}var ti=_(),ni=`
3
+ .sibu-error-display {
4
+ border: 1px solid var(--sibu-err-border, #e5484d);
5
+ border-radius: 10px;
6
+ margin: 12px 0;
7
+ background: #0f0f1a;
8
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
9
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
10
+ color: #e5e7eb;
11
+ overflow: hidden;
12
+ }
13
+ .sibu-error-display[data-severity="warning"] { --sibu-err-border: #d97706; --sibu-err-accent: #d97706; }
14
+ .sibu-error-display[data-severity="info"] { --sibu-err-border: #3b82f6; --sibu-err-accent: #3b82f6; }
15
+ .sibu-error-display { --sibu-err-accent: #e5484d; }
16
+
17
+ .sibu-error-display .sibu-err-header {
18
+ display: flex;
19
+ align-items: center;
20
+ gap: 10px;
21
+ padding: 12px 18px;
22
+ background: var(--sibu-err-accent);
23
+ color: white;
24
+ user-select: none;
25
+ }
26
+ .sibu-error-display .sibu-err-icon {
27
+ font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;
28
+ font-weight: bold;
29
+ font-size: 1.05em;
30
+ padding: 2px 8px;
31
+ background: rgba(0, 0, 0, 0.22);
32
+ border-radius: 4px;
33
+ letter-spacing: 0.02em;
34
+ }
35
+ .sibu-error-display .sibu-err-title {
36
+ margin: 0;
37
+ font-size: 0.98em;
38
+ font-weight: 600;
39
+ flex: 1;
40
+ text-overflow: ellipsis;
41
+ overflow: hidden;
42
+ white-space: nowrap;
43
+ }
44
+ .sibu-error-display .sibu-err-timestamp {
45
+ font-size: 0.75em;
46
+ opacity: 0.85;
47
+ font-family: 'SF Mono', 'JetBrains Mono', monospace;
48
+ }
49
+
50
+ .sibu-error-display .sibu-err-body {
51
+ padding: 16px 18px;
52
+ }
53
+ .sibu-error-display .sibu-err-message {
54
+ font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;
55
+ margin: 0 0 14px;
56
+ color: #fecaca;
57
+ word-break: break-word;
58
+ font-size: 0.9em;
59
+ line-height: 1.55;
60
+ padding: 10px 12px;
61
+ background: rgba(229, 72, 77, 0.08);
62
+ border-left: 3px solid var(--sibu-err-accent);
63
+ border-radius: 4px;
64
+ }
65
+
66
+ .sibu-error-display .sibu-err-section {
67
+ margin-top: 14px;
68
+ border-radius: 6px;
69
+ border: 1px solid #2a2a3e;
70
+ background: #0a0a14;
71
+ overflow: hidden;
72
+ }
73
+ .sibu-error-display .sibu-err-section-head {
74
+ display: flex;
75
+ align-items: center;
76
+ justify-content: space-between;
77
+ padding: 6px 12px;
78
+ background: #16162a;
79
+ border-bottom: 1px solid #2a2a3e;
80
+ font-size: 0.72em;
81
+ color: #8b8fa3;
82
+ text-transform: uppercase;
83
+ letter-spacing: 0.08em;
84
+ font-weight: 600;
85
+ }
86
+ .sibu-error-display .sibu-err-copy-btn {
87
+ background: transparent;
88
+ border: 1px solid #3a3a4e;
89
+ border-radius: 4px;
90
+ color: #a0a3b8;
91
+ cursor: pointer;
92
+ padding: 2px 10px;
93
+ font-size: 0.95em;
94
+ font-family: inherit;
95
+ transition: all 0.12s ease;
96
+ }
97
+ .sibu-error-display .sibu-err-copy-btn:hover {
98
+ background: #2a2a3e;
99
+ color: #e5e7eb;
100
+ border-color: #4a4a5e;
101
+ }
102
+
103
+ .sibu-error-display .sibu-err-stack {
104
+ margin: 0;
105
+ padding: 10px 12px;
106
+ overflow-x: auto;
107
+ font-family: 'SF Mono', 'JetBrains Mono', monospace;
108
+ font-size: 0.8em;
109
+ line-height: 1.7;
110
+ }
111
+ .sibu-error-display .sibu-err-frame {
112
+ display: flex;
113
+ gap: 10px;
114
+ padding: 1px 0;
115
+ }
116
+ .sibu-error-display .sibu-err-line {
117
+ display: inline-block;
118
+ min-width: 2.2ch;
119
+ color: #4b5066;
120
+ text-align: right;
121
+ user-select: none;
122
+ flex-shrink: 0;
123
+ }
124
+ .sibu-error-display .sibu-err-fn {
125
+ color: #7dd3fc;
126
+ font-weight: 500;
127
+ }
128
+ .sibu-error-display .sibu-err-loc {
129
+ color: #6b7280;
130
+ white-space: nowrap;
131
+ }
132
+ .sibu-error-display .sibu-err-cause-label {
133
+ margin: 12px 0 6px;
134
+ color: #a0a3b8;
135
+ font-size: 0.75em;
136
+ text-transform: uppercase;
137
+ letter-spacing: 0.05em;
138
+ }
139
+
140
+ .sibu-error-display .sibu-err-meta {
141
+ margin: 0;
142
+ padding: 10px 12px;
143
+ font-family: 'SF Mono', 'JetBrains Mono', monospace;
144
+ font-size: 0.78em;
145
+ color: #a0a3b8;
146
+ display: grid;
147
+ grid-template-columns: minmax(120px, auto) 1fr;
148
+ gap: 4px 16px;
149
+ }
150
+ .sibu-error-display .sibu-err-meta dt { color: #6b7280; }
151
+ .sibu-error-display .sibu-err-meta dd { margin: 0; color: #d1d5db; word-break: break-word; }
152
+
153
+ .sibu-error-display .sibu-err-actions {
154
+ display: flex;
155
+ gap: 8px;
156
+ margin-top: 16px;
157
+ }
158
+ .sibu-error-display .sibu-err-btn {
159
+ display: inline-flex;
160
+ align-items: center;
161
+ gap: 6px;
162
+ padding: 8px 18px;
163
+ border: none;
164
+ border-radius: 6px;
165
+ cursor: pointer;
166
+ font-size: 13px;
167
+ font-weight: 500;
168
+ transition: all 0.12s ease;
169
+ font-family: inherit;
170
+ }
171
+ .sibu-error-display .sibu-err-btn-retry {
172
+ background: var(--sibu-err-accent);
173
+ color: white;
174
+ }
175
+ .sibu-error-display .sibu-err-btn-retry:hover { filter: brightness(1.1); }
176
+ .sibu-error-display .sibu-err-btn-reload {
177
+ background: #1f2133;
178
+ color: #d1d5db;
179
+ border: 1px solid #3a3a4e;
180
+ }
181
+ .sibu-error-display .sibu-err-btn-reload:hover { background: #2a2b40; }
182
+ `,Eo=!1;function ri(){if(Eo||typeof document>"u")return;let e=z({nodes:ni});document.head.appendChild(e),Eo=!0}function oi(e){let t=[],n=e.split(`
183
+ `);for(let r of n){let o=r.trim(),i=o.match(/^at\s+(?:(.+?)\s+\((.+)\)|(.+))$/);if(i){t.push({fn:i[1]||"(anonymous)",loc:i[2]||i[3]||""});continue}let s=o.match(/^(.+?)@(.+)$/);s&&t.push({fn:s[1]||"(anonymous)",loc:s[2]||""})}return t}function So(e){if(e instanceof Error){let t=e.code??e.name??"ERROR",n=e.message||"Unknown error",r=e.stack??"",o=oi(r),i=e.cause,s=i!=null?So(i):null;return{code:t,message:n,stack:r,frames:o,cause:s}}return{code:"NON_ERROR",message:typeof e=="string"?e:JSON.stringify(e),stack:"",frames:[],cause:null}}function ii(e,t){let n=[];if(n.push(`[${e.code}] ${e.message}`),e.stack&&(n.push(""),n.push(e.stack)),e.cause&&(n.push(""),n.push("Caused by:"),n.push(` [${e.cause.code}] ${e.cause.message}`),e.cause.stack)){let r=e.cause.stack.split(`
184
+ `).map(o=>` ${o}`).join(`
185
+ `);n.push(r)}if(t&&Object.keys(t).length>0){n.push(""),n.push("Metadata:");for(let[r,o]of Object.entries(t))n.push(` ${r}: ${String(o)}`)}return n.push(""),n.push(`At: ${new Date().toISOString()}`),typeof navigator<"u"&&navigator.userAgent&&n.push(`UA: ${navigator.userAgent}`),n.join(`
186
+ `)}function wo(e){let t=e.map((n,r)=>h({class:"sibu-err-frame",nodes:[S({class:"sibu-err-line",nodes:String(r+1)}),S({class:"sibu-err-fn",nodes:n.fn}),S({class:"sibu-err-loc",nodes:` \u2014 ${n.loc}`})]}));return Te({class:"sibu-err-stack",nodes:t})}function Co(e){return e?[h({class:"sibu-err-cause-label",nodes:"Caused by"}),h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:`[${e.code}] ${e.message}`}),S({nodes:""})]}),e.frames.length>0?wo(e.frames):h({class:"sibu-err-stack",nodes:"(no stack)"})]}),...Co(e.cause)]:[]}function si(e){let t=[];for(let[r,o]of Object.entries(e)){t.push(document.createElement("dt")),t[t.length-1].textContent=r;let i=document.createElement("dd");i.textContent=o==null?"(null)":String(o),t.push(i)}let n=document.createElement("dl");n.className="sibu-err-meta";for(let r of t)n.appendChild(r);return n}function we(e){ri();let t=e.severity??"error",n=So(e.error),r=e.alwaysShowDetails??ti,o=e.title??n.message,i=new Date().toISOString().replace("T"," ").slice(0,19),[s,a]=E("Copy"),d=Z({class:"sibu-err-copy-btn",nodes:()=>s(),on:{click:()=>{let p=ii(n,e.metadata);typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(p).then(()=>{a("Copied!"),setTimeout(()=>a("Copy"),1500)},()=>{a("Copy failed"),setTimeout(()=>a("Copy"),1500)})}}}),l=h({class:"sibu-err-header",nodes:[ke({class:"sibu-err-icon",nodes:n.code}),ve({class:"sibu-err-title",nodes:o}),S({class:"sibu-err-timestamp",nodes:i})]}),u=[xe({class:"sibu-err-message",nodes:n.message})];r&&n.frames.length>0?u.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Stack Trace"}),d]}),wo(n.frames)]})):r&&u.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Details"}),d]}),h({class:"sibu-err-stack",nodes:"(no stack available)"})]})),r&&u.push(...Co(n.cause)),r&&e.metadata&&Object.keys(e.metadata).length>0&&u.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Metadata"})]}),si(e.metadata)]})),r&&typeof navigator<"u"&&navigator.userAgent&&u.push(h({class:"sibu-err-section",nodes:[h({class:"sibu-err-section-head",nodes:[S({nodes:"Environment"})]}),h({class:"sibu-err-meta",nodes:(()=>{let p=document.createElement("dl");p.className="sibu-err-meta";let b=[["User Agent",navigator.userAgent],["URL",typeof location<"u"?location.href:"(n/a)"],["Timestamp",new Date().toISOString()]];for(let[T,v]of b){let y=document.createElement("dt");y.textContent=T;let D=document.createElement("dd");D.textContent=v,p.appendChild(y),p.appendChild(D)}return p})()})]}));let f=[];e.onRetry&&f.push(Z({class:"sibu-err-btn sibu-err-btn-retry",nodes:e.retryLabel??"Retry",on:{click:e.onRetry}})),!e.hideReload&&typeof location<"u"&&f.push(Z({class:"sibu-err-btn sibu-err-btn-reload",nodes:"Reload Page",on:{click:()=>location.reload()}})),f.length>0&&u.push(h({class:"sibu-err-actions",nodes:f}));let m=h({class:"sibu-err-body",nodes:u});return h({class:"sibu-error-display","data-severity":t,nodes:[l,m]})}var ai=`
3
187
  .sibu-error-boundary {
4
188
  position: relative;
5
189
  }
@@ -153,10 +337,7 @@
153
337
  .sibu-error-fallback .sibu-error-btn-reload:hover {
154
338
  background: #3a3a4e;
155
339
  }
156
- `,po=!1;function Po(){if(!po&&typeof document<"u"){let t=J({nodes:Fo});document.head.appendChild(t),po=!0}}var je=new WeakMap;function jo(t,e,r){let n=je.get(t);n||(n=new Map,je.set(t,n));let o=e.message;return n.has(o)||n.set(o,t(e,r)),n.get(o)}function qo(t){let r=(t.stack||"").split(`
157
- `),n=[],o="";for(let i of r){let s=i.trim(),c=s.match(/^at\s+(?:(.+?)\s+\((.+)\)|(.+))$/);if(c){let l=c[1]||"(anonymous)",d=c[2]||c[3]||"";n.push({fn:l,loc:d}),!o&&l!=="(anonymous)"&&!l.startsWith("Object.")&&!l.startsWith("Module.")&&(o=l);continue}let u=s.match(/^(.+?)@(.+)$/);if(u){let l=u[1]||"(anonymous)",d=u[2]||"";n.push({fn:l,loc:d}),!o&&l!=="(anonymous)"&&(o=l)}}return{source:o,frames:n}}function fo({nodes:t,fallback:e,onError:r}){Po();let[n,o]=_(null),i=()=>{e&&je.delete(e),o(null)},s=d=>{let m=d instanceof Error?d:new Error(String(d));return o(m),r?.(m),m},c=(d,m)=>{if(!Ko)return x({class:"sibu-error-fallback",nodes:[x({class:"sibu-error-header",nodes:[ie({nodes:"Something went wrong",class:"sibu-error-title"})]}),x({class:"sibu-error-body",nodes:[oe({nodes:"An unexpected error occurred. Please try again.",class:"sibu-error-message"}),x({class:"sibu-error-actions",nodes:[K({nodes:"Retry",class:"sibu-error-btn sibu-error-btn-retry",on:{click:m}}),K({nodes:"Reload Page",class:"sibu-error-btn sibu-error-btn-reload",on:{click:()=>location.reload()}})]})]})]});let{source:f,frames:p}=qo(d),g=`${d.message}
158
-
159
- ${d.stack||""}`,T=K({nodes:"Copy",class:"sibu-error-copy-btn",on:{click:()=>{navigator.clipboard.writeText(g).then(()=>{T.textContent="Copied!",setTimeout(()=>{T.textContent="Copy"},1500)})}}}),y=p.map((h,D)=>x({nodes:[C({class:"sibu-line-num",nodes:String(D+1)}),C({class:"sibu-stack-fn",nodes:h.fn}),C({class:"sibu-stack-loc",nodes:` ${h.loc}`})]}));return x({class:"sibu-error-fallback",nodes:[x({class:"sibu-error-header",nodes:[ie({nodes:f?`Error in ${f}`:"Something went wrong",class:"sibu-error-title"}),...f?[]:[C()]]}),x({class:"sibu-error-body",nodes:[oe({nodes:d.message,class:"sibu-error-message"}),...p.length>0?[x({class:"sibu-error-stack-container",nodes:[x({class:"sibu-error-stack-label",nodes:[C({nodes:"Stack Trace"}),T]}),x({class:"sibu-error-stack",nodes:[ve({nodes:y})]})]})]:[],x({class:"sibu-error-actions",nodes:[K({nodes:"Retry",class:"sibu-error-btn sibu-error-btn-retry",on:{click:m}}),K({nodes:"Reload Page",class:"sibu-error-btn sibu-error-btn-reload",on:{click:()=>location.reload()}})]})]})]})},u=d=>{let m=e||c;try{return jo(m,d,i)}catch(f){let p=f instanceof Error?f:new Error(String(f));return queueMicrotask(()=>{l.parentNode&&l.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:p}}))}),document.createComment("error-boundary-failed")}},l=x({class:"sibu-error-boundary",nodes:()=>{let d=n();if(d)return u(d);try{let m=t();if(m&&typeof m.then=="function"){let f=x({class:"sibu-error-async"});return f.appendChild(C({class:"sibu-lazy-loading",nodes:"Loading..."})),m.then(p=>{f.replaceChildren(p)}).catch(p=>{let g=s(p);f.replaceChildren(u(g))}),f}return m}catch(m){let f=s(m);return u(f)}}});return l.addEventListener("sibu:error-propagate",d=>{if(n())return;d.stopPropagation();let f=d.detail?.error;f&&s(f)}),l}var Wo=`
340
+ `,Ao=!1;function ci(){if(!Ao&&typeof document<"u"){let e=z({nodes:ai});document.head.appendChild(e),Ao=!0}}var Ke=new WeakMap;function li(e,t,n){let r=Ke.get(e);r||(r=new Map,Ke.set(e,r));let o=t.message;return r.has(o)||r.set(o,e(t,n)),r.get(o)}function _o({nodes:e,fallback:t,onError:n,resetKeys:r}){ci();let[o,i]=E(null),s=()=>{t&&Ke.delete(t),i(null)};if(r&&r.length>0){let f=!1;P(()=>{for(let m of r)try{m()}catch{}if(!f){f=!0;return}o()!==null&&s()})}let a=f=>{let m=f instanceof Error?f:new Error(String(f));return i(m),n?.(m),m},d=(f,m)=>we({error:f,severity:"error",onRetry:m}),l=f=>{let m=t||d;try{return li(m,f,s)}catch(p){let b=p instanceof Error?p:new Error(String(p));return queueMicrotask(()=>{u.parentNode&&u.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:b}}))}),document.createComment("error-boundary-failed")}},u=h({class:"sibu-error-boundary",nodes:()=>{let f=o();if(f)return l(f);try{let m=e();if(m&&typeof m.then=="function"){let p=h({class:"sibu-error-async"});return p.appendChild(S({class:"sibu-lazy-loading",nodes:"Loading..."})),m.then(b=>{p.replaceChildren(b)}).catch(b=>{let T=a(b);p.replaceChildren(l(T))}),p}return m}catch(m){let p=a(m);return l(p)}}});return u.addEventListener("sibu:error-propagate",f=>{if(o())return;f.stopPropagation();let p=f.detail?.error;p&&a(p)}),u}var di=`
160
341
  @keyframes sibu-spin {
161
342
  to { transform: rotate(360deg); }
162
343
  }
@@ -209,4 +390,4 @@ ${d.stack||""}`,T=K({nodes:"Copy",class:"sibu-error-copy-btn",on:{click:()=>{nav
209
390
  .sibu-loading-lg .sibu-loading-spinner { width: 40px; height: 40px; border-width: 4px; }
210
391
  .sibu-loading-lg .sibu-loading-dot { width: 12px; height: 12px; }
211
392
  .sibu-loading-lg .sibu-loading-dots { gap: 6px; }
212
- `,mo=!1;function $o(){!mo&&typeof document<"u"&&(document.head.appendChild(J({nodes:Wo})),mo=!0)}function go(t={}){$o();let{text:e,variant:r="spinner",size:n="md"}=t,o=n!=="md"?` sibu-loading-${n}`:"";return r==="dots"?x({class:`sibu-loading${o}`,nodes:[x({class:"sibu-loading-dots",nodes:[C({class:"sibu-loading-dot"}),C({class:"sibu-loading-dot"}),C({class:"sibu-loading-dot"})]}),e?C({class:"sibu-loading-text",nodes:e}):null].filter(Boolean)}):x({class:`sibu-loading${o}`,nodes:[x({class:"sibu-loading-spinner"}),e?C({class:"sibu-loading-text",nodes:e}):null].filter(Boolean)})}typeof window<"u"&&(window.Sibu=qe);return So(Uo);})();
393
+ `,No=!1;function ui(){!No&&typeof document<"u"&&(document.head.appendChild(z({nodes:di})),No=!0)}function Lo(e={}){ui();let{text:t,variant:n="spinner",size:r="md"}=e,o=r!=="md"?` sibu-loading-${r}`:"";return n==="dots"?h({class:`sibu-loading${o}`,nodes:[h({class:"sibu-loading-dots",nodes:[S({class:"sibu-loading-dot"}),S({class:"sibu-loading-dot"}),S({class:"sibu-loading-dot"})]}),t?S({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)}):h({class:`sibu-loading${o}`,nodes:[h({class:"sibu-loading-spinner"}),t?S({class:"sibu-loading-text",nodes:t}):null].filter(Boolean)})}typeof window<"u"&&(window.Sibu=Ue);return Bo(pi);})();