sibujs 4.13.0 → 4.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.cjs +1 -1
- package/dist/browser.js +4 -4
- package/dist/build.cjs +1 -1
- package/dist/build.js +10 -10
- package/dist/cdn.dev.global.js +1 -1
- package/dist/cdn.full.dev.global.js +1 -1
- package/dist/cdn.full.global.js +1 -1
- package/dist/cdn.global.js +1 -1
- package/dist/{chunk-G6366I2A.js → chunk-22OPSWMF.js} +1 -1
- package/dist/{chunk-ENFRHCMK.js → chunk-2NC56RGY.js} +1 -1
- package/dist/{chunk-MNEITZ27.js → chunk-2O6JJCUR.js} +4 -4
- package/dist/{chunk-HVVRXRGO.js → chunk-4UTGDVSA.js} +1 -1
- package/dist/{chunk-7K7W4AA5.js → chunk-5RIBLY2N.js} +4 -4
- package/dist/{chunk-L3QHS4O4.js → chunk-5XUGJM3J.js} +1 -1
- package/dist/{chunk-3C56VNCK.js → chunk-ADZHPN2B.js} +1 -1
- package/dist/{chunk-ZE5LF44R.js → chunk-C73VBPEF.js} +5 -5
- package/dist/{chunk-346BYZL2.js → chunk-CPQKWCJ2.js} +2 -2
- package/dist/{chunk-CK5F2IR5.js → chunk-EU7T7EB3.js} +2 -2
- package/dist/{chunk-QV5WEOFD.js → chunk-G3Z2FEBR.js} +4 -4
- package/dist/{chunk-24L5RDPS.js → chunk-J4X7ICH4.js} +3 -3
- package/dist/{chunk-HDKDBC6V.js → chunk-K4LNUT5L.js} +1 -1
- package/dist/{chunk-M25RIH6Y.js → chunk-KC62VURU.js} +3 -3
- package/dist/{chunk-IV74C2YX.js → chunk-OIKD7YDY.js} +2 -2
- package/dist/{chunk-C2FAO6VQ.js → chunk-PBJYCE2Z.js} +4 -4
- package/dist/{chunk-BRRRVLHQ.js → chunk-QC3NP47A.js} +1 -1
- package/dist/{chunk-GNSRXK34.js → chunk-QKFVMIAV.js} +1 -1
- package/dist/{chunk-F4W7WYXY.js → chunk-QZ47OZ25.js} +3 -3
- package/dist/{chunk-Z3EZX6DZ.js → chunk-VFPLWUT7.js} +9 -9
- package/dist/{chunk-YJ57VR6Y.js → chunk-YFTBCCVH.js} +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.js +5 -5
- package/dist/devtools.cjs +1 -1
- package/dist/devtools.js +4 -4
- package/dist/ecosystem.cjs +1 -1
- package/dist/ecosystem.js +7 -7
- package/dist/extras.cjs +3 -3
- package/dist/extras.js +20 -20
- package/dist/index.cjs +1 -1
- package/dist/index.js +10 -10
- package/dist/motion.cjs +1 -1
- package/dist/motion.js +3 -3
- package/dist/patterns.cjs +1 -1
- package/dist/patterns.js +5 -5
- package/dist/performance.cjs +1 -1
- package/dist/performance.js +4 -4
- package/dist/plugins.cjs +3 -3
- package/dist/plugins.js +7 -7
- package/dist/ssr.cjs +1 -1
- package/dist/ssr.js +7 -7
- package/dist/testing.cjs +1 -1
- package/dist/testing.js +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +7 -7
- package/dist/widgets.cjs +1 -1
- package/dist/widgets.js +6 -6
- package/package.json +1 -1
package/dist/cdn.full.global.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
`||o==="\f"){n+=1;continue}if(o==="\r"){n+=e[n+2]===`
|
|
5
5
|
`?2:1;continue}if(qn(o)){let i="",s=n+1;for(;s<e.length&&i.length<6&&qn(e[s]);)i+=e[s],s++;s<e.length&&ui(e[s])&&(s+=e[s]==="\r"&&e[s+1]===`
|
|
6
6
|
`?2:1);let a=Number.parseInt(i,16),u=a===0||a>1114111||a>=55296&&a<=57343;t+=u?"\uFFFD":String.fromCodePoint(a),n=s-1;continue}t+=o,n+=1}return t}var Un=["url(","expression(","javascript:","vbscript:","-moz-binding","behavior:","@import","image-set(","filter:progid","image(","src("],ci=4,di=5,fi=8;function pi(e){if(!e)return"an element";let t=e.tagName.toLowerCase(),n=e.getAttribute("id");n&&(t+=`#${n}`);let r=e.getAttribute("class");return r&&(t+=`.${r.trim().split(/\s+/).slice(0,3).join(".")}`),`<${t}>`}var Ft=new Set,Kn=100,Gn=!1;function mt(e,t,n){}function Jn(e){return(e.includes("\\")?li(e):e).toLowerCase().replace(/\s+/g,"")}function zt(e){if(!ai.test(e))return-1;let t=Jn(e);for(let n=0;n<Un.length;n++)if(t.includes(Un[n]))return n;return-1}function bt(e,t,n){let r=Wt(e,t);return r===-1?t:(mt(t,r,{property:e,element:n?.element}),"")}function Wt(e,t){let n=zt(t);if(n!==-1)return n;let r=oe(e);return r==="behavior"?di:r==="-moz-binding"?ci:(r==="filter"||r==="-ms-filter")&&Jn(t).includes("progid:")?fi:-1}function mi(e){let t=[],n="",r=0,o="";for(let s=0;s<e.length;s++){let a=e[s];if(o){n+=a,a==="\\"&&s+1<e.length?n+=e[++s]:a===o&&(o="");continue}if(a==="\\"){n+=a,s+1<e.length&&(n+=e[++s]);continue}if(a==="/"&&e[s+1]==="*"){let u=e.indexOf("*/",s+2);if(u===-1)return null;s=u+1;continue}if(a==='"'||a==="'")o=a;else if(a==="("||a==="[")r++;else if(a===")"||a==="]"){if(--r<0)return null}else{if(a==="{"||a==="}")return null;if(a===";"&&r===0){t.push(n),n="";continue}}n+=a}if(o||r!==0)return null;t.push(n);let i=[];for(let s of t){let a=s.indexOf(":");if(a===-1)continue;let u=s.slice(0,a).trim();if(!/^(--[\w-]+|-?[a-zA-Z_][\w-]*)$/.test(u))continue;let l=s.slice(a+1).trim(),c=/!\s*important\s*$/i.exec(l);if(c&&(l=l.slice(0,c.index).trim()),l==="")continue;let m=u.startsWith("--")?u:oe(u);i.push([m,l,c!==null])}return i}function gi(e,t){let n=String(e),r=mi(n);if(r===null)return zt(n)!==-1&&mt(n,zt(n),t),"";let o=[];for(let[i,s,a]of r){let u=Wt(i,s);if(u!==-1){mt(s,u,{property:i,element:t?.element});continue}o.push(`${i}: ${s}${a?" !important":""}`)}return o.join("; ")}function ht(e,t){let n=String(e);if(n.trim()==="")return"";if(typeof document>"u")return gi(n,t);let r=document.createElement("div");try{r.style.cssText=n}catch{return""}let o=[];for(let i=0;i<r.style.length;i++){let s=r.style[i],a=r.style.getPropertyValue(s),u=Wt(s,a);if(u!==-1){mt(a,u,{property:s,element:t?.element});continue}let l=r.style.getPropertyPriority(s);o.push(`${s}: ${a}${l?` !${l}`:""}`)}return o.join("; ")}var qt=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),bi=new Set(["srcdoc"]);function it(e){return bi.has(e.toLowerCase())}function Yn(e){return qt.has(e.toLowerCase())}function hi(e){let t=e.toLowerCase();return t==="style"||qt.has(t)}function yi(e,t,n){let r=e.toLowerCase();return r==="srcset"?si(t):qt.has(r)?gt(t):r==="style"?ht(t,n):t}function Xn(e,t,n){if(!hi(e))return t;let r=yi(e,t,n);return r===""?null:r}function Re(e){return e===" "||e===" "||e===`
|
|
7
|
-
`||e==="\r"||e==="\f"}function yt(e){let t=0,n=e.length;for(;t<n&&Re(e[t]);)t++;for(;n>t&&Re(e[n-1]);)n--;return e.slice(t,n)}var ie=e=>({kind:"forbidden",reason:e});function vi(e){let t=yt(We(e));if(t==="")return ie("");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return ie("");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return ie("");for(;n<t.length&&Re(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return ie("");for(n++;n<t.length&&Re(t[n]);)n++;let o=n;for(;n<t.length&&!Re(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return ie("");for(;n<t.length&&Re(t[n]);)n++;if(t[n]!=="=")return ie("");for(n++;n<t.length&&Re(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let l=t.indexOf(a,n+1);if(l===-1)return ie("");if(s=t.slice(n+1,l),yt(t.slice(l+1))!=="")return ie("")}else if(s=yt(t.slice(n)),/[;,]/.test(s))return ie("");if(s==="")return ie("");let u=gt(s);return u===""?ie(""):{kind:"allowed",delay:r,destination:s,sanitizedDestination:u}}function Ut(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=oe(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?ie(""):typeof t!="string"?{kind:"not-refresh"}:yt(We(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:vi(n)}var Si="http://www.w3.org/1999/xhtml",xi="http://www.w3.org/2000/svg",wi=new Set(["script","iframe","object","embed","frame","frameset"]);function Qn(e){return oe(e)}function er(e){return wi.has(Qn(e))}var Ti=new Set(["script","style"]);function tr(e){return Ti.has(Qn(e))}var I={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},Ei=new Set(["src","href","xlink:href","type","language"]),ki=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),Kt=new WeakSet;function nr(e){return e.namespaceURI===Si||e.namespaceURI===null}function rr(e,t,n){let r=new Map,o=e.attributes;for(let i=0;i<o.length;i++){let s=o[i];s.name!==t&&r.set(s.name,s.value)}return t!==null&&n!==null&&r.set(t,n),r}function _i(e){Kt.has(e)||(Kt.add(e),e.getAttribute("content")!==null&&Ut(rr(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function Ci(e,t,n,r){if(!nr(e))return I.None;let o=oe(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&_i(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return I.None;let i=Ut(rr(e,o,n));return i.kind==="forbidden"?I.MetaRefreshForbidden:i.kind!=="not-refresh"&&Kt.has(e)?I.MetaRefreshReactive:I.None}function Ai(e,t){if(t===null||oe(e)!=="attributename")return I.None;let n=We(t);return Yn(n)||Te(n)||it(n)?I.AnimationTarget:I.None}var vt=new WeakSet;function Zn(e){if(e===null)return!1;let t=oe(e);if(!t.includes("stylesheet"))return!1;let n=t.split(/[\t\n\f\r ]+/);for(let r=0;r<n.length;r++)if(n[r]==="stylesheet")return!0;return!1}function Ni(e,t,n,r){if(!nr(e))return I.None;let o=oe(t);return o==="href"?r==="static"||n===null?I.None:Zn(e.getAttribute("rel"))?I.StylesheetSource:(vt.add(e),I.None):o==="rel"&&Zn(n)&&vt.has(e)&&e.hasAttribute("href")?I.StylesheetSource:I.None}function Gt(e,t,n,r){let o=e.localName;return o==="meta"?Ci(e,t,n,r):o==="link"?Ni(e,t,n,r):o==="script"?r==="static"||n===null?I.None:Ei.has(oe(t))?I.ScriptSource:I.None:ki.has(o)&&e.namespaceURI===xi?Ai(t,n):I.None}function Jt(e,t,n){e.localName!=="link"||oe(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?vt.add(e):vt.delete(e))}var Ri="http://www.w3.org/1999/xhtml",Li="http://www.w3.org/2000/svg",Mi="http://www.w3.org/1999/xlink",Oi="http://www.w3.org/XML/1998/namespace",Pi=new Set(["checked","disabled","selected"]);function Di(e){return e.namespaceURI===null||e.namespaceURI===Ri}function ir(e,t,n){}function or(e,t,n){e[t]=n}function $i(e,t){if(e.namespaceURI!==Li)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?Mi:n.startsWith("xml:")?Oi:null}function ue(e,t,n,r={}){let o=Hi(e,t,n,r);return e.localName==="link"&&Jt(e,t,r.reactive?"reactive":"runtime"),o}function Hi(e,t,n,r){let o=$i(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(Te(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=Gt(e,t,s,r.reactive?"reactive":"runtime");if(a!==I.None)return ir(r.label??"setSafeAttribute",t,a),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;if(n==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0;if(it(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let u=Di(e),l=u?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let g=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==g&&(o?e.setAttributeNS(o,t,g):e.setAttribute(t,g)),!0}return u&&Pi.has(l)&&l in e?or(e,l,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let c=String(n);if(r.syncValueProperty!==!1&&u&&(l==="value"||l==="checked")&&l in e)return or(e,l,l==="checked"?!!n:c),!0;let m=c===""?"":Xn(t,c,{element:e});return m===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===m||(o?e.setAttributeNS(o,t,m):e.setAttribute(t,m)),!0)}function Yt(e,t,n){if(it(t))return!1,!1;let r=Gt(e,t,n,"static");return r!==I.None?(ir("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Jt(e,t,"static"),!0)}var Ii=4096,Xt=[];function Bi(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function Vi(e,t,n){let r=Xt.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=Bi();return o.sig=e,o.sub=t,o.epoch=n,o}function sr(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Xt.length<Ii&&Xt.push(e)}function ji(e,t){let n=e.subsHead??null;t.sigPrev=null,t.sigNext=n,n?n.sigPrev=t:e.subsTail=t,e.subsHead=t,e.__sc=(e.__sc??0)+1}function ar(e){let t=e.sig;if(!t)return;let n=e.sigPrev,r=e.sigNext;n?n.sigNext=r:t.subsHead=r,r?r.sigPrev=n:t.subsTail=n,t.__sc=(t.__sc??1)-1,t.__activeNode===e&&(t.__activeNode=e.prevActive),t.__sc===0&&(t.subsHead=null,t.subsTail=null)}function Fi(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function zi(e){let t=e.sub;if(!t)return;let n=e.subPrev,r=e.subNext;n?n.subNext=r:t.depsHead=r,r?r.subPrev=n:t.depsTail=n}var le=null,he=null,Ee=0,ke=[],J=new Set,Wi=[];function qi(e){try{e()}catch(t){let n=e;L(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function Ui(e){let t=e.depsHead??null;if(t===null)return!0;for(;t!==null;){let n=t.sig;if(n===null)return!0;if(n._d===!0&&n._validate!==void 0)try{n._validate()}catch{return!0}if(t.depVersion!==n.__v)return!0;t=t.subNext}return!1}var ge=0,ye=!1;function Qt(){ge===0&&(he=le,le=null,ye=!0),ge++}function en(){ge--,ge===0&&(le=he,he=null,ye=!1)}function ur(){return ye}function lr(e){Qt();try{return e()}finally{en()}}var se=null;function tn(){return se}function Tt(e,t){let n=se;se=e;try{return t()}finally{se=n}}function nn(e){let t=se;return t===null?e:(...n)=>Tt(t,()=>e(...n))}var qe=null,Ki=0;function rn(e,t){let n=le,r=0,o=null;ye&&(r=ge,o=he,ge=0,he=null,ye=!1),le=t;let i=t;i._cap===void 0&&(i._cap=Vn());let s=se;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(se=a);let u=qe;u!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=u),i._tok!=null&&(qe=i._tok);let l=++Ki;i._epoch=l,i._structDirty=!1;for(let c=i.depsHead??null;c!==null;c=c.subNext){let m=c.sig;c.prevActive=m.__activeNode??null,m.__activeNode=c}try{e()}finally{le=n,se=s,qe=u,r!==0&&(ge=r,he=o,ye=!0);let c=i.depsHead??null;for(;c!==null;){let m=c.subNext,h=c.sig;h.__activeNode=c.prevActive,c.prevActive=null,c.epoch!==l&&(zi(c),ar(c),sr(c)),c=m}}}function cr(e,t){if(!t)return on(e);Ue(t);let n=le,r=0,o=null;ye&&(r=ge,o=he,ge=0,he=null,ye=!1),le=t;let i=t;i._scope===void 0&&(i._scope=se);let s=se;se=i._scope;try{e()}finally{le=n,se=s,r!==0&&(ge=r,he=o,ye=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let u=a.sig;u.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Ue(t))}function on(e,t,n){return fr(e,t,n===!0)._dispose}function dr(e,t){let n=fr(e,t,!0);return{stop:n._dispose,run:r=>{let o=qe;qe=n._tok??null;try{return r()}finally{qe=o}}}}function fr(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{rn(e,o)}finally{i._reentrant=!1}}},o=r;o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._runEpoch=0,o._runs=0,o._reentrant=!1,o._disposed=!1,o._errorPhase="binding",o._errorNode=t,o._tok=null,o._owner=null,n&&(o._tok={sub:o});try{r()}catch(i){throw o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Ue(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Ue(o)},o}function pr(e){if(!le)return;let t=le,n=e,r=t._epoch??0,o=n.__activeNode??null;if(o!==null&&o.sub===t){o.epoch=r,o.depVersion=n.__v??Number.NaN;return}n._validate!==void 0&&(t._hasComputedDep=!0);let i=Vi(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,Fi(t,i),ji(n,i),t._structDirty=!0}function Ue(e){let t=e;t._owner!=null&&(t._owner=null);let n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;ar(n),sr(n),n=r}}var St=1e3,xt=1e6,wt=0,Le=new Set;function mr(e){let t=St;return Number.isFinite(e)&&e>0&&(St=Math.floor(e)),t}function gr(e){let t=xt;return Number.isFinite(e)&&e>0&&(xt=Math.floor(e)),t}function Gi(e){let t=e;return t._runEpoch!==wt?(t._runEpoch=wt,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>St)}function Ji(e){let t=e.__name??"<unnamed>";L(new Error(`subscriber "${t}" fired more than ${St} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:t})}function Yi(){L(new Error(`Notification drain exceeded ${xt} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function br(){let e=0;for(;e<ke.length;){if(e>=xt){Yi();break}let t=ke[e++];J.delete(t)&&(t._owner!=null&&J.size>0&&(Xi(t),J.has(t))||hr(t))}}function Xi(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;J.has(r)&&(t=r),n=r._owner??null}if(t===null)return;J.delete(t),hr(t)}}function hr(e){if(Le.size>0&&Le.has(e)||e._hasComputedDep===!0&&!Ui(e))return;if(Gi(e)){Ji(e),Le.add(e);return}let t=jn(e._cap??null);try{qi(e)}finally{t&&Fn()}}function yr(){if(!(Ee>0)){Ee++,wt++;try{br()}finally{Ee--,Ee===0&&(ke.length=0,J.clear(),Le.size>0&&Le.clear())}}}function Zt(e){e();let t=e._sig;if(!t)return;let n=Wi,r=n.length;for(n.push(t);n.length>r;){let i=n.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?(!a._d||a._f===!0)&&(a._d=!0,a._f=!1,n.push(a)):s()}else J.has(s)||(J.add(s),ke.push(s));i=i.sigNext}}}function vr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?Zt(r):J.has(r)||(J.add(r),ke.push(r))),n=n.sigNext}}function Sr(e){let n=e.subsHead;if(n){if(Ee>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?Zt(o):J.has(o)||(J.add(o),ke.push(o))),r=r.sigNext}return}Ee++,wt++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?Zt(o):J.has(o)||(J.add(o),ke.push(o))),r=r.sigNext}br()}finally{Ee--,Ee===0&&(ke.length=0,J.clear(),Le.size>0&&Le.clear())}}}function xr(e){return e.__sc??0}function wr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function Tr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var Er="4.13.0",kr=Symbol.for("sibujs.reactive.v1");function Qi(){let e=globalThis,t=e[kr];if(t)return!1,t;let n={suspendTracking:Qt,resumeTracking:en,isTrackingSuspended:ur,untracked:lr,retrack:rn,track:cr,reactiveBinding:on,recordDependency:pr,cleanup:Ue,setMaxSubscriberRepeats:mr,setMaxDrainIterations:gr,drainNotificationQueue:yr,queueSignalNotification:vr,notifySubscribers:Sr,getSubscriberCount:xr,getSubscriberDeps:wr,forEachSubscriber:Tr,getOwnerScope:tn,runWithOwnerScope:Tt,bindOwnerScope:nn,structuralBinding:dr,version:Er};return e[kr]=n,n}var j=Qi(),Me=j.suspendTracking,Oe=j.resumeTracking,_r=j.isTrackingSuspended,ce=j.untracked,_e=j.retrack,Ke=j.track,K=j.reactiveBinding,Pe=j.recordDependency,De=j.cleanup,Pc=j.setMaxSubscriberRepeats,Cr=j.setMaxDrainIterations,Ar=j.drainNotificationQueue,Nr=j.queueSignalNotification,Ge=j.notifySubscribers,Dc=j.getSubscriberCount,$c=j.getSubscriberDeps,Hc=j.forEachSubscriber,Je=j.getOwnerScope??tn,Et=j.runWithOwnerScope??Tt,X=j.bindOwnerScope??nn,$e=j.structuralBinding??((e,t)=>({stop:j.reactiveBinding(e,t),run:n=>n()}));function st(e,t,n){if(Te(t))return ue(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){L(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}ue(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return K(r,e)}function Rr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(u){L(u,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(u){L(u,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),ue(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=K(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var sn=["data-focus-key","id","name"],es=new Set(["text","search","url","tel","password",""]);function ts(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&es.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function at(e){if(e.length===0||typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body)return null;let n=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===t||s.nodeType===1&&s.contains(t)){n=!0;break}}if(!n)return null;let r=null,o=null;for(let i=0;i<sn.length;i++){let s=t.getAttribute(sn[i]);if(s){r=sn[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...ts(t)}}function ns(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function rs(e,t){let n=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(t)&&(r++,n??(n=s));let a=s.querySelectorAll(t);for(let u=0;u<a.length;u++)r++,n??(n=a[u]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function Lr(e,t){if(e.focus(),t.start!==null&&typeof e.setSelectionRange=="function"){let n=e,r=n.value.length,o=Math.min(t.start,r),i=Math.min(t.end??o,r);n.setSelectionRange(o,i,t.direction??"none")}}function Ye(e,t,n,r){if(!e||typeof document>"u"||r==="discard")return;let o=document.activeElement;if(o===e.el||o&&o!==document.body&&o!==document.documentElement)return;if(e.el.isConnected){Lr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=rs(t,`[${e.attr}=${ns(e.value)}]`);if(s&&s.tagName===e.tag){Lr(s,e);return}i=a>1}if(r!==void 0&&typeof r=="object"){let s=typeof r.restoreTo=="function"?r.restoreTo():r.restoreTo;if(s?.isConnected&&(s.focus(),document.activeElement===s))return}}function ve(e,t){let n=[];function r(){let o;try{o=t()}catch(c){L(c,{phase:"binding",name:"bindChildNode",node:e});return}let i=at(n);if(o==null||typeof o=="boolean"){for(let c=0;c<n.length;c++){let m=n[c];V(m),m.parentNode&&m.parentNode.removeChild(m)}n.length=0,Ye(i,n,"bindChildNode");return}let s=e.parentNode;if(!s){n.length=0;return}let a;if(Array.isArray(o)){a=[];let c=new Set;for(let m=0;m<o.length;m++){let h=o[m];if(h==null||typeof h=="boolean")continue;let g=h instanceof Node?h:document.createTextNode(String(h));if(c.has(g)){!1;continue}c.add(g),a.push(g)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let u;if(n.length>0&&a.length>0){let c=new Set(n);u=new Set;for(let m=0;m<a.length;m++)c.has(a[m])&&u.add(a[m])}for(let c=0;c<n.length;c++){let m=n[c];u?.has(m)||(V(m),m.parentNode&&m.parentNode.removeChild(m))}let l=e;for(let c=0;c<a.length;c++){let m=a[c];l.nextSibling!==m&&s.insertBefore(m,l.nextSibling),l=m}n=a,Ye(i,a,"bindChildNode")}return K(r,e,!0)}function an(){throw new Error("[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first.")}function te(){typeof document>"u"&&an()}var H="http://www.w3.org/2000/svg",os=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var un=new Set,Mr=100,Or=!1,Pr=new Map;function Dr(e){let t=Pr.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Pr.set(e,t)),t}function is(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=K(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",ht(String(a),{element:e}));return}let u=e.style;i&&(e.removeAttribute("style"),i=!1);let l=[];for(let c in a){if(!Object.hasOwn(a,c))continue;let m=a[c];if(m==null)continue;let h=Dr(c);l.push(h),u.setProperty(h,bt(h,String(m),{element:e}))}for(let c=0;c<o.length;c++)l.indexOf(o[c])===-1&&u.removeProperty(o[c]);o=l},e);_(e,s);return}if(typeof t=="string"){e.setAttribute("style",ht(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=Dr(r);if(typeof o=="function"){let s=o,a=K(()=>{n.style.setProperty(i,bt(i,String(s()),{element:e}))},e);_(e,a)}else n.style.setProperty(i,bt(i,String(o),{element:e}))}}function ss(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=K(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);_(e,i);return}let n=t,r=!1,o="";for(let i in n){if(!Object.hasOwn(n,i))continue;let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=K(()=>{let a="";for(let u in n){if(!Object.hasOwn(n,u))continue;let l=n[u];(typeof l=="function"?l():l)&&(a=a?`${a} ${u}`:u)}e.setAttribute("class",a)},e);_(e,s)}else e.setAttribute("class",o)}function ln(e,t){if(typeof t=="string"){e.textContent=t;return}if(typeof t=="number"){e.textContent=String(t);return}if(!(typeof t=="boolean"||t==null)){if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),_(e,ve(n,t));return}if(t instanceof Node){e.appendChild(t);return}if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),_(e,ve(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),_(e,ve(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)))}}}function p(e,t){let n=er(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&an();let i=t?document.createElementNS(t,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),ln(i,o),i):(i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return ln(i,r),i;let s=r,a=s.class;a!=null&&ss(i,a);let u=s.id;typeof u=="function"?_(i,st(i,"id",u)):u!=null&&(!1,i.id=u);let l=o!==void 0?o:s.nodes;l!=null&&ln(i,l);let c=s.on;if(c)for(let g in c){if(!Object.hasOwn(c,g))continue;let d=c[g];typeof d=="function"?i.addEventListener(g,d):!1}let m=s.style;m!=null&&is(i,m);let h=s.ref;h&&(h.current=i);for(let g in s)switch(g){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,g))continue;let d=s[g];if(d==null||Te(g))continue;typeof d=="function"?_(i,st(i,g,d)):ue(i,g,d,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var ad=p("html"),as=p("head"),us=p("body"),ls=p("title"),P=p("div"),z=p("span"),cs=p("section"),ds=p("article"),fs=p("header"),ps=p("footer"),ms=p("nav"),gs=p("main"),bs=p("aside"),hs=p("address"),cn=p("p"),ys=p("h1"),vs=p("h2"),dn=p("h3"),Ss=p("h4"),xs=p("h5"),ws=p("h6"),Ts=p("blockquote"),Es=p("dd"),ks=p("dl"),_s=p("dt"),Cs=p("figcaption"),As=p("figure"),Ns=p("hr"),Rs=p("li"),Ls=p("ol"),Ms=p("ul"),fn=p("pre"),Os=p("a"),Ps=p("abbr"),Ds=p("b"),$s=p("bdi"),Hs=p("bdo"),Is=p("br"),Bs=p("cite"),pn=p("code"),Vs=p("data"),js=p("dfn"),Fs=p("em"),zs=p("i"),Ws=p("kbd"),qs=p("mark"),Us=p("q"),Ks=p("rp"),Gs=p("rt"),Js=p("ruby"),Ys=p("s"),Xs=p("samp"),Zs=p("small"),Qs=p("strong"),ea=p("sub"),ta=p("sup"),na=p("time"),ra=p("u"),oa=p("var"),ia=p("area"),sa=p("audio"),aa=p("img"),ua=p("map"),la=p("track"),ca=p("video"),da=p("embed"),fa=p("iframe"),pa=p("object"),ma=p("param"),ga=p("picture"),ba=p("portal"),ha=p("source"),ya=p("svg",H),va=p("math"),Sa=p("canvas"),xa=p("noscript"),wa=p("script"),Ta=p("del"),Ea=p("ins"),ka=p("caption"),_a=p("col"),Ca=p("colgroup"),Aa=p("table"),Na=p("tbody"),Ra=p("td"),La=p("tfoot"),Ma=p("th"),Oa=p("thead"),Pa=p("tr"),ut=p("button"),Da=p("datalist"),$a=p("fieldset"),Ha=p("form"),Ia=p("input"),Ba=p("label"),Va=p("legend"),ja=p("meter"),Fa=p("optgroup"),za=p("option"),Wa=p("output"),qa=p("progress"),Ua=p("select"),Ka=p("textarea"),Ga=p("details"),Ja=p("dialog"),Ya=p("menu"),Xa=p("summary"),Za=p("slot"),Qa=p("template"),eu=p("base"),tu=p("link"),nu=p("meta"),He=p("style"),ru=p("circle",H),ou=p("ellipse",H),iu=p("g",H),su=p("line",H),au=p("path",H),uu=p("polygon",H),lu=p("polyline",H),cu=p("rect",H),du=p("text",H),fu=p("tspan",H),pu=p("defs",H),mu=p("clipPath",H),gu=p("mask",H),bu=p("pattern",H),hu=p("linearGradient",H),yu=p("radialGradient",H),vu=p("stop",H),Su=p("use",H),xu=p("symbol",H),wu=p("marker",H),Tu=p("center"),Eu=p("font"),ku=p("marquee"),_u=e=>p(e);var mn="__sibuPendingError";function $r(e,t){let n=()=>e.parentNode?(L(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[mn]=t)})}function kt(e){let t=e,n=t[mn];if(n instanceof Error)return delete t[mn],n}function Hr(e){let t=null;return function(){if(t)return t();let r=P({class:"sibu-lazy"}),o=!1;return e().then(X(i=>{if(o)return;t=i.default;let s=t();ee(r,s)})).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));ee(r,P({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),$r(r,s)}),r.appendChild(z("sibu-lazy-loading","Loading...")),_(r,()=>{o=!0}),r}}function Ir({nodes:e,fallback:t}){let n=P({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null,s=null;_(n,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!n.contains(s)&&V(s)});let a=X(()=>{if(!o)try{let u=e();if(s=u,u.classList.contains("sibu-lazy")){if(!u.querySelector(".sibu-lazy-loading")){ee(n,u);return}i=new MutationObserver(()=>{if(o)return;u.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,ee(n,u))}),i.observe(u,{childList:!0,subtree:!0})}else ee(n,u)}catch(u){let l=u instanceof Error?u:new Error(String(u));$r(n,l)}});return queueMicrotask(a),n}function yn(e,t){return()=>Je()===e?t():Et(e,t)}function Ct(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";L(n,{phase:r,name:t});return}}function gn(e,t,n,r,o){let i=Ct(e,t);if(typeof i!="function")return;let s=yn(o,i);r()||!n.isConnected?Ct(s,"onUnmount"):Vr(s,n)}var Xe=new WeakMap,Ie=new WeakMap,Se=new Set,xe=new Set,Ze=null,_t=0,Cu=256;function bn(e){let t=Xe.get(e);if(t){Xe.delete(e),Se.delete(e);for(let n of t)try{n()}catch{}}}function hn(e){Ie.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Ie.get(e);if(n){Ie.delete(e),xe.delete(e);for(let r of n)try{r()}catch{}}})}function Au(e){if(Se.size===0||e.nodeType!==1)return;let t=e;if(Se.has(t)&&t.isConnected&&bn(t),t.firstElementChild)for(let n of Array.from(Se))n!==t&&n.isConnected&&t.contains(n)&&bn(n)}function Nu(e){if(xe.size===0||e.nodeType!==1)return;let t=e;if(xe.has(t)&&!t.isConnected&&hn(t),t.firstElementChild)for(let n of Array.from(xe))n!==t&&!n.isConnected&&t.contains(n)&&hn(n)}function Ru(){if(Se.size>0)for(let e of Array.from(Se))e.isConnected&&bn(e);if(xe.size>0)for(let e of Array.from(xe))e.isConnected||hn(e)}function Br(){Ze||typeof document>"u"||(Ze=new MutationObserver(e=>{for(let t of e)if(t.type==="childList"){if(t.addedNodes.length>0)for(let n=0;n<t.addedNodes.length;n++)Au(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)Nu(t.removedNodes[n])}_t+=e.length,_t>=Cu&&(_t=0,Ru()),vn()}),Ze.observe(document.body,{childList:!0,subtree:!0}))}function vn(){Ze&&Se.size===0&&xe.size===0&&(Ze.disconnect(),Ze=null,_t=0)}function Lu(e,t){let n=Xe.get(e);return n||(n=[],Xe.set(e,n)),n.push(t),Se.add(e),Br(),()=>{let r=Xe.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Xe.delete(e),Se.delete(e))}vn()}}function Mu(e,t){let n=Ie.get(e);return n||(n=[],Ie.set(e,n)),n.push(t),xe.add(e),Br(),()=>{let r=Ie.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Ie.delete(e),xe.delete(e))}vn()}}function At(e,t){if(typeof document>"u")return;let n=Je();if(e=yn(n,e),t){let r=!1,o=()=>r;if(_(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||gn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){gn(e,"onMount",t,o,n);return}let i=Lu(t,()=>{r||gn(e,"onMount",t,o,n)});_(t,i)})}else queueMicrotask(()=>{Ct(e,"onMount")})}function Ou(e,t){typeof document>"u"||Vr(yn(Je(),e),t)}function Vr(e,t){let n=!1,r=()=>{n||(n=!0,Ct(e,"onUnmount"))};_(t,r);let o=()=>{if(n)return;let i=Mu(t,r);_(t,i)};t.isConnected?o():At(()=>{o()},t)}function Pu(e,t){_(t,e)}function ae(e,t,n){try{e.emit(t,n)}catch{}}var Sn=Symbol.for("sibujs.ssr.v1");function Du(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let t=null,n=process.getBuiltinModule;typeof n=="function"?t=n("node:async_hooks"):typeof It=="function"&&(t=It("async_hooks")),t&&(e=new t.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var Ce=globalThis[Sn]??(globalThis[Sn]=Du()),Be=Ce.als,Z=Ce.fallbackStore;Ce.fallbackDepth??(Ce.fallbackDepth=0);var jr=!1;function $u(){if(jr||Be||!(typeof process<"u"&&!!process.versions?.node))return;jr=!0;let t=process.versions.node;`${t}`}function Ve(){if(Be){let e=Be.getStore();if(e)return e}return Z}function Fr(){return Be?Be.getStore()??null:Ce.fallbackDepth>0?Z:null}function de(){return Ve().ssr}function zr(e){if(!de())return null;let t=Ve(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}function Wr(){Ve().ssr=!0}function qr(){Ve().ssr=!1}function Ur(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0};if(Be)return Be.run(t,e);$u();let n=Z.ssr,r=Z.suspenseIdCounter,o=Z.idCounter,i=Z.locale;Z.ssr=!0,Z.suspenseIdCounter=0,Z.idCounter=0,Z.locale=void 0,Ce.fallbackDepth++;try{return e()}finally{Ce.fallbackDepth--,Z.ssr=n,Z.suspenseIdCounter=r,Z.idCounter=o,Z.locale=i}}function Kr(e){let t=Ve(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var Xr=globalThis;function Hu(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,ce(()=>t(o,void 0));else{let i=n;n=o,ce(()=>t(o,i))}}}var Gr=100;function Nt(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===Je()?Jr(t):Et(n,()=>Jr(t))}function Jr(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){L(n,{phase:"cleanup"})}}function Yr(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&Nt(e),_e(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=Gr);e.rerunPending&&(e.rerunPending=!1,L(new Error(`effect re-requested itself ${Gr}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function Iu(e){if(e.disposed)return;e.disposed=!0;let t=Xr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Nt(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{De(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function Q(e,t){if(de())return()=>{};let n={fn:e,onError:t?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};n.onCleanup=s=>{n.userCleanups.push(s)};let r=n.onError;n.bodyFn=r?()=>{try{n.fn(n.onCleanup)}catch(s){r(s)}}:()=>{n.fn(n.onCleanup)};let o=(()=>{if(!n.disposed){if(n.running){n.rerunPending=!0;return}n.running=!0;try{n.rerunPending=!1,n.userCleanups.length>0&&Nt(n),_e(n.bodyFn,o),n.rerunPending&&Yr(n)}finally{n.running=!1,n.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,n.subscriber=o,n.running=!0;try{_e(n.bodyFn,n.subscriber),n.rerunPending&&Yr(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&Nt(n),De(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=Xr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&ae(i,"effect:create",{effectFn:e}),()=>Iu(n)}var lt=0,xn=new Set;function Bu(e){lt++;try{return e()}finally{lt--,lt===0&&Fu()}}function Vu(e){return lt===0?!1:(xn.add(e),!0)}function ju(){return lt>0}function Fu(){try{for(let e of xn)Nr(e)}finally{xn.clear()}Ar()}var Zr=Symbol.for("sibujs.reactive.batch.v1");function zu(){let e=globalThis,t=e[Zr];if(t)return t;let n={batch:Bu,enqueueBatchedSignal:Vu,isBatching:ju};return e[Zr]=n,n}var wn=zu(),W=wn.batch,je=wn.enqueueBatchedSignal,Wu=wn.isBatching;var Tn=globalThis;function C(e,t){let n={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=void 0,o=t?.equals;r&&(n.__name=r);function i(){return Pe(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let u=n.value,l=typeof a=="function"?a(u):a;if(!o(u,l)){if(n.value=l,n.__v++,!1){let c=Tn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&ae(c,"signal:update",{signal:n,name:r,oldValue:u,newValue:l})}je(n)||Ge(n)}}:s=a=>{let u=n.value,l=typeof a=="function"?a(u):a;Object.is(l,u)||(n.value=l,n.__v++,je(n)||Ge(n))},!1){let a=Tn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&ae(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function qu(e){let[t,n]=C(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Uu=`
|
|
7
|
+
`||e==="\r"||e==="\f"}function yt(e){let t=0,n=e.length;for(;t<n&&Re(e[t]);)t++;for(;n>t&&Re(e[n-1]);)n--;return e.slice(t,n)}var ie=e=>({kind:"forbidden",reason:e});function vi(e){let t=yt(We(e));if(t==="")return ie("");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return ie("");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return ie("");for(;n<t.length&&Re(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return ie("");for(n++;n<t.length&&Re(t[n]);)n++;let o=n;for(;n<t.length&&!Re(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return ie("");for(;n<t.length&&Re(t[n]);)n++;if(t[n]!=="=")return ie("");for(n++;n<t.length&&Re(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let l=t.indexOf(a,n+1);if(l===-1)return ie("");if(s=t.slice(n+1,l),yt(t.slice(l+1))!=="")return ie("")}else if(s=yt(t.slice(n)),/[;,]/.test(s))return ie("");if(s==="")return ie("");let u=gt(s);return u===""?ie(""):{kind:"allowed",delay:r,destination:s,sanitizedDestination:u}}function Ut(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=oe(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?ie(""):typeof t!="string"?{kind:"not-refresh"}:yt(We(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:vi(n)}var Si="http://www.w3.org/1999/xhtml",xi="http://www.w3.org/2000/svg",wi=new Set(["script","iframe","object","embed","frame","frameset"]);function Qn(e){return oe(e)}function er(e){return wi.has(Qn(e))}var Ti=new Set(["script","style"]);function tr(e){return Ti.has(Qn(e))}var I={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},Ei=new Set(["src","href","xlink:href","type","language"]),ki=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),Kt=new WeakSet;function nr(e){return e.namespaceURI===Si||e.namespaceURI===null}function rr(e,t,n){let r=new Map,o=e.attributes;for(let i=0;i<o.length;i++){let s=o[i];s.name!==t&&r.set(s.name,s.value)}return t!==null&&n!==null&&r.set(t,n),r}function _i(e){Kt.has(e)||(Kt.add(e),e.getAttribute("content")!==null&&Ut(rr(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function Ci(e,t,n,r){if(!nr(e))return I.None;let o=oe(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&_i(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return I.None;let i=Ut(rr(e,o,n));return i.kind==="forbidden"?I.MetaRefreshForbidden:i.kind!=="not-refresh"&&Kt.has(e)?I.MetaRefreshReactive:I.None}function Ai(e,t){if(t===null||oe(e)!=="attributename")return I.None;let n=We(t);return Yn(n)||Te(n)||it(n)?I.AnimationTarget:I.None}var vt=new WeakSet;function Zn(e){if(e===null)return!1;let t=oe(e);if(!t.includes("stylesheet"))return!1;let n=t.split(/[\t\n\f\r ]+/);for(let r=0;r<n.length;r++)if(n[r]==="stylesheet")return!0;return!1}function Ni(e,t,n,r){if(!nr(e))return I.None;let o=oe(t);return o==="href"?r==="static"||n===null?I.None:Zn(e.getAttribute("rel"))?I.StylesheetSource:(vt.add(e),I.None):o==="rel"&&Zn(n)&&vt.has(e)&&e.hasAttribute("href")?I.StylesheetSource:I.None}function Gt(e,t,n,r){let o=e.localName;return o==="meta"?Ci(e,t,n,r):o==="link"?Ni(e,t,n,r):o==="script"?r==="static"||n===null?I.None:Ei.has(oe(t))?I.ScriptSource:I.None:ki.has(o)&&e.namespaceURI===xi?Ai(t,n):I.None}function Jt(e,t,n){e.localName!=="link"||oe(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?vt.add(e):vt.delete(e))}var Ri="http://www.w3.org/1999/xhtml",Li="http://www.w3.org/2000/svg",Mi="http://www.w3.org/1999/xlink",Oi="http://www.w3.org/XML/1998/namespace",Pi=new Set(["checked","disabled","selected"]);function Di(e){return e.namespaceURI===null||e.namespaceURI===Ri}function ir(e,t,n){}function or(e,t,n){e[t]=n}function $i(e,t){if(e.namespaceURI!==Li)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?Mi:n.startsWith("xml:")?Oi:null}function ue(e,t,n,r={}){let o=Hi(e,t,n,r);return e.localName==="link"&&Jt(e,t,r.reactive?"reactive":"runtime"),o}function Hi(e,t,n,r){let o=$i(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(Te(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=Gt(e,t,s,r.reactive?"reactive":"runtime");if(a!==I.None)return ir(r.label??"setSafeAttribute",t,a),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;if(n==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0;if(it(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let u=Di(e),l=u?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let g=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==g&&(o?e.setAttributeNS(o,t,g):e.setAttribute(t,g)),!0}return u&&Pi.has(l)&&l in e?or(e,l,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let c=String(n);if(r.syncValueProperty!==!1&&u&&(l==="value"||l==="checked")&&l in e)return or(e,l,l==="checked"?!!n:c),!0;let m=c===""?"":Xn(t,c,{element:e});return m===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===m||(o?e.setAttributeNS(o,t,m):e.setAttribute(t,m)),!0)}function Yt(e,t,n){if(it(t))return!1,!1;let r=Gt(e,t,n,"static");return r!==I.None?(ir("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Jt(e,t,"static"),!0)}var Ii=4096,Xt=[];function Bi(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function Vi(e,t,n){let r=Xt.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=Bi();return o.sig=e,o.sub=t,o.epoch=n,o}function sr(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Xt.length<Ii&&Xt.push(e)}function ji(e,t){let n=e.subsHead??null;t.sigPrev=null,t.sigNext=n,n?n.sigPrev=t:e.subsTail=t,e.subsHead=t,e.__sc=(e.__sc??0)+1}function ar(e){let t=e.sig;if(!t)return;let n=e.sigPrev,r=e.sigNext;n?n.sigNext=r:t.subsHead=r,r?r.sigPrev=n:t.subsTail=n,t.__sc=(t.__sc??1)-1,t.__activeNode===e&&(t.__activeNode=e.prevActive),t.__sc===0&&(t.subsHead=null,t.subsTail=null)}function Fi(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function zi(e){let t=e.sub;if(!t)return;let n=e.subPrev,r=e.subNext;n?n.subNext=r:t.depsHead=r,r?r.subPrev=n:t.depsTail=n}var le=null,he=null,Ee=0,ke=[],J=new Set,Wi=[];function qi(e){try{e()}catch(t){let n=e;L(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function Ui(e){let t=e.depsHead??null;if(t===null)return!0;for(;t!==null;){let n=t.sig;if(n===null)return!0;if(n._d===!0&&n._validate!==void 0)try{n._validate()}catch{return!0}if(t.depVersion!==n.__v)return!0;t=t.subNext}return!1}var ge=0,ye=!1;function Qt(){ge===0&&(he=le,le=null,ye=!0),ge++}function en(){ge--,ge===0&&(le=he,he=null,ye=!1)}function ur(){return ye}function lr(e){Qt();try{return e()}finally{en()}}var se=null;function tn(){return se}function Tt(e,t){let n=se;se=e;try{return t()}finally{se=n}}function nn(e){let t=se;return t===null?e:(...n)=>Tt(t,()=>e(...n))}var qe=null,Ki=0;function rn(e,t){let n=le,r=0,o=null;ye&&(r=ge,o=he,ge=0,he=null,ye=!1),le=t;let i=t;i._cap===void 0&&(i._cap=Vn());let s=se;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(se=a);let u=qe;u!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=u),i._tok!=null&&(qe=i._tok);let l=++Ki;i._epoch=l,i._structDirty=!1;for(let c=i.depsHead??null;c!==null;c=c.subNext){let m=c.sig;c.prevActive=m.__activeNode??null,m.__activeNode=c}try{e()}finally{le=n,se=s,qe=u,r!==0&&(ge=r,he=o,ye=!0);let c=i.depsHead??null;for(;c!==null;){let m=c.subNext,h=c.sig;h.__activeNode=c.prevActive,c.prevActive=null,c.epoch!==l&&(zi(c),ar(c),sr(c)),c=m}}}function cr(e,t){if(!t)return on(e);Ue(t);let n=le,r=0,o=null;ye&&(r=ge,o=he,ge=0,he=null,ye=!1),le=t;let i=t;i._scope===void 0&&(i._scope=se);let s=se;se=i._scope;try{e()}finally{le=n,se=s,r!==0&&(ge=r,he=o,ye=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let u=a.sig;u.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Ue(t))}function on(e,t,n){return fr(e,t,n===!0)._dispose}function dr(e,t){let n=fr(e,t,!0);return{stop:n._dispose,run:r=>{let o=qe;qe=n._tok??null;try{return r()}finally{qe=o}}}}function fr(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{rn(e,o)}finally{i._reentrant=!1}}},o=r;o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._runEpoch=0,o._runs=0,o._reentrant=!1,o._disposed=!1,o._errorPhase="binding",o._errorNode=t,o._tok=null,o._owner=null,n&&(o._tok={sub:o});try{r()}catch(i){throw o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Ue(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Ue(o)},o}function pr(e){if(!le)return;let t=le,n=e,r=t._epoch??0,o=n.__activeNode??null;if(o!==null&&o.sub===t){o.epoch=r,o.depVersion=n.__v??Number.NaN;return}n._validate!==void 0&&(t._hasComputedDep=!0);let i=Vi(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,Fi(t,i),ji(n,i),t._structDirty=!0}function Ue(e){let t=e;t._owner!=null&&(t._owner=null);let n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;ar(n),sr(n),n=r}}var St=1e3,xt=1e6,wt=0,Le=new Set;function mr(e){let t=St;return Number.isFinite(e)&&e>0&&(St=Math.floor(e)),t}function gr(e){let t=xt;return Number.isFinite(e)&&e>0&&(xt=Math.floor(e)),t}function Gi(e){let t=e;return t._runEpoch!==wt?(t._runEpoch=wt,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>St)}function Ji(e){let t=e.__name??"<unnamed>";L(new Error(`subscriber "${t}" fired more than ${St} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:t})}function Yi(){L(new Error(`Notification drain exceeded ${xt} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function br(){let e=0;for(;e<ke.length;){if(e>=xt){Yi();break}let t=ke[e++];J.delete(t)&&(t._owner!=null&&J.size>0&&(Xi(t),J.has(t))||hr(t))}}function Xi(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;J.has(r)&&(t=r),n=r._owner??null}if(t===null)return;J.delete(t),hr(t)}}function hr(e){if(Le.size>0&&Le.has(e)||e._hasComputedDep===!0&&!Ui(e))return;if(Gi(e)){Ji(e),Le.add(e);return}let t=jn(e._cap??null);try{qi(e)}finally{t&&Fn()}}function yr(){if(!(Ee>0)){Ee++,wt++;try{br()}finally{Ee--,Ee===0&&(ke.length=0,J.clear(),Le.size>0&&Le.clear())}}}function Zt(e){e();let t=e._sig;if(!t)return;let n=Wi,r=n.length;for(n.push(t);n.length>r;){let i=n.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?(!a._d||a._f===!0)&&(a._d=!0,a._f=!1,n.push(a)):s()}else J.has(s)||(J.add(s),ke.push(s));i=i.sigNext}}}function vr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?Zt(r):J.has(r)||(J.add(r),ke.push(r))),n=n.sigNext}}function Sr(e){let n=e.subsHead;if(n){if(Ee>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?Zt(o):J.has(o)||(J.add(o),ke.push(o))),r=r.sigNext}return}Ee++,wt++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?Zt(o):J.has(o)||(J.add(o),ke.push(o))),r=r.sigNext}br()}finally{Ee--,Ee===0&&(ke.length=0,J.clear(),Le.size>0&&Le.clear())}}}function xr(e){return e.__sc??0}function wr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function Tr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var Er="4.13.1",kr=Symbol.for("sibujs.reactive.v1");function Qi(){let e=globalThis,t=e[kr];if(t)return!1,t;let n={suspendTracking:Qt,resumeTracking:en,isTrackingSuspended:ur,untracked:lr,retrack:rn,track:cr,reactiveBinding:on,recordDependency:pr,cleanup:Ue,setMaxSubscriberRepeats:mr,setMaxDrainIterations:gr,drainNotificationQueue:yr,queueSignalNotification:vr,notifySubscribers:Sr,getSubscriberCount:xr,getSubscriberDeps:wr,forEachSubscriber:Tr,getOwnerScope:tn,runWithOwnerScope:Tt,bindOwnerScope:nn,structuralBinding:dr,version:Er};return e[kr]=n,n}var j=Qi(),Me=j.suspendTracking,Oe=j.resumeTracking,_r=j.isTrackingSuspended,ce=j.untracked,_e=j.retrack,Ke=j.track,K=j.reactiveBinding,Pe=j.recordDependency,De=j.cleanup,Pc=j.setMaxSubscriberRepeats,Cr=j.setMaxDrainIterations,Ar=j.drainNotificationQueue,Nr=j.queueSignalNotification,Ge=j.notifySubscribers,Dc=j.getSubscriberCount,$c=j.getSubscriberDeps,Hc=j.forEachSubscriber,Je=j.getOwnerScope??tn,Et=j.runWithOwnerScope??Tt,X=j.bindOwnerScope??nn,$e=j.structuralBinding??((e,t)=>({stop:j.reactiveBinding(e,t),run:n=>n()}));function st(e,t,n){if(Te(t))return ue(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){L(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}ue(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return K(r,e)}function Rr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(u){L(u,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(u){L(u,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),ue(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=K(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var sn=["data-focus-key","id","name"],es=new Set(["text","search","url","tel","password",""]);function ts(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&es.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function at(e){if(e.length===0||typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body)return null;let n=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===t||s.nodeType===1&&s.contains(t)){n=!0;break}}if(!n)return null;let r=null,o=null;for(let i=0;i<sn.length;i++){let s=t.getAttribute(sn[i]);if(s){r=sn[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...ts(t)}}function ns(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function rs(e,t){let n=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(t)&&(r++,n??(n=s));let a=s.querySelectorAll(t);for(let u=0;u<a.length;u++)r++,n??(n=a[u]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function Lr(e,t){if(e.focus(),t.start!==null&&typeof e.setSelectionRange=="function"){let n=e,r=n.value.length,o=Math.min(t.start,r),i=Math.min(t.end??o,r);n.setSelectionRange(o,i,t.direction??"none")}}function Ye(e,t,n,r){if(!e||typeof document>"u"||r==="discard")return;let o=document.activeElement;if(o===e.el||o&&o!==document.body&&o!==document.documentElement)return;if(e.el.isConnected){Lr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=rs(t,`[${e.attr}=${ns(e.value)}]`);if(s&&s.tagName===e.tag){Lr(s,e);return}i=a>1}if(r!==void 0&&typeof r=="object"){let s=typeof r.restoreTo=="function"?r.restoreTo():r.restoreTo;if(s?.isConnected&&(s.focus(),document.activeElement===s))return}}function ve(e,t){let n=[];function r(){let o;try{o=t()}catch(c){L(c,{phase:"binding",name:"bindChildNode",node:e});return}let i=at(n);if(o==null||typeof o=="boolean"){for(let c=0;c<n.length;c++){let m=n[c];V(m),m.parentNode&&m.parentNode.removeChild(m)}n.length=0,Ye(i,n,"bindChildNode");return}let s=e.parentNode;if(!s){n.length=0;return}let a;if(Array.isArray(o)){a=[];let c=new Set;for(let m=0;m<o.length;m++){let h=o[m];if(h==null||typeof h=="boolean")continue;let g=h instanceof Node?h:document.createTextNode(String(h));if(c.has(g)){!1;continue}c.add(g),a.push(g)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let u;if(n.length>0&&a.length>0){let c=new Set(n);u=new Set;for(let m=0;m<a.length;m++)c.has(a[m])&&u.add(a[m])}for(let c=0;c<n.length;c++){let m=n[c];u?.has(m)||(V(m),m.parentNode&&m.parentNode.removeChild(m))}let l=e;for(let c=0;c<a.length;c++){let m=a[c];l.nextSibling!==m&&s.insertBefore(m,l.nextSibling),l=m}n=a,Ye(i,a,"bindChildNode")}return K(r,e,!0)}function an(){throw new Error("[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first.")}function te(){typeof document>"u"&&an()}var H="http://www.w3.org/2000/svg",os=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var un=new Set,Mr=100,Or=!1,Pr=new Map;function Dr(e){let t=Pr.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Pr.set(e,t)),t}function is(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=K(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",ht(String(a),{element:e}));return}let u=e.style;i&&(e.removeAttribute("style"),i=!1);let l=[];for(let c in a){if(!Object.hasOwn(a,c))continue;let m=a[c];if(m==null)continue;let h=Dr(c);l.push(h),u.setProperty(h,bt(h,String(m),{element:e}))}for(let c=0;c<o.length;c++)l.indexOf(o[c])===-1&&u.removeProperty(o[c]);o=l},e);_(e,s);return}if(typeof t=="string"){e.setAttribute("style",ht(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=Dr(r);if(typeof o=="function"){let s=o,a=K(()=>{n.style.setProperty(i,bt(i,String(s()),{element:e}))},e);_(e,a)}else n.style.setProperty(i,bt(i,String(o),{element:e}))}}function ss(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=K(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);_(e,i);return}let n=t,r=!1,o="";for(let i in n){if(!Object.hasOwn(n,i))continue;let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=K(()=>{let a="";for(let u in n){if(!Object.hasOwn(n,u))continue;let l=n[u];(typeof l=="function"?l():l)&&(a=a?`${a} ${u}`:u)}e.setAttribute("class",a)},e);_(e,s)}else e.setAttribute("class",o)}function ln(e,t){if(typeof t=="string"){e.textContent=t;return}if(typeof t=="number"){e.textContent=String(t);return}if(!(typeof t=="boolean"||t==null)){if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),_(e,ve(n,t));return}if(t instanceof Node){e.appendChild(t);return}if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),_(e,ve(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),_(e,ve(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)))}}}function p(e,t){let n=er(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&an();let i=t?document.createElementNS(t,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),ln(i,o),i):(i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return ln(i,r),i;let s=r,a=s.class;a!=null&&ss(i,a);let u=s.id;typeof u=="function"?_(i,st(i,"id",u)):u!=null&&(!1,i.id=u);let l=o!==void 0?o:s.nodes;l!=null&&ln(i,l);let c=s.on;if(c)for(let g in c){if(!Object.hasOwn(c,g))continue;let d=c[g];typeof d=="function"?i.addEventListener(g,d):!1}let m=s.style;m!=null&&is(i,m);let h=s.ref;h&&(h.current=i);for(let g in s)switch(g){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,g))continue;let d=s[g];if(d==null||Te(g))continue;typeof d=="function"?_(i,st(i,g,d)):ue(i,g,d,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var ad=p("html"),as=p("head"),us=p("body"),ls=p("title"),P=p("div"),z=p("span"),cs=p("section"),ds=p("article"),fs=p("header"),ps=p("footer"),ms=p("nav"),gs=p("main"),bs=p("aside"),hs=p("address"),cn=p("p"),ys=p("h1"),vs=p("h2"),dn=p("h3"),Ss=p("h4"),xs=p("h5"),ws=p("h6"),Ts=p("blockquote"),Es=p("dd"),ks=p("dl"),_s=p("dt"),Cs=p("figcaption"),As=p("figure"),Ns=p("hr"),Rs=p("li"),Ls=p("ol"),Ms=p("ul"),fn=p("pre"),Os=p("a"),Ps=p("abbr"),Ds=p("b"),$s=p("bdi"),Hs=p("bdo"),Is=p("br"),Bs=p("cite"),pn=p("code"),Vs=p("data"),js=p("dfn"),Fs=p("em"),zs=p("i"),Ws=p("kbd"),qs=p("mark"),Us=p("q"),Ks=p("rp"),Gs=p("rt"),Js=p("ruby"),Ys=p("s"),Xs=p("samp"),Zs=p("small"),Qs=p("strong"),ea=p("sub"),ta=p("sup"),na=p("time"),ra=p("u"),oa=p("var"),ia=p("area"),sa=p("audio"),aa=p("img"),ua=p("map"),la=p("track"),ca=p("video"),da=p("embed"),fa=p("iframe"),pa=p("object"),ma=p("param"),ga=p("picture"),ba=p("portal"),ha=p("source"),ya=p("svg",H),va=p("math"),Sa=p("canvas"),xa=p("noscript"),wa=p("script"),Ta=p("del"),Ea=p("ins"),ka=p("caption"),_a=p("col"),Ca=p("colgroup"),Aa=p("table"),Na=p("tbody"),Ra=p("td"),La=p("tfoot"),Ma=p("th"),Oa=p("thead"),Pa=p("tr"),ut=p("button"),Da=p("datalist"),$a=p("fieldset"),Ha=p("form"),Ia=p("input"),Ba=p("label"),Va=p("legend"),ja=p("meter"),Fa=p("optgroup"),za=p("option"),Wa=p("output"),qa=p("progress"),Ua=p("select"),Ka=p("textarea"),Ga=p("details"),Ja=p("dialog"),Ya=p("menu"),Xa=p("summary"),Za=p("slot"),Qa=p("template"),eu=p("base"),tu=p("link"),nu=p("meta"),He=p("style"),ru=p("circle",H),ou=p("ellipse",H),iu=p("g",H),su=p("line",H),au=p("path",H),uu=p("polygon",H),lu=p("polyline",H),cu=p("rect",H),du=p("text",H),fu=p("tspan",H),pu=p("defs",H),mu=p("clipPath",H),gu=p("mask",H),bu=p("pattern",H),hu=p("linearGradient",H),yu=p("radialGradient",H),vu=p("stop",H),Su=p("use",H),xu=p("symbol",H),wu=p("marker",H),Tu=p("center"),Eu=p("font"),ku=p("marquee"),_u=e=>p(e);var mn="__sibuPendingError";function $r(e,t){let n=()=>e.parentNode?(L(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[mn]=t)})}function kt(e){let t=e,n=t[mn];if(n instanceof Error)return delete t[mn],n}function Hr(e){let t=null;return function(){if(t)return t();let r=P({class:"sibu-lazy"}),o=!1;return e().then(X(i=>{if(o)return;t=i.default;let s=t();ee(r,s)})).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));ee(r,P({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),$r(r,s)}),r.appendChild(z("sibu-lazy-loading","Loading...")),_(r,()=>{o=!0}),r}}function Ir({nodes:e,fallback:t}){let n=P({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null,s=null;_(n,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!n.contains(s)&&V(s)});let a=X(()=>{if(!o)try{let u=e();if(s=u,u.classList.contains("sibu-lazy")){if(!u.querySelector(".sibu-lazy-loading")){ee(n,u);return}i=new MutationObserver(()=>{if(o)return;u.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,ee(n,u))}),i.observe(u,{childList:!0,subtree:!0})}else ee(n,u)}catch(u){let l=u instanceof Error?u:new Error(String(u));$r(n,l)}});return queueMicrotask(a),n}function yn(e,t){return()=>Je()===e?t():Et(e,t)}function Ct(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";L(n,{phase:r,name:t});return}}function gn(e,t,n,r,o){let i=Ct(e,t);if(typeof i!="function")return;let s=yn(o,i);r()||!n.isConnected?Ct(s,"onUnmount"):Vr(s,n)}var Xe=new WeakMap,Ie=new WeakMap,Se=new Set,xe=new Set,Ze=null,_t=0,Cu=256;function bn(e){let t=Xe.get(e);if(t){Xe.delete(e),Se.delete(e);for(let n of t)try{n()}catch{}}}function hn(e){Ie.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Ie.get(e);if(n){Ie.delete(e),xe.delete(e);for(let r of n)try{r()}catch{}}})}function Au(e){if(Se.size===0||e.nodeType!==1)return;let t=e;if(Se.has(t)&&t.isConnected&&bn(t),t.firstElementChild)for(let n of Array.from(Se))n!==t&&n.isConnected&&t.contains(n)&&bn(n)}function Nu(e){if(xe.size===0||e.nodeType!==1)return;let t=e;if(xe.has(t)&&!t.isConnected&&hn(t),t.firstElementChild)for(let n of Array.from(xe))n!==t&&!n.isConnected&&t.contains(n)&&hn(n)}function Ru(){if(Se.size>0)for(let e of Array.from(Se))e.isConnected&&bn(e);if(xe.size>0)for(let e of Array.from(xe))e.isConnected||hn(e)}function Br(){Ze||typeof document>"u"||(Ze=new MutationObserver(e=>{for(let t of e)if(t.type==="childList"){if(t.addedNodes.length>0)for(let n=0;n<t.addedNodes.length;n++)Au(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)Nu(t.removedNodes[n])}_t+=e.length,_t>=Cu&&(_t=0,Ru()),vn()}),Ze.observe(document.body,{childList:!0,subtree:!0}))}function vn(){Ze&&Se.size===0&&xe.size===0&&(Ze.disconnect(),Ze=null,_t=0)}function Lu(e,t){let n=Xe.get(e);return n||(n=[],Xe.set(e,n)),n.push(t),Se.add(e),Br(),()=>{let r=Xe.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Xe.delete(e),Se.delete(e))}vn()}}function Mu(e,t){let n=Ie.get(e);return n||(n=[],Ie.set(e,n)),n.push(t),xe.add(e),Br(),()=>{let r=Ie.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Ie.delete(e),xe.delete(e))}vn()}}function At(e,t){if(typeof document>"u")return;let n=Je();if(e=yn(n,e),t){let r=!1,o=()=>r;if(_(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||gn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){gn(e,"onMount",t,o,n);return}let i=Lu(t,()=>{r||gn(e,"onMount",t,o,n)});_(t,i)})}else queueMicrotask(()=>{Ct(e,"onMount")})}function Ou(e,t){typeof document>"u"||Vr(yn(Je(),e),t)}function Vr(e,t){let n=!1,r=()=>{n||(n=!0,Ct(e,"onUnmount"))};_(t,r);let o=()=>{if(n)return;let i=Mu(t,r);_(t,i)};t.isConnected?o():At(()=>{o()},t)}function Pu(e,t){_(t,e)}function ae(e,t,n){try{e.emit(t,n)}catch{}}var Sn=Symbol.for("sibujs.ssr.v1");function Du(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let t=null,n=process.getBuiltinModule;typeof n=="function"?t=n("node:async_hooks"):typeof It=="function"&&(t=It("async_hooks")),t&&(e=new t.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var Ce=globalThis[Sn]??(globalThis[Sn]=Du()),Be=Ce.als,Z=Ce.fallbackStore;Ce.fallbackDepth??(Ce.fallbackDepth=0);var jr=!1;function $u(){if(jr||Be||!(typeof process<"u"&&!!process.versions?.node))return;jr=!0;let t=process.versions.node;`${t}`}function Ve(){if(Be){let e=Be.getStore();if(e)return e}return Z}function Fr(){return Be?Be.getStore()??null:Ce.fallbackDepth>0?Z:null}function de(){return Ve().ssr}function zr(e){if(!de())return null;let t=Ve(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}function Wr(){Ve().ssr=!0}function qr(){Ve().ssr=!1}function Ur(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0};if(Be)return Be.run(t,e);$u();let n=Z.ssr,r=Z.suspenseIdCounter,o=Z.idCounter,i=Z.locale;Z.ssr=!0,Z.suspenseIdCounter=0,Z.idCounter=0,Z.locale=void 0,Ce.fallbackDepth++;try{return e()}finally{Ce.fallbackDepth--,Z.ssr=n,Z.suspenseIdCounter=r,Z.idCounter=o,Z.locale=i}}function Kr(e){let t=Ve(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var Xr=globalThis;function Hu(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,ce(()=>t(o,void 0));else{let i=n;n=o,ce(()=>t(o,i))}}}var Gr=100;function Nt(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===Je()?Jr(t):Et(n,()=>Jr(t))}function Jr(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){L(n,{phase:"cleanup"})}}function Yr(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&Nt(e),_e(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=Gr);e.rerunPending&&(e.rerunPending=!1,L(new Error(`effect re-requested itself ${Gr}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function Iu(e){if(e.disposed)return;e.disposed=!0;let t=Xr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Nt(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{De(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function Q(e,t){if(de())return()=>{};let n={fn:e,onError:t?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};n.onCleanup=s=>{n.userCleanups.push(s)};let r=n.onError;n.bodyFn=r?()=>{try{n.fn(n.onCleanup)}catch(s){r(s)}}:()=>{n.fn(n.onCleanup)};let o=(()=>{if(!n.disposed){if(n.running){n.rerunPending=!0;return}n.running=!0;try{n.rerunPending=!1,n.userCleanups.length>0&&Nt(n),_e(n.bodyFn,o),n.rerunPending&&Yr(n)}finally{n.running=!1,n.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,n.subscriber=o,n.running=!0;try{_e(n.bodyFn,n.subscriber),n.rerunPending&&Yr(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&Nt(n),De(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=Xr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&ae(i,"effect:create",{effectFn:e}),()=>Iu(n)}var lt=0,xn=new Set;function Bu(e){lt++;try{return e()}finally{lt--,lt===0&&Fu()}}function Vu(e){return lt===0?!1:(xn.add(e),!0)}function ju(){return lt>0}function Fu(){try{for(let e of xn)Nr(e)}finally{xn.clear()}Ar()}var Zr=Symbol.for("sibujs.reactive.batch.v1");function zu(){let e=globalThis,t=e[Zr];if(t)return t;let n={batch:Bu,enqueueBatchedSignal:Vu,isBatching:ju};return e[Zr]=n,n}var wn=zu(),W=wn.batch,je=wn.enqueueBatchedSignal,Wu=wn.isBatching;var Tn=globalThis;function C(e,t){let n={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=void 0,o=t?.equals;r&&(n.__name=r);function i(){return Pe(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let u=n.value,l=typeof a=="function"?a(u):a;if(!o(u,l)){if(n.value=l,n.__v++,!1){let c=Tn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&ae(c,"signal:update",{signal:n,name:r,oldValue:u,newValue:l})}je(n)||Ge(n)}}:s=a=>{let u=n.value,l=typeof a=="function"?a(u):a;Object.is(l,u)||(n.value=l,n.__v++,je(n)||Ge(n))},!1){let a=Tn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&ae(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function qu(e){let[t,n]=C(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Uu=`
|
|
8
8
|
.sibu-error-display {
|
|
9
9
|
border: 1px solid var(--sibu-err-border, #e5484d);
|
|
10
10
|
border-radius: 10px;
|
package/dist/cdn.global.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
`||o==="\f"){n+=1;continue}if(o==="\r"){n+=e[n+2]===`
|
|
5
5
|
`?2:1;continue}if(Hn(o)){let i="",s=n+1;for(;s<e.length&&i.length<6&&Hn(e[s]);)i+=e[s],s++;s<e.length&&Qo(e[s])&&(s+=e[s]==="\r"&&e[s+1]===`
|
|
6
6
|
`?2:1);let a=Number.parseInt(i,16),c=a===0||a>1114111||a>=55296&&a<=57343;t+=c?"\uFFFD":String.fromCodePoint(a),n=s-1;continue}t+=o,n+=1}return t}var In=["url(","expression(","javascript:","vbscript:","-moz-binding","behavior:","@import","image-set(","filter:progid","image(","src("],ti=4,ni=5,ri=8;function oi(e){if(!e)return"an element";let t=e.tagName.toLowerCase(),n=e.getAttribute("id");n&&(t+=`#${n}`);let r=e.getAttribute("class");return r&&(t+=`.${r.trim().split(/\s+/).slice(0,3).join(".")}`),`<${t}>`}var Rt=new Set,Pn=100,$n=!1;function ot(e,t,n){}function Bn(e){return(e.includes("\\")?ei(e):e).toLowerCase().replace(/\s+/g,"")}function Lt(e){if(!Zo.test(e))return-1;let t=Bn(e);for(let n=0;n<In.length;n++)if(t.includes(In[n]))return n;return-1}function st(e,t,n){let r=Mt(e,t);return r===-1?t:(ot(t,r,{property:e,element:n?.element}),"")}function Mt(e,t){let n=Lt(t);if(n!==-1)return n;let r=U(e);return r==="behavior"?ni:r==="-moz-binding"?ti:(r==="filter"||r==="-ms-filter")&&Bn(t).includes("progid:")?ri:-1}function ii(e){let t=[],n="",r=0,o="";for(let s=0;s<e.length;s++){let a=e[s];if(o){n+=a,a==="\\"&&s+1<e.length?n+=e[++s]:a===o&&(o="");continue}if(a==="\\"){n+=a,s+1<e.length&&(n+=e[++s]);continue}if(a==="/"&&e[s+1]==="*"){let c=e.indexOf("*/",s+2);if(c===-1)return null;s=c+1;continue}if(a==='"'||a==="'")o=a;else if(a==="("||a==="[")r++;else if(a===")"||a==="]"){if(--r<0)return null}else{if(a==="{"||a==="}")return null;if(a===";"&&r===0){t.push(n),n="";continue}}n+=a}if(o||r!==0)return null;t.push(n);let i=[];for(let s of t){let a=s.indexOf(":");if(a===-1)continue;let c=s.slice(0,a).trim();if(!/^(--[\w-]+|-?[a-zA-Z_][\w-]*)$/.test(c))continue;let u=s.slice(a+1).trim(),l=/!\s*important\s*$/i.exec(u);if(l&&(u=u.slice(0,l.index).trim()),u==="")continue;let p=c.startsWith("--")?c:U(c);i.push([p,u,l!==null])}return i}function si(e,t){let n=String(e),r=ii(n);if(r===null)return Lt(n)!==-1&&ot(n,Lt(n),t),"";let o=[];for(let[i,s,a]of r){let c=Mt(i,s);if(c!==-1){ot(s,c,{property:i,element:t?.element});continue}o.push(`${i}: ${s}${a?" !important":""}`)}return o.join("; ")}function at(e,t){let n=String(e);if(n.trim()==="")return"";if(typeof document>"u")return si(n,t);let r=document.createElement("div");try{r.style.cssText=n}catch{return""}let o=[];for(let i=0;i<r.style.length;i++){let s=r.style[i],a=r.style.getPropertyValue(s),c=Mt(s,a);if(c!==-1){ot(a,c,{property:s,element:t?.element});continue}let u=r.style.getPropertyPriority(s);o.push(`${s}: ${a}${u?` !${u}`:""}`)}return o.join("; ")}var Ot=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),ai=new Set(["srcdoc"]);function Ke(e){return ai.has(e.toLowerCase())}function Fn(e){return Ot.has(e.toLowerCase())}function ci(e){let t=e.toLowerCase();return t==="style"||Ot.has(t)}function ui(e,t,n){let r=e.toLowerCase();return r==="srcset"?Xo(t):Ot.has(r)?it(t):r==="style"?at(t,n):t}function zn(e,t,n){if(!ci(e))return t;let r=ui(e,t,n);return r===""?null:r}function ve(e){return e===" "||e===" "||e===`
|
|
7
|
-
`||e==="\r"||e==="\f"}function ct(e){let t=0,n=e.length;for(;t<n&&ve(e[t]);)t++;for(;n>t&&ve(e[n-1]);)n--;return e.slice(t,n)}var K=e=>({kind:"forbidden",reason:e});function li(e){let t=ct(De(e));if(t==="")return K("");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return K("");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return K("");for(;n<t.length&&ve(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return K("");for(n++;n<t.length&&ve(t[n]);)n++;let o=n;for(;n<t.length&&!ve(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return K("");for(;n<t.length&&ve(t[n]);)n++;if(t[n]!=="=")return K("");for(n++;n<t.length&&ve(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let u=t.indexOf(a,n+1);if(u===-1)return K("");if(s=t.slice(n+1,u),ct(t.slice(u+1))!=="")return K("")}else if(s=ct(t.slice(n)),/[;,]/.test(s))return K("");if(s==="")return K("");let c=it(s);return c===""?K(""):{kind:"allowed",delay:r,destination:s,sanitizedDestination:c}}function Dt(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=U(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?K(""):typeof t!="string"?{kind:"not-refresh"}:ct(De(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:li(n)}var di="http://www.w3.org/1999/xhtml",fi="http://www.w3.org/2000/svg",pi=new Set(["script","iframe","object","embed","frame","frameset"]);function Wn(e){return U(e)}function jn(e){return pi.has(Wn(e))}var mi=new Set(["script","style"]);function qn(e){return mi.has(Wn(e))}var L={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},gi=new Set(["src","href","xlink:href","type","language"]),bi=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),Ht=new WeakSet;function Un(e){return e.namespaceURI===di||e.namespaceURI===null}function Kn(e,t,n){let r=new Map,o=e.attributes;for(let i=0;i<o.length;i++){let s=o[i];s.name!==t&&r.set(s.name,s.value)}return t!==null&&n!==null&&r.set(t,n),r}function hi(e){Ht.has(e)||(Ht.add(e),e.getAttribute("content")!==null&&Dt(Kn(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function yi(e,t,n,r){if(!Un(e))return L.None;let o=U(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&hi(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return L.None;let i=Dt(Kn(e,o,n));return i.kind==="forbidden"?L.MetaRefreshForbidden:i.kind!=="not-refresh"&&Ht.has(e)?L.MetaRefreshReactive:L.None}function Si(e,t){if(t===null||U(e)!=="attributename")return L.None;let n=De(t);return Fn(n)||pe(n)||Ke(n)?L.AnimationTarget:L.None}var ut=new WeakSet;function Vn(e){if(e===null)return!1;let t=U(e);if(!t.includes("stylesheet"))return!1;let n=t.split(/[\t\n\f\r ]+/);for(let r=0;r<n.length;r++)if(n[r]==="stylesheet")return!0;return!1}function vi(e,t,n,r){if(!Un(e))return L.None;let o=U(t);return o==="href"?r==="static"||n===null?L.None:Vn(e.getAttribute("rel"))?L.StylesheetSource:(ut.add(e),L.None):o==="rel"&&Vn(n)&&ut.has(e)&&e.hasAttribute("href")?L.StylesheetSource:L.None}function It(e,t,n,r){let o=e.localName;return o==="meta"?yi(e,t,n,r):o==="link"?vi(e,t,n,r):o==="script"?r==="static"||n===null?L.None:gi.has(U(t))?L.ScriptSource:L.None:bi.has(o)&&e.namespaceURI===fi?Si(t,n):L.None}function Pt(e,t,n){e.localName!=="link"||U(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?ut.add(e):ut.delete(e))}var xi="http://www.w3.org/1999/xhtml",Ei="http://www.w3.org/2000/svg",Ti="http://www.w3.org/1999/xlink",wi="http://www.w3.org/XML/1998/namespace",ki=new Set(["checked","disabled","selected"]);function _i(e){return e.namespaceURI===null||e.namespaceURI===xi}function Jn(e,t,n){}function Gn(e,t,n){e[t]=n}function Ai(e,t){if(e.namespaceURI!==Ei)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?Ti:n.startsWith("xml:")?wi:null}function X(e,t,n,r={}){let o=Ci(e,t,n,r);return e.localName==="link"&&Pt(e,t,r.reactive?"reactive":"runtime"),o}function Ci(e,t,n,r){let o=Ai(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(pe(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=It(e,t,s,r.reactive?"reactive":"runtime");if(a!==L.None)return Jn(r.label??"setSafeAttribute",t,a),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;if(n==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0;if(Ke(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let c=_i(e),u=c?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let m=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==m&&(o?e.setAttributeNS(o,t,m):e.setAttribute(t,m)),!0}return c&&ki.has(u)&&u in e?Gn(e,u,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let l=String(n);if(r.syncValueProperty!==!1&&c&&(u==="value"||u==="checked")&&u in e)return Gn(e,u,u==="checked"?!!n:l),!0;let p=l===""?"":zn(t,l,{element:e});return p===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===p||(o?e.setAttributeNS(o,t,p):e.setAttribute(t,p)),!0)}function $t(e,t,n){if(Ke(t))return!1,!1;let r=It(e,t,n,"static");return r!==L.None?(Jn("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Pt(e,t,"static"),!0)}var Ni=4096,Bt=[];function Ri(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function Li(e,t,n){let r=Bt.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=Ri();return o.sig=e,o.sub=t,o.epoch=n,o}function Yn(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Bt.length<Ni&&Bt.push(e)}function Mi(e,t){let n=e.subsHead??null;t.sigPrev=null,t.sigNext=n,n?n.sigPrev=t:e.subsTail=t,e.subsHead=t,e.__sc=(e.__sc??0)+1}function Xn(e){let t=e.sig;if(!t)return;let n=e.sigPrev,r=e.sigNext;n?n.sigNext=r:t.subsHead=r,r?r.sigPrev=n:t.subsTail=n,t.__sc=(t.__sc??1)-1,t.__activeNode===e&&(t.__activeNode=e.prevActive),t.__sc===0&&(t.subsHead=null,t.subsTail=null)}function Oi(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function Di(e){let t=e.sub;if(!t)return;let n=e.subPrev,r=e.subNext;n?n.subNext=r:t.depsHead=r,r?r.subPrev=n:t.depsTail=n}var Z=null,se=null,me=0,ge=[],$=new Set,Hi=[];function Ii(e){try{e()}catch(t){let n=e;k(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function Pi(e){let t=e.depsHead??null;if(t===null)return!0;for(;t!==null;){let n=t.sig;if(n===null)return!0;if(n._d===!0&&n._validate!==void 0)try{n._validate()}catch{return!0}if(t.depVersion!==n.__v)return!0;t=t.subNext}return!1}var oe=0,ae=!1;function zt(){oe===0&&(se=Z,Z=null,ae=!0),oe++}function Vt(){oe--,oe===0&&(Z=se,se=null,ae=!1)}function Zn(){return ae}function Qn(e){zt();try{return e()}finally{Vt()}}var G=null;function Wt(){return G}function pt(e,t){let n=G;G=e;try{return t()}finally{G=n}}function jt(e){let t=G;return t===null?e:(...n)=>pt(t,()=>e(...n))}var He=null,$i=0;function qt(e,t){let n=Z,r=0,o=null;ae&&(r=oe,o=se,oe=0,se=null,ae=!1),Z=t;let i=t;i._cap===void 0&&(i._cap=Rn());let s=G;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(G=a);let c=He;c!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=c),i._tok!=null&&(He=i._tok);let u=++$i;i._epoch=u,i._structDirty=!1;for(let l=i.depsHead??null;l!==null;l=l.subNext){let p=l.sig;l.prevActive=p.__activeNode??null,p.__activeNode=l}try{e()}finally{Z=n,G=s,He=c,r!==0&&(oe=r,se=o,ae=!0);let l=i.depsHead??null;for(;l!==null;){let p=l.subNext,g=l.sig;g.__activeNode=l.prevActive,l.prevActive=null,l.epoch!==u&&(Di(l),Xn(l),Yn(l)),l=p}}}function er(e,t){if(!t)return Ut(e);Ie(t);let n=Z,r=0,o=null;ae&&(r=oe,o=se,oe=0,se=null,ae=!1),Z=t;let i=t;i._scope===void 0&&(i._scope=G);let s=G;G=i._scope;try{e()}finally{Z=n,G=s,r!==0&&(oe=r,se=o,ae=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let c=a.sig;c.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Ie(t))}function Ut(e,t,n){return nr(e,t,n===!0)._dispose}function tr(e,t){let n=nr(e,t,!0);return{stop:n._dispose,run:r=>{let o=He;He=n._tok??null;try{return r()}finally{He=o}}}}function nr(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{qt(e,o)}finally{i._reentrant=!1}}},o=r;o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._runEpoch=0,o._runs=0,o._reentrant=!1,o._disposed=!1,o._errorPhase="binding",o._errorNode=t,o._tok=null,o._owner=null,n&&(o._tok={sub:o});try{r()}catch(i){throw o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Ie(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Ie(o)},o}function rr(e){if(!Z)return;let t=Z,n=e,r=t._epoch??0,o=n.__activeNode??null;if(o!==null&&o.sub===t){o.epoch=r,o.depVersion=n.__v??Number.NaN;return}n._validate!==void 0&&(t._hasComputedDep=!0);let i=Li(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,Oi(t,i),Mi(n,i),t._structDirty=!0}function Ie(e){let t=e;t._owner!=null&&(t._owner=null);let n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;Xn(n),Yn(n),n=r}}var lt=1e3,dt=1e6,ft=0,xe=new Set;function or(e){let t=lt;return Number.isFinite(e)&&e>0&&(lt=Math.floor(e)),t}function ir(e){let t=dt;return Number.isFinite(e)&&e>0&&(dt=Math.floor(e)),t}function Bi(e){let t=e;return t._runEpoch!==ft?(t._runEpoch=ft,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>lt)}function Fi(e){let t=e.__name??"<unnamed>";k(new Error(`subscriber "${t}" fired more than ${lt} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:t})}function zi(){k(new Error(`Notification drain exceeded ${dt} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function sr(){let e=0;for(;e<ge.length;){if(e>=dt){zi();break}let t=ge[e++];$.delete(t)&&(t._owner!=null&&$.size>0&&(Vi(t),$.has(t))||ar(t))}}function Vi(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;$.has(r)&&(t=r),n=r._owner??null}if(t===null)return;$.delete(t),ar(t)}}function ar(e){if(xe.size>0&&xe.has(e)||e._hasComputedDep===!0&&!Pi(e))return;if(Bi(e)){Fi(e),xe.add(e);return}let t=Ln(e._cap??null);try{Ii(e)}finally{t&&Mn()}}function cr(){if(!(me>0)){me++,ft++;try{sr()}finally{me--,me===0&&(ge.length=0,$.clear(),xe.size>0&&xe.clear())}}}function Ft(e){e();let t=e._sig;if(!t)return;let n=Hi,r=n.length;for(n.push(t);n.length>r;){let i=n.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?(!a._d||a._f===!0)&&(a._d=!0,a._f=!1,n.push(a)):s()}else $.has(s)||($.add(s),ge.push(s));i=i.sigNext}}}function ur(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?Ft(r):$.has(r)||($.add(r),ge.push(r))),n=n.sigNext}}function lr(e){let n=e.subsHead;if(n){if(me>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?Ft(o):$.has(o)||($.add(o),ge.push(o))),r=r.sigNext}return}me++,ft++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?Ft(o):$.has(o)||($.add(o),ge.push(o))),r=r.sigNext}sr()}finally{me--,me===0&&(ge.length=0,$.clear(),xe.size>0&&xe.clear())}}}function dr(e){return e.__sc??0}function fr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function pr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var mr="4.13.0",gr=Symbol.for("sibujs.reactive.v1");function ji(){let e=globalThis,t=e[gr];if(t)return!1,t;let n={suspendTracking:zt,resumeTracking:Vt,isTrackingSuspended:Zn,untracked:Qn,retrack:qt,track:er,reactiveBinding:Ut,recordDependency:rr,cleanup:Ie,setMaxSubscriberRepeats:or,setMaxDrainIterations:ir,drainNotificationQueue:cr,queueSignalNotification:ur,notifySubscribers:lr,getSubscriberCount:dr,getSubscriberDeps:fr,forEachSubscriber:pr,getOwnerScope:Wt,runWithOwnerScope:pt,bindOwnerScope:jt,structuralBinding:tr,version:mr};return e[gr]=n,n}var O=ji(),Ee=O.suspendTracking,Te=O.resumeTracking,br=O.isTrackingSuspended,Q=O.untracked,be=O.retrack,Pe=O.track,I=O.reactiveBinding,we=O.recordDependency,ke=O.cleanup,il=O.setMaxSubscriberRepeats,hr=O.setMaxDrainIterations,yr=O.drainNotificationQueue,Sr=O.queueSignalNotification,$e=O.notifySubscribers,sl=O.getSubscriberCount,al=O.getSubscriberDeps,cl=O.forEachSubscriber,Be=O.getOwnerScope??Wt,mt=O.runWithOwnerScope??pt,F=O.bindOwnerScope??jt,_e=O.structuralBinding??((e,t)=>({stop:O.reactiveBinding(e,t),run:n=>n()}));function Ge(e,t,n){if(pe(t))return X(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){k(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}X(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return I(r,e)}function vr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(c){k(c,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(c){k(c,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),X(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=I(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var Kt=["data-focus-key","id","name"],qi=new Set(["text","search","url","tel","password",""]);function Ui(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&qi.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function Je(e){if(e.length===0||typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body)return null;let n=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===t||s.nodeType===1&&s.contains(t)){n=!0;break}}if(!n)return null;let r=null,o=null;for(let i=0;i<Kt.length;i++){let s=t.getAttribute(Kt[i]);if(s){r=Kt[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...Ui(t)}}function Ki(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Gi(e,t){let n=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(t)&&(r++,n??(n=s));let a=s.querySelectorAll(t);for(let c=0;c<a.length;c++)r++,n??(n=a[c]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function xr(e,t){if(e.focus(),t.start!==null&&typeof e.setSelectionRange=="function"){let n=e,r=n.value.length,o=Math.min(t.start,r),i=Math.min(t.end??o,r);n.setSelectionRange(o,i,t.direction??"none")}}function Fe(e,t,n,r){if(!e||typeof document>"u"||r==="discard")return;let o=document.activeElement;if(o===e.el||o&&o!==document.body&&o!==document.documentElement)return;if(e.el.isConnected){xr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=Gi(t,`[${e.attr}=${Ki(e.value)}]`);if(s&&s.tagName===e.tag){xr(s,e);return}i=a>1}if(r!==void 0&&typeof r=="object"){let s=typeof r.restoreTo=="function"?r.restoreTo():r.restoreTo;if(s?.isConnected&&(s.focus(),document.activeElement===s))return}}function ce(e,t){let n=[];function r(){let o;try{o=t()}catch(l){k(l,{phase:"binding",name:"bindChildNode",node:e});return}let i=Je(n);if(o==null||typeof o=="boolean"){for(let l=0;l<n.length;l++){let p=n[l];M(p),p.parentNode&&p.parentNode.removeChild(p)}n.length=0,Fe(i,n,"bindChildNode");return}let s=e.parentNode;if(!s){n.length=0;return}let a;if(Array.isArray(o)){a=[];let l=new Set;for(let p=0;p<o.length;p++){let g=o[p];if(g==null||typeof g=="boolean")continue;let m=g instanceof Node?g:document.createTextNode(String(g));if(l.has(m)){!1;continue}l.add(m),a.push(m)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let c;if(n.length>0&&a.length>0){let l=new Set(n);c=new Set;for(let p=0;p<a.length;p++)l.has(a[p])&&c.add(a[p])}for(let l=0;l<n.length;l++){let p=n[l];c?.has(p)||(M(p),p.parentNode&&p.parentNode.removeChild(p))}let u=e;for(let l=0;l<a.length;l++){let p=a[l];u.nextSibling!==p&&s.insertBefore(p,u.nextSibling),u=p}n=a,Fe(i,a,"bindChildNode")}return I(r,e,!0)}function Gt(){throw new Error("[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first.")}function W(){typeof document>"u"&&Gt()}var R="http://www.w3.org/2000/svg",Ji=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var Jt=new Set,Er=100,Tr=!1,wr=new Map;function kr(e){let t=wr.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),wr.set(e,t)),t}function Yi(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=I(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",at(String(a),{element:e}));return}let c=e.style;i&&(e.removeAttribute("style"),i=!1);let u=[];for(let l in a){if(!Object.hasOwn(a,l))continue;let p=a[l];if(p==null)continue;let g=kr(l);u.push(g),c.setProperty(g,st(g,String(p),{element:e}))}for(let l=0;l<o.length;l++)u.indexOf(o[l])===-1&&c.removeProperty(o[l]);o=u},e);x(e,s);return}if(typeof t=="string"){e.setAttribute("style",at(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=kr(r);if(typeof o=="function"){let s=o,a=I(()=>{n.style.setProperty(i,st(i,String(s()),{element:e}))},e);x(e,a)}else n.style.setProperty(i,st(i,String(o),{element:e}))}}function Xi(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=I(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);x(e,i);return}let n=t,r=!1,o="";for(let i in n){if(!Object.hasOwn(n,i))continue;let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=I(()=>{let a="";for(let c in n){if(!Object.hasOwn(n,c))continue;let u=n[c];(typeof u=="function"?u():u)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)},e);x(e,s)}else e.setAttribute("class",o)}function Yt(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),x(e,ce(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),x(e,ce(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),x(e,ce(s,i))}else i instanceof Node?e.appendChild(i):i!=null&&typeof i!="boolean"&&e.appendChild(document.createTextNode(String(i)))}else r!=null&&typeof r!="boolean"&&e.appendChild(document.createTextNode(String(r)))}}}function d(e,t){let n=jn(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&Gt();let i=t?document.createElementNS(t,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),Yt(i,o),i):(i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return Yt(i,r),i;let s=r,a=s.class;a!=null&&Xi(i,a);let c=s.id;typeof c=="function"?x(i,Ge(i,"id",c)):c!=null&&(!1,i.id=c);let u=o!==void 0?o:s.nodes;u!=null&&Yt(i,u);let l=s.on;if(l)for(let m in l){if(!Object.hasOwn(l,m))continue;let f=l[m];typeof f=="function"?i.addEventListener(m,f):!1}let p=s.style;p!=null&&Yi(i,p);let g=s.ref;g&&(g.current=i);for(let m in s)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,m))continue;let f=s[m];if(f==null||pe(m))continue;typeof f=="function"?x(i,Ge(i,m,f)):X(i,m,f,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var Ml=d("html"),Zi=d("head"),Qi=d("body"),es=d("title"),A=d("div"),H=d("span"),ts=d("section"),ns=d("article"),rs=d("header"),os=d("footer"),is=d("nav"),ss=d("main"),as=d("aside"),cs=d("address"),Xt=d("p"),us=d("h1"),ls=d("h2"),Zt=d("h3"),ds=d("h4"),fs=d("h5"),ps=d("h6"),ms=d("blockquote"),gs=d("dd"),bs=d("dl"),hs=d("dt"),ys=d("figcaption"),Ss=d("figure"),vs=d("hr"),xs=d("li"),Es=d("ol"),Ts=d("ul"),Qt=d("pre"),ws=d("a"),ks=d("abbr"),_s=d("b"),As=d("bdi"),Cs=d("bdo"),Ns=d("br"),Rs=d("cite"),en=d("code"),Ls=d("data"),Ms=d("dfn"),Os=d("em"),Ds=d("i"),Hs=d("kbd"),Is=d("mark"),Ps=d("q"),$s=d("rp"),Bs=d("rt"),Fs=d("ruby"),zs=d("s"),Vs=d("samp"),Ws=d("small"),js=d("strong"),qs=d("sub"),Us=d("sup"),Ks=d("time"),Gs=d("u"),Js=d("var"),Ys=d("area"),Xs=d("audio"),Zs=d("img"),Qs=d("map"),ea=d("track"),ta=d("video"),na=d("embed"),ra=d("iframe"),oa=d("object"),ia=d("param"),sa=d("picture"),aa=d("portal"),ca=d("source"),ua=d("svg",R),la=d("math"),da=d("canvas"),fa=d("noscript"),pa=d("script"),ma=d("del"),ga=d("ins"),ba=d("caption"),ha=d("col"),ya=d("colgroup"),Sa=d("table"),va=d("tbody"),xa=d("td"),Ea=d("tfoot"),Ta=d("th"),wa=d("thead"),ka=d("tr"),Ye=d("button"),_a=d("datalist"),Aa=d("fieldset"),Ca=d("form"),Na=d("input"),Ra=d("label"),La=d("legend"),Ma=d("meter"),Oa=d("optgroup"),Da=d("option"),Ha=d("output"),Ia=d("progress"),Pa=d("select"),$a=d("textarea"),Ba=d("details"),Fa=d("dialog"),za=d("menu"),Va=d("summary"),Wa=d("slot"),ja=d("template"),qa=d("base"),Ua=d("link"),Ka=d("meta"),Ae=d("style"),Ga=d("circle",R),Ja=d("ellipse",R),Ya=d("g",R),Xa=d("line",R),Za=d("path",R),Qa=d("polygon",R),ec=d("polyline",R),tc=d("rect",R),nc=d("text",R),rc=d("tspan",R),oc=d("defs",R),ic=d("clipPath",R),sc=d("mask",R),ac=d("pattern",R),cc=d("linearGradient",R),uc=d("radialGradient",R),lc=d("stop",R),dc=d("use",R),fc=d("symbol",R),pc=d("marker",R),mc=d("center"),gc=d("font"),bc=d("marquee"),hc=e=>d(e);var tn="__sibuPendingError";function _r(e,t){let n=()=>e.parentNode?(k(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[tn]=t)})}function gt(e){let t=e,n=t[tn];if(n instanceof Error)return delete t[tn],n}function Ar(e){let t=null;return function(){if(t)return t();let r=A({class:"sibu-lazy"}),o=!1;return e().then(F(i=>{if(o)return;t=i.default;let s=t();V(r,s)})).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));V(r,A({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),_r(r,s)}),r.appendChild(H("sibu-lazy-loading","Loading...")),x(r,()=>{o=!0}),r}}function Cr({nodes:e,fallback:t}){let n=A({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null,s=null;x(n,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!n.contains(s)&&M(s)});let a=F(()=>{if(!o)try{let c=e();if(s=c,c.classList.contains("sibu-lazy")){if(!c.querySelector(".sibu-lazy-loading")){V(n,c);return}i=new MutationObserver(()=>{if(o)return;c.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,V(n,c))}),i.observe(c,{childList:!0,subtree:!0})}else V(n,c)}catch(c){let u=c instanceof Error?c:new Error(String(c));_r(n,u)}});return queueMicrotask(a),n}function sn(e,t){return()=>Be()===e?t():mt(e,t)}function ht(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";k(n,{phase:r,name:t});return}}function nn(e,t,n,r,o){let i=ht(e,t);if(typeof i!="function")return;let s=sn(o,i);r()||!n.isConnected?ht(s,"onUnmount"):Rr(s,n)}var ze=new WeakMap,Ce=new WeakMap,ue=new Set,le=new Set,Ve=null,bt=0,yc=256;function rn(e){let t=ze.get(e);if(t){ze.delete(e),ue.delete(e);for(let n of t)try{n()}catch{}}}function on(e){Ce.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Ce.get(e);if(n){Ce.delete(e),le.delete(e);for(let r of n)try{r()}catch{}}})}function Sc(e){if(ue.size===0||e.nodeType!==1)return;let t=e;if(ue.has(t)&&t.isConnected&&rn(t),t.firstElementChild)for(let n of Array.from(ue))n!==t&&n.isConnected&&t.contains(n)&&rn(n)}function vc(e){if(le.size===0||e.nodeType!==1)return;let t=e;if(le.has(t)&&!t.isConnected&&on(t),t.firstElementChild)for(let n of Array.from(le))n!==t&&!n.isConnected&&t.contains(n)&&on(n)}function xc(){if(ue.size>0)for(let e of Array.from(ue))e.isConnected&&rn(e);if(le.size>0)for(let e of Array.from(le))e.isConnected||on(e)}function Nr(){Ve||typeof document>"u"||(Ve=new MutationObserver(e=>{for(let t of e)if(t.type==="childList"){if(t.addedNodes.length>0)for(let n=0;n<t.addedNodes.length;n++)Sc(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)vc(t.removedNodes[n])}bt+=e.length,bt>=yc&&(bt=0,xc()),an()}),Ve.observe(document.body,{childList:!0,subtree:!0}))}function an(){Ve&&ue.size===0&&le.size===0&&(Ve.disconnect(),Ve=null,bt=0)}function Ec(e,t){let n=ze.get(e);return n||(n=[],ze.set(e,n)),n.push(t),ue.add(e),Nr(),()=>{let r=ze.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(ze.delete(e),ue.delete(e))}an()}}function Tc(e,t){let n=Ce.get(e);return n||(n=[],Ce.set(e,n)),n.push(t),le.add(e),Nr(),()=>{let r=Ce.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Ce.delete(e),le.delete(e))}an()}}function yt(e,t){if(typeof document>"u")return;let n=Be();if(e=sn(n,e),t){let r=!1,o=()=>r;if(x(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||nn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){nn(e,"onMount",t,o,n);return}let i=Ec(t,()=>{r||nn(e,"onMount",t,o,n)});x(t,i)})}else queueMicrotask(()=>{ht(e,"onMount")})}function wc(e,t){typeof document>"u"||Rr(sn(Be(),e),t)}function Rr(e,t){let n=!1,r=()=>{n||(n=!0,ht(e,"onUnmount"))};x(t,r);let o=()=>{if(n)return;let i=Tc(t,r);x(t,i)};t.isConnected?o():yt(()=>{o()},t)}function kc(e,t){x(t,e)}function J(e,t,n){try{e.emit(t,n)}catch{}}var cn=Symbol.for("sibujs.ssr.v1");function _c(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let t=null,n=process.getBuiltinModule;typeof n=="function"?t=n("node:async_hooks"):typeof _t=="function"&&(t=_t("async_hooks")),t&&(e=new t.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var he=globalThis[cn]??(globalThis[cn]=_c()),Ne=he.als,z=he.fallbackStore;he.fallbackDepth??(he.fallbackDepth=0);var Lr=!1;function Ac(){if(Lr||Ne||!(typeof process<"u"&&!!process.versions?.node))return;Lr=!0;let t=process.versions.node;`${t}`}function Re(){if(Ne){let e=Ne.getStore();if(e)return e}return z}function Mr(){return Ne?Ne.getStore()??null:he.fallbackDepth>0?z:null}function ee(){return Re().ssr}function Or(e){if(!ee())return null;let t=Re(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}function Dr(){Re().ssr=!0}function Hr(){Re().ssr=!1}function Ir(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0};if(Ne)return Ne.run(t,e);Ac();let n=z.ssr,r=z.suspenseIdCounter,o=z.idCounter,i=z.locale;z.ssr=!0,z.suspenseIdCounter=0,z.idCounter=0,z.locale=void 0,he.fallbackDepth++;try{return e()}finally{he.fallbackDepth--,z.ssr=n,z.suspenseIdCounter=r,z.idCounter=o,z.locale=i}}function Pr(e){let t=Re(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var zr=globalThis;function Cc(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))}}}var $r=100;function St(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===Be()?Br(t):mt(n,()=>Br(t))}function Br(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){k(n,{phase:"cleanup"})}}function Fr(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&St(e),be(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=$r);e.rerunPending&&(e.rerunPending=!1,k(new Error(`effect re-requested itself ${$r}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function Nc(e){if(e.disposed)return;e.disposed=!0;let t=zr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&St(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{ke(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function Y(e,t){if(ee())return()=>{};let n={fn:e,onError:t?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};n.onCleanup=s=>{n.userCleanups.push(s)};let r=n.onError;n.bodyFn=r?()=>{try{n.fn(n.onCleanup)}catch(s){r(s)}}:()=>{n.fn(n.onCleanup)};let o=(()=>{if(!n.disposed){if(n.running){n.rerunPending=!0;return}n.running=!0;try{n.rerunPending=!1,n.userCleanups.length>0&&St(n),be(n.bodyFn,o),n.rerunPending&&Fr(n)}finally{n.running=!1,n.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,n.subscriber=o,n.running=!0;try{be(n.bodyFn,n.subscriber),n.rerunPending&&Fr(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&St(n),ke(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=zr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&J(i,"effect:create",{effectFn:e}),()=>Nc(n)}var Xe=0,un=new Set;function Rc(e){Xe++;try{return e()}finally{Xe--,Xe===0&&Oc()}}function Lc(e){return Xe===0?!1:(un.add(e),!0)}function Mc(){return Xe>0}function Oc(){try{for(let e of un)Sr(e)}finally{un.clear()}yr()}var Vr=Symbol.for("sibujs.reactive.batch.v1");function Dc(){let e=globalThis,t=e[Vr];if(t)return t;let n={batch:Rc,enqueueBatchedSignal:Lc,isBatching:Mc};return e[Vr]=n,n}var ln=Dc(),j=ln.batch,Le=ln.enqueueBatchedSignal,Hc=ln.isBatching;var dn=globalThis;function C(e,t){let n={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=void 0,o=t?.equals;r&&(n.__name=r);function i(){return we(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(!o(c,u)){if(n.value=u,n.__v++,!1){let l=dn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;l&&J(l,"signal:update",{signal:n,name:r,oldValue:c,newValue:u})}Le(n)||$e(n)}}:s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;Object.is(u,c)||(n.value=u,n.__v++,Le(n)||$e(n))},!1){let a=dn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&J(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function Ic(e){let[t,n]=C(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Pc=`
|
|
7
|
+
`||e==="\r"||e==="\f"}function ct(e){let t=0,n=e.length;for(;t<n&&ve(e[t]);)t++;for(;n>t&&ve(e[n-1]);)n--;return e.slice(t,n)}var K=e=>({kind:"forbidden",reason:e});function li(e){let t=ct(De(e));if(t==="")return K("");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return K("");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return K("");for(;n<t.length&&ve(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return K("");for(n++;n<t.length&&ve(t[n]);)n++;let o=n;for(;n<t.length&&!ve(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return K("");for(;n<t.length&&ve(t[n]);)n++;if(t[n]!=="=")return K("");for(n++;n<t.length&&ve(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let u=t.indexOf(a,n+1);if(u===-1)return K("");if(s=t.slice(n+1,u),ct(t.slice(u+1))!=="")return K("")}else if(s=ct(t.slice(n)),/[;,]/.test(s))return K("");if(s==="")return K("");let c=it(s);return c===""?K(""):{kind:"allowed",delay:r,destination:s,sanitizedDestination:c}}function Dt(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=U(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?K(""):typeof t!="string"?{kind:"not-refresh"}:ct(De(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:li(n)}var di="http://www.w3.org/1999/xhtml",fi="http://www.w3.org/2000/svg",pi=new Set(["script","iframe","object","embed","frame","frameset"]);function Wn(e){return U(e)}function jn(e){return pi.has(Wn(e))}var mi=new Set(["script","style"]);function qn(e){return mi.has(Wn(e))}var L={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},gi=new Set(["src","href","xlink:href","type","language"]),bi=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),Ht=new WeakSet;function Un(e){return e.namespaceURI===di||e.namespaceURI===null}function Kn(e,t,n){let r=new Map,o=e.attributes;for(let i=0;i<o.length;i++){let s=o[i];s.name!==t&&r.set(s.name,s.value)}return t!==null&&n!==null&&r.set(t,n),r}function hi(e){Ht.has(e)||(Ht.add(e),e.getAttribute("content")!==null&&Dt(Kn(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function yi(e,t,n,r){if(!Un(e))return L.None;let o=U(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&hi(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return L.None;let i=Dt(Kn(e,o,n));return i.kind==="forbidden"?L.MetaRefreshForbidden:i.kind!=="not-refresh"&&Ht.has(e)?L.MetaRefreshReactive:L.None}function Si(e,t){if(t===null||U(e)!=="attributename")return L.None;let n=De(t);return Fn(n)||pe(n)||Ke(n)?L.AnimationTarget:L.None}var ut=new WeakSet;function Vn(e){if(e===null)return!1;let t=U(e);if(!t.includes("stylesheet"))return!1;let n=t.split(/[\t\n\f\r ]+/);for(let r=0;r<n.length;r++)if(n[r]==="stylesheet")return!0;return!1}function vi(e,t,n,r){if(!Un(e))return L.None;let o=U(t);return o==="href"?r==="static"||n===null?L.None:Vn(e.getAttribute("rel"))?L.StylesheetSource:(ut.add(e),L.None):o==="rel"&&Vn(n)&&ut.has(e)&&e.hasAttribute("href")?L.StylesheetSource:L.None}function It(e,t,n,r){let o=e.localName;return o==="meta"?yi(e,t,n,r):o==="link"?vi(e,t,n,r):o==="script"?r==="static"||n===null?L.None:gi.has(U(t))?L.ScriptSource:L.None:bi.has(o)&&e.namespaceURI===fi?Si(t,n):L.None}function Pt(e,t,n){e.localName!=="link"||U(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?ut.add(e):ut.delete(e))}var xi="http://www.w3.org/1999/xhtml",Ei="http://www.w3.org/2000/svg",Ti="http://www.w3.org/1999/xlink",wi="http://www.w3.org/XML/1998/namespace",ki=new Set(["checked","disabled","selected"]);function _i(e){return e.namespaceURI===null||e.namespaceURI===xi}function Jn(e,t,n){}function Gn(e,t,n){e[t]=n}function Ai(e,t){if(e.namespaceURI!==Ei)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?Ti:n.startsWith("xml:")?wi:null}function X(e,t,n,r={}){let o=Ci(e,t,n,r);return e.localName==="link"&&Pt(e,t,r.reactive?"reactive":"runtime"),o}function Ci(e,t,n,r){let o=Ai(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(pe(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=It(e,t,s,r.reactive?"reactive":"runtime");if(a!==L.None)return Jn(r.label??"setSafeAttribute",t,a),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;if(n==null)return o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0;if(Ke(t))return!1,o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let c=_i(e),u=c?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let m=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==m&&(o?e.setAttributeNS(o,t,m):e.setAttribute(t,m)),!0}return c&&ki.has(u)&&u in e?Gn(e,u,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let l=String(n);if(r.syncValueProperty!==!1&&c&&(u==="value"||u==="checked")&&u in e)return Gn(e,u,u==="checked"?!!n:l),!0;let p=l===""?"":zn(t,l,{element:e});return p===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===p||(o?e.setAttributeNS(o,t,p):e.setAttribute(t,p)),!0)}function $t(e,t,n){if(Ke(t))return!1,!1;let r=It(e,t,n,"static");return r!==L.None?(Jn("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Pt(e,t,"static"),!0)}var Ni=4096,Bt=[];function Ri(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function Li(e,t,n){let r=Bt.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=Ri();return o.sig=e,o.sub=t,o.epoch=n,o}function Yn(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Bt.length<Ni&&Bt.push(e)}function Mi(e,t){let n=e.subsHead??null;t.sigPrev=null,t.sigNext=n,n?n.sigPrev=t:e.subsTail=t,e.subsHead=t,e.__sc=(e.__sc??0)+1}function Xn(e){let t=e.sig;if(!t)return;let n=e.sigPrev,r=e.sigNext;n?n.sigNext=r:t.subsHead=r,r?r.sigPrev=n:t.subsTail=n,t.__sc=(t.__sc??1)-1,t.__activeNode===e&&(t.__activeNode=e.prevActive),t.__sc===0&&(t.subsHead=null,t.subsTail=null)}function Oi(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function Di(e){let t=e.sub;if(!t)return;let n=e.subPrev,r=e.subNext;n?n.subNext=r:t.depsHead=r,r?r.subPrev=n:t.depsTail=n}var Z=null,se=null,me=0,ge=[],$=new Set,Hi=[];function Ii(e){try{e()}catch(t){let n=e;k(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function Pi(e){let t=e.depsHead??null;if(t===null)return!0;for(;t!==null;){let n=t.sig;if(n===null)return!0;if(n._d===!0&&n._validate!==void 0)try{n._validate()}catch{return!0}if(t.depVersion!==n.__v)return!0;t=t.subNext}return!1}var oe=0,ae=!1;function zt(){oe===0&&(se=Z,Z=null,ae=!0),oe++}function Vt(){oe--,oe===0&&(Z=se,se=null,ae=!1)}function Zn(){return ae}function Qn(e){zt();try{return e()}finally{Vt()}}var G=null;function Wt(){return G}function pt(e,t){let n=G;G=e;try{return t()}finally{G=n}}function jt(e){let t=G;return t===null?e:(...n)=>pt(t,()=>e(...n))}var He=null,$i=0;function qt(e,t){let n=Z,r=0,o=null;ae&&(r=oe,o=se,oe=0,se=null,ae=!1),Z=t;let i=t;i._cap===void 0&&(i._cap=Rn());let s=G;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(G=a);let c=He;c!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=c),i._tok!=null&&(He=i._tok);let u=++$i;i._epoch=u,i._structDirty=!1;for(let l=i.depsHead??null;l!==null;l=l.subNext){let p=l.sig;l.prevActive=p.__activeNode??null,p.__activeNode=l}try{e()}finally{Z=n,G=s,He=c,r!==0&&(oe=r,se=o,ae=!0);let l=i.depsHead??null;for(;l!==null;){let p=l.subNext,g=l.sig;g.__activeNode=l.prevActive,l.prevActive=null,l.epoch!==u&&(Di(l),Xn(l),Yn(l)),l=p}}}function er(e,t){if(!t)return Ut(e);Ie(t);let n=Z,r=0,o=null;ae&&(r=oe,o=se,oe=0,se=null,ae=!1),Z=t;let i=t;i._scope===void 0&&(i._scope=G);let s=G;G=i._scope;try{e()}finally{Z=n,G=s,r!==0&&(oe=r,se=o,ae=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let c=a.sig;c.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>Ie(t))}function Ut(e,t,n){return nr(e,t,n===!0)._dispose}function tr(e,t){let n=nr(e,t,!0);return{stop:n._dispose,run:r=>{let o=He;He=n._tok??null;try{return r()}finally{He=o}}}}function nr(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{qt(e,o)}finally{i._reentrant=!1}}},o=r;o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._runEpoch=0,o._runs=0,o._reentrant=!1,o._disposed=!1,o._errorPhase="binding",o._errorNode=t,o._tok=null,o._owner=null,n&&(o._tok={sub:o});try{r()}catch(i){throw o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Ie(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),Ie(o)},o}function rr(e){if(!Z)return;let t=Z,n=e,r=t._epoch??0,o=n.__activeNode??null;if(o!==null&&o.sub===t){o.epoch=r,o.depVersion=n.__v??Number.NaN;return}n._validate!==void 0&&(t._hasComputedDep=!0);let i=Li(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,Oi(t,i),Mi(n,i),t._structDirty=!0}function Ie(e){let t=e;t._owner!=null&&(t._owner=null);let n=t.depsHead??null;for(t.depsHead=null,t.depsTail=null;n;){let r=n.subNext;Xn(n),Yn(n),n=r}}var lt=1e3,dt=1e6,ft=0,xe=new Set;function or(e){let t=lt;return Number.isFinite(e)&&e>0&&(lt=Math.floor(e)),t}function ir(e){let t=dt;return Number.isFinite(e)&&e>0&&(dt=Math.floor(e)),t}function Bi(e){let t=e;return t._runEpoch!==ft?(t._runEpoch=ft,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>lt)}function Fi(e){let t=e.__name??"<unnamed>";k(new Error(`subscriber "${t}" fired more than ${lt} times \u2014 likely a write-reads-self cycle between effects/signals. This subscriber is quarantined for the rest of this update; other pending work still runs.`),{phase:"scheduler",name:t})}function zi(){k(new Error(`Notification drain exceeded ${dt} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function sr(){let e=0;for(;e<ge.length;){if(e>=dt){zi();break}let t=ge[e++];$.delete(t)&&(t._owner!=null&&$.size>0&&(Vi(t),$.has(t))||ar(t))}}function Vi(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;$.has(r)&&(t=r),n=r._owner??null}if(t===null)return;$.delete(t),ar(t)}}function ar(e){if(xe.size>0&&xe.has(e)||e._hasComputedDep===!0&&!Pi(e))return;if(Bi(e)){Fi(e),xe.add(e);return}let t=Ln(e._cap??null);try{Ii(e)}finally{t&&Mn()}}function cr(){if(!(me>0)){me++,ft++;try{sr()}finally{me--,me===0&&(ge.length=0,$.clear(),xe.size>0&&xe.clear())}}}function Ft(e){e();let t=e._sig;if(!t)return;let n=Hi,r=n.length;for(n.push(t);n.length>r;){let i=n.pop().subsHead??null;for(;i;){let s=i.sub;if(s)if(s._c){let a=s._sig;a?(!a._d||a._f===!0)&&(a._d=!0,a._f=!1,n.push(a)):s()}else $.has(s)||($.add(s),ge.push(s));i=i.sigNext}}}function ur(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?Ft(r):$.has(r)||($.add(r),ge.push(r))),n=n.sigNext}}function lr(e){let n=e.subsHead;if(n){if(me>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?Ft(o):$.has(o)||($.add(o),ge.push(o))),r=r.sigNext}return}me++,ft++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?Ft(o):$.has(o)||($.add(o),ge.push(o))),r=r.sigNext}sr()}finally{me--,me===0&&(ge.length=0,$.clear(),xe.size>0&&xe.clear())}}}function dr(e){return e.__sc??0}function fr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function pr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var mr="4.13.1",gr=Symbol.for("sibujs.reactive.v1");function ji(){let e=globalThis,t=e[gr];if(t)return!1,t;let n={suspendTracking:zt,resumeTracking:Vt,isTrackingSuspended:Zn,untracked:Qn,retrack:qt,track:er,reactiveBinding:Ut,recordDependency:rr,cleanup:Ie,setMaxSubscriberRepeats:or,setMaxDrainIterations:ir,drainNotificationQueue:cr,queueSignalNotification:ur,notifySubscribers:lr,getSubscriberCount:dr,getSubscriberDeps:fr,forEachSubscriber:pr,getOwnerScope:Wt,runWithOwnerScope:pt,bindOwnerScope:jt,structuralBinding:tr,version:mr};return e[gr]=n,n}var O=ji(),Ee=O.suspendTracking,Te=O.resumeTracking,br=O.isTrackingSuspended,Q=O.untracked,be=O.retrack,Pe=O.track,I=O.reactiveBinding,we=O.recordDependency,ke=O.cleanup,il=O.setMaxSubscriberRepeats,hr=O.setMaxDrainIterations,yr=O.drainNotificationQueue,Sr=O.queueSignalNotification,$e=O.notifySubscribers,sl=O.getSubscriberCount,al=O.getSubscriberDeps,cl=O.forEachSubscriber,Be=O.getOwnerScope??Wt,mt=O.runWithOwnerScope??pt,F=O.bindOwnerScope??jt,_e=O.structuralBinding??((e,t)=>({stop:O.reactiveBinding(e,t),run:n=>n()}));function Ge(e,t,n){if(pe(t))return X(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){k(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}X(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return I(r,e)}function vr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(c){k(c,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(c){k(c,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),X(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=I(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var Kt=["data-focus-key","id","name"],qi=new Set(["text","search","url","tel","password",""]);function Ui(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&qi.has(e.type.toLowerCase())))return{start:null,end:null,direction:null};let r=e;return{start:r.selectionStart,end:r.selectionEnd,direction:r.selectionDirection}}function Je(e){if(e.length===0||typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body)return null;let n=!1;for(let i=0;i<e.length;i++){let s=e[i];if(s===t||s.nodeType===1&&s.contains(t)){n=!0;break}}if(!n)return null;let r=null,o=null;for(let i=0;i<Kt.length;i++){let s=t.getAttribute(Kt[i]);if(s){r=Kt[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...Ui(t)}}function Ki(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Gi(e,t){let n=null,r=0;for(let o=0;o<e.length;o++){let i=e[o];if(i.nodeType!==1)continue;let s=i;s.matches(t)&&(r++,n??(n=s));let a=s.querySelectorAll(t);for(let c=0;c<a.length;c++)r++,n??(n=a[c]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function xr(e,t){if(e.focus(),t.start!==null&&typeof e.setSelectionRange=="function"){let n=e,r=n.value.length,o=Math.min(t.start,r),i=Math.min(t.end??o,r);n.setSelectionRange(o,i,t.direction??"none")}}function Fe(e,t,n,r){if(!e||typeof document>"u"||r==="discard")return;let o=document.activeElement;if(o===e.el||o&&o!==document.body&&o!==document.documentElement)return;if(e.el.isConnected){xr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=Gi(t,`[${e.attr}=${Ki(e.value)}]`);if(s&&s.tagName===e.tag){xr(s,e);return}i=a>1}if(r!==void 0&&typeof r=="object"){let s=typeof r.restoreTo=="function"?r.restoreTo():r.restoreTo;if(s?.isConnected&&(s.focus(),document.activeElement===s))return}}function ce(e,t){let n=[];function r(){let o;try{o=t()}catch(l){k(l,{phase:"binding",name:"bindChildNode",node:e});return}let i=Je(n);if(o==null||typeof o=="boolean"){for(let l=0;l<n.length;l++){let p=n[l];M(p),p.parentNode&&p.parentNode.removeChild(p)}n.length=0,Fe(i,n,"bindChildNode");return}let s=e.parentNode;if(!s){n.length=0;return}let a;if(Array.isArray(o)){a=[];let l=new Set;for(let p=0;p<o.length;p++){let g=o[p];if(g==null||typeof g=="boolean")continue;let m=g instanceof Node?g:document.createTextNode(String(g));if(l.has(m)){!1;continue}l.add(m),a.push(m)}}else a=[o instanceof Node?o:document.createTextNode(String(o))];let c;if(n.length>0&&a.length>0){let l=new Set(n);c=new Set;for(let p=0;p<a.length;p++)l.has(a[p])&&c.add(a[p])}for(let l=0;l<n.length;l++){let p=n[l];c?.has(p)||(M(p),p.parentNode&&p.parentNode.removeChild(p))}let u=e;for(let l=0;l<a.length;l++){let p=a[l];u.nextSibling!==p&&s.insertBefore(p,u.nextSibling),u=p}n=a,Fe(i,a,"bindChildNode")}return I(r,e,!0)}function Gt(){throw new Error("[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first.")}function W(){typeof document>"u"&&Gt()}var R="http://www.w3.org/2000/svg",Ji=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var Jt=new Set,Er=100,Tr=!1,wr=new Map;function kr(e){let t=wr.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),wr.set(e,t)),t}function Yi(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=I(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",at(String(a),{element:e}));return}let c=e.style;i&&(e.removeAttribute("style"),i=!1);let u=[];for(let l in a){if(!Object.hasOwn(a,l))continue;let p=a[l];if(p==null)continue;let g=kr(l);u.push(g),c.setProperty(g,st(g,String(p),{element:e}))}for(let l=0;l<o.length;l++)u.indexOf(o[l])===-1&&c.removeProperty(o[l]);o=u},e);x(e,s);return}if(typeof t=="string"){e.setAttribute("style",at(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=kr(r);if(typeof o=="function"){let s=o,a=I(()=>{n.style.setProperty(i,st(i,String(s()),{element:e}))},e);x(e,a)}else n.style.setProperty(i,st(i,String(o),{element:e}))}}function Xi(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=I(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);x(e,i);return}let n=t,r=!1,o="";for(let i in n){if(!Object.hasOwn(n,i))continue;let s=n[i];if(typeof s=="function"){r=!0;break}s&&(o=o?`${o} ${i}`:i)}if(r){let s=I(()=>{let a="";for(let c in n){if(!Object.hasOwn(n,c))continue;let u=n[c];(typeof u=="function"?u():u)&&(a=a?`${a} ${c}`:c)}e.setAttribute("class",a)},e);x(e,s)}else e.setAttribute("class",o)}function Yt(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),x(e,ce(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),x(e,ce(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),x(e,ce(s,i))}else i instanceof Node?e.appendChild(i):i!=null&&typeof i!="boolean"&&e.appendChild(document.createTextNode(String(i)))}else r!=null&&typeof r!="boolean"&&e.appendChild(document.createTextNode(String(r)))}}}function d(e,t){let n=jn(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&Gt();let i=t?document.createElementNS(t,e):document.createElement(e);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),Yt(i,o),i):(i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return Yt(i,r),i;let s=r,a=s.class;a!=null&&Xi(i,a);let c=s.id;typeof c=="function"?x(i,Ge(i,"id",c)):c!=null&&(!1,i.id=c);let u=o!==void 0?o:s.nodes;u!=null&&Yt(i,u);let l=s.on;if(l)for(let m in l){if(!Object.hasOwn(l,m))continue;let f=l[m];typeof f=="function"?i.addEventListener(m,f):!1}let p=s.style;p!=null&&Yi(i,p);let g=s.ref;g&&(g.current=i);for(let m in s)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,m))continue;let f=s[m];if(f==null||pe(m))continue;typeof f=="function"?x(i,Ge(i,m,f)):X(i,m,f,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var Ml=d("html"),Zi=d("head"),Qi=d("body"),es=d("title"),A=d("div"),H=d("span"),ts=d("section"),ns=d("article"),rs=d("header"),os=d("footer"),is=d("nav"),ss=d("main"),as=d("aside"),cs=d("address"),Xt=d("p"),us=d("h1"),ls=d("h2"),Zt=d("h3"),ds=d("h4"),fs=d("h5"),ps=d("h6"),ms=d("blockquote"),gs=d("dd"),bs=d("dl"),hs=d("dt"),ys=d("figcaption"),Ss=d("figure"),vs=d("hr"),xs=d("li"),Es=d("ol"),Ts=d("ul"),Qt=d("pre"),ws=d("a"),ks=d("abbr"),_s=d("b"),As=d("bdi"),Cs=d("bdo"),Ns=d("br"),Rs=d("cite"),en=d("code"),Ls=d("data"),Ms=d("dfn"),Os=d("em"),Ds=d("i"),Hs=d("kbd"),Is=d("mark"),Ps=d("q"),$s=d("rp"),Bs=d("rt"),Fs=d("ruby"),zs=d("s"),Vs=d("samp"),Ws=d("small"),js=d("strong"),qs=d("sub"),Us=d("sup"),Ks=d("time"),Gs=d("u"),Js=d("var"),Ys=d("area"),Xs=d("audio"),Zs=d("img"),Qs=d("map"),ea=d("track"),ta=d("video"),na=d("embed"),ra=d("iframe"),oa=d("object"),ia=d("param"),sa=d("picture"),aa=d("portal"),ca=d("source"),ua=d("svg",R),la=d("math"),da=d("canvas"),fa=d("noscript"),pa=d("script"),ma=d("del"),ga=d("ins"),ba=d("caption"),ha=d("col"),ya=d("colgroup"),Sa=d("table"),va=d("tbody"),xa=d("td"),Ea=d("tfoot"),Ta=d("th"),wa=d("thead"),ka=d("tr"),Ye=d("button"),_a=d("datalist"),Aa=d("fieldset"),Ca=d("form"),Na=d("input"),Ra=d("label"),La=d("legend"),Ma=d("meter"),Oa=d("optgroup"),Da=d("option"),Ha=d("output"),Ia=d("progress"),Pa=d("select"),$a=d("textarea"),Ba=d("details"),Fa=d("dialog"),za=d("menu"),Va=d("summary"),Wa=d("slot"),ja=d("template"),qa=d("base"),Ua=d("link"),Ka=d("meta"),Ae=d("style"),Ga=d("circle",R),Ja=d("ellipse",R),Ya=d("g",R),Xa=d("line",R),Za=d("path",R),Qa=d("polygon",R),ec=d("polyline",R),tc=d("rect",R),nc=d("text",R),rc=d("tspan",R),oc=d("defs",R),ic=d("clipPath",R),sc=d("mask",R),ac=d("pattern",R),cc=d("linearGradient",R),uc=d("radialGradient",R),lc=d("stop",R),dc=d("use",R),fc=d("symbol",R),pc=d("marker",R),mc=d("center"),gc=d("font"),bc=d("marquee"),hc=e=>d(e);var tn="__sibuPendingError";function _r(e,t){let n=()=>e.parentNode?(k(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[tn]=t)})}function gt(e){let t=e,n=t[tn];if(n instanceof Error)return delete t[tn],n}function Ar(e){let t=null;return function(){if(t)return t();let r=A({class:"sibu-lazy"}),o=!1;return e().then(F(i=>{if(o)return;t=i.default;let s=t();V(r,s)})).catch(i=>{if(o)return;let s=i instanceof Error?i:new Error(String(i));V(r,A({class:"sibu-lazy-error"},`Failed to load component: ${s.message}`)),_r(r,s)}),r.appendChild(H("sibu-lazy-loading","Loading...")),x(r,()=>{o=!0}),r}}function Cr({nodes:e,fallback:t}){let n=A({class:"sibu-suspense"}),r=t();n.appendChild(r);let o=!1,i=null,s=null;x(n,()=>{o=!0,i&&(i.disconnect(),i=null),s&&!n.contains(s)&&M(s)});let a=F(()=>{if(!o)try{let c=e();if(s=c,c.classList.contains("sibu-lazy")){if(!c.querySelector(".sibu-lazy-loading")){V(n,c);return}i=new MutationObserver(()=>{if(o)return;c.querySelector(".sibu-lazy-loading")||(i?.disconnect(),i=null,V(n,c))}),i.observe(c,{childList:!0,subtree:!0})}else V(n,c)}catch(c){let u=c instanceof Error?c:new Error(String(c));_r(n,u)}});return queueMicrotask(a),n}function sn(e,t){return()=>Be()===e?t():mt(e,t)}function ht(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";k(n,{phase:r,name:t});return}}function nn(e,t,n,r,o){let i=ht(e,t);if(typeof i!="function")return;let s=sn(o,i);r()||!n.isConnected?ht(s,"onUnmount"):Rr(s,n)}var ze=new WeakMap,Ce=new WeakMap,ue=new Set,le=new Set,Ve=null,bt=0,yc=256;function rn(e){let t=ze.get(e);if(t){ze.delete(e),ue.delete(e);for(let n of t)try{n()}catch{}}}function on(e){Ce.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Ce.get(e);if(n){Ce.delete(e),le.delete(e);for(let r of n)try{r()}catch{}}})}function Sc(e){if(ue.size===0||e.nodeType!==1)return;let t=e;if(ue.has(t)&&t.isConnected&&rn(t),t.firstElementChild)for(let n of Array.from(ue))n!==t&&n.isConnected&&t.contains(n)&&rn(n)}function vc(e){if(le.size===0||e.nodeType!==1)return;let t=e;if(le.has(t)&&!t.isConnected&&on(t),t.firstElementChild)for(let n of Array.from(le))n!==t&&!n.isConnected&&t.contains(n)&&on(n)}function xc(){if(ue.size>0)for(let e of Array.from(ue))e.isConnected&&rn(e);if(le.size>0)for(let e of Array.from(le))e.isConnected||on(e)}function Nr(){Ve||typeof document>"u"||(Ve=new MutationObserver(e=>{for(let t of e)if(t.type==="childList"){if(t.addedNodes.length>0)for(let n=0;n<t.addedNodes.length;n++)Sc(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)vc(t.removedNodes[n])}bt+=e.length,bt>=yc&&(bt=0,xc()),an()}),Ve.observe(document.body,{childList:!0,subtree:!0}))}function an(){Ve&&ue.size===0&&le.size===0&&(Ve.disconnect(),Ve=null,bt=0)}function Ec(e,t){let n=ze.get(e);return n||(n=[],ze.set(e,n)),n.push(t),ue.add(e),Nr(),()=>{let r=ze.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(ze.delete(e),ue.delete(e))}an()}}function Tc(e,t){let n=Ce.get(e);return n||(n=[],Ce.set(e,n)),n.push(t),le.add(e),Nr(),()=>{let r=Ce.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Ce.delete(e),le.delete(e))}an()}}function yt(e,t){if(typeof document>"u")return;let n=Be();if(e=sn(n,e),t){let r=!1,o=()=>r;if(x(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||nn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){nn(e,"onMount",t,o,n);return}let i=Ec(t,()=>{r||nn(e,"onMount",t,o,n)});x(t,i)})}else queueMicrotask(()=>{ht(e,"onMount")})}function wc(e,t){typeof document>"u"||Rr(sn(Be(),e),t)}function Rr(e,t){let n=!1,r=()=>{n||(n=!0,ht(e,"onUnmount"))};x(t,r);let o=()=>{if(n)return;let i=Tc(t,r);x(t,i)};t.isConnected?o():yt(()=>{o()},t)}function kc(e,t){x(t,e)}function J(e,t,n){try{e.emit(t,n)}catch{}}var cn=Symbol.for("sibujs.ssr.v1");function _c(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let t=null,n=process.getBuiltinModule;typeof n=="function"?t=n("node:async_hooks"):typeof _t=="function"&&(t=_t("async_hooks")),t&&(e=new t.AsyncLocalStorage)}}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var he=globalThis[cn]??(globalThis[cn]=_c()),Ne=he.als,z=he.fallbackStore;he.fallbackDepth??(he.fallbackDepth=0);var Lr=!1;function Ac(){if(Lr||Ne||!(typeof process<"u"&&!!process.versions?.node))return;Lr=!0;let t=process.versions.node;`${t}`}function Re(){if(Ne){let e=Ne.getStore();if(e)return e}return z}function Mr(){return Ne?Ne.getStore()??null:he.fallbackDepth>0?z:null}function ee(){return Re().ssr}function Or(e){if(!ee())return null;let t=Re(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}function Dr(){Re().ssr=!0}function Hr(){Re().ssr=!1}function Ir(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0};if(Ne)return Ne.run(t,e);Ac();let n=z.ssr,r=z.suspenseIdCounter,o=z.idCounter,i=z.locale;z.ssr=!0,z.suspenseIdCounter=0,z.idCounter=0,z.locale=void 0,he.fallbackDepth++;try{return e()}finally{he.fallbackDepth--,z.ssr=n,z.suspenseIdCounter=r,z.idCounter=o,z.locale=i}}function Pr(e){let t=Re(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var zr=globalThis;function Cc(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))}}}var $r=100;function St(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===Be()?Br(t):mt(n,()=>Br(t))}function Br(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){k(n,{phase:"cleanup"})}}function Fr(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&St(e),be(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=$r);e.rerunPending&&(e.rerunPending=!1,k(new Error(`effect re-requested itself ${$r}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function Nc(e){if(e.disposed)return;e.disposed=!0;let t=zr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&St(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{ke(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function Y(e,t){if(ee())return()=>{};let n={fn:e,onError:t?.onError,userCleanups:[],running:!1,rerunPending:!1,disposed:!1,onCleanup:null,subscriber:null,bodyFn:null};n.onCleanup=s=>{n.userCleanups.push(s)};let r=n.onError;n.bodyFn=r?()=>{try{n.fn(n.onCleanup)}catch(s){r(s)}}:()=>{n.fn(n.onCleanup)};let o=(()=>{if(!n.disposed){if(n.running){n.rerunPending=!0;return}n.running=!0;try{n.rerunPending=!1,n.userCleanups.length>0&&St(n),be(n.bodyFn,o),n.rerunPending&&Fr(n)}finally{n.running=!1,n.rerunPending=!1}}});o.depsHead=null,o.depsTail=null,o._epoch=0,o._structDirty=!1,o._hasComputedDep=!1,o._errorPhase="effect",o._runEpoch=0,o._runs=0,n.subscriber=o,n.running=!0;try{be(n.bodyFn,n.subscriber),n.rerunPending&&Fr(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&St(n),ke(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=zr.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&J(i,"effect:create",{effectFn:e}),()=>Nc(n)}var Xe=0,un=new Set;function Rc(e){Xe++;try{return e()}finally{Xe--,Xe===0&&Oc()}}function Lc(e){return Xe===0?!1:(un.add(e),!0)}function Mc(){return Xe>0}function Oc(){try{for(let e of un)Sr(e)}finally{un.clear()}yr()}var Vr=Symbol.for("sibujs.reactive.batch.v1");function Dc(){let e=globalThis,t=e[Vr];if(t)return t;let n={batch:Rc,enqueueBatchedSignal:Lc,isBatching:Mc};return e[Vr]=n,n}var ln=Dc(),j=ln.batch,Le=ln.enqueueBatchedSignal,Hc=ln.isBatching;var dn=globalThis;function C(e,t){let n={value:e,__v:0,__sc:0,subsHead:null,subsTail:null,__activeNode:null,__name:void 0,_d:!1,_validate:void 0},r=void 0,o=t?.equals;r&&(n.__name=r);function i(){return we(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;if(!o(c,u)){if(n.value=u,n.__v++,!1){let l=dn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;l&&J(l,"signal:update",{signal:n,name:r,oldValue:c,newValue:u})}Le(n)||$e(n)}}:s=a=>{let c=n.value,u=typeof a=="function"?a(c):a;Object.is(u,c)||(n.value=u,n.__v++,Le(n)||$e(n))},!1){let a=dn.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&J(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function Ic(e){let[t,n]=C(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var Pc=`
|
|
8
8
|
.sibu-error-display {
|
|
9
9
|
border: 1px solid var(--sibu-err-border, #e5484d);
|
|
10
10
|
border-radius: 10px;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
div,
|
|
8
8
|
span
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5XUGJM3J.js";
|
|
10
10
|
import {
|
|
11
11
|
STATIC_VALUE_RESOLVER,
|
|
12
12
|
planHeadElementEntry,
|
|
@@ -17,17 +17,17 @@ import {
|
|
|
17
17
|
} from "./chunk-7ZHH77QA.js";
|
|
18
18
|
import {
|
|
19
19
|
effect
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-QC3NP47A.js";
|
|
21
21
|
import {
|
|
22
22
|
sanitizeUrl
|
|
23
23
|
} from "./chunk-EXXSN3BW.js";
|
|
24
24
|
import {
|
|
25
25
|
batch,
|
|
26
26
|
signal
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-QKFVMIAV.js";
|
|
28
28
|
import {
|
|
29
29
|
bindOwnerScope
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-4UTGDVSA.js";
|
|
31
31
|
import {
|
|
32
32
|
registerDisposer,
|
|
33
33
|
replaceChildrenSafely,
|
|
@@ -575,7 +575,7 @@ function forEachSubscriber(signal, visit) {
|
|
|
575
575
|
}
|
|
576
576
|
|
|
577
577
|
// src/reactivity/track.ts
|
|
578
|
-
var _runtimeVersion = true ? "4.13.
|
|
578
|
+
var _runtimeVersion = true ? "4.13.1" : "dev";
|
|
579
579
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
580
580
|
function resolveReactiveApi() {
|
|
581
581
|
const g = globalThis;
|
|
@@ -3,23 +3,23 @@ import {
|
|
|
3
3
|
} from "./chunk-J6FW5TV6.js";
|
|
4
4
|
import {
|
|
5
5
|
tagFactory
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CPQKWCJ2.js";
|
|
7
7
|
import {
|
|
8
8
|
derived
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YFTBCCVH.js";
|
|
10
10
|
import {
|
|
11
11
|
globalSingleton
|
|
12
12
|
} from "./chunk-7ZHH77QA.js";
|
|
13
13
|
import {
|
|
14
14
|
effect
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QC3NP47A.js";
|
|
16
16
|
import {
|
|
17
17
|
sanitizeCSSDeclaration
|
|
18
18
|
} from "./chunk-EXXSN3BW.js";
|
|
19
19
|
import {
|
|
20
20
|
batch,
|
|
21
21
|
signal
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QKFVMIAV.js";
|
|
23
23
|
|
|
24
24
|
// src/ecosystem/adapters/mobx.ts
|
|
25
25
|
function mobXAdapter(options) {
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
} from "./chunk-N5TBYXHW.js";
|
|
4
4
|
import {
|
|
5
5
|
domBinding
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-22OPSWMF.js";
|
|
7
7
|
import {
|
|
8
8
|
bindAttribute,
|
|
9
9
|
setSafeAttribute
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-K4LNUT5L.js";
|
|
11
11
|
import {
|
|
12
12
|
isBlockedElement
|
|
13
13
|
} from "./chunk-F2UWOZ6J.js";
|
|
14
14
|
import {
|
|
15
15
|
derived
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-YFTBCCVH.js";
|
|
17
17
|
import {
|
|
18
18
|
globalSingleton
|
|
19
19
|
} from "./chunk-7ZHH77QA.js";
|
|
@@ -26,11 +26,11 @@ import {
|
|
|
26
26
|
} from "./chunk-5HZXGZ6T.js";
|
|
27
27
|
import {
|
|
28
28
|
signal
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-QKFVMIAV.js";
|
|
30
30
|
import {
|
|
31
31
|
reactiveBinding,
|
|
32
32
|
track
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-4UTGDVSA.js";
|
|
34
34
|
import {
|
|
35
35
|
dispose,
|
|
36
36
|
disposeNodeOwn,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
bindAttribute,
|
|
3
3
|
noDocument,
|
|
4
4
|
setSafeAttribute
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-K4LNUT5L.js";
|
|
6
6
|
import {
|
|
7
7
|
isBlockedElement
|
|
8
8
|
} from "./chunk-F2UWOZ6J.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-EXXSN3BW.js";
|
|
14
14
|
import {
|
|
15
15
|
reactiveBinding
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4UTGDVSA.js";
|
|
17
17
|
import {
|
|
18
18
|
DEV,
|
|
19
19
|
devWarn,
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
} from "./chunk-7ZHH77QA.js";
|
|
10
10
|
import {
|
|
11
11
|
effect
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QC3NP47A.js";
|
|
13
13
|
import {
|
|
14
14
|
sanitizeUrl
|
|
15
15
|
} from "./chunk-EXXSN3BW.js";
|
|
16
16
|
import {
|
|
17
17
|
batch,
|
|
18
18
|
signal
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QKFVMIAV.js";
|
|
20
20
|
import {
|
|
21
21
|
reportError
|
|
22
22
|
} from "./chunk-NYNYSPK7.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
derived
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YFTBCCVH.js";
|
|
4
4
|
import {
|
|
5
5
|
globalSingleton
|
|
6
6
|
} from "./chunk-7ZHH77QA.js";
|
|
7
7
|
import {
|
|
8
8
|
effect
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QC3NP47A.js";
|
|
10
10
|
import {
|
|
11
11
|
sanitizeUrl
|
|
12
12
|
} from "./chunk-EXXSN3BW.js";
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
batch,
|
|
18
18
|
signal
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QKFVMIAV.js";
|
|
20
20
|
import {
|
|
21
21
|
untracked
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-4UTGDVSA.js";
|
|
23
23
|
import {
|
|
24
24
|
reportError
|
|
25
25
|
} from "./chunk-NYNYSPK7.js";
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
} from "./chunk-7ZHH77QA.js";
|
|
4
4
|
import {
|
|
5
5
|
effect
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QC3NP47A.js";
|
|
7
7
|
import {
|
|
8
8
|
stripHtml
|
|
9
9
|
} from "./chunk-EXXSN3BW.js";
|
|
10
10
|
import {
|
|
11
11
|
signal
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QKFVMIAV.js";
|
|
13
13
|
import {
|
|
14
14
|
forEachSubscriber,
|
|
15
15
|
getSubscriberCount,
|
|
16
16
|
getSubscriberDeps
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4UTGDVSA.js";
|
|
18
18
|
import {
|
|
19
19
|
dispose,
|
|
20
20
|
isDev
|