smbls 3.14.185 → 3.14.188

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # smbls
2
2
 
3
+ ## 3.14.188
4
+
5
+ ### Patch Changes
6
+
7
+ - Auto-generated cross-repo patch release.
8
+
3
9
  ## 3.14.185
4
10
 
5
11
  ### Patch Changes
package/dist/smbls.cjs CHANGED
@@ -33,7 +33,7 @@ FROM ${a}${c}`},J2=e=>{let t=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;
33
33
  font-display: ${n.fontDisplay};`:""}
34
34
  src: ${i};`},dn=(e,t,r,n)=>`@font-face {${oc(e,t,r,n)}
35
35
  }`,so=(e,t,r)=>Object.keys(t).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:l,fontStretch:c}=t[o],u=Array.isArray(s)?s.map(d=>Ot(d,r)||d):Ot(s,r)||s;return oc(e,u,i,{fontStyle:a,fontDisplay:l,fontStretch:c})}),Z_=e=>Object.keys(e).map(r=>so(r,e[r].value)),yg=(e,t,r)=>{if(t&&t.isVariable){let s=Ot(t.url,r)||t.url;return ui(s)?fi(s):dn(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap"})}if(t[0])return so(e,t,r).map(mg);let o=Array.isArray(t.url)?t.url.map(s=>Ot(s,r)||s):Ot(t.url,r)||t.url;return dn(e,o,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch})},sc=(e,t)=>Object.keys(e).map(n=>yg(n,e[n].value,t));F();F();F();var di={};K(di,{animation:()=>hw,breakpoints:()=>dw,class:()=>xw,color:()=>sw,devices:()=>pw,document:()=>h$,font:()=>Q_,fontFace:()=>rw,fontFamily:()=>ew,fontFamilyTypes:()=>tw,gradient:()=>iw,grid:()=>bw,icons:()=>cw,media:()=>nw,reset:()=>m$,semanticIcons:()=>uw,sequence:()=>Rr,shadow:()=>lw,sizes:()=>_w,spacing:()=>ow,svg:()=>gw,svgData:()=>mw,templates:()=>yw,theme:()=>aw,timing:()=>fw,typography:()=>ic,unit:()=>J_,vars:()=>vw});var Rr={"minor-second":1.067,"major-second":1.125,"minor-third":1.2,"major-third":1.25,"perfect-fourth":1.333,"augmented-fourth":1.414,"perfect-fifth":1.5,"minor-sixth":1.6,phi:1.618,"major-sixth":1.667,"square-root-3":1.732,"minor-seventh":1.778,"major-seventh":1.875,octave:2,"square-root-5":2.23,"major-tenth":2.5,"major-eleventh":2.667,"major-twelfth":3,pi:3.14,"double-octave":4};var J_={default:"em"};var f$={browserDefault:16,base:16,type:"font-size",ratio:Rr["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},ic=f$;var Q_={};var ew={},tw={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},rw={};var nw={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var d$={base:ic.base,type:"spacing",ratio:Rr.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},ow=d$;var sw={},iw={};var aw={};var lw={};var cw={},uw={};var p$={default:150,base:150,type:"timing",ratio:Rr["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},fw=p$;var h$={};var dw={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},pw={screenXXL:[2560,1440],screenXL:[2240,1260],screenL:[1920,1024],screenM:[1680,1024],screenS:[1440,720],tabletL:[1366,926],tabletM:[1280,768],tabletS:[1024,768],mobileL:[768,375],mobileM:[560,768],mobileS:[480,768],mobileXS:[375,768]};var hw={};var gw={},mw={};var yw={};var g$={},bw=g$;var xw={};var m$={},vw={},_w={};var bg={},xg={},ac=di,lc={},cc=e=>e.replace(/_([a-z])/g,(t,r)=>r.toUpperCase());for(let e in ac){let t=e.toLowerCase();lc[t]=ac[e];let r=cc(t);r!==t&&(lc[r]=ac[e]),t!==e&&(lc[e]=ac[e])}var uc={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:bg,cssMediaVars:xg,CSS_VARS:bg,CSS_MEDIA_VARS:xg,_scratchConfig:!0,...lc},ww=ge(uc),ir={active:"0",0:uc},y$=e=>(qe(e)&&(ir.active=e),ir[e||ir.active]),pi=[],ke=e=>{e&&e._scratchConfig&&pi.push(e)},ve=()=>{pi.pop()},R=e=>pi.length?pi[pi.length-1]:ir[e||ir.active]||uc,vg=e=>{if(k(e))return ir.active="1",ir[1]=fe(e,ge(ww)),e},b$=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],x$=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],v$=e=>{for(let t of x$){let r;for(let n of t){let o=e[n];k(o)&&(r=r?fe(o,r):o)}if(r)for(let n of t)k(e[n])&&(e[n]=r)}},_g=(e,t,{cleanBase:r=!1}={})=>{let n=r?null:R(),o=ge(!r&&n&&n._scratchConfig?n:ww);for(let i of b$)delete o[i];let s=fe(t||{},o);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,v$(s),e&&(ir[e]=s),s};var ar={"-6":"U","-5":"V","-4":"W","-3":"X","-2":"Y","-1":"Z",0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N",14:"O",15:"P",16:"Q",17:"R",18:"S",19:"T"},wg=(e,t)=>{let{key:r,variable:n,value:o,scaling:s,index:i,scalingVariable:a}=e;t.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:n},t.scales[r]=s;let l=Sw.has(t.unit)?"rem":t.unit;t.vars[n]=s+l},Pr=e=>{if(!e.includes("("))return e;let t=e.split("(")[0],r=e.slice(e.indexOf("(")+1,e.lastIndexOf(")"));return[t,r]},Sw=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),fc=(e,t)=>{let{base:r,type:n,unit:o}=t,s=Sw.has(o)?"rem":o,i=(Mn(s)?1:r)+s;if(e===0)return i;let l="--"+(t.varPrefix?t.varPrefix+"-":"")+(n&&n.replace(".","-")),c=`${l}-ratio`;if(e>0){let u=ar[e-1];return`calc(var(${l}-${u}) * var(${c}))`}if(e<0){let u=ar[e+1],d=Math.abs(e),f=Math.pow(kw,2*d),p=ar[d];return p?`max(calc(var(${l}-${u}) / var(${c})), calc(var(${l}-${p}) / ${f.toFixed(4)}))`:`calc(var(${l}-${u}) / var(${c}))`}},Sg=(e,t,r,n)=>{let{type:o}=n,i=e===2&&t.length===2?e+1:e,c=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${c+i}))`},dc=(e,t)=>{let n=(e*t-e)/1.618,o=e*t-n,s=e+n,i=(o+s)/2;return[o,i,s]},pc=(e,t)=>dc(e,t).map(r=>r/e),hc=(e,t)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:a}=e,c=~~(o*s)-~~o,u,[d,f,p]=dc(o,s);c>16?u=[d,f,p]:u=[d,p],u.forEach((h,g)=>{let m=~~(h/n*1e3)/1e3,y=i+(g+1),b=a+(g+1)/10,v=Sg(g+1,u,i,t),x={key:r+(g+1),variable:y,value:h,scaling:m,scalingVariable:v,index:b};wg(x,t)})},kw=1.618,_$=(e,t,r)=>{if(e>=0)return t*Math.pow(r,e);let n=Math.abs(e),o=t*Math.pow(r,e),s=t*Math.pow(r,n)/Math.pow(kw,2*n);return Math.max(o,s)},et=e=>{let{type:t,base:r,ratio:n,range:o,subSequence:s}=e,i=Math.abs(o[0])+Math.abs(o[1]),l="--"+(e.varPrefix?e.varPrefix+"-":"")+(t&&t.replace(".","-"))+"-";for(let c=0;c<=i;c++){let u=o[1]-c,d=ar[u],f=_$(u,r,n),p=~~(f/r*100)/100,h=l+d,g=fc(u,e),m={key:d,variable:h,value:f,base:r,scaling:p,scalingVariable:g,ratio:n,index:u};wg(m,e),s&&hc(m,e)}return e},Cw=(e,t=0)=>{let{type:r,base:n,ratio:o,subSequence:s}=e,i=C(t)?t:ar[t],a=C(t)?Object.entries(ar).find(([,m])=>m===t)?.[0]:t;if(!i)return console.warn(`Position ${t} is out of range in numToLetterMap`),null;let l={sequence:{},scales:{},vars:{},...e},c=n*Math.pow(o,a),u=~~(c/n*100)/100,p="--"+(e.varPrefix?e.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,h=fc(a,e),g={key:i,variable:p,value:c,base:n,scaling:u,scalingVariable:h,ratio:o,index:a};return wg(g,l),s&&hc(g,l),l},gc=(e="A",t)=>{let r=R(),{unit:n}=r;if(C(e)&&xe(e))return`var(${e})`;let{sequence:o,unit:s=n.default,useVariable:i}=t,a=/^-?[a-zA-Z]/i,l=a.test(e);if(Nn.some(x=>e.includes(x))||!l||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(e))return e;let f=`--${t.varPrefix?t.varPrefix+"-":""}${ii(t.type.replace(".","-"))}-`,p=e.toUpperCase(),h=p.slice(0,1)==="-"?"-":"",g=h?p.slice(1):p,m="";g.includes("_")&&(m="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let y=x=>a.test(x)?`var(${f}${x}${m})`:x;if(g.includes("+")){let[x,_]=g.split("+"),S=`${y(x)} + ${y(_)}`;return h?`calc((${S}) * -1)`:`calc(${S})`}else if(g.includes("*")){let[x,_]=g.split("*"),S=`${y(x)} * ${y(_)}`;return h?`calc((${S}) * -1)`:`calc(${S})`}else if(g.includes("-")){let[x,_]=g.split("-"),S=`${y(x)} - ${y(_)}`;return h?`calc((${S}) * -1)`:`calc(${S})`}let b=r.sizes;if(b){let x=b[e]||b[e.toLowerCase()];if(x!==void 0)return h?`calc(${x} * -1)`:x}if(!o[g]&&g.length===2&&(r.verbose&&console.warn(g,"- value is not found because `subSequence` is set to false"),g=g.slice(0,1)),i||r.useVariable){let x=`var(${f}${g}${m})`;return h?`calc(${x} * -1)`:x}let v=o?o[g]:null;return v?s==="ms"||s==="s"?h+v.val+s:h+v.scaling+s:console.warn("can't find",o,g)},kg=(e,t)=>{if(!["+","-","*","/",","].filter(s=>e.includes(s+" ")).length)return e;let n=/(\s*[+\-*/,]\s*)/;return e.split(n).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:gc(i,t)}).join("")},lr=(e,t,r,n)=>{if(typeof e!="string")return R().verbose&&console.warn(t,e,"is not a string"),{[t]:e};if(e==="-"||e==="")return{};if(!n&&e.includes("(")){let s=Pr(e);n=s[0],e=s[1]}return["+","-","*","/",","].filter(s=>e.includes(s+" ")).length?e=kg(e,r):e=gc(e,r),{[t]:n?`${n}(${e})`:e}},Cg=(e,t)=>ar[e-t],mc=e=>{let{h1Matches:t,sequence:r}=e;return new Array(6).fill(null).map((n,o)=>{let s=Cg(t,o);return r[s]})};F();var Aw=(e,t)=>{let r=R(),{cssVars:n}=r;te(e.value)||(n[e.var]=e.value)},yc=(e,t,r)=>{let n=R(),{unit:o}=n,s=t.unit||o.default,{base:i,ratio:a,type:l}=t,u="--"+(t.varPrefix?t.varPrefix+"-":"")+(l&&l.replace(".","-"));e[`${u}-base`]=i,e[`${u}-unit`]=s;let d=`${u}-ratio`;e[d]=a;let[f,p,h]=pc(i,a);e[`${u}-sub-ratio-1`]=`calc(var(${u}-ratio) * ${f/a})`,e[`${u}-sub-ratio-2`]=`calc(var(${u}-ratio) * ${p/a})`,e[`${u}-sub-ratio-3`]=`calc(var(${u}-ratio) * ${h/a})`},Ew=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),$r=(e,t={})=>{let r=R(),{unit:n,timing:o,cssVars:s}=r,i=e.unit||n.default,a=Ew.has(i)?"rem":i,{mediaRegenerate:l,sequence:c,scales:u}=e;l||yc(s,e,t);for(let d in c){let f=c[d],p=(e.type===o.type?c[d].val:u[d])+a;if(!l){s[f.variable+"_default"]=p,s[f.variable]=f.scalingVariable;continue}t.useDefault===!1?s[f.variable]=p:(s[f.variable+"_default"]=p,s[f.variable]=`var(${f.variable+"_default"})`)}},pn=(e,t,r={})=>{let n=R(),{unit:o,media:s,cssVars:i}=n,a=t.slice(1),l=e[t],c=l.unit||e.unit||o.default,u=Ew.has(c)?"rem":c,{mediaRegenerate:d}=e,{sequence:f,scales:p}=l,h=s[a];if(!h&&n.verbose&&console.warn("Can't find media query ",h),!d){let g=i[`@media ${h}`];g||(g=i[`@media ${h}`]={}),yc(g,l,r);let m=e.unit||o.default;if(u!==m&&f)for(let y in f){let b=f[y],v=p[y]+u;g[b.variable+"_default"]=v,g[b.variable]=v}return}for(let g in f){let m=f[g],y=(Mn(u)?p[g]:f[g].val)+u;!h&&n.verbose&&console.warn("Can't find query ",h);let b=i[`@media ${h}`];b||(b=i[`@media ${h}`]={}),b[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=y}};F();var Tw=on(),hi=e=>{let t=R(),r="";for(let n in e)t.__svgCache[n]||(t.__svgCache[n]=!0,r+=e[n]);return r},w$=e=>{let t=e&&(e.default||e);if(!C(t))return Tw&&console.warn("parseRootAttributes:",t,"is not a string"),{};let r=t.match(/<svg\s+(.*?)>/);if(!r||!r[1])return{};let o=r[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return o?o.reduce((s,i)=>{let[a,l]=i.split("=");return s[a]=l.replace(/['"]/g,""),s},{}):{}},S$=(e,t)=>{let r=[];if(e.replace(/id="([^"]*)"/g,(o,s)=>(r.push(s),o)),!r.length)return e;let n=e;for(let o of r){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${t}-${o}`;n=n.replace(new RegExp(`id="${s}"`,"g"),`id="${i}"`).replace(new RegExp(`url\\(#${s}\\)`,"g"),`url(#${i})`).replace(new RegExp(`xlink:href="#${s}"`,"g"),`xlink:href="#${i}"`).replace(new RegExp(`href="#${s}"`,"g"),`href="#${i}"`)}return n},Ow=new Set,bc=(e,t)=>{let r=t&&t.default?t.default:t;if(!C(r))return Tw&&!Ow.has(e)&&(Ow.add(e),console.warn("convertSvgToSymbol:",e,"is not a string")),"";t=r;let n=w$(t),{width:o,height:s}=n,i=n.viewBox||`0 0 ${o||24} ${s||24}`,c=S$(t,e).replace("<svg",`<symbol id="${e}" xmlns="http://www.w3.org/2000/svg" viewBox="${i}"`);return c=c.replace(/width="[^"]*"/,""),c=c.replace(/height="[^"]*"/,""),c=c.replace("</svg","</symbol"),c=A$(c),c},k$="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",C$=new RegExp(`<(${k$})\\b([^>]*?)\\s*/>`,"g"),A$=e=>e.replace(C$,"<$1$2></$1>");var bi={};K(bi,{appendSVGSprite:()=>Ic,appendSvgIconsSprite:()=>jc,applyDocument:()=>$c,applyHeadings:()=>Tg,applyReset:()=>Dc,applySpacingSequence:()=>Oc,applyTimingSequence:()=>Pc,applyTypographySequence:()=>Cc,checkIfBoxSize:()=>Ec,getColor:()=>me,getFontFamily:()=>kc,getFontSizeByKey:()=>Ac,getMediaColor:()=>De,getMediaTheme:()=>Tt,getShadow:()=>Rc,getSpacingBasedOnRatio:()=>Xt,getSpacingByKey:()=>Re,getTheme:()=>vc,getTimingByKey:()=>ht,getTimingFunction:()=>Rt,runThroughMedia:()=>Og,setColor:()=>gn,setFont:()=>Sc,setFontFamily:()=>mi,setGradient:()=>mn,setMediaTheme:()=>wc,setSVG:()=>yi,setShadow:()=>yn,setSvgIcon:()=>Fc,setTheme:()=>_c,splitSpacedValue:()=>Tc});F();var me=(e,t,r)=>{let n=r||R();if(!C(e)){n.verbose&&console.warn(e,"- type for color is not valid");return}if(xe(e))return`var(${e})`;t&&e[t]&&(e=e[t]);let o,s,i;if(I(e))[o,s,i]=e;else{let d=Tr(e);if(!d){let{color:f,gradient:p}=n,h=p[e]||f[e];return h?n.useVariable?`var(${h.var})`:h.value:e}if(d.passthrough)return d.passthrough;if(d.cssVar)return`var(${d.cssVar})`;o=d.name,s=d.alpha,i=d.tone}let{color:a,gradient:l}=n,c=a[o]||l[o];if(!c)return n.verbose&&console.warn("Can't find color ",o),e;t&&(c[t]?c=c[t]:n.verbose&&console.warn(e," - does not have ",t));let u=c.rgb;return u?(i&&!c[i]&&(u=fn(u,i),c[i]={rgb:u,var:`${c.var}-${i}`}),c[i]&&(u=c[i].rgb),s?`rgba(${u}, ${s})`:i?`rgba(${u}, 1)`:n.useVariable?`var(${c.var})`:`rgb(${u})`):n.useVariable?`var(${c.var})`:c.value},De=(e,t,r)=>{let n=r||R();if(t||(t=n.globalTheme==="auto"?null:n.globalTheme),!C(e)){n.verbose&&console.warn(e,"- type for color is not valid");return}if(xe(e))return`var(${e})`;let o;if(I(e))o=e[0];else{let c=Tr(e);if(!c)return e;if(c.passthrough)return c.passthrough;if(c.cssVar)return`var(${c.cssVar})`;o=c.name}let{color:s,gradient:i}=n,a=s[o]||i[o],l=k(a);if(l&&a.value)return me(e,`@${t}`,r);if(l){if(n.useVariable&&a.var)return`var(${a.var})`;if(t)return me(e,`@${t}`,r);{let c={};for(let u in a){if(u.charCodeAt(0)!==64)continue;let d=n.media[u.slice(1)];if(!d)continue;let f="@media "+(d==="print"?`${d}`:`screen and ${d}`);c[f]=me(e,u,r)}return c}}else return n.verbose&&console.warn("Can't find color",e),e},gn=(e,t,r)=>{let n=R();if(C(e)&&xe(e)){let g=e.slice(2);if(e=me(g),!(e.includes("rgb")||e.includes("var")||e.includes("#"))){let m=g.split(" "),y=n.color[m[0]];if(y&&!y.value&&!y.rgb&&(C(y)||I(y)||k(y))&&(n.color[m[0]]=gn(y,m[0]),y=n.color[m[0]]),y&&y.value){let b=y.rgb,v=m[1]!==void 0?m[1]:"1",x=m[2];x&&(b=fn(b,x)),e=`rgba(${b}, ${v})`}else{let b=m[2],v=m[1]!==void 0?m[1]:"1";if(b)try{let x=or(m[0]);x&&x.length>=3?e=`rgba(${fn(x.slice(0,3).join(", "),b)}, ${v})`:e=m[0]}catch{e=m[0]}else e=m[0]}}}if(I(e)&&(e={"@light":e[0],"@dark":e[1]}),k(e)){let g={};for(let m in e)g[m]=gn(e[m],t,m.slice(0,1)==="@"?m.slice(1):m);if(n.useVariable){let y=`--${n.varPrefix?n.varPrefix+"-":""}color-${t}`,b,v={};for(let x in g){if(x.charCodeAt(0)!==64)continue;let _=x.slice(1),S=g[x],E=S&&(S.value||S);!E||typeof E!="string"||(v[_]=E,(_==="light"||b===void 0)&&(b=E))}if(b!==void 0){n.cssVars[y]=b,n.cssMediaVars||(n.cssMediaVars={});for(let x in v){let _=`[data-theme="${x}"]`;if(n.cssMediaVars[_]||(n.cssMediaVars[_]={}),n.cssMediaVars[_][y]=v[x],x==="light"||x==="dark"){let S=`@media (prefers-color-scheme: ${x})`;n.cssMediaVars[S]||(n.cssMediaVars[S]={}),n.cssMediaVars[S][y]=v[x]}}g.var=y}}return g}let s=`--${n.varPrefix?n.varPrefix+"-":""}color-${t}`+(r?`-${r}`:""),i=e.value||e;if(C(i)&&i.includes(".")&&!i.includes("(")){let[g,m]=i.split("."),y=n.color[g];y&&y.rgb&&(i=`rgba(${y.rgb}, ${parseFloat("0."+m)||1})`)}if(C(i)&&!i.includes("(")&&!i.startsWith("#")){let g=Tr(i);if(g&&g.name&&!g.passthrough&&!g.cssVar){let m=n.color[g.name];m&&!m.value&&!m.rgb&&(C(m)||I(m)||k(m))&&(n.color[g.name]=gn(m,g.name));let y=n.color[g.name];if(y&&y.rgb){let b=y.rgb;g.tone&&(b=fn(b,g.tone));let v=g.alpha?parseFloat(g.alpha):1;i=`rgba(${b}, ${v})`}}}let a=or(i),[l,c,u,d=1]=a,f=parseFloat(d.toFixed(2)),p=`${l}, ${c}, ${u}`,h=`rgba(${p}, ${f})`;return n.useVariable&&(n.cssVars[s]=h),{var:s,rgb:p,alpha:f,value:h}},mn=(e,t,r)=>{let n=R();if(C(e)&&xe(e)&&(e=me(e.slice(2))),I(e))return{"@light":mn(e[0],t,"light"),"@dark":mn(e[0],t,"dark")};if(k(e)){let i={};for(let a in e)i[a]=mn(e[a],t,a.slice(0,1)==="@"?a.slice(1):a);return i}let s=`--${n.varPrefix?n.varPrefix+"-":""}gradient-${t}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[s]=e.value||e),{var:s,value:e.value||e}};F();var E$=new Set(["black","white","red","green","blue","yellow","orange","purple","pink","brown","gray","grey","cyan","magenta","lime","olive","navy","teal","aqua","maroon","silver","fuchsia","transparent","currentColor","currentcolor","inherit","initial","unset","none","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","rebeccapurple"]),Rw=["color","Color","background","Background","fill","Fill","stroke","Stroke"],O$=e=>{for(let t=0;t<Rw.length;t++)if(e.includes(Rw[t]))return!0;return!1},xc=e=>{let t={},{state:r,media:n,helpers:o,...s}=e;return Object.keys(s).map(a=>{let c=["color","Color","background","border"].some(u=>a.includes(u));return t[a]=c?me(e[a]):e[a]}),t},gi=e=>(e.value||(e.value=xc(e)),e.value),vc=(e,t)=>{let r=R();if(r.useVariable)return Tt(e,t);let n=r.theme;if(C(e)){let[o,s]=e.split(" "),i=n[o];if(i){if(!s&&!t)return gi(i);e=[o,s||t]}}if(te(e)&&e[1]){let o=e[0],s=e[1],{helpers:i,media:a,state:l}=n[o];if(a&&a[s])return gi(a[s]);if(i&&i[s])return gi(i[s]);if(l&&l[s])return gi(l[s])}else if(k(e))return xc(e)},T$=(e,t,r)=>{if(k(t))e.variants.inverse.value=xc(t);else if(t===!0){let{color:n,background:o}=r;e.variants.inverse={value:{color:o,background:n}}}},R$=(e,t,r,n)=>{let o=vc(r);n[`&:${t}`]=o,k(r)&&!r.value&&(r.value=o)},P$=(e,t)=>{let{state:r}=e;return r?(Object.keys(r).map(o=>{let s=r[o];return R$(e,o,s,t),e}),e):void 0},$$=(e,t,r,n)=>{let o=vc(r);n[`@media (prefers-color-scheme: ${t})`]=o,k(r)&&!r.value&&(r.value=o)},I$=(e,t)=>{let{media:r}=e;return r?(Object.keys(r).map(o=>{let s=r[o];return(o==="dark"||o==="light")&&$$(e,o,s,t),o==="inverse"&&T$(e,s,t),e}),e):void 0},F$=(e,t)=>{let r=R(),{helpers:n}=e;return n?(Object.keys(n).map(s=>{let i=n[s];return C(i)?n[s]=r.theme[i]:gi(n[s]),e}),e):void 0},_c=(e,t)=>{let r=R();if(r.useVariable)return wc(e,t);let{state:n,media:o,helpers:s}=e,i=xc(e,t),l=`--${r.varPrefix?r.varPrefix+"-":""}theme-${t}`;return P$(e,i),I$(e,i),F$(e,i),{var:l,value:i,state:n,media:o,helpers:s}};var Ag=(e,t,r)=>{let{cssVars:n}=r;r.cssMediaVars||(r.cssMediaVars={});let o=r.cssMediaVars,s=r.globalTheme!==void 0?r.globalTheme:"auto",i={},a=new Set;for(let c in e)if(e[c])for(let u of Object.keys(e[c]))a.add(u);let l=new Set;for(let c of a){let u=c.slice(0,1);if(!(u==="@"||u==="."||u===":")&&O$(c))for(let d in e){if(l.has(d))continue;let f=e[d]?.[c];if(f===void 0)continue;let p=me(f,`@${d}`);p!==void 0&&C(p)&&/^[a-z][a-zA-Z]+$/.test(p)&&!E$.has(p)&&l.add(d)}}for(let c of a){let u=c.slice(0,1),d=Object.values(e).some(f=>te(f?.[c]));if(u==="."&&d){let f=c.slice(1),p={};for(let h in e)te(e[h]?.[c])&&(p[h]=e[h][c]);i[c]=Ag(p,`${t}-${f}`,r)}else if(u===":"&&d){let f=c.replace(/^:+/,""),p={};for(let h in e)te(e[h]?.[c])&&(p[h]=e[h][c]);i[c]=Ag(p,`${t}-${f}`,r)}else if(u!=="@"&&u!=="."&&u!==":"){let p=`--${r.varPrefix?r.varPrefix+"-":""}theme-${t}-${c}`,h=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,g;for(let m in e){if(l.has(m))continue;let y=e[m]?.[c];if(y===void 0)continue;let b=me(y,`@${m}`);if(b===void 0)continue;(h&&m===h||!h&&(m==="light"||g===void 0))&&(g=b);let v=`[data-theme="${m}"]`;if(o[v]||(o[v]={}),o[v][p]=b,m==="dark"||m==="light"){let x=`@media (prefers-color-scheme: ${m})`;o[x]||(o[x]={}),o[x][p]=b}}g!==void 0&&(n[p]=g),i[c]=`var(${p})`,i[`.${c}`]={[c]:i[c]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},wc=(e,t,r,n)=>{let o=R(),{cssVars:s}=o,i={value:e},a=!r&&!n;if(te(e)){if(a&&o.useVariable){let l={};for(let c in e)c.startsWith("@")&&te(e[c])&&(l[c.slice(1)]=e[c]);if(Object.keys(l).length){let c=Ag(l,t,o);Object.assign(i,c)}}for(let l in e){let c=l.slice(0,1),u=e[l];if(c==="@"||c===":"||c==="."){let d=c==="@"&&l;i[l]=wc(u,t,l,n||d)}else if(!a){let d=me(u,n),f=[...new Set([n,r].filter(m=>m).map(m=>m.slice(1)))],p=f.length?"-"+f.join("-"):"",g=`--${o.varPrefix?o.varPrefix+"-":""}theme-${t}${p}-${l}`;o.useVariable?(o.useThemeSuffixedVars&&(s[g]=d),i[l]=`var(${g})`):i[l]=d,i[`.${l}`]={[l]:i[l]}}}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(C(e)&&xe(e)){let c=o.theme[e.slice(2)];return Tt(c,n)}return i},Eg=e=>{let t=R(),r={};for(let n in e){let o=n.slice(0,1);if(te(e[n])){if(o==="@")continue;o===":"?r[`&${n}`]=Eg(e[n]):o==="."&&(r[`&${n}`]=Eg(e[n]))}else r[n]=e[n]}return r},$w=(e,t)=>{let r=t.shift();return e[r]?$w(e[r],t):e},Pw=(e,t)=>I(t)?$w(e,t):C(t)&&e[t]?e[t]:e;var Tt=(e,t)=>{let r=R();if(C(e)&&xe(e)&&(e=Tt(e.slice(2))),!e||!C(e)){r.verbose&&console.warn(`${e} - Theme is not a string`);return}let[n,...o]=I(e)?e:e.split(" "),s=r.theme[n];return s&&o.length?s=Pw(s,o):s&&t&&(s=Pw(s,t)),Eg(s)};F();F();var Sc=(e,t)=>{let r=R(),n=`--font-${t}`;if(!e||I(e)&&!e[0])return;let o;if(e.isVariable){let s=Ot(e.url,r.files)||e.url;ui(s)?o=fi(s):o=dn(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap"})}else if(e[0])o=so(t,e,r.files);else{let s=Array.isArray(e.url)?e.url.map(i=>Ot(i,r.files)||i):Ot(e.url,r.files)||e.url;o=dn(t,s,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch})}return{var:n,value:e,fontFace:o}},kc=(e,t)=>{let r=R(),{fontFamily:n}=r;return oo(t||n,e)},mi=(e,t)=>{let r=R(),{fontFamily:n,fontFamilyTypes:o}=r,{value:s,type:i}=e;e.isDefault&&(n.default=t),k(s)&&(s=cn(s));let a=`--font-family-${t}`,l=`${s.join(", ")}, ${o[i]}`;return{var:a,value:l,arr:s,type:i}};F();var Og=e=>{let t=R(),{typography:r,media:n}=t;for(let o in e){let s=o.slice(0,1)==="@",i=e[o];if(!s)continue;let{mediaRegenerate:a}=e,l=o.slice(1),{type:c,base:u,ratio:d,range:f,subSequence:p,h1Matches:h,unit:g}=e;ye(i,{type:c,base:u,ratio:d,range:f,subSequence:p,h1Matches:h,unit:g});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),y=i.unit||g,b=!i.unit&&m.has(g)?"rem":y,v=n[l],x="@media "+(v==="print"?`${v}`:`screen and ${v}`);if(r.templates[x]={fontSize:i.base/r.browserDefault+b},!a){ye(i,{sequence:{},scales:{},vars:{}}),et(i),pn(e,o);continue}ye(i,{sequence:{},scales:{},templates:{},vars:{}}),et(i),pn(e,o)}},Tg=e=>{let t=R();if(e.h1Matches){let r=e.unit,n=mc(e),{templates:o}=e;for(let s in n){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:t.useVariable?`var(${n[s]?.variable})`:`${n[s]?.scaling}${r}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:e.lineHeight,letterSpacing:a?a.letterSpacing:e.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},Cc=()=>{let e=R(),{typography:t}=e;et(t),Tg(t),$r(t),Og(t)},Ac=e=>{let t=R(),{typography:r}=t;return lr(e,"fontSize",r)};F();F();var j$=e=>{let r=R().spacing||{},n=parseFloat(e.spacingRatio),o={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return et(o),o},D$=e=>{for(let t in e){let r=e[t];if(!(t.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:l,h1Matches:c,unit:u}=e;ye(r,{type:o,base:s,ratio:i,range:a,subSequence:l,h1Matches:c,unit:u,sequence:{},scales:{},templates:{},vars:{}}),et(r),pn(e,t)}},Ec=e=>{let t=e.toLowerCase(),r=t.includes("width")||t.includes("height"),n=t.includes("border")||t.includes("outline");return r&&!n},Oc=()=>{let e=R(),{spacing:t}=e;et(t),$r(t),D$(t)},L$=e=>{let t=R(),{spacing:r}=t;return!e||!e.sequence?r:Object.keys(e.sequence).length>0?e:et(e)},Re=(e,t="padding",r,n)=>{let o=L$(r);if(C(e)&&!n&&e.includes("(")){let i=Pr(e);n=i[0],e=i[1]}let s=n?[e]:cn(e);if(I(s)){if(s.length>1){let i="";t==="borderWidth"&&(t="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},l=(c,u)=>lr(s[u],t+c+i,o,n);return a[s.length].map((c,u)=>l(c,u))}return lr(e,t,o,n)}},Xt=(e,t,r,n)=>{let o=R(),{spacing:s}=o,i=r||e[t];if(!n&&C(i)&&i.includes("(")){let a=Pr(i);n=a[0],i=a[1]}if(e.spacingRatio){let a=j$(e);return Re(i,t,a,n)}return Re(i,t,s,n)},Tc=e=>{let t=r=>{let n=["+","-","*","/"].includes(r),o=Nn.some(i=>e.includes(i));return n||o?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return e.split(",").map(r=>r.trim()).map(t).join(",").split(" ").map(t).join(" ")};F();var yn=(e,t,r,n)=>{let o=R();if(I(e))return{"@light":yn(e[0],t,"light"),"@dark":yn(e[1],t,"dark")};if(k(e)){let a={};for(let l in e)a[l]=yn(e[l],t,l.startsWith("@")?l.slice(1):l);return a}C(e)&&!Kt.test(e)&&(e=un(e).map(a=>(a=a.trim(),a.split(/\s+/).map(l=>{if(l=l.trim(),!l)return"";if(l.startsWith("--"))return`var(${l})`;let c=me(l);if(sr(c))return c;if(/^\d/.test(l)||l==="0"||l.includes("px")||l.slice(-2)==="em"||l==="inset"||l==="none")return l;let u=Re(l,"shadow");return u&&u.shadow?u.shadow:l}).join(" "))).join(", "));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${t}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[i]=e),{var:i,value:e}},Rc=(e,t)=>{let r=R();if(t||(t=r.globalTheme),!C(e)){r.verbose&&console.warn(e,"- type for color is not valid");return}if(xe(e))return`var(${e})`;let[n]=I(e)?e:e.split(" "),s=r.shadow[n],i=k(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),e;if(t){if(s[t])return s[t].value;r.verbose&&console.warn(e," - does not have ",t)}if(i&&s.value)return s.value;if(i){let a={};for(let l in s){let c=r.media[l.slice(1)],u="@media "+(c==="print"?`${c}`:`screen and ${c}`);a[u]=s.value}return a}return r.verbose&&console.warn("Can't find color",e),e};F();var Pc=()=>{let e=R(),{timing:t}=e;et(t),$r(t)},Rt=e=>{let t=R(),{timing:r}=t;return r[e]||r[si(e)]||e},ht=(e,t="timing")=>{let r=R(),{timing:n}=r;return lr(e,t,n)};F();var $c=()=>{let e=R(),{document:t,fontFamily:r,theme:n,typography:o}=e;return ye(t,{theme:n.document,fontFamily:oo(r),fontSize:o.base,lineHeight:o.lineHeight})};F();var Pg={document:pe},yi=(e,t)=>{let r=R();if(!e){r.verbose&&console.warn("setSVG: val is not defined",t);return}return r.useSvgSprite?bc(t,e):e},Ic=(e,t=Pg)=>{let r=R(),n=Object.keys(e).length?{}:r.svg;for(let o in e)n[o]=e[o];Fw(n,t)},Fc=(e,t)=>{let r=R();return r.useIconSprite&&!r.semanticIcons?.[t]?yi(e,t):e},jc=(e,t=Pg)=>{let r=R(),n=Object.keys(e).length?{}:r.icons;for(let o in e)n[o]=e[o];Fw(n,t)},Rg=(e,t={isRoot:!0})=>{if(!e||!e.createElementNS)return;let r=e.createElementNS("http://www.w3.org/2000/svg","svg");return t.isRoot&&(r.setAttribute("aria-hidden","true"),r.setAttribute("width","0"),r.setAttribute("height","0"),r.setAttribute("style","position:absolute"),r.setAttribute("id","svgSprite")),r},M$=(e,t)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let n=`<svg xmlns="http://www.w3.org/2000/svg">${t}</svg>`,s=new r().parseFromString(n,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},Iw=(e,t,r)=>{for(;t.firstChild;){let n=t.firstChild;r.appendChild(e.importNode(n,!0)),n.remove()}},Fw=(e,t=Pg)=>{let r=R(),n=t.document||pe;if(!n||!n.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),hi(e);let o=n.querySelector("#svgSprite"),s=hi(e),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=M$(n,s);if(o)if(a)Iw(n,a,o);else if(n.body.insertAdjacentHTML)o.insertAdjacentHTML("beforeend",s);else{let l=Rg(n,{isRoot:!1});l.innerHTML=s,o.append(...l.children)}else if(a){let l=Rg(n);l&&l.nodeType&&(Iw(n,a,l),n.body.prepend(l))}else if(n.body.insertAdjacentHTML)n.body.insertAdjacentHTML("afterbegin",i);else{let l=Rg(n);l&&l.nodeType&&(l.innerHTML=s,n.body.prepend(l))}};F();var Dc=(e={})=>{let t=R(),{reset:r,typography:n,document:o}=t;if(r){if(r[":root"]){let l=r,c=n.templates;l.body={...t.useDocumentTheme?Tt("document"):{},...c.body},l.h1=c.h1,l.h2=c.h2,l.h3=c.h3,l.h4=c.h4,l.h5=c.h5,l.h6=c.h6}let{body:s,...i}=n.templates,a=t.useDocumentTheme?Tt("document"):{};if(r.html&&Ke(r.html,a),n.unit){let{media:l}=t;for(let c in n){if(c.charAt(0)!=="@")continue;let u=n[c];if(!u||u.unit===n.unit||!u.unit)continue;let d=u.unit,f=u.base||n.base,p=u.browserDefault||n.browserDefault,h=c.slice(1),g=l[h];if(!g)continue;let m="@media "+(g==="print"?g:"screen and "+g);r[m]||(r[m]={}),r[m].html||(r[m].html={}),r[m].html.fontSize=f/p+d}}return fe(ye(r,e),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",scrollBehavior:"smooth",...a,fontSize:n.unit?n.base/n.browserDefault+n.unit:n.browserDefault+"px",fontFamily:o.fontFamily,lineHeight:o.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:o.fontFamily,fontSize:n.base/n.browserDefault+t.unit.default,...i,...s},a:{color:"currentColor"},button:{color:"inherit",font:"inherit",background:"transparent",border:"none",cursor:"pointer",appearance:"none",WebkitAppearance:"none"},"input, select, textarea":{color:"inherit",font:"inherit"},fieldset:{border:0,padding:0,margin:0}})}};F();var N$=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),B$=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),z$=e=>N$.has(e),cr=e=>{let t=e+"";if(Kt.test(t))return t;let r=t.trim();return r==="none"||r==="0"||r==="initial"||r==="inherit"||r==="unset"?t:t.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(xe(o))return`var(${o})`;if(z$(o)||/^\d/.test(o)||o==="0")return o;let s=me(o);if(sr(s))return s;let i=Re(o,"border");return i&&i.border?i.border:o}).join(" ")},$g=e=>Kt.test(e)?e:e.split(/\s+/).map(t=>{if(t=t.trim(),!t)return"";if(xe(t))return`var(${t})`;if(/^\d/.test(t)||t.includes("px")||t==="0")return t;let r=me(t);return sr(r)?r:t}).join(" "),Ig=(e,t)=>Rc(e,t),Lc=(e,t)=>Kt.test(e)?e:un(e).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(xe(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=me(n);if(sr(o)){let i=De(n,t);return k(i)?Object.values(i).filter(a=>a.includes(": "+t))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=Re(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", "),Mc=(e,t)=>{let r=e.indexOf("(");if(r===-1)return e;let n=e.slice(0,r+1),o=e.slice(r+1,e.lastIndexOf(")")),s=")",a=un(o).map(l=>(l=l.trim(),l.split(/\s+/).map(u=>{if(!u||/^\d/.test(u)||u==="0"||B$.has(u)||u==="transparent"||Kt.test(u))return u;let d=me(u);return sr(d)?d:u}).join(" ")));return n+a.join(", ")+s},Fg=(e,t)=>{let r=R();return e.split(", ").map(n=>xe(n)?`var(${n})`:n.includes("url")?n:n.includes("gradient")?Mc(n,t):r.gradient[e]?{backgroundImage:De(e,t||r.globalTheme)}:n.includes("/")||n.startsWith("http")||n.includes(".")&&!Tr(n)?`url(${n})`:n).join(" ")},jg=e=>C(e)&&e.split(" ").map(t=>Re(t,"gap").gap).join(" "),jw=e=>{let t=e.split(" ");return t.length?t.map(r=>xe(r)?`var(${r})`:r.length<3||r.includes("ms")?ht(r).timing||r:Rt(r)?Rt(r):r).join(" "):e},Nc=(e,t,r)=>{if(C(e))return e.split(",").map(n=>ht(n).timing||n).join(",")},Dg=e=>{let t=e.split(",");if(t.length)return t.map(jw).join(",")};function _e(e,t,r={},n={}){let o=de.call(this,t||r[e]);if(o==null)return;let s;if(C(o)){if(o.includes("(")){let l=Pr(o);s=l[0],o=l[1]}let i=r.scaleBoxSize,a=Ec(e);!i&&a&&!n.ratio&&(o=Tc(o))}return n.ratio?Xt(r,e,o,s):Re(o,e,void 0,s)}var re=(e,t=null,r)=>_e(e,t,r,{ratio:!0}),Bc=(e,t,r)=>{if(C(e))return{borderRadius:e.split(" ").map((n,o)=>Xt(t,r,n)[r]).join(" ")}};F();var V$=(e,t)=>{let r=R(),{cssVars:n}=r,o=t.startsWith("--")?t:`--${t}`;return n[o]=e,e},tt=e=>e,Lg={color:gn,gradient:mn,font:Sc,fontFamily:mi,fontfamily:mi,theme:_c,icons:Fc,semanticIcons:tt,semanticicons:tt,svg:yi,svgData:tt,typography:tt,shadow:yn,spacing:tt,media:tt,grid:tt,class:tt,timing:tt,reset:tt,unit:tt,animation:tt,vars:V$,sizes:tt},Dw=(e,t,r)=>{let n=R(),o=cc(e),s=o.toLowerCase(),i=n[o]||n[s]||n[e],a=Lg[o]||Lg[s];if(a)try{let l=a(t,r);return i&&(i[r]=l),i}catch(l){n.verbose&&console.warn("Error setting",s,"value",t,r,l)}n.verbose&&console.warn("Can not find",s,"method in scratch")},Lw=(e,t)=>{let r=R(),n=e.toLowerCase();return Object.keys(t).sort((s,i)=>{let a=k(t[s])||I(t[s])?1:0,l=k(t[i])||I(t[i])?1:0;return a-l}).forEach(s=>{try{return Dw(n,t[s],s)}catch(i){r.verbose&&console.warn("Error setting",n,"value",t[s],s,i)}}),r[n]||r[e]},Mg=(e,t)=>{let r=t||R();r.globalTheme=e;let o=(r.document&&r.document.documentElement?r.document:null)||(typeof document<"u"?document:null),s=o&&o.defaultView||(typeof window<"u"?window:null);if(o){let a=r.themeRoot||o.documentElement;if(e&&e!=="auto")a.setAttribute("data-theme",e),e==="dark"||e==="light"?a.style.colorScheme=e:a.style.colorScheme="light dark";else if(s&&s.matchMedia){let c=d=>{a.setAttribute("data-theme",d.matches?"dark":"light")},u=s.matchMedia("(prefers-color-scheme: dark)");if(c(u),a.style.colorScheme="light dark",!r.__prefersListener){r.__prefersListener=c;try{u.addEventListener("change",c)}catch{u.addListener(c)}}}else a.setAttribute("data-theme","light"),a.style.colorScheme="light"}let i=r.varPrefix?`--${r.varPrefix}-theme-`:"--theme-";for(let a in r.cssVars)a.startsWith(i)&&delete r.cssVars[a];for(let a in r.cssMediaVars)delete r.cssMediaVars[a];if(o&&r.cssVars){let a=r.scopeSelector||":root",l=o.styleSheets;for(let c=0;c<l.length;c++)try{let u=l[c].cssRules;for(let d=0;d<u.length;d++)if(u[d].selectorText===a){for(let f in r.cssVars)u[d].style.setProperty(f,r.cssVars[f]);return r}}catch{}}return r},U$={},io=(e,t=U$)=>{let r=t.config||R(),{version:n,verbose:o,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:l,useIconSprite:c,globalTheme:u,themeRoot:d,useDocumentTheme:f,useDefaultConfig:p,semanticIcons:h,files:g,assets:m,...y}=e;t.newConfig&&(r=vg(t.newConfig)),g!==void 0&&(r.files=g),m!==void 0&&(r.assets=m),o!==void 0&&(r.verbose=o),s!==void 0&&(r.useVariable=s),i!==void 0&&(r.useReset=i),l!==void 0&&(r.useFontImport=l),a!==void 0&&(r.useSvgSprite=a),c!==void 0&&(r.useIconSprite=c),f!==void 0&&(r.useDocumentTheme=f),u!==void 0&&(r.globalTheme=u),d!==void 0&&(r.themeRoot=d),e.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=e.useThemeSuffixedVars),p!==void 0&&(r.useDefaultConfig=p),h!==void 0&&(r.semanticIcons=h),r.verbose&&console.log(r);let v=(r.document&&r.document.documentElement?r.document:null)||(typeof document<"u"?document:null),x=v&&v.defaultView||(typeof window<"u"?window:null),_=v&&(r.themeRoot||v.documentElement);if(_&&typeof _.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")_.setAttribute("data-theme",r.globalTheme),r.globalTheme==="dark"||r.globalTheme==="light"?_.style.colorScheme=r.globalTheme:_.style.colorScheme="light dark";else if(x&&x.matchMedia){let T=oe=>{_.setAttribute("data-theme",oe.matches?"dark":"light")},q=x.matchMedia("(prefers-color-scheme: dark)");if(T(q),_.style.colorScheme="light dark",!r.__prefersListener){r.__prefersListener=T;try{q.addEventListener("change",T)}catch{q.addListener(T)}}}else _.setAttribute("data-theme","light"),_.style.colorScheme="light";r.__svgCache||(r.__svgCache={});let S=Object.keys(y),E=new Set(S);if(S.forEach(w=>{let T=w.toLowerCase();T!==w&&E.has(T)&&fe(y[T],y[w])}),S.map(w=>{let T=w.toLowerCase();if(!(T!==w&&E.has(T)))return Lw(w,y[w])}),r.varPrefix&&(r.typography&&(r.typography.varPrefix=r.varPrefix),r.spacing&&(r.spacing.varPrefix=r.varPrefix),r.timing&&(r.timing.varPrefix=r.varPrefix)),y.typography)try{Cc()}catch(w){r.verbose&&console.warn("Error applying typography sequence",w)}if(y.spacing)try{Oc()}catch(w){r.verbose&&console.warn("Error applying spacing sequence",w)}if(y.timing)try{Pc()}catch(w){r.verbose&&console.warn("Error applying timing sequence",w)}$c();let $=Dc();return $&&(r.reset=$),r};var ao=new Map,W$=null,Bg=null,H$=null;function Vc(e){e.batchAtomicCss&&(Bg=e.batchAtomicCss),e.compoundCssClass&&(H$=e.compoundCssClass)}var q$=new Set;function zw(e){try{let t=R();t&&(t.document=e)}catch{}e&&q$.add(e)}function zg(){try{let e=R();if(e?.document)return e.document}catch{}return typeof document<"u"?document:null}var G$={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",width:"w",height:"h",minWidth:"mnw",minHeight:"mnh",maxWidth:"mxw",maxHeight:"mxh",top:"t",right:"r",bottom:"b",left:"l",flex:"fx",flexDirection:"fxd",flexWrap:"fxw",flexGrow:"fxg",flexShrink:"fxs",flexBasis:"fxb",justifyContent:"jc",alignItems:"ai",alignSelf:"as",alignContent:"ac",gap:"g",rowGap:"rg",columnGap:"cg",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",gridColumn:"gc",gridRow:"gr",overflow:"of",overflowX:"ofx",overflowY:"ofy",fontSize:"fs",fontWeight:"fw",fontFamily:"ff",fontStyle:"fst",lineHeight:"lh",letterSpacing:"ls",textAlign:"ta",textDecoration:"td",textTransform:"tt",color:"c",background:"bg",backgroundColor:"bgc",backgroundImage:"bgi",border:"bd",borderRadius:"br",borderColor:"bdc",borderWidth:"bdw",borderStyle:"bds",boxShadow:"bxsh",opacity:"op",zIndex:"z",cursor:"cur",transition:"tr",transform:"tf",animation:"an",visibility:"vis",whiteSpace:"ws",wordBreak:"wb",objectFit:"obj",pointerEvents:"pe",userSelect:"us",boxSizing:"bxz",outline:"ol",listStyle:"lis",textOverflow:"txo",verticalAlign:"va",float:"fl",clear:"cl",content:"cnt",backdropFilter:"bdf",filter:"flt",resize:"rsz",appearance:"apr",fill:"fil",stroke:"stk"};function bn(e){return e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function zc(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=t*16777619>>>0;return t.toString(36)}function K$(e){let t=String(e);return t.length<=20?t.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():zc(t)}function Mw(e,t,r){let n=(r?r+"":"")+e+":"+t,o=ao.get(n),s=o?null:bn(e);if(!o){let a=G$[e]||zc(e),l=K$(t);o=r?`_${r}_${a}-${l}`:`_${a}-${l}`,ao.set(n,o)}if(typeof t=="string"&&(t.indexOf("}")!==-1||t.indexOf("{")!==-1))return o;let i=`.${o}{${s||bn(e)}:${t}}`;return gt(i),o}var Nw=new WeakMap;function gt(e,t){let r=Vw(t);if(!r)return;let n=Nw.get(r);if(n||(n=new Set,Nw.set(r,n)),!n.has(e)){n.add(e);try{r.insertRule(e,r.cssRules.length)}catch{}}}var Bw=new WeakMap;function Vw(e){let t=e||zg();if(!t||!t.head)return null;let r=Bw.get(t);if(r&&r.ownerNode&&r.ownerNode.parentNode===t.head)return r;let n=t.head.querySelector("style[data-smbls]");n||(n=t.createElement("style"),n.setAttribute("data-smbls",""),t.head.appendChild(n));let o=n.sheet;return Bw.set(t,o),W$=o,o}var X$=8;function Ir(e,t,r){if(!e||typeof e!="object")return"";let n=null,o=0,s=[],i=[];for(let l in e){let c=e[l];c==null||c===!1||c===""||(typeof c=="object"?i.push([l,c]):Bg?(n||(n=[]),n.push(l,String(c)),o++):s.push(Mw(l,String(c),r)))}if(n&&o>=X$){let l=n.join("\0"),c=Bg(l),u=c.indexOf("\0"),d=c.substring(0,u),f=c.substring(u+1);if(f){let p=f.split(`
36
- `);for(let h=0;h<p.length;h++)p[h]&&gt(p[h])}s.push(d)}else if(n)for(let l=0;l<n.length;l+=2)s.push(Mw(n[l],n[l+1],r));let a=[];for(let l=0;l<i.length;l++)a.push(Y$(i[l][0],i[l][1],r));return s.concat(a).join(" ").trim()}var Ng=new Map;function Y$(e,t,r){let n=(r?r+"":"")+e+JSON.stringify(t),o=ao.get(n);if(o){let f=Ng.get(o);if(f)for(let p=0;p<f.length;p++)gt(f[p]);return o}o=r?`_${r}_c${zc(n)}`:`_c${zc(n)}`;let s="",i=[],a=f=>typeof f=="string"&&(f.indexOf("{")!==-1||f.indexOf("}")!==-1),l=(f,p)=>{let h="";for(let g in p){let m=p[g];if(m!=null)if(typeof m=="object")l([...f,g],m);else{if(a(m))continue;h+=`${bn(g)}:${m};`}}h&&(f.length===0?s+=h:i.push({chain:f,body:h}))};l([],t);let c=f=>{if(!f.length)return`.${o}`;let p=f[0].split(",").map(h=>h.trim()).map(h=>h.includes("&")?h.replace(/&/g,`.${o}`):h.startsWith(":")?`.${o}${h}`:`.${o} ${h}`);for(let h=1;h<f.length;h++){let g=f[h].split(",").map(y=>y.trim()),m=[];for(let y of p)for(let b of g)b.includes("&")?m.push(b.replace(/&/g,y)):b.startsWith(":")?m.push(y+b):m.push(y+" "+b);p=m}return p.join(", ")},u=[];if(e.startsWith("@media")||e.startsWith("@supports")){if(s){let f=`${e}{.${o}{${s}}}`;u.push(f),gt(f)}for(let f of i){let p=c(f.chain),h=`${e}{${p}{${f.body}}}`;u.push(h),gt(h)}return Ng.set(o,u),ao.set(n,o),o}let d=c([e]);if(s){let f=`${d}{${s}}`;u.push(f),gt(f)}for(let f of i){let h=`${c([e,...f.chain])}{${f.body}}`;u.push(h),gt(h)}return Ng.set(o,u),ao.set(n,o),o}function Ce(e){if(Vw(),typeof e=="string"){gt(e);return}let t=Object.keys(e),r=n=>{let o=n.match(/max-width:\s*(\d+)/);return o?parseInt(o[1]):0};t.sort((n,o)=>{let s=n.startsWith("@media"),i=o.startsWith("@media");return!s&&!i?0:s?i?r(o)-r(n):1:-1});for(let n of t){let o=e[n];if(n.startsWith("@media")||n.startsWith("@supports"))for(let s in o){let i=o[s];if(typeof i=="object"&&i!==null){let a="";for(let l in i){let c=l.startsWith("--")?l:bn(l);a+=`${c}:${i[l]};`}gt(`${n}{${s}{${a}}}`)}else{let a=s.startsWith("--")?s:bn(s);gt(`${n}{${a}:${i};}`)}}else{let s="",i=!1;for(let a in o){let l=o[a];if(typeof l=="object"&&l!==null)i=!0;else{let c=a.startsWith("--")?a:bn(a);s+=`${c}:${l};`}}if(s&&gt(`${n}{${s}}`),i){let a=[],l=[];for(let c in o)typeof o[c]=="object"&&o[c]!==null&&(c.startsWith("@media")||c.startsWith("@supports")?a.push(c):l.push(c));a.sort((c,u)=>{let d=f=>{let p=f.match(/max-width:\s*(\d+)/);return p?parseInt(p[1]):0};return d(u)-d(c)});for(let c of l)Ce({[`${n} ${c}`]:o[c]});for(let c of a)Ce({[c]:{[n]:o[c]}})}}}}function xi(e,t){let r="";for(let n in t){let o="";for(let s in t[n])o+=`${bn(s)}:${t[n][s]};`;r+=`${n}{${o}}`}return gt(`@keyframes ${e}{${r}}`),e}function Uw(){return ao.size}F();var Vg="http://www.w3.org/2000/svg",wi=new Set(["svg","path","circle","ellipse","line","polyline","polygon","rect","g","defs","use","symbol","clipPath","mask","pattern","image","text","tspan","textPath","marker","linearGradient","radialGradient","stop","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","animate","animateMotion","animateTransform","set","foreignObject","desc","title","metadata"]),Z$=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","string","fragment","shadow"]);function vi(e){return Z$.has(e)||wi.has(e)}function Si(e){return wi.has(e)}function xn(e){let{tag:t,key:r}=e;if(typeof t=="function"&&(t=t(e)),t===!0&&(t=r),typeof t=="string"&&vi(t))return t;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),vi(o)&&!n.has(o)?o:"div"}var Ww={};function _i(e,t){let r=t?.context?.document||globalThis.document;if(!r)return null;if(e==="string")return r.createTextNode(t?.text||"");if(e==="fragment")return r.createDocumentFragment();if(Si(e)){let n=t?.parent;if(e==="svg"||n?.node?.namespaceURI===Vg)return r.createElementNS(Vg,e);if(e!=="svg")return r.createElement("div")}return r.createElement(e)}function vn(e){let t=e.tag=xn(e),r=Si(t)&&(t==="svg"||e.parent?.node?.namespaceURI===Vg)?"svg:"+t:t,n=e?.context?.document||globalThis.document,o=Ww[r];if(o||(o=Ww[r]=_i(t,e)),!o)return null;let s=n&&o.ownerDocument!==n?_i(t,e):o.cloneNode(!0);return t==="string"&&(s.nodeValue=e.text||""),s}var Ze=new Set(["extends","children","content","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","__name","__ref","__hash","__text","parent","node"]),Ug={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},_n=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","error","beforeRemove","remove"]),Hw=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),ki=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","scroll","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var Wg=new WeakMap,J$={passive:!0},Q$={passive:!0,capture:!0},Hg=(e,t)=>Hw.has(e)?t?Q$:J$:t||!1;function Gw(e){let t=Wg.get(e);return t||(t={handlers:new Map,installed:new Set},Wg.set(e,t)),t}function eI(e,t){let r=Gw(t);if(r.installed.has(e))return;r.installed.add(e);let n=e==="focus"||e==="blur"||e==="focusin"||e==="focusout"||e==="mouseenter"||e==="mouseleave",o=e==="mouseenter"||e==="mouseleave";t.addEventListener(e,s=>{let i=s.target;for(;i&&i!==t;){let a=r.handlers.get(e);if(a){let l=a.get(i);if(l){if(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(l(s),s.cancelBubble)return}}i=i.parentNode}},Hg(e,n))}function Uc(e,t,r,n){n||(n=t.ownerDocument?.documentElement||t.getRootNode());let o=Gw(n);eI(e,n),o.handlers.has(e)||o.handlers.set(e,new WeakMap),o.handlers.get(e).set(t,r)}function Wc(e,t,r){r||(r=t.ownerDocument?.documentElement||t.getRootNode());let n=Wg.get(r);if(!n)return;let o=n.handlers.get(e);o&&o.delete(t)}function qw(e){return ki.has(e)&&!_n.has(e)}function Ci(e,t,r){let{node:n,context:o}=t;if(!n)return;let s=o?.designSystem,i=a=>{s&&ke(s);try{let l=r.call(t,a,t,t.state,o);if(l&&typeof l.then=="function"){l.catch(c=>{t.error=c,console.error("[DOMQL] Async event error:",c)}).finally(()=>{s&&ve()});return}}catch(l){if(t.error=l,console.error("[DOMQL] Event error:",l),o?.strictMode)throw l}s&&ve()};if(qw(e)){let a=o?.rootNode||n.ownerDocument?.documentElement;Uc(e,n,i,a)}else n.addEventListener(e,i,Hg(e,!1));t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{if(qw(e)){let a=o?.rootNode||n.ownerDocument?.documentElement;Wc(e,n,a)}else n.removeEventListener(e,i,Hg(e,!1))})}function Kw(e){let t=[];return e.extends&&(Array.isArray(e.extends)?t.push(...e.extends):t.push(e.extends)),e.extend&&(Array.isArray(e.extend)?t.push(...e.extend):t.push(e.extend)),t}function Ai(e,t,r){let n=Kw(t);if(!n.length)return;let o=(e.context||r?.context||{}).components||{};for(let s=0;s<n.length;s++){let i=Xw(n[s],o);i&&i!==t&&Yw(e,i,r,new Set([t]))}}function Xw(e,t){if(typeof e=="string"){if(e.includes(">")){let r=e.split(">").map(o=>o.trim()),n=t[r[0]]||t[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return t[e]||t[`smbls.${e}`]||null}return typeof e=="object"&&e!==null?e:null}function Yw(e,t,r,n=new Set){if(n.has(t))return;n.add(t);let o=Kw(t);if(o.length){let s=(e.context||r?.context||{}).components||{};for(let i=0;i<o.length;i++){let a=Xw(o[i],s);a&&Yw(e,a,r,n)}}for(let s in t){if(s==="extends"||s==="extend")continue;let i=t[s];e[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?e[s]={...i}:e[s]=i:typeof e[s]=="object"&&typeof i=="object"&&!Array.isArray(e[s])&&!Array.isArray(i)&&e[s]!==null&&i!==null?e[s]=Zw(e[s],i):e[s]=i}}function Zw(e,t){let r={...e};for(let n in t){let o=r[n],s=t[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Zw(o,s):r[n]=s}return r}Kn();function Ei(e={},t={}){let r=this,n=r.__ref;if(n){if((typeof e=="string"||typeof e=="number")&&(e={text:e}),!t.preventListeners&&typeof r.onBeforeUpdate=="function"&&r.onBeforeUpdate(r,r.state,r.context,t)===!1)return r;if(xr(()=>{if(e.state&&Se(r.state)&&r.state.update(e.state),e.text!==void 0&&(r.text=e.text,!n.__exec.text&&r.node&&(r.tag==="string"?r.node.nodeValue=e.text??"":r.node.textContent=e.text??"")),e.html!==void 0&&(r.html=e.html,!n.__exec.html&&r.node&&(r.node.innerHTML=e.html)),e.style&&r.node?.style){if(!n.__exec.style)for(let o in e.style){let s=e.style[o];if(s==null)continue;let i=o.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),a=String(s).replace(/\s*!important\s*$/,"");r.node.style.setProperty(i,a,"important")}r.style||(r.style={}),Object.assign(r.style,e.style)}if(e.attr&&r.node?.setAttribute){for(let o in e.attr){let s=e.attr[o];s==null||s===!1?r.node.removeAttribute(o):typeof s!="function"&&typeof s!="object"&&r.node.setAttribute(o,s===!0?"":s)}r.attr||(r.attr={}),Object.assign(r.attr,e.attr)}if(e.data&&r.node?.dataset){for(let o in e.data)r.node.dataset[o]=e.data[o];r.data||(r.data={}),Object.assign(r.data,e.data)}for(let o in e){if(Ze.has(o)||o==="state")continue;let s=e[o],i=r[o];if(i&&i.__ref&&typeof i.update=="function")i.update(s,t);else if(typeof s=="object"&&s!==null){let a=o.charCodeAt(0);a>=65&&a<=90&&Pt(s,r,o,t)}else o!=="text"&&o!=="html"&&o!=="style"&&o!=="attr"&&o!=="data"&&(r[o]=s)}}),r.node&&n.__conditionalRunners)for(let o of n.__conditionalRunners)o();return ft("update",r),!t.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,t),r}}function wn(e){if(!e)return;let t=e.__ref;if(t){try{typeof e.onBeforeRemove=="function"&&e.onBeforeRemove(e,e.state,e.context)}catch(r){console.error("[smbls] onBeforeRemove error:",r)}if(t.__effects){for(let r=0;r<t.__effects.length;r++)t.__effects[r].dispose();t.__effects.length=0}if(t.__eventCleanup){for(let r=0;r<t.__eventCleanup.length;r++)t.__eventCleanup[r]();t.__eventCleanup.length=0}if(t.__children){for(let r=0;r<t.__children.length;r++){let n=t.__children[r],o=e[n];o&&o.__ref&&wn(o)}t.__children.length=0}if(e.node?.parentNode&&e.node.remove(),e.state?.destroy&&e.state.__element===e&&e.state.destroy(),e.parent?.__ref?.__children){let r=e.parent.__ref.__children.indexOf(e.key);r!==-1&&e.parent.__ref.__children.splice(r,1),delete e.parent[e.key]}try{typeof e.onRemove=="function"&&e.onRemove(e)}catch(r){console.error("[smbls] onRemove error:",r)}e.node=null,e.parent=null,e.__ref=null}}function Oi(){wn(this)}F();F();var tI=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],rI=["none","forwards","backwards","both"],nI=["normal","reverse","alternate","alternate-reverse"],oI=["running","paused"],sI=e=>/^[\d.]+m?s$/.test(e),iI=0,qg=(e,t)=>{let{animation:r}=t.context&&t.context.designSystem||{};if(k(e)){let o=`smbls-anim-${iI++}`;return{animationName:xi(o,e)}}let n=r&&r[e];return k(n)?xi(e,n):e},aI=(e,t)=>{let{animation:r}=t.context&&t.context.designSystem||{},n=e.split(/\s+/),o=null,s=[],i=null,a=null,l=null,c=null,u=null;for(let d of n)r&&r[d]?o=d:sI(d)?s.push(d):tI.includes(d)||d.startsWith("cubic-bezier")||d.startsWith("steps(")?i=d:d==="infinite"||/^\d+$/.test(d)?a=d==="infinite"?d:Number(d):nI.includes(d)?l=d:rI.includes(d)?c=d:oI.includes(d)?u=d:o||(o=d);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:l,fillMode:c,playState:u}},Gg={animation:(e,t)=>{if(C(e)&&e.includes(" ")){let r=aI(e,t);return{animationName:qg(r.name||e,t),animationDuration:r.durations[0]||ht(t.animationDuration||"A").timing,animationDelay:r.durations[1]||ht(t.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||Rt(t.animationTimingFunction||"ease"),animationFillMode:r.fillMode||t.animationFillMode||"both",animationIterationCount:r.iterationCount!=null?r.iterationCount:t.animationIterationCount||1,animationPlayState:r.playState||t.animationPlayState,animationDirection:r.direction||t.animationDirection}}return{animationName:qg(e,t),animationDuration:ht(t.animationDuration||"A").timing,animationDelay:ht(t.animationDelay||"0s").timing,animationTimingFunction:Rt(t.animationTimingFunction||"ease"),animationFillMode:t.animationFillMode||"both",animationIterationCount:t.animationIterationCount||1,animationPlayState:t.animationPlayState,animationDirection:t.animationDirection}},animationName:(e,t)=>({animationName:qg(e,t)}),animationDuration:e=>({animationDuration:ht(e).timing}),animationDelay:e=>({animationDelay:ht(e).timing}),animationTimingFunction:e=>({animationTimingFunction:Rt(e)}),animationIterationCount:e=>({animationIterationCount:e}),animationFillMode:e=>({animationFillMode:e}),animationPlayState:e=>({animationPlayState:e}),animationDirection:e=>({animationDirection:e})};F();var Kg={show:e=>e?void 0:{display:"none !important"},hide:e=>e?{display:"none !important"}:void 0,height:(e,t)=>re("height",e,t),width:(e,t)=>re("width",e,t),boxSizing:e=>Ie(e)?{boxSizing:"border-box"}:{boxSizing:e},boxSize:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("height",t),..._e("width",r||t)}},inlineSize:(e,t)=>re("inlineSize",e,t),blockSize:(e,t)=>re("blockSize",e,t),minWidth:(e,t)=>re("minWidth",e,t),maxWidth:(e,t)=>re("maxWidth",e,t),widthRange:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("minWidth",t),..._e("maxWidth",r||t)}},minHeight:(e,t)=>re("minHeight",e,t),maxHeight:(e,t)=>re("maxHeight",e,t),heightRange:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("minHeight",t),..._e("maxHeight",r||t)}},size:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{...re("inlineSize",t),...re("blockSize",r||t)}},minBlockSize:(e,t)=>re("minBlockSize",e,t),minInlineSize:(e,t)=>re("minInlineSize",e,t),maxBlockSize:(e,t)=>re("maxBlockSize",e,t),maxInlineSize:(e,t)=>re("maxInlineSize",e,t),minSize:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("minInlineSize",t),..._e("minBlockSize",r||t)}},maxSize:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("maxInlineSize",t),..._e("maxBlockSize",r||t)}},borderWidth:(e,t)=>re("borderWidth",e,t),padding:(e,t)=>re("padding",e,t),scrollPadding:(e,t)=>re("scrollPadding",e,t),paddingInline:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("paddingInlineStart",t),..._e("paddingInlineEnd",r||t)}},paddingBlock:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("paddingBlockStart",t),..._e("paddingBlockEnd",r||t)}},paddingTop:(e,t)=>re("paddingBlockStart",e,t),paddingBottom:(e,t)=>re("paddingBlockEnd",e,t),paddingLeft:(e,t)=>re("paddingInlineStart",e,t),paddingRight:(e,t)=>re("paddingInlineEnd",e,t),paddingBlockStart:(e,t)=>re("paddingBlockStart",e,t),paddingBlockEnd:(e,t)=>re("paddingBlockEnd",e,t),paddingInlineStart:(e,t)=>re("paddingInlineStart",e,t),paddingInlineEnd:(e,t)=>re("paddingInlineEnd",e,t),margin:(e,t)=>re("margin",e,t),marginInline:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("marginInlineStart",t),..._e("marginInlineEnd",r||t)}},marginBlock:(e,t)=>{if(!C(t.marginBlock))return;let[r,n]=t.marginBlock.split(" ");return{..._e("marginBlockStart",r),..._e("marginBlockEnd",n||r)}},marginTop:(e,t)=>re("marginBlockStart",e,t),marginBottom:(e,t)=>re("marginBlockEnd",e,t),marginLeft:(e,t)=>re("marginInlineStart",e,t),marginRight:(e,t)=>re("marginInlineEnd",e,t),marginInlineStart:(e,t)=>re("marginInlineStart",e,t),marginInlineEnd:(e,t)=>re("marginInlineEnd",e,t),marginBlockStart:(e,t)=>re("marginBlockStart",e,t),marginBlockEnd:(e,t)=>re("marginBlockEnd",e,t),gap:e=>({gap:jg(e)}),columnGap:(e,t)=>Xt(t,"columnGap",e),rowGap:(e,t)=>Xt(t,"rowGap",e),flexWrap:e=>({display:"flex",flexWrap:e}),flexFlow:(e,t)=>{let r=t.reverse;if(!C(e))return;let[n,o]=(e||"row").split(" ");return(e.startsWith("x")||e==="row")&&(n="row"),(e.startsWith("y")||e==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{display:"flex",alignItems:t,justifyContent:r}},round:(e,t)=>Bc(e??t.borderRadius,t,"round"),borderRadius:(e,t)=>Bc(e??t.round,t,"borderRadius")};var Xg={fontSize:e=>Ac(e)||e,fontFamily:e=>({fontFamily:kc(e)||e}),fontWeight:e=>({fontWeight:e,fontVariationSettings:'"wght" '+e})};var Yg={overflow:e=>({overflow:e,scrollBehavior:"smooth"}),cursor:(e,t,r,n)=>{if(!e)return;let o=n.assets&&n.assets[e];if(o&&o.content)e=`url(${o.content.src})`;else{let s=n.files&&n.files[e];s&&s.content&&(e=`url(${s.content.src})`)}return{cursor:e}},opacity:e=>e!=null?{opacity:String(e)}:void 0,visibility:e=>e!=null?{visibility:e}:void 0,pointerEvents:e=>e!=null?{pointerEvents:e}:void 0};var Zg={inset:(e,t)=>{if(t.call("isNumber",e))return{inset:e};if(t.call("isString",e))return{inset:e.split(" ").map(r=>Re(r,"k").k).join(" ")}},left:e=>Re(e,"left"),top:e=>Re(e,"top"),right:e=>Re(e,"right"),bottom:e=>Re(e,"bottom"),verticalInset:e=>{if(typeof e!="string")return;let t=e.split(" ").map(r=>Re(r,"k").k);return{top:t[0],bottom:t[1]||t[0]}},horizontalInset:e=>{if(typeof e!="string")return;let t=e.split(" ").map(r=>Re(r,"k").k);return{left:t[0],right:t[1]||t[0]}}};F();var mt=({context:e,state:t})=>{let r=t?.root?.globalTheme||e.designSystem?.globalTheme;return r==="auto"?null:r},Jg={theme:(e,t)=>{if(e)return t.themeModifier?Tt(e,`@${t.themeModifier}`):Tt(e)},color:(e,t)=>{let r=mt(t);if(e)return{color:De(e,r)}},background:(e,t)=>{let r=mt(t);if(e)return C(e)&&e.includes("gradient")?{background:Mc(e,r)}:{background:De(e,r)}},backgroundColor:(e,t)=>{let r=mt(t);if(e)return{backgroundColor:De(e,r)}},backgroundImage:(e,t,r,n)=>{let o=mt(t);if(!e)return;let s=n.assets&&n.assets[e];if(s&&s.content)e=s.content.src;else{let i=n.files&&n.files[e];i&&i.content&&(e=i.content.src)}return{backgroundImage:Fg(e,o)}},textStroke:e=>({WebkitTextStroke:$g(e)}),outline:e=>({outline:cr(e)}),outlineOffset:(e,t)=>re("outlineOffset",e,t),border:e=>({border:cr(e)}),borderColor:(e,t)=>{let r=mt(t);if(e)return{borderColor:De(e,r)}},borderTopColor:(e,t)=>{let r=mt(t);if(e)return{borderTopColor:De(e,r)}},borderBottomColor:(e,t)=>{let r=mt(t);if(e)return{borderBottomColor:De(e,r)}},borderLeftColor:(e,t)=>{let r=mt(t);if(e)return{borderLeftColor:De(e,r)}},borderRightColor:(e,t)=>{let r=mt(t);if(e)return{borderRightColor:De(e,r)}},borderLeft:e=>({borderLeft:cr(e)}),borderTop:e=>({borderTop:cr(e)}),borderRight:e=>({borderRight:cr(e)}),borderBottom:e=>({borderBottom:cr(e)}),shadow:(e,t)=>{let r=mt(t);if(e)return{boxShadow:Ig(e,r)}},boxShadow:(e,t)=>{if(!C(e))return;let[r,n]=e.split("!importan"),o=mt(t),s=n?" !important":"";return{boxShadow:Lc(r.trim(),o)+s}},textShadow:(e,{context:t})=>({textShadow:Lc(e,t.designSystem.globalTheme)}),columnRule:e=>({columnRule:cr(e)})};var Ti={transition:e=>({transition:Dg(e)}),transitionDuration:e=>({transitionDuration:Nc(e)}),transitionDelay:e=>({transitionDelay:Nc(e)}),transitionTimingFunction:e=>({transitionTimingFunction:Rt(e)}),transitionProperty:e=>({transitionProperty:e,willChange:e})};F();var Qg={flow:(e,t)=>{let r=t.reverse;if(!C(e))return;let[n,o]=(e||"row").split(" ");return(e.startsWith("x")||e==="row")&&(n="row"),(e.startsWith("y")||e==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(e,t)=>({display:"flex",flexWrap:e}),align:(e,t)=>{let[r,n]=e.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var em={area:e=>({gridArea:e}),template:e=>({gridTemplate:e}),templateAreas:e=>({gridTemplateAreas:e}),column:e=>({gridColumn:e}),columns:e=>({gridTemplateColumns:e}),templateColumns:e=>({gridTemplateColumns:e}),autoColumns:e=>({gridAutoColumns:e}),columnStart:e=>({gridColumnStart:e}),row:e=>({gridRow:e}),rows:e=>({gridTemplateRows:e}),templateRows:e=>({gridTemplateRows:e}),autoRows:e=>({gridAutoRows:e}),rowStart:e=>({gridRowStart:e}),autoFlow:e=>({gridAutoFlow:e})};var Ae={...Gg,...Kg,...Xg,...Yg,...Zg,...Jg,...Ti,...Qg,...em};var Le=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);F();var lI=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,cI=(e,t,r)=>{let{context:n}=r;if(!n.designSystem?.media)return;let o=e.slice(1),s=n.designSystem.media[o],i=rt(t,r);if(!s)return{[e]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(lI),l=a?a[1]||a[2]:o,c={[`${s} &`]:i};if(l==="dark"||l==="light"){let u=n.designSystem?.scopeSelector||":root",d=u===":root"?":root:not([data-theme])":`${u}:not([data-theme])`;c[`@media (prefers-color-scheme: ${l})`]={[`${d} &`]:i}}return c},Jw=(e,t,r)=>({[e]:rt(t,r)}),Ri=(e,t,r)=>{let n=`&${e}`,o=rt(t,r);if(e.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=n.split(",").map(c=>c.trim()),l={};Object.keys(s).length&&(l[n]=s);for(let c in i){let u=a.map(d=>`${d} ${c}`).join(", ");l[u]=i[c]}return l}}return{[n]:o}},tm=(e,t)=>{let r=t.context?.cases?.[e];if(r!==void 0)return O(r)?r.call(t,t):!!r},uI=(e,t,r)=>{let n=e.slice(1),o=tm(n,r);if(o===void 0&&(o=!!r[n]),!!o)return rt(t,r)},fI=(e,t,r)=>({[e]:t}),dI=(e,t,r)=>{let n=e.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=tm(n,r);s!==void 0&&(o=s)}if(o)return rt(t,r)},pI=(e,t,r)=>{let n=e.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=tm(n,r);s!==void 0&&(o=s)}if(!o)return rt(t,r)},rm=(e,t)=>rt(e,t),nm={"@":cI,":":Ri,"[":Ri,"*":Ri,"+":Ri,"~":Ri,"&":Jw,">":Jw,$:uI,"-":fI,".":dI,"!":pI};var om=wr(),Qw=(e,t,r)=>{let n=t?.context?.designSystem;n&&ke(n);try{let o={},s={},i=(a,l)=>{if(r.unpack){o={...o,...l};return}o[a]=l};for(let a in e){let l=e[a];if(a==="class"&&t.call("isString",e.class)){let c=l.split(" ");if(c.length){let u=t.context.designSystem.class,d=c.reduce((f,p)=>ye(f,u[p]),{});o.designSystemClass=d}}else if(a==="true"){let c=de(l,t);ye(o,rm(c,t))}else if(t.classlist[a]){let c=t.classlist[a],u=O(c)?c(t,t.state,t.context):c;u&&i(a,u),!om&&k(o[a])&&(o[a].label=a)}else if(Ae[a]){let c=de(l,t);I(c)&&(c=c.reduce((d,f)=>ye(d,f),{}));let u=Ae[a](c,t,t.state,t.context);I(u)&&(u=u.reduce((d,f)=>ye(d,f),{})),u&&i(a,u),!om&&k(o[a])&&(o[a].label=a)}else if(Le.has(a)){let c=de(l,t);typeof c=="string"&&c.charCodeAt(0)===45&&c.charCodeAt(1)===45&&(c=`var(${c})`),i(a,{[a]:c}),!om&&k(o[a])&&(o[a].label=a)}else s[a]=l}return[o,s]}finally{n&&ve()}},eS=(e,t)=>{let r={};for(let n in e){let o=nm[n.slice(0,1)];if(o){let s=o(n,e[n],t);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?Ke(r[i],s[i]):r[i]=s[i])}}return r},rt=(e,t,r={unpack:!0})=>{let[n,o]=Qw(e,t,r),s=eS(o,t),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return ps(n,s);n._selectors=s}return n},hI=(e,t)=>{let r={};if(e.class)for(let n in e.class)r[n]=e.class[n](t);return r};F();var tS=e=>{if(k(e))return rt(e,e)},gI=(e,t)=>{let r=tS(e);return typeof t=="function"?t(r):Ir(r)};F();function oS(e,t,r){let n=e?.context?.analyze;if(!n||!n.emit||t==="warn"&&!n.shouldCapture("warnings")||t==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:t==="error"?"error":"warning",level:t,hook:t==="error"?"el.error":"el.warn",element:{key:e.key!=null?String(e.key):null,name:e.__name||null,tag:e.tag||null},message:o||null,args:r})}function mI(...e){return oS(this,"warn",e),Zs.apply(this,e)}function yI(...e){return oS(this,"error",e),ln.apply(this,e)}var rS={update:Ei,remove:Oi,getDB:ti,getQuery:ri,getRootData:Ks,getChildren:Us,getPath:Ws,nextElement:Js,previousElement:Qs,verbose:Qn,warn:mI,error:yI,variables:ei,spotByPath:Vs,set(e,t){if(this.removeContent(),e!=null){let r=this.context?.__create;r&&r(e,this,"content",t)}this.__ref&&(this.__ref.contentManaged=!0)},reset(e){let t=this.context?.__create;if(!t)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),t(o,r,n,e)},lookup(e){let t=this.parent;for(;t;){if(typeof e=="function"){if(e(t))return t}else if(typeof e=="string"){if(t.key===e)return t;if(t[e]&&t[e].__ref)return t[e]}t=t.parent}return null},lookdown(e){let t=this.__ref;if(!t?.__children)return null;for(let r of t.__children){let n=this[r];if(!n)continue;if(typeof e=="function"){if(e(n))return n}else if(typeof e=="string"&&n.key===e)return n;let o=n.lookdown?.(e);if(o)return o}return null},lookdownAll(e,t=[]){let r=this.__ref;if(!r?.__children)return t;for(let n of r.__children){let o=this[n];o&&(typeof e=="function"?e(o)&&t.push(o):typeof e=="string"&&o.key===e&&t.push(o),o.lookdownAll?.(e,t))}return t},getRef(){return this.__ref},getRoot:Gs,getRootState:qs,getRootContext:Xs,getContext:Ys,parse(e){let t={},r=e?new Set(e):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){t[o]=n[o];continue}typeof this[o]!="function"&&(t[o]=this[o])}return t},parseDeep(e){let t=this.parse(e),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(t[n]=this[n].parseDeep(e));return t},keys(){return Object.keys(this)},log(...e){if(e.length){let t={};for(let r of e)t[r]=this[r];console.log(t)}else console.log(this)},setProps(e,t){return this.update(e,t)},setNodeStyles(e){if(this.node?.style)for(let t in e){let r=e[t];if(r==null)continue;let n=t.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(e,...t){let r=this.context,n=r?.methods?.[e]||r?.functions?.[e]||r?.utils?.[e]||this[e];if(typeof n=="function")return n.call(this,...t)},removeContent(){let e=this.__ref;if(!e?.__children)return;let t=this.content;if(t?.remove){t.remove(),delete this.content;let r=e.__children.indexOf("content");r!==-1&&e.__children.splice(r,1)}t?.node?.parentNode&&t.node.parentNode.removeChild(t.node)}},nS=new WeakMap;function bI(e){if(!e)return rS;let t=nS.get(e);if(t)return t;t=Object.create(rS);let r=e.methods;if(r)for(let n in r)t[n]=r[n];return nS.set(e,t),t}function Pi(e){let t=bI(e.context);Object.setPrototypeOf(e,t)}F();Kn();var xI=(e,t,r)=>{Object.defineProperty(e,t,{value:r,enumerable:!1,configurable:!0,writable:!0})},yt=(e,t)=>{if(Se(t)){let o=t.__raw||t;t.toggle||Object.defineProperty(o,"toggle",{value:function(s,i={}){t[s]=!t[s]},enumerable:!1,configurable:!0}),t.set||Object.defineProperty(o,"set",{value:function(s,i={}){return t.clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&t.update(s,i),t},enumerable:!1,configurable:!0}),Object.defineProperty(o,"setByPath",{value:function(s,i,a={}){let l=s.split("."),c=t;for(let u=0;u<l.length-1;u++)c[l[u]]===void 0&&(c[l[u]]={}),c=c[l[u]];return c[l[l.length-1]]=i,t},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"getByPath",{value:function(s){let i=s.split("."),a=t;for(let l=0;l<i.length;l++){if(a==null)return;a=a[i[l]]}return a},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"removeByPath",{value:function(s,i={}){let a=s.split("."),l=t;for(let c=0;c<a.length-1;c++){if(l==null)return t;l=l[a[c]]}return l&&delete l[a[a.length-1]],t},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"reset",{value:function(s={}){let i=t.parse();return t.set(i,s)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"apply",{value:function(s,i={}){if(typeof s=="function"){let a=s(t);return t.update(a,i)}},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"applyFunction",{value:function(s,i={}){if(typeof s=="function")return s(t),t.update(t.parse(),i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"rootUpdate",{value:function(s,i={}){let a=t;for(;a?.parent&&Se(a.parent);)a=a.parent;return a.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"parentUpdate",{value:function(s,i={}){if(t.parent)return t.parent.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"quietReplace",{value:function(s,i={}){return t.replace(s,{quiet:!0,...i})},enumerable:!1,configurable:!0,writable:!0}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=t,i=Se(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,Se(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!t||typeof t!="object")return;let r=()=>{for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&delete t[o]},n={update(o){if(!o||typeof o!="object")return t;for(let s in o)t[s]=o[s];return t},apply(o){if(typeof o!="function")return t;let s=o(t);return s?t.update(s):t},parse(){return{...t}},toggle(o){return t[o]=!t[o],t},set(o){if(!o||typeof o!="object")return t;r();for(let s in o)t[s]=o[s];return t},replace(o){return t.set(o)},clean(){return r(),t}};for(let o in n)typeof t[o]!="function"&&xI(t,o,n[o])};var sS=function(e,t,r){return e.state=im(e,t,r),e.state},im=function(e,t,r){let{__ref:n}=e,o=e.state;if(o==null||o===!1){let s=t?.state||{};return yt(e,s),s}if(typeof o=="string")return n&&(n.__state=o),n.__stateType="string",vI(o,e,t);if(typeof o=="number"||typeof o=="boolean"){n&&(n.__state=o,n.__stateType=typeof o,n.__hasRootState=!0);let s=ut({value:o});return s.__element=e,t?.state&&(s.parent=t.state),yt(e,s),s}if(typeof o=="function"&&(o=o(e,t?.state)||{}),typeof o=="object"&&!Se(o)){n&&(n.__hasRootState=!0),o.isRootState&&n&&(n.__hasRootState=!0);let s=ut({...o});if(s.__element=e,!Object.getOwnPropertyDescriptor(s,"root")){let i=t?.state?.root||t?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return t?.state&&(s.parent=t.state,t.state.__children&&(t.state.__children[e.key]=s)),yt(e,s),typeof e.onStateCreated=="function"&&e.onStateCreated(e,s,e.context,r),s}return Se(o)?(o.__element=e,o):t?.state||{}};function sm(e,t){if(!t)return e;let r=t.split("/"),n=e;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function vI(e,t,r){if(!r?.state)return{};if(e===".")return r.state;if(e.startsWith("../")){let o=e.slice(3),s=r.state?.parent;return o&&s?sm(s,o):s??r.state??{}}if(e.startsWith("~/")){let o=r.state;for(;o?.parent;)o=o.parent;let s=e.slice(2);return s?sm(o,s):o??{}}let n=sm(r.state,e);if(n&&typeof n=="object"&&!Se(n)&&!Object.getOwnPropertyDescriptor(n,"root")){let o=r.state?.root||r.state;Object.defineProperty(n,"root",{get:()=>o,enumerable:!1,configurable:!0})}return n}var lS=(e,t)=>{if(!e)return aS;let r=wI(e,t);return!r||!r.state?aS:kI(r.state)},cS=()=>Ln()!=null,_I=128;function wI(e,t){let r=typeof t=="function"?t:typeof t=="string"?s=>!!s?.[t]:s=>!!s?.state,n=e,o=null;for(let s=0;s<_I&&n;s++){if(r(n)&&n.state)return n;if(n.state&&!o&&(o=n),!n.parent||n.parent===n)break;n=n.parent}return o}var SI={get(e,t){return e[t]}},iS=new WeakMap,kI=e=>{let t=iS.get(e);return t||(t=new Proxy(e,SI),iS.set(e,t)),t},aS=new Proxy(Object.create(null),{get(){},has(){return!1}});F();var CI=["alert","alertdialog","application","article","banner","button","cell","checkbox","columnheader","combobox","complementary","contentinfo","definition","dialog","directory","document","feed","figure","form","grid","gridcell","group","heading","img","link","list","listbox","listitem","log","main","marquee","math","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","switch","tab","table","tablist","tabpanel","term","textbox","timer","toolbar","tooltip","tree","treegrid","treeitem"],Hc={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],slot:["name"],script:["async","charset","crossorigin","defer","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"]},fS=["oncopy","oncut","onpaste","oncompositionend","oncompositionstart","oncompositionupdate","onfocus","onfocusin","onfocusout","onblur","onchange","onbeforeinput","oninput","onreset","onsubmit","oninvalid","onformdata","onload","onerror","ontoggle","onkeydown","onkeypress","onkeyup","onabort","oncanplay","oncanplaythrough","oncuechange","ondurationchange","onemptied","onencrypted","onended","onloadeddata","onloadedmetadata","onloadstart","onpause","onplay","onplaying","onprogress","onratechange","onseeked","onseeking","onstalled","onsuspend","ontimeupdate","onvolumechange","onwaiting","onauxclick","onclick","oncontextmenu","ondblclick","ondrag","ondragend","ondragenter","ondragexit","ondragleave","ondragover","ondragstart","ondrop","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onselect","onselectionchange","onselectstart","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ongotpointercapture","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onlostpointercapture","onscroll","onresize","onwheel","onanimationstart","onanimationend","onanimationiteration","ontransitionstart","ontransitionrun","ontransitionend","ontransitioncancel","onoutrostart","onoutroend","onintrostart","onintroend","onmessage","onmessageerror","onvisibilitychange","oncancel","onclose","onfullscreenchange","onfullscreenerror"],cm=e=>e.startsWith("aria")&&e.length>4&&e.charCodeAt(4)>=65&&e.charCodeAt(4)<=90?"aria-"+e.charAt(4).toLowerCase()+e.slice(5).replace(/([A-Z])/g,t=>"-"+t.toLowerCase()):e.startsWith("data")&&e.length>4&&e.charCodeAt(4)>=65&&e.charCodeAt(4)<=90?"data-"+e.charAt(4).toLowerCase()+e.slice(5).replace(/([A-Z])/g,t=>"-"+t.toLowerCase()):null,jr=(e,t)=>t.startsWith("aria-")||t.startsWith("data-")||cm(t)||Hc.default.includes(t)?!0:Object.prototype.hasOwnProperty.call(Hc,e)?Hc[e].includes(t):!1,um=e=>{if(!C(e))return!1;let t=e.toLowerCase();return fS.includes(t)},AI=(e,t,r)=>{let n={};for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){if(r&&o in r)continue;if(o==="aria"&&t[o]&&typeof t[o]=="object"){for(let a in t[o])qe(t[o][a])&&(n["aria-"+a]=t[o][a]);continue}if(o==="data"&&t[o]&&typeof t[o]=="object"){for(let a in t[o])if(qe(t[o][a])){let l=a.replace(/([A-Z])/g,c=>"-"+c.toLowerCase());n["data-"+l]=t[o][a]}continue}let s=jr(e,o),i=um(o);if(qe(t[o])&&(s||i)){let a=cm(o)||o;n[a]=t[o]}}return n},EI=(e,t)=>{let r={};if(e.attr)for(let n in e.attr)r[n]=e.attr[n](t,t.state,t.context);if(e.aria&&typeof e.aria=="object")for(let n in e.aria){let o=e.aria[n];typeof o=="function"&&(r["aria-"+n]=o(t,t.state,t.context))}if(e.data&&typeof e.data=="object")for(let n in e.data){let o=e.data[n];if(typeof o=="function"){let s=n.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=o(t,t.state,t.context)}}return r},Fr=(e,t)=>{let r=e.call("exec",t,e);if(r)return C(r)&&r.includes("{{")&&(r=e.call("replaceLiteralsWithObjectFields",r)),r},am=(e,t)=>{let r=(e.preSrc||"")+(Fr(e,t)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=e;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},lm={src:e=>am(e,e.src),href:e=>Fr(e,e.href),action:e=>Fr(e,e.action),poster:e=>am(e,e.poster),data:e=>Fr(e,e.data)},fm=e=>{let t=e.tag||"div",r={};for(let n in lm)if(e[n]!==void 0&&jr(t,n)){let o=lm[n](e);o!==void 0&&(r[n]=o)}return r},uS=(e,t)=>{let r=t.context?.cases?.[e];if(r!==void 0)return O(r)?r.call(t,t):!!r},OI=(e,t,r)=>{if(e==="$"){let o=uS(t,r);return o===void 0&&(o=!!r[t]),o}let n=r[t]===!0||r.state[t];if(!n){let o=uS(t,r);o!==void 0&&(n=o)}return e==="."?!!n:!n},TI=new Set(["$",".","!"]),RI=(e,t,r)=>{let n={},o=(s,i,a,l)=>{let c=i;n[s]=u=>{if(OI(a,l,u))return O(c)?c(u):c}};for(let s in e){let i=s.charAt(0);if(!TI.has(i))continue;let a=e[s];if(!a||typeof a!="object")continue;let l=s.slice(1);for(let c in a){if(r&&c in r)continue;if(c==="aria"&&a[c]&&typeof a[c]=="object"){for(let p in a[c])o("aria-"+p,a[c][p],i,l);continue}if(c==="data"&&a[c]&&typeof a[c]=="object"){for(let p in a[c]){let h=p.replace(/([A-Z])/g,g=>"-"+g.toLowerCase());o("data-"+h,a[c][p],i,l)}continue}let u=jr(t,c),d=um(c);if(!u&&!d)continue;let f=cm(c)||c;o(f,a[c],i,l)}}return n};var PI=1;function co(e){return e.length>2&&e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90}function $I(e){return e.charAt(2).toLowerCase()+e.slice(3)}function II(e){return e.toLowerCase()}function hm(e,t){let r={...e};for(let n in t){let o=r[n],s=t[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=hm(o,s):r[n]=s}return r}function Pt(e,t,r,n={},o){if(e==null||e===!1)return null;(typeof e=="string"||typeof e=="number")&&(e={text:e});let s=Object.create(null);s.key=r||e.key||`_${PI++}`,s.parent=t||null,s.context=e.context||t?.context||n.context||{},s.context.__create||(s.context.__create=Pt);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:t?.__ref?.root||s,path:t?.__ref?.path?[...t.__ref.path,s.key]:[s.key]};if(r&&!e.extends&&!e.extend){let g=r.indexOf("_");if(g>0){let m=r.substring(0,g),y=s.context?.components;y&&(y[m]||y["smbls."+m])&&(e={extends:m,...e})}}Ai(s,e,n);let a=new Set(["childProps","attr","style","scope","data"]),l=s.props&&typeof s.props=="object"?s.props:null;for(let g in e){if(g==="parent"||g==="node"||g==="__ref"||g==="extends"||g==="context"||g==="props")continue;let m=e[g],y=s[g],b=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";b&&g.charCodeAt(0)>=65&&g.charCodeAt(0)<=90?s[g]=hm(y,m):b&&a.has(g)?s[g]={...y,...m}:s[g]=m}function c(g){for(let m in g){let y=g[m],b=s[m],v=b&&y&&typeof b=="object"&&typeof y=="object"&&!Array.isArray(b)&&!Array.isArray(y)&&typeof b!="function"&&typeof y!="function";v&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=hm(b,y):v&&a.has(m)?s[m]={...b,...y}:s[m]=y}}l&&c(l),e.props&&typeof e.props=="object"&&c(e.props),e.data!==void 0&&(s.data=e.data),e.classlist!==void 0&&(s.classlist=e.classlist),e.text!==void 0&&(s.text=e.text),e.html!==void 0&&(s.html=e.html);let u=s.scope&&typeof s.scope=="object"?s.scope:null,d=t?.scope,f=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,p=d||f||null;if(e.scope!==void 0||u){let g={};u&&Object.assign(g,u),e.scope!==void 0&&Object.assign(g,e.scope),s.scope=ll(g,p)}else p&&(s.scope=p);if(e.if!==void 0&&(s.if=e.if),Pi(s),FI(s,t,e),s.if!=null){let g;if(typeof s.if=="function")try{g=s.if(s,s.state,s.context)}catch(m){if(g=!1,i.__ifError=m,typeof console<"u"&&console.warn){let y=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${y} \u2014 treating as false:`,m?.message||m)}}else g=s.if;i.__if=!!g}if(i.__if)typeof e.if=="function"&&(i.__ifInitialized=!0);else return t&&(t[s.key]=s),typeof e.if=="function"&&gm(s,{if:e.if}),s;s.tag||(s.tag=xn(s)),Dr("Init",s,n);let h=s.node=vn(s);if(!h)return s;Dr("AttachNode",s,n),h.setAttribute&&s.key&&h.setAttribute("data-key",s.key),h.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&h.setAttribute("data-smbls-app",s.context.key),s.id&&h.setAttribute&&(h.id=s.id),gm(s,e),mm(s),pS(s),gS(s,n);try{mS(s,n)}catch(g){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,g?.message||g,g?.stack?`
36
+ `);for(let h=0;h<p.length;h++)p[h]&&gt(p[h])}s.push(d)}else if(n)for(let l=0;l<n.length;l+=2)s.push(Mw(n[l],n[l+1],r));let a=[];for(let l=0;l<i.length;l++)a.push(Y$(i[l][0],i[l][1],r));return s.concat(a).join(" ").trim()}var Ng=new Map;function Y$(e,t,r){let n=(r?r+"":"")+e+JSON.stringify(t),o=ao.get(n);if(o){let f=Ng.get(o);if(f)for(let p=0;p<f.length;p++)gt(f[p]);return o}o=r?`_${r}_c${zc(n)}`:`_c${zc(n)}`;let s="",i=[],a=f=>typeof f=="string"&&(f.indexOf("{")!==-1||f.indexOf("}")!==-1),l=(f,p)=>{let h="";for(let g in p){let m=p[g];if(m!=null)if(typeof m=="object")l([...f,g],m);else{if(a(m))continue;h+=`${bn(g)}:${m};`}}h&&(f.length===0?s+=h:i.push({chain:f,body:h}))};l([],t);let c=f=>{if(!f.length)return`.${o}`;let p=f[0].split(",").map(h=>h.trim()).map(h=>h.includes("&")?h.replace(/&/g,`.${o}`):h.startsWith(":")?`.${o}${h}`:`.${o} ${h}`);for(let h=1;h<f.length;h++){let g=f[h].split(",").map(y=>y.trim()),m=[];for(let y of p)for(let b of g)b.includes("&")?m.push(b.replace(/&/g,y)):b.startsWith(":")?m.push(y+b):m.push(y+" "+b);p=m}return p.join(", ")},u=[];if(e.startsWith("@media")||e.startsWith("@supports")){if(s){let f=`${e}{.${o}{${s}}}`;u.push(f),gt(f)}for(let f of i){let p=c(f.chain),h=`${e}{${p}{${f.body}}}`;u.push(h),gt(h)}return Ng.set(o,u),ao.set(n,o),o}let d=c([e]);if(s){let f=`${d}{${s}}`;u.push(f),gt(f)}for(let f of i){let h=`${c([e,...f.chain])}{${f.body}}`;u.push(h),gt(h)}return Ng.set(o,u),ao.set(n,o),o}function Ce(e){if(Vw(),typeof e=="string"){gt(e);return}let t=Object.keys(e),r=n=>{let o=n.match(/max-width:\s*(\d+)/);return o?parseInt(o[1]):0};t.sort((n,o)=>{let s=n.startsWith("@media"),i=o.startsWith("@media");return!s&&!i?0:s?i?r(o)-r(n):1:-1});for(let n of t){let o=e[n];if(n.startsWith("@media")||n.startsWith("@supports"))for(let s in o){let i=o[s];if(typeof i=="object"&&i!==null){let a="";for(let l in i){let c=l.startsWith("--")?l:bn(l);a+=`${c}:${i[l]};`}gt(`${n}{${s}{${a}}}`)}else{let a=s.startsWith("--")?s:bn(s);gt(`${n}{${a}:${i};}`)}}else{let s="",i=!1;for(let a in o){let l=o[a];if(typeof l=="object"&&l!==null)i=!0;else{let c=a.startsWith("--")?a:bn(a);s+=`${c}:${l};`}}if(s&&gt(`${n}{${s}}`),i){let a=[],l=[];for(let c in o)typeof o[c]=="object"&&o[c]!==null&&(c.startsWith("@media")||c.startsWith("@supports")?a.push(c):l.push(c));a.sort((c,u)=>{let d=f=>{let p=f.match(/max-width:\s*(\d+)/);return p?parseInt(p[1]):0};return d(u)-d(c)});for(let c of l)Ce({[`${n} ${c}`]:o[c]});for(let c of a)Ce({[c]:{[n]:o[c]}})}}}}function xi(e,t){let r="";for(let n in t){let o="";for(let s in t[n])o+=`${bn(s)}:${t[n][s]};`;r+=`${n}{${o}}`}return gt(`@keyframes ${e}{${r}}`),e}function Uw(){return ao.size}F();var Vg="http://www.w3.org/2000/svg",wi=new Set(["svg","path","circle","ellipse","line","polyline","polygon","rect","g","defs","use","symbol","clipPath","mask","pattern","image","text","tspan","textPath","marker","linearGradient","radialGradient","stop","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","animate","animateMotion","animateTransform","set","foreignObject","desc","title","metadata"]),Z$=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","string","fragment","shadow"]);function vi(e){return Z$.has(e)||wi.has(e)}function Si(e){return wi.has(e)}function xn(e){let{tag:t,key:r}=e;if(typeof t=="function"&&(t=t(e)),t===!0&&(t=r),typeof t=="string"&&vi(t))return t;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),vi(o)&&!n.has(o)?o:"div"}var Ww={};function _i(e,t){let r=t?.context?.document||globalThis.document;if(!r)return null;if(e==="string")return r.createTextNode(t?.text||"");if(e==="fragment")return r.createDocumentFragment();if(Si(e)){let n=t?.parent;if(e==="svg"||n?.node?.namespaceURI===Vg)return r.createElementNS(Vg,e);if(e!=="svg")return r.createElement("div")}return r.createElement(e)}function vn(e){let t=e.tag=xn(e),r=Si(t)&&(t==="svg"||e.parent?.node?.namespaceURI===Vg)?"svg:"+t:t,n=e?.context?.document||globalThis.document,o=Ww[r];if(o||(o=Ww[r]=_i(t,e)),!o)return null;let s=n&&o.ownerDocument!==n?_i(t,e):o.cloneNode(!0);return t==="string"&&(s.nodeValue=e.text||""),s}var Ze=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","__name","__ref","__hash","__text","parent","node"]),Ug={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},_n=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","error","beforeRemove","remove"]),Hw=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),ki=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","scroll","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var Wg=new WeakMap,J$={passive:!0},Q$={passive:!0,capture:!0},Hg=(e,t)=>Hw.has(e)?t?Q$:J$:t||!1;function Gw(e){let t=Wg.get(e);return t||(t={handlers:new Map,installed:new Set},Wg.set(e,t)),t}function eI(e,t){let r=Gw(t);if(r.installed.has(e))return;r.installed.add(e);let n=e==="focus"||e==="blur"||e==="focusin"||e==="focusout"||e==="mouseenter"||e==="mouseleave",o=e==="mouseenter"||e==="mouseleave";t.addEventListener(e,s=>{let i=s.target;for(;i&&i!==t;){let a=r.handlers.get(e);if(a){let l=a.get(i);if(l){if(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(l(s),s.cancelBubble)return}}i=i.parentNode}},Hg(e,n))}function Uc(e,t,r,n){n||(n=t.ownerDocument?.documentElement||t.getRootNode());let o=Gw(n);eI(e,n),o.handlers.has(e)||o.handlers.set(e,new WeakMap),o.handlers.get(e).set(t,r)}function Wc(e,t,r){r||(r=t.ownerDocument?.documentElement||t.getRootNode());let n=Wg.get(r);if(!n)return;let o=n.handlers.get(e);o&&o.delete(t)}function qw(e){return ki.has(e)&&!_n.has(e)}function Ci(e,t,r){let{node:n,context:o}=t;if(!n)return;let s=o?.designSystem,i=a=>{s&&ke(s);try{let l=r.call(t,a,t,t.state,o);if(l&&typeof l.then=="function"){l.catch(c=>{t.error=c,console.error("[DOMQL] Async event error:",c)}).finally(()=>{s&&ve()});return}}catch(l){if(t.error=l,console.error("[DOMQL] Event error:",l),o?.strictMode)throw l}s&&ve()};if(qw(e)){let a=o?.rootNode||n.ownerDocument?.documentElement;Uc(e,n,i,a)}else n.addEventListener(e,i,Hg(e,!1));t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{if(qw(e)){let a=o?.rootNode||n.ownerDocument?.documentElement;Wc(e,n,a)}else n.removeEventListener(e,i,Hg(e,!1))})}function Kw(e){let t=[];return e.extends&&(Array.isArray(e.extends)?t.push(...e.extends):t.push(e.extends)),e.extend&&(Array.isArray(e.extend)?t.push(...e.extend):t.push(e.extend)),t}function Ai(e,t,r){let n=Kw(t);if(!n.length)return;let o=(e.context||r?.context||{}).components||{};for(let s=0;s<n.length;s++){let i=Xw(n[s],o);i&&i!==t&&Yw(e,i,r,new Set([t]))}}function Xw(e,t){if(typeof e=="string"){if(e.includes(">")){let r=e.split(">").map(o=>o.trim()),n=t[r[0]]||t[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return t[e]||t[`smbls.${e}`]||null}return typeof e=="object"&&e!==null?e:null}function Yw(e,t,r,n=new Set){if(n.has(t))return;n.add(t);let o=Kw(t);if(o.length){let s=(e.context||r?.context||{}).components||{};for(let i=0;i<o.length;i++){let a=Xw(o[i],s);a&&Yw(e,a,r,n)}}for(let s in t){if(s==="extends"||s==="extend")continue;let i=t[s];e[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?e[s]={...i}:e[s]=i:typeof e[s]=="object"&&typeof i=="object"&&!Array.isArray(e[s])&&!Array.isArray(i)&&e[s]!==null&&i!==null?e[s]=Zw(e[s],i):e[s]=i}}function Zw(e,t){let r={...e};for(let n in t){let o=r[n],s=t[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Zw(o,s):r[n]=s}return r}Kn();function Ei(e={},t={}){let r=this,n=r.__ref;if(n){if((typeof e=="string"||typeof e=="number")&&(e={text:e}),!t.preventListeners&&typeof r.onBeforeUpdate=="function"&&r.onBeforeUpdate(r,r.state,r.context,t)===!1)return r;if(xr(()=>{if(e.state&&Se(r.state)&&r.state.update(e.state),e.text!==void 0&&(r.text=e.text,!n.__exec.text&&r.node&&(r.tag==="string"?r.node.nodeValue=e.text??"":r.node.textContent=e.text??"")),e.html!==void 0&&(r.html=e.html,!n.__exec.html&&r.node&&(r.node.innerHTML=e.html)),e.style&&r.node?.style){if(!n.__exec.style)for(let o in e.style){let s=e.style[o];if(s==null)continue;let i=o.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),a=String(s).replace(/\s*!important\s*$/,"");r.node.style.setProperty(i,a,"important")}r.style||(r.style={}),Object.assign(r.style,e.style)}if(e.attr&&r.node?.setAttribute){for(let o in e.attr){let s=e.attr[o];s==null||s===!1?r.node.removeAttribute(o):typeof s!="function"&&typeof s!="object"&&r.node.setAttribute(o,s===!0?"":s)}r.attr||(r.attr={}),Object.assign(r.attr,e.attr)}if(e.data&&r.node?.dataset){for(let o in e.data)r.node.dataset[o]=e.data[o];r.data||(r.data={}),Object.assign(r.data,e.data)}for(let o in e){if(Ze.has(o)||o==="state")continue;let s=e[o],i=r[o];if(i&&i.__ref&&typeof i.update=="function")i.update(s,t);else if(typeof s=="object"&&s!==null){let a=o.charCodeAt(0);a>=65&&a<=90&&Pt(s,r,o,t)}else o!=="text"&&o!=="html"&&o!=="style"&&o!=="attr"&&o!=="data"&&(r[o]=s)}}),r.node&&n.__conditionalRunners)for(let o of n.__conditionalRunners)o();return ft("update",r),!t.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,t),r}}function wn(e){if(!e)return;let t=e.__ref;if(t){try{typeof e.onBeforeRemove=="function"&&e.onBeforeRemove(e,e.state,e.context)}catch(r){console.error("[smbls] onBeforeRemove error:",r)}if(t.__effects){for(let r=0;r<t.__effects.length;r++)t.__effects[r].dispose();t.__effects.length=0}if(t.__eventCleanup){for(let r=0;r<t.__eventCleanup.length;r++)t.__eventCleanup[r]();t.__eventCleanup.length=0}if(t.__children){for(let r=0;r<t.__children.length;r++){let n=t.__children[r],o=e[n];o&&o.__ref&&wn(o)}t.__children.length=0}if(e.node?.parentNode&&e.node.remove(),e.state?.destroy&&e.state.__element===e&&e.state.destroy(),e.parent?.__ref?.__children){let r=e.parent.__ref.__children.indexOf(e.key);r!==-1&&e.parent.__ref.__children.splice(r,1),delete e.parent[e.key]}try{typeof e.onRemove=="function"&&e.onRemove(e)}catch(r){console.error("[smbls] onRemove error:",r)}e.node=null,e.parent=null,e.__ref=null}}function Oi(){wn(this)}F();F();var tI=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],rI=["none","forwards","backwards","both"],nI=["normal","reverse","alternate","alternate-reverse"],oI=["running","paused"],sI=e=>/^[\d.]+m?s$/.test(e),iI=0,qg=(e,t)=>{let{animation:r}=t.context&&t.context.designSystem||{};if(k(e)){let o=`smbls-anim-${iI++}`;return{animationName:xi(o,e)}}let n=r&&r[e];return k(n)?xi(e,n):e},aI=(e,t)=>{let{animation:r}=t.context&&t.context.designSystem||{},n=e.split(/\s+/),o=null,s=[],i=null,a=null,l=null,c=null,u=null;for(let d of n)r&&r[d]?o=d:sI(d)?s.push(d):tI.includes(d)||d.startsWith("cubic-bezier")||d.startsWith("steps(")?i=d:d==="infinite"||/^\d+$/.test(d)?a=d==="infinite"?d:Number(d):nI.includes(d)?l=d:rI.includes(d)?c=d:oI.includes(d)?u=d:o||(o=d);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:l,fillMode:c,playState:u}},Gg={animation:(e,t)=>{if(C(e)&&e.includes(" ")){let r=aI(e,t);return{animationName:qg(r.name||e,t),animationDuration:r.durations[0]||ht(t.animationDuration||"A").timing,animationDelay:r.durations[1]||ht(t.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||Rt(t.animationTimingFunction||"ease"),animationFillMode:r.fillMode||t.animationFillMode||"both",animationIterationCount:r.iterationCount!=null?r.iterationCount:t.animationIterationCount||1,animationPlayState:r.playState||t.animationPlayState,animationDirection:r.direction||t.animationDirection}}return{animationName:qg(e,t),animationDuration:ht(t.animationDuration||"A").timing,animationDelay:ht(t.animationDelay||"0s").timing,animationTimingFunction:Rt(t.animationTimingFunction||"ease"),animationFillMode:t.animationFillMode||"both",animationIterationCount:t.animationIterationCount||1,animationPlayState:t.animationPlayState,animationDirection:t.animationDirection}},animationName:(e,t)=>({animationName:qg(e,t)}),animationDuration:e=>({animationDuration:ht(e).timing}),animationDelay:e=>({animationDelay:ht(e).timing}),animationTimingFunction:e=>({animationTimingFunction:Rt(e)}),animationIterationCount:e=>({animationIterationCount:e}),animationFillMode:e=>({animationFillMode:e}),animationPlayState:e=>({animationPlayState:e}),animationDirection:e=>({animationDirection:e})};F();var Kg={show:e=>e?void 0:{display:"none !important"},hide:e=>e?{display:"none !important"}:void 0,height:(e,t)=>re("height",e,t),width:(e,t)=>re("width",e,t),boxSizing:e=>Ie(e)?{boxSizing:"border-box"}:{boxSizing:e},boxSize:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("height",t),..._e("width",r||t)}},inlineSize:(e,t)=>re("inlineSize",e,t),blockSize:(e,t)=>re("blockSize",e,t),minWidth:(e,t)=>re("minWidth",e,t),maxWidth:(e,t)=>re("maxWidth",e,t),widthRange:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("minWidth",t),..._e("maxWidth",r||t)}},minHeight:(e,t)=>re("minHeight",e,t),maxHeight:(e,t)=>re("maxHeight",e,t),heightRange:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("minHeight",t),..._e("maxHeight",r||t)}},size:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{...re("inlineSize",t),...re("blockSize",r||t)}},minBlockSize:(e,t)=>re("minBlockSize",e,t),minInlineSize:(e,t)=>re("minInlineSize",e,t),maxBlockSize:(e,t)=>re("maxBlockSize",e,t),maxInlineSize:(e,t)=>re("maxInlineSize",e,t),minSize:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("minInlineSize",t),..._e("minBlockSize",r||t)}},maxSize:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("maxInlineSize",t),..._e("maxBlockSize",r||t)}},borderWidth:(e,t)=>re("borderWidth",e,t),padding:(e,t)=>re("padding",e,t),scrollPadding:(e,t)=>re("scrollPadding",e,t),paddingInline:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("paddingInlineStart",t),..._e("paddingInlineEnd",r||t)}},paddingBlock:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("paddingBlockStart",t),..._e("paddingBlockEnd",r||t)}},paddingTop:(e,t)=>re("paddingBlockStart",e,t),paddingBottom:(e,t)=>re("paddingBlockEnd",e,t),paddingLeft:(e,t)=>re("paddingInlineStart",e,t),paddingRight:(e,t)=>re("paddingInlineEnd",e,t),paddingBlockStart:(e,t)=>re("paddingBlockStart",e,t),paddingBlockEnd:(e,t)=>re("paddingBlockEnd",e,t),paddingInlineStart:(e,t)=>re("paddingInlineStart",e,t),paddingInlineEnd:(e,t)=>re("paddingInlineEnd",e,t),margin:(e,t)=>re("margin",e,t),marginInline:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{..._e("marginInlineStart",t),..._e("marginInlineEnd",r||t)}},marginBlock:(e,t)=>{if(!C(t.marginBlock))return;let[r,n]=t.marginBlock.split(" ");return{..._e("marginBlockStart",r),..._e("marginBlockEnd",n||r)}},marginTop:(e,t)=>re("marginBlockStart",e,t),marginBottom:(e,t)=>re("marginBlockEnd",e,t),marginLeft:(e,t)=>re("marginInlineStart",e,t),marginRight:(e,t)=>re("marginInlineEnd",e,t),marginInlineStart:(e,t)=>re("marginInlineStart",e,t),marginInlineEnd:(e,t)=>re("marginInlineEnd",e,t),marginBlockStart:(e,t)=>re("marginBlockStart",e,t),marginBlockEnd:(e,t)=>re("marginBlockEnd",e,t),gap:e=>({gap:jg(e)}),columnGap:(e,t)=>Xt(t,"columnGap",e),rowGap:(e,t)=>Xt(t,"rowGap",e),flexWrap:e=>({display:"flex",flexWrap:e}),flexFlow:(e,t)=>{let r=t.reverse;if(!C(e))return;let[n,o]=(e||"row").split(" ");return(e.startsWith("x")||e==="row")&&(n="row"),(e.startsWith("y")||e==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:e=>{if(!C(e))return;let[t,r]=e.split(" ");return{display:"flex",alignItems:t,justifyContent:r}},round:(e,t)=>Bc(e??t.borderRadius,t,"round"),borderRadius:(e,t)=>Bc(e??t.round,t,"borderRadius")};var Xg={fontSize:e=>Ac(e)||e,fontFamily:e=>({fontFamily:kc(e)||e}),fontWeight:e=>({fontWeight:e,fontVariationSettings:'"wght" '+e})};var Yg={overflow:e=>({overflow:e,scrollBehavior:"smooth"}),cursor:(e,t,r,n)=>{if(!e)return;let o=n.assets&&n.assets[e];if(o&&o.content)e=`url(${o.content.src})`;else{let s=n.files&&n.files[e];s&&s.content&&(e=`url(${s.content.src})`)}return{cursor:e}},opacity:e=>e!=null?{opacity:String(e)}:void 0,visibility:e=>e!=null?{visibility:e}:void 0,pointerEvents:e=>e!=null?{pointerEvents:e}:void 0};var Zg={inset:(e,t)=>{if(t.call("isNumber",e))return{inset:e};if(t.call("isString",e))return{inset:e.split(" ").map(r=>Re(r,"k").k).join(" ")}},left:e=>Re(e,"left"),top:e=>Re(e,"top"),right:e=>Re(e,"right"),bottom:e=>Re(e,"bottom"),verticalInset:e=>{if(typeof e!="string")return;let t=e.split(" ").map(r=>Re(r,"k").k);return{top:t[0],bottom:t[1]||t[0]}},horizontalInset:e=>{if(typeof e!="string")return;let t=e.split(" ").map(r=>Re(r,"k").k);return{left:t[0],right:t[1]||t[0]}}};F();var mt=({context:e,state:t})=>{let r=t?.root?.globalTheme||e.designSystem?.globalTheme;return r==="auto"?null:r},Jg={theme:(e,t)=>{if(e)return t.themeModifier?Tt(e,`@${t.themeModifier}`):Tt(e)},color:(e,t)=>{let r=mt(t);if(e)return{color:De(e,r)}},background:(e,t)=>{let r=mt(t);if(e)return C(e)&&e.includes("gradient")?{background:Mc(e,r)}:{background:De(e,r)}},backgroundColor:(e,t)=>{let r=mt(t);if(e)return{backgroundColor:De(e,r)}},backgroundImage:(e,t,r,n)=>{let o=mt(t);if(!e)return;let s=n.assets&&n.assets[e];if(s&&s.content)e=s.content.src;else{let i=n.files&&n.files[e];i&&i.content&&(e=i.content.src)}return{backgroundImage:Fg(e,o)}},textStroke:e=>({WebkitTextStroke:$g(e)}),outline:e=>({outline:cr(e)}),outlineOffset:(e,t)=>re("outlineOffset",e,t),border:e=>({border:cr(e)}),borderColor:(e,t)=>{let r=mt(t);if(e)return{borderColor:De(e,r)}},borderTopColor:(e,t)=>{let r=mt(t);if(e)return{borderTopColor:De(e,r)}},borderBottomColor:(e,t)=>{let r=mt(t);if(e)return{borderBottomColor:De(e,r)}},borderLeftColor:(e,t)=>{let r=mt(t);if(e)return{borderLeftColor:De(e,r)}},borderRightColor:(e,t)=>{let r=mt(t);if(e)return{borderRightColor:De(e,r)}},borderLeft:e=>({borderLeft:cr(e)}),borderTop:e=>({borderTop:cr(e)}),borderRight:e=>({borderRight:cr(e)}),borderBottom:e=>({borderBottom:cr(e)}),shadow:(e,t)=>{let r=mt(t);if(e)return{boxShadow:Ig(e,r)}},boxShadow:(e,t)=>{if(!C(e))return;let[r,n]=e.split("!importan"),o=mt(t),s=n?" !important":"";return{boxShadow:Lc(r.trim(),o)+s}},textShadow:(e,{context:t})=>({textShadow:Lc(e,t.designSystem.globalTheme)}),columnRule:e=>({columnRule:cr(e)})};var Ti={transition:e=>({transition:Dg(e)}),transitionDuration:e=>({transitionDuration:Nc(e)}),transitionDelay:e=>({transitionDelay:Nc(e)}),transitionTimingFunction:e=>({transitionTimingFunction:Rt(e)}),transitionProperty:e=>({transitionProperty:e,willChange:e})};F();var Qg={flow:(e,t)=>{let r=t.reverse;if(!C(e))return;let[n,o]=(e||"row").split(" ");return(e.startsWith("x")||e==="row")&&(n="row"),(e.startsWith("y")||e==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(e,t)=>({display:"flex",flexWrap:e}),align:(e,t)=>{let[r,n]=e.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var em={area:e=>({gridArea:e}),template:e=>({gridTemplate:e}),templateAreas:e=>({gridTemplateAreas:e}),column:e=>({gridColumn:e}),columns:e=>({gridTemplateColumns:e}),templateColumns:e=>({gridTemplateColumns:e}),autoColumns:e=>({gridAutoColumns:e}),columnStart:e=>({gridColumnStart:e}),row:e=>({gridRow:e}),rows:e=>({gridTemplateRows:e}),templateRows:e=>({gridTemplateRows:e}),autoRows:e=>({gridAutoRows:e}),rowStart:e=>({gridRowStart:e}),autoFlow:e=>({gridAutoFlow:e})};var Ae={...Gg,...Kg,...Xg,...Yg,...Zg,...Jg,...Ti,...Qg,...em};var Le=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","isolation","justifyContent","justifyItems","justifySelf","left","letterSpacing","lineBreak","lineClamp","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","marginBlock","marginBlockEnd","marginBlockStart","marginInline","marginInlineEnd","marginInlineStart","mask","maskBorder","maskBorderImage","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskClip","maskComposite","maskImage","maskOrigin","maskPosition","maskRepeat","maskSize","maskType","maxBlockSize","maxHeight","maxInlineSize","maxWidth","minBlockSize","minHeight","minInlineSize","minWidth","mixBlendMode","objectFit","objectPosition","objectViewBox","offset","offsetDistance","offsetPath","offsetRotate","opacity","order","orientation","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowClip","overflowScrolling","overflowWrap","overflowX","overflowY","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);F();var lI=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,cI=(e,t,r)=>{let{context:n}=r;if(!n.designSystem?.media)return;let o=e.slice(1),s=n.designSystem.media[o],i=rt(t,r);if(!s)return{[e]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(lI),l=a?a[1]||a[2]:o,c={[`${s} &`]:i};if(l==="dark"||l==="light"){let u=n.designSystem?.scopeSelector||":root",d=u===":root"?":root:not([data-theme])":`${u}:not([data-theme])`;c[`@media (prefers-color-scheme: ${l})`]={[`${d} &`]:i}}return c},Jw=(e,t,r)=>({[e]:rt(t,r)}),Ri=(e,t,r)=>{let n=`&${e}`,o=rt(t,r);if(e.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=n.split(",").map(c=>c.trim()),l={};Object.keys(s).length&&(l[n]=s);for(let c in i){let u=a.map(d=>`${d} ${c}`).join(", ");l[u]=i[c]}return l}}return{[n]:o}},tm=(e,t)=>{let r=t.context?.cases?.[e];if(r!==void 0)return O(r)?r.call(t,t):!!r},uI=(e,t,r)=>{let n=e.slice(1),o=tm(n,r);if(o===void 0&&(o=!!r[n]),!!o)return rt(t,r)},fI=(e,t,r)=>({[e]:t}),dI=(e,t,r)=>{let n=e.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=tm(n,r);s!==void 0&&(o=s)}if(o)return rt(t,r)},pI=(e,t,r)=>{let n=e.slice(1),o=r[n]===!0||r.state?.[n];if(!o)if(typeof r[n]=="function")try{o=r[n](r,r.state,r.context)}catch{}else{let s=tm(n,r);s!==void 0&&(o=s)}if(!o)return rt(t,r)},rm=(e,t)=>rt(e,t),nm={"@":cI,":":Ri,"[":Ri,"*":Ri,"+":Ri,"~":Ri,"&":Jw,">":Jw,$:uI,"-":fI,".":dI,"!":pI};var om=wr(),Qw=(e,t,r)=>{let n=t?.context?.designSystem;n&&ke(n);try{let o={},s={},i=(a,l)=>{if(r.unpack){o={...o,...l};return}o[a]=l};for(let a in e){let l=e[a];if(a==="class"&&t.call("isString",e.class)){let c=l.split(" ");if(c.length){let u=t.context.designSystem.class,d=c.reduce((f,p)=>ye(f,u[p]),{});o.designSystemClass=d}}else if(a==="true"){let c=de(l,t);ye(o,rm(c,t))}else if(t.classlist[a]){let c=t.classlist[a],u=O(c)?c(t,t.state,t.context):c;u&&i(a,u),!om&&k(o[a])&&(o[a].label=a)}else if(Ae[a]){let c=de(l,t);I(c)&&(c=c.reduce((d,f)=>ye(d,f),{}));let u=Ae[a](c,t,t.state,t.context);I(u)&&(u=u.reduce((d,f)=>ye(d,f),{})),u&&i(a,u),!om&&k(o[a])&&(o[a].label=a)}else if(Le.has(a)){let c=de(l,t);typeof c=="string"&&c.charCodeAt(0)===45&&c.charCodeAt(1)===45&&(c=`var(${c})`),i(a,{[a]:c}),!om&&k(o[a])&&(o[a].label=a)}else s[a]=l}return[o,s]}finally{n&&ve()}},eS=(e,t)=>{let r={};for(let n in e){let o=nm[n.slice(0,1)];if(o){let s=o(n,e[n],t);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?Ke(r[i],s[i]):r[i]=s[i])}}return r},rt=(e,t,r={unpack:!0})=>{let[n,o]=Qw(e,t,r),s=eS(o,t),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return ps(n,s);n._selectors=s}return n},hI=(e,t)=>{let r={};if(e.class)for(let n in e.class)r[n]=e.class[n](t);return r};F();var tS=e=>{if(k(e))return rt(e,e)},gI=(e,t)=>{let r=tS(e);return typeof t=="function"?t(r):Ir(r)};F();function oS(e,t,r){let n=e?.context?.analyze;if(!n||!n.emit||t==="warn"&&!n.shouldCapture("warnings")||t==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:t==="error"?"error":"warning",level:t,hook:t==="error"?"el.error":"el.warn",element:{key:e.key!=null?String(e.key):null,name:e.__name||null,tag:e.tag||null},message:o||null,args:r})}function mI(...e){return oS(this,"warn",e),Zs.apply(this,e)}function yI(...e){return oS(this,"error",e),ln.apply(this,e)}var rS={update:Ei,remove:Oi,getDB:ti,getQuery:ri,getRootData:Ks,getChildren:Us,getPath:Ws,nextElement:Js,previousElement:Qs,verbose:Qn,warn:mI,error:yI,variables:ei,spotByPath:Vs,set(e,t){if(this.removeContent(),e!=null){let r=this.context?.__create;r&&r(e,this,"content",t)}this.__ref&&(this.__ref.contentManaged=!0)},reset(e){let t=this.context?.__create;if(!t)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),t(o,r,n,e)},lookup(e){let t=this.parent;for(;t;){if(typeof e=="function"){if(e(t))return t}else if(typeof e=="string"){if(t.key===e)return t;if(t[e]&&t[e].__ref)return t[e]}t=t.parent}return null},lookdown(e){let t=this.__ref;if(!t?.__children)return null;for(let r of t.__children){let n=this[r];if(!n)continue;if(typeof e=="function"){if(e(n))return n}else if(typeof e=="string"&&n.key===e)return n;let o=n.lookdown?.(e);if(o)return o}return null},lookdownAll(e,t=[]){let r=this.__ref;if(!r?.__children)return t;for(let n of r.__children){let o=this[n];o&&(typeof e=="function"?e(o)&&t.push(o):typeof e=="string"&&o.key===e&&t.push(o),o.lookdownAll?.(e,t))}return t},getRef(){return this.__ref},getRoot:Gs,getRootState:qs,getRootContext:Xs,getContext:Ys,parse(e){let t={},r=e?new Set(e):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){t[o]=n[o];continue}typeof this[o]!="function"&&(t[o]=this[o])}return t},parseDeep(e){let t=this.parse(e),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(t[n]=this[n].parseDeep(e));return t},keys(){return Object.keys(this)},log(...e){if(e.length){let t={};for(let r of e)t[r]=this[r];console.log(t)}else console.log(this)},setProps(e,t){return this.update(e,t)},setNodeStyles(e){if(this.node?.style)for(let t in e){let r=e[t];if(r==null)continue;let n=t.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(e,...t){let r=this.context,n=r?.methods?.[e]||r?.functions?.[e]||r?.utils?.[e]||this[e];if(typeof n=="function")return n.call(this,...t)},removeContent(){let e=this.__ref;if(!e?.__children)return;let t=this.content;if(t?.remove){t.remove(),delete this.content;let r=e.__children.indexOf("content");r!==-1&&e.__children.splice(r,1)}t?.node?.parentNode&&t.node.parentNode.removeChild(t.node)}},nS=new WeakMap;function bI(e){if(!e)return rS;let t=nS.get(e);if(t)return t;t=Object.create(rS);let r=e.methods;if(r)for(let n in r)t[n]=r[n];return nS.set(e,t),t}function Pi(e){let t=bI(e.context);Object.setPrototypeOf(e,t)}F();Kn();var xI=(e,t,r)=>{Object.defineProperty(e,t,{value:r,enumerable:!1,configurable:!0,writable:!0})},yt=(e,t)=>{if(Se(t)){let o=t.__raw||t;t.toggle||Object.defineProperty(o,"toggle",{value:function(s,i={}){t[s]=!t[s]},enumerable:!1,configurable:!0}),t.set||Object.defineProperty(o,"set",{value:function(s,i={}){return t.clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&t.update(s,i),t},enumerable:!1,configurable:!0}),Object.defineProperty(o,"setByPath",{value:function(s,i,a={}){let l=s.split("."),c=t;for(let u=0;u<l.length-1;u++)c[l[u]]===void 0&&(c[l[u]]={}),c=c[l[u]];return c[l[l.length-1]]=i,t},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"getByPath",{value:function(s){let i=s.split("."),a=t;for(let l=0;l<i.length;l++){if(a==null)return;a=a[i[l]]}return a},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"removeByPath",{value:function(s,i={}){let a=s.split("."),l=t;for(let c=0;c<a.length-1;c++){if(l==null)return t;l=l[a[c]]}return l&&delete l[a[a.length-1]],t},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"reset",{value:function(s={}){let i=t.parse();return t.set(i,s)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"apply",{value:function(s,i={}){if(typeof s=="function"){let a=s(t);return t.update(a,i)}},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"applyFunction",{value:function(s,i={}){if(typeof s=="function")return s(t),t.update(t.parse(),i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"rootUpdate",{value:function(s,i={}){let a=t;for(;a?.parent&&Se(a.parent);)a=a.parent;return a.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"parentUpdate",{value:function(s,i={}){if(t.parent)return t.parent.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"quietReplace",{value:function(s,i={}){return t.replace(s,{quiet:!0,...i})},enumerable:!1,configurable:!0,writable:!0}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=t,i=Se(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,Se(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!t||typeof t!="object")return;let r=()=>{for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&delete t[o]},n={update(o){if(!o||typeof o!="object")return t;for(let s in o)t[s]=o[s];return t},apply(o){if(typeof o!="function")return t;let s=o(t);return s?t.update(s):t},parse(){return{...t}},toggle(o){return t[o]=!t[o],t},set(o){if(!o||typeof o!="object")return t;r();for(let s in o)t[s]=o[s];return t},replace(o){return t.set(o)},clean(){return r(),t}};for(let o in n)typeof t[o]!="function"&&xI(t,o,n[o])};var sS=function(e,t,r){return e.state=im(e,t,r),e.state},im=function(e,t,r){let{__ref:n}=e,o=e.state;if(o==null||o===!1){let s=t?.state||{};return yt(e,s),s}if(typeof o=="string")return n&&(n.__state=o),n.__stateType="string",vI(o,e,t);if(typeof o=="number"||typeof o=="boolean"){n&&(n.__state=o,n.__stateType=typeof o,n.__hasRootState=!0);let s=ut({value:o});return s.__element=e,t?.state&&(s.parent=t.state),yt(e,s),s}if(typeof o=="function"&&(o=o(e,t?.state)||{}),typeof o=="object"&&!Se(o)){n&&(n.__hasRootState=!0),o.isRootState&&n&&(n.__hasRootState=!0);let s=ut({...o});if(s.__element=e,!Object.getOwnPropertyDescriptor(s,"root")){let i=t?.state?.root||t?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return t?.state&&(s.parent=t.state,t.state.__children&&(t.state.__children[e.key]=s)),yt(e,s),typeof e.onStateCreated=="function"&&e.onStateCreated(e,s,e.context,r),s}return Se(o)?(o.__element=e,o):t?.state||{}};function sm(e,t){if(!t)return e;let r=t.split("/"),n=e;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function vI(e,t,r){if(!r?.state)return{};if(e===".")return r.state;if(e.startsWith("../")){let o=e.slice(3),s=r.state?.parent;return o&&s?sm(s,o):s??r.state??{}}if(e.startsWith("~/")){let o=r.state;for(;o?.parent;)o=o.parent;let s=e.slice(2);return s?sm(o,s):o??{}}let n=sm(r.state,e);if(n&&typeof n=="object"&&!Se(n)&&!Object.getOwnPropertyDescriptor(n,"root")){let o=r.state?.root||r.state;Object.defineProperty(n,"root",{get:()=>o,enumerable:!1,configurable:!0})}return n}var lS=(e,t)=>{if(!e)return aS;let r=wI(e,t);return!r||!r.state?aS:kI(r.state)},cS=()=>Ln()!=null,_I=128;function wI(e,t){let r=typeof t=="function"?t:typeof t=="string"?s=>!!s?.[t]:s=>!!s?.state,n=e,o=null;for(let s=0;s<_I&&n;s++){if(r(n)&&n.state)return n;if(n.state&&!o&&(o=n),!n.parent||n.parent===n)break;n=n.parent}return o}var SI={get(e,t){return e[t]}},iS=new WeakMap,kI=e=>{let t=iS.get(e);return t||(t=new Proxy(e,SI),iS.set(e,t)),t},aS=new Proxy(Object.create(null),{get(){},has(){return!1}});F();var CI=["alert","alertdialog","application","article","banner","button","cell","checkbox","columnheader","combobox","complementary","contentinfo","definition","dialog","directory","document","feed","figure","form","grid","gridcell","group","heading","img","link","list","listbox","listitem","log","main","marquee","math","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","switch","tab","table","tablist","tabpanel","term","textbox","timer","toolbar","tooltip","tree","treegrid","treeitem"],Hc={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],slot:["name"],script:["async","charset","crossorigin","defer","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"]},fS=["oncopy","oncut","onpaste","oncompositionend","oncompositionstart","oncompositionupdate","onfocus","onfocusin","onfocusout","onblur","onchange","onbeforeinput","oninput","onreset","onsubmit","oninvalid","onformdata","onload","onerror","ontoggle","onkeydown","onkeypress","onkeyup","onabort","oncanplay","oncanplaythrough","oncuechange","ondurationchange","onemptied","onencrypted","onended","onloadeddata","onloadedmetadata","onloadstart","onpause","onplay","onplaying","onprogress","onratechange","onseeked","onseeking","onstalled","onsuspend","ontimeupdate","onvolumechange","onwaiting","onauxclick","onclick","oncontextmenu","ondblclick","ondrag","ondragend","ondragenter","ondragexit","ondragleave","ondragover","ondragstart","ondrop","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onselect","onselectionchange","onselectstart","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ongotpointercapture","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onlostpointercapture","onscroll","onresize","onwheel","onanimationstart","onanimationend","onanimationiteration","ontransitionstart","ontransitionrun","ontransitionend","ontransitioncancel","onoutrostart","onoutroend","onintrostart","onintroend","onmessage","onmessageerror","onvisibilitychange","oncancel","onclose","onfullscreenchange","onfullscreenerror"],cm=e=>e.startsWith("aria")&&e.length>4&&e.charCodeAt(4)>=65&&e.charCodeAt(4)<=90?"aria-"+e.charAt(4).toLowerCase()+e.slice(5).replace(/([A-Z])/g,t=>"-"+t.toLowerCase()):e.startsWith("data")&&e.length>4&&e.charCodeAt(4)>=65&&e.charCodeAt(4)<=90?"data-"+e.charAt(4).toLowerCase()+e.slice(5).replace(/([A-Z])/g,t=>"-"+t.toLowerCase()):null,jr=(e,t)=>t.startsWith("aria-")||t.startsWith("data-")||cm(t)||Hc.default.includes(t)?!0:Object.prototype.hasOwnProperty.call(Hc,e)?Hc[e].includes(t):!1,um=e=>{if(!C(e))return!1;let t=e.toLowerCase();return fS.includes(t)},AI=(e,t,r)=>{let n={};for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){if(r&&o in r)continue;if(o==="aria"&&t[o]&&typeof t[o]=="object"){for(let a in t[o])qe(t[o][a])&&(n["aria-"+a]=t[o][a]);continue}if(o==="data"&&t[o]&&typeof t[o]=="object"){for(let a in t[o])if(qe(t[o][a])){let l=a.replace(/([A-Z])/g,c=>"-"+c.toLowerCase());n["data-"+l]=t[o][a]}continue}let s=jr(e,o),i=um(o);if(qe(t[o])&&(s||i)){let a=cm(o)||o;n[a]=t[o]}}return n},EI=(e,t)=>{let r={};if(e.attr)for(let n in e.attr)r[n]=e.attr[n](t,t.state,t.context);if(e.aria&&typeof e.aria=="object")for(let n in e.aria){let o=e.aria[n];typeof o=="function"&&(r["aria-"+n]=o(t,t.state,t.context))}if(e.data&&typeof e.data=="object")for(let n in e.data){let o=e.data[n];if(typeof o=="function"){let s=n.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=o(t,t.state,t.context)}}return r},Fr=(e,t)=>{let r=e.call("exec",t,e);if(r)return C(r)&&r.includes("{{")&&(r=e.call("replaceLiteralsWithObjectFields",r)),r},am=(e,t)=>{let r=(e.preSrc||"")+(Fr(e,t)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=e;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},lm={src:e=>am(e,e.src),href:e=>Fr(e,e.href),action:e=>Fr(e,e.action),poster:e=>am(e,e.poster),data:e=>Fr(e,e.data)},fm=e=>{let t=e.tag||"div",r={};for(let n in lm)if(e[n]!==void 0&&jr(t,n)){let o=lm[n](e);o!==void 0&&(r[n]=o)}return r},uS=(e,t)=>{let r=t.context?.cases?.[e];if(r!==void 0)return O(r)?r.call(t,t):!!r},OI=(e,t,r)=>{if(e==="$"){let o=uS(t,r);return o===void 0&&(o=!!r[t]),o}let n=r[t]===!0||r.state[t];if(!n){let o=uS(t,r);o!==void 0&&(n=o)}return e==="."?!!n:!n},TI=new Set(["$",".","!"]),RI=(e,t,r)=>{let n={},o=(s,i,a,l)=>{let c=i;n[s]=u=>{if(OI(a,l,u))return O(c)?c(u):c}};for(let s in e){let i=s.charAt(0);if(!TI.has(i))continue;let a=e[s];if(!a||typeof a!="object")continue;let l=s.slice(1);for(let c in a){if(r&&c in r)continue;if(c==="aria"&&a[c]&&typeof a[c]=="object"){for(let p in a[c])o("aria-"+p,a[c][p],i,l);continue}if(c==="data"&&a[c]&&typeof a[c]=="object"){for(let p in a[c]){let h=p.replace(/([A-Z])/g,g=>"-"+g.toLowerCase());o("data-"+h,a[c][p],i,l)}continue}let u=jr(t,c),d=um(c);if(!u&&!d)continue;let f=cm(c)||c;o(f,a[c],i,l)}}return n};var PI=1;function co(e){return e.length>2&&e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90}function $I(e){return e.charAt(2).toLowerCase()+e.slice(3)}function II(e){return e.toLowerCase()}function hm(e,t){let r={...e};for(let n in t){let o=r[n],s=t[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=hm(o,s):r[n]=s}return r}function Pt(e,t,r,n={},o){if(e==null||e===!1)return null;(typeof e=="string"||typeof e=="number")&&(e={text:e});let s=Object.create(null);s.key=r||e.key||`_${PI++}`,s.parent=t||null,s.context=e.context||t?.context||n.context||{},s.context.__create||(s.context.__create=Pt);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:t?.__ref?.root||s,path:t?.__ref?.path?[...t.__ref.path,s.key]:[s.key]};if(r&&!e.extends&&!e.extend){let g=r.indexOf("_");if(g>0){let m=r.substring(0,g),y=s.context?.components;y&&(y[m]||y["smbls."+m])&&(e={extends:m,...e})}}Ai(s,e,n);let a=new Set(["childProps","attr","style","scope","data"]),l=s.props&&typeof s.props=="object"?s.props:null;for(let g in e){if(g==="parent"||g==="node"||g==="__ref"||g==="extends"||g==="context"||g==="props")continue;let m=e[g],y=s[g],b=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";b&&g.charCodeAt(0)>=65&&g.charCodeAt(0)<=90?s[g]=hm(y,m):b&&a.has(g)?s[g]={...y,...m}:s[g]=m}function c(g){for(let m in g){let y=g[m],b=s[m],v=b&&y&&typeof b=="object"&&typeof y=="object"&&!Array.isArray(b)&&!Array.isArray(y)&&typeof b!="function"&&typeof y!="function";v&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=hm(b,y):v&&a.has(m)?s[m]={...b,...y}:s[m]=y}}l&&c(l),e.props&&typeof e.props=="object"&&c(e.props),e.data!==void 0&&(s.data=e.data),e.classlist!==void 0&&(s.classlist=e.classlist),e.text!==void 0&&(s.text=e.text),e.html!==void 0&&(s.html=e.html);let u=s.scope&&typeof s.scope=="object"?s.scope:null,d=t?.scope,f=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,p=d||f||null;if(e.scope!==void 0||u){let g={};u&&Object.assign(g,u),e.scope!==void 0&&Object.assign(g,e.scope),s.scope=ll(g,p)}else p&&(s.scope=p);if(e.if!==void 0&&(s.if=e.if),Pi(s),FI(s,t,e),s.if!=null){let g;if(typeof s.if=="function")try{g=s.if(s,s.state,s.context)}catch(m){if(g=!1,i.__ifError=m,typeof console<"u"&&console.warn){let y=s.key||s.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${y} \u2014 treating as false:`,m?.message||m)}}else g=s.if;i.__if=!!g}if(i.__if)typeof e.if=="function"&&(i.__ifInitialized=!0);else return t&&(t[s.key]=s),typeof e.if=="function"&&gm(s,{if:e.if}),s;s.tag||(s.tag=xn(s)),Dr("Init",s,n);let h=s.node=vn(s);if(!h)return s;Dr("AttachNode",s,n),h.setAttribute&&s.key&&h.setAttribute("data-key",s.key),h.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&h.setAttribute("data-smbls-app",s.context.key),s.id&&h.setAttribute&&(h.id=s.id),gm(s,e),mm(s),pS(s),gS(s,n);try{mS(s,n)}catch(g){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,g?.message||g,g?.stack?`
37
37
  `+g.stack.split(`
38
38
  `).slice(0,6).join(`
39
39
  `):"")}}if(xm(s,t,o),t&&(t[s.key]=s,t.__ref?.__children&&(t.__ref.__children.includes(s.key)||t.__ref.__children.push(s.key))),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let g=s.context?.designSystem;g&&ke(g);try{let m=s.html(s,s.state,s.context);m!=null&&typeof m!="function"&&(s.node.innerHTML=m)}catch{}finally{g&&ve()}}if(Dr("Create",s,n),Dr("Complete",s,n),Dr("Render",s,n),Dr("RenderRouter",s,n),typeof s.onFrame=="function"){let g=s.onFrame,m=s.context?.designSystem,y=()=>{if(s.node){if(s.node.isConnected){m&&ke(m);try{g(s,s.state,s.context)}catch(b){console.error("[DOMQL] onFrame error:",b)}finally{m&&ve()}}requestAnimationFrame(y)}};requestAnimationFrame(y)}return s}function FI(e,t,r){let n=!t,o=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=n&&o&&e.context?.state,i=r.state!==void 0&&!s?r.state:e.state&&!Se(e.state)?e.state:void 0;if(i==null){if(t?.state)e.state=t.state,yt(e,e.state);else if(e.context?.state){let a=e.context.state,l={...a},c=e.context?.polyglot;if(c?.translations){let u=a.lang||c.defaultLang||"en",d=c.translations[u];if(d&&typeof d=="object")for(let p in d)l[p]===void 0&&(l[p]=d[p]);let f=new Set(c.languages||[]);for(let p in c.translations)!f.has(p)&&l[p]===void 0&&(l[p]=c.translations[p])}e.state=Se(l)?l:ut(l),e.state.__element=e,e.state.root=e.state,yt(e,e.state)}else e.state={},Object.defineProperty(e.state,"root",{value:e.state,enumerable:!1,configurable:!0,writable:!0}),yt(e,e.state);return}if(typeof i=="string"){if(e.state=dS(i,t),e.state&&typeof e.state=="object"&&!Se(e.state)){let a=t?.state?.root||t?.state||e.state;Object.defineProperty(e.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}yt(e,e.state);return}if(typeof i=="function"){let a=i(e,t?.state);e.state=ut(a||{})}else e.state=ut({...i});e.state.__element=e,t?.state?(e.state.parent=t.state,e.state.root=t.state.root||t.state):e.state.root=e.state,yt(e,e.state)}function dm(e,t){if(!t)return e;let r=t.split("/"),n=e;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function dS(e,t){if(!t)return{};if(e===".")return t.state||{};if(e.startsWith("../")){let o=e.slice(3);return o?dm(t.state,o):t.state??{}}if(e.startsWith("~/")){let o=t.state?.root||t.state,s=e.slice(2);return s?dm(o,s):o??{}}if(t.state?.[e]!==void 0)return t.state[e];let r=dm(t.state,e);if(r!=null&&Object.keys(r).length>0)return r;let n=t.context?.polyglot;if(n?.translations){let o=t.state?.root?.lang||n.defaultLang||"en",s=n.translations[o];if(s?.[e]!==void 0)return s[e];if(n.translations[e]!==void 0)return n.translations[e]}return{}}function jI(e){let t=e.__ref,r=e.tag||"div",n=e.context?.designSystem,o=[],s=Object.keys(e);for(let i=0;i<s.length;i++){let a=s[i];if(typeof e[a]!="function"||Ze.has(a))continue;let l=a.charCodeAt(0);l>=65&&l<=90||co(a)||Ae[a]||Le&&Le.has(a)||jr(r,a)||o.push({prop:a,fn:e[a]})}for(let i=0;i<o.length;i++){let{prop:a,fn:l}=o[i];t.__exec[a]=l,Object.defineProperty(e,a,{get(){n&&ke(n);try{return l(e,e.state,e.context)}catch{return}finally{n&&ve()}},set(c){delete t.__exec[a],Object.defineProperty(e,a,{value:c,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function gm(e,t){let r=e.__ref;if(jI(e),typeof e.text=="function"){let o=e.text,s=we(()=>{if(!r.contentManaged)try{let i=o(e,e.state,e.context);e.node&&i!=null&&typeof i!="function"&&typeof i!="object"&&(typeof i=="string"&&i.includes("{{")&&(i=Qr.call(e,i,e.state)),e.tag==="string"?e.node.nodeValue=i:e.node.textContent=i)}catch{}},{depth:r.path.length});r.__effects.push(s),r.__exec.text=o}else if(typeof e.text=="string"&&e.text.includes("{{")){let o=e.text,s=we(()=>{if(r.contentManaged)return;let i=Qr.call(e,o,e.state);i!=null&&(e.text=i),e.node&&(e.tag==="string"?e.node.nodeValue=i??"":e.node.textContent=i??"")},{depth:r.path.length});r.__effects.push(s),r.__exec.text=o}for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&typeof e[o]=="function"&&!Ze.has(o)&&!co(o)&&!r.__exec[o]){if(Ae[o]){let s=e[o],i=o,a=we(()=>{let l=e.context?.designSystem;l&&ke(l);try{let c=s(e,e.state,e.context),u=Ae[i](c,e,e.state,e.context);u&&e.node?lo(e.node,u):e.node&&(i==="show"||i==="hide")&&(e.node.style.display="")}finally{l&&ve()}},{depth:r.path.length});r.__effects.push(a),r.__exec[o]=s}else if(Le&&Le.has(o)){let s=e[o],i=o,a=we(()=>{let l=e.context?.designSystem;l&&ke(l);try{let c=s(e,e.state,e.context);e.node&&(c!=null?lo(e.node,{[i]:c}):e.node.style[i]="")}finally{l&&ve()}},{depth:r.path.length});r.__effects.push(a),r.__exec[o]=s}}if(typeof t.html=="function"){let o=t.html,s=we(()=>{let i=e.context?.designSystem;i&&ke(i);try{let a=o(e,e.state,e.context);e.node&&a!=null&&typeof a!="function"&&(e.node.innerHTML=a)}finally{i&&ve()}},{depth:r.path.length});r.__effects.push(s),r.__exec.html=o}if(typeof t.value=="function"){let o=t.value,s=we(()=>{try{let i=o(e,e.state,e.context);if(!e.node||!("value"in e.node))return;let a=i==null?"":String(i);if(e.node.value===a)return;let l=typeof document<"u"&&document.activeElement===e.node,c=l&&typeof e.node.selectionStart=="number"?e.node.selectionStart:null,u=l&&typeof e.node.selectionEnd=="number"?e.node.selectionEnd:null;if(e.node.value=a,l&&c!=null&&u!=null)try{e.node.setSelectionRange(c,u)}catch{}}catch{}},{depth:r.path.length});r.__effects.push(s),r.__exec.value=o}if(typeof t.style=="function"){let o=t.style,s=we(()=>{let i=o(e,e.state,e.context);lo(e.node,i)},{depth:r.path.length});r.__effects.push(s),r.__exec.style=o}else if(e.style&&typeof e.style=="object")for(let o in e.style){let s=e.style[o];if(typeof s!="function")continue;let i=we(()=>{try{let a=s(e,e.state,e.context);e.node&&lo(e.node,{[o]:a})}catch{}},{depth:r.path.length});r.__effects.push(i)}if(e.attr&&typeof e.attr=="object"){for(let o in e.attr)if(typeof e.attr[o]=="function"){let s=e.attr[o],i=o,a=we(()=>{try{let l=s(e,e.state,e.context);e.node?.setAttribute&&(l==null||l===!1?e.node.removeAttribute(i):typeof l!="function"&&typeof l!="object"&&e.node.setAttribute(i,l===!0?"":l))}catch{}},{depth:r.path.length});r.__effects.push(a)}}if(e.aria&&typeof e.aria=="object")for(let o in e.aria){let s=e.aria[o];if(typeof s!="function")continue;let i="aria-"+o.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),a=we(()=>{try{let l=s(e,e.state,e.context);if(!e.node?.setAttribute)return;l==null||l===!1?e.node.removeAttribute(i):typeof l!="function"&&typeof l!="object"&&e.node.setAttribute(i,l===!0?"":l)}catch{}},{depth:r.path.length});r.__effects.push(a)}if(e.data&&typeof e.data=="object")for(let o in e.data){let s=e.data[o];if(typeof s!="function")continue;let i="data-"+o.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),a=we(()=>{try{let l=s(e,e.state,e.context);if(!e.node?.setAttribute)return;l==null||l===!1?e.node.removeAttribute(i):typeof l!="function"&&typeof l!="object"&&e.node.setAttribute(i,l===!0?"":l)}catch{}},{depth:r.path.length});r.__effects.push(a)}let n=e.classlist&&typeof e.classlist=="object"&&!Array.isArray(e.classlist)?e.classlist:e.class&&typeof e.class=="object"&&!Array.isArray(e.class)?e.class:null;if(n)for(let o in n){let s=n[o];if(typeof s!="function")continue;let i=we(()=>{try{let a=s(e,e.state,e.context);if(!e.node?.classList)return;typeof a=="string"?e.node.classList.add(a):a?e.node.classList.add(o):e.node.classList.remove(o)}catch{}},{depth:r.path.length});r.__effects.push(i)}if(typeof t.if=="function"){let o=t.if,s=we(()=>{let i;try{i=o(e,e.state,e.context)}catch(l){if(i=!1,r.__ifError=l,typeof console<"u"&&console.warn){let c=e.key||e.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,l?.message||l)}return}let a=r.__if;if(r.__if=!!i,a&&!r.__if&&e.node)e.node.remove();else if(!a&&r.__if)if(r.__ifInitialized){e.node||(e.node=vn(e));let l=e.parent,c=l?.node;if(c&&e.node){let u=null,d=Object.keys(l),f=d.indexOf(e.key);for(let p=f+1;p<d.length;p++){let h=l[d[p]];if(h?.node?.parentNode===c){u=h.node;break}}u?c.insertBefore(e.node,u):c.appendChild(e.node)}else xm(e,e.parent);mm(e)}else{if(r.__ifInitialized=!0,e.tag||(e.tag=xn(e)),Dr("Init",e,{}),e.node||(e.node=vn(e)),!e.node)return;Dr("AttachNode",e,{}),e.node.setAttribute&&e.key&&e.node.setAttribute("data-key",e.key),e.id&&e.node.setAttribute&&(e.node.id=e.id);let l=t.if;delete t.if;try{gm(e,t)}finally{t.if=l}mm(e),pS(e),gS(e,{}),mS(e,{}),xm(e,e.parent)}},{depth:r.path.length});r.__effects.push(s)}for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||Ze.has(o)||typeof e[o]!="function")continue;let s=o.charCodeAt(0);if(s>=65&&s<=90||co(o))continue;let i=e[o];r.__exec[o]=i;let a=e.tag||"div";if(jr(a,o)&&!Ae[o]&&!(Le&&Le.has(o))){let l=o,c=we(()=>{try{let u=i(e,e.state,e.context);e.node?.setAttribute&&(u==null||u===!1?e.node.removeAttribute(l):typeof u!="function"&&typeof u!="object"&&(l==="src"&&"src"in e.node?e.node.src=u:e.node.setAttribute(l,u===!0?"":u)))}catch{}},{depth:r.path.length});r.__effects.push(c)}}MI(e),NI(e)}function mm(e){let{node:t}=e;if(t){if(typeof e.text=="string"&&!e.text.includes("{{")?e.tag==="string"?t.nodeValue=e.text:t.textContent=e.text:typeof e.text=="number"&&(t.textContent=e.text),BI(e),typeof e.html=="string"&&(t.innerHTML=e.html),e.value!=null&&typeof e.value!="function"&&"value"in t){let r=String(e.value);t.value!==r&&(t.value=r)}if(e.style&&typeof e.style=="object"&&lo(t,e.style),e.attr&&typeof e.attr=="object")for(let r in e.attr){let n=e.attr[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||t.setAttribute&&t.setAttribute(r,n===!0?"":n)}if(e.data&&typeof e.data=="object")for(let r in e.data){let n=e.data[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||t.dataset&&(t.dataset[r]=n===!0?"":n)}if(e.classlist||e.class){let r=e.classlist||e.class;if(typeof r=="string")r.split(" ").forEach(n=>n&&t.classList.add(n));else if(typeof r=="object")for(let n in r){let o=typeof r[n]=="function"?r[n](e,e.state,e.context):r[n];o&&t.classList.add(typeof o=="string"?o:n)}}}}function lo(e,t){if(!e||!t||!e.style)return;let r=null;for(let n in t){let o=t[n];if(o!=null){if(n.charAt(0)==="&"&&typeof o=="object"){r||(r={}),r[n]=o;continue}try{let s=String(o),i=n.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),a=s.trim(),l=/\s*!important\s*$/.test(a),c=a.replace(/\s*!important\s*$/,"");e.style.setProperty(i,c,l?"important":"")}catch{}}}r&&LI(e,r)}var DI=0;function LI(e,t){let r=`_ds${DI++}`;e.classList.add(r);let n=e.ownerDocument,o=n.querySelector("style[data-smbls-scoped]");o||(o=n.createElement("style"),o.setAttribute("data-smbls-scoped",""),n.head.appendChild(o));let s="";for(let i in t){let a="."+r,l=i.replace(/&/g,a).split(",").map(u=>{let d=u.trim();return d.includes(a)?d:a+d}).join(", "),c=t[i];if(typeof c=="object"){let u="",d="";for(let f in c){let p=c[f];if(typeof p=="object"){let h=f.includes("&")?l.split(", ").map(m=>f.replace(/&/g,m)).join(", "):l.split(", ").map(m=>`${m} ${f}`).join(", "),g="";for(let m in p)g+=`${m.replace(/[A-Z]/g,y=>"-"+y.toLowerCase())}: ${p[m]};`;d+=`${h} { ${g} }