sibujs 4.14.0 → 4.14.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 +12 -12
- 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-HQIAL7F2.js → chunk-3T7TWMSD.js} +1 -1
- package/dist/{chunk-RVR5NPFL.js → chunk-4XCWNGRY.js} +1 -1
- package/dist/{chunk-F67F77IA.js → chunk-55TAOW5M.js} +1 -1
- package/dist/{chunk-SVULV7O4.js → chunk-B2NLNZ3E.js} +4 -4
- package/dist/{chunk-4FJSAUKB.js → chunk-FCWOMATN.js} +1 -1
- package/dist/{chunk-AE32RGWX.js → chunk-FFXZ6ELZ.js} +2 -2
- package/dist/{chunk-GVAMIU6K.js → chunk-KTJC7QPA.js} +2 -2
- package/dist/{chunk-VM2U5LEL.js → chunk-L2IPKGUJ.js} +6 -6
- package/dist/{chunk-MIRKTVH4.js → chunk-LAHX7XFG.js} +1 -1
- package/dist/{chunk-TLS4NVIB.js → chunk-LJ2LR5P4.js} +4 -4
- package/dist/{chunk-2TTRW2TE.js → chunk-LUZXFMKH.js} +4 -4
- package/dist/{chunk-QS6GMWDD.js → chunk-LZKKMDQF.js} +10 -10
- package/dist/{chunk-Y4LUM2XS.js → chunk-NIHGSXOX.js} +3 -3
- package/dist/{chunk-BNXRWZZV.js → chunk-OLMZF4RU.js} +5 -5
- package/dist/{chunk-CCKUNHVU.js → chunk-OPRQW4LI.js} +1 -1
- package/dist/{chunk-UUIKJJIK.js → chunk-RBRITLFL.js} +3 -3
- package/dist/{chunk-BOYKGGVD.js → chunk-TOV4PN3P.js} +2 -2
- package/dist/{chunk-JTFQ7IL4.js → chunk-TS6JDK7Y.js} +5 -5
- package/dist/{chunk-A454RAEK.js → chunk-TZNR6E6D.js} +2 -2
- package/dist/{chunk-4TQDTWWN.js → chunk-VIAVYBNQ.js} +3 -3
- package/dist/{chunk-BKZ5N6NK.js → chunk-WFMMSMA5.js} +3 -3
- package/dist/{chunk-CNPT6NKV.js → chunk-YIXMS546.js} +43 -1
- package/dist/{chunk-7ILEHTVX.js → chunk-YPLQQTWS.js} +1 -1
- package/dist/{chunk-CJ7KS3DF.js → chunk-ZKI4SDZ2.js} +2 -2
- package/dist/{chunk-N7A6FKWW.js → chunk-ZYK4NZZA.js} +2 -2
- 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 +46 -4
- package/dist/extras.js +22 -22
- package/dist/index.cjs +1 -1
- package/dist/index.js +12 -12
- 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 +6 -6
- package/dist/plugins.cjs +46 -4
- package/dist/plugins.js +11 -11
- package/dist/{ssr-NECEU4X4.js → ssr-HHU3DAD2.js} +3 -3
- package/dist/ssr-dom.cjs +43 -1
- package/dist/ssr-dom.d.cts +2 -0
- package/dist/ssr-dom.d.ts +2 -0
- package/dist/ssr-dom.js +1 -1
- package/dist/ssr.cjs +44 -2
- package/dist/ssr.js +11 -11
- package/dist/testing.cjs +44 -2
- package/dist/testing.js +9 -9
- 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/browser.cjs
CHANGED
|
@@ -762,7 +762,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
762
762
|
}
|
|
763
763
|
|
|
764
764
|
// src/reactivity/track.ts
|
|
765
|
-
var _runtimeVersion = true ? "4.14.
|
|
765
|
+
var _runtimeVersion = true ? "4.14.1" : "dev";
|
|
766
766
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
767
767
|
function resolveReactiveApi() {
|
|
768
768
|
const g = globalThis;
|
package/dist/browser.js
CHANGED
|
@@ -36,15 +36,15 @@ import {
|
|
|
36
36
|
visibility,
|
|
37
37
|
wakeLock,
|
|
38
38
|
windowSize
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-TZNR6E6D.js";
|
|
40
40
|
import "./chunk-52XFPGSN.js";
|
|
41
41
|
import "./chunk-62BDYGAG.js";
|
|
42
42
|
import "./chunk-7ZHH77QA.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-FFXZ6ELZ.js";
|
|
44
44
|
import "./chunk-B3HOT4TK.js";
|
|
45
45
|
import "./chunk-UYTYNCMZ.js";
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-FCWOMATN.js";
|
|
47
|
+
import "./chunk-LAHX7XFG.js";
|
|
48
48
|
import "./chunk-S37PZD6I.js";
|
|
49
49
|
import "./chunk-NT3ZYB5S.js";
|
|
50
50
|
import "./chunk-R5U7XKVJ.js";
|
package/dist/build.cjs
CHANGED
|
@@ -2449,7 +2449,7 @@ function forEachSubscriber(signal2, visit) {
|
|
|
2449
2449
|
}
|
|
2450
2450
|
|
|
2451
2451
|
// src/reactivity/track.ts
|
|
2452
|
-
var _runtimeVersion = true ? "4.14.
|
|
2452
|
+
var _runtimeVersion = true ? "4.14.1" : "dev";
|
|
2453
2453
|
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
|
|
2454
2454
|
function resolveReactiveApi() {
|
|
2455
2455
|
const g2 = globalThis;
|
package/dist/build.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
index_exports
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-LZKKMDQF.js";
|
|
4
|
+
import "./chunk-YPLQQTWS.js";
|
|
5
|
+
import "./chunk-TOV4PN3P.js";
|
|
6
|
+
import "./chunk-YIXMS546.js";
|
|
7
7
|
import "./chunk-LJMX4SQ7.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-4XCWNGRY.js";
|
|
9
|
+
import "./chunk-OPRQW4LI.js";
|
|
10
10
|
import "./chunk-3HZOSMPX.js";
|
|
11
11
|
import "./chunk-62BDYGAG.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-ZKI4SDZ2.js";
|
|
13
|
+
import "./chunk-3T7TWMSD.js";
|
|
14
14
|
import "./chunk-RVWJGWCL.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-ZYK4NZZA.js";
|
|
16
16
|
import "./chunk-7ZHH77QA.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-FFXZ6ELZ.js";
|
|
18
18
|
import {
|
|
19
19
|
isEventHandlerAttr,
|
|
20
20
|
isHtmlContentAttribute,
|
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
} from "./chunk-B3HOT4TK.js";
|
|
23
23
|
import "./chunk-UYTYNCMZ.js";
|
|
24
24
|
import "./chunk-5HZXGZ6T.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-FCWOMATN.js";
|
|
26
|
+
import "./chunk-LAHX7XFG.js";
|
|
27
27
|
import "./chunk-S37PZD6I.js";
|
|
28
28
|
import "./chunk-NT3ZYB5S.js";
|
|
29
29
|
import "./chunk-R5U7XKVJ.js";
|
package/dist/cdn.dev.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(rr(o)){let i="",s=n+1;for(;s<e.length&&i.length<6&&rr(e[s]);)i+=e[s],s++;s<e.length&&Ci(e[s])&&(s+=e[s]==="\r"&&e[s+1]===`
|
|
6
6
|
`?2:1);let a=Number.parseInt(i,16),l=a===0||a>1114111||a>=55296&&a<=57343;t+=l?"\uFFFD":String.fromCodePoint(a),n=s-1;continue}t+=o,n+=1}return t}var or=["url(","expression(","javascript:","vbscript:","-moz-binding","behavior:","@import","image-set(","filter:progid","image(","src("],Ri=4,Li=5,Mi=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 Wt=new Set,ir=100,sr=!1;function mt(e,t,n){q(()=>{let r=["url() in an inline style is an exfiltration channel: the browser fetches it immediately and the URL's path or query can carry page data off-origin","expression() executes arbitrary script in legacy engines","the javascript: scheme executes script","the vbscript: scheme executes script","-moz-binding loads and runs remote XBL","behavior: loads and runs a remote HTC script","@import pulls in a remote stylesheet","image-set() fetches remote images, the same exfiltration channel as url()","filter:progid activates legacy scriptable filters","image() fetches its string argument as a URL, the same exfiltration channel as url()","src() fetches its string argument as a URL, the same exfiltration channel as url()"],o=n?.property?`${n.property}: ${e}`:e,i=Oi(n?.element),s=`${i}|${o}`;return Wt.has(s)?"":Wt.size>=ir?sr?"":(sr=!0,`${ir} distinct dropped style declarations have been reported; suppressing further ones for the rest of this session so they cannot flood the console. The declarations are still dropped \u2014 only the reporting stops. Fix the reported ones and reload to see any that remain.`):(Wt.add(s),`style declaration "${o}" was dropped by the style sanitizer on ${i} \u2014 ${r[t]}. The element renders without it, which usually looks like a missing image rather than an error. Sanctioned alternatives: for a content image use an <img> element (or a <picture>); for decoration, put the rule in a stylesheet and set a class instead \u2014 stylesheet CSS is not sanitized, only inline style attributes are. If this declaration is not yours, it came from untrusted data and the drop just prevented an exfiltration.`)})}function ar(e){return(e.includes("\\")?Ni(e):e).toLowerCase().replace(/\s+/g,"")}function Vt(e){if(!_i.test(e))return-1;let t=ar(e);for(let n=0;n<or.length;n++)if(t.includes(or[n]))return n;return-1}function bt(e,t,n){let r=qt(e,t);return r===-1?t:(mt(t,r,{property:e,element:n?.element}),"")}function qt(e,t){let n=Vt(t);if(n!==-1)return n;let r=Y(e);return r==="behavior"?Li:r==="-moz-binding"?Ri:(r==="filter"||r==="-ms-filter")&&ar(t).includes("progid:")?Mi:-1}function Di(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 l=e.indexOf("*/",s+2);if(l===-1)return null;s=l+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 l=s.slice(0,a).trim();if(!/^(--[\w-]+|-?[a-zA-Z_][\w-]*)$/.test(l))continue;let c=s.slice(a+1).trim(),u=/!\s*important\s*$/i.exec(c);if(u&&(c=c.slice(0,u.index).trim()),c==="")continue;let f=l.startsWith("--")?l:Y(l);i.push([f,c,u!==null])}return i}function Hi(e,t){let n=String(e),r=Di(n);if(r===null)return Vt(n)!==-1&&mt(n,Vt(n),t),"";let o=[];for(let[i,s,a]of r){let l=qt(i,s);if(l!==-1){mt(s,l,{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 Hi(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),l=qt(s,a);if(l!==-1){mt(a,l,{property:s,element:t?.element});continue}let c=r.style.getPropertyPriority(s);o.push(`${s}: ${a}${c?` !${c}`:""}`)}return o.join("; ")}var Ut=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),Pi=new Set(["srcdoc"]);function tt(e){return Pi.has(e.toLowerCase())}function lr(e){return Ut.has(e.toLowerCase())}function $i(e){let t=e.toLowerCase();return t==="style"||Ut.has(t)}function Ii(e,t,n){let r=e.toLowerCase();return r==="srcset"?Ai(t):Ut.has(r)?gt(t):r==="style"?ht(t,n):t}function cr(e,t,n){if(!$i(e))return t;let r=Ii(e,t,n);return r===""?null:r}function _e(e){return e===" "||e===" "||e===`
|
|
7
|
-
`||e==="\r"||e==="\f"}function yt(e){let t=0,n=e.length;for(;t<n&&_e(e[t]);)t++;for(;n>t&&_e(e[n-1]);)n--;return e.slice(t,n)}var Z=e=>({kind:"forbidden",reason:e});function Bi(e){let t=yt(Fe(e));if(t==="")return Z("empty content");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return Z("missing or non-numeric delay");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return Z("unparseable delay");for(;n<t.length&&_e(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return Z("unexpected text after delay");for(n++;n<t.length&&_e(t[n]);)n++;let o=n;for(;n<t.length&&!_e(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return Z(`unsupported refresh key ${JSON.stringify(i)}`);for(;n<t.length&&_e(t[n]);)n++;if(t[n]!=="=")return Z("missing '=' after url");for(n++;n<t.length&&_e(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let c=t.indexOf(a,n+1);if(c===-1)return Z("unterminated quoted destination");if(s=t.slice(n+1,c),yt(t.slice(c+1))!=="")return Z("trailing text after quoted destination")}else if(s=yt(t.slice(n)),/[;,]/.test(s))return Z("multiple refresh assignments");if(s==="")return Z("empty destination");let l=gt(s);return l===""?Z("destination uses a disallowed protocol"):{kind:"allowed",delay:r,destination:s,sanitizedDestination:l}}function Kt(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=Y(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?Z(`duplicate case-insensitive attribute ${JSON.stringify(r)}`):typeof t!="string"?{kind:"not-refresh"}:yt(Fe(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:Bi(n)}var Fi="http://www.w3.org/1999/xhtml",zi="http://www.w3.org/2000/svg",ji=new Set(["script","iframe","object","embed","frame","frameset"]);function dr(e){return Y(e)}function fr(e){return ji.has(dr(e))}var Wi=new Set(["script","style"]);function pr(e){return Wi.has(dr(e))}var M={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},Vi=new Set(["src","href","xlink:href","type","language"]),qi=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),Jt=new WeakSet;function mr(e){return e.namespaceURI===Fi||e.namespaceURI===null}function gr(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 Ui(e){Jt.has(e)||(Jt.add(e),e.getAttribute("content")!==null&&Kt(gr(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function Ki(e,t,n,r){if(!mr(e))return M.None;let o=Y(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&Ui(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return M.None;let i=Kt(gr(e,o,n));return i.kind==="forbidden"?M.MetaRefreshForbidden:i.kind!=="not-refresh"&&Jt.has(e)?M.MetaRefreshReactive:M.None}function Ji(e,t){if(t===null||Y(e)!=="attributename")return M.None;let n=Fe(t);return lr(n)||ve(n)||tt(n)?M.AnimationTarget:M.None}var St=new WeakSet;function ur(e){if(e===null)return!1;let t=Y(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 Gi(e,t,n,r){if(!mr(e))return M.None;let o=Y(t);return o==="href"?r==="static"||n===null?M.None:ur(e.getAttribute("rel"))?M.StylesheetSource:(St.add(e),M.None):o==="rel"&&ur(n)&&St.has(e)&&e.hasAttribute("href")?M.StylesheetSource:M.None}function Gt(e,t,n,r){let o=e.localName;return o==="meta"?Ki(e,t,n,r):o==="link"?Gi(e,t,n,r):o==="script"?r==="static"||n===null?M.None:Vi.has(Y(t))?M.ScriptSource:M.None:qi.has(o)&&e.namespaceURI===zi?Ji(t,n):M.None}function Yt(e,t,n){e.localName!=="link"||Y(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?St.add(e):St.delete(e))}var Yi="http://www.w3.org/1999/xhtml",Zi="http://www.w3.org/2000/svg",Xi="http://www.w3.org/1999/xlink",Qi="http://www.w3.org/XML/1998/namespace",es=new Set(["checked","disabled","selected"]);function ts(e){return e.namespaceURI===null||e.namespaceURI===Yi}function hr(e,t,n){q(()=>`${e}: refusing "${t}" in this element's context \u2014 ${["",'the element would become a <meta http-equiv="refresh"> directive the shared refresh policy forbids (a destination outside the URL allowlist, or a directive too malformed to read unambiguously)',"a <meta> whose http-equiv or content is reactive may never carry a refresh directive: a browser schedules the navigation as soon as the directive is valid, and nothing can withdraw it when the state changes back","a runtime value may not choose the program a <script> runs; name the script in static template source, or load it through Head({ script }) as an explicit trust decision","an SVG animation may not target a URL, event-handler or nested-document attribute; its to / values would be written into that attribute without passing the URL policy",'a runtime-chosen href may not become an applied <link rel="stylesheet">: a well-formed URL is not a trusted stylesheet. Name the stylesheet in static template source, or load a runtime-chosen one through Head({ link }) as an explicit trust decision'][n]}. The write was not performed.`)}function br(e,t,n){e[t]=n}function ns(e,t){if(e.namespaceURI!==Zi)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?Xi:n.startsWith("xml:")?Qi:null}function te(e,t,n,r={}){let o=rs(e,t,n,r);return e.localName==="link"&&Yt(e,t,r.reactive?"reactive":"runtime"),o}function rs(e,t,n,r){let o=ns(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(ve(t))return D(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${t}". Its value would be evaluated as JavaScript. Use on:{ ${t.slice(2)}: fn } instead.`),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!==M.None)return hr(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(tt(t))return D(`${r.label??"setSafeAttribute"}: refusing to set "${t}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let l=ts(e),c=l?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 l&&es.has(c)&&c in e?br(e,c,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let u=String(n);if(r.syncValueProperty!==!1&&l&&(c==="value"||c==="checked")&&c in e)return br(e,c,c==="checked"?!!n:u),!0;let f=u===""?"":cr(t,u,{element:e});return f===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===f||(o?e.setAttributeNS(o,t,f):e.setAttribute(t,f)),!0)}function Zt(e,t,n){if(tt(t))return D(`html: refusing static attribute "${t}" \u2014 the browser parses it as a nested document.`),!1;let r=Gt(e,t,n,"static");return r!==M.None?(hr("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Yt(e,t,"static"),!0)}var os=4096,Xt=[];function is(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function ss(e,t,n){let r=Xt.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=is();return o.sig=e,o.sub=t,o.epoch=n,o}function yr(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Xt.length<os&&Xt.push(e)}function as(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 Sr(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 ls(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function cs(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 ne=null,de=null,xe=0,Ee=[],z=new Set,us=[];function ds(e){try{e()}catch(t){let n=e;k(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function fs(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 le=0,fe=!1;function en(){le===0&&(de=ne,ne=null,fe=!0),le++}function tn(){le--,le===0&&(ne=de,de=null,fe=!1)}function vr(){return fe}function xr(e){en();try{return e()}finally{tn()}}var X=null;function nn(){return X}function Tt(e,t){let n=X;X=e;try{return t()}finally{X=n}}function rn(e){let t=X;return t===null?e:(...n)=>Tt(t,()=>e(...n))}var ze=null,ps=0;function on(e,t){let n=ne,r=0,o=null;fe&&(r=le,o=de,le=0,de=null,fe=!1),ne=t;let i=t;i._cap===void 0&&(i._cap=Xn());let s=X;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(X=a);let l=ze;l!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=l),i._tok!=null&&(ze=i._tok);let c=++ps;i._epoch=c,i._structDirty=!1;for(let u=i.depsHead??null;u!==null;u=u.subNext){let f=u.sig;u.prevActive=f.__activeNode??null,f.__activeNode=u}try{e()}finally{ne=n,X=s,ze=l,r!==0&&(le=r,de=o,fe=!0);let u=i.depsHead??null;for(;u!==null;){let f=u.subNext,m=u.sig;m.__activeNode=u.prevActive,u.prevActive=null,u.epoch!==c&&(cs(u),Sr(u),yr(u)),u=f}}}function Er(e,t){if(!t)return sn(e);je(t);let n=ne,r=0,o=null;fe&&(r=le,o=de,le=0,de=null,fe=!1),ne=t;let i=t;i._scope===void 0&&(i._scope=X);let s=X;X=i._scope;try{e()}finally{ne=n,X=s,r!==0&&(le=r,de=o,fe=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let l=a.sig;l.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>je(t))}function sn(e,t,n){return wr(e,t,n===!0)._dispose}function Tr(e,t){let n=wr(e,t,!0);return{stop:n._dispose,run:r=>{let o=ze;ze=n._tok??null;try{return r()}finally{ze=o}}}}function wr(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{on(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),je(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),je(o)},o}function kr(e){if(!ne)return;let t=ne,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=ss(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,ls(t,i),as(n,i),t._structDirty=!0}function je(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;Sr(n),yr(n),n=r}}var vt=1e3,xt=1e6,Et=0,Ce=new Set;function Ar(e){let t=vt;return Number.isFinite(e)&&e>0&&(vt=Math.floor(e)),t}function _r(e){let t=xt;return Number.isFinite(e)&&e>0&&(xt=Math.floor(e)),t}function ms(e){let t=e;return t._runEpoch!==Et?(t._runEpoch=Et,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>vt)}function gs(e){let t=e.__name??"<unnamed>";k(new Error(`subscriber "${t}" fired more than ${vt} 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 bs(){k(new Error(`Notification drain exceeded ${xt} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function Cr(){let e=0;for(;e<Ee.length;){if(e>=xt){bs();break}let t=Ee[e++];z.delete(t)&&(t._owner!=null&&z.size>0&&(hs(t),z.has(t))||Nr(t))}}function hs(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;z.has(r)&&(t=r),n=r._owner??null}if(t===null)return;z.delete(t),Nr(t)}}function Nr(e){if(Ce.size>0&&Ce.has(e)||e._hasComputedDep===!0&&!fs(e))return;if(ms(e)){gs(e),Ce.add(e);return}let t=Qn(e._cap??null);try{ds(e)}finally{t&&er()}}function Rr(){if(!(xe>0)){xe++,Et++;try{Cr()}finally{xe--,xe===0&&(Ee.length=0,z.clear(),Ce.size>0&&Ce.clear())}}}function Qt(e){e();let t=e._sig;if(!t)return;let n=us,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 z.has(s)||(z.add(s),Ee.push(s));i=i.sigNext}}}function Lr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?Qt(r):z.has(r)||(z.add(r),Ee.push(r))),n=n.sigNext}}function Mr(e){let n=e.subsHead;if(n){if(xe>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?Qt(o):z.has(o)||(z.add(o),Ee.push(o))),r=r.sigNext}return}xe++,Et++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?Qt(o):z.has(o)||(z.add(o),Ee.push(o))),r=r.sigNext}Cr()}finally{xe--,xe===0&&(Ee.length=0,z.clear(),Ce.size>0&&Ce.clear())}}}function Or(e){return e.__sc??0}function Dr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function Hr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var Pr="4.14.0",$r=Symbol.for("sibujs.reactive.v1");function Ss(){let e=globalThis,t=e[$r];if(t)return!t.__dupWarned&&(t.__dupWarned=!0,D(`Multiple instances of the reactive runtime detected on this page (active: ${t.version}, duplicate: ${Pr}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`)),t;let n={suspendTracking:en,resumeTracking:tn,isTrackingSuspended:vr,untracked:xr,retrack:on,track:Er,reactiveBinding:sn,recordDependency:kr,cleanup:je,setMaxSubscriberRepeats:Ar,setMaxDrainIterations:_r,drainNotificationQueue:Rr,queueSignalNotification:Lr,notifySubscribers:Mr,getSubscriberCount:Or,getSubscriberDeps:Dr,forEachSubscriber:Hr,getOwnerScope:nn,runWithOwnerScope:Tt,bindOwnerScope:rn,structuralBinding:Tr,version:Pr};return e[$r]=n,n}var H=Ss(),Ne=H.suspendTracking,Re=H.resumeTracking,Ir=H.isTrackingSuspended,re=H.untracked,Te=H.retrack,We=H.track,B=H.reactiveBinding,Le=H.recordDependency,Me=H.cleanup,Wu=H.setMaxSubscriberRepeats,Br=H.setMaxDrainIterations,Fr=H.drainNotificationQueue,zr=H.queueSignalNotification,Ve=H.notifySubscribers,Vu=H.getSubscriberCount,qu=H.getSubscriberDeps,Uu=H.forEachSubscriber,qe=H.getOwnerScope??nn,wt=H.runWithOwnerScope??Tt,W=H.bindOwnerScope??rn,Oe=H.structuralBinding??((e,t)=>({stop:H.reactiveBinding(e,t),run:n=>n()}));function nt(e,t,n){if(ve(t))return te(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){k(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}te(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return B(r,e)}function jr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){k(l,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(l){k(l,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),te(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=B(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var an=["data-focus-key","id","name"],vs=new Set(["text","search","url","tel","password",""]);function xs(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&vs.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 rt(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<an.length;i++){let s=t.getAttribute(an[i]);if(s){r=an[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...xs(t)}}function Es(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Ts(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 l=0;l<a.length;l++)r++,n??(n=a[l]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function Wr(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 Ue(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){Wr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=Ts(t,`[${e.attr}=${Es(e.value)}]`);if(s&&s.tagName===e.tag){Wr(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}q(()=>{let s=e.attr?` (${e.attr}="${e.value}")`:"",a=i?`several elements in the rebuilt subtree share ${e.attr}="${e.value}", so there is no way to tell which one the user was in \u2014 a shared name (a radio group) identifies a GROUP, not a control. Add a unique id or data-focus-key to each`:"no element in the rebuilt subtree carries the same identity. Give it a stable id, name, or data-focus-key that the rebuild reproduces";return`${n}: a reactive rebuild discarded the focused element <${e.tag.toLowerCase()}>${s} and could not re-establish it, so focus fell back to <body>. An in-progress edit ends here, and an in-progress IME composition is lost outright \u2014 a composition belongs to the DOM node, so it cannot survive the node being destroyed. ${a}, or stop the rebuild from happening: key the subtree with match(() => shapeKey(), { \u2026 }) so it is re-created only when the shape actually changes, and drive the rest with reactive attributes and text children, which mutate nodes in place instead of replacing them. If dropping focus is INTENDED here (closing a panel, say), pass { focus: "discard" } to when()/match() to silence this, or { focus: { restoreTo: element } } to send focus somewhere other than <body>.`})}function pe(e,t){let n=[],r=se();function o(){let i;try{i=j(r,t)}catch(f){k(f,{phase:"binding",name:"bindChildNode",node:e});return}let s=rt(n);if(i==null||typeof i=="boolean"){for(let f=0;f<n.length;f++){let m=n[f];L(m),m.parentNode&&m.parentNode.removeChild(m)}n.length=0,Ue(s,n,"bindChildNode");return}let a=e.parentNode;if(!a){n.length=0;return}let l;if(Array.isArray(i)){l=[];let f=new Set;for(let m=0;m<i.length;m++){let g=i[m];if(g==null||typeof g=="boolean")continue;let p=g instanceof Node?g:document.createTextNode(String(g));if(f.has(p)){D("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}f.add(p),l.push(p)}}else l=[i instanceof Node?i:document.createTextNode(String(i))];let c;if(n.length>0&&l.length>0){let f=new Set(n);c=new Set;for(let m=0;m<l.length;m++)f.has(l[m])&&c.add(l[m])}for(let f=0;f<n.length;f++){let m=n[f];c?.has(m)||(L(m),m.parentNode&&m.parentNode.removeChild(m))}let u=e;for(let f=0;f<l.length;f++){let m=l[f];u.nextSibling!==m&&a.insertBefore(m,u.nextSibling),u=m}n=l,Ue(s,l,"bindChildNode")}return B(o,e,!0)}function ln(){throw new Error('[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first. There is no global `document`, and SibuJS builds live DOM nodes, on the server too. For example: import { GlobalRegistrator } from "@happy-dom/global-registrator"; GlobalRegistrator.register(); See SSR in AGENTS.md \xA710.')}function U(){typeof document>"u"&&ln()}var R="http://www.w3.org/2000/svg",ws=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var cn=new Set,Vr=100,qr=!1,Ur=new Map;function Kr(e){let t=Ur.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Ur.set(e,t)),t}function ks(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=B(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",ht(String(a),{element:e}));return}let l=e.style;i&&(e.removeAttribute("style"),i=!1);let c=[];for(let u in a){if(!Object.hasOwn(a,u))continue;let f=a[u];if(f==null)continue;let m=Kr(u);c.push(m),l.setProperty(m,bt(m,String(f),{element:e}))}for(let u=0;u<o.length;u++)c.indexOf(o[u])===-1&&l.removeProperty(o[u]);o=c},e);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=Kr(r);if(typeof o=="function"){let s=o,a=B(()=>{n.style.setProperty(i,bt(i,String(s()),{element:e}))},e);E(e,a)}else n.style.setProperty(i,bt(i,String(o),{element:e}))}}function As(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=B(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);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=B(()=>{let a="";for(let l in n){if(!Object.hasOwn(n,l))continue;let c=n[l];(typeof c=="function"?c():c)&&(a=a?`${a} ${l}`:l)}e.setAttribute("class",a)},e);E(e,s)}else e.setAttribute("class",o)}function un(e,t){if(typeof t=="string"){e.textContent=t;return}if(typeof t=="number"){e.textContent=String(t);return}if(!(typeof t=="boolean"||t==null)){if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),E(e,pe(n,t));return}if(t instanceof Node){e.appendChild(t);return}if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),E(e,pe(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),E(e,pe(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=fr(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&ln();let i=Qe(e,t);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),un(i,o),i):(q(()=>{let g=r.trim().split(/\s+/);if(g.length<2)return"";let p=0;for(let h=0;h<g.length;h++){let y=g[h];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(y))return"";/[-:/0-9]/.test(y)&&p++}if(p<2)return"";let b=`${e}|${r}`;return cn.has(b)?"":cn.size>=Vr?qr?"":(qr=!0,`tagFactory: ${Vr} distinct lone-string class warnings have been reported; suppressing further ones for the rest of this session so they cannot flood the console. Fix the reported ones and reload to see any that remain.`):(cn.add(b),`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`)}),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return un(i,r),i;let s=r,a=s.class;a!=null&&As(i,a);let l=s.id;typeof l=="function"?E(i,nt(i,"id",l)):l!=null&&(typeof l=="string"&&ws.has(l.toLowerCase())&&D(`tagFactory: element id="${l}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=l);let c=o!==void 0?o:s.nodes;c!=null&&un(i,c);let u=s.on;if(u)for(let g in u){if(!Object.hasOwn(u,g))continue;let p=u[g];typeof p=="function"?i.addEventListener(g,p):D(`tagFactory: on.${g} handler is not a function (got ${typeof p}). Event listener was not attached.`)}let f=s.style;f!=null&&ks(i,f);let m=s.ref;m&&(m.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 p=s[g];if(p==null||ve(g))continue;typeof p=="function"?E(i,nt(i,g,p)):te(i,g,p,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var xd=d("html"),_s=d("head"),Cs=d("body"),Ns=d("title"),_=d("div"),$=d("span"),Rs=d("section"),Ls=d("article"),Ms=d("header"),Os=d("footer"),Ds=d("nav"),Hs=d("main"),Ps=d("aside"),$s=d("address"),dn=d("p"),Is=d("h1"),Bs=d("h2"),fn=d("h3"),Fs=d("h4"),zs=d("h5"),js=d("h6"),Ws=d("blockquote"),Vs=d("dd"),qs=d("dl"),Us=d("dt"),Ks=d("figcaption"),Js=d("figure"),Gs=d("hr"),Ys=d("li"),Zs=d("ol"),Xs=d("ul"),pn=d("pre"),Qs=d("a"),ea=d("abbr"),ta=d("b"),na=d("bdi"),ra=d("bdo"),oa=d("br"),ia=d("cite"),mn=d("code"),sa=d("data"),aa=d("dfn"),la=d("em"),ca=d("i"),ua=d("kbd"),da=d("mark"),fa=d("q"),pa=d("rp"),ma=d("rt"),ga=d("ruby"),ba=d("s"),ha=d("samp"),ya=d("small"),Sa=d("strong"),va=d("sub"),xa=d("sup"),Ea=d("time"),Ta=d("u"),wa=d("var"),ka=d("area"),Aa=d("audio"),_a=d("img"),Ca=d("map"),Na=d("track"),Ra=d("video"),La=d("embed"),Ma=d("iframe"),Oa=d("object"),Da=d("param"),Ha=d("picture"),Pa=d("portal"),$a=d("source"),Ia=d("svg",R),Ba=d("math"),Fa=d("canvas"),za=d("noscript"),ja=d("script"),Wa=d("del"),Va=d("ins"),qa=d("caption"),Ua=d("col"),Ka=d("colgroup"),Ja=d("table"),Ga=d("tbody"),Ya=d("td"),Za=d("tfoot"),Xa=d("th"),Qa=d("thead"),el=d("tr"),ot=d("button"),tl=d("datalist"),nl=d("fieldset"),rl=d("form"),ol=d("input"),il=d("label"),sl=d("legend"),al=d("meter"),ll=d("optgroup"),cl=d("option"),ul=d("output"),dl=d("progress"),fl=d("select"),pl=d("textarea"),ml=d("details"),gl=d("dialog"),bl=d("menu"),hl=d("summary"),yl=d("slot"),Sl=d("template"),vl=d("base"),xl=d("link"),El=d("meta"),De=d("style"),Tl=d("circle",R),wl=d("ellipse",R),kl=d("g",R),Al=d("line",R),_l=d("path",R),Cl=d("polygon",R),Nl=d("polyline",R),Rl=d("rect",R),Ll=d("text",R),Ml=d("tspan",R),Ol=d("defs",R),Dl=d("clipPath",R),Hl=d("mask",R),Pl=d("pattern",R),$l=d("linearGradient",R),Il=d("radialGradient",R),Bl=d("stop",R),Fl=d("use",R),zl=d("symbol",R),jl=d("marker",R),Wl=d("center"),Vl=d("font"),ql=d("marquee"),Ul=e=>d(e);var Jr,gn=globalThis[Jr=Symbol.for("sibujs.streamBoundary.v1")]??(globalThis[Jr]={hook:null,current:null});function Gr(e){return gn.hook?gn.hook(e):null}function kt(){return gn.current}var bn=Symbol.for("sibujs.ssr.v1");function Kl(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let n=null,r=process.getBuiltinModule;typeof r=="function"?n=r("node:async_hooks"):typeof $t=="function"&&(n=$t("async_hooks")),n&&(e=new n.AsyncLocalStorage)}let t=globalThis.AsyncLocalStorage;!e&&typeof t=="function"&&(e=new t)}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var we=globalThis[bn]??(globalThis[bn]=Kl()),Pe=we.als,He=we.fallbackStore;we.fallbackDepth??(we.fallbackDepth=0);var Yr=!1;function Jl(){if(Yr||Pe||!(typeof process<"u"&&!!process.versions?.node))return;Yr=!0;let t=process.versions.node;D(`SSR request isolation is UNAVAILABLE on this runtime (Node ${t}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function ke(){if(Pe){let e=Pe.getStore();if(e)return e}return He}function hn(){return Pe?Pe.getStore()??null:we.fallbackDepth>0?He:null}function V(){return ke().ssr}function Zr(e){if(!V())return null;let t=ke(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}var Gl=Symbol.for("sibujs.prerender.v1");function it(){return ke().ssr||globalThis[Gl]!==void 0}function Xr(){return!it()}function Qr(){ke().ssr=!0}function eo(){ke().ssr=!1}function to(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0,pending:new Set,wake:null};if(Pe)return Pe.run(t,e);Jl();let n={...He};Object.assign(He,t),we.fallbackDepth++;try{return e()}finally{we.fallbackDepth--;for(let r of Object.keys(He))r in n||delete He[r];Object.assign(He,n)}}function no(e,t,n=!0){let r=hn(),o=r?.pending,i=o||!n?[]:zt();if(!o&&i.length===0)return e;let s={label:t,since:Date.now(),boundary:kt()??void 0};o?.add(s);let a=Zn(i,s),l=()=>{o?.delete(s),r?.wake?.(),a()};try{Promise.resolve(e).then(l,l)}catch{l()}return e}function ro(e){let t=ke(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var yn="__sibuPendingError";function oo(e,t){let n=()=>e.parentNode?(k(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[yn]=t)})}function At(e){let t=e,n=t[yn];if(n instanceof Error)return delete t[yn],n}function io(e){let t=null;return function(){if(t&&!Un())return t();let r=_({class:"sibu-lazy"}),o=se(),i=kt(),s=!1,a=j(null,()=>$("sibu-lazy-loading","Loading..."));if(t){let l=t;return G(r,j(o,()=>l())),r}return no(e(),"lazy").then(W(l=>{if(s)return;t=l.default;let c=t,u=()=>j(o,()=>c()),f=i?i.enter(u):u();G(r,f)})).catch(l=>{if(s)return;let c=l instanceof Error?l:new Error(String(l));G(r,_({class:"sibu-lazy-error"},`Failed to load component: ${c.message}`)),oo(r,c)}),ce()&&r.firstChild||r.appendChild(a),E(r,()=>{s=!0}),r}}function so({nodes:e,fallback:t}){let n=_({class:"sibu-suspense"}),r=se(),o=Gr(n),i=f=>{G(n,f),o?.done()},s=j(null,t);ce()&&n.firstChild?L(s):n.appendChild(s);let a=!1,l=null,c=null;E(n,()=>{a=!0,l&&(l.disconnect(),l=null),c&&!n.contains(c)&&L(c)});let u=W(()=>{if(!a)try{let f=o?o.enter(()=>j(r,e)):j(r,e);if(c=f,f.classList.contains("sibu-lazy")){if(!f.querySelector(".sibu-lazy-loading")){i(f);return}l=new MutationObserver(()=>{if(a)return;f.querySelector(".sibu-lazy-loading")||(l?.disconnect(),l=null,i(f))}),l.observe(f,{childList:!0,subtree:!0})}else i(f)}catch(f){let m=f instanceof Error?f:new Error(String(f));oo(n,m)}});return queueMicrotask(u),n}function En(e,t){return()=>qe()===e?t():wt(e,t)}function Ct(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";k(n,{phase:r,name:t});return}}function Sn(e,t,n,r,o){let i=Ct(e,t);if(typeof i!="function")return;let s=En(o,i);r()||!n.isConnected?Ct(s,"onUnmount"):lo(s,n)}var Ke=new WeakMap,$e=new WeakMap,me=new Set,ge=new Set,Je=null,_t=0,Yl=256;function vn(e){let t=Ke.get(e);if(t){Ke.delete(e),me.delete(e);for(let n of t)try{n()}catch{}}}function xn(e){$e.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=$e.get(e);if(n){$e.delete(e),ge.delete(e);for(let r of n)try{r()}catch{}}})}function Zl(e){if(me.size===0||e.nodeType!==1)return;let t=e;if(me.has(t)&&t.isConnected&&vn(t),t.firstElementChild)for(let n of Array.from(me))n!==t&&n.isConnected&&t.contains(n)&&vn(n)}function Xl(e){if(ge.size===0||e.nodeType!==1)return;let t=e;if(ge.has(t)&&!t.isConnected&&xn(t),t.firstElementChild)for(let n of Array.from(ge))n!==t&&!n.isConnected&&t.contains(n)&&xn(n)}function Ql(){if(me.size>0)for(let e of Array.from(me))e.isConnected&&vn(e);if(ge.size>0)for(let e of Array.from(ge))e.isConnected||xn(e)}function ao(){Je||typeof document>"u"||(Je=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++)Zl(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)Xl(t.removedNodes[n])}_t+=e.length,_t>=Yl&&(_t=0,Ql()),Tn()}),Je.observe(document.body,{childList:!0,subtree:!0}))}function Tn(){Je&&me.size===0&&ge.size===0&&(Je.disconnect(),Je=null,_t=0)}function ec(e,t){let n=Ke.get(e);return n||(n=[],Ke.set(e,n)),n.push(t),me.add(e),ao(),()=>{let r=Ke.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Ke.delete(e),me.delete(e))}Tn()}}function tc(e,t){let n=$e.get(e);return n||(n=[],$e.set(e,n)),n.push(t),ge.add(e),ao(),()=>{let r=$e.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&($e.delete(e),ge.delete(e))}Tn()}}function Nt(e,t){if(typeof document>"u"||V())return;let n=qe();if(e=En(n,e),t){let r=!1,o=()=>r;if(E(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||Sn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){Sn(e,"onMount",t,o,n);return}let i=ec(t,()=>{r||Sn(e,"onMount",t,o,n)});E(t,i)})}else queueMicrotask(()=>{Ct(e,"onMount")})}function nc(e,t){typeof document>"u"||V()||lo(En(qe(),e),t)}function lo(e,t){let n=!1,r=()=>{n||(n=!0,Ct(e,"onUnmount"))};E(t,r);let o=()=>{if(n)return;let i=tc(t,r);E(t,i)};t.isConnected?o():Nt(()=>{o()},t)}function rc(e,t){E(t,e)}function Q(e,t,n){try{e.emit(t,n)}catch{}}var po=globalThis;function oc(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,re(()=>t(o,void 0));else{let i=n;n=o,re(()=>t(o,i))}}}var co=100;function Rt(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===qe()?uo(t):wt(n,()=>uo(t))}function uo(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){k(n,{phase:"cleanup"})}}function fo(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&Rt(e),Te(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=co);e.rerunPending&&(e.rerunPending=!1,k(new Error(`effect re-requested itself ${co}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function ic(e){if(e.disposed)return;e.disposed=!0;let t=po.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Rt(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{Me(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function ee(e,t){if(O(typeof e=="function","effect: argument must be a function."),V()&&!t?.server)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&&Rt(n),Te(n.bodyFn,o),n.rerunPending&&fo(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{Te(n.bodyFn,n.subscriber),n.rerunPending&&fo(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&Rt(n),Me(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=po.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&Q(i,"effect:create",{effectFn:e}),()=>ic(n)}var st=0,wn=new Set;function sc(e){st++;try{return e()}finally{st--,st===0&&cc()}}function ac(e){return st===0?!1:(wn.add(e),!0)}function lc(){return st>0}function cc(){try{for(let e of wn)zr(e)}finally{wn.clear()}Fr()}var mo=Symbol.for("sibujs.reactive.batch.v1");function uc(){let e=globalThis,t=e[mo];if(t)return t;let n={batch:sc,enqueueBatchedSignal:ac,isBatching:lc};return e[mo]=n,n}var kn=uc(),K=kn.batch,Ie=kn.enqueueBatchedSignal,dc=kn.isBatching;var An=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=t?.name,o=t?.equals;r&&(n.__name=r);function i(){return Le(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let l=n.value,c=typeof a=="function"?a(l):a;if(!o(l,c)){if(n.value=c,n.__v++,!0){let u=An.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&Q(u,"signal:update",{signal:n,name:r,oldValue:l,newValue:c})}Ie(n)||Ve(n)}}:s=a=>{let l=n.value,c=typeof a=="function"?a(l):a;if(Object.is(c,l))return;n.value=c,n.__v++;let u=An.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&Q(u,"signal:update",{signal:n,name:r,oldValue:l,newValue:c}),Ie(n)||Ve(n)},!0){let a=An.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&Q(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function fc(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 yt(e){let t=0,n=e.length;for(;t<n&&_e(e[t]);)t++;for(;n>t&&_e(e[n-1]);)n--;return e.slice(t,n)}var Z=e=>({kind:"forbidden",reason:e});function Bi(e){let t=yt(Fe(e));if(t==="")return Z("empty content");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return Z("missing or non-numeric delay");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return Z("unparseable delay");for(;n<t.length&&_e(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return Z("unexpected text after delay");for(n++;n<t.length&&_e(t[n]);)n++;let o=n;for(;n<t.length&&!_e(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return Z(`unsupported refresh key ${JSON.stringify(i)}`);for(;n<t.length&&_e(t[n]);)n++;if(t[n]!=="=")return Z("missing '=' after url");for(n++;n<t.length&&_e(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let c=t.indexOf(a,n+1);if(c===-1)return Z("unterminated quoted destination");if(s=t.slice(n+1,c),yt(t.slice(c+1))!=="")return Z("trailing text after quoted destination")}else if(s=yt(t.slice(n)),/[;,]/.test(s))return Z("multiple refresh assignments");if(s==="")return Z("empty destination");let l=gt(s);return l===""?Z("destination uses a disallowed protocol"):{kind:"allowed",delay:r,destination:s,sanitizedDestination:l}}function Kt(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=Y(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?Z(`duplicate case-insensitive attribute ${JSON.stringify(r)}`):typeof t!="string"?{kind:"not-refresh"}:yt(Fe(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:Bi(n)}var Fi="http://www.w3.org/1999/xhtml",zi="http://www.w3.org/2000/svg",ji=new Set(["script","iframe","object","embed","frame","frameset"]);function dr(e){return Y(e)}function fr(e){return ji.has(dr(e))}var Wi=new Set(["script","style"]);function pr(e){return Wi.has(dr(e))}var M={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},Vi=new Set(["src","href","xlink:href","type","language"]),qi=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),Jt=new WeakSet;function mr(e){return e.namespaceURI===Fi||e.namespaceURI===null}function gr(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 Ui(e){Jt.has(e)||(Jt.add(e),e.getAttribute("content")!==null&&Kt(gr(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function Ki(e,t,n,r){if(!mr(e))return M.None;let o=Y(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&Ui(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return M.None;let i=Kt(gr(e,o,n));return i.kind==="forbidden"?M.MetaRefreshForbidden:i.kind!=="not-refresh"&&Jt.has(e)?M.MetaRefreshReactive:M.None}function Ji(e,t){if(t===null||Y(e)!=="attributename")return M.None;let n=Fe(t);return lr(n)||ve(n)||tt(n)?M.AnimationTarget:M.None}var St=new WeakSet;function ur(e){if(e===null)return!1;let t=Y(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 Gi(e,t,n,r){if(!mr(e))return M.None;let o=Y(t);return o==="href"?r==="static"||n===null?M.None:ur(e.getAttribute("rel"))?M.StylesheetSource:(St.add(e),M.None):o==="rel"&&ur(n)&&St.has(e)&&e.hasAttribute("href")?M.StylesheetSource:M.None}function Gt(e,t,n,r){let o=e.localName;return o==="meta"?Ki(e,t,n,r):o==="link"?Gi(e,t,n,r):o==="script"?r==="static"||n===null?M.None:Vi.has(Y(t))?M.ScriptSource:M.None:qi.has(o)&&e.namespaceURI===zi?Ji(t,n):M.None}function Yt(e,t,n){e.localName!=="link"||Y(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?St.add(e):St.delete(e))}var Yi="http://www.w3.org/1999/xhtml",Zi="http://www.w3.org/2000/svg",Xi="http://www.w3.org/1999/xlink",Qi="http://www.w3.org/XML/1998/namespace",es=new Set(["checked","disabled","selected"]);function ts(e){return e.namespaceURI===null||e.namespaceURI===Yi}function hr(e,t,n){q(()=>`${e}: refusing "${t}" in this element's context \u2014 ${["",'the element would become a <meta http-equiv="refresh"> directive the shared refresh policy forbids (a destination outside the URL allowlist, or a directive too malformed to read unambiguously)',"a <meta> whose http-equiv or content is reactive may never carry a refresh directive: a browser schedules the navigation as soon as the directive is valid, and nothing can withdraw it when the state changes back","a runtime value may not choose the program a <script> runs; name the script in static template source, or load it through Head({ script }) as an explicit trust decision","an SVG animation may not target a URL, event-handler or nested-document attribute; its to / values would be written into that attribute without passing the URL policy",'a runtime-chosen href may not become an applied <link rel="stylesheet">: a well-formed URL is not a trusted stylesheet. Name the stylesheet in static template source, or load a runtime-chosen one through Head({ link }) as an explicit trust decision'][n]}. The write was not performed.`)}function br(e,t,n){e[t]=n}function ns(e,t){if(e.namespaceURI!==Zi)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?Xi:n.startsWith("xml:")?Qi:null}function te(e,t,n,r={}){let o=rs(e,t,n,r);return e.localName==="link"&&Yt(e,t,r.reactive?"reactive":"runtime"),o}function rs(e,t,n,r){let o=ns(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(ve(t))return D(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${t}". Its value would be evaluated as JavaScript. Use on:{ ${t.slice(2)}: fn } instead.`),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!==M.None)return hr(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(tt(t))return D(`${r.label??"setSafeAttribute"}: refusing to set "${t}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let l=ts(e),c=l?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 l&&es.has(c)&&c in e?br(e,c,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let u=String(n);if(r.syncValueProperty!==!1&&l&&(c==="value"||c==="checked")&&c in e)return br(e,c,c==="checked"?!!n:u),!0;let f=u===""?"":cr(t,u,{element:e});return f===null?(o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0):((o?e.getAttributeNS(o,i):e.getAttribute(t))===f||(o?e.setAttributeNS(o,t,f):e.setAttribute(t,f)),!0)}function Zt(e,t,n){if(tt(t))return D(`html: refusing static attribute "${t}" \u2014 the browser parses it as a nested document.`),!1;let r=Gt(e,t,n,"static");return r!==M.None?(hr("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&Yt(e,t,"static"),!0)}var os=4096,Xt=[];function is(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function ss(e,t,n){let r=Xt.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=is();return o.sig=e,o.sub=t,o.epoch=n,o}function yr(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,Xt.length<os&&Xt.push(e)}function as(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 Sr(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 ls(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function cs(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 ne=null,de=null,xe=0,Ee=[],z=new Set,us=[];function ds(e){try{e()}catch(t){let n=e;k(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function fs(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 le=0,fe=!1;function en(){le===0&&(de=ne,ne=null,fe=!0),le++}function tn(){le--,le===0&&(ne=de,de=null,fe=!1)}function vr(){return fe}function xr(e){en();try{return e()}finally{tn()}}var X=null;function nn(){return X}function Tt(e,t){let n=X;X=e;try{return t()}finally{X=n}}function rn(e){let t=X;return t===null?e:(...n)=>Tt(t,()=>e(...n))}var ze=null,ps=0;function on(e,t){let n=ne,r=0,o=null;fe&&(r=le,o=de,le=0,de=null,fe=!1),ne=t;let i=t;i._cap===void 0&&(i._cap=Xn());let s=X;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(X=a);let l=ze;l!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=l),i._tok!=null&&(ze=i._tok);let c=++ps;i._epoch=c,i._structDirty=!1;for(let u=i.depsHead??null;u!==null;u=u.subNext){let f=u.sig;u.prevActive=f.__activeNode??null,f.__activeNode=u}try{e()}finally{ne=n,X=s,ze=l,r!==0&&(le=r,de=o,fe=!0);let u=i.depsHead??null;for(;u!==null;){let f=u.subNext,m=u.sig;m.__activeNode=u.prevActive,u.prevActive=null,u.epoch!==c&&(cs(u),Sr(u),yr(u)),u=f}}}function Er(e,t){if(!t)return sn(e);je(t);let n=ne,r=0,o=null;fe&&(r=le,o=de,le=0,de=null,fe=!1),ne=t;let i=t;i._scope===void 0&&(i._scope=X);let s=X;X=i._scope;try{e()}finally{ne=n,X=s,r!==0&&(le=r,de=o,fe=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let l=a.sig;l.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>je(t))}function sn(e,t,n){return wr(e,t,n===!0)._dispose}function Tr(e,t){let n=wr(e,t,!0);return{stop:n._dispose,run:r=>{let o=ze;ze=n._tok??null;try{return r()}finally{ze=o}}}}function wr(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{on(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),je(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),je(o)},o}function kr(e){if(!ne)return;let t=ne,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=ss(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,ls(t,i),as(n,i),t._structDirty=!0}function je(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;Sr(n),yr(n),n=r}}var vt=1e3,xt=1e6,Et=0,Ce=new Set;function Ar(e){let t=vt;return Number.isFinite(e)&&e>0&&(vt=Math.floor(e)),t}function _r(e){let t=xt;return Number.isFinite(e)&&e>0&&(xt=Math.floor(e)),t}function ms(e){let t=e;return t._runEpoch!==Et?(t._runEpoch=Et,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>vt)}function gs(e){let t=e.__name??"<unnamed>";k(new Error(`subscriber "${t}" fired more than ${vt} 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 bs(){k(new Error(`Notification drain exceeded ${xt} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function Cr(){let e=0;for(;e<Ee.length;){if(e>=xt){bs();break}let t=Ee[e++];z.delete(t)&&(t._owner!=null&&z.size>0&&(hs(t),z.has(t))||Nr(t))}}function hs(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;z.has(r)&&(t=r),n=r._owner??null}if(t===null)return;z.delete(t),Nr(t)}}function Nr(e){if(Ce.size>0&&Ce.has(e)||e._hasComputedDep===!0&&!fs(e))return;if(ms(e)){gs(e),Ce.add(e);return}let t=Qn(e._cap??null);try{ds(e)}finally{t&&er()}}function Rr(){if(!(xe>0)){xe++,Et++;try{Cr()}finally{xe--,xe===0&&(Ee.length=0,z.clear(),Ce.size>0&&Ce.clear())}}}function Qt(e){e();let t=e._sig;if(!t)return;let n=us,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 z.has(s)||(z.add(s),Ee.push(s));i=i.sigNext}}}function Lr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?Qt(r):z.has(r)||(z.add(r),Ee.push(r))),n=n.sigNext}}function Mr(e){let n=e.subsHead;if(n){if(xe>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?Qt(o):z.has(o)||(z.add(o),Ee.push(o))),r=r.sigNext}return}xe++,Et++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?Qt(o):z.has(o)||(z.add(o),Ee.push(o))),r=r.sigNext}Cr()}finally{xe--,xe===0&&(Ee.length=0,z.clear(),Ce.size>0&&Ce.clear())}}}function Or(e){return e.__sc??0}function Dr(e){let t=e,n=[],r=t.depsHead??null;for(;r;)r.sig&&n.push(r.sig),r=r.subNext;return n}function Hr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var Pr="4.14.1",$r=Symbol.for("sibujs.reactive.v1");function Ss(){let e=globalThis,t=e[$r];if(t)return!t.__dupWarned&&(t.__dupWarned=!0,D(`Multiple instances of the reactive runtime detected on this page (active: ${t.version}, duplicate: ${Pr}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`)),t;let n={suspendTracking:en,resumeTracking:tn,isTrackingSuspended:vr,untracked:xr,retrack:on,track:Er,reactiveBinding:sn,recordDependency:kr,cleanup:je,setMaxSubscriberRepeats:Ar,setMaxDrainIterations:_r,drainNotificationQueue:Rr,queueSignalNotification:Lr,notifySubscribers:Mr,getSubscriberCount:Or,getSubscriberDeps:Dr,forEachSubscriber:Hr,getOwnerScope:nn,runWithOwnerScope:Tt,bindOwnerScope:rn,structuralBinding:Tr,version:Pr};return e[$r]=n,n}var H=Ss(),Ne=H.suspendTracking,Re=H.resumeTracking,Ir=H.isTrackingSuspended,re=H.untracked,Te=H.retrack,We=H.track,B=H.reactiveBinding,Le=H.recordDependency,Me=H.cleanup,Wu=H.setMaxSubscriberRepeats,Br=H.setMaxDrainIterations,Fr=H.drainNotificationQueue,zr=H.queueSignalNotification,Ve=H.notifySubscribers,Vu=H.getSubscriberCount,qu=H.getSubscriberDeps,Uu=H.forEachSubscriber,qe=H.getOwnerScope??nn,wt=H.runWithOwnerScope??Tt,W=H.bindOwnerScope??rn,Oe=H.structuralBinding??((e,t)=>({stop:H.reactiveBinding(e,t),run:n=>n()}));function nt(e,t,n){if(ve(t))return te(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){k(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}te(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return B(r,e)}function jr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){k(l,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(l){k(l,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),te(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=B(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var an=["data-focus-key","id","name"],vs=new Set(["text","search","url","tel","password",""]);function xs(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&vs.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 rt(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<an.length;i++){let s=t.getAttribute(an[i]);if(s){r=an[i],o=s;break}}return{el:t,attr:r,value:o,tag:t.tagName,...xs(t)}}function Es(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Ts(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 l=0;l<a.length;l++)r++,n??(n=a[l]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function Wr(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 Ue(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){Wr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=Ts(t,`[${e.attr}=${Es(e.value)}]`);if(s&&s.tagName===e.tag){Wr(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}q(()=>{let s=e.attr?` (${e.attr}="${e.value}")`:"",a=i?`several elements in the rebuilt subtree share ${e.attr}="${e.value}", so there is no way to tell which one the user was in \u2014 a shared name (a radio group) identifies a GROUP, not a control. Add a unique id or data-focus-key to each`:"no element in the rebuilt subtree carries the same identity. Give it a stable id, name, or data-focus-key that the rebuild reproduces";return`${n}: a reactive rebuild discarded the focused element <${e.tag.toLowerCase()}>${s} and could not re-establish it, so focus fell back to <body>. An in-progress edit ends here, and an in-progress IME composition is lost outright \u2014 a composition belongs to the DOM node, so it cannot survive the node being destroyed. ${a}, or stop the rebuild from happening: key the subtree with match(() => shapeKey(), { \u2026 }) so it is re-created only when the shape actually changes, and drive the rest with reactive attributes and text children, which mutate nodes in place instead of replacing them. If dropping focus is INTENDED here (closing a panel, say), pass { focus: "discard" } to when()/match() to silence this, or { focus: { restoreTo: element } } to send focus somewhere other than <body>.`})}function pe(e,t){let n=[],r=se();function o(){let i;try{i=j(r,t)}catch(f){k(f,{phase:"binding",name:"bindChildNode",node:e});return}let s=rt(n);if(i==null||typeof i=="boolean"){for(let f=0;f<n.length;f++){let m=n[f];L(m),m.parentNode&&m.parentNode.removeChild(m)}n.length=0,Ue(s,n,"bindChildNode");return}let a=e.parentNode;if(!a){n.length=0;return}let l;if(Array.isArray(i)){l=[];let f=new Set;for(let m=0;m<i.length;m++){let g=i[m];if(g==null||typeof g=="boolean")continue;let p=g instanceof Node?g:document.createTextNode(String(g));if(f.has(p)){D("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}f.add(p),l.push(p)}}else l=[i instanceof Node?i:document.createTextNode(String(i))];let c;if(n.length>0&&l.length>0){let f=new Set(n);c=new Set;for(let m=0;m<l.length;m++)f.has(l[m])&&c.add(l[m])}for(let f=0;f<n.length;f++){let m=n[f];c?.has(m)||(L(m),m.parentNode&&m.parentNode.removeChild(m))}let u=e;for(let f=0;f<l.length;f++){let m=l[f];u.nextSibling!==m&&a.insertBefore(m,u.nextSibling),u=m}n=l,Ue(s,l,"bindChildNode")}return B(o,e,!0)}function ln(){throw new Error('[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first. There is no global `document`, and SibuJS builds live DOM nodes, on the server too. For example: import { GlobalRegistrator } from "@happy-dom/global-registrator"; GlobalRegistrator.register(); See SSR in AGENTS.md \xA710.')}function U(){typeof document>"u"&&ln()}var R="http://www.w3.org/2000/svg",ws=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var cn=new Set,Vr=100,qr=!1,Ur=new Map;function Kr(e){let t=Ur.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Ur.set(e,t)),t}function ks(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=B(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",ht(String(a),{element:e}));return}let l=e.style;i&&(e.removeAttribute("style"),i=!1);let c=[];for(let u in a){if(!Object.hasOwn(a,u))continue;let f=a[u];if(f==null)continue;let m=Kr(u);c.push(m),l.setProperty(m,bt(m,String(f),{element:e}))}for(let u=0;u<o.length;u++)c.indexOf(o[u])===-1&&l.removeProperty(o[u]);o=c},e);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=Kr(r);if(typeof o=="function"){let s=o,a=B(()=>{n.style.setProperty(i,bt(i,String(s()),{element:e}))},e);E(e,a)}else n.style.setProperty(i,bt(i,String(o),{element:e}))}}function As(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=B(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);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=B(()=>{let a="";for(let l in n){if(!Object.hasOwn(n,l))continue;let c=n[l];(typeof c=="function"?c():c)&&(a=a?`${a} ${l}`:l)}e.setAttribute("class",a)},e);E(e,s)}else e.setAttribute("class",o)}function un(e,t){if(typeof t=="string"){e.textContent=t;return}if(typeof t=="number"){e.textContent=String(t);return}if(!(typeof t=="boolean"||t==null)){if(typeof t=="function"){let n=document.createComment("");e.appendChild(n),E(e,pe(n,t));return}if(t instanceof Node){e.appendChild(t);return}if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="function"){let o=document.createComment("");e.appendChild(o),E(e,pe(o,r))}else if(r instanceof Node)e.appendChild(r);else if(Array.isArray(r))for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function"){let s=document.createComment("");e.appendChild(s),E(e,pe(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=fr(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&ln();let i=Qe(e,t);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),un(i,o),i):(q(()=>{let g=r.trim().split(/\s+/);if(g.length<2)return"";let p=0;for(let h=0;h<g.length;h++){let y=g[h];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(y))return"";/[-:/0-9]/.test(y)&&p++}if(p<2)return"";let b=`${e}|${r}`;return cn.has(b)?"":cn.size>=Vr?qr?"":(qr=!0,`tagFactory: ${Vr} distinct lone-string class warnings have been reported; suppressing further ones for the rest of this session so they cannot flood the console. Fix the reported ones and reload to see any that remain.`):(cn.add(b),`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`)}),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return un(i,r),i;let s=r,a=s.class;a!=null&&As(i,a);let l=s.id;typeof l=="function"?E(i,nt(i,"id",l)):l!=null&&(typeof l=="string"&&ws.has(l.toLowerCase())&&D(`tagFactory: element id="${l}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=l);let c=o!==void 0?o:s.nodes;c!=null&&un(i,c);let u=s.on;if(u)for(let g in u){if(!Object.hasOwn(u,g))continue;let p=u[g];typeof p=="function"?i.addEventListener(g,p):D(`tagFactory: on.${g} handler is not a function (got ${typeof p}). Event listener was not attached.`)}let f=s.style;f!=null&&ks(i,f);let m=s.ref;m&&(m.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 p=s[g];if(p==null||ve(g))continue;typeof p=="function"?E(i,nt(i,g,p)):te(i,g,p,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var xd=d("html"),_s=d("head"),Cs=d("body"),Ns=d("title"),_=d("div"),$=d("span"),Rs=d("section"),Ls=d("article"),Ms=d("header"),Os=d("footer"),Ds=d("nav"),Hs=d("main"),Ps=d("aside"),$s=d("address"),dn=d("p"),Is=d("h1"),Bs=d("h2"),fn=d("h3"),Fs=d("h4"),zs=d("h5"),js=d("h6"),Ws=d("blockquote"),Vs=d("dd"),qs=d("dl"),Us=d("dt"),Ks=d("figcaption"),Js=d("figure"),Gs=d("hr"),Ys=d("li"),Zs=d("ol"),Xs=d("ul"),pn=d("pre"),Qs=d("a"),ea=d("abbr"),ta=d("b"),na=d("bdi"),ra=d("bdo"),oa=d("br"),ia=d("cite"),mn=d("code"),sa=d("data"),aa=d("dfn"),la=d("em"),ca=d("i"),ua=d("kbd"),da=d("mark"),fa=d("q"),pa=d("rp"),ma=d("rt"),ga=d("ruby"),ba=d("s"),ha=d("samp"),ya=d("small"),Sa=d("strong"),va=d("sub"),xa=d("sup"),Ea=d("time"),Ta=d("u"),wa=d("var"),ka=d("area"),Aa=d("audio"),_a=d("img"),Ca=d("map"),Na=d("track"),Ra=d("video"),La=d("embed"),Ma=d("iframe"),Oa=d("object"),Da=d("param"),Ha=d("picture"),Pa=d("portal"),$a=d("source"),Ia=d("svg",R),Ba=d("math"),Fa=d("canvas"),za=d("noscript"),ja=d("script"),Wa=d("del"),Va=d("ins"),qa=d("caption"),Ua=d("col"),Ka=d("colgroup"),Ja=d("table"),Ga=d("tbody"),Ya=d("td"),Za=d("tfoot"),Xa=d("th"),Qa=d("thead"),el=d("tr"),ot=d("button"),tl=d("datalist"),nl=d("fieldset"),rl=d("form"),ol=d("input"),il=d("label"),sl=d("legend"),al=d("meter"),ll=d("optgroup"),cl=d("option"),ul=d("output"),dl=d("progress"),fl=d("select"),pl=d("textarea"),ml=d("details"),gl=d("dialog"),bl=d("menu"),hl=d("summary"),yl=d("slot"),Sl=d("template"),vl=d("base"),xl=d("link"),El=d("meta"),De=d("style"),Tl=d("circle",R),wl=d("ellipse",R),kl=d("g",R),Al=d("line",R),_l=d("path",R),Cl=d("polygon",R),Nl=d("polyline",R),Rl=d("rect",R),Ll=d("text",R),Ml=d("tspan",R),Ol=d("defs",R),Dl=d("clipPath",R),Hl=d("mask",R),Pl=d("pattern",R),$l=d("linearGradient",R),Il=d("radialGradient",R),Bl=d("stop",R),Fl=d("use",R),zl=d("symbol",R),jl=d("marker",R),Wl=d("center"),Vl=d("font"),ql=d("marquee"),Ul=e=>d(e);var Jr,gn=globalThis[Jr=Symbol.for("sibujs.streamBoundary.v1")]??(globalThis[Jr]={hook:null,current:null});function Gr(e){return gn.hook?gn.hook(e):null}function kt(){return gn.current}var bn=Symbol.for("sibujs.ssr.v1");function Kl(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let n=null,r=process.getBuiltinModule;typeof r=="function"?n=r("node:async_hooks"):typeof $t=="function"&&(n=$t("async_hooks")),n&&(e=new n.AsyncLocalStorage)}let t=globalThis.AsyncLocalStorage;!e&&typeof t=="function"&&(e=new t)}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var we=globalThis[bn]??(globalThis[bn]=Kl()),Pe=we.als,He=we.fallbackStore;we.fallbackDepth??(we.fallbackDepth=0);var Yr=!1;function Jl(){if(Yr||Pe||!(typeof process<"u"&&!!process.versions?.node))return;Yr=!0;let t=process.versions.node;D(`SSR request isolation is UNAVAILABLE on this runtime (Node ${t}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function ke(){if(Pe){let e=Pe.getStore();if(e)return e}return He}function hn(){return Pe?Pe.getStore()??null:we.fallbackDepth>0?He:null}function V(){return ke().ssr}function Zr(e){if(!V())return null;let t=ke(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}var Gl=Symbol.for("sibujs.prerender.v1");function it(){return ke().ssr||globalThis[Gl]!==void 0}function Xr(){return!it()}function Qr(){ke().ssr=!0}function eo(){ke().ssr=!1}function to(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0,pending:new Set,wake:null};if(Pe)return Pe.run(t,e);Jl();let n={...He};Object.assign(He,t),we.fallbackDepth++;try{return e()}finally{we.fallbackDepth--;for(let r of Object.keys(He))r in n||delete He[r];Object.assign(He,n)}}function no(e,t,n=!0){let r=hn(),o=r?.pending,i=o||!n?[]:zt();if(!o&&i.length===0)return e;let s={label:t,since:Date.now(),boundary:kt()??void 0};o?.add(s);let a=Zn(i,s),l=()=>{o?.delete(s),r?.wake?.(),a()};try{Promise.resolve(e).then(l,l)}catch{l()}return e}function ro(e){let t=ke(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var yn="__sibuPendingError";function oo(e,t){let n=()=>e.parentNode?(k(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[yn]=t)})}function At(e){let t=e,n=t[yn];if(n instanceof Error)return delete t[yn],n}function io(e){let t=null;return function(){if(t&&!Un())return t();let r=_({class:"sibu-lazy"}),o=se(),i=kt(),s=!1,a=j(null,()=>$("sibu-lazy-loading","Loading..."));if(t){let l=t;return G(r,j(o,()=>l())),r}return no(e(),"lazy").then(W(l=>{if(s)return;t=l.default;let c=t,u=()=>j(o,()=>c()),f=i?i.enter(u):u();G(r,f)})).catch(l=>{if(s)return;let c=l instanceof Error?l:new Error(String(l));G(r,_({class:"sibu-lazy-error"},`Failed to load component: ${c.message}`)),oo(r,c)}),ce()&&r.firstChild||r.appendChild(a),E(r,()=>{s=!0}),r}}function so({nodes:e,fallback:t}){let n=_({class:"sibu-suspense"}),r=se(),o=Gr(n),i=f=>{G(n,f),o?.done()},s=j(null,t);ce()&&n.firstChild?L(s):n.appendChild(s);let a=!1,l=null,c=null;E(n,()=>{a=!0,l&&(l.disconnect(),l=null),c&&!n.contains(c)&&L(c)});let u=W(()=>{if(!a)try{let f=o?o.enter(()=>j(r,e)):j(r,e);if(c=f,f.classList.contains("sibu-lazy")){if(!f.querySelector(".sibu-lazy-loading")){i(f);return}l=new MutationObserver(()=>{if(a)return;f.querySelector(".sibu-lazy-loading")||(l?.disconnect(),l=null,i(f))}),l.observe(f,{childList:!0,subtree:!0})}else i(f)}catch(f){let m=f instanceof Error?f:new Error(String(f));oo(n,m)}});return queueMicrotask(u),n}function En(e,t){return()=>qe()===e?t():wt(e,t)}function Ct(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";k(n,{phase:r,name:t});return}}function Sn(e,t,n,r,o){let i=Ct(e,t);if(typeof i!="function")return;let s=En(o,i);r()||!n.isConnected?Ct(s,"onUnmount"):lo(s,n)}var Ke=new WeakMap,$e=new WeakMap,me=new Set,ge=new Set,Je=null,_t=0,Yl=256;function vn(e){let t=Ke.get(e);if(t){Ke.delete(e),me.delete(e);for(let n of t)try{n()}catch{}}}function xn(e){$e.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=$e.get(e);if(n){$e.delete(e),ge.delete(e);for(let r of n)try{r()}catch{}}})}function Zl(e){if(me.size===0||e.nodeType!==1)return;let t=e;if(me.has(t)&&t.isConnected&&vn(t),t.firstElementChild)for(let n of Array.from(me))n!==t&&n.isConnected&&t.contains(n)&&vn(n)}function Xl(e){if(ge.size===0||e.nodeType!==1)return;let t=e;if(ge.has(t)&&!t.isConnected&&xn(t),t.firstElementChild)for(let n of Array.from(ge))n!==t&&!n.isConnected&&t.contains(n)&&xn(n)}function Ql(){if(me.size>0)for(let e of Array.from(me))e.isConnected&&vn(e);if(ge.size>0)for(let e of Array.from(ge))e.isConnected||xn(e)}function ao(){Je||typeof document>"u"||(Je=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++)Zl(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)Xl(t.removedNodes[n])}_t+=e.length,_t>=Yl&&(_t=0,Ql()),Tn()}),Je.observe(document.body,{childList:!0,subtree:!0}))}function Tn(){Je&&me.size===0&&ge.size===0&&(Je.disconnect(),Je=null,_t=0)}function ec(e,t){let n=Ke.get(e);return n||(n=[],Ke.set(e,n)),n.push(t),me.add(e),ao(),()=>{let r=Ke.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Ke.delete(e),me.delete(e))}Tn()}}function tc(e,t){let n=$e.get(e);return n||(n=[],$e.set(e,n)),n.push(t),ge.add(e),ao(),()=>{let r=$e.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&($e.delete(e),ge.delete(e))}Tn()}}function Nt(e,t){if(typeof document>"u"||V())return;let n=qe();if(e=En(n,e),t){let r=!1,o=()=>r;if(E(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||Sn(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){Sn(e,"onMount",t,o,n);return}let i=ec(t,()=>{r||Sn(e,"onMount",t,o,n)});E(t,i)})}else queueMicrotask(()=>{Ct(e,"onMount")})}function nc(e,t){typeof document>"u"||V()||lo(En(qe(),e),t)}function lo(e,t){let n=!1,r=()=>{n||(n=!0,Ct(e,"onUnmount"))};E(t,r);let o=()=>{if(n)return;let i=tc(t,r);E(t,i)};t.isConnected?o():Nt(()=>{o()},t)}function rc(e,t){E(t,e)}function Q(e,t,n){try{e.emit(t,n)}catch{}}var po=globalThis;function oc(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,re(()=>t(o,void 0));else{let i=n;n=o,re(()=>t(o,i))}}}var co=100;function Rt(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===qe()?uo(t):wt(n,()=>uo(t))}function uo(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){k(n,{phase:"cleanup"})}}function fo(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&Rt(e),Te(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=co);e.rerunPending&&(e.rerunPending=!1,k(new Error(`effect re-requested itself ${co}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function ic(e){if(e.disposed)return;e.disposed=!0;let t=po.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&Rt(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{Me(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function ee(e,t){if(O(typeof e=="function","effect: argument must be a function."),V()&&!t?.server)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&&Rt(n),Te(n.bodyFn,o),n.rerunPending&&fo(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{Te(n.bodyFn,n.subscriber),n.rerunPending&&fo(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&Rt(n),Me(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=po.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&Q(i,"effect:create",{effectFn:e}),()=>ic(n)}var st=0,wn=new Set;function sc(e){st++;try{return e()}finally{st--,st===0&&cc()}}function ac(e){return st===0?!1:(wn.add(e),!0)}function lc(){return st>0}function cc(){try{for(let e of wn)zr(e)}finally{wn.clear()}Fr()}var mo=Symbol.for("sibujs.reactive.batch.v1");function uc(){let e=globalThis,t=e[mo];if(t)return t;let n={batch:sc,enqueueBatchedSignal:ac,isBatching:lc};return e[mo]=n,n}var kn=uc(),K=kn.batch,Ie=kn.enqueueBatchedSignal,dc=kn.isBatching;var An=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=t?.name,o=t?.equals;r&&(n.__name=r);function i(){return Le(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let l=n.value,c=typeof a=="function"?a(l):a;if(!o(l,c)){if(n.value=c,n.__v++,!0){let u=An.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&Q(u,"signal:update",{signal:n,name:r,oldValue:l,newValue:c})}Ie(n)||Ve(n)}}:s=a=>{let l=n.value,c=typeof a=="function"?a(l):a;if(Object.is(c,l))return;n.value=c,n.__v++;let u=An.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&Q(u,"signal:update",{signal:n,name:r,oldValue:l,newValue:c}),Ie(n)||Ve(n)},!0){let a=An.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&Q(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function fc(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;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
`||o==="\f"){n+=1;continue}if(o==="\r"){n+=e[n+2]===`
|
|
5
5
|
`?2:1;continue}if(pr(o)){let i="",s=n+1;for(;s<e.length&&i.length<6&&pr(e[s]);)i+=e[s],s++;s<e.length&&$i(e[s])&&(s+=e[s]==="\r"&&e[s+1]===`
|
|
6
6
|
`?2:1);let a=Number.parseInt(i,16),l=a===0||a>1114111||a>=55296&&a<=57343;t+=l?"\uFFFD":String.fromCodePoint(a),n=s-1;continue}t+=o,n+=1}return t}var mr=["url(","expression(","javascript:","vbscript:","-moz-binding","behavior:","@import","image-set(","filter:progid","image(","src("],Bi=4,ji=5,Vi=8;function Fi(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 tn=new Set,gr=100,br=!1;function wt(e,t,n){ie(()=>{let r=["url() in an inline style is an exfiltration channel: the browser fetches it immediately and the URL's path or query can carry page data off-origin","expression() executes arbitrary script in legacy engines","the javascript: scheme executes script","the vbscript: scheme executes script","-moz-binding loads and runs remote XBL","behavior: loads and runs a remote HTC script","@import pulls in a remote stylesheet","image-set() fetches remote images, the same exfiltration channel as url()","filter:progid activates legacy scriptable filters","image() fetches its string argument as a URL, the same exfiltration channel as url()","src() fetches its string argument as a URL, the same exfiltration channel as url()"],o=n?.property?`${n.property}: ${e}`:e,i=Fi(n?.element),s=`${i}|${o}`;return tn.has(s)?"":tn.size>=gr?br?"":(br=!0,`${gr} distinct dropped style declarations have been reported; suppressing further ones for the rest of this session so they cannot flood the console. The declarations are still dropped \u2014 only the reporting stops. Fix the reported ones and reload to see any that remain.`):(tn.add(s),`style declaration "${o}" was dropped by the style sanitizer on ${i} \u2014 ${r[t]}. The element renders without it, which usually looks like a missing image rather than an error. Sanctioned alternatives: for a content image use an <img> element (or a <picture>); for decoration, put the rule in a stylesheet and set a class instead \u2014 stylesheet CSS is not sanitized, only inline style attributes are. If this declaration is not yours, it came from untrusted data and the drop just prevented an exfiltration.`)})}function hr(e){return(e.includes("\\")?Ii(e):e).toLowerCase().replace(/\s+/g,"")}function nn(e){if(!Hi.test(e))return-1;let t=hr(e);for(let n=0;n<mr.length;n++)if(t.includes(mr[n]))return n;return-1}function Et(e,t,n){let r=rn(e,t);return r===-1?t:(wt(t,r,{property:e,element:n?.element}),"")}function rn(e,t){let n=nn(t);if(n!==-1)return n;let r=ue(e);return r==="behavior"?ji:r==="-moz-binding"?Bi:(r==="filter"||r==="-ms-filter")&&hr(t).includes("progid:")?Vi:-1}function zi(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 l=e.indexOf("*/",s+2);if(l===-1)return null;s=l+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 l=s.slice(0,a).trim();if(!/^(--[\w-]+|-?[a-zA-Z_][\w-]*)$/.test(l))continue;let u=s.slice(a+1).trim(),d=/!\s*important\s*$/i.exec(u);if(d&&(u=u.slice(0,d.index).trim()),u==="")continue;let p=l.startsWith("--")?l:ue(l);i.push([p,u,d!==null])}return i}function Wi(e,t){let n=String(e),r=zi(n);if(r===null)return nn(n)!==-1&&wt(n,nn(n),t),"";let o=[];for(let[i,s,a]of r){let l=rn(i,s);if(l!==-1){wt(s,l,{property:i,element:t?.element});continue}o.push(`${i}: ${s}${a?" !important":""}`)}return o.join("; ")}function kt(e,t){let n=String(e);if(n.trim()==="")return"";if(typeof document>"u")return Wi(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),l=rn(s,a);if(l!==-1){wt(a,l,{property:s,element:t?.element});continue}let u=r.style.getPropertyPriority(s);o.push(`${s}: ${a}${u?` !${u}`:""}`)}return o.join("; ")}var on=new Set(["href","xlink:href","src","action","formaction","formtarget","cite","poster","background","srcset","ping","data","manifest"]),qi=new Set(["srcdoc"]);function pt(e){return qi.has(e.toLowerCase())}function yr(e){return on.has(e.toLowerCase())}function Ui(e){let t=e.toLowerCase();return t==="style"||on.has(t)}function Ki(e,t,n){let r=e.toLowerCase();return r==="srcset"?Di(t):on.has(r)?Tt(t):r==="style"?kt(t,n):t}function Sr(e,t,n){if(!Ui(e))return t;let r=Ki(e,t,n);return r===""?null:r}function Ie(e){return e===" "||e===" "||e===`
|
|
7
|
-
`||e==="\r"||e==="\f"}function Ct(e){let t=0,n=e.length;for(;t<n&&Ie(e[t]);)t++;for(;n>t&&Ie(e[n-1]);)n--;return e.slice(t,n)}var ce=e=>({kind:"forbidden",reason:e});function Ji(e){let t=Ct(Xe(e));if(t==="")return ce("empty content");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return ce("missing or non-numeric delay");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return ce("unparseable delay");for(;n<t.length&&Ie(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return ce("unexpected text after delay");for(n++;n<t.length&&Ie(t[n]);)n++;let o=n;for(;n<t.length&&!Ie(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return ce(`unsupported refresh key ${JSON.stringify(i)}`);for(;n<t.length&&Ie(t[n]);)n++;if(t[n]!=="=")return ce("missing '=' after url");for(n++;n<t.length&&Ie(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let u=t.indexOf(a,n+1);if(u===-1)return ce("unterminated quoted destination");if(s=t.slice(n+1,u),Ct(t.slice(u+1))!=="")return ce("trailing text after quoted destination")}else if(s=Ct(t.slice(n)),/[;,]/.test(s))return ce("multiple refresh assignments");if(s==="")return ce("empty destination");let l=Tt(s);return l===""?ce("destination uses a disallowed protocol"):{kind:"allowed",delay:r,destination:s,sanitizedDestination:l}}function sn(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=ue(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?ce(`duplicate case-insensitive attribute ${JSON.stringify(r)}`):typeof t!="string"?{kind:"not-refresh"}:Ct(Xe(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:Ji(n)}var Gi="http://www.w3.org/1999/xhtml",Yi="http://www.w3.org/2000/svg",Zi=new Set(["script","iframe","object","embed","frame","frameset"]);function xr(e){return ue(e)}function wr(e){return Zi.has(xr(e))}var Xi=new Set(["script","style"]);function Tr(e){return Xi.has(xr(e))}var j={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},Qi=new Set(["src","href","xlink:href","type","language"]),es=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),an=new WeakSet;function Er(e){return e.namespaceURI===Gi||e.namespaceURI===null}function kr(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 ts(e){an.has(e)||(an.add(e),e.getAttribute("content")!==null&&sn(kr(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function ns(e,t,n,r){if(!Er(e))return j.None;let o=ue(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&ts(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return j.None;let i=sn(kr(e,o,n));return i.kind==="forbidden"?j.MetaRefreshForbidden:i.kind!=="not-refresh"&&an.has(e)?j.MetaRefreshReactive:j.None}function rs(e,t){if(t===null||ue(e)!=="attributename")return j.None;let n=Xe(t);return yr(n)||Le(n)||pt(n)?j.AnimationTarget:j.None}var At=new WeakSet;function vr(e){if(e===null)return!1;let t=ue(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 os(e,t,n,r){if(!Er(e))return j.None;let o=ue(t);return o==="href"?r==="static"||n===null?j.None:vr(e.getAttribute("rel"))?j.StylesheetSource:(At.add(e),j.None):o==="rel"&&vr(n)&&At.has(e)&&e.hasAttribute("href")?j.StylesheetSource:j.None}function ln(e,t,n,r){let o=e.localName;return o==="meta"?ns(e,t,n,r):o==="link"?os(e,t,n,r):o==="script"?r==="static"||n===null?j.None:Qi.has(ue(t))?j.ScriptSource:j.None:es.has(o)&&e.namespaceURI===Yi?rs(t,n):j.None}function un(e,t,n){e.localName!=="link"||ue(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?At.add(e):At.delete(e))}var is="http://www.w3.org/1999/xhtml",ss="http://www.w3.org/2000/svg",as="http://www.w3.org/1999/xlink",ls="http://www.w3.org/XML/1998/namespace",us=new Set(["checked","disabled","selected"]);function cs(e){return e.namespaceURI===null||e.namespaceURI===is}function Ar(e,t,n){ie(()=>`${e}: refusing "${t}" in this element's context \u2014 ${["",'the element would become a <meta http-equiv="refresh"> directive the shared refresh policy forbids (a destination outside the URL allowlist, or a directive too malformed to read unambiguously)',"a <meta> whose http-equiv or content is reactive may never carry a refresh directive: a browser schedules the navigation as soon as the directive is valid, and nothing can withdraw it when the state changes back","a runtime value may not choose the program a <script> runs; name the script in static template source, or load it through Head({ script }) as an explicit trust decision","an SVG animation may not target a URL, event-handler or nested-document attribute; its to / values would be written into that attribute without passing the URL policy",'a runtime-chosen href may not become an applied <link rel="stylesheet">: a well-formed URL is not a trusted stylesheet. Name the stylesheet in static template source, or load a runtime-chosen one through Head({ link }) as an explicit trust decision'][n]}. The write was not performed.`)}function Cr(e,t,n){e[t]=n}function ds(e,t){if(e.namespaceURI!==ss)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?as:n.startsWith("xml:")?ls:null}function me(e,t,n,r={}){let o=fs(e,t,n,r);return e.localName==="link"&&un(e,t,r.reactive?"reactive":"runtime"),o}function fs(e,t,n,r){let o=ds(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(Le(t))return H(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${t}". Its value would be evaluated as JavaScript. Use on:{ ${t.slice(2)}: fn } instead.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=ln(e,t,s,r.reactive?"reactive":"runtime");if(a!==j.None)return Ar(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(pt(t))return H(`${r.label??"setSafeAttribute"}: refusing to set "${t}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let l=cs(e),u=l?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let b=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==b&&(o?e.setAttributeNS(o,t,b):e.setAttribute(t,b)),!0}return l&&us.has(u)&&u in e?Cr(e,u,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let d=String(n);if(r.syncValueProperty!==!1&&l&&(u==="value"||u==="checked")&&u in e)return Cr(e,u,u==="checked"?!!n:d),!0;let p=d===""?"":Sr(t,d,{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 cn(e,t,n){if(pt(t))return H(`html: refusing static attribute "${t}" \u2014 the browser parses it as a nested document.`),!1;let r=ln(e,t,n,"static");return r!==j.None?(Ar("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&un(e,t,"static"),!0)}var ps=4096,dn=[];function ms(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function gs(e,t,n){let r=dn.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=ms();return o.sig=e,o.sub=t,o.epoch=n,o}function _r(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,dn.length<ps&&dn.push(e)}function bs(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 Nr(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 hs(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function ys(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 ge=null,Te=null,Me=0,Oe=[],X=new Set,Ss=[];function vs(e){try{e()}catch(t){let n=e;M(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function xs(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 ve=0,Ee=!1;function pn(){ve===0&&(Te=ge,ge=null,Ee=!0),ve++}function mn(){ve--,ve===0&&(ge=Te,Te=null,Ee=!1)}function Rr(){return Ee}function Lr(e){pn();try{return e()}finally{mn()}}var de=null;function gn(){return de}function Lt(e,t){let n=de;de=e;try{return t()}finally{de=n}}function bn(e){let t=de;return t===null?e:(...n)=>Lt(t,()=>e(...n))}var Qe=null,ws=0;function hn(e,t){let n=ge,r=0,o=null;Ee&&(r=ve,o=Te,ve=0,Te=null,Ee=!1),ge=t;let i=t;i._cap===void 0&&(i._cap=lr());let s=de;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(de=a);let l=Qe;l!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=l),i._tok!=null&&(Qe=i._tok);let u=++ws;i._epoch=u,i._structDirty=!1;for(let d=i.depsHead??null;d!==null;d=d.subNext){let p=d.sig;d.prevActive=p.__activeNode??null,p.__activeNode=d}try{e()}finally{ge=n,de=s,Qe=l,r!==0&&(ve=r,Te=o,Ee=!0);let d=i.depsHead??null;for(;d!==null;){let p=d.subNext,g=d.sig;g.__activeNode=d.prevActive,d.prevActive=null,d.epoch!==u&&(ys(d),Nr(d),_r(d)),d=p}}}function Mr(e,t){if(!t)return yn(e);et(t);let n=ge,r=0,o=null;Ee&&(r=ve,o=Te,ve=0,Te=null,Ee=!1),ge=t;let i=t;i._scope===void 0&&(i._scope=de);let s=de;de=i._scope;try{e()}finally{ge=n,de=s,r!==0&&(ve=r,Te=o,Ee=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let l=a.sig;l.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>et(t))}function yn(e,t,n){return Pr(e,t,n===!0)._dispose}function Or(e,t){let n=Pr(e,t,!0);return{stop:n._dispose,run:r=>{let o=Qe;Qe=n._tok??null;try{return r()}finally{Qe=o}}}}function Pr(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{hn(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),et(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),et(o)},o}function Dr(e){if(!ge)return;let t=ge,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=gs(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,hs(t,i),bs(n,i),t._structDirty=!0}function et(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;Nr(n),_r(n),n=r}}var _t=1e3,Nt=1e6,Rt=0,Be=new Set;function Hr(e){let t=_t;return Number.isFinite(e)&&e>0&&(_t=Math.floor(e)),t}function $r(e){let t=Nt;return Number.isFinite(e)&&e>0&&(Nt=Math.floor(e)),t}function Ts(e){let t=e;return t._runEpoch!==Rt?(t._runEpoch=Rt,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>_t)}function Es(e){let t=e.__name??"<unnamed>";M(new Error(`subscriber "${t}" fired more than ${_t} 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 ks(){M(new Error(`Notification drain exceeded ${Nt} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function Ir(){let e=0;for(;e<Oe.length;){if(e>=Nt){ks();break}let t=Oe[e++];X.delete(t)&&(t._owner!=null&&X.size>0&&(Cs(t),X.has(t))||Br(t))}}function Cs(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;X.has(r)&&(t=r),n=r._owner??null}if(t===null)return;X.delete(t),Br(t)}}function Br(e){if(Be.size>0&&Be.has(e)||e._hasComputedDep===!0&&!xs(e))return;if(Ts(e)){Es(e),Be.add(e);return}let t=ur(e._cap??null);try{vs(e)}finally{t&&cr()}}function jr(){if(!(Me>0)){Me++,Rt++;try{Ir()}finally{Me--,Me===0&&(Oe.length=0,X.clear(),Be.size>0&&Be.clear())}}}function fn(e){e();let t=e._sig;if(!t)return;let n=Ss,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 X.has(s)||(X.add(s),Oe.push(s));i=i.sigNext}}}function Vr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?fn(r):X.has(r)||(X.add(r),Oe.push(r))),n=n.sigNext}}function Fr(e){let n=e.subsHead;if(n){if(Me>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?fn(o):X.has(o)||(X.add(o),Oe.push(o))),r=r.sigNext}return}Me++,Rt++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?fn(o):X.has(o)||(X.add(o),Oe.push(o))),r=r.sigNext}Ir()}finally{Me--,Me===0&&(Oe.length=0,X.clear(),Be.size>0&&Be.clear())}}}function zr(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 qr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var Ur="4.14.0",Kr=Symbol.for("sibujs.reactive.v1");function _s(){let e=globalThis,t=e[Kr];if(t)return!t.__dupWarned&&(t.__dupWarned=!0,H(`Multiple instances of the reactive runtime detected on this page (active: ${t.version}, duplicate: ${Ur}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`)),t;let n={suspendTracking:pn,resumeTracking:mn,isTrackingSuspended:Rr,untracked:Lr,retrack:hn,track:Mr,reactiveBinding:yn,recordDependency:Dr,cleanup:et,setMaxSubscriberRepeats:Hr,setMaxDrainIterations:$r,drainNotificationQueue:jr,queueSignalNotification:Vr,notifySubscribers:Fr,getSubscriberCount:zr,getSubscriberDeps:Wr,forEachSubscriber:qr,getOwnerScope:gn,runWithOwnerScope:Lt,bindOwnerScope:bn,structuralBinding:Or,version:Ur};return e[Kr]=n,n}var z=_s(),je=z.suspendTracking,Ve=z.resumeTracking,Jr=z.isTrackingSuspended,be=z.untracked,Pe=z.retrack,tt=z.track,G=z.reactiveBinding,Fe=z.recordDependency,ze=z.cleanup,yd=z.setMaxSubscriberRepeats,Gr=z.setMaxDrainIterations,Yr=z.drainNotificationQueue,Zr=z.queueSignalNotification,nt=z.notifySubscribers,Sd=z.getSubscriberCount,vd=z.getSubscriberDeps,xd=z.forEachSubscriber,rt=z.getOwnerScope??gn,Mt=z.runWithOwnerScope??Lt,te=z.bindOwnerScope??bn,We=z.structuralBinding??((e,t)=>({stop:z.reactiveBinding(e,t),run:n=>n()}));function mt(e,t,n){if(Le(t))return me(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){M(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}me(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return G(r,e)}function Xr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){M(l,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(l){M(l,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),me(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=G(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var Sn=["data-focus-key","id","name"],Ns=new Set(["text","search","url","tel","password",""]);function Rs(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&Ns.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 gt(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,...Rs(t)}}function Ls(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Ms(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 l=0;l<a.length;l++)r++,n??(n=a[l]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function Qr(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 ot(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){Qr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=Ms(t,`[${e.attr}=${Ls(e.value)}]`);if(s&&s.tagName===e.tag){Qr(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}ie(()=>{let s=e.attr?` (${e.attr}="${e.value}")`:"",a=i?`several elements in the rebuilt subtree share ${e.attr}="${e.value}", so there is no way to tell which one the user was in \u2014 a shared name (a radio group) identifies a GROUP, not a control. Add a unique id or data-focus-key to each`:"no element in the rebuilt subtree carries the same identity. Give it a stable id, name, or data-focus-key that the rebuild reproduces";return`${n}: a reactive rebuild discarded the focused element <${e.tag.toLowerCase()}>${s} and could not re-establish it, so focus fell back to <body>. An in-progress edit ends here, and an in-progress IME composition is lost outright \u2014 a composition belongs to the DOM node, so it cannot survive the node being destroyed. ${a}, or stop the rebuild from happening: key the subtree with match(() => shapeKey(), { \u2026 }) so it is re-created only when the shape actually changes, and drive the rest with reactive attributes and text children, which mutate nodes in place instead of replacing them. If dropping focus is INTENDED here (closing a panel, say), pass { focus: "discard" } to when()/match() to silence this, or { focus: { restoreTo: element } } to send focus somewhere other than <body>.`})}function ke(e,t){let n=[],r=ye();function o(){let i;try{i=ee(r,t)}catch(p){M(p,{phase:"binding",name:"bindChildNode",node:e});return}let s=gt(n);if(i==null||typeof i=="boolean"){for(let p=0;p<n.length;p++){let g=n[p];B(g),g.parentNode&&g.parentNode.removeChild(g)}n.length=0,ot(s,n,"bindChildNode");return}let a=e.parentNode;if(!a){n.length=0;return}let l;if(Array.isArray(i)){l=[];let p=new Set;for(let g=0;g<i.length;g++){let b=i[g];if(b==null||typeof b=="boolean")continue;let c=b instanceof Node?b:document.createTextNode(String(b));if(p.has(c)){H("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}p.add(c),l.push(c)}}else l=[i instanceof Node?i:document.createTextNode(String(i))];let u;if(n.length>0&&l.length>0){let p=new Set(n);u=new Set;for(let g=0;g<l.length;g++)p.has(l[g])&&u.add(l[g])}for(let p=0;p<n.length;p++){let g=n[p];u?.has(g)||(B(g),g.parentNode&&g.parentNode.removeChild(g))}let d=e;for(let p=0;p<l.length;p++){let g=l[p];d.nextSibling!==g&&a.insertBefore(g,d.nextSibling),d=g}n=l,ot(s,l,"bindChildNode")}return G(o,e,!0)}function vn(){throw new Error('[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first. There is no global `document`, and SibuJS builds live DOM nodes, on the server too. For example: import { GlobalRegistrator } from "@happy-dom/global-registrator"; GlobalRegistrator.register(); See SSR in AGENTS.md \xA710.')}function se(){typeof document>"u"&&vn()}var $="http://www.w3.org/2000/svg",Os=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var xn=new Set,eo=100,to=!1,no=new Map;function ro(e){let t=no.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),no.set(e,t)),t}function Ps(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=G(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",kt(String(a),{element:e}));return}let l=e.style;i&&(e.removeAttribute("style"),i=!1);let u=[];for(let d in a){if(!Object.hasOwn(a,d))continue;let p=a[d];if(p==null)continue;let g=ro(d);u.push(g),l.setProperty(g,Et(g,String(p),{element:e}))}for(let d=0;d<o.length;d++)u.indexOf(o[d])===-1&&l.removeProperty(o[d]);o=u},e);C(e,s);return}if(typeof t=="string"){e.setAttribute("style",kt(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=ro(r);if(typeof o=="function"){let s=o,a=G(()=>{n.style.setProperty(i,Et(i,String(s()),{element:e}))},e);C(e,a)}else n.style.setProperty(i,Et(i,String(o),{element:e}))}}function Ds(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=G(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);C(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=G(()=>{let a="";for(let l in n){if(!Object.hasOwn(n,l))continue;let u=n[l];(typeof u=="function"?u():u)&&(a=a?`${a} ${l}`:l)}e.setAttribute("class",a)},e);C(e,s)}else e.setAttribute("class",o)}function wn(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),C(e,ke(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),C(e,ke(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),C(e,ke(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 m(e,t){let n=wr(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&vn();let i=dt(e,t);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),wn(i,o),i):(ie(()=>{let b=r.trim().split(/\s+/);if(b.length<2)return"";let c=0;for(let h=0;h<b.length;h++){let y=b[h];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(y))return"";/[-:/0-9]/.test(y)&&c++}if(c<2)return"";let f=`${e}|${r}`;return xn.has(f)?"":xn.size>=eo?to?"":(to=!0,`tagFactory: ${eo} distinct lone-string class warnings have been reported; suppressing further ones for the rest of this session so they cannot flood the console. Fix the reported ones and reload to see any that remain.`):(xn.add(f),`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`)}),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return wn(i,r),i;let s=r,a=s.class;a!=null&&Ds(i,a);let l=s.id;typeof l=="function"?C(i,mt(i,"id",l)):l!=null&&(typeof l=="string"&&Os.has(l.toLowerCase())&&H(`tagFactory: element id="${l}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=l);let u=o!==void 0?o:s.nodes;u!=null&&wn(i,u);let d=s.on;if(d)for(let b in d){if(!Object.hasOwn(d,b))continue;let c=d[b];typeof c=="function"?i.addEventListener(b,c):H(`tagFactory: on.${b} handler is not a function (got ${typeof c}). Event listener was not attached.`)}let p=s.style;p!=null&&Ps(i,p);let g=s.ref;g&&(g.current=i);for(let b in s)switch(b){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,b))continue;let c=s[b];if(c==null||Le(b))continue;typeof c=="function"?C(i,mt(i,b,c)):me(i,b,c,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var Yd=m("html"),Hs=m("head"),$s=m("body"),Is=m("title"),P=m("div"),q=m("span"),Bs=m("section"),js=m("article"),Vs=m("header"),Fs=m("footer"),zs=m("nav"),Ws=m("main"),qs=m("aside"),Us=m("address"),Tn=m("p"),Ks=m("h1"),Js=m("h2"),En=m("h3"),Gs=m("h4"),Ys=m("h5"),Zs=m("h6"),Xs=m("blockquote"),Qs=m("dd"),ea=m("dl"),ta=m("dt"),na=m("figcaption"),ra=m("figure"),oa=m("hr"),ia=m("li"),sa=m("ol"),aa=m("ul"),kn=m("pre"),la=m("a"),ua=m("abbr"),ca=m("b"),da=m("bdi"),fa=m("bdo"),pa=m("br"),ma=m("cite"),Cn=m("code"),ga=m("data"),ba=m("dfn"),ha=m("em"),ya=m("i"),Sa=m("kbd"),va=m("mark"),xa=m("q"),wa=m("rp"),Ta=m("rt"),Ea=m("ruby"),ka=m("s"),Ca=m("samp"),Aa=m("small"),_a=m("strong"),Na=m("sub"),Ra=m("sup"),La=m("time"),Ma=m("u"),Oa=m("var"),Pa=m("area"),Da=m("audio"),Ha=m("img"),$a=m("map"),Ia=m("track"),Ba=m("video"),ja=m("embed"),Va=m("iframe"),Fa=m("object"),za=m("param"),Wa=m("picture"),qa=m("portal"),Ua=m("source"),Ka=m("svg",$),Ja=m("math"),Ga=m("canvas"),Ya=m("noscript"),Za=m("script"),Xa=m("del"),Qa=m("ins"),el=m("caption"),tl=m("col"),nl=m("colgroup"),rl=m("table"),ol=m("tbody"),il=m("td"),sl=m("tfoot"),al=m("th"),ll=m("thead"),ul=m("tr"),bt=m("button"),cl=m("datalist"),dl=m("fieldset"),fl=m("form"),pl=m("input"),ml=m("label"),gl=m("legend"),bl=m("meter"),hl=m("optgroup"),yl=m("option"),Sl=m("output"),vl=m("progress"),xl=m("select"),wl=m("textarea"),Tl=m("details"),El=m("dialog"),kl=m("menu"),Cl=m("summary"),Al=m("slot"),_l=m("template"),Nl=m("base"),Rl=m("link"),Ll=m("meta"),qe=m("style"),Ml=m("circle",$),Ol=m("ellipse",$),Pl=m("g",$),Dl=m("line",$),Hl=m("path",$),$l=m("polygon",$),Il=m("polyline",$),Bl=m("rect",$),jl=m("text",$),Vl=m("tspan",$),Fl=m("defs",$),zl=m("clipPath",$),Wl=m("mask",$),ql=m("pattern",$),Ul=m("linearGradient",$),Kl=m("radialGradient",$),Jl=m("stop",$),Gl=m("use",$),Yl=m("symbol",$),Zl=m("marker",$),Xl=m("center"),Ql=m("font"),eu=m("marquee"),tu=e=>m(e);var oo,An=globalThis[oo=Symbol.for("sibujs.streamBoundary.v1")]??(globalThis[oo]={hook:null,current:null});function io(e){return An.hook?An.hook(e):null}function Ot(){return An.current}var _n=Symbol.for("sibujs.ssr.v1");function nu(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let n=null,r=process.getBuiltinModule;typeof r=="function"?n=r("node:async_hooks"):typeof Gt=="function"&&(n=Gt("async_hooks")),n&&(e=new n.AsyncLocalStorage)}let t=globalThis.AsyncLocalStorage;!e&&typeof t=="function"&&(e=new t)}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var De=globalThis[_n]??(globalThis[_n]=nu()),Ke=De.als,Ue=De.fallbackStore;De.fallbackDepth??(De.fallbackDepth=0);var so=!1;function ru(){if(so||Ke||!(typeof process<"u"&&!!process.versions?.node))return;so=!0;let t=process.versions.node;H(`SSR request isolation is UNAVAILABLE on this runtime (Node ${t}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function He(){if(Ke){let e=Ke.getStore();if(e)return e}return Ue}function Nn(){return Ke?Ke.getStore()??null:De.fallbackDepth>0?Ue:null}function ne(){return He().ssr}function ao(e){if(!ne())return null;let t=He(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}var ou=Symbol.for("sibujs.prerender.v1");function ht(){return He().ssr||globalThis[ou]!==void 0}function lo(){return!ht()}function uo(){He().ssr=!0}function co(){He().ssr=!1}function fo(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0,pending:new Set,wake:null};if(Ke)return Ke.run(t,e);ru();let n={...Ue};Object.assign(Ue,t),De.fallbackDepth++;try{return e()}finally{De.fallbackDepth--;for(let r of Object.keys(Ue))r in n||delete Ue[r];Object.assign(Ue,n)}}function po(e,t,n=!0){let r=Nn(),o=r?.pending,i=o||!n?[]:Qt();if(!o&&i.length===0)return e;let s={label:t,since:Date.now(),boundary:Ot()??void 0};o?.add(s);let a=ar(i,s),l=()=>{o?.delete(s),r?.wake?.(),a()};try{Promise.resolve(e).then(l,l)}catch{l()}return e}function mo(e){let t=He(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var Rn="__sibuPendingError";function go(e,t){let n=()=>e.parentNode?(M(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[Rn]=t)})}function Pt(e){let t=e,n=t[Rn];if(n instanceof Error)return delete t[Rn],n}function bo(e){let t=null;return function(){if(t&&!nr())return t();let r=P({class:"sibu-lazy"}),o=ye(),i=Ot(),s=!1,a=ee(null,()=>q("sibu-lazy-loading","Loading..."));if(t){let l=t;return le(r,ee(o,()=>l())),r}return po(e(),"lazy").then(te(l=>{if(s)return;t=l.default;let u=t,d=()=>ee(o,()=>u()),p=i?i.enter(d):d();le(r,p)})).catch(l=>{if(s)return;let u=l instanceof Error?l:new Error(String(l));le(r,P({class:"sibu-lazy-error"},`Failed to load component: ${u.message}`)),go(r,u)}),xe()&&r.firstChild||r.appendChild(a),C(r,()=>{s=!0}),r}}function ho({nodes:e,fallback:t}){let n=P({class:"sibu-suspense"}),r=ye(),o=io(n),i=p=>{le(n,p),o?.done()},s=ee(null,t);xe()&&n.firstChild?B(s):n.appendChild(s);let a=!1,l=null,u=null;C(n,()=>{a=!0,l&&(l.disconnect(),l=null),u&&!n.contains(u)&&B(u)});let d=te(()=>{if(!a)try{let p=o?o.enter(()=>ee(r,e)):ee(r,e);if(u=p,p.classList.contains("sibu-lazy")){if(!p.querySelector(".sibu-lazy-loading")){i(p);return}l=new MutationObserver(()=>{if(a)return;p.querySelector(".sibu-lazy-loading")||(l?.disconnect(),l=null,i(p))}),l.observe(p,{childList:!0,subtree:!0})}else i(p)}catch(p){let g=p instanceof Error?p:new Error(String(p));go(n,g)}});return queueMicrotask(d),n}function Pn(e,t){return()=>rt()===e?t():Mt(e,t)}function Ht(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";M(n,{phase:r,name:t});return}}function Ln(e,t,n,r,o){let i=Ht(e,t);if(typeof i!="function")return;let s=Pn(o,i);r()||!n.isConnected?Ht(s,"onUnmount"):So(s,n)}var it=new WeakMap,Je=new WeakMap,Ce=new Set,Ae=new Set,st=null,Dt=0,iu=256;function Mn(e){let t=it.get(e);if(t){it.delete(e),Ce.delete(e);for(let n of t)try{n()}catch{}}}function On(e){Je.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Je.get(e);if(n){Je.delete(e),Ae.delete(e);for(let r of n)try{r()}catch{}}})}function su(e){if(Ce.size===0||e.nodeType!==1)return;let t=e;if(Ce.has(t)&&t.isConnected&&Mn(t),t.firstElementChild)for(let n of Array.from(Ce))n!==t&&n.isConnected&&t.contains(n)&&Mn(n)}function au(e){if(Ae.size===0||e.nodeType!==1)return;let t=e;if(Ae.has(t)&&!t.isConnected&&On(t),t.firstElementChild)for(let n of Array.from(Ae))n!==t&&!n.isConnected&&t.contains(n)&&On(n)}function lu(){if(Ce.size>0)for(let e of Array.from(Ce))e.isConnected&&Mn(e);if(Ae.size>0)for(let e of Array.from(Ae))e.isConnected||On(e)}function yo(){st||typeof document>"u"||(st=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++)su(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)au(t.removedNodes[n])}Dt+=e.length,Dt>=iu&&(Dt=0,lu()),Dn()}),st.observe(document.body,{childList:!0,subtree:!0}))}function Dn(){st&&Ce.size===0&&Ae.size===0&&(st.disconnect(),st=null,Dt=0)}function uu(e,t){let n=it.get(e);return n||(n=[],it.set(e,n)),n.push(t),Ce.add(e),yo(),()=>{let r=it.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(it.delete(e),Ce.delete(e))}Dn()}}function cu(e,t){let n=Je.get(e);return n||(n=[],Je.set(e,n)),n.push(t),Ae.add(e),yo(),()=>{let r=Je.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Je.delete(e),Ae.delete(e))}Dn()}}function $t(e,t){if(typeof document>"u"||ne())return;let n=rt();if(e=Pn(n,e),t){let r=!1,o=()=>r;if(C(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||Ln(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){Ln(e,"onMount",t,o,n);return}let i=uu(t,()=>{r||Ln(e,"onMount",t,o,n)});C(t,i)})}else queueMicrotask(()=>{Ht(e,"onMount")})}function du(e,t){typeof document>"u"||ne()||So(Pn(rt(),e),t)}function So(e,t){let n=!1,r=()=>{n||(n=!0,Ht(e,"onUnmount"))};C(t,r);let o=()=>{if(n)return;let i=cu(t,r);C(t,i)};t.isConnected?o():$t(()=>{o()},t)}function fu(e,t){C(t,e)}function fe(e,t,n){try{e.emit(t,n)}catch{}}var To=globalThis;function pu(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,be(()=>t(o,void 0));else{let i=n;n=o,be(()=>t(o,i))}}}var vo=100;function It(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===rt()?xo(t):Mt(n,()=>xo(t))}function xo(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){M(n,{phase:"cleanup"})}}function wo(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&It(e),Pe(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=vo);e.rerunPending&&(e.rerunPending=!1,M(new Error(`effect re-requested itself ${vo}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function mu(e){if(e.disposed)return;e.disposed=!0;let t=To.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&It(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{ze(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function re(e,t){if(V(typeof e=="function","effect: argument must be a function."),ne()&&!t?.server)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&&It(n),Pe(n.bodyFn,o),n.rerunPending&&wo(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{Pe(n.bodyFn,n.subscriber),n.rerunPending&&wo(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&It(n),ze(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=To.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&fe(i,"effect:create",{effectFn:e}),()=>mu(n)}var yt=0,Hn=new Set;function gu(e){yt++;try{return e()}finally{yt--,yt===0&&yu()}}function bu(e){return yt===0?!1:(Hn.add(e),!0)}function hu(){return yt>0}function yu(){try{for(let e of Hn)Zr(e)}finally{Hn.clear()}Yr()}var Eo=Symbol.for("sibujs.reactive.batch.v1");function Su(){let e=globalThis,t=e[Eo];if(t)return t;let n={batch:gu,enqueueBatchedSignal:bu,isBatching:hu};return e[Eo]=n,n}var $n=Su(),U=$n.batch,Ge=$n.enqueueBatchedSignal,vu=$n.isBatching;var In=globalThis;function A(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=t?.name,o=t?.equals;r&&(n.__name=r);function i(){return Fe(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let l=n.value,u=typeof a=="function"?a(l):a;if(!o(l,u)){if(n.value=u,n.__v++,!0){let d=In.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&fe(d,"signal:update",{signal:n,name:r,oldValue:l,newValue:u})}Ge(n)||nt(n)}}:s=a=>{let l=n.value,u=typeof a=="function"?a(l):a;if(Object.is(u,l))return;n.value=u,n.__v++;let d=In.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&fe(d,"signal:update",{signal:n,name:r,oldValue:l,newValue:u}),Ge(n)||nt(n)},!0){let a=In.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&fe(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function xu(e){let[t,n]=A(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var wu=`
|
|
7
|
+
`||e==="\r"||e==="\f"}function Ct(e){let t=0,n=e.length;for(;t<n&&Ie(e[t]);)t++;for(;n>t&&Ie(e[n-1]);)n--;return e.slice(t,n)}var ce=e=>({kind:"forbidden",reason:e});function Ji(e){let t=Ct(Xe(e));if(t==="")return ce("empty content");let n=0;for(;n<t.length&&t[n]>="0"&&t[n]<="9";)n++;if(n===0)return ce("missing or non-numeric delay");let r=Number.parseInt(t.slice(0,n),10);if(!Number.isFinite(r))return ce("unparseable delay");for(;n<t.length&&Ie(t[n]);)n++;if(n===t.length)return{kind:"delay-only",delay:r};if(t[n]!==";"&&t[n]!==",")return ce("unexpected text after delay");for(n++;n<t.length&&Ie(t[n]);)n++;let o=n;for(;n<t.length&&!Ie(t[n])&&t[n]!=="=";)n++;let i=t.slice(o,n).toLowerCase();if(i!=="url")return ce(`unsupported refresh key ${JSON.stringify(i)}`);for(;n<t.length&&Ie(t[n]);)n++;if(t[n]!=="=")return ce("missing '=' after url");for(n++;n<t.length&&Ie(t[n]);)n++;let s,a=t[n];if(a==='"'||a==="'"){let u=t.indexOf(a,n+1);if(u===-1)return ce("unterminated quoted destination");if(s=t.slice(n+1,u),Ct(t.slice(u+1))!=="")return ce("trailing text after quoted destination")}else if(s=Ct(t.slice(n)),/[;,]/.test(s))return ce("multiple refresh assignments");if(s==="")return ce("empty destination");let l=Tt(s);return l===""?ce("destination uses a disallowed protocol"):{kind:"allowed",delay:r,destination:s,sanitizedDestination:l}}function sn(e){let t,n,r,o=new Set;for(let[i,s]of e){let a=ue(i);o.has(a)&&(r=a),o.add(a),a==="http-equiv"?t=s:a==="content"&&(n=s)}return r!==void 0?ce(`duplicate case-insensitive attribute ${JSON.stringify(r)}`):typeof t!="string"?{kind:"not-refresh"}:Ct(Xe(t)).toLowerCase()!=="refresh"?{kind:"not-refresh"}:typeof n!="string"?{kind:"not-refresh"}:Ji(n)}var Gi="http://www.w3.org/1999/xhtml",Yi="http://www.w3.org/2000/svg",Zi=new Set(["script","iframe","object","embed","frame","frameset"]);function xr(e){return ue(e)}function wr(e){return Zi.has(xr(e))}var Xi=new Set(["script","style"]);function Tr(e){return Xi.has(xr(e))}var j={None:0,MetaRefreshForbidden:1,MetaRefreshReactive:2,ScriptSource:3,AnimationTarget:4,StylesheetSource:5},Qi=new Set(["src","href","xlink:href","type","language"]),es=new Set(["animate","set","animateMotion","animateTransform","animateColor"]),an=new WeakSet;function Er(e){return e.namespaceURI===Gi||e.namespaceURI===null}function kr(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 ts(e){an.has(e)||(an.add(e),e.getAttribute("content")!==null&&sn(kr(e,null,null)).kind!=="not-refresh"&&e.removeAttribute("content"))}function ns(e,t,n,r){if(!Er(e))return j.None;let o=ue(t);if(o!=="http-equiv"&&o!=="content"||(r==="reactive"&&ts(e),n===null)||o==="content"&&!e.hasAttribute("http-equiv"))return j.None;let i=sn(kr(e,o,n));return i.kind==="forbidden"?j.MetaRefreshForbidden:i.kind!=="not-refresh"&&an.has(e)?j.MetaRefreshReactive:j.None}function rs(e,t){if(t===null||ue(e)!=="attributename")return j.None;let n=Xe(t);return yr(n)||Le(n)||pt(n)?j.AnimationTarget:j.None}var At=new WeakSet;function vr(e){if(e===null)return!1;let t=ue(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 os(e,t,n,r){if(!Er(e))return j.None;let o=ue(t);return o==="href"?r==="static"||n===null?j.None:vr(e.getAttribute("rel"))?j.StylesheetSource:(At.add(e),j.None):o==="rel"&&vr(n)&&At.has(e)&&e.hasAttribute("href")?j.StylesheetSource:j.None}function ln(e,t,n,r){let o=e.localName;return o==="meta"?ns(e,t,n,r):o==="link"?os(e,t,n,r):o==="script"?r==="static"||n===null?j.None:Qi.has(ue(t))?j.ScriptSource:j.None:es.has(o)&&e.namespaceURI===Yi?rs(t,n):j.None}function un(e,t,n){e.localName!=="link"||ue(t)!=="href"||(n!=="static"&&e.hasAttribute("href")?At.add(e):At.delete(e))}var is="http://www.w3.org/1999/xhtml",ss="http://www.w3.org/2000/svg",as="http://www.w3.org/1999/xlink",ls="http://www.w3.org/XML/1998/namespace",us=new Set(["checked","disabled","selected"]);function cs(e){return e.namespaceURI===null||e.namespaceURI===is}function Ar(e,t,n){ie(()=>`${e}: refusing "${t}" in this element's context \u2014 ${["",'the element would become a <meta http-equiv="refresh"> directive the shared refresh policy forbids (a destination outside the URL allowlist, or a directive too malformed to read unambiguously)',"a <meta> whose http-equiv or content is reactive may never carry a refresh directive: a browser schedules the navigation as soon as the directive is valid, and nothing can withdraw it when the state changes back","a runtime value may not choose the program a <script> runs; name the script in static template source, or load it through Head({ script }) as an explicit trust decision","an SVG animation may not target a URL, event-handler or nested-document attribute; its to / values would be written into that attribute without passing the URL policy",'a runtime-chosen href may not become an applied <link rel="stylesheet">: a well-formed URL is not a trusted stylesheet. Name the stylesheet in static template source, or load a runtime-chosen one through Head({ link }) as an explicit trust decision'][n]}. The write was not performed.`)}function Cr(e,t,n){e[t]=n}function ds(e,t){if(e.namespaceURI!==ss)return null;let n=t.toLowerCase();return n.startsWith("xlink:")?as:n.startsWith("xml:")?ls:null}function me(e,t,n,r={}){let o=fs(e,t,n,r);return e.localName==="link"&&un(e,t,r.reactive?"reactive":"runtime"),o}function fs(e,t,n,r){let o=ds(e,t),i=o?t.slice(t.indexOf(":")+1):t;if(Le(t))return H(`${r.label??"setSafeAttribute"}: refusing to set event-handler attribute "${t}". Its value would be evaluated as JavaScript. Use on:{ ${t.slice(2)}: fn } instead.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let s=n==null||n===!1?null:n===!0?"":String(n),a=ln(e,t,s,r.reactive?"reactive":"runtime");if(a!==j.None)return Ar(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(pt(t))return H(`${r.label??"setSafeAttribute"}: refusing to set "${t}". The browser parses this attribute as a nested HTML document, so a generic string value cannot be made safe \u2014 attribute escaping is undone before the parse. Build the frame's content another way.`),o?e.removeAttributeNS(o,i):e.removeAttribute(t),!1;let l=cs(e),u=l?t.toLowerCase():t;if(typeof n=="boolean"){if(t.length>5&&t.slice(0,5).toLowerCase()==="aria-"){let b=n?"true":"false";return(o?e.getAttributeNS(o,i):e.getAttribute(t))!==b&&(o?e.setAttributeNS(o,t,b):e.setAttribute(t,b)),!0}return l&&us.has(u)&&u in e?Cr(e,u,n):n?o?e.setAttributeNS(o,t,""):e.setAttribute(t,""):o?e.removeAttributeNS(o,i):e.removeAttribute(t),!0}let d=String(n);if(r.syncValueProperty!==!1&&l&&(u==="value"||u==="checked")&&u in e)return Cr(e,u,u==="checked"?!!n:d),!0;let p=d===""?"":Sr(t,d,{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 cn(e,t,n){if(pt(t))return H(`html: refusing static attribute "${t}" \u2014 the browser parses it as a nested document.`),!1;let r=ln(e,t,n,"static");return r!==j.None?(Ar("html (static attribute)",t,r),!1):(e.setAttribute(t,n),e.localName==="link"&&un(e,t,"static"),!0)}var ps=4096,dn=[];function ms(){return{sig:null,sub:null,epoch:0,depVersion:0,sigPrev:null,sigNext:null,subPrev:null,subNext:null,prevActive:null}}function gs(e,t,n){let r=dn.pop();if(r)return r.sig=e,r.sub=t,r.epoch=n,r;let o=ms();return o.sig=e,o.sub=t,o.epoch=n,o}function _r(e){e.sig=null,e.sub=null,e.sigPrev=null,e.sigNext=null,e.subPrev=null,e.subNext=null,e.prevActive=null,dn.length<ps&&dn.push(e)}function bs(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 Nr(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 hs(e,t){let n=e.depsTail??null;t.subPrev=n,t.subNext=null,n?n.subNext=t:e.depsHead=t,e.depsTail=t}function ys(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 ge=null,Te=null,Me=0,Oe=[],X=new Set,Ss=[];function vs(e){try{e()}catch(t){let n=e;M(t,{phase:n._errorPhase??"effect",name:n.__name,node:n._errorNode})}}function xs(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 ve=0,Ee=!1;function pn(){ve===0&&(Te=ge,ge=null,Ee=!0),ve++}function mn(){ve--,ve===0&&(ge=Te,Te=null,Ee=!1)}function Rr(){return Ee}function Lr(e){pn();try{return e()}finally{mn()}}var de=null;function gn(){return de}function Lt(e,t){let n=de;de=e;try{return t()}finally{de=n}}function bn(e){let t=de;return t===null?e:(...n)=>Lt(t,()=>e(...n))}var Qe=null,ws=0;function hn(e,t){let n=ge,r=0,o=null;Ee&&(r=ve,o=Te,ve=0,Te=null,Ee=!1),ge=t;let i=t;i._cap===void 0&&(i._cap=lr());let s=de;s!==null&&!i._epoch&&i._scope===void 0&&(i._scope=s);let a=i._scope===void 0?null:i._scope;a!==s&&(de=a);let l=Qe;l!==null&&!i._epoch&&!i._c&&i._owner==null&&(i._owner=l),i._tok!=null&&(Qe=i._tok);let u=++ws;i._epoch=u,i._structDirty=!1;for(let d=i.depsHead??null;d!==null;d=d.subNext){let p=d.sig;d.prevActive=p.__activeNode??null,p.__activeNode=d}try{e()}finally{ge=n,de=s,Qe=l,r!==0&&(ve=r,Te=o,Ee=!0);let d=i.depsHead??null;for(;d!==null;){let p=d.subNext,g=d.sig;g.__activeNode=d.prevActive,d.prevActive=null,d.epoch!==u&&(ys(d),Nr(d),_r(d)),d=p}}}function Mr(e,t){if(!t)return yn(e);et(t);let n=ge,r=0,o=null;Ee&&(r=ve,o=Te,ve=0,Te=null,Ee=!1),ge=t;let i=t;i._scope===void 0&&(i._scope=de);let s=de;de=i._scope;try{e()}finally{ge=n,de=s,r!==0&&(ve=r,Te=o,Ee=!0);for(let a=i.depsHead??null;a!==null;a=a.subNext){let l=a.sig;l.__activeNode=a.prevActive,a.prevActive=null}}return i._dispose??(i._dispose=()=>et(t))}function yn(e,t,n){return Pr(e,t,n===!0)._dispose}function Or(e,t){let n=Pr(e,t,!0);return{stop:n._dispose,run:r=>{let o=Qe;Qe=n._tok??null;try{return r()}finally{Qe=o}}}}function Pr(e,t,n){let r=()=>{let i=o;if(!(i._disposed||i._reentrant)){i._reentrant=!0;try{hn(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),et(o),i}return o._dispose=()=>{o._disposed=!0,o._errorNode=void 0,o._tok!=null&&(o._tok.sub=null),et(o)},o}function Dr(e){if(!ge)return;let t=ge,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=gs(e,t,r);i.depVersion=n.__v??Number.NaN,i.prevActive=o,n.__activeNode=i,hs(t,i),bs(n,i),t._structDirty=!0}function et(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;Nr(n),_r(n),n=r}}var _t=1e3,Nt=1e6,Rt=0,Be=new Set;function Hr(e){let t=_t;return Number.isFinite(e)&&e>0&&(_t=Math.floor(e)),t}function $r(e){let t=Nt;return Number.isFinite(e)&&e>0&&(Nt=Math.floor(e)),t}function Ts(e){let t=e;return t._runEpoch!==Rt?(t._runEpoch=Rt,t._runs=1,!1):(t._runs=(t._runs??0)+1,t._runs>_t)}function Es(e){let t=e.__name??"<unnamed>";M(new Error(`subscriber "${t}" fired more than ${_t} 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 ks(){M(new Error(`Notification drain exceeded ${Nt} iterations \u2014 absolute safety net tripped. Breaking to prevent infinite loop.`),{phase:"scheduler"})}function Ir(){let e=0;for(;e<Oe.length;){if(e>=Nt){ks();break}let t=Oe[e++];X.delete(t)&&(t._owner!=null&&X.size>0&&(Cs(t),X.has(t))||Br(t))}}function Cs(e){for(;;){let t=null;for(let n=e._owner??null;n!==null;){let r=n.sub;if(r===null)break;X.has(r)&&(t=r),n=r._owner??null}if(t===null)return;X.delete(t),Br(t)}}function Br(e){if(Be.size>0&&Be.has(e)||e._hasComputedDep===!0&&!xs(e))return;if(Ts(e)){Es(e),Be.add(e);return}let t=ur(e._cap??null);try{vs(e)}finally{t&&cr()}}function jr(){if(!(Me>0)){Me++,Rt++;try{Ir()}finally{Me--,Me===0&&(Oe.length=0,X.clear(),Be.size>0&&Be.clear())}}}function fn(e){e();let t=e._sig;if(!t)return;let n=Ss,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 X.has(s)||(X.add(s),Oe.push(s));i=i.sigNext}}}function Vr(e){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&(r._c?fn(r):X.has(r)||(X.add(r),Oe.push(r))),n=n.sigNext}}function Fr(e){let n=e.subsHead;if(n){if(Me>0){let r=n;for(;r;){let o=r.sub;o&&(o._c?fn(o):X.has(o)||(X.add(o),Oe.push(o))),r=r.sigNext}return}Me++,Rt++;try{let r=n;for(;r;){let o=r.sub;o&&(o._c?fn(o):X.has(o)||(X.add(o),Oe.push(o))),r=r.sigNext}Ir()}finally{Me--,Me===0&&(Oe.length=0,X.clear(),Be.size>0&&Be.clear())}}}function zr(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 qr(e,t){let n=e.subsHead??null;for(;n;){let r=n.sub;r&&t(r),n=n.sigNext}}var Ur="4.14.1",Kr=Symbol.for("sibujs.reactive.v1");function _s(){let e=globalThis,t=e[Kr];if(t)return!t.__dupWarned&&(t.__dupWarned=!0,H(`Multiple instances of the reactive runtime detected on this page (active: ${t.version}, duplicate: ${Ur}). Reactivity is NOT broken and no bundler configuration is required: every copy routes through the first one via a global registry, so signal writes still reach subscribers registered by any copy. This is only a SIZE issue \u2014 the duplicate copy's bytes are downloaded and parsed for nothing. If you want them back, de-duplicate sibujs in your bundler (Vite: resolve.dedupe: ['sibujs']). Mismatched VERSIONS above are worth fixing regardless, since only the first one loaded is used.`)),t;let n={suspendTracking:pn,resumeTracking:mn,isTrackingSuspended:Rr,untracked:Lr,retrack:hn,track:Mr,reactiveBinding:yn,recordDependency:Dr,cleanup:et,setMaxSubscriberRepeats:Hr,setMaxDrainIterations:$r,drainNotificationQueue:jr,queueSignalNotification:Vr,notifySubscribers:Fr,getSubscriberCount:zr,getSubscriberDeps:Wr,forEachSubscriber:qr,getOwnerScope:gn,runWithOwnerScope:Lt,bindOwnerScope:bn,structuralBinding:Or,version:Ur};return e[Kr]=n,n}var z=_s(),je=z.suspendTracking,Ve=z.resumeTracking,Jr=z.isTrackingSuspended,be=z.untracked,Pe=z.retrack,tt=z.track,G=z.reactiveBinding,Fe=z.recordDependency,ze=z.cleanup,yd=z.setMaxSubscriberRepeats,Gr=z.setMaxDrainIterations,Yr=z.drainNotificationQueue,Zr=z.queueSignalNotification,nt=z.notifySubscribers,Sd=z.getSubscriberCount,vd=z.getSubscriberDeps,xd=z.forEachSubscriber,rt=z.getOwnerScope??gn,Mt=z.runWithOwnerScope??Lt,te=z.bindOwnerScope??bn,We=z.structuralBinding??((e,t)=>({stop:z.reactiveBinding(e,t),run:n=>n()}));function mt(e,t,n){if(Le(t))return me(e,t,"",{label:`bindAttribute("${t}")`}),()=>{};function r(){let o;try{o=n()}catch(i){M(i,{phase:"binding",name:`bindAttribute("${t}")`,node:e});return}me(e,t,o,{label:`bindAttribute("${t}")`,reactive:!0})}return G(r,e)}function Xr(e,t,n){let r=null;function o(){let s;try{s=typeof t=="function"?t():t}catch(l){M(l,{phase:"binding",name:"bindDynamic (name getter)",node:e});return}let a;try{a=typeof n=="function"?n():n}catch(l){M(l,{phase:"binding",name:"bindDynamic (value getter)",node:e});return}r!==null&&r!==s&&(e.removeAttribute(r),r=null),me(e,s,a,{label:"bindDynamic",reactive:!0})&&(r=s)}let i=G(o,e);return()=>{i(),r!==null&&e.removeAttribute(r)}}var Sn=["data-focus-key","id","name"],Ns=new Set(["text","search","url","tel","password",""]);function Rs(e){let t=e.tagName;if(!(t==="TEXTAREA"||t==="INPUT"&&Ns.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 gt(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,...Rs(t)}}function Ls(e){return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Ms(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 l=0;l<a.length;l++)r++,n??(n=a[l]);if(r>1)return{el:null,count:r}}return r===1?{el:n,count:r}:{el:null,count:r}}function Qr(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 ot(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){Qr(e.el,e);return}let i=!1;if(e.attr&&e.value){let{el:s,count:a}=Ms(t,`[${e.attr}=${Ls(e.value)}]`);if(s&&s.tagName===e.tag){Qr(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}ie(()=>{let s=e.attr?` (${e.attr}="${e.value}")`:"",a=i?`several elements in the rebuilt subtree share ${e.attr}="${e.value}", so there is no way to tell which one the user was in \u2014 a shared name (a radio group) identifies a GROUP, not a control. Add a unique id or data-focus-key to each`:"no element in the rebuilt subtree carries the same identity. Give it a stable id, name, or data-focus-key that the rebuild reproduces";return`${n}: a reactive rebuild discarded the focused element <${e.tag.toLowerCase()}>${s} and could not re-establish it, so focus fell back to <body>. An in-progress edit ends here, and an in-progress IME composition is lost outright \u2014 a composition belongs to the DOM node, so it cannot survive the node being destroyed. ${a}, or stop the rebuild from happening: key the subtree with match(() => shapeKey(), { \u2026 }) so it is re-created only when the shape actually changes, and drive the rest with reactive attributes and text children, which mutate nodes in place instead of replacing them. If dropping focus is INTENDED here (closing a panel, say), pass { focus: "discard" } to when()/match() to silence this, or { focus: { restoreTo: element } } to send focus somewhere other than <body>.`})}function ke(e,t){let n=[],r=ye();function o(){let i;try{i=ee(r,t)}catch(p){M(p,{phase:"binding",name:"bindChildNode",node:e});return}let s=gt(n);if(i==null||typeof i=="boolean"){for(let p=0;p<n.length;p++){let g=n[p];B(g),g.parentNode&&g.parentNode.removeChild(g)}n.length=0,ot(s,n,"bindChildNode");return}let a=e.parentNode;if(!a){n.length=0;return}let l;if(Array.isArray(i)){l=[];let p=new Set;for(let g=0;g<i.length;g++){let b=i[g];if(b==null||typeof b=="boolean")continue;let c=b instanceof Node?b:document.createTextNode(String(b));if(p.has(c)){H("bindChildNode: duplicate node reference in array \u2014 only the first occurrence is rendered.");continue}p.add(c),l.push(c)}}else l=[i instanceof Node?i:document.createTextNode(String(i))];let u;if(n.length>0&&l.length>0){let p=new Set(n);u=new Set;for(let g=0;g<l.length;g++)p.has(l[g])&&u.add(l[g])}for(let p=0;p<n.length;p++){let g=n[p];u?.has(g)||(B(g),g.parentNode&&g.parentNode.removeChild(g))}let d=e;for(let p=0;p<l.length;p++){let g=l[p];d.nextSibling!==g&&a.insertBefore(g,d.nextSibling),d=g}n=l,ot(s,l,"bindChildNode")}return G(o,e,!0)}function vn(){throw new Error('[SibuJS] renderToString needs a DOM: register happy-dom or jsdom globals first. There is no global `document`, and SibuJS builds live DOM nodes, on the server too. For example: import { GlobalRegistrator } from "@happy-dom/global-registrator"; GlobalRegistrator.register(); See SSR in AGENTS.md \xA710.')}function se(){typeof document>"u"&&vn()}var $="http://www.w3.org/2000/svg",Os=new Set(["config","location","history","document","window","navigator","name","top","parent","self","frames"]);var xn=new Set,eo=100,to=!1,no=new Map;function ro(e){let t=no.get(e);return t!==void 0||(t=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),no.set(e,t)),t}function Ps(e,t){if(typeof t=="function"){let r=t,o=[],i=!1,s=G(()=>{let a=r();if(a===null||typeof a!="object"){o=[],i=!0,e.setAttribute("style",kt(String(a),{element:e}));return}let l=e.style;i&&(e.removeAttribute("style"),i=!1);let u=[];for(let d in a){if(!Object.hasOwn(a,d))continue;let p=a[d];if(p==null)continue;let g=ro(d);u.push(g),l.setProperty(g,Et(g,String(p),{element:e}))}for(let d=0;d<o.length;d++)u.indexOf(o[d])===-1&&l.removeProperty(o[d]);o=u},e);C(e,s);return}if(typeof t=="string"){e.setAttribute("style",kt(t,{element:e}));return}let n=e;for(let r in t){if(!Object.hasOwn(t,r))continue;let o=t[r],i=ro(r);if(typeof o=="function"){let s=o,a=G(()=>{n.style.setProperty(i,Et(i,String(s()),{element:e}))},e);C(e,a)}else n.style.setProperty(i,Et(i,String(o),{element:e}))}}function Ds(e,t){if(typeof t=="string"){e.setAttribute("class",t);return}if(typeof t=="function"){let i=G(()=>{let s=t();s==null||s===!1?e.removeAttribute("class"):e.setAttribute("class",s)},e);C(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=G(()=>{let a="";for(let l in n){if(!Object.hasOwn(n,l))continue;let u=n[l];(typeof u=="function"?u():u)&&(a=a?`${a} ${l}`:l)}e.setAttribute("class",a)},e);C(e,s)}else e.setAttribute("class",o)}function wn(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),C(e,ke(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),C(e,ke(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),C(e,ke(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 m(e,t){let n=wr(e);return(r,o)=>{if(n)throw new Error(`tagFactory: refusing to create <${e}> \u2014 tag is blocked for security reasons.`);typeof document>"u"&&vn();let i=dt(e,t);if(r===void 0)return i;if(typeof r=="string")return o!==void 0?(i.setAttribute("class",r),wn(i,o),i):(ie(()=>{let b=r.trim().split(/\s+/);if(b.length<2)return"";let c=0;for(let h=0;h<b.length;h++){let y=b[h];if(!/^-?[A-Za-z_][A-Za-z0-9_:/.-]*$/.test(y))return"";/[-:/0-9]/.test(y)&&c++}if(c<2)return"";let f=`${e}|${r}`;return xn.has(f)?"":xn.size>=eo?to?"":(to=!0,`tagFactory: ${eo} distinct lone-string class warnings have been reported; suppressing further ones for the rest of this session so they cannot flood the console. Fix the reported ones and reload to see any that remain.`):(xn.add(f),`tagFactory: lone string "${r}" looks like a class list but is being rendered as TEXT. For a class, use ${e}({ class: "${r}" }) \u2014 or ${e}("${r}", children) to set the class AND add children.`)}),i.textContent=r,i);if(typeof r=="number")return i.textContent=String(r),i;if(Array.isArray(r)||r instanceof Node||typeof r=="function")return wn(i,r),i;let s=r,a=s.class;a!=null&&Ds(i,a);let l=s.id;typeof l=="function"?C(i,mt(i,"id",l)):l!=null&&(typeof l=="string"&&Os.has(l.toLowerCase())&&H(`tagFactory: element id="${l}" matches a common global and may cause DOM clobbering. Avoid setting ids from untrusted input.`),i.id=l);let u=o!==void 0?o:s.nodes;u!=null&&wn(i,u);let d=s.on;if(d)for(let b in d){if(!Object.hasOwn(d,b))continue;let c=d[b];typeof c=="function"?i.addEventListener(b,c):H(`tagFactory: on.${b} handler is not a function (got ${typeof c}). Event listener was not attached.`)}let p=s.style;p!=null&&Ps(i,p);let g=s.ref;g&&(g.current=i);for(let b in s)switch(b){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{if(!Object.hasOwn(s,b))continue;let c=s[b];if(c==null||Le(b))continue;typeof c=="function"?C(i,mt(i,b,c)):me(i,b,c,{syncValueProperty:!1,label:"tagFactory"})}}return typeof s.onElement=="function"&&s.onElement(i),i}}var Yd=m("html"),Hs=m("head"),$s=m("body"),Is=m("title"),P=m("div"),q=m("span"),Bs=m("section"),js=m("article"),Vs=m("header"),Fs=m("footer"),zs=m("nav"),Ws=m("main"),qs=m("aside"),Us=m("address"),Tn=m("p"),Ks=m("h1"),Js=m("h2"),En=m("h3"),Gs=m("h4"),Ys=m("h5"),Zs=m("h6"),Xs=m("blockquote"),Qs=m("dd"),ea=m("dl"),ta=m("dt"),na=m("figcaption"),ra=m("figure"),oa=m("hr"),ia=m("li"),sa=m("ol"),aa=m("ul"),kn=m("pre"),la=m("a"),ua=m("abbr"),ca=m("b"),da=m("bdi"),fa=m("bdo"),pa=m("br"),ma=m("cite"),Cn=m("code"),ga=m("data"),ba=m("dfn"),ha=m("em"),ya=m("i"),Sa=m("kbd"),va=m("mark"),xa=m("q"),wa=m("rp"),Ta=m("rt"),Ea=m("ruby"),ka=m("s"),Ca=m("samp"),Aa=m("small"),_a=m("strong"),Na=m("sub"),Ra=m("sup"),La=m("time"),Ma=m("u"),Oa=m("var"),Pa=m("area"),Da=m("audio"),Ha=m("img"),$a=m("map"),Ia=m("track"),Ba=m("video"),ja=m("embed"),Va=m("iframe"),Fa=m("object"),za=m("param"),Wa=m("picture"),qa=m("portal"),Ua=m("source"),Ka=m("svg",$),Ja=m("math"),Ga=m("canvas"),Ya=m("noscript"),Za=m("script"),Xa=m("del"),Qa=m("ins"),el=m("caption"),tl=m("col"),nl=m("colgroup"),rl=m("table"),ol=m("tbody"),il=m("td"),sl=m("tfoot"),al=m("th"),ll=m("thead"),ul=m("tr"),bt=m("button"),cl=m("datalist"),dl=m("fieldset"),fl=m("form"),pl=m("input"),ml=m("label"),gl=m("legend"),bl=m("meter"),hl=m("optgroup"),yl=m("option"),Sl=m("output"),vl=m("progress"),xl=m("select"),wl=m("textarea"),Tl=m("details"),El=m("dialog"),kl=m("menu"),Cl=m("summary"),Al=m("slot"),_l=m("template"),Nl=m("base"),Rl=m("link"),Ll=m("meta"),qe=m("style"),Ml=m("circle",$),Ol=m("ellipse",$),Pl=m("g",$),Dl=m("line",$),Hl=m("path",$),$l=m("polygon",$),Il=m("polyline",$),Bl=m("rect",$),jl=m("text",$),Vl=m("tspan",$),Fl=m("defs",$),zl=m("clipPath",$),Wl=m("mask",$),ql=m("pattern",$),Ul=m("linearGradient",$),Kl=m("radialGradient",$),Jl=m("stop",$),Gl=m("use",$),Yl=m("symbol",$),Zl=m("marker",$),Xl=m("center"),Ql=m("font"),eu=m("marquee"),tu=e=>m(e);var oo,An=globalThis[oo=Symbol.for("sibujs.streamBoundary.v1")]??(globalThis[oo]={hook:null,current:null});function io(e){return An.hook?An.hook(e):null}function Ot(){return An.current}var _n=Symbol.for("sibujs.ssr.v1");function nu(){let e=null;try{if(typeof process<"u"&&process.versions&&process.versions.node){let n=null,r=process.getBuiltinModule;typeof r=="function"?n=r("node:async_hooks"):typeof Gt=="function"&&(n=Gt("async_hooks")),n&&(e=new n.AsyncLocalStorage)}let t=globalThis.AsyncLocalStorage;!e&&typeof t=="function"&&(e=new t)}catch{e=null}return{als:e,fallbackStore:{ssr:!1,suspenseIdCounter:0,locale:void 0},fallbackDepth:0}}var De=globalThis[_n]??(globalThis[_n]=nu()),Ke=De.als,Ue=De.fallbackStore;De.fallbackDepth??(De.fallbackDepth=0);var so=!1;function ru(){if(so||Ke||!(typeof process<"u"&&!!process.versions?.node))return;so=!0;let t=process.versions.node;H(`SSR request isolation is UNAVAILABLE on this runtime (Node ${t}). AsyncLocalStorage could not be loaded, so concurrent requests share one SSR store: request state and the query cache can bleed between them. Node >= 22.3 is required for isolated SSR under ESM; the CommonJS build works on older versions. A fully synchronous render is unaffected.`)}function He(){if(Ke){let e=Ke.getStore();if(e)return e}return Ue}function Nn(){return Ke?Ke.getStore()??null:De.fallbackDepth>0?Ue:null}function ne(){return He().ssr}function ao(e){if(!ne())return null;let t=He(),n=t.caches??(t.caches=new Map),r=n.get(e);return r||(r=new Map,n.set(e,r)),r}var ou=Symbol.for("sibujs.prerender.v1");function ht(){return He().ssr||globalThis[ou]!==void 0}function lo(){return!ht()}function uo(){He().ssr=!0}function co(){He().ssr=!1}function fo(e){let t={ssr:!0,suspenseIdCounter:0,idCounter:0,locale:void 0,pending:new Set,wake:null};if(Ke)return Ke.run(t,e);ru();let n={...Ue};Object.assign(Ue,t),De.fallbackDepth++;try{return e()}finally{De.fallbackDepth--;for(let r of Object.keys(Ue))r in n||delete Ue[r];Object.assign(Ue,n)}}function po(e,t,n=!0){let r=Nn(),o=r?.pending,i=o||!n?[]:Qt();if(!o&&i.length===0)return e;let s={label:t,since:Date.now(),boundary:Ot()??void 0};o?.add(s);let a=ar(i,s),l=()=>{o?.delete(s),r?.wake?.(),a()};try{Promise.resolve(e).then(l,l)}catch{l()}return e}function mo(e){let t=He(),n=t.ssr;t.ssr=!0;try{return e()}finally{n||(t.ssr=!1)}}var Rn="__sibuPendingError";function go(e,t){let n=()=>e.parentNode?(M(t,{phase:"render",name:"lazy",node:e}),!0):!1;n()||queueMicrotask(()=>{n()||(e[Rn]=t)})}function Pt(e){let t=e,n=t[Rn];if(n instanceof Error)return delete t[Rn],n}function bo(e){let t=null;return function(){if(t&&!nr())return t();let r=P({class:"sibu-lazy"}),o=ye(),i=Ot(),s=!1,a=ee(null,()=>q("sibu-lazy-loading","Loading..."));if(t){let l=t;return le(r,ee(o,()=>l())),r}return po(e(),"lazy").then(te(l=>{if(s)return;t=l.default;let u=t,d=()=>ee(o,()=>u()),p=i?i.enter(d):d();le(r,p)})).catch(l=>{if(s)return;let u=l instanceof Error?l:new Error(String(l));le(r,P({class:"sibu-lazy-error"},`Failed to load component: ${u.message}`)),go(r,u)}),xe()&&r.firstChild||r.appendChild(a),C(r,()=>{s=!0}),r}}function ho({nodes:e,fallback:t}){let n=P({class:"sibu-suspense"}),r=ye(),o=io(n),i=p=>{le(n,p),o?.done()},s=ee(null,t);xe()&&n.firstChild?B(s):n.appendChild(s);let a=!1,l=null,u=null;C(n,()=>{a=!0,l&&(l.disconnect(),l=null),u&&!n.contains(u)&&B(u)});let d=te(()=>{if(!a)try{let p=o?o.enter(()=>ee(r,e)):ee(r,e);if(u=p,p.classList.contains("sibu-lazy")){if(!p.querySelector(".sibu-lazy-loading")){i(p);return}l=new MutationObserver(()=>{if(a)return;p.querySelector(".sibu-lazy-loading")||(l?.disconnect(),l=null,i(p))}),l.observe(p,{childList:!0,subtree:!0})}else i(p)}catch(p){let g=p instanceof Error?p:new Error(String(p));go(n,g)}});return queueMicrotask(d),n}function Pn(e,t){return()=>rt()===e?t():Mt(e,t)}function Ht(e,t){try{return e()}catch(n){let r=t.toLowerCase().includes("unmount")?"cleanup":"effect";M(n,{phase:r,name:t});return}}function Ln(e,t,n,r,o){let i=Ht(e,t);if(typeof i!="function")return;let s=Pn(o,i);r()||!n.isConnected?Ht(s,"onUnmount"):So(s,n)}var it=new WeakMap,Je=new WeakMap,Ce=new Set,Ae=new Set,st=null,Dt=0,iu=256;function Mn(e){let t=it.get(e);if(t){it.delete(e),Ce.delete(e);for(let n of t)try{n()}catch{}}}function On(e){Je.get(e)&&queueMicrotask(()=>{if(e.isConnected)return;let n=Je.get(e);if(n){Je.delete(e),Ae.delete(e);for(let r of n)try{r()}catch{}}})}function su(e){if(Ce.size===0||e.nodeType!==1)return;let t=e;if(Ce.has(t)&&t.isConnected&&Mn(t),t.firstElementChild)for(let n of Array.from(Ce))n!==t&&n.isConnected&&t.contains(n)&&Mn(n)}function au(e){if(Ae.size===0||e.nodeType!==1)return;let t=e;if(Ae.has(t)&&!t.isConnected&&On(t),t.firstElementChild)for(let n of Array.from(Ae))n!==t&&!n.isConnected&&t.contains(n)&&On(n)}function lu(){if(Ce.size>0)for(let e of Array.from(Ce))e.isConnected&&Mn(e);if(Ae.size>0)for(let e of Array.from(Ae))e.isConnected||On(e)}function yo(){st||typeof document>"u"||(st=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++)su(t.addedNodes[n]);if(t.removedNodes.length>0)for(let n=0;n<t.removedNodes.length;n++)au(t.removedNodes[n])}Dt+=e.length,Dt>=iu&&(Dt=0,lu()),Dn()}),st.observe(document.body,{childList:!0,subtree:!0}))}function Dn(){st&&Ce.size===0&&Ae.size===0&&(st.disconnect(),st=null,Dt=0)}function uu(e,t){let n=it.get(e);return n||(n=[],it.set(e,n)),n.push(t),Ce.add(e),yo(),()=>{let r=it.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(it.delete(e),Ce.delete(e))}Dn()}}function cu(e,t){let n=Je.get(e);return n||(n=[],Je.set(e,n)),n.push(t),Ae.add(e),yo(),()=>{let r=Je.get(e);if(r){let o=r.indexOf(t);o!==-1&&r.splice(o,1),r.length===0&&(Je.delete(e),Ae.delete(e))}Dn()}}function $t(e,t){if(typeof document>"u"||ne())return;let n=rt();if(e=Pn(n,e),t){let r=!1,o=()=>r;if(C(t,()=>{r=!0}),t.isConnected){queueMicrotask(()=>{r||Ln(e,"onMount",t,o,n)});return}queueMicrotask(()=>{if(r)return;if(t.isConnected){Ln(e,"onMount",t,o,n);return}let i=uu(t,()=>{r||Ln(e,"onMount",t,o,n)});C(t,i)})}else queueMicrotask(()=>{Ht(e,"onMount")})}function du(e,t){typeof document>"u"||ne()||So(Pn(rt(),e),t)}function So(e,t){let n=!1,r=()=>{n||(n=!0,Ht(e,"onUnmount"))};C(t,r);let o=()=>{if(n)return;let i=cu(t,r);C(t,i)};t.isConnected?o():$t(()=>{o()},t)}function fu(e,t){C(t,e)}function fe(e,t,n){try{e.emit(t,n)}catch{}}var To=globalThis;function pu(e,t){let n,r=!0;return()=>{let o=e();if(r)r=!1,n=o,be(()=>t(o,void 0));else{let i=n;n=o,be(()=>t(o,i))}}}var vo=100;function It(e){let t=e.userCleanups;if(t.length===0)return;e.userCleanups=[];let n=e.subscriber._scope??null;n===rt()?xo(t):Mt(n,()=>xo(t))}function xo(e){for(let t=e.length-1;t>=0;t--)try{e[t]()}catch(n){M(n,{phase:"cleanup"})}}function wo(e){let t=1;do e.rerunPending=!1,e.userCleanups.length>0&&It(e),Pe(e.bodyFn,e.subscriber);while(e.rerunPending&&++t<=vo);e.rerunPending&&(e.rerunPending=!1,M(new Error(`effect re-requested itself ${vo}+ times \u2014 likely a write-reads-self cycle. Breaking to prevent infinite loop.`),{phase:"effect"}))}function mu(e){if(e.disposed)return;e.disposed=!0;let t=To.__SIBU_DEVTOOLS_GLOBAL_HOOK__;if(t)try{t.emit("effect:destroy",{effectFn:e.fn})}catch{}try{e.userCleanups.length>0&&It(e)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] onCleanup threw during dispose:",n)}try{ze(e.subscriber)}catch(n){typeof console<"u"&&console.warn("[SibuJS effect] dispose threw:",n)}}function re(e,t){if(V(typeof e=="function","effect: argument must be a function."),ne()&&!t?.server)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&&It(n),Pe(n.bodyFn,o),n.rerunPending&&wo(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{Pe(n.bodyFn,n.subscriber),n.rerunPending&&wo(n)}catch(s){throw n.disposed=!0,n.userCleanups.length>0&&It(n),ze(n.subscriber),s}finally{n.running=!1,n.rerunPending=!1}let i=To.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&fe(i,"effect:create",{effectFn:e}),()=>mu(n)}var yt=0,Hn=new Set;function gu(e){yt++;try{return e()}finally{yt--,yt===0&&yu()}}function bu(e){return yt===0?!1:(Hn.add(e),!0)}function hu(){return yt>0}function yu(){try{for(let e of Hn)Zr(e)}finally{Hn.clear()}Yr()}var Eo=Symbol.for("sibujs.reactive.batch.v1");function Su(){let e=globalThis,t=e[Eo];if(t)return t;let n={batch:gu,enqueueBatchedSignal:bu,isBatching:hu};return e[Eo]=n,n}var $n=Su(),U=$n.batch,Ge=$n.enqueueBatchedSignal,vu=$n.isBatching;var In=globalThis;function A(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=t?.name,o=t?.equals;r&&(n.__name=r);function i(){return Fe(n),n.value}i.__signal=n,r&&(i.__name=r);let s;if(o?s=a=>{let l=n.value,u=typeof a=="function"?a(l):a;if(!o(l,u)){if(n.value=u,n.__v++,!0){let d=In.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&fe(d,"signal:update",{signal:n,name:r,oldValue:l,newValue:u})}Ge(n)||nt(n)}}:s=a=>{let l=n.value,u=typeof a=="function"?a(l):a;if(Object.is(u,l))return;n.value=u,n.__v++;let d=In.__SIBU_DEVTOOLS_GLOBAL_HOOK__;d&&fe(d,"signal:update",{signal:n,name:r,oldValue:l,newValue:u}),Ge(n)||nt(n)},!0){let a=In.__SIBU_DEVTOOLS_GLOBAL_HOOK__;a&&fe(a,"signal:create",{signal:n,name:r,getter:i,initial:e})}return[i,s]}function xu(e){let[t,n]=A(0,e?.name?{name:e.name}:void 0);return{track(){t()},invalidate(){n(r=>r+1)}}}var wu=`
|
|
8
8
|
.sibu-error-display {
|
|
9
9
|
border: 1px solid var(--sibu-err-border, #e5484d);
|
|
10
10
|
border-radius: 10px;
|