smbls 3.14.599 → 3.14.600

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.600
4
+
5
+ ### Patch Changes
6
+
7
+ - Auto-generated cross-repo patch release.
8
+
3
9
  ## 3.14.599
4
10
 
5
11
  ### Patch Changes
package/dist/smbls.cjs CHANGED
@@ -36,7 +36,7 @@ FROM ${a}${l}`},rw=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;
36
36
  font-stretch: ${n.fontStretch};`:""}${n.fontDisplay?`
37
37
  font-display: ${n.fontDisplay};`:""}
38
38
  src: ${i};`},He=(t,e,r,n)=>`@font-face {${Zo(t,e,r,n)}
39
- }`,kr=(t,e,r)=>Object.keys(e).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l}=e[o],f=Array.isArray(s)?s.map(u=>Wt(u,r)||u):Wt(s,r)||s;return Zo(t,f,i,{fontStyle:a,fontDisplay:c,fontStretch:l})}),Lu=t=>Object.keys(t).map(r=>kr(r,t[r].value)),va=(t,e,r)=>{if(e&&e.isVariable){let s=Wt(e.url,r)||e.url;return Jr(s)?Zr(s):He(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap"})}if(e[0])return kr(t,e,r).map(ka);let o=Array.isArray(e.url)?e.url.map(s=>Wt(s,r)||s):Wt(e.url,r)||e.url;return He(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch})},Qo=(t,e)=>Object.keys(t).map(n=>va(n,t[n].value,e));O();O();O();var Qr={};I(Qr,{animation:()=>Qu,breakpoints:()=>Ju,class:()=>op,color:()=>Wu,devices:()=>Zu,document:()=>Xg,font:()=>Nu,fontFace:()=>Vu,fontFamily:()=>ju,fontFamilyTypes:()=>Bu,gradient:()=>Hu,grid:()=>np,icons:()=>Ku,media:()=>Uu,reset:()=>Jg,semanticIcons:()=>Yu,sequence:()=>Ee,shadow:()=>qu,sizes:()=>ip,spacing:()=>zu,svg:()=>tp,svgData:()=>ep,templates:()=>rp,theme:()=>Gu,timing:()=>Xu,typography:()=>ts,unit:()=>Mu,vars:()=>sp});var Ee={"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 Mu={default:"em"};var xw={browserDefault:16,base:16,type:"font-size",ratio:Ee["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},ts=xw;var Nu={};var ju={},Bu={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},Vu={};var Uu={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var _w={base:ts.base,type:"spacing",ratio:Ee.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},zu=_w;var Wu={},Hu={};var Gu={};var qu={};var Ku={},Yu={};var Sw={default:150,base:150,type:"timing",ratio:Ee["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Xu=Sw;var Xg={};var Ju={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Zu={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 Qu={};var tp={},ep={};var rp={};var ww={},np=ww;var op={};var Jg={},sp={},ip={};var Ea={},Ta={},Ca=Qr,Aa={},rs=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Ca){let e=t.toLowerCase();Aa[e]=Ca[t];let r=rs(e);r!==e&&(Aa[r]=Ca[t]),e!==t&&(Aa[t]=Ca[t])}var ns={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Ea,cssMediaVars:Ta,CSS_VARS:Ea,CSS_MEDIA_VARS:Ta,_scratchConfig:!0,...Aa},Zg=ot(ns),he={active:"0",0:ns},Qg=t=>(At(t)&&(he.active=t),he[t||he.active]),es=[],et=t=>{t&&t._scratchConfig&&es.push(t)},J=()=>{es.pop()},A=t=>es.length?es[es.length-1]:he[t||he.active]||ns,Oa=t=>{if(w(t))return he.active="1",he[1]=X(t,ot(Zg)),t},kw=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],vw=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],Cw=t=>{for(let e of vw){let r;for(let n of e){let o=t[n];w(o)&&(r=r?X(o,r):o)}if(r)for(let n of e)w(t[n])&&(t[n]=r)}},Ra=(t,e,{cleanBase:r=!1}={})=>{let n=r?null:A(),o=ot(!r&&n&&n._scratchConfig?n:Zg);for(let i of kw)delete o[i];let s=X(e||{},o);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,Cw(s),t&&(he[t]=s),s};var ge={"-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"},ap=(t,e)=>{let{key:r,variable:n,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:n},e.scales[r]=s;let c=tm.has(e.unit)?"rem":e.unit;e.vars[n]=s+c},Te=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},tm=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),os=(t,e)=>{let{base:r,type:n,unit:o}=e,s=tm.has(o)?"rem":o,i=(ur(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=ge[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=ge[t+1],u=Math.abs(t),p=Math.pow(em,2*u),d=ge[u];return d?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${d}) / ${p.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Pa=(t,e,r,n)=>{let{type:o}=n,i=t===2&&e.length===2?t+1:t,l=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},ss=(t,e)=>{let n=(t*e-t)/1.618,o=t*e-n,s=t+n,i=(o+s)/2;return[o,i,s]},is=(t,e)=>ss(t,e).map(r=>r/t),as=(t,e)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,p,d]=ss(o,s);l>16?f=[u,p,d]:f=[u,d],f.forEach((g,h)=>{let m=~~(g/n*1e3)/1e3,y=i+(h+1),b=a+(h+1)/10,x=Pa(h+1,f,i,e),_={key:r+(h+1),variable:y,value:g,scaling:m,scalingVariable:x,index:b};ap(_,e)})},em=1.618,Aw=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),o=e*Math.pow(r,t),s=e*Math.pow(r,n)/Math.pow(em,2*n);return Math.max(o,s)},Pt=t=>{let{type:e,base:r,ratio:n,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=o[1]-l,u=ge[f],p=Aw(f,r,n),d=~~(p/r*100)/100,g=c+u,h=os(f,t),m={key:u,variable:g,value:p,base:r,scaling:d,scalingVariable:h,ratio:n,index:f};ap(m,t),s&&as(m,t)}return t},cp=(t,e=0)=>{let{type:r,base:n,ratio:o,subSequence:s}=t,i=S(e)?e:ge[e],a=S(e)?Object.entries(ge).find(([,m])=>m===e)?.[0]:e;if(!i)return console.warn(`Position ${e} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...t},l=n*Math.pow(o,a),f=~~(l/n*100)/100,d="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,g=os(a,t),h={key:i,variable:d,value:l,base:n,scaling:f,scalingVariable:g,ratio:o,index:a};return ap(h,c),s&&as(h,c),c},cs=(t="A",e)=>{let r=A(),{unit:n}=r;if(S(t)&&at(t))return`var(${t})`;if(S(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(S(t)){let x=r.sizes;if(x){let _=x[t]||x[t.toLowerCase()];if(_!==void 0)return t.slice(0,1)==="-"?`calc(${_} * -1)`:_}}let{sequence:o,unit:s=n.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(Mn(t)||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let p=`--${e.varPrefix?e.varPrefix+"-":""}${Yo(e.type.replace(".","-"))}-`,d=t.toUpperCase(),g=d.slice(0,1)==="-"?"-":"",h=g?d.slice(1):d,m="";h.includes("_")&&(m="_"+h.split("_")[1].toLowerCase(),h=h.split("_")[0]);let y=x=>a.test(x)?`var(${p}${x}${m})`:x;if(h.includes("+")){let[x,_]=h.split("+"),C=`${y(x)} + ${y(_)}`;return g?`calc((${C}) * -1)`:`calc(${C})`}else if(h.includes("*")){let[x,_]=h.split("*"),C=`${y(x)} * ${y(_)}`;return g?`calc((${C}) * -1)`:`calc(${C})`}else if(h.includes("-")){let[x,_]=h.split("-"),C=`${y(x)} - ${y(_)}`;return g?`calc((${C}) * -1)`:`calc(${C})`}if(!o[h]&&h.length===2&&(r.verbose&&console.warn(h,"- value is not found because `subSequence` is set to false"),h=h.slice(0,1)),i||r.useVariable){let x=`var(${p}${h}${m})`;return g?`calc(${x} * -1)`:x}let b=o?o[h]:null;return b?s==="ms"||s==="s"?g+b.val+s:g+b.scaling+s:console.warn("can't find",o,h)},Ia=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let n=/(\s+-\s+|\s*[+*/,]\s*)/;return t.split(n).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:cs(i,e)}).join("")},me=(t,e,r,n)=>{if(typeof t!="string")return A().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=Te(t);n=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Ia(t,r):t=cs(t,r),{[e]:n?`${n}(${t})`:t}},$a=(t,e)=>ge[t-e],ls=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((n,o)=>{let s=$a(e,o);return r[s]})};O();var lp=(t,e)=>{let r=A(),{cssVars:n}=r;j(t.value)||(n[t.var]=t.value)},fs=(t,e,r)=>{let n=A(),{unit:o}=n,s=e.unit||o.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[p,d,g]=is(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${p/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${g/a})`},rm=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Oe=(t,e={})=>{let r=A(),{unit:n,timing:o,cssVars:s}=r,i=t.unit||n.default,a=rm.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||fs(s,t,e);for(let u in l){let p=l[u],d=(t.type===o.type?l[u].val:f[u])+a;if(!c){s[p.variable+"_default"]=d,s[p.variable]=p.scalingVariable;continue}e.useDefault===!1?s[p.variable]=d:(s[p.variable+"_default"]=d,s[p.variable]=`var(${p.variable+"_default"})`)}},Ge=(t,e,r={})=>{let n=A(),{unit:o,media:s,cssVars:i}=n,a=e.slice(1),c=t[e],l=c.unit||t.unit||o.default,f=rm.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:p,scales:d}=c,g=s[a];if(!g&&n.verbose&&console.warn("Can't find media query ",g),!u){let h=i[`@media ${g}`];h||(h=i[`@media ${g}`]={}),fs(h,c,r);let m=t.unit||o.default;if(f!==m&&p)for(let y in p){let b=p[y],x=d[y]+f;h[b.variable+"_default"]=x,h[b.variable]=x}return}for(let h in p){let m=p[h],y=(ur(f)?d[h]:p[h].val)+f;!g&&n.verbose&&console.warn("Can't find query ",g);let b=i[`@media ${g}`];b||(b=i[`@media ${g}`]={}),b[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=y}};O();var om=yr(),tn=t=>{let e=A(),r="";for(let n in t)e.__svgCache[n]||(e.__svgCache[n]=!0,r+=t[n]);return r},Ew=t=>{let e=t&&(t.default||t);if(!S(e))return om&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.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,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},Tw=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(o,s)=>(r.push(s),o)),!r.length)return t;let n=t;for(let o of r){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${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},nm=new Set,us=(t,e)=>{let r=e&&e.default?e.default:e;if(!S(r))return om&&!nm.has(t)&&(nm.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let n=Ew(e),{width:o,height:s}=n,i=n.viewBox||`0 0 ${o||24} ${s||24}`,l=Tw(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${i}"`);return l=l.replace(/width="[^"]*"/,""),l=l.replace(/height="[^"]*"/,""),l=l.replace("</svg","</symbol"),l=Pw(l),l},Ow="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",Rw=new RegExp(`<(${Ow})\\b([^>]*?)\\s*/>`,"g"),Pw=t=>t.replace(Rw,"<$1$2></$1>");var nn={};I(nn,{appendSVGSprite:()=>As,appendSvgIconsSprite:()=>Ts,applyDocument:()=>Cs,applyHeadings:()=>La,applyReset:()=>Os,applySpacingSequence:()=>Ss,applyTimingSequence:()=>vs,applyTypographySequence:()=>bs,checkIfBoxSize:()=>_s,getColor:()=>rt,getFontFamily:()=>ys,getFontSizeByKey:()=>xs,getMediaColor:()=>mt,getMediaTheme:()=>Ht,getShadow:()=>ks,getSpacingBasedOnRatio:()=>ne,getSpacingByKey:()=>pt,getTheme:()=>ds,getTimingByKey:()=>Dt,getTimingFunction:()=>Gt,runThroughMedia:()=>Da,setColor:()=>Ke,setFont:()=>ms,setFontFamily:()=>en,setGradient:()=>Ye,setMediaTheme:()=>gs,setSVG:()=>rn,setShadow:()=>Xe,setSvgIcon:()=>Es,setTheme:()=>hs,splitSpacedValue:()=>ws});O();var rt=(t,e,r)=>{let n=r||A();if(!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(at(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(T(t))[o,s,i]=t;else{let u=Ce(t);if(!u){let{color:p,gradient:d}=n,g=d[t]||p[t];return g?(e&&g[e]&&(g=g[e]),n.useVariable?`var(${g.var})`:g.value):t}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=n,l=a[o]||c[o];if(!l)return n.verbose&&console.warn("Can't find color ",o),t;e&&(l[e]?l=l[e]:n.verbose&&console.warn(t," - does not have ",e));let f=l.rgb;if(!f){let u=n.useVariable?`var(${l.var})`:l.value;if(s&&u){let p=Math.round(parseFloat(s)*100);return`color-mix(in srgb, ${u} ${p}%, transparent)`}return u}return i&&!l[i]&&(f=We(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, 1)`:n.useVariable?`var(${l.var})`:`rgb(${f})`},mt=(t,e,r)=>{let n=r||A();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(at(t))return`var(${t})`;let o,s,i;if(T(t))o=t[0];else{let u=Ce(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}else o=t}let{color:a,gradient:c}=n,l=a[o]||c[o],f=w(l);if(f&&l.value)return rt(t,`@${e}`,r);if(f){if(n.useVariable&&l.var)return s||i?rt(t,null,r):`var(${l.var})`;if(e)return rt(t,`@${e}`,r);{let u={};for(let p in l){if(p.charCodeAt(0)!==64)continue;let d=n.media[p.slice(1)];if(!d)continue;let g="@media "+(d==="print"?`${d}`:`screen and ${d}`);u[g]=rt(t,p,r)}return u}}else return n.verbose&&console.warn("Can't find color",t),t},Ke=(t,e,r)=>{let n=A();if(S(t)&&at(t)){let h=t.slice(2);if(t=rt(h),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=h.split(" "),y=n.color[m[0]];if(y&&!y.value&&!y.rgb&&(S(y)||T(y)||w(y))&&(n.color[m[0]]=Ke(y,m[0]),y=n.color[m[0]]),y&&y.value){let b=y.rgb,x=m[1]!==void 0?m[1]:"1",_=m[2];_&&(b=We(b,_)),t=`rgba(${b}, ${x})`}else{let b=m[2],x=m[1]!==void 0?m[1]:"1";if(b)try{let _=pe(m[0]);_&&_.length>=3?t=`rgba(${We(_.slice(0,3).join(", "),b)}, ${x})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(T(t)&&(t={"@light":t[0],"@dark":t[1]}),w(t)){let h={};for(let m in t)h[m]=Ke(t[m],e,m.slice(0,1)==="@"?m.slice(1):m);if(n.useVariable){let y=`--${n.varPrefix?n.varPrefix+"-":""}color-${e}`,b,x={};for(let _ in h){if(_.charCodeAt(0)!==64)continue;let C=_.slice(1),R=h[_],P=R&&(R.value||R);!P||typeof P!="string"||(x[C]=P,(C==="light"||b===void 0)&&(b=P))}if(b!==void 0){n.cssVars[y]=b,n.cssMediaVars||(n.cssMediaVars={});for(let _ in x){let C=`[data-theme="${_}"]`;if(n.cssMediaVars[C]||(n.cssMediaVars[C]={}),n.cssMediaVars[C][y]=x[_],_==="light"||_==="dark"){let R=`@media (prefers-color-scheme: ${_})`;n.cssMediaVars[R]||(n.cssMediaVars[R]={}),n.cssMediaVars[R][y]=x[_]}}h.var=y}}return h}let s=`--${n.varPrefix?n.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(S(i)&&i.includes(".")&&!i.includes("(")){let[h,m]=i.split("."),y=n.color[h];y&&y.rgb&&(i=`rgba(${y.rgb}, ${parseFloat("0."+m)||1})`)}if(S(i)&&!i.includes("(")&&!i.startsWith("#")){let h=Ce(i);if(h&&h.name&&!h.passthrough&&!h.cssVar){let m=n.color[h.name];m&&!m.value&&!m.rgb&&(S(m)||T(m)||w(m))&&(n.color[h.name]=Ke(m,h.name));let y=n.color[h.name];if(y&&y.rgb){let b=y.rgb;h.tone&&(b=We(b,h.tone));let x=h.alpha?parseFloat(h.alpha):1;i=`rgba(${b}, ${x})`}}}let a=pe(i),[c,l,f,u=1]=a,p=parseFloat(u.toFixed(2)),d=`${c}, ${l}, ${f}`,g=`rgba(${d}, ${p})`;return n.useVariable&&(n.cssVars[s]=g),{var:s,rgb:d,alpha:p,value:g}},Ye=(t,e,r)=>{let n=A();if(S(t)&&at(t)&&(t=rt(t.slice(2))),T(t))return{"@light":Ye(t[0],e,"light"),"@dark":Ye(t[0],e,"dark")};if(w(t)){let i={};for(let a in t)i[a]=Ye(t[a],e,a.slice(0,1)==="@"?a.slice(1):a);return i}let s=`--${n.varPrefix?n.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[s]=t.value||t),{var:s,value:t.value||t}};O();var Iw=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"]),sm=["color","Color","background","Background","fill","Fill","stroke","Stroke"],$w=t=>{for(let e=0;e<sm.length;e++)if(t.includes(sm[e]))return!0;return!1},Fa=t=>{let e={},{state:r,media:n,helpers:o,...s}=t;return Object.keys(s).map(a=>{let l=["color","Color","background","border"].some(f=>a.includes(f));return e[a]=l?rt(t[a]):t[a]}),e},ps=t=>(t.value||(t.value=Fa(t)),t.value),ds=(t,e)=>{let r=A();if(r.useVariable)return Ht(t,e);let n=r.theme;if(S(t)){let[o,s]=t.split(" "),i=n[o];if(i){if(!s&&!e)return ps(i);t=[o,s||e]}}if(j(t)&&t[1]){let o=t[0],s=t[1],{helpers:i,media:a,state:c}=n[o];if(a&&a[s])return ps(a[s]);if(i&&i[s])return ps(i[s]);if(c&&c[s])return ps(c[s])}else if(w(t))return Fa(t)},Fw=(t,e,r)=>{if(w(e))t.variants.inverse.value=Fa(e);else if(e===!0){let{color:n,background:o}=r;t.variants.inverse={value:{color:o,background:n}}}},Dw=(t,e,r,n)=>{let o=ds(r);n[`&:${e}`]=o,w(r)&&!r.value&&(r.value=o)},Lw=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(o=>{let s=r[o];return Dw(t,o,s,e),t}),t):void 0},Mw=(t,e,r,n)=>{let o=ds(r);n[`@media (prefers-color-scheme: ${e})`]=o,w(r)&&!r.value&&(r.value=o)},Nw=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(o=>{let s=r[o];return(o==="dark"||o==="light")&&Mw(t,o,s,e),o==="inverse"&&Fw(t,s,e),t}),t):void 0},jw=(t,e)=>{let r=A(),{helpers:n}=t;return n?(Object.keys(n).map(s=>{let i=n[s];return S(i)?n[s]=r.theme[i]:ps(n[s]),t}),t):void 0},hs=(t,e)=>{let r=A();if(r.useVariable)return gs(t,e);let{state:n,media:o,helpers:s}=t,i=Fa(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return Lw(t,i),Nw(t,i),jw(t,i),{var:c,value:i,state:n,media:o,helpers:s}};var fp=(t,e,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 l in t)if(t[l])for(let f of Object.keys(t[l]))a.add(f);let c=new Set;for(let l of a){let f=l.slice(0,1);if(!(f==="@"||f==="."||f===":")&&$w(l))for(let u in t){if(c.has(u))continue;let p=t[u]?.[l];if(p===void 0)continue;let d=rt(p,`@${u}`);d!==void 0&&S(d)&&/^[a-z][a-zA-Z]+$/.test(d)&&!Iw.has(d)&&c.add(u)}}for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(p=>j(p?.[l]));if(f==="."&&u){let p=l.slice(1),d={};for(let g in t)j(t[g]?.[l])&&(d[g]=t[g][l]);i[l]=fp(d,`${e}-${p}`,r)}else if(f===":"&&u){let p=l.replace(/^:+/,""),d={};for(let g in t)j(t[g]?.[l])&&(d[g]=t[g][l]);i[l]=fp(d,`${e}-${p}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let d=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${l}`,g=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,h;for(let m in t){if(c.has(m))continue;let y=t[m]?.[l];if(y===void 0)continue;let b=rt(y,`@${m}`);if(b===void 0)continue;(g&&m===g||!g&&(m==="light"||h===void 0))&&(h=b);let x=`[data-theme="${m}"]`;if(o[x]||(o[x]={}),o[x][d]=b,m==="dark"||m==="light"){let _=`@media (prefers-color-scheme: ${m})`;o[_]||(o[_]={}),o[_][d]=b}}h!==void 0&&(n[d]=h),i[l]=`var(${d})`,i[`.${l}`]={[l]:i[l]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},gs=(t,e,r,n)=>{let o=A(),{cssVars:s}=o,i={value:t},a=!r&&!n;if(j(t)){if(a&&o.useVariable){let c={};for(let l in t)l.startsWith("@")&&j(t[l])&&(c[l.slice(1)]=t[l]);if(Object.keys(c).length){let l=fp(c,e,o);Object.assign(i,l)}}for(let c in t){let l=c.slice(0,1),f=t[c];if(l==="@"||l===":"||l==="."){let u=l==="@"&&c;i[c]=gs(f,e,c,n||u)}else if(!a){let u=rt(f,n),p=[...new Set([n,r].filter(m=>m).map(m=>m.slice(1)))],d=p.length?"-"+p.join("-"):"",h=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${d}-${c}`;o.useVariable?(o.useThemeSuffixedVars&&(s[h]=u),i[c]=`var(${h})`):i[c]=u,i[`.${c}`]={[c]:i[c]}}}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(S(t)&&at(t)){let l=o.theme[t.slice(2)];return Ht(l,n)}return i},up=t=>{let e=A(),r={};for(let n in t){let o=n.slice(0,1);if(j(t[n])){if(o==="@")continue;o===":"?r[`&${n}`]=up(t[n]):o==="."&&(r[`&${n}`]=up(t[n]))}else r[n]=t[n]}return r},am=(t,e)=>{let r=e.shift();return t[r]?am(t[r],e):t},im=(t,e)=>T(e)?am(t,e):S(e)&&t[e]?t[e]:t;var Ht=(t,e)=>{let r=A();if(S(t)&&at(t)&&(t=Ht(t.slice(2))),!t||!S(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...o]=T(t)?t:t.split(" "),s=r.theme[n];return s&&o.length?s=im(s,o):s&&e&&(s=im(s,e)),up(s)};O();O();var ms=(t,e)=>{let r=A(),n=`--font-${e}`;if(!t||T(t)&&!t[0])return;let o;if(t.isVariable){let s=Wt(t.url,r.files)||t.url;Jr(s)?o=Zr(s):o=He(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap"})}else if(t[0])o=kr(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>Wt(i,r.files)||i):Wt(t.url,r.files)||t.url;o=He(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch})}return{var:n,value:t,fontFace:o}},ys=(t,e)=>{let r=A(),{fontFamily:n}=r;return wr(e||n,t)},en=(t,e)=>{let r=A(),{fontFamily:n,fontFamilyTypes:o}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!n.default)&&(n.default=e),w(s)&&(s=Sr(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${o[i]}`;return{var:a,value:c,arr:s,type:i}};O();var Da=t=>{let e=A(),{typography:r,media:n}=e;for(let o in t){let s=o.slice(0,1)==="@",i=t[o];if(!s)continue;let{mediaRegenerate:a}=t,c=o.slice(1),{type:l,base:f,ratio:u,range:p,subSequence:d,h1Matches:g,unit:h}=t;it(i,{type:l,base:f,ratio:u,range:p,subSequence:d,h1Matches:g,unit:h});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),y=i.unit||h,b=!i.unit&&m.has(h)?"rem":y,x=n[c],_="@media "+(x==="print"?`${x}`:`screen and ${x}`);if(r.templates[_]={fontSize:i.base/r.browserDefault+b},!a){it(i,{sequence:{},scales:{},vars:{}}),Pt(i),Ge(t,o);continue}it(i,{sequence:{},scales:{},templates:{},vars:{}}),Pt(i),Ge(t,o)}},La=t=>{let e=A();if(t.h1Matches){let r=t.unit,n=ls(t),{templates:o}=t;for(let s in n){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:e.useVariable?`var(${n[s]?.variable})`:`${n[s]?.scaling}${r}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},bs=()=>{let t=A(),{typography:e}=t;Pt(e),La(e),Oe(e),Da(e)},xs=t=>{let e=A(),{typography:r}=e;return me(t,"fontSize",r)};O();O();var Bw=t=>{let r=A().spacing||{},n=parseFloat(t.spacingRatio),o={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return Pt(o),o},Vw=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;it(r,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Pt(r),Ge(t,e)}},_s=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n},Ss=()=>{let t=A(),{spacing:e}=t;Pt(e),Oe(e),Vw(e)},Uw=t=>{let e=A(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Pt(t)},pt=(t,e="padding",r,n)=>{let o=Uw(r);if(S(t)){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!n&&t.includes("(")){let i=Te(t);n=i[0],t=i[1]}}let s=n?[t]:Sr(t);if(T(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},c=(l,f)=>me(s[f],e+l+i,o,n);return a[s.length].map((l,f)=>c(l,f))}return me(t,e,o,n)}},ne=(t,e,r,n)=>{let o=A(),{spacing:s}=o,i=r||t[e];if(S(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!n&&S(i)&&i.includes("(")){let a=Te(i);n=a[0],i=a[1]}if(t.spacingRatio){let a=Bw(t);return pt(i,e,a,n)}return pt(i,e,s,n)},ws=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),o=Ir.some(i=>t.includes(i));return n||o?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};O();var Xe=(t,e,r,n)=>{let o=A();if(T(t))return{"@light":Xe(t[0],e,"light"),"@dark":Xe(t[1],e,"dark")};if(w(t)){let a={};for(let c in t)a[c]=Xe(t[c],e,c.startsWith("@")?c.slice(1):c);return a}S(t)&&!re.test(t)&&(t=Ae(t).map(a=>(a=a.trim(),a.split(/\s+/).map(c=>{if(c=c.trim(),!c)return"";if(c.startsWith("--"))return`var(${c})`;let l=rt(c);if(de(l))return l;if(/^\d/.test(c)||c==="0"||c.includes("px")||c.slice(-2)==="em"||c==="inset"||c==="none")return c;let f=pt(c,"shadow");return f&&f.shadow?f.shadow:c}).join(" "))).join(", "));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},ks=(t,e)=>{let r=A();if(e||(e=r.globalTheme),!S(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(at(t))return`var(${t})`;let[n]=T(t)?t:t.split(" "),s=r.shadow[n],i=w(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),t;if(e){if(s[e])return s[e].value;r.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={};for(let c in s){let l=r.media[c.slice(1)],f="@media "+(l==="print"?`${l}`:`screen and ${l}`);a[f]=s.value}return a}return r.verbose&&console.warn("Can't find color",t),t};O();var vs=()=>{let t=A(),{timing:e}=t;Pt(e),Oe(e)},Gt=t=>{let e=A(),{timing:r}=e;return r[t]||r[Ko(t)]||t},Dt=(t,e="timing")=>{let r=A(),{timing:n}=r;return me(t,e,n)};O();var Cs=()=>{let t=A(),{document:e,fontFamily:r,theme:n,typography:o}=t;return it(e,{theme:n.document,fontFamily:wr(r),fontSize:o.base,lineHeight:o.lineHeight})};O();var dp={document:K},rn=(t,e)=>{let r=A();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?us(e,t):t},As=(t,e=dp)=>{let r=A(),n=Object.keys(t).length?{}:r.svg;for(let o in t)n[o]=t[o];lm(n,e)},Es=(t,e)=>{let r=A();return r.useIconSprite&&!r.semanticIcons?.[e]?rn(t,e):t},Ts=(t,e=dp)=>{let r=A(),n=Object.keys(t).length?{}:r.icons;for(let o in t)n[o]=t[o];lm(n,e)},pp=(t,e={isRoot:!0})=>{if(!t||!t.createElementNS)return;let r=t.createElementNS("http://www.w3.org/2000/svg","svg");return e.isRoot&&(r.setAttribute("aria-hidden","true"),r.setAttribute("width","0"),r.setAttribute("height","0"),r.setAttribute("style","position:absolute"),r.setAttribute("id","svgSprite")),r},zw=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let n=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(n,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},cm=(t,e,r)=>{for(;e.firstChild;){let n=e.firstChild;r.appendChild(t.importNode(n,!0)),n.remove()}},lm=(t,e=dp)=>{let r=A(),n=e.document||K;if(!n||!n.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),tn(t);let o=n.querySelector("#svgSprite"),s=tn(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=zw(n,s);if(o)if(a)cm(n,a,o);else if(n.body.insertAdjacentHTML)o.insertAdjacentHTML("beforeend",s);else{let c=pp(n,{isRoot:!1});c.innerHTML=s,o.append(...c.children)}else if(a){let c=pp(n);c&&c.nodeType&&(cm(n,a,c),n.body.prepend(c))}else if(n.body.insertAdjacentHTML)n.body.insertAdjacentHTML("afterbegin",i);else{let c=pp(n);c&&c.nodeType&&(c.innerHTML=s,n.body.prepend(c))}};O();var Os=(t={})=>{let e=A(),{reset:r,typography:n,document:o}=e;if(r){if(r[":root"]){let c=r,l=n.templates;c.body={...e.useDocumentTheme?Ht("document"):{},...l.body},c.h1=l.h1,c.h2=l.h2,c.h3=l.h3,c.h4=l.h4,c.h5=l.h5,c.h6=l.h6}let{body:s,...i}=n.templates,a=e.useDocumentTheme?Ht("document"):{};if(r.html&&Tt(r.html,a),n.unit){let{media:c}=e;for(let l in n){if(l.charAt(0)!=="@")continue;let f=n[l];if(!f||f.unit===n.unit||!f.unit)continue;let u=f.unit,p=f.base||n.base,d=f.browserDefault||n.browserDefault,g=l.slice(1),h=c[g];if(!h)continue;let m="@media "+(h==="print"?h:"screen and "+h);r[m]||(r[m]={}),r[m].html||(r[m].html={}),r[m].html.fontSize=p/d+u}}return X(it(r,t),{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.unit?"1"+e.unit.default:n.base/n.browserDefault+e.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}})}};O();var Ww=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),Hw=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),Gw=t=>Ww.has(t),ye=t=>{let e=t+"";if(re.test(e))return e;let r=e.trim();return r==="none"||r==="0"||r==="initial"||r==="inherit"||r==="unset"?e:e.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(at(o))return`var(${o})`;if(Gw(o)||/^\d/.test(o)||o==="0")return o;let s=rt(o);if(de(s))return s;let i=pt(o,"border");return i&&i.border?i.border:o}).join(" ")},Ma=t=>re.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(at(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=rt(e);return de(r)?r:e}).join(" "),Na=(t,e)=>ks(t,e),Rs=(t,e)=>re.test(t)?t:Ae(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(at(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=rt(n);if(de(o)){let i=mt(n,e);return w(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=pt(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", "),Ps=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),o=t.slice(r+1,t.lastIndexOf(")")),s=")",a=Ae(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||Hw.has(f)||f==="transparent"||re.test(f))return f;let u=rt(f);return de(u)?u:f}).join(" ")));return n+a.join(", ")+s},ja=(t,e)=>{let r=A();return Ae(t).map(n=>{let o=n.trim();return at(o)?`var(${o})`:/^var\(/.test(o)||o.includes("url")?o:o.includes("gradient")?Ps(o,e):r.gradient[t]?{backgroundImage:mt(t,e||r.globalTheme)}:o.includes("/")||o.startsWith("http")||o.includes(".")&&!Ce(o)?`url(${o})`:o}).join(", ")},Ba=t=>S(t)&&t.split(" ").map(e=>pt(e,"gap").gap).join(" "),hp=t=>{let e=t.split(" ");return e.length?e.map(r=>at(r)?`var(${r})`:r.length<3||r.includes("ms")?Dt(r).timing||r:Gt(r)?Gt(r):r).join(" "):t},Is=(t,e,r)=>{if(S(t))return t.split(",").map(n=>Dt(n).timing||n).join(",")},Va=t=>{let e=t.split(",");if(e.length)return e.map(hp).join(",")};function ct(t,e,r={},n={}){let o=tt.call(this,e||r[t]);if(o==null)return;let s;if(S(o)){if(o.includes("(")){let c=Te(o);s=c[0],o=c[1]}let i=r.scaleBoxSize,a=_s(t);!i&&a&&!n.ratio&&(o=ws(o))}return n.ratio?ne(r,t,o,s):pt(o,t,void 0,s)}var N=(t,e=null,r)=>ct(t,e,r,{ratio:!0}),$s=(t,e,r)=>{if(S(t))return{borderRadius:t.split(" ").map((n,o)=>ne(e,r,n)[r]).join(" ")}};O();var qw=(t,e)=>{let r=A(),{cssVars:n}=r,o=e.startsWith("--")?e:`--${e}`;return n[o]=t,t},Lt=t=>t,Ua={color:Ke,gradient:Ye,font:ms,fontFamily:en,fontfamily:en,theme:hs,icons:Es,semanticIcons:Lt,semanticicons:Lt,svg:rn,svgData:Lt,typography:Lt,shadow:Xe,spacing:Lt,media:Lt,grid:Lt,class:Lt,timing:Lt,reset:Lt,unit:Lt,animation:Lt,vars:qw,sizes:Lt},gp=(t,e,r)=>{let n=A(),o=rs(t),s=o.toLowerCase(),i=n[o]||n[s]||n[t],a=Ua[o]||Ua[s];if(a)try{let c=a(e,r);return i&&(i[r]=c),i}catch(c){n.verbose&&console.warn("Error setting",s,"value",e,r,c)}n.verbose&&console.warn("Can not find",s,"method in scratch")},mp=(t,e)=>{let r=A(),n=t.toLowerCase();return Object.keys(e).sort((s,i)=>{let a=w(e[s])||T(e[s])?1:0,c=w(e[i])||T(e[i])?1:0;return a-c}).forEach(s=>{try{return gp(n,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",n,"value",e[s],s,i)}}),r[n]||r[t]},za=(t,e)=>{let r=e||A();r.globalTheme=t;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(t&&t!=="auto")a.setAttribute("data-theme",t),t==="dark"||t==="light"?a.style.colorScheme=t:a.style.colorScheme="light dark";else if(s&&s.matchMedia){let l=u=>{a.setAttribute("data-theme",u.matches?"dark":"light")},f=s.matchMedia("(prefers-color-scheme: dark)");if(l(f),a.style.colorScheme="light dark",!r.__prefersListener){r.__prefersListener=l;try{f.addEventListener("change",l)}catch{f.addListener(l)}}}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",c=o.styleSheets;for(let l=0;l<c.length;l++)try{let f=c[l].cssRules;for(let u=0;u<f.length;u++)if(f[u].selectorText===a){for(let p in r.cssVars)f[u].style.setProperty(p,r.cssVars[p]);return r}}catch{}}return r},Kw={},vr=(t,e=Kw)=>{let r=e.config||A(),{version:n,verbose:o,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:p,useDefaultConfig:d,semanticIcons:g,files:h,assets:m,...y}=t;e.newConfig&&(r=Oa(e.newConfig)),h!==void 0&&(r.files=h),m!==void 0&&(r.assets=m),o!==void 0&&(r.verbose=o),s!==void 0&&(r.useVariable=s),i!==void 0&&(r.useReset=i),c!==void 0&&(r.useFontImport=c),a!==void 0&&(r.useSvgSprite=a),l!==void 0&&(r.useIconSprite=l),p!==void 0&&(r.useDocumentTheme=p),f!==void 0&&(r.globalTheme=f),u!==void 0&&(r.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=t.useThemeSuffixedVars),d!==void 0&&(r.useDefaultConfig=d),g!==void 0&&(r.semanticIcons=g),r.verbose&&console.log(r);let x=(r.document&&r.document.documentElement?r.document:null)||(typeof document<"u"?document:null),_=x&&x.defaultView||(typeof window<"u"?window:null),C=x&&(r.themeRoot||x.documentElement);if(C&&typeof C.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")C.setAttribute("data-theme",r.globalTheme),r.globalTheme==="dark"||r.globalTheme==="light"?C.style.colorScheme=r.globalTheme:C.style.colorScheme="light dark";else if(_&&_.matchMedia){let $=G=>{C.setAttribute("data-theme",G.matches?"dark":"light")},U=_.matchMedia("(prefers-color-scheme: dark)");if($(U),C.style.colorScheme="light dark",!r.__prefersListener){r.__prefersListener=$;try{U.addEventListener("change",$)}catch{U.addListener($)}}}else C.setAttribute("data-theme","light"),C.style.colorScheme="light";r.__svgCache||(r.__svgCache={});let R=Object.keys(y),P=new Set(R);if(R.forEach(E=>{let $=E.toLowerCase();$!==E&&P.has($)&&X(y[$],y[E])}),R.map(E=>{let $=E.toLowerCase();if(!($!==E&&P.has($)))return mp(E,y[E])}),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{bs()}catch(E){r.verbose&&console.warn("Error applying typography sequence",E)}if(y.spacing)try{Ss()}catch(E){r.verbose&&console.warn("Error applying spacing sequence",E)}if(y.timing)try{vs()}catch(E){r.verbose&&console.warn("Error applying timing sequence",E)}Cs();let V=Os();return V&&(r.reset=V),r};var Cr=new Map,dm=null,xp=null,Yw=null;function Fs(t){t.batchAtomicCss&&(xp=t.batchAtomicCss),t.compoundCssClass&&(Yw=t.compoundCssClass)}var Xw=new Set;function _p(t){try{let e=A();e&&(e.document=t)}catch{}t&&Xw.add(t)}function Ha(){try{let t=A();if(t?.document)return t.document}catch{}return typeof document<"u"?document:null}var Jw={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 Ar(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Wa(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e.toString(36)}function Zw(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Wa(e)}function fm(t,e,r){let n=(r?r+"":"")+t+":"+e,o=Cr.get(n),s=o?null:Ar(t);if(!o){let a=Jw[t]||Wa(t),c=Zw(e);o=r?`_${r}_${a}-${c}`:`_${a}-${c}`,Cr.set(n,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=`.${o}{${s||Ar(t)}:${e}}`;return qt(i),o}var um=new WeakMap;function qt(t,e){let r=hm(e);if(!r)return;let n=um.get(r);if(n||(n=new Set,um.set(r,n)),!n.has(t)){n.add(t);try{r.insertRule(t,r.cssRules.length)}catch{}}}var pm=new WeakMap;function hm(t){let e=t||Ha();if(!e||!e.head)return null;let r=pm.get(e);if(r&&r.ownerNode&&r.ownerNode.parentNode===e.head)return r;let n=e.head.querySelector("style[data-smbls]");n||(n=e.createElement("style"),n.setAttribute("data-smbls",""),e.head.appendChild(n));let o=n.sheet;return pm.set(e,o),dm=o,o}var Qw=8;function oe(t,e,r){if(!t||typeof t!="object")return"";let n=null,o=0,s=[],i=[];for(let c in t){let l=t[c];l==null||l===!1||l===""||(typeof l=="object"?i.push([c,l]):xp?(n||(n=[]),n.push(c,String(l)),o++):s.push(fm(c,String(l),r)))}if(n&&o>=Qw){let c=n.join("\0"),l=xp(c),f=l.indexOf("\0"),u=l.substring(0,f),p=l.substring(f+1);if(p){let d=p.split(`
39
+ }`,kr=(t,e,r)=>Object.keys(e).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l}=e[o],f=Array.isArray(s)?s.map(u=>Wt(u,r)||u):Wt(s,r)||s;return Zo(t,f,i,{fontStyle:a,fontDisplay:c,fontStretch:l})}),Lu=t=>Object.keys(t).map(r=>kr(r,t[r].value)),va=(t,e,r)=>{if(e&&e.isVariable){let s=Wt(e.url,r)||e.url;return Jr(s)?Zr(s):He(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap"})}if(e[0])return kr(t,e,r).map(ka);let o=Array.isArray(e.url)?e.url.map(s=>Wt(s,r)||s):Wt(e.url,r)||e.url;return He(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch})},Qo=(t,e)=>Object.keys(t).map(n=>va(n,t[n].value,e));O();O();O();var Qr={};I(Qr,{animation:()=>Qu,breakpoints:()=>Ju,class:()=>op,color:()=>Wu,devices:()=>Zu,document:()=>Xg,font:()=>Nu,fontFace:()=>Vu,fontFamily:()=>ju,fontFamilyTypes:()=>Bu,gradient:()=>Hu,grid:()=>np,icons:()=>Ku,media:()=>Uu,reset:()=>Jg,semanticIcons:()=>Yu,sequence:()=>Ee,shadow:()=>qu,sizes:()=>ip,spacing:()=>zu,svg:()=>tp,svgData:()=>ep,templates:()=>rp,theme:()=>Gu,timing:()=>Xu,typography:()=>ts,unit:()=>Mu,vars:()=>sp});var Ee={"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 Mu={default:"em"};var xw={browserDefault:16,base:16,type:"font-size",ratio:Ee["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},ts=xw;var Nu={};var ju={},Bu={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},Vu={};var Uu={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var _w={base:ts.base,type:"spacing",ratio:Ee.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},zu=_w;var Wu={},Hu={};var Gu={};var qu={};var Ku={},Yu={};var Sw={default:150,base:150,type:"timing",ratio:Ee["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Xu=Sw;var Xg={};var Ju={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Zu={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 Qu={};var tp={},ep={};var rp={};var ww={},np=ww;var op={};var Jg={},sp={},ip={};var Ea={},Ta={},Ca=Qr,Aa={},rs=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Ca){let e=t.toLowerCase();Aa[e]=Ca[t];let r=rs(e);r!==e&&(Aa[r]=Ca[t]),e!==t&&(Aa[t]=Ca[t])}var ns={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Ea,cssMediaVars:Ta,CSS_VARS:Ea,CSS_MEDIA_VARS:Ta,_scratchConfig:!0,...Aa},Zg=ot(ns),he={active:"0",0:ns},Qg=t=>(At(t)&&(he.active=t),he[t||he.active]),es=[],et=t=>{t&&t._scratchConfig&&es.push(t)},J=()=>{es.pop()},A=t=>es.length?es[es.length-1]:he[t||he.active]||ns,Oa=t=>{if(w(t))return he.active="1",he[1]=X(t,ot(Zg)),t},kw=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],vw=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData"]],Cw=t=>{for(let e of vw){let r;for(let n of e){let o=t[n];w(o)&&(r=r?X(o,r):o)}if(r)for(let n of e)w(t[n])&&(t[n]=r)}},Ra=(t,e,{cleanBase:r=!1}={})=>{let n=r?null:A(),o=ot(!r&&n&&n._scratchConfig?n:Zg);for(let i of kw)delete o[i];let s=X(e||{},o);return s.cssVars={},s.cssMediaVars={},s.CSS_VARS=s.cssVars,s.CSS_MEDIA_VARS=s.cssMediaVars,s._scratchConfig=!0,Cw(s),t&&(he[t]=s),s};var ge={"-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"},ap=(t,e)=>{let{key:r,variable:n,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:n},e.scales[r]=s;let c=tm.has(e.unit)?"rem":e.unit;e.vars[n]=s+c},Te=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},tm=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),os=(t,e)=>{let{base:r,type:n,unit:o}=e,s=tm.has(o)?"rem":o,i=(ur(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=ge[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=ge[t+1],u=Math.abs(t),p=Math.pow(em,2*u),d=ge[u];return d?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${d}) / ${p.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Pa=(t,e,r,n)=>{let{type:o}=n,i=t===2&&e.length===2?t+1:t,l=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},ss=(t,e)=>{let n=(t*e-t)/1.618,o=t*e-n,s=t+n,i=(o+s)/2;return[o,i,s]},is=(t,e)=>ss(t,e).map(r=>r/t),as=(t,e)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,p,d]=ss(o,s);l>16?f=[u,p,d]:f=[u,d],f.forEach((g,h)=>{let m=~~(g/n*1e3)/1e3,y=i+(h+1),b=a+(h+1)/10,x=Pa(h+1,f,i,e),_={key:r+(h+1),variable:y,value:g,scaling:m,scalingVariable:x,index:b};ap(_,e)})},em=1.618,Aw=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),o=e*Math.pow(r,t),s=e*Math.pow(r,n)/Math.pow(em,2*n);return Math.max(o,s)},Pt=t=>{let{type:e,base:r,ratio:n,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=o[1]-l,u=ge[f],p=Aw(f,r,n),d=~~(p/r*100)/100,g=c+u,h=os(f,t),m={key:u,variable:g,value:p,base:r,scaling:d,scalingVariable:h,ratio:n,index:f};ap(m,t),s&&as(m,t)}return t},cp=(t,e=0)=>{let{type:r,base:n,ratio:o,subSequence:s}=t,i=S(e)?e:ge[e],a=S(e)?Object.entries(ge).find(([,m])=>m===e)?.[0]:e;if(!i)return console.warn(`Position ${e} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...t},l=n*Math.pow(o,a),f=~~(l/n*100)/100,d="--"+(t.varPrefix?t.varPrefix+"-":"")+(r&&r.replace(".","-"))+"-"+i,g=os(a,t),h={key:i,variable:d,value:l,base:n,scaling:f,scalingVariable:g,ratio:o,index:a};return ap(h,c),s&&as(h,c),c},cs=(t="A",e)=>{let r=A(),{unit:n}=r;if(S(t)&&at(t))return`var(${t})`;if(S(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(S(t)){let x=r.sizes;if(x){let _=x[t]||x[t.toLowerCase()];if(_!==void 0)return t.slice(0,1)==="-"?`calc(${_} * -1)`:_}}let{sequence:o,unit:s=n.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(Mn(t)||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let p=`--${e.varPrefix?e.varPrefix+"-":""}${Yo(e.type.replace(".","-"))}-`,d=t.toUpperCase(),g=d.slice(0,1)==="-"?"-":"",h=g?d.slice(1):d,m="";h.includes("_")&&(m="_"+h.split("_")[1].toLowerCase(),h=h.split("_")[0]);let y=x=>a.test(x)?`var(${p}${x}${m})`:x;if(h.includes("+")){let[x,_]=h.split("+"),C=`${y(x)} + ${y(_)}`;return g?`calc((${C}) * -1)`:`calc(${C})`}else if(h.includes("*")){let[x,_]=h.split("*"),C=`${y(x)} * ${y(_)}`;return g?`calc((${C}) * -1)`:`calc(${C})`}else if(h.includes("-")){let[x,_]=h.split("-"),C=`${y(x)} - ${y(_)}`;return g?`calc((${C}) * -1)`:`calc(${C})`}if(!o[h]&&h.length===2&&(r.verbose&&console.warn(h,"- value is not found because `subSequence` is set to false"),h=h.slice(0,1)),i||r.useVariable){let x=`var(${p}${h}${m})`;return g?`calc(${x} * -1)`:x}let b=o?o[h]:null;return b?s==="ms"||s==="s"?g+b.val+s:g+b.scaling+s:console.warn("can't find",o,h)},Ia=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let n=/(\s+-\s+|\s*[+*/,]\s*)/;return t.split(n).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:cs(i,e)}).join("")},me=(t,e,r,n)=>{if(typeof t!="string")return A().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let s=Te(t);n=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Ia(t,r):t=cs(t,r),{[e]:n?`${n}(${t})`:t}},$a=(t,e)=>ge[t-e],ls=t=>{let{h1Matches:e,sequence:r}=t;return new Array(6).fill(null).map((n,o)=>{let s=$a(e,o);return r[s]})};O();var lp=(t,e)=>{let r=A(),{cssVars:n}=r;j(t.value)||(n[t.var]=t.value)},fs=(t,e,r)=>{let n=A(),{unit:o}=n,s=e.unit||o.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[p,d,g]=is(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${p/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${g/a})`},rm=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Oe=(t,e={})=>{let r=A(),{unit:n,timing:o,cssVars:s}=r,i=t.unit||n.default,a=rm.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||fs(s,t,e);for(let u in l){let p=l[u],d=(t.type===o.type?l[u].val:f[u])+a;if(!c){s[p.variable+"_default"]=d,s[p.variable]=p.scalingVariable;continue}e.useDefault===!1?s[p.variable]=d:(s[p.variable+"_default"]=d,s[p.variable]=`var(${p.variable+"_default"})`)}},Ge=(t,e,r={})=>{let n=A(),{unit:o,media:s,cssVars:i}=n,a=e.slice(1),c=t[e],l=c.unit||t.unit||o.default,f=rm.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:p,scales:d}=c,g=s[a];if(!g&&n.verbose&&console.warn("Can't find media query ",g),!u){let h=i[`@media ${g}`];h||(h=i[`@media ${g}`]={}),fs(h,c,r);let m=t.unit||o.default;if(f!==m&&p)for(let y in p){let b=p[y],x=d[y]+f;h[b.variable+"_default"]=x,h[b.variable]=x}return}for(let h in p){let m=p[h],y=(ur(f)?d[h]:p[h].val)+f;!g&&n.verbose&&console.warn("Can't find query ",g);let b=i[`@media ${g}`];b||(b=i[`@media ${g}`]={}),b[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=y}};O();var om=yr(),tn=t=>{let e=A(),r="";for(let n in t)e.__svgCache[n]||(e.__svgCache[n]=!0,r+=t[n]);return r},Ew=t=>{let e=t&&(t.default||t);if(!S(e))return om&&console.warn("parseRootAttributes:",e,"is not a string"),{};let r=e.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,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},Tw=(t,e)=>{let r=[];if(t.replace(/id="([^"]*)"/g,(o,s)=>(r.push(s),o)),!r.length)return t;let n=t;for(let o of r){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${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},nm=new Set,us=(t,e)=>{let r=e&&e.default?e.default:e;if(!S(r))return om&&!nm.has(t)&&(nm.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=r;let n=Ew(e),{width:o,height:s}=n,i=n.viewBox||`0 0 ${o||24} ${s||24}`,l=Tw(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${i}"`);return l=l.replace(/width="[^"]*"/,""),l=l.replace(/height="[^"]*"/,""),l=l.replace("</svg","</symbol"),l=Pw(l),l},Ow="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",Rw=new RegExp(`<(${Ow})\\b([^>]*?)\\s*/>`,"g"),Pw=t=>t.replace(Rw,"<$1$2></$1>");var nn={};I(nn,{appendSVGSprite:()=>As,appendSvgIconsSprite:()=>Ts,applyDocument:()=>Cs,applyHeadings:()=>La,applyReset:()=>Os,applySpacingSequence:()=>Ss,applyTimingSequence:()=>vs,applyTypographySequence:()=>bs,checkIfBoxSize:()=>_s,getColor:()=>rt,getFontFamily:()=>ys,getFontSizeByKey:()=>xs,getMediaColor:()=>mt,getMediaTheme:()=>Ht,getShadow:()=>ks,getSpacingBasedOnRatio:()=>ne,getSpacingByKey:()=>pt,getTheme:()=>ds,getTimingByKey:()=>Dt,getTimingFunction:()=>Gt,runThroughMedia:()=>Da,setColor:()=>Ke,setFont:()=>ms,setFontFamily:()=>en,setGradient:()=>Ye,setMediaTheme:()=>gs,setSVG:()=>rn,setShadow:()=>Xe,setSvgIcon:()=>Es,setTheme:()=>hs,splitSpacedValue:()=>ws});O();var rt=(t,e,r)=>{let n=r||A();if(!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(at(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(T(t))[o,s,i]=t;else{let u=Ce(t);if(!u){let{color:p,gradient:d}=n,g=d[t]||p[t];return g?(e&&g[e]&&(g=g[e]),n.useVariable?`var(${g.var})`:g.value):t}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=n,l=a[o]||c[o];if(!l)return n.verbose&&console.warn("Can't find color ",o),t;e&&(l[e]?l=l[e]:n.verbose&&console.warn(t," - does not have ",e));let f=l.rgb;if(!f){let u=n.useVariable?`var(${l.var})`:l.value;if(s&&u){let p=Math.round(parseFloat(s)*100);return`color-mix(in srgb, ${u} ${p}%, transparent)`}return u}return i&&!l[i]&&(f=We(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, 1)`:n.useVariable?`var(${l.var})`:`rgb(${f})`},mt=(t,e,r)=>{let n=r||A();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(at(t))return`var(${t})`;let o,s,i;if(T(t))o=t[0];else{let u=Ce(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}else o=t}let{color:a,gradient:c}=n,l=a[o]||c[o],f=w(l);if(f&&l.value)return rt(t,`@${e}`,r);if(f){if(n.useVariable&&l.var)return s||i?rt(t,null,r):`var(${l.var})`;if(e)return rt(t,`@${e}`,r);{let u={};for(let p in l){if(p.charCodeAt(0)!==64)continue;let d=n.media[p.slice(1)];if(!d)continue;let g="@media "+(d==="print"?`${d}`:`screen and ${d}`);u[g]=rt(t,p,r)}return u}}else return n.verbose&&console.warn("Can't find color",t),t},Ke=(t,e,r)=>{let n=A();if(S(t)&&at(t)){let h=t.slice(2);if(t=rt(h),!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let m=h.split(" "),y=n.color[m[0]];if(y&&!y.value&&!y.rgb&&(S(y)||T(y)||w(y))&&(n.color[m[0]]=Ke(y,m[0]),y=n.color[m[0]]),y&&y.value){let b=y.rgb,x=m[1]!==void 0?m[1]:"1",_=m[2];_&&(b=We(b,_)),t=`rgba(${b}, ${x})`}else{let b=m[2],x=m[1]!==void 0?m[1]:"1";if(b)try{let _=pe(m[0]);_&&_.length>=3?t=`rgba(${We(_.slice(0,3).join(", "),b)}, ${x})`:t=m[0]}catch{t=m[0]}else t=m[0]}}}if(T(t)&&(t={"@light":t[0],"@dark":t[1]}),w(t)){let h={};for(let m in t)h[m]=Ke(t[m],e,m.slice(0,1)==="@"?m.slice(1):m);if(n.useVariable){let y=`--${n.varPrefix?n.varPrefix+"-":""}color-${e}`,b,x={};for(let _ in h){if(_.charCodeAt(0)!==64)continue;let C=_.slice(1),R=h[_],P=R&&(R.value||R);!P||typeof P!="string"||(x[C]=P,(C==="light"||b===void 0)&&(b=P))}if(b!==void 0){n.cssVars[y]=b,n.cssMediaVars||(n.cssMediaVars={});for(let _ in x){let C=`[data-theme="${_}"]`;if(n.cssMediaVars[C]||(n.cssMediaVars[C]={}),n.cssMediaVars[C][y]=x[_],_==="light"||_==="dark"){let R=`@media (prefers-color-scheme: ${_})`;n.cssMediaVars[R]||(n.cssMediaVars[R]={}),n.cssMediaVars[R][y]=x[_]}}h.var=y}}return h}let s=`--${n.varPrefix?n.varPrefix+"-":""}color-${e}`+(r?`-${r}`:""),i=t.value||t;if(S(i)&&i.includes(".")&&!i.includes("(")){let[h,m]=i.split("."),y=n.color[h];y&&y.rgb&&(i=`rgba(${y.rgb}, ${parseFloat("0."+m)||1})`)}if(S(i)&&!i.includes("(")&&!i.startsWith("#")){let h=Ce(i);if(h&&h.name&&!h.passthrough&&!h.cssVar){let m=n.color[h.name];m&&!m.value&&!m.rgb&&(S(m)||T(m)||w(m))&&(n.color[h.name]=Ke(m,h.name));let y=n.color[h.name];if(y&&y.rgb){let b=y.rgb;h.tone&&(b=We(b,h.tone));let x=h.alpha?parseFloat(h.alpha):1;i=`rgba(${b}, ${x})`}}}let a=pe(i),[c,l,f,u=1]=a,p=parseFloat(u.toFixed(2)),d=`${c}, ${l}, ${f}`,g=`rgba(${d}, ${p})`;return n.useVariable&&(n.cssVars[s]=g),{var:s,rgb:d,alpha:p,value:g}},Ye=(t,e,r)=>{let n=A();if(S(t)&&at(t)&&(t=rt(t.slice(2))),T(t))return{"@light":Ye(t[0],e,"light"),"@dark":Ye(t[0],e,"dark")};if(w(t)){let i={};for(let a in t)i[a]=Ye(t[a],e,a.slice(0,1)==="@"?a.slice(1):a);return i}let s=`--${n.varPrefix?n.varPrefix+"-":""}gradient-${e}`+(r?`-${r}`:"");return n.useVariable&&(n.cssVars[s]=t.value||t),{var:s,value:t.value||t}};O();var Iw=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"]),sm=["color","Color","background","Background","fill","Fill","stroke","Stroke"],$w=t=>{for(let e=0;e<sm.length;e++)if(t.includes(sm[e]))return!0;return!1},Fa=t=>{let e={},{state:r,media:n,helpers:o,...s}=t;return Object.keys(s).map(a=>{let l=["color","Color","background","border"].some(f=>a.includes(f));return e[a]=l?rt(t[a]):t[a]}),e},ps=t=>(t.value||(t.value=Fa(t)),t.value),ds=(t,e)=>{let r=A();if(r.useVariable)return Ht(t,e);let n=r.theme;if(S(t)){let[o,s]=t.split(" "),i=n[o];if(i){if(!s&&!e)return ps(i);t=[o,s||e]}}if(j(t)&&t[1]){let o=t[0],s=t[1],{helpers:i,media:a,state:c}=n[o];if(a&&a[s])return ps(a[s]);if(i&&i[s])return ps(i[s]);if(c&&c[s])return ps(c[s])}else if(w(t))return Fa(t)},Fw=(t,e,r)=>{if(w(e))t.variants.inverse.value=Fa(e);else if(e===!0){let{color:n,background:o}=r;t.variants.inverse={value:{color:o,background:n}}}},Dw=(t,e,r,n)=>{let o=ds(r);n[`&:${e}`]=o,w(r)&&!r.value&&(r.value=o)},Lw=(t,e)=>{let{state:r}=t;return r?(Object.keys(r).map(o=>{let s=r[o];return Dw(t,o,s,e),t}),t):void 0},Mw=(t,e,r,n)=>{let o=ds(r);n[`@media (prefers-color-scheme: ${e})`]=o,w(r)&&!r.value&&(r.value=o)},Nw=(t,e)=>{let{media:r}=t;return r?(Object.keys(r).map(o=>{let s=r[o];return(o==="dark"||o==="light")&&Mw(t,o,s,e),o==="inverse"&&Fw(t,s,e),t}),t):void 0},jw=(t,e)=>{let r=A(),{helpers:n}=t;return n?(Object.keys(n).map(s=>{let i=n[s];return S(i)?n[s]=r.theme[i]:ps(n[s]),t}),t):void 0},hs=(t,e)=>{let r=A();if(r.useVariable)return gs(t,e);let{state:n,media:o,helpers:s}=t,i=Fa(t,e),c=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}`;return Lw(t,i),Nw(t,i),jw(t,i),{var:c,value:i,state:n,media:o,helpers:s}};var fp=(t,e,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 l in t)if(t[l])for(let f of Object.keys(t[l]))a.add(f);let c=new Set;for(let l of a){let f=l.slice(0,1);if(!(f==="@"||f==="."||f===":")&&$w(l))for(let u in t){if(c.has(u))continue;let p=t[u]?.[l];if(p===void 0)continue;let d=rt(p,`@${u}`);d!==void 0&&S(d)&&/^[a-z][a-zA-Z]+$/.test(d)&&!Iw.has(d)&&c.add(u)}}for(let l of a){let f=l.slice(0,1),u=Object.values(t).some(p=>j(p?.[l]));if(f==="."&&u){let p=l.slice(1),d={};for(let g in t)j(t[g]?.[l])&&(d[g]=t[g][l]);i[l]=fp(d,`${e}-${p}`,r)}else if(f===":"&&u){let p=l.replace(/^:+/,""),d={};for(let g in t)j(t[g]?.[l])&&(d[g]=t[g][l]);i[l]=fp(d,`${e}-${p}`,r)}else if(f!=="@"&&f!=="."&&f!==":"){let d=`--${r.varPrefix?r.varPrefix+"-":""}theme-${e}-${l}`,g=s&&s!=="auto"?String(s).replace(/^'|'$/g,""):null,h;for(let m in t){if(c.has(m))continue;let y=t[m]?.[l];if(y===void 0)continue;let b=rt(y,`@${m}`);if(b===void 0)continue;(g&&m===g||!g&&(m==="light"||h===void 0))&&(h=b);let x=`[data-theme="${m}"]`;if(o[x]||(o[x]={}),o[x][d]=b,m==="dark"||m==="light"){let _=`@media (prefers-color-scheme: ${m})`;o[_]||(o[_]={}),o[_][d]=b}}h!==void 0&&(n[d]=h),i[l]=`var(${d})`,i[`.${l}`]={[l]:i[l]}}}return(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color}),i},gs=(t,e,r,n)=>{let o=A(),{cssVars:s}=o,i={value:t},a=!r&&!n;if(j(t)){if(a&&o.useVariable){let c={};for(let l in t)l.startsWith("@")&&j(t[l])&&(c[l.slice(1)]=t[l]);if(Object.keys(c).length){let l=fp(c,e,o);Object.assign(i,l)}}for(let c in t){let l=c.slice(0,1),f=t[c];if(l==="@"||l===":"||l==="."){let u=l==="@"&&c;i[c]=gs(f,e,c,n||u)}else if(!a){let u=rt(f,n),p=[...new Set([n,r].filter(m=>m).map(m=>m.slice(1)))],d=p.length?"-"+p.join("-"):"",h=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${d}-${c}`;o.useVariable?(o.useThemeSuffixedVars&&(s[h]=u),i[c]=`var(${h})`):i[c]=u,i[`.${c}`]={[c]:i[c]}}}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(S(t)&&at(t)){let l=o.theme[t.slice(2)];return Ht(l,n)}return i},up=t=>{let e=A(),r={};for(let n in t){let o=n.slice(0,1);if(j(t[n])){if(o==="@")continue;o===":"?r[`&${n}`]=up(t[n]):o==="."&&(r[`&${n}`]=up(t[n]))}else r[n]=t[n]}return r},am=(t,e)=>{let r=e.shift();return t[r]?am(t[r],e):t},im=(t,e)=>T(e)?am(t,e):S(e)&&t[e]?t[e]:t;var Ht=(t,e)=>{let r=A();if(S(t)&&at(t)&&(t=Ht(t.slice(2))),!t||!S(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...o]=T(t)?t:t.split(" "),s=r.theme[n];return s&&o.length?s=im(s,o):s&&e&&(s=im(s,e)),up(s)};O();O();var ms=(t,e)=>{let r=A(),n=`--font-${e}`;if(!t||T(t)&&!t[0])return;let o;if(t.isVariable){let s=Wt(t.url,r.files)||t.url;Jr(s)?o=Zr(s):o=He(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap"})}else if(t[0])o=kr(e,t,r.files);else{let s=Array.isArray(t.url)?t.url.map(i=>Wt(i,r.files)||i):Wt(t.url,r.files)||t.url;o=He(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch})}return{var:n,value:t,fontFace:o}},ys=(t,e)=>{let r=A(),{fontFamily:n}=r;return wr(e||n,t)},en=(t,e)=>{let r=A(),{fontFamily:n,fontFamilyTypes:o}=r,{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!n.default)&&(n.default=e),w(s)&&(s=Sr(s));let a=`--font-family-${e}`,c=`${s.join(", ")}, ${o[i]}`;return{var:a,value:c,arr:s,type:i}};O();var Da=t=>{let e=A(),{typography:r,media:n}=e;for(let o in t){let s=o.slice(0,1)==="@",i=t[o];if(!s)continue;let{mediaRegenerate:a}=t,c=o.slice(1),{type:l,base:f,ratio:u,range:p,subSequence:d,h1Matches:g,unit:h}=t;it(i,{type:l,base:f,ratio:u,range:p,subSequence:d,h1Matches:g,unit:h});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),y=i.unit||h,b=!i.unit&&m.has(h)?"rem":y,x=n[c],_="@media "+(x==="print"?`${x}`:`screen and ${x}`);if(r.templates[_]={fontSize:i.base/r.browserDefault+b},!a){it(i,{sequence:{},scales:{},vars:{}}),Pt(i),Ge(t,o);continue}it(i,{sequence:{},scales:{},templates:{},vars:{}}),Pt(i),Ge(t,o)}},La=t=>{let e=A();if(t.h1Matches){let r=t.unit,n=ls(t),{templates:o}=t;for(let s in n){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:e.useVariable?`var(${n[s]?.variable})`:`${n[s]?.scaling}${r}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},bs=()=>{let t=A(),{typography:e}=t;Pt(e),La(e),Oe(e),Da(e)},xs=t=>{let e=A(),{typography:r}=e;return me(t,"fontSize",r)};O();O();var Bw=t=>{let r=A().spacing||{},n=parseFloat(t.spacingRatio),o={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return Pt(o),o},Vw=t=>{for(let e in t){let r=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;it(r,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),Pt(r),Ge(t,e)}},_s=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n},Ss=()=>{let t=A(),{spacing:e}=t;Pt(e),Oe(e),Vw(e)},Uw=t=>{let e=A(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:Pt(t)},pt=(t,e="padding",r,n)=>{let o=Uw(r);if(S(t)){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!n&&t.includes("(")){let i=Te(t);n=i[0],t=i[1]}}let s=n?[t]:Sr(t);if(T(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},c=(l,f)=>me(s[f],e+l+i,o,n);return a[s.length].map((l,f)=>c(l,f))}return me(t,e,o,n)}},ne=(t,e,r,n)=>{let o=A(),{spacing:s}=o,i=r||t[e];if(S(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!n&&S(i)&&i.includes("(")){let a=Te(i);n=a[0],i=a[1]}if(t.spacingRatio){let a=Bw(t);return pt(i,e,a,n)}return pt(i,e,s,n)},ws=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),o=Ir.some(i=>t.includes(i));return n||o?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};O();var Xe=(t,e,r,n)=>{let o=A();if(T(t))return{"@light":Xe(t[0],e,"light"),"@dark":Xe(t[1],e,"dark")};if(w(t)){let a={};for(let c in t)a[c]=Xe(t[c],e,c.startsWith("@")?c.slice(1):c);return a}S(t)&&!re.test(t)&&(t=Ae(t).map(a=>(a=a.trim(),a.split(/\s+/).map(c=>{if(c=c.trim(),!c)return"";if(c.startsWith("--"))return`var(${c})`;let l=rt(c);if(de(l))return l;if(/^\d/.test(c)||c==="0"||c.includes("px")||c.slice(-2)==="em"||c==="inset"||c==="none")return c;let f=pt(c,"shadow");return f&&f.shadow?f.shadow:c}).join(" "))).join(", "));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(r?`-${r}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},ks=(t,e)=>{let r=A();if(e||(e=r.globalTheme),!S(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(at(t))return`var(${t})`;let[n]=T(t)?t:t.split(" "),s=r.shadow[n],i=w(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),t;if(e){if(s[e])return s[e].value;r.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={};for(let c in s){let l=r.media[c.slice(1)],f="@media "+(l==="print"?`${l}`:`screen and ${l}`);a[f]=s.value}return a}return r.verbose&&console.warn("Can't find color",t),t};O();var vs=()=>{let t=A(),{timing:e}=t;Pt(e),Oe(e)},Gt=t=>{let e=A(),{timing:r}=e;return r[t]||r[Ko(t)]||t},Dt=(t,e="timing")=>{let r=A(),{timing:n}=r;return me(t,e,n)};O();var Cs=()=>{let t=A(),{document:e,fontFamily:r,theme:n,typography:o}=t;return it(e,{theme:n.document,fontFamily:wr(r),fontSize:o.base,lineHeight:o.lineHeight})};O();var dp={document:K},rn=(t,e)=>{let r=A();if(!t){r.verbose&&console.warn("setSVG: val is not defined",e);return}return r.useSvgSprite?us(e,t):t},As=(t,e=dp)=>{let r=A(),n=Object.keys(t).length?{}:r.svg;for(let o in t)n[o]=t[o];lm(n,e)},Es=(t,e)=>{let r=A();return r.useIconSprite&&!r.semanticIcons?.[e]?rn(t,e):t},Ts=(t,e=dp)=>{let r=A(),n=Object.keys(t).length?{}:r.icons;for(let o in t)n[o]=t[o];lm(n,e)},pp=(t,e={isRoot:!0})=>{if(!t||!t.createElementNS)return;let r=t.createElementNS("http://www.w3.org/2000/svg","svg");return e.isRoot&&(r.setAttribute("aria-hidden","true"),r.setAttribute("width","0"),r.setAttribute("height","0"),r.setAttribute("style","position:absolute"),r.setAttribute("id","svgSprite")),r},zw=(t,e)=>{let r=typeof DOMParser<"u"?DOMParser:null;if(r){let n=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new r().parseFromString(n,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},cm=(t,e,r)=>{for(;e.firstChild;){let n=e.firstChild;r.appendChild(t.importNode(n,!0)),n.remove()}},lm=(t,e=dp)=>{let r=A(),n=e.document||K;if(!n||!n.documentElement)return r.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),tn(t);let o=n.querySelector("#svgSprite"),s=tn(t),i=`<svg aria-hidden="true" width="0" height="0" style="position:absolute" id="svgSprite">${s}</svg>`,a=zw(n,s);if(o)if(a)cm(n,a,o);else if(n.body.insertAdjacentHTML)o.insertAdjacentHTML("beforeend",s);else{let c=pp(n,{isRoot:!1});c.innerHTML=s,o.append(...c.children)}else if(a){let c=pp(n);c&&c.nodeType&&(cm(n,a,c),n.body.prepend(c))}else if(n.body.insertAdjacentHTML)n.body.insertAdjacentHTML("afterbegin",i);else{let c=pp(n);c&&c.nodeType&&(c.innerHTML=s,n.body.prepend(c))}};O();var Os=(t={})=>{let e=A(),{reset:r,typography:n,document:o}=e;if(r){if(r[":root"]){let c=r,l=n.templates;c.body={...e.useDocumentTheme?Ht("document"):{},...l.body},c.h1=l.h1,c.h2=l.h2,c.h3=l.h3,c.h4=l.h4,c.h5=l.h5,c.h6=l.h6}let{body:s,...i}=n.templates,a=e.useDocumentTheme?Ht("document"):{};if(r.html&&Tt(r.html,a),n.unit){let{media:c}=e;for(let l in n){if(l.charAt(0)!=="@")continue;let f=n[l];if(!f||f.unit===n.unit||!f.unit)continue;let u=f.unit,p=f.base||n.base,d=f.browserDefault||n.browserDefault,g=l.slice(1),h=c[g];if(!h)continue;let m="@media "+(h==="print"?h:"screen and "+h);r[m]||(r[m]={}),r[m].html||(r[m].html={}),r[m].html.fontSize=p/d+u}}return X(it(r,t),{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.unit?"1"+e.unit.default:n.base/n.browserDefault+e.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}})}};O();var Ww=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),Hw=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),Gw=t=>Ww.has(t),ye=t=>{let e=t+"";if(re.test(e))return e;let r=e.trim();return r==="none"||r==="0"||r==="initial"||r==="inherit"||r==="unset"?e:e.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(at(o))return`var(${o})`;if(Gw(o)||/^\d/.test(o)||o==="0")return o;let s=rt(o);if(de(s))return s;let i=pt(o,"border");return i&&i.border?i.border:o}).join(" ")},Ma=t=>re.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(at(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=rt(e);return de(r)?r:e}).join(" "),Na=(t,e)=>ks(t,e),Rs=(t,e)=>re.test(t)?t:Ae(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(at(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=rt(n);if(de(o)){let i=mt(n,e);return w(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=pt(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", "),Ps=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),o=t.slice(r+1,t.lastIndexOf(")")),s=")",a=Ae(o).map(c=>(c=c.trim(),c.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||Hw.has(f)||f==="transparent"||re.test(f))return f;let u=rt(f);return de(u)?u:f}).join(" ")));return n+a.join(", ")+s},ja=(t,e)=>{let r=A();return Ae(t).map(n=>{let o=n.trim();return at(o)?`var(${o})`:/^var\(/.test(o)||o.includes("url")?o:o.includes("gradient")?Ps(o,e):r.gradient[t]?{backgroundImage:mt(t,e||r.globalTheme)}:o.includes("/")||o.startsWith("http")||o.includes(".")&&!Ce(o)?`url(${o})`:o}).join(", ")},Ba=t=>S(t)&&t.split(" ").map(e=>pt(e,"gap").gap).join(" "),hp=t=>{let e=t.split(" ");return e.length?e.map(r=>at(r)?`var(${r})`:r.length<3||r.includes("ms")?Dt(r).timing||r:Gt(r)?Gt(r):r).join(" "):t},Is=(t,e,r)=>{if(S(t))return t.split(",").map(n=>Dt(n).timing||n).join(",")},Va=t=>{let e=t.split(",");if(e.length)return e.map(hp).join(",")};function ct(t,e,r={},n={}){let o=tt.call(this,e||r[t]);if(o==null)return;let s;if(S(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let c=Te(o);s=c[0],o=c[1]}let i=r.scaleBoxSize,a=_s(t);!i&&a&&!n.ratio&&(o=ws(o))}return n.ratio?ne(r,t,o,s):pt(o,t,void 0,s)}var N=(t,e=null,r)=>ct(t,e,r,{ratio:!0}),$s=(t,e,r)=>{if(S(t))return{borderRadius:t.split(" ").map((n,o)=>ne(e,r,n)[r]).join(" ")}};O();var qw=(t,e)=>{let r=A(),{cssVars:n}=r,o=e.startsWith("--")?e:`--${e}`;return n[o]=t,t},Lt=t=>t,Ua={color:Ke,gradient:Ye,font:ms,fontFamily:en,fontfamily:en,theme:hs,icons:Es,semanticIcons:Lt,semanticicons:Lt,svg:rn,svgData:Lt,typography:Lt,shadow:Xe,spacing:Lt,media:Lt,grid:Lt,class:Lt,timing:Lt,reset:Lt,unit:Lt,animation:Lt,vars:qw,sizes:Lt},gp=(t,e,r)=>{let n=A(),o=rs(t),s=o.toLowerCase(),i=n[o]||n[s]||n[t],a=Ua[o]||Ua[s];if(a)try{let c=a(e,r);return i&&(i[r]=c),i}catch(c){n.verbose&&console.warn("Error setting",s,"value",e,r,c)}n.verbose&&console.warn("Can not find",s,"method in scratch")},mp=(t,e)=>{let r=A(),n=t.toLowerCase();return Object.keys(e).sort((s,i)=>{let a=w(e[s])||T(e[s])?1:0,c=w(e[i])||T(e[i])?1:0;return a-c}).forEach(s=>{try{return gp(n,e[s],s)}catch(i){r.verbose&&console.warn("Error setting",n,"value",e[s],s,i)}}),r[n]||r[t]},za=(t,e)=>{let r=e||A();r.globalTheme=t;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(t&&t!=="auto")a.setAttribute("data-theme",t),t==="dark"||t==="light"?a.style.colorScheme=t:a.style.colorScheme="light dark";else if(s&&s.matchMedia){let l=u=>{a.setAttribute("data-theme",u.matches?"dark":"light")},f=s.matchMedia("(prefers-color-scheme: dark)");if(l(f),a.style.colorScheme="light dark",!r.__prefersListener){r.__prefersListener=l;try{f.addEventListener("change",l)}catch{f.addListener(l)}}}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",c=o.styleSheets;for(let l=0;l<c.length;l++)try{let f=c[l].cssRules;for(let u=0;u<f.length;u++)if(f[u].selectorText===a){for(let p in r.cssVars)f[u].style.setProperty(p,r.cssVars[p]);return r}}catch{}}return r},Kw={},vr=(t,e=Kw)=>{let r=e.config||A(),{version:n,verbose:o,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:p,useDefaultConfig:d,semanticIcons:g,files:h,assets:m,...y}=t;e.newConfig&&(r=Oa(e.newConfig)),h!==void 0&&(r.files=h),m!==void 0&&(r.assets=m),o!==void 0&&(r.verbose=o),s!==void 0&&(r.useVariable=s),i!==void 0&&(r.useReset=i),c!==void 0&&(r.useFontImport=c),a!==void 0&&(r.useSvgSprite=a),l!==void 0&&(r.useIconSprite=l),p!==void 0&&(r.useDocumentTheme=p),f!==void 0&&(r.globalTheme=f),u!==void 0&&(r.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(r.useThemeSuffixedVars=t.useThemeSuffixedVars),d!==void 0&&(r.useDefaultConfig=d),g!==void 0&&(r.semanticIcons=g),r.verbose&&console.log(r);let x=(r.document&&r.document.documentElement?r.document:null)||(typeof document<"u"?document:null),_=x&&x.defaultView||(typeof window<"u"?window:null),C=x&&(r.themeRoot||x.documentElement);if(C&&typeof C.setAttribute=="function")if(r.globalTheme&&r.globalTheme!=="auto")C.setAttribute("data-theme",r.globalTheme),r.globalTheme==="dark"||r.globalTheme==="light"?C.style.colorScheme=r.globalTheme:C.style.colorScheme="light dark";else if(_&&_.matchMedia){let $=G=>{C.setAttribute("data-theme",G.matches?"dark":"light")},U=_.matchMedia("(prefers-color-scheme: dark)");if($(U),C.style.colorScheme="light dark",!r.__prefersListener){r.__prefersListener=$;try{U.addEventListener("change",$)}catch{U.addListener($)}}}else C.setAttribute("data-theme","light"),C.style.colorScheme="light";r.__svgCache||(r.__svgCache={});let R=Object.keys(y),P=new Set(R);if(R.forEach(E=>{let $=E.toLowerCase();$!==E&&P.has($)&&X(y[$],y[E])}),R.map(E=>{let $=E.toLowerCase();if(!($!==E&&P.has($)))return mp(E,y[E])}),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{bs()}catch(E){r.verbose&&console.warn("Error applying typography sequence",E)}if(y.spacing)try{Ss()}catch(E){r.verbose&&console.warn("Error applying spacing sequence",E)}if(y.timing)try{vs()}catch(E){r.verbose&&console.warn("Error applying timing sequence",E)}Cs();let V=Os();return V&&(r.reset=V),r};var Cr=new Map,dm=null,xp=null,Yw=null;function Fs(t){t.batchAtomicCss&&(xp=t.batchAtomicCss),t.compoundCssClass&&(Yw=t.compoundCssClass)}var Xw=new Set;function _p(t){try{let e=A();e&&(e.document=t)}catch{}t&&Xw.add(t)}function Ha(){try{let t=A();if(t?.document)return t.document}catch{}return typeof document<"u"?document:null}var Jw={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 Ar(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Wa(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e.toString(36)}function Zw(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Wa(e)}function fm(t,e,r){let n=(r?r+"":"")+t+":"+e,o=Cr.get(n),s=o?null:Ar(t);if(!o){let a=Jw[t]||Wa(t),c=Zw(e);o=r?`_${r}_${a}-${c}`:`_${a}-${c}`,Cr.set(n,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=`.${o}{${s||Ar(t)}:${e}}`;return qt(i),o}var um=new WeakMap;function qt(t,e){let r=hm(e);if(!r)return;let n=um.get(r);if(n||(n=new Set,um.set(r,n)),!n.has(t)){n.add(t);try{r.insertRule(t,r.cssRules.length)}catch{}}}var pm=new WeakMap;function hm(t){let e=t||Ha();if(!e||!e.head)return null;let r=pm.get(e);if(r&&r.ownerNode&&r.ownerNode.parentNode===e.head)return r;let n=e.head.querySelector("style[data-smbls]");n||(n=e.createElement("style"),n.setAttribute("data-smbls",""),e.head.appendChild(n));let o=n.sheet;return pm.set(e,o),dm=o,o}var Qw=8;function oe(t,e,r){if(!t||typeof t!="object")return"";let n=null,o=0,s=[],i=[];for(let c in t){let l=t[c];l==null||l===!1||l===""||(typeof l=="object"?i.push([c,l]):xp?(n||(n=[]),n.push(c,String(l)),o++):s.push(fm(c,String(l),r)))}if(n&&o>=Qw){let c=n.join("\0"),l=xp(c),f=l.indexOf("\0"),u=l.substring(0,f),p=l.substring(f+1);if(p){let d=p.split(`
40
40
  `);for(let g=0;g<d.length;g++)d[g]&&qt(d[g])}s.push(u)}else if(n)for(let c=0;c<n.length;c+=2)s.push(fm(n[c],n[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(t0(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var bp=new Map;function t0(t,e,r){let n=(r?r+"":"")+t+JSON.stringify(e),o=Cr.get(n);if(o){let p=bp.get(o);if(p)for(let d=0;d<p.length;d++)qt(p[d]);return o}o=r?`_${r}_c${Wa(n)}`:`_c${Wa(n)}`;let s="",i=[],a=p=>typeof p=="string"&&(p.indexOf("{")!==-1||p.indexOf("}")!==-1),c=(p,d)=>{let g="";for(let h in d){let m=d[h];if(m!=null)if(typeof m=="object")c([...p,h],m);else{if(a(m))continue;g+=`${Ar(h)}:${m};`}}g&&(p.length===0?s+=g:i.push({chain:p,body:g}))};c([],e);let l=p=>{if(!p.length)return`.${o}`;let d=p[0].split(",").map(g=>g.trim()).map(g=>g.includes("&")?g.replace(/&/g,`.${o}`):g.startsWith(":")?`.${o}${g}`:`.${o} ${g}`);for(let g=1;g<p.length;g++){let h=p[g].split(",").map(y=>y.trim()),m=[];for(let y of d)for(let b of h)b.includes("&")?m.push(b.replace(/&/g,y)):b.startsWith(":")?m.push(y+b):m.push(y+" "+b);d=m}return d.join(", ")},f=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(s){let p=`${t}{.${o}{${s}}}`;f.push(p),qt(p)}for(let p of i){let d=l(p.chain),g=`${t}{${d}{${p.body}}}`;f.push(g),qt(g)}return bp.set(o,f),Cr.set(n,o),o}let u=l([t]);if(s){let p=`${u}{${s}}`;f.push(p),qt(p)}for(let p of i){let g=`${l([t,...p.chain])}{${p.body}}`;f.push(g),qt(g)}return bp.set(o,f),Cr.set(n,o),o}function ft(t){if(hm(),typeof t=="string"){qt(t);return}let e=Object.keys(t),r=n=>{let o=n.match(/max-width:\s*(\d+)/);return o?parseInt(o[1]):0};e.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 e){let o=t[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 c in i){let l=c.startsWith("--")?c:Ar(c);a+=`${l}:${i[c]};`}qt(`${n}{${s}{${a}}}`)}else{let a=s.startsWith("--")?s:Ar(s);qt(`${n}{${a}:${i};}`)}}else{let s="",i=!1;for(let a in o){let c=o[a];if(typeof c=="object"&&c!==null)i=!0;else{let l=a.startsWith("--")?a:Ar(a);s+=`${l}:${c};`}}if(s&&qt(`${n}{${s}}`),i){let a=[],c=[];for(let l in o)typeof o[l]=="object"&&o[l]!==null&&(l.startsWith("@media")||l.startsWith("@supports")?a.push(l):c.push(l));a.sort((l,f)=>{let u=p=>{let d=p.match(/max-width:\s*(\d+)/);return d?parseInt(d[1]):0};return u(f)-u(l)});for(let l of c)ft({[`${n} ${l}`]:o[l]});for(let l of a)ft({[l]:{[n]:o[l]}})}}}}function on(t,e){let r="";for(let n in e){let o="";for(let s in e[n])o+=`${Ar(s)}:${e[n][s]};`;r+=`${n}{${o}}`}return qt(`@keyframes ${t}{${r}}`),t}function gm(){Cr.clear(),dm=null}function Sp(){return Cr.size}O();var od={};I(od,{DELEGATED_EVENTS:()=>fn,LIFECYCLE_EVENTS:()=>Qe,MIXINS:()=>Ga,NON_BUBBLING_EVENTS:()=>qa,REGISTRY:()=>St,SVG_TAGS:()=>cn,addDelegatedEvent:()=>Ds,addMethods:()=>gn,applyExtends:()=>pn,cacheNode:()=>Ze,create:()=>Kt,createHTMLNode:()=>an,detectTag:()=>Je,dispose:()=>tr,flushMounts:()=>Ja,isSvgTag:()=>ln,isValidTag:()=>sn,registerEvent:()=>un,remove:()=>hn,removeDelegatedEvent:()=>Ls,update:()=>dn});var kp="http://www.w3.org/2000/svg",cn=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"]),e0=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 sn(t){return e0.has(t)||cn.has(t)}function ln(t){return cn.has(t)}function Je(t){let{tag:e,key:r}=t;if(typeof e=="function"&&(e=e(t)),e===!0&&(e=r),typeof e=="string"&&sn(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),sn(o)&&!n.has(o)?o:"div"}var mm={};function an(t,e){let r=e?.context?.document||globalThis.document;if(!r)return null;if(t==="string")return r.createTextNode(e?.text||"");if(t==="fragment")return r.createDocumentFragment();if(ln(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===kp)return r.createElementNS(kp,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Ze(t){let e=t.tag=Je(t),n=ln(e)&&(e==="svg"||t.parent?.node?.namespaceURI===kp)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=mm[n];if(s||(s=mm[n]=an(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?an(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var St=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","autoGrow","__name","__ref","__hash","__text","parent","node"]),Ga={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Qe=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","mounted","contentUpdate","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),qa=new Set(["load","error","abort","scroll","canplay","canplaythrough","ended","pause","play","playing","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","durationchange","loadeddata","loadedmetadata","progress","emptied","resize"]),ym=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),fn=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","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var vp=new WeakMap,r0={passive:!0},n0={passive:!0,capture:!0},Cp=(t,e)=>ym.has(t)?e?n0:r0:e||!1;function xm(t){let e=vp.get(t);return e||(e={handlers:new Map,installed:new Set},vp.set(t,e)),e}function o0(t,e){let r=xm(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",o=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c){if(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},Cp(t,n))}function Ds(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=xm(n);o0(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function Ls(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=vp.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function bm(t){return fn.has(t)&&!Qe.has(t)}function un(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=o?.designSystem,i=c=>{s&&et(s);try{let l=r.call(e,c,e,e.state,o);if(l&&typeof l.then=="function"){l.catch(f=>{e.error=f,console.error("[DOMQL] Async event error:",f)}).finally(()=>{s&&J()});return}}catch(l){if(e.error=l,console.error("[DOMQL] Event error:",l),o?.strictMode)throw l}s&&J()},a=qa.has(t);if(!a&&bm(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;Ds(t,n,i,c)}else n.addEventListener(t,i,Cp(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!a&&bm(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;Ls(t,n,c)}else n.removeEventListener(t,i,Cp(t,!1))})}function _m(t){let e=[];return t.extends&&(Array.isArray(t.extends)?e.push(...t.extends):e.push(t.extends)),t.extend&&(Array.isArray(t.extend)?e.push(...t.extend):e.push(t.extend)),e}function pn(t,e,r){let n=_m(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let a=Sm(n[i],s);a&&a!==e&&wm(t,a,r,new Set([e]))}}function Sm(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function wm(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=_m(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=Sm(o[a],i);c&&wm(t,c,r,n)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=km(t[s],i):t[s]=i}}function km(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=km(o,s):r[n]=s}return r}Br();function dn(t={},e={}){let r=this,n=r.__ref;if(!n)return;if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&r.onBeforeUpdate(r,r.state,r.context,e)===!1)return r;let o=!t||Object.keys(t).length===0;if(Se(()=>{if(t.state&&st(r.state)&&r.state.update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&(r.tag==="string"?r.node.nodeValue=t.text??"":r.node.textContent=t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let s in t.style){let i=t.style[s];if(i==null)continue;let a=s.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),c=String(i).replace(/\s*!important\s*$/,"");r.node.style.setProperty(a,c,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let s in t.attr){let i=t.attr[s];i==null||i===!1?r.node.removeAttribute(s):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(s,i===!0?"":i)}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let s in t.data)r.node.dataset[s]=t.data[s];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let s in t){if(St.has(s)||s==="state")continue;let i=t[s],a=r[s];if(a&&a.__ref&&typeof a.update=="function")a.update(i,e);else if(typeof i=="object"&&i!==null){let c=s.charCodeAt(0);c>=65&&c<=90&&Kt(i,r,s,e)}else s!=="text"&&s!=="html"&&s!=="style"&&s!=="attr"&&s!=="data"&&(r[s]=i)}}),r.node&&o&&n.__effects&&n.__effects.length)for(let s=0;s<n.__effects.length;s++){let i=n.__effects[s];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&n.__conditionalRunners)for(let s of n.__conditionalRunners)s();return yt("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function tr(t){if(!t)return;let e=t.__ref;if(e){try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(r){console.error("[smbls] onBeforeRemove error:",r)}if(e.__effects){for(let r=0;r<e.__effects.length;r++)e.__effects[r].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let r=0;r<e.__eventCleanup.length;r++)e.__eventCleanup[r]();e.__eventCleanup.length=0}if(e.__children){for(let r=0;r<e.__children.length;r++){let n=e.__children[r],o=t[n];o&&o.__ref&&tr(o)}e.__children.length=0}if(t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.remove(),t.state?.destroy&&t.state.__element===t&&t.state.destroy(),t.parent?.__ref?.__children){let r=t.parent.__ref.__children.indexOf(t.key);r!==-1&&t.parent.__ref.__children.splice(r,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(r){console.error("[smbls] onRemove error:",r)}t.node=null,t.parent=null,t.__ref=null}}function hn(){tr(this)}O();O();var s0=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],i0=["none","forwards","backwards","both"],a0=["normal","reverse","alternate","alternate-reverse"],c0=["running","paused"],l0=t=>/^[\d.]+m?s$/.test(t),f0=0,vm=new Map,Ap=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(w(t)){let o=JSON.stringify(t),s=vm.get(o);if(s)return s;let i=`smbls-anim-${f0++}`,a=on(i,t);return vm.set(o,a),a}let n=r&&r[t];return w(n)?on(t,n):t},u0=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),o=null,s=[],i=null,a=null,c=null,l=null,f=null;for(let u of n)r&&r[u]?o=u:l0(u)?s.push(u):s0.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):a0.includes(u)?c=u:i0.includes(u)?l=u:c0.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:l,playState:f}},Ep={animation:(t,e)=>{if(S(t)&&t.includes(" ")){let r=u0(t,e);return{animationName:Ap(r.name||t,e),animationDuration:r.durations[0]||Dt(e.animationDuration||"A").timing,animationDelay:r.durations[1]||Dt(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||Gt(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||"both",animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:Ap(t,e),animationDuration:Dt(e.animationDuration||"A").timing,animationDelay:Dt(e.animationDelay||"0s").timing,animationTimingFunction:Gt(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:Ap(t,e)}),animationDuration:t=>({animationDuration:Dt(t).timing}),animationDelay:t=>({animationDelay:Dt(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Gt(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};O();var Tp={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>N("height",t,e),width:(t,e)=>N("width",t,e),boxSizing:t=>dt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...ct("height",e),...ct("width",r||e)}},inlineSize:(t,e)=>N("inlineSize",t,e),blockSize:(t,e)=>N("blockSize",t,e),minWidth:(t,e)=>N("minWidth",t,e),maxWidth:(t,e)=>N("maxWidth",t,e),widthRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...ct("minWidth",e),...ct("maxWidth",r||e)}},minHeight:(t,e)=>N("minHeight",t,e),maxHeight:(t,e)=>N("maxHeight",t,e),heightRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...ct("minHeight",e),...ct("maxHeight",r||e)}},size:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...N("inlineSize",e),...N("blockSize",r||e)}},minBlockSize:(t,e)=>N("minBlockSize",t,e),minInlineSize:(t,e)=>N("minInlineSize",t,e),maxBlockSize:(t,e)=>N("maxBlockSize",t,e),maxInlineSize:(t,e)=>N("maxInlineSize",t,e),minSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...ct("minInlineSize",e),...ct("minBlockSize",r||e)}},maxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...ct("maxInlineSize",e),...ct("maxBlockSize",r||e)}},borderWidth:(t,e)=>N("borderWidth",t,e),padding:(t,e)=>N("padding",t,e),scrollPadding:(t,e)=>N("scrollPadding",t,e),paddingInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...ct("paddingInlineStart",e),...ct("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...ct("paddingBlockStart",e),...ct("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>N("paddingBlockStart",t,e),paddingBottom:(t,e)=>N("paddingBlockEnd",t,e),paddingLeft:(t,e)=>N("paddingInlineStart",t,e),paddingRight:(t,e)=>N("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>N("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>N("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>N("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>N("paddingInlineEnd",t,e),margin:(t,e)=>N("margin",t,e),marginInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...ct("marginInlineStart",e),...ct("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!S(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...ct("marginBlockStart",r),...ct("marginBlockEnd",n||r)}},marginTop:(t,e)=>N("marginBlockStart",t,e),marginBottom:(t,e)=>N("marginBlockEnd",t,e),marginLeft:(t,e)=>N("marginInlineStart",t,e),marginRight:(t,e)=>N("marginInlineEnd",t,e),marginInlineStart:(t,e)=>N("marginInlineStart",t,e),marginInlineEnd:(t,e)=>N("marginInlineEnd",t,e),marginBlockStart:(t,e)=>N("marginBlockStart",t,e),marginBlockEnd:(t,e)=>N("marginBlockEnd",t,e),gap:t=>({gap:Ba(t)}),columnGap:(t,e)=>ne(e,"columnGap",t),rowGap:(t,e)=>ne(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>$s(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>$s(t??e.round,e,"borderRadius")};var Op={fontSize:t=>xs(t)||t,fontFamily:t=>({fontFamily:ys(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t}),lineClamp:t=>{if(t!=null)return t==="none"?{WebkitLineClamp:"none",lineClamp:"none"}:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:String(t),lineClamp:String(t),overflow:"hidden"}}};var Rp={overflow:t=>({overflow:t}),cursor:(t,e,r,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.files[t];s&&s.content&&(t=`url(${s.content.src})`)}return{cursor:t}},opacity:t=>t!=null?{opacity:String(t)}:void 0,visibility:t=>t!=null?{visibility:t}:void 0,pointerEvents:t=>t!=null?{pointerEvents:t}:void 0};var Pp={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>pt(r,"k").k).join(" ")}},left:t=>pt(t,"left"),top:t=>pt(t,"top"),right:t=>pt(t,"right"),bottom:t=>pt(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>pt(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>pt(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};O();var Yt=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},Ip={theme:(t,e)=>{if(t)return e.themeModifier?Ht(t,`@${e.themeModifier}`):Ht(t)},color:(t,e)=>{let r=Yt(e);if(t)return{color:mt(t,r)}},background:(t,e)=>{let r=Yt(e);if(t)return S(t)&&t.includes("gradient")?{background:Ps(t,r)}:{background:mt(t,r)}},backgroundColor:(t,e)=>{let r=Yt(e);if(t)return{backgroundColor:mt(t,r)}},backgroundImage:(t,e,r,n)=>{let o=Yt(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return{backgroundImage:ja(t,o)}},textStroke:t=>({WebkitTextStroke:Ma(t)}),outline:t=>({outline:ye(t)}),outlineOffset:(t,e)=>N("outlineOffset",t,e),border:t=>({border:ye(t)}),borderColor:(t,e)=>{let r=Yt(e);if(t)return{borderColor:mt(t,r)}},borderTopColor:(t,e)=>{let r=Yt(e);if(t)return{borderTopColor:mt(t,r)}},borderBottomColor:(t,e)=>{let r=Yt(e);if(t)return{borderBottomColor:mt(t,r)}},borderLeftColor:(t,e)=>{let r=Yt(e);if(t)return{borderLeftColor:mt(t,r)}},borderRightColor:(t,e)=>{let r=Yt(e);if(t)return{borderRightColor:mt(t,r)}},borderLeft:t=>({borderLeft:ye(t)}),borderTop:t=>({borderTop:ye(t)}),borderRight:t=>({borderRight:ye(t)}),borderBottom:t=>({borderBottom:ye(t)}),shadow:(t,e)=>{let r=Yt(e);if(t)return{boxShadow:Na(t,r)}},boxShadow:(t,e)=>{if(!S(t))return;let[r,n]=t.split("!importan"),o=Yt(e),s=n?" !important":"";return{boxShadow:Rs(r.trim(),o)+s}},textShadow:(t,{context:e})=>({textShadow:Rs(t,e.designSystem.globalTheme)}),columnRule:t=>({columnRule:ye(t)})};var Ms={transition:t=>({transition:Va(t)}),transitionDuration:t=>({transitionDuration:Is(t)}),transitionDelay:t=>({transitionDelay:Is(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Gt(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};O();var $p={flow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var Fp={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var gt={...Ep,...Tp,...Op,...Rp,...Pp,...Ip,...Ms,...$p,...Fp};var bt=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"]);O();var p0=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,d0=(t,e,r)=>{let{context:n}=r;if(!n.designSystem?.media)return;let o=t.slice(1),s=n.designSystem.media[o],i=Mt(e,r);if(!s)return{[t]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(p0),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=n.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},Cm=(t,e,r)=>({[t]:Mt(e,r)}),Ns=(t,e,r)=>{let n=`&${t}`,o=Mt(e,r);if(t.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(l=>l.trim()),c={};Object.keys(s).length&&(c[n]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[n]:o}},Dp=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return v(r)?r.call(e,e):!!r},h0=(t,e,r)=>{let n=t.slice(1),o=Dp(n,r);if(o===void 0&&(o=!!r[n]),!!o)return Mt(e,r)},g0=(t,e,r)=>({[t]:e}),m0=(t,e,r)=>{let n=t.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=Dp(n,r);s!==void 0&&(o=s)}if(o)return Mt(e,r)},y0=(t,e,r)=>{let n=t.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=Dp(n,r);s!==void 0&&(o=s)}if(!o)return Mt(e,r)},Lp=(t,e)=>Mt(t,e),Mp={"@":d0,":":Ns,"[":Ns,"*":Ns,"+":Ns,"~":Ns,"&":Cm,">":Cm,$:h0,"-":g0,".":m0,"!":y0};var Np=Ne(),Am=(t,e,r)=>{let n=e?.context?.designSystem;n&&et(n);try{let o={},s={},i=(a,c)=>{if(r.unpack){o={...o,...c};return}o[a]=c};for(let a in t){let c=t[a];if(a==="class"&&e.call("isString",t.class)){let l=c.split(" ");if(l.length){let f=e.context.designSystem.class,u=l.reduce((p,d)=>it(p,f[d]),{});o.designSystemClass=u}}else if(a==="true"){let l=tt(c,e);it(o,Lp(l,e))}else if(e.classlist[a]){let l=e.classlist[a],f=v(l)?l(e,e.state,e.context):l;f&&i(a,f),!Np&&w(o[a])&&(o[a].label=a)}else if(gt[a]){let l=tt(c,e);T(l)&&(l=l.reduce((u,p)=>it(u,p),{}));let f=gt[a](l,e,e.state,e.context);T(f)&&(f=f.reduce((u,p)=>it(u,p),{})),f&&i(a,f),!Np&&w(o[a])&&(o[a].label=a)}else if(bt.has(a)){let l=tt(c,e);typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),i(a,{[a]:l}),!Np&&w(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{n&&J()}},Em=(t,e)=>{let r={};for(let n in t){let o=Mp[n.slice(0,1)];if(o){let s=o(n,t[n],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(r[i]&&typeof r[i]=="object"&&typeof s[i]=="object"?Tt(r[i],s[i]):r[i]=s[i])}}return r},Mt=(t,e,r={unpack:!0})=>{let[n,o]=Am(t,e,r),s=Em(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(r.unpack)return Qn(n,s);n._selectors=s}return n},b0=(t,e)=>{let r={};if(t.class)for(let n in t.class)r[n]=t.class[n](e);return r};O();var Tm=t=>{if(w(t))return Mt(t,t)},x0=(t,e)=>{let r=Tm(t);return typeof e=="function"?e(r):oe(r)};O();function Pm(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="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:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:o||null,args:r})}function _0(...t){return Pm(this,"warn",t),jo.apply(this,t)}function S0(...t){return Pm(this,"error",t),_r.apply(this,t)}var Om={update:dn,remove:hn,getDB:zo,getQuery:Wo,getRootData:Lo,getChildren:Po,getPath:Io,nextElement:Bo,previousElement:Vo,verbose:Hr,warn:_0,error:S0,variables:Uo,spotByPath:Ro,set(t,e){if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];o&&(typeof t=="function"?t(o)&&e.push(o):typeof t=="string"&&o.key===t&&e.push(o),o.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:Do,getRootState:Fo,getRootContext:Mo,getContext:No,parse(t){let e={},r=t?new Set(t):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){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(let e in t){let r=t[e];if(r==null)continue;let n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof n=="function")return n.call(this,...e)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let r=t.__children.indexOf("content");r!==-1&&t.__children.splice(r,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},Rm=new WeakMap;function w0(t){if(!t)return Om;let e=Rm.get(t);if(e)return e;e=Object.create(Om);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return Rm.set(t,e),e}function gn(t){let e=w0(t.context);Object.setPrototypeOf(t,e)}O();Br();var zp={};I(zp,{STATE_METHODS:()=>Im,applyInitialState:()=>Ka,applyStateMethods:()=>Nt,createState:()=>Bp,isTracking:()=>Up,useHostState:()=>Vp});var Im=new Set(["update","parse","clean","destroy","create","add","toggle","remove","set","replace","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath","reset","apply","applyReplace","applyFunction","quietUpdate","quietReplace","rootUpdate","parentUpdate","keys","values","__element","__children","parent","root"]),k0=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},Nt=(t,e)=>{if(st(e)){let o=e.__raw||e;e.toggle||Object.defineProperty(o,"toggle",{value:function(s,i={}){e[s]=!e[s]},enumerable:!1,configurable:!0}),e.set||Object.defineProperty(o,"set",{value:function(s,i={}){return e.clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.update(s,i),e},enumerable:!1,configurable:!0}),Object.defineProperty(o,"setByPath",{value:function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"getByPath",{value:function(s){let i=s.split("."),a=e;for(let c=0;c<i.length;c++){if(a==null)return;a=a[i[c]]}return a},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"removeByPath",{value:function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"reset",{value:function(s={}){let i=e.parse();return e.set(i,s)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"apply",{value:function(s,i={}){if(typeof s=="function"){let a=s(e);return e.update(a,i)}},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"applyFunction",{value:function(s,i={}){if(typeof s=="function")return s(e),e.update(e.parse(),i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"rootUpdate",{value:function(s,i={}){let a=e;for(;a?.parent&&st(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(e.parent)return e.parent.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"quietReplace",{value:function(s,i={}){return e.replace(s,{quiet:!0,...i})},enumerable:!1,configurable:!0,writable:!0}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e,i=st(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,st(s)&&(i=s);return i||s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={update(o){if(!o||typeof o!="object")return e;for(let s in o)e[s]=o[s];return e},apply(o){if(typeof o!="function")return e;let s=o(e);return s?e.update(s):e},parse(){return{...e}},toggle(o){return e[o]=!e[o],e},set(o){if(!o||typeof o!="object")return e;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.set(o)},clean(){return r(),e}};for(let o in n)typeof e[o]!="function"&&k0(e,o,n[o])};var Bp=function(t,e,r){return t.state=Ka(t,e,r),t.state},Ka=function(t,e,r){let{__ref:n}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return Nt(t,s),s}if(typeof o=="string")return n&&(n.__state=o),n.__stateType="string",v0(o,t,e);if(typeof o=="number"||typeof o=="boolean"){n&&(n.__state=o,n.__stateType=typeof o,n.__hasRootState=!0);let s=Ft({value:o});return s.__element=t,e?.state&&(s.parent=e.state),Nt(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!st(o)){n&&(n.__hasRootState=!0),o.isRootState&&n&&(n.__hasRootState=!0);let s=Ft({...o});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),Nt(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,r),s}return st(o)?(o.__element=t,o):e?.state||{}};function jp(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function v0(t,e,r){if(!r?.state)return{};if(t===".")return r.state;if(t.startsWith("../")){let o=t.slice(3),s=r.state?.parent;return o&&s?jp(s,o):s??r.state??{}}if(t.startsWith("~/")){let o=r.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?jp(o,s):o??{}}let n=jp(r.state,t);if(n&&typeof n=="object"&&!st(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 Vp=(t,e)=>{if(!t)return Fm;let r=A0(t,e);return!r||!r.state?Fm:T0(r.state)},Up=()=>lr()!=null,C0=128;function A0(t,e){let r=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,n=t,o=null;for(let s=0;s<C0&&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 E0={get(t,e){return t[e]}},$m=new WeakMap,T0=t=>{let e=$m.get(t);return e||(e=new Proxy(t,E0),$m.set(t,e)),e},Fm=new Proxy(Object.create(null),{get(){},has(){return!1}});O();var O0=["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"],Ya={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"]},Lm=["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"],Gp=t=>t.startsWith("aria")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"aria-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):t.startsWith("data")&&t.length>4&&t.charCodeAt(4)>=65&&t.charCodeAt(4)<=90?"data-"+t.charAt(4).toLowerCase()+t.slice(5).replace(/([A-Z])/g,e=>"-"+e.toLowerCase()):null,rr=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Gp(e)||Ya.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Ya,t)?Ya[t].includes(e):!1,qp=t=>{if(!S(t))return!1;let e=t.toLowerCase();return Lm.includes(e)},R0=(t,e,r)=>{let n={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(r&&o in r)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])At(e[o][a])&&(n["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(At(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());n["data-"+c]=e[o][a]}continue}let s=rr(t,o),i=qp(o);if(At(e[o])&&(s||i)){let a=Gp(o)||o;n[a]=e[o]}}return n},P0=(t,e)=>{let r={};if(t.attr)for(let n in t.attr)r[n]=t.attr[n](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let n in t.aria){let o=t.aria[n];typeof o=="function"&&(r["aria-"+n]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let n in t.data){let o=t.data[n];if(typeof o=="function"){let s=n.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());r["data-"+s]=o(e,e.state,e.context)}}return r},er=(t,e)=>{let r=t.call("exec",e,t);if(r)return S(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},Wp=(t,e)=>{let r=(t.preSrc||"")+(er(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;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},Hp={src:t=>Wp(t,t.src),href:t=>er(t,t.href),action:t=>er(t,t.action),poster:t=>Wp(t,t.poster),data:t=>er(t,t.data)},Kp=t=>{let e=t.tag||"div",r={};for(let n in Hp)if(t[n]!==void 0&&rr(e,n)){let o=Hp[n](t);o!==void 0&&(r[n]=o)}return r},Dm=(t,e)=>{let r=e.context?.cases?.[t];if(r!==void 0)return v(r)?r.call(e,e):!!r},I0=(t,e,r)=>{if(t==="$"){let o=Dm(e,r);return o===void 0&&(o=!!r[e]),o}let n=r[e]===!0||r.state[e];if(!n){let o=Dm(e,r);o!==void 0&&(n=o)}return t==="."?!!n:!n},$0=new Set(["$",".","!"]),F0=(t,e,r)=>{let n={},o=(s,i,a,c)=>{let l=i;n[s]=f=>{if(I0(a,c,f))return v(l)?l(f):l}};for(let s in t){let i=s.charAt(0);if(!$0.has(i))continue;let a=t[s];if(!a||typeof a!="object")continue;let c=s.slice(1);for(let l in a){if(r&&l in r)continue;if(l==="aria"&&a[l]&&typeof a[l]=="object"){for(let d in a[l])o("aria-"+d,a[l][d],i,c);continue}if(l==="data"&&a[l]&&typeof a[l]=="object"){for(let d in a[l]){let g=d.replace(/([A-Z])/g,h=>"-"+h.toLowerCase());o("data-"+g,a[l][d],i,c)}continue}let f=rr(e,l),u=qp(l);if(!f&&!u)continue;let p=Gp(l)||l;o(p,a[l],i,c)}}return n};var D0=1,Xa=[],Zp=!1;function L0(){Zp||(Zp=!0,typeof requestAnimationFrame=="function"?requestAnimationFrame(Ja):setTimeout(Ja,0))}function Ja(){if(Zp=!1,!Xa.length)return;let t=Xa.splice(0,Xa.length);for(let e=0;e<t.length;e++){let r=t[e];!r.node||!r.node.isConnected||Re("Mounted",r,r.__ref?.__mountOptions||{})}}function Vm(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,Xa.push(t),L0())}function Mm(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&yt("contentUpdate",t,e);let r=t.context?.designSystem;r&&et(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(n){if(t.context?.plugins?.length&&yt("error",t,{hook:"onContentUpdate",error:n})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',n),t.context?.strictMode)throw n}finally{r&&J()}}function yn(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function M0(t){return t.charAt(2).toLowerCase()+t.slice(3)}function N0(t){return t.toLowerCase()}function Nm(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function js(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=js(o,s):r[n]=s}return r}function Kt(t,e,r,n={},o){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${D0++}`,s.parent=e||null,s.context=t.context||e?.context||n.context||{},s.context.__create||(s.context.__create=Kt);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key]};if(r&&!t.extends&&!t.extend){let h=r.indexOf("_");if(h>0){let m=r.substring(0,h),y=s.context?.components;y&&(y[m]||y["smbls."+m])&&(t={...t,extends:m})}}pn(s,t,n);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let h in t){if(h==="parent"||h==="node"||h==="__ref"||h==="extends"||h==="context"||h==="props")continue;let m=t[h],y=s[h],b=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";b&&h.charCodeAt(0)>=65&&h.charCodeAt(0)<=90?s[h]=js(y,m):b&&a.has(h)?s[h]={...y,...m}:b&&Nm(h)?s[h]=js(y,m):s[h]=m}function l(h){for(let m in h){let y=h[m],b=s[m],x=b&&y&&typeof b=="object"&&typeof y=="object"&&!Array.isArray(b)&&!Array.isArray(y)&&typeof b!="function"&&typeof y!="function";x&&m.charCodeAt(0)>=65&&m.charCodeAt(0)<=90?s[m]=js(b,y):x&&a.has(m)?s[m]={...b,...y}:x&&Nm(m)?s[m]=js(b,y):s[m]=y}}c&&l(c),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,p=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,d=u||p||null;if(t.scope!==void 0||f){let h={};f&&Object.assign(h,f),t.scope!==void 0&&Object.assign(h,t.scope),s.scope=Ln(h,d)}else d&&(s.scope=d);if(t.if!==void 0&&(s.if=t.if),gn(s),j0(s,e,t),s.if!=null){let h;if(typeof s.if=="function")try{h=s.if(s,s.state,s.context)}catch(m){if(h=!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 h=s.if;i.__if=!!h}if(i.__if)typeof s.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof s.if=="function"&&Wm(s,i,s.if),s;s.tag||(s.tag=Je(s)),Re("Init",s,n);let g=s.node=Ze(s);if(!g)return s;if(s.tag==="fragment"){let m=(s.context?.document||globalThis.document).createComment("");g.appendChild(m),i.__fragmentAnchor=m}Re("AttachNode",s,n),g.setAttribute&&s.key&&g.setAttribute("data-key",s.key),g.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&g.setAttribute("data-smbls-app",s.context.key),s.id&&g.setAttribute&&(g.id=s.id),qm(s,n),zm(s),Qp(s),Hm(s),q0(s);try{Km(s,n)}catch(h){if(typeof console<"u"&&console.error){let m=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${m}:`,h?.message||h,h?.stack?`
41
41
  `+h.stack.split(`
42
42
  `).slice(0,6).join(`