39 lines
256 KiB
JavaScript
39 lines
256 KiB
JavaScript
|
|
"use strict";var un=Object.defineProperty;var cn=(e,r)=>{for(var i in r)un(e,i,{get:r[i],enumerable:!0})};var Rt={};cn(Rt,{Features:()=>Oe,Polyfills:()=>mt,__unstable__loadDesignSystem:()=>za,compile:()=>La,compileAst:()=>sn,default:()=>at});var sr="4.1.17";var Ge=92,lt=47,st=42,ur=34,cr=39,pn=58,ut=59,le=10,ct=13,He=32,Ze=9,fr=123,Pt=125,Dt=40,pr=41,dn=91,mn=93,dr=45,_t=64,gn=33;function Ee(e,r){let i=r?.from?{file:r.from,code:e}:null;e[0]==="\uFEFF"&&(e=" "+e.slice(1));let t=[],n=[],s=[],o=null,f=null,u="",c="",m=0,d;for(let p=0;p<e.length;p++){let k=e.charCodeAt(p);if(!(k===ct&&(d=e.charCodeAt(p+1),d===le)))if(k===Ge)u===""&&(m=p),u+=e.slice(p,p+2),p+=1;else if(k===lt&&e.charCodeAt(p+1)===st){let h=p;for(let x=p+2;x<e.length;x++)if(d=e.charCodeAt(x),d===Ge)x+=1;else if(d===st&&e.charCodeAt(x+1)===lt){p=x+1;break}let w=e.slice(h,p+1);if(w.charCodeAt(2)===gn){let x=ft(w.slice(2,-2));n.push(x),i&&(x.src=[i,h,p+1],x.dst=[i,h,p+1])}}else if(k===cr||k===ur){let h=mr(e,p,k);u+=e.slice(p,h+1),p=h}else{if((k===He||k===le||k===Ze)&&(d=e.charCodeAt(p+1))&&(d===He||d===le||d===Ze||d===ct&&(d=e.charCodeAt(p+2))&&d==le))continue;if(k===le){if(u.length===0)continue;d=u.charCodeAt(u.length-1),d!==He&&d!==le&&d!==Ze&&(u+=" ")}else if(k===dr&&e.charCodeAt(p+1)===dr&&u.length===0){let h="",w=p,x=-1;for(let A=p+2;A<e.length;A++)if(d=e.charCodeAt(A),d===Ge)A+=1;else if(d===cr||d===ur)A=mr(e,A,d);else if(d===lt&&e.charCodeAt(A+1)===st){for(let y=A+2;y<e.length;y++)if(d=e.charCodeAt(y),d===Ge)y+=1;else if(d===st&&e.charCodeAt(y+1)===lt){A=y+1;break}}else if(x===-1&&d===pn)x=u.length+A-w;else if(d===ut&&h.length===0){u+=e.slice(w,A),p=A;break}else if(d===Dt)h+=")";else if(d===dn)h+="]";else if(d===fr)h+="}";else if((d===Pt||e.length-1===A)&&h.length===0){p=A-1,u+=e.slice(w,A);break}else(d===pr||d===mn||d===Pt)&&h.length>0&&e[A]===h[h.length-1]&&(h=h.slice(0,-1));let E=It(u,x);if(!E)throw new Error("Invalid custom property, expected a value");i&&(E.src=[i,w,p],E.dst=[i,w,p]),o?o.nodes.push(E):t.push(E),u=""}else if(k===ut&&u.charCodeAt(0)===_t)f=Qe(u),i&&(f.src=[i,m,p],f.dst=[i,m,p]),o?o.nodes.push(f):t.push(f),u="",f=null;else if(k===ut&&c[c.length-1]!==")"){let h=It(u);if(!h){if(u.length===0)continue;throw new Error(`Invalid declaration: \`${u.trim()}\``)}i&&(h.src=[i,m,p],h.dst=[i,m,p]),o?o.nodes.push(h):t.push(h),u=""}else if(k===fr&&c[c.length-1]!==")")c+="}",f=Z(u.trim()),i&&(f.src=[i,m,p],f.dst=[i,m,p]),o&&o.nodes.push(f),s.push(o),o=f,u="",f=null;else if(k===Pt&&c[c.length-1]!==")"){if(c==="")throw new Error("Missing opening {");if(c=c.slice(0,-1),u.length>0)if(u.charCodeAt(0)===_t)f=Qe(u),i&&(f.src=[i,m,p],f.dst=[i,m,p]),o?o.nodes.push(f):t.push(f),u="",f=null;else{let w=u.indexOf(":");if(o){let x=It(u,w);if(!x)throw new Error(`Invalid declaration: \`${u.trim()}\``);i&&(x.src=[i,m,p],x.dst=[i,m,p]),o.nodes.push(x)}}let h=s.pop()??null;h===null&&o&&t.push(o),o=h,u="",f=null}else if(k===Dt)c+=")",u+="(";else if(k===pr){if(c[c.length-1]!==")")throw new Error("Missing opening (");c=c.slice(0,-1),u+=")"}else{if(u.length===0&&(k===He||k===le||k===Ze))continue;u===""&&(m=p),u+=String.fromCharCode(k)}}}if(u.charCodeAt(0)===_t){let p=Qe(u);i&&(p.src=[i,m,e.length],p.dst=[i,m,e.length]),t.push(p)}if(c.length>0&&o){if(o.kind==="rule")throw new Error(`Missing closing } at ${o.selector}`);if(o.kind==="at-rule")throw new Error(`Missing closing } at ${o.name} ${o.params}`)}return n.length>0?n.concat(t):t}function Qe(e,r=[]){let i=e,t="";for(let n=5;n<e.length;n++){let s=e.charCodeAt(n);if(s===He||s===Ze||s===Dt){i=e.slice(0,n),t=e.slice(n);break}}return F(i.trim(),t.trim(),r)}function It(e,r=e.indexOf(":")){if(r===-1)return null;let i=e.indexOf("!important",r+1);return a(e.slice(0,r).trim(),e.slice(r+1,i===-1?e.length:i).trim(),i!==-1)}function mr(e,r,i){let t;for(let n=r+1;n<e.length;n++)if(t=e.charCodeAt(n),t===Ge)n+=1;else{if(t===i)return n;if(t===ut&&(e.charCodeAt(n+1)===le||e.charCodeAt(n+1)===ct&&e.charCodeAt(n+2)===le))throw new Error(`Unterminated string: ${e.slice(r,n+1)+String.fromCharCode(i)}`);if(t===le||t===ct&&e.charCodeAt(n+1)===le)
|
||
|
|
`,`
|
||
|
|
`);let r=[],i=[],t=null,n="",s;for(let o=0;o<e.length;o++){let f=e.charCodeAt(o);switch(f){case vr:{n+=e[o]+e[o+1],o++;break}case xn:{if(n.length>0){let c=ne(n);t?t.nodes.push(c):r.push(c),n=""}let u=ne(e[o]);t?t.nodes.push(u):r.push(u);break}case kr:case wr:case yr:case br:case xr:case Ar:case Cr:case Sr:{if(n.length>0){let d=ne(n);t?t.nodes.push(d):r.push(d),n=""}let u=o,c=o+1;for(;c<e.length&&(s=e.charCodeAt(c),!(s!==kr&&s!==wr&&s!==yr&&s!==br&&s!==xr&&s!==Ar&&s!==Cr&&s!==Sr));c++);o=c-1;let m=vn(e.slice(u,c));t?t.nodes.push(m):r.push(m);break}case bn:case wn:{let u=o;for(let c=o+1;c<e.length;c++)if(s=e.charCodeAt(c),s===vr)c+=1;else if(s===f){o=c;break}n+=e.slice(u,o+1);break}case yn:{let u=hn(n,[]);n="",t?t.nodes.push(u):r.push(u),i.push(u),t=u;break}case kn:{let u=i.pop();if(n.length>0){let c=ne(n);u?.nodes.push(c),n=""}i.length>0?t=i[i.length-1]:t=null;break}default:n+=String.fromCharCode(f)}}return n.length>0&&r.push(ne(n)),r}var Kt=(o=>(o[o.Continue=0]="Continue",o[o.Skip=1]="Skip",o[o.Stop=2]="Stop",o[o.Replace=3]="Replace",o[o.ReplaceSkip=4]="ReplaceSkip",o[o.ReplaceStop=5]="ReplaceStop",o))(Kt||{}),R={Continue:{kind:0},Skip:{kind:1},Stop:{kind:2},Replace:e=>({kind:3,nodes:Array.isArray(e)?e:[e]}),ReplaceSkip:e=>({kind:4,nodes:Array.isArray(e)?e:[e]}),ReplaceStop:e=>({kind:5,nodes:Array.isArray(e)?e:[e]})};function _(e,r){typeof r=="function"?Tr(e,r):Tr(e,r.enter,r.exit)}function Tr(e,r=()=>R.Continue,i=()=>R.Continue){let t=[[e,0,null]],n={parent:null,depth:0,path(){let s=[];for(let o=1;o<t.length;o++){let f=t[o][2];f&&s.push(f)}return s}};for(;t.length>0;){let s=t.length-1,o=t[s],f=o[0],u=o[1],c=o[2];if(u>=f.length){t.pop();continue}if(n.parent=c,n.depth=s,u>=0){let k=f[u],h=r(k,n)??R.Continue;switch(h.kind){case 0:{k.nodes&&k.nodes.length>0&&t.push([k.nodes,0,k]),o[1]=~u;continue}case 2:return;case 1:{o[1]=~u;continue}case 3:{f.splice(u,1,...h.nodes);continue}case 5:{f.splice(u,1,...h.nodes);return}case 4:{f.splice(u,1,...h.nodes),o[1]+=h.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${Kt[h.kind]??`Unknown(${h.kind})`}\` in enter.`)}}let m=~u,d=f[m],p=i(d,n)??R.Continue;switch(p.kind){case 0:o[1]=m+1;continue;case 2:return;case 3:{f.splice(m,1,...p.nodes),o[1]=m+p.nodes.length;continue}case 5:{f.splice(m,1,...p.nodes);return}case 4:{f.splice(m,1,...p.nodes),o[1]=m+p.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${Kt[p.kind]??`Unknown(${p.kind})`}\` in exit.`)}}}function dt(e){let r=[];return _(B(e),i=>{if(!(i.kind!=="function"||i.value!=="var"))return _(i.nodes,t=>{t.kind!=="word"||t.value[0]!=="-"||t.value[1]!=="-"||r.push(t.value)}),R.Skip}),r}var An=64;function q(e,r=[]){return{kind:"rule",selector:e,nodes:r}}function F(e,r="",i=[]){return{kind:"at-rule",name:e,params:r,nodes:i}}function Z(e,r=[]){return e.charCodeAt(0)===An?Qe(e,r):q(e,r)}function a(e,r,i=!1){return{kind:"declaration",property:e,value:r,important:i}}function ft(e){return{kind:"comment",value:e}}function pe(e,r){return{kind:"context",context:e,nodes:r}}function W(e){return{kind:"at-root",nodes:e}}function ee(e){switch(e.kind){case"rule":return{kind:e.kind,selector:e.selector,nodes:e.nodes.map(ee),src:e.src,dst:e.dst};case"at-rule":return{kind:e.kind,name:e.name,params:e.params,nodes:e.nodes.map(ee),src:e.src,dst:e.dst};case"at-root":return{kind:e.kind,nodes:e.nodes.map(ee),src:e.src,dst:e.dst};case"context":return{kind:e.kind,context:{...e.context},nodes:e.nodes.map(ee),src:e.src,dst:e.dst};case"declaration":return{kind:e.kind,property:e.property,value:e.value,important:e.important,src:e.src,dst:e.dst};case"comment":return{kind:e.kind,value:e.value,src:e.src,dst:e.dst};default:throw new Error(`Unknown node kind: ${e.kind}`)}}function Xe(e){return{depth:e.depth,get context(){let r={};for(let i of e.path())i.kind==="context"&&Object.assign(r,i.context);return Object.defineProperty(this,"context",{value:r}),r},get parent(){let r=this.path().pop()??null;return Object.defineProperty(this,"parent",{value:r}),r},path(){return e.path().filter(r=>r.kind!=="context")}}}function Ve(e,r,i=3){let t=[],n=ne
|
||
|
|
`,r){i+=c.length;let m=i;i+=o.property.length,i+=2,i+=o.value?.length??0,o.important&&(i+=11);let d=i;i+=2,o.dst=[t,m,d]}}else if(o.kind==="rule"){if(u+=`${c}${o.selector} {
|
||
|
|
`,r){i+=c.length;let m=i;i+=o.selector.length,i+=1;let d=i;o.dst=[t,m,d],i+=2}for(let m of o.nodes)u+=n(m,f+1);u+=`${c}}
|
||
|
|
`,r&&(i+=c.length,i+=2)}else if(o.kind==="at-rule"){if(o.nodes.length===0){let m=`${c}${o.name} ${o.params};
|
||
|
|
`;if(r){i+=c.length;let d=i;i+=o.name.length,i+=1,i+=o.params.length;let p=i;i+=2,o.dst=[t,d,p]}return m}if(u+=`${c}${o.name}${o.params?` ${o.params} `:" "}{
|
||
|
|
`,r){i+=c.length;let m=i;i+=o.name.length,o.params&&(i+=1,i+=o.params.length),i+=1;let d=i;o.dst=[t,m,d],i+=2}for(let m of o.nodes)u+=n(m,f+1);u+=`${c}}
|
||
|
|
`,r&&(i+=c.length,i+=2)}else if(o.kind==="comment"){if(u+=`${c}/*${o.value}*/
|
||
|
|
`,r){i+=c.length;let m=i;i+=2+o.value.length+2;let d=i;o.dst=[t,m,d],i+=1}}else if(o.kind==="context"||o.kind==="at-root")return"";return u}let s="";for(let o of e)s+=n(o,0);return t.code=s,s}function Cn(e,r){let i=[];return _(e,(t,n)=>{if(r(t))return i=n.path(),i.push(t),R.Stop}),i}function Er(e,r,i,t=new Set){if(t.has(e)||(t.add(e),r.getOptions(e)&24))return!0;{let s=i.get(e)??[];for(let o of s)if(Er(o,r,i,t))return!0}return!1}function $r(e){return e.split(/[\s,]+/)}var Lt=["calc","min","max","clamp","mod","rem","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","round"];function et(e){return e.indexOf("(")!==-1&&Lt.some(r=>e.includes(`${r}(`))}function Nr(e){if(!Lt.some(s=>e.includes(s)))return e;let r="",i=[],t=null,n=null;for(let s=0;s<e.length;s++){let o=e.charCodeAt(s);if(o>=48&&o<=57||t!==null&&(o===37||o>=97&&o<=122||o>=65&&o<=90)?t=s:(n=t,t=null),o===40){r+=e[s];let f=s;for(let c=s-1;c>=0;c--){let m=e.charCodeAt(c);if(m>=48&&m<=57)f=c;else if(m>=97&&m<=122)f=c;else break}let u=e.slice(f,s);if(Lt.includes(u)){i.unshift(!0);continue}else if(i[0]&&u===""){i.unshift(!0);continue}i.unshift(!1);continue}else if(o===41)r+=e[s],i.shift();else if(o===44&&i[0]){r+=", ";continue}else{if(o===32&&i[0]&&r.charCodeAt(r.length-1)===32)continue;if((o===43||o===42||o===47||o===45)&&i[0]){let f=r.trimEnd(),u=f.charCodeAt(f.length-1),c=f.charCodeAt(f.length-2),m=e.charCodeAt(s+1);if((u===101||u===69)&&c>=48&&c<=57){r+=e[s];continue}else if(u===43||u===42||u===47||u===45){r+=e[s];continue}else if(u===40||u===44){r+=e[s];continue}else e.charCodeAt(s-1)===32?r+=`${e[s]} `:u>=48&&u<=57||m>=48&&m<=57||u===41||m===40||m===43||m===42||m===47||m===45||n!==null&&n===s-1?r+=` ${e[s]} `:r+=e[s]}else r+=e[s]}}return r}function xe(e){if(e.indexOf("(")===-1)return Le(e);let r=B(e);return zt(r),e=H(r),e=Nr(e),e}function Le(e,r=!1){let i="";for(let t=0;t<e.length;t++){let n=e[t];n==="\\"&&e[t+1]==="_"?(i+="_",t+=1):n==="_"&&!r?i+=" ":i+=n}return i}function zt(e){for(let r of e)switch(r.kind){case"function":{if(r.value==="url"||r.value.endsWith("_url")){r.value=Le(r.value);break}if(r.value==="var"||r.value.endsWith("_var")||r.value==="theme"||r.value.endsWith("_theme")){r.value=Le(r.value);for(let i=0;i<r.nodes.length;i++){if(i==0&&r.nodes[i].kind==="word"){r.nodes[i].value=Le(r.nodes[i].value,!0);continue}zt([r.nodes[i]])}break}r.value=Le(r.value),zt(r.nodes);break}case"separator":case"word":{r.value=Le(r.value);break}default:Sn(r)}}function Sn(e){throw new Error(`Unexpected value: ${e}`)}var Mt=new Uint8Array(256);function ve(e){let r=0,i=e.length;for(let t=0;t<i;t++){let n=e.charCodeAt(t);switch(n){case 92:t+=1;break;case 39:case 34:for(;++t<i;){let s=e.charCodeAt(t);if(s===92){t+=1;continue}if(s===n)break}break;case 40:Mt[r]=41,r++;break;case 91:Mt[r]=93,r++;break;case 123:break;case 93:case 125:case 41:if(r===0)return!1;r>0&&n===Mt[r-1]&&r--;break;case 59:if(r===0)return!1;break}}return!0}var gt=new Uint8Array(256);function K(e,r){let i=0,t=[],n=0,s=e.length,o=r.charCodeAt(0);for(let f=0;f<s;f++){let u=e.charCodeAt(f);if(i===0&&u===o){t.push(e.slice(n,f)),n=f+1;continue}switch(u){case 92:f+=1;break;case 39:case 34:for(;++f<s;){let c=e.charCodeAt(f);if(c===92){f+=1;continue}if(c===u)break}break;case 40:gt[i]=41,i++;break;case 91:gt[i]=93,i++;break;case 123:gt[i]=125,i++;break;case 93:case 125:case 41:i>0&&u===gt[i-1]&&i--;break}}return t.push(e.slice(n)),t}var Tn=58,Vr=45,Rr=97,Or=122;function Pr(e){switch(e.kind){case"arbitrary":return{kind:e.kind,property:e.property,value:e.value,modifier:e.modifier?{kind:e.modifier.kind,value:e.modifier.value}:null,variants:e.variants.map(ze),important:e.important,raw:e.raw};case"static":return{kind:e.kind,root:e.root,variants:e.variants.map(ze),important:e.important,raw:e.raw};case"functional":return{kind:e.kind,root:e.root,value:e.value?e.value.kind==="arbitrary"?{kind:e.value.kind,dataType:e.value.dataType,value:e.value.value}:{kind:e.value.kind,value:e.value.value,fraction:e.value.fraction}:null,modifier:e.modifier?{kind:e.modifier.kind,value:e.modifier.value}:null,variants
|
||
|
|
Only valid data types are: ${Gt.map(w=>`"${w}"`).join(", ")}.
|
||
|
|
`);let c=u.value,m=structuredClone(o),d="\xB6";_(m.nodes,w=>{if(w.kind==="word"&&w.value===c)return R.ReplaceSkip({kind:"word",value:d})});let p="^".repeat(H([u]).length),k=H([m]).indexOf(d),h=["```css",H([o])," ".repeat(k)+p,"```"].join(`
|
||
|
|
`);console.warn(h)}}),n.value=H(s)}),i.utilities.functional(r.slice(0,-2),n=>{let s=ee(e),o=n.value,f=n.modifier;if(o===null)return;let u=!1,c=!1,m=!1,d=!1,p=new Map,k=!1;if(_([s],(h,w)=>{let x=w.parent;if(x?.kind!=="rule"&&x?.kind!=="at-rule"||h.kind!=="declaration"||!h.value)return;let E=!1,A=B(h.value);if(_(A,y=>{if(y.kind==="function"){if(y.value==="--value"){u=!0;let L=Fr(o,y,i);return L?(c=!0,L.ratio?k=!0:p.set(h,x),R.ReplaceSkip(L.nodes)):(u||=!1,E=!0,R.Stop)}else if(y.value==="--modifier"){if(f===null)return E=!0,R.Stop;m=!0;let L=Fr(f,y,i);return L?(d=!0,R.ReplaceSkip(L.nodes)):(m||=!1,E=!0,R.Stop)}}}),E)return R.ReplaceSkip([]);h.value=H(A)}),u&&!c||m&&!d||k&&d||f&&!k&&!d)return null;if(k)for(let[h,w]of p){let x=w.nodes.indexOf(h);x!==-1&&w.nodes.splice(x,1)}return s.nodes}),i.utilities.suggest(r.slice(0,-2),()=>{let n=[],s=[];for(let[o,{literals:f,usedSpacingNumber:u,usedSpacingInteger:c,themeKeys:m}]of[[n,t["--value"]],[s,t["--modifier"]]]){for(let d of f)o.push(d);if(u)o.push(...wt);else if(c)for(let d of wt)O(d)&&o.push(d);for(let d of i.theme.keysInNamespaces(m))o.push(d.replace(Br,(p,k,h)=>`${k}.${h}`))}return[{values:n,modifiers:s}]})}:oo.test(r)?i=>{i.utilities.static(r,()=>e.nodes.map(ee))}:null}function Fr(e,r,i){for(let t of r.nodes){if(e.kind==="named"&&t.kind==="word"&&(t.value[0]==="'"||t.value[0]==='"')&&t.value[t.value.length-1]===t.value[0]&&t.value.slice(1,-1)===e.value)return{nodes:B(e.value)};if(e.kind==="named"&&t.kind==="word"&&t.value[0]==="-"&&t.value[1]==="-"){let n=t.value;if(n.endsWith("-*")){n=n.slice(0,-2);let s=i.theme.resolve(e.value,[n]);if(s)return{nodes:B(s)}}else{let s=n.split("-*");if(s.length<=1)continue;let o=[s.shift()],f=i.theme.resolveWith(e.value,o,s);if(f){let[,u={}]=f;{let c=u[s.pop()];if(c)return{nodes:B(c)}}}}}else if(e.kind==="named"&&t.kind==="word"){if(!Gt.includes(t.value))continue;let n=t.value==="ratio"&&"fraction"in e?e.fraction:e.value;if(!n)continue;let s=Q(n,[t.value]);if(s===null)continue;if(s==="ratio"){let[o,f]=K(n,"/");if(!O(o)||!O(f))continue}else{if(s==="number"&&!se(n))continue;if(s==="percentage"&&!O(n.slice(0,-1)))continue}return{nodes:B(n),ratio:s==="ratio"}}else if(e.kind==="arbitrary"&&t.kind==="word"&&t.value[0]==="["&&t.value[t.value.length-1]==="]"){let n=t.value.slice(1,-1);if(n==="*")return{nodes:B(e.value)};if("dataType"in e&&e.dataType&&e.dataType!==n)continue;if("dataType"in e&&e.dataType)return{nodes:B(e.value)};if(Q(e.value,[n])!==null)return{nodes:B(e.value)}}}}function we(e,r,i,t,n=""){let s=!1,o=it(r,u=>i==null?t(u):u.startsWith("current")?t(J(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),t(Wr(u,i))));function f(u){return n?K(u,",").map(c=>n+c).join(","):u}return s?[a(e,f(it(r,t))),Z("@supports (color: lab(from red l a b))",[a(e,f(o))])]:[a(e,f(o))]}function kt(e,r,i,t,n=""){let s=!1,o=K(r,",").map(f=>it(f,u=>i==null?t(u):u.startsWith("current")?t(J(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),t(Wr(u,i))))).map(f=>`drop-shadow(${f})`).join(" ");return s?[a(e,n+K(r,",").map(f=>`drop-shadow(${it(f,t)})`).join(" ")),Z("@supports (color: lab(from red l a b))",[a(e,n+o)])]:[a(e,n+o)]}var Ht={"--alpha":lo,"--spacing":so,"--theme":uo,theme:co};function lo(e,r,i,...t){let[n,s]=K(i,"/").map(o=>o.trim());if(!n||!s)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${s||"50%"})\``);if(t.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${s||"50%"})\``);return J(n,s)}function so(e,r,i,...t){if(!i)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(t.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${t.length+1}.`);let n=e.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${n} * ${i})`}function uo(e,r,i,...t){if(!i.startsWith("--"))throw new Error("The
|
||
|
|
`,`
|
||
|
|
`);let r=[],i=[],t=null,n="",s;for(let o=0;o<e.length;o++){let f=e.charCodeAt(o);switch(f){case si:case ui:case ci:case mi:case di:case gi:case hi:{if(n.length>0){let p=Ce(n);t?t.nodes.push(p):r.push(p),n=""}let u=o,c=o+1;for(;c<e.length&&(s=e.charCodeAt(c),!(s!==si&&s!==ui&&s!==ci&&s!==mi&&s!==di&&s!==gi&&s!==hi));c++);o=c-1;let m=e.slice(u,c),d=m.trim()===","?Ao(m):bo(m);t?t.nodes.push(d):r.push(d);break}case pi:{let u=xo(n,[]);if(n="",u.value!==":not"&&u.value!==":where"&&u.value!==":has"&&u.value!==":is"){let c=o+1,m=0;for(let p=o+1;p<e.length;p++){if(s=e.charCodeAt(p),s===pi){m++;continue}if(s===li){if(m===0){o=p;break}m--}}let d=o;u.nodes.push(Co(e.slice(c,d))),n="",o=d,t?t.nodes.push(u):r.push(u);break}t?t.nodes.push(u):r.push(u),i.push(u),t=u;break}case li:{let u=i.pop();if(n.length>0){let c=Ce(n);u.nodes.push(c),n=""}i.length>0?t=i[i.length-1]:t=null;break}case Eo:case To:case No:{if(n.length>0){let u=Ce(n);t?t.nodes.push(u):r.push(u)}n=e[o];break}case fi:{if(n.length>0){let m=Ce(n);t?t.nodes.push(m):r.push(m)}n="";let u=o,c=0;for(let m=o+1;m<e.length;m++){if(s=e.charCodeAt(m),s===fi){c++;continue}if(s===So){if(c===0){o=m;break}c--}}n+=e.slice(u,o+1);break}case Vo:case $o:{let u=o;for(let c=o+1;c<e.length;c++)if(s=e.charCodeAt(c),s===ai)c+=1;else if(s===f){o=c;break}n+=e.slice(u,o+1);break}case Ro:case Oo:{if(n.length>0){let u=Ce(n);t?t.nodes.push(u):r.push(u),n=""}t?t.nodes.push(Ce(e[o])):r.push(Ce(e[o]));break}case ai:{n+=e[o]+e[o+1],o+=1;break}default:n+=e[o]}}return n.length>0&&r.push(Ce(n)),r}function ue(e,r){for(let i in e)delete e[i];return Object.assign(e,r)}function De(e){let r=[];for(let i of K(e,".")){if(!i.includes("[")){r.push(i);continue}let t=0;for(;;){let n=i.indexOf("[",t),s=i.indexOf("]",n);if(n===-1||s===-1)break;n>t&&r.push(i.slice(t,n)),r.push(i.slice(n+1,s)),t=s+1}t<=i.length-1&&r.push(i.slice(t))}return r}function Zt(e){let r=e;return r.storage[yi]??=Po(),r.storage[bi]??=Io(r),r.storage[xi]??=Ko(),r.storage[Ai]??=zo(),r.storage[Ci]??=jo(),r.storage[Jt]??=qo(r),r.storage[Si]??=Zo(r),r.storage[me]??=sa(r),r.storage[Xt]??=ca(),r.storage[At]??=fa(r),r.storage[er]??=pa(r),r.storage[St]??=da(r),r.storage[Ei]??=ma(r),r}var yi=Symbol();function Po(){return new U(e=>new U(r=>({rem:e,features:r})))}function _o(e,r){let i=0;return r?.collapse&&(i|=1),r?.logicalToPhysical&&(i|=2),Zt(e).storage[yi].get(r?.rem??null).get(i)}var bi=Symbol();function Io(e){return new U(r=>new U(i=>({features:i,designSystem:e,signatureOptions:r})))}function Do(e,r,i){let t=0;return i?.collapse&&(t|=1),Zt(e).storage[bi].get(r).get(t)}function Qt(e,r,i){let t=_o(e,i),n=Do(e,t,i),s=Zt(e),o=new Set,f=s.storage[xi].get(n);for(let u of r)o.add(f.get(u));return o.size<=1||!(n.features&1)?Array.from(o):Uo(n,Array.from(o))}function Uo(e,r){if(r.length<=1)return r;let i=e.designSystem,t=new U(f=>new U(u=>new Set)),n=e.designSystem.theme.prefix?`${e.designSystem.theme.prefix}:`:"";for(let f of r){let u=K(f,":"),c=u.pop(),m=c.endsWith("!");m&&(c=c.slice(0,-1));let d=u.length>0?`${u.join(":")}:`:"",p=m?"!":"";t.get(d).get(p).add(`${n}${c}`)}let s=new Set;for(let[f,u]of t.entries())for(let[c,m]of u.entries())for(let d of o(Array.from(m)))n&&d.startsWith(n)&&(d=d.slice(n.length)),s.add(`${f}${d}${c}`);return Array.from(s);function o(f){let u=e.signatureOptions,c=i.storage[At].get(u),m=i.storage[Xt].get(u),p=f.map(A=>c.get(A)).map(A=>{let y=null;for(let[L,V]of A)for(let P of V){let z=m.get(L).get(P);if(y===null?y=new Set(z):y=wi(y,z),y.size===0)return y}return y}),k=new U(A=>new Set([A])),h=Array.from(p);for(let A=0;A<h.length;A++){let y=h[A];for(let L=A+1;L<h.length;L++){let V=h[L];for(let P of y)if(V.has(P)){k.get(A).add(L),k.get(L).add(A);break}}}if(k.size===0)return f;let w=new U(A=>A.split(",").map(Number));for(let A of k.values()){let y=Array.from(A).sort((L,V)=>L-V);w.get(y.join(","))}let x=new Set(f),E=new Set;for(let A of w.values())for(let y of ha(A)){if(y.some(P=>E.has(f[P])))continue;let L=y.flatMap(P=>p[P]).reduce(wi),V=i.storage[me].get(u).get(y.map(P=>f[P]).sort((P,z)=>P.localeCompare(z)).join(" "));for(let P of L)if(i.sto
|
||
|
|
`),s=!0;return _(B(t),o=>{if(o.kind==="function"&&o.value==="var"){let f=o.nodes[0].value;if(!new RegExp(`var\\(${f}[,)]\\s*`,"g").test(n)||n.includes(`${f}:`))return s=!1,R.Stop}}),s}function Xo(e,r){if(e.kind!=="functional"||e.value?.kind!=="named")return e;let i=r.designSystem,t=i.storage[er].get(r.signatureOptions),n=i.storage[me].get(r.signatureOptions),s=i.printCandidate(e),o=n.get(s);if(typeof o!="string")return e;for(let u of f(o,e)){let c=i.printCandidate(u);if(n.get(c)===o)return u}return e;function*f(u,c){let m=t.get(u);if(!(m.length>1)){if(m.length===0&&c.modifier){let d={...c,modifier:null},p=n.get(i.printCandidate(d));if(typeof p=="string")for(let k of f(p,d))yield Object.assign({},k,{modifier:c.modifier})}if(m.length===1)for(let d of ye(i,m[0]))yield d}}}var ea=new Map([["order-none","order-0"],["break-words","wrap-break-word"]]);function ta(e,r){let i=r.designSystem,t=i.storage[me].get(r.signatureOptions),n=Ho(i,e),s=ea.get(n)??null;if(s===null)return e;let o=t.get(n);if(typeof o!="string")return e;let f=t.get(s);if(typeof f!="string"||o!==f)return e;let[u]=ye(i,s);return u}function ra(e,r){let i=r.designSystem,t=i.storage[St],n=i.storage[Ei],s=Ct(e);for(let[o]of s){if(o.kind==="compound")continue;let f=i.printVariant(o),u=t.get(f);if(typeof u!="string")continue;let c=n.get(u);if(c.length!==1)continue;let m=c[0],d=i.parseVariant(m);d!==null&&ue(o,d)}return e}function ia(e,r){let i=r.designSystem,t=i.storage[me].get(r.signatureOptions);if(e.kind==="functional"&&e.value?.kind==="arbitrary"&&e.value.dataType!==null){let n=i.printCandidate({...e,value:{...e.value,dataType:null}});t.get(i.printCandidate(e))===t.get(n)&&(e.value.dataType=null)}return e}function na(e,r){if(e.kind!=="functional"||e.value?.kind!=="arbitrary")return e;let i=r.designSystem,t=i.storage[me].get(r.signatureOptions),n=t.get(i.printCandidate(e));if(n===null)return e;for(let s of Ti(e))if(t.get(i.printCandidate({...e,value:s}))===n)return e.value=s,e;return e}function oa(e){let r=Ct(e);for(let[i]of r)if(i.kind==="functional"&&i.root==="data"&&i.value?.kind==="arbitrary"&&!i.value.value.includes("="))i.value={kind:"named",value:i.value.value};else if(i.kind==="functional"&&i.root==="aria"&&i.value?.kind==="arbitrary"&&(i.value.value.endsWith("=true")||i.value.value.endsWith('="true"')||i.value.value.endsWith("='true'"))){let[t,n]=K(i.value.value,"=");if(t[t.length-1]==="~"||t[t.length-1]==="|"||t[t.length-1]==="^"||t[t.length-1]==="$"||t[t.length-1]==="*")continue;i.value={kind:"named",value:i.value.value.slice(0,i.value.value.indexOf("="))}}else i.kind==="functional"&&i.root==="supports"&&i.value?.kind==="arbitrary"&&/^[a-z-][a-z0-9-]*$/i.test(i.value.value)&&(i.value={kind:"named",value:i.value.value});return e}function*Ti(e,r=e.value?.value??"",i=new Set){if(i.has(r))return;if(i.add(r),yield{kind:"named",value:r,fraction:null},r.endsWith("%")&&se(r.slice(0,-1))&&(yield{kind:"named",value:r.slice(0,-1),fraction:null}),r.includes("/")){let[s,o]=r.split("/");O(s)&&O(o)&&(yield{kind:"named",value:s,fraction:`${s}/${o}`})}let t=new Set;for(let s of r.matchAll(/(\d+\/\d+)|(\d+\.?\d+)/g))t.add(s[0].trim());let n=Array.from(t).sort((s,o)=>s.length-o.length);for(let s of n)yield*Ti(e,s,i)}function ki(e){return!e.some(r=>r.kind==="separator"&&r.value.trim()===",")}function xt(e){let r=e.value.trim();return e.kind==="selector"&&r[0]==="["&&r[r.length-1]==="]"}function aa(e,r){let i=[e],t=r.designSystem,n=t.storage[St],s=Ct(e);for(let[o,f]of s)if(o.kind==="compound"&&(o.root==="has"||o.root==="not"||o.root==="in")&&o.modifier!==null&&"modifier"in o.variant&&(o.variant.modifier=o.modifier,o.modifier=null),o.kind==="arbitrary"){if(o.relative)continue;let u=Ie(o.selector.trim());if(!ki(u))continue;if(f===null&&u.length===3&&u[0].kind==="selector"&&u[0].value==="&"&&u[1].kind==="combinator"&&u[1].value.trim()===">"&&u[2].kind==="selector"&&u[2].value==="*"){ue(o,t.parseVariant("*"));continue}if(f===null&&u.length===3&&u[0].kind==="selector"&&u[0].value==="&"&&u[1].kind==="combinator"&&u[1].value.trim()===""&&u[2].kind==="selector"&&u[2].value==="*"){u
|
||
|
|
|
||
|
|
${ie([d])}
|
||
|
|
Relies on:
|
||
|
|
|
||
|
|
${ie([k])}`)}c.add(d);for(let k of s.get(d))for(let h of o.get(k))p.push(d),m(h,p),p.pop();f.add(d),c.delete(d),u.push(d)}}for(let d of n)m(d);for(let d of u)"nodes"in d&&_(d.nodes,p=>{if(p.kind!=="at-rule"||p.name!=="@apply")return;let k=p.params.split(/(\s+)/g),h={},w=0;for(let[x,E]of k.entries())x%2===0&&(h[E]=w),w+=E.length;{let x=Object.keys(h),E=Te(x,r,{respectImportant:!1,onInvalidCandidate:V=>{if(r.theme.prefix&&!V.startsWith(r.theme.prefix))throw new Error(`Cannot apply unprefixed utility class \`${V}\`. Did you mean \`${r.theme.prefix}:${V}\`?`);if(r.invalidCandidates.has(V))throw new Error(`Cannot apply utility class \`${V}\` because it has been explicitly disabled: https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-excluding-classes`);let P=K(V,":");if(P.length>1){let z=P.pop();if(r.candidatesToCss([z])[0]){let I=r.candidatesToCss(P.map(Y=>`${Y}:[--tw-variant-check:1]`)),M=P.filter((Y,G)=>I[G]===null);if(M.length>0){if(M.length===1)throw new Error(`Cannot apply utility class \`${V}\` because the ${M.map(Y=>`\`${Y}\``)} variant does not exist.`);{let Y=new Intl.ListFormat("en",{style:"long",type:"conjunction"});throw new Error(`Cannot apply utility class \`${V}\` because the ${Y.format(M.map(G=>`\`${G}\``))} variants do not exist.`)}}}}throw r.theme.size===0?new Error(`Cannot apply unknown utility class \`${V}\`. Are you using CSS modules or similar and missing \`@reference\`? https://tailwindcss.com/docs/functions-and-directives#reference-directive`):new Error(`Cannot apply unknown utility class \`${V}\``)}}),A=p.src,y=E.astNodes.map(V=>{let P=E.nodeSorting.get(V)?.candidate,z=P?h[P]:void 0;if(V=ee(V),!A||!P||z===void 0)return _([V],M=>{M.src=A}),V;let I=[A[0],A[1],A[2]];return I[1]+=7+z,I[2]=I[1]+P.length,_([V],M=>{M.src=I}),V}),L=[];for(let V of y)if(V.kind==="rule")for(let P of V.nodes)L.push(P);else L.push(V);return R.Replace(L)}});return i}function*Ki(e,r){for(let i of e.params.split(/\s+/g))for(let t of r.parseCandidate(i))switch(t.kind){case"arbitrary":break;case"static":case"functional":yield t.root;break;default:}}async function nr(e,r,i,t=0,n=!1){let s=0,o=[];return _(e,f=>{if(f.kind==="at-rule"&&(f.name==="@import"||f.name==="@reference")){let u=xa(B(f.params));if(u===null)return;f.name==="@reference"&&(u.media="reference"),s|=2;let{uri:c,layer:m,media:d,supports:p}=u;if(c.startsWith("data:")||c.startsWith("http://")||c.startsWith("https://"))return;let k=pe({},[]);return o.push((async()=>{if(t>100)throw new Error(`Exceeded maximum recursion depth while resolving \`${c}\` in \`${r}\`)`);let h=await i(c,r),w=Ee(h.content,{from:n?h.path:void 0});await nr(w,h.base,i,t+1,n),k.nodes=Aa(f,[pe({base:h.base},w)],m,d,p)})()),R.ReplaceSkip(k)}}),o.length>0&&await Promise.all(o),s}function xa(e){let r,i=null,t=null,n=null;for(let s=0;s<e.length;s++){let o=e[s];if(o.kind!=="separator"){if(o.kind==="word"&&!r){if(!o.value||o.value[0]!=='"'&&o.value[0]!=="'")return null;r=o.value.slice(1,-1);continue}if(o.kind==="function"&&o.value.toLowerCase()==="url"||!r)return null;if((o.kind==="word"||o.kind==="function")&&o.value.toLowerCase()==="layer"){if(i)return null;if(n)throw new Error("`layer(\u2026)` in an `@import` should come before any other functions or conditions");"nodes"in o?i=H(o.nodes):i="";continue}if(o.kind==="function"&&o.value.toLowerCase()==="supports"){if(n)return null;n=H(o.nodes);continue}t=H(e.slice(s));break}}return r?{uri:r,layer:i,media:t,supports:n}:null}function Aa(e,r,i,t,n){let s=r;if(i!==null){let o=F("@layer",i,s);o.src=e.src,s=[o]}if(t!==null){let o=F("@media",t,s);o.src=e.src,s=[o]}if(n!==null){let o=F("@supports",n[0]==="("?n:`(${n})`,s);o.src=e.src,s=[o]}return s}function qe(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let r=Object.getPrototypeOf(e);return r===null||Object.getPrototypeOf(r)===null}function ot(e,r,i,t=[]){for(let n of r)if(n!=null)for(let s of Reflect.ownKeys(n)){t.push(s);let o=i(e[s],n[s],t);o!==void 0?e[s]=o:!qe(e[s])||!qe(n[s])?e[s]=n[s]:e[s]=ot({},[e[s],n[s]],i,t),t.pop()}return e}function $t(e,r,i){return function(n
|
||
|
|
|
||
|
|
${ie([x])}
|
||
|
|
|
||
|
|
\`@plugin\` options must be a flat list of declarations.`);if(x.value===void 0)continue;let E=x.value,A=K(E,",").map(y=>{if(y=y.trim(),y==="null")return null;if(y==="true")return!0;if(y==="false")return!1;if(Number.isNaN(Number(y))){if(y[0]==='"'&&y[y.length-1]==='"'||y[0]==="'"&&y[y.length-1]==="'")return y.slice(1,-1);if(y[0]==="{"&&y[y.length-1]==="}")throw new Error(`Unexpected \`@plugin\` option: Value of declaration \`${ie([x]).trim()}\` is not supported.
|
||
|
|
|
||
|
|
Using an object as a plugin option is currently only supported in JavaScript configuration files.`)}else return Number(y);return y});w[x.property]=A.length===1?A[0]:A}return o.push([{id:h,base:k.context.base,reference:!!k.context.reference,src:d.src},Object.keys(w).length>0?w:null]),s|=4,R.Replace([])}if(d.name==="@config"){if(d.nodes.length>0)throw new Error("`@config` cannot have a body.");if(k.parent!==null)throw new Error("`@config` cannot be nested.");return f.push({id:d.params.slice(1,-1),base:k.context.base,reference:!!k.context.reference,src:d.src}),s|=4,R.Replace([])}}),Qi(e);let u=e.resolveThemeValue;if(e.resolveThemeValue=function(p,k){return p.startsWith("--")?u(p,k):(s|=en({designSystem:e,base:r,ast:i,sources:n,configs:[],pluginDetails:[]}),e.resolveThemeValue(p,k))},!o.length&&!f.length)return 0;let[c,m]=await Promise.all([Promise.all(f.map(async({id:d,base:p,reference:k,src:h})=>{let w=await t(d,p,"config");return{path:d,base:w.base,config:w.module,reference:k,src:h}})),Promise.all(o.map(async([{id:d,base:p,reference:k,src:h},w])=>{let x=await t(d,p,"plugin");return{path:d,base:x.base,plugin:x.module,options:w,reference:k,src:h}}))]);return s|=en({designSystem:e,base:r,ast:i,sources:n,configs:c,pluginDetails:m}),s}function en({designSystem:e,base:r,ast:i,sources:t,configs:n,pluginDetails:s}){let o=0,u=[...s.map(w=>{if(!w.options)return{config:{plugins:[w.plugin]},base:w.base,reference:w.reference,src:w.src};if("__isOptionsFunction"in w.plugin)return{config:{plugins:[w.plugin(w.options)]},base:w.base,reference:w.reference,src:w.src};throw new Error(`The plugin "${w.path}" does not accept options`)}),...n],{resolvedConfig:c}=lr(e,[{config:Gi(e.theme),base:r,reference:!0,src:void 0},...u,{config:{plugins:[Zi]},base:r,reference:!0,src:void 0}]),{resolvedConfig:m,replacedThemeKeys:d}=lr(e,u),p={designSystem:e,ast:i,resolvedConfig:c,featuresRef:{set current(w){o|=w}}},k=or({...p,referenceMode:!1,src:void 0}),h=e.resolveThemeValue;e.resolveThemeValue=function(x,E){if(x[0]==="-"&&x[1]==="-")return h(x,E);let A=k.theme(x,void 0);if(Array.isArray(A)&&A.length===2)return A[0];if(Array.isArray(A))return A.join(", ");if(typeof A=="object"&&A!==null&&"DEFAULT"in A)return A.DEFAULT;if(typeof A=="string")return A};for(let{handler:w,reference:x,src:E}of c.plugins){let A=or({...p,referenceMode:x??!1,src:E});w(A)}if(Qr(e,m,d),Wi(e,m),Xi(m,e),Ji(m,e),Hi(m,e),!e.theme.prefix&&c.prefix){if(c.prefix.endsWith("-")&&(c.prefix=c.prefix.slice(0,-1),console.warn(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only and is written as a variant before all utilities. We have fixed up the prefix for you. Remove the trailing \`-\` to silence this warning.`)),!Oa.test(c.prefix))throw new Error(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);e.theme.prefix=c.prefix}if(!e.important&&c.important===!0&&(e.important=!0),typeof c.important=="string"){let w=c.important;_(i,(x,E)=>{if(x.kind!=="at-rule"||x.name!=="@tailwind"||x.params!=="utilities")return;let A=Xe(E);return A.parent?.kind==="rule"&&A.parent.selector===w?R.Stop:R.ReplaceStop(q(w,[x]))})}for(let w of c.blocklist)e.invalidCandidates.add(w);for(let w of c.content.files){if("raw"in w)throw new Error(`Error in the config file/plugin/preset. The \`content\` key contains a \`raw\` entry:
|
||
|
|
|
||
|
|
${JSON.stringify(w,null,2)}
|
||
|
|
|
||
|
|
This feature is not currently supported.`);let x=!1;w.pattern[0]=="!"&&(x=!0,w.pattern=w.pattern.slice(1)),t.push({...w,negated:x})}return o}function rn(e){let r=[0];for(let n=0;n<e.length;n++)e.charCodeAt(n)===10&&r.push(n+1);function i(n){let s=0,o=r.length;for(;o>0;){let u=(o|0)>>1,c=s+u;r[c]<=n?(s=c+1,o=o-u-1):o=u}s-=1;let f=n-r[s];return{line:s+1,column:f}}function t({line:n,column:s}){n-=1,n=Math.min(Math.max(n,0),r.length-1);let o=r[n],f=r[n+1]??o;return Math.min(Math.max(o+s,0),f)}return{find:i,findOffset:t}}function nn({ast:e}){let r=new U(n=>rn(n.code)),i=new U(n=>({url:n.file,content:n.code,ignore:!1})),t={file:null,sources:[],mappings:[]};_(e,n=>{if(!n.src||!n.dst)return;let s=i.get(n.src[0]);if(!s.content)return;let o=r.get(n.src[0]),f=r.get(n.dst[0]),u=s.content.slice(n.src[1],n.src[2]),c=0;for(let p of u.split(`
|
||
|
|
`)){if(p.trim()!==""){let k=o.find(n.src[1]+c),h=f.find(n.dst[1]);t.mappings.push({name:null,originalPosition:{source:s,...k},generatedPosition:h})}c+=p.length,c+=1}let m=o.find(n.src[2]),d=f.find(n.dst[2]);t.mappings.push({name:null,originalPosition:{source:s,...m},generatedPosition:d})});for(let n of r.keys())t.sources.push(i.get(n));return t.mappings.sort((n,s)=>n.generatedPosition.line-s.generatedPosition.line||n.generatedPosition.column-s.generatedPosition.column||(n.originalPosition?.line??0)-(s.originalPosition?.line??0)||(n.originalPosition?.column??0)-(s.originalPosition?.column??0)),t}var on=/^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;function Vt(e){let r=e.indexOf("{");if(r===-1)return[e];let i=[],t=e.slice(0,r),n=e.slice(r),s=0,o=n.lastIndexOf("}");for(let d=0;d<n.length;d++){let p=n[d];if(p==="{")s++;else if(p==="}"&&(s--,s===0)){o=d;break}}if(o===-1)throw new Error(`The pattern \`${e}\` is not balanced.`);let f=n.slice(1,o),u=n.slice(o+1),c;Pa(f)?c=_a(f):c=K(f,","),c=c.flatMap(d=>Vt(d));let m=Vt(u);for(let d of m)for(let p of c)i.push(t+p+d);return i}function Pa(e){return on.test(e)}function _a(e){let r=e.match(on);if(!r)return[e];let[,i,t,n]=r,s=n?parseInt(n,10):void 0,o=[];if(/^-?\d+$/.test(i)&&/^-?\d+$/.test(t)){let f=parseInt(i,10),u=parseInt(t,10);if(s===void 0&&(s=f<=u?1:-1),s===0)throw new Error("Step cannot be zero in sequence expansion.");let c=f<u;c&&s<0&&(s=-s),!c&&s>0&&(s=-s);for(let m=f;c?m<=u:m>=u;m+=s)o.push(m.toString())}return o}function an(e,r){let i=new Set,t=new Set,n=[];function s(o,f=[]){if(e.has(o)&&!i.has(o)){t.has(o)&&r.onCircularDependency?.(f,o),t.add(o);for(let u of e.get(o)??[])f.push(o),s(u,f),f.pop();i.add(o),t.delete(o),n.push(o)}}for(let o of e.keys())s(o);return n}var Ia=/^[a-z]+$/,mt=(n=>(n[n.None=0]="None",n[n.AtProperty=1]="AtProperty",n[n.ColorMix=2]="ColorMix",n[n.All=3]="All",n))(mt||{});function Da(){throw new Error("No `loadModule` function provided to `compile`")}function Ua(){throw new Error("No `loadStylesheet` function provided to `compile`")}function Ka(e){let r=0,i=null;for(let t of K(e," "))t==="reference"?r|=2:t==="inline"?r|=1:t==="default"?r|=4:t==="static"?r|=8:t.startsWith("prefix(")&&t.endsWith(")")&&(i=t.slice(7,-1));return[r,i]}var Oe=(u=>(u[u.None=0]="None",u[u.AtApply=1]="AtApply",u[u.AtImport=2]="AtImport",u[u.JsPluginCompat=4]="JsPluginCompat",u[u.ThemeFunction=8]="ThemeFunction",u[u.Utilities=16]="Utilities",u[u.Variants=32]="Variants",u[u.AtTheme=64]="AtTheme",u))(Oe||{});async function ln(e,{base:r="",from:i,loadModule:t=Da,loadStylesheet:n=Ua}={}){let s=0;e=[pe({base:r},e)],s|=await nr(e,r,n,0,i!==void 0);let o=null,f=new pt,u=new Map,c=new Map,m=[],d=null,p=null,k=[],h=[],w=[],x=[],E=null;_(e,(y,L)=>{if(y.kind!=="at-rule")return;let V=Xe(L);if(y.name==="@tailwind"&&(y.params==="utilities"||y.params.startsWith("utilities"))){if(p!==null)return R.Replace([]);if(V.context.reference)return R.Replace([]);let P=K(y.params," ");for(let z of P)if(z.startsWith("source(")){let I=z.slice(7,-1);if(I==="none"){E=I;continue}if(I[0]==='"'&&I[I.length-1]!=='"'||I[0]==="'"&&I[I.length-1]!=="'"||I[0]!=="'"&&I[0]!=='"')throw new Error("`source(\u2026)` paths must be quoted.");E={base:V.context.sourceBase??V.context.base,pattern:I.slice(1,-1)}}p=y,s|=16}if(y.name==="@utility"){if(V.parent!==null)throw new Error("`@utility` cannot be nested.");if(y.nodes.length===0)throw new Error(`\`@utility ${y.params}\` is empty. Utilities should include at least one property.`);let P=qr(y);if(P===null){if(!y.params.endsWith("-*")){if(y.params.endsWith("*"))throw new Error(`\`@utility ${y.params}\` defines an invalid utility name. A functional utility must end in \`-*\`.`);if(y.params.includes("*"))throw new Error(`\`@utility ${y.params}\` defines an invalid utility name. The dynamic portion marked by \`-*\` must appear once at the end.`)}throw new Error(`\`@utility ${y.params}\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter.`)}m.push(P)}if(y.name==="@source"){if(y.nodes.length>0)throw new Error("`@source` cannot have a body.")
|
||
|
|
`).map((Y,G,oe)=>`${G===0||G>=oe.length-2?" ":">"} ${Y}`).join(`
|
||
|
|
`);throw new Error(`\`@theme\` blocks must only contain custom properties or \`@keyframes\`.
|
||
|
|
|
||
|
|
${M}`)}),d?R.ReplaceSkip([]):(d=q(":root, :host",[]),d.src=y.src,R.ReplaceSkip(d))}});let A=_i(f);if(o&&(A.important=o),x.length>0)for(let y of x)A.invalidCandidates.add(y);s|=await tn({designSystem:A,base:r,ast:e,loadModule:t,sources:h});for(let y of u.keys())A.variants.static(y,()=>{});for(let y of an(c,{onCircularDependency(L,V){let P=ie(L.map((z,I)=>F("@custom-variant",z,[F("@variant",L[I+1]??V,[])]))).replaceAll(";"," { \u2026 }").replace(`@custom-variant ${V} {`,`@custom-variant ${V} { /* \u2190 */`);throw new Error(`Circular dependency detected in custom variants:
|
||
|
|
|
||
|
|
${P}`)}}))u.get(y)?.(A);for(let y of m)y(A);if(d){let y=[];for(let[V,P]of A.theme.entries()){if(P.options&2)continue;let z=a(be(V),P.value);z.src=P.src,y.push(z)}let L=A.theme.getKeyframes();for(let V of L)e.push(pe({theme:!0},[W([V])]));d.nodes=[pe({theme:!0},y)]}if(s|=nt(e,A),s|=je(e,A),s|=Se(e,A),p){let y=p;y.kind="context",y.context={}}return _(e,y=>{if(y.kind==="at-rule")return y.name==="@utility"?R.Replace([]):R.Skip}),{designSystem:A,ast:e,sources:h,root:E,utilitiesNode:p,features:s,inlineCandidates:w}}async function sn(e,r={}){let{designSystem:i,ast:t,sources:n,root:s,utilitiesNode:o,features:f,inlineCandidates:u}=await ln(e,r);t.unshift(ft(`! tailwindcss v${sr} | MIT License | https://tailwindcss.com `));function c(h){i.invalidCandidates.add(h)}let m=new Set,d=null,p=0,k=!1;for(let h of u)i.invalidCandidates.has(h)||(m.add(h),k=!0);return{sources:n,root:s,features:f,build(h){if(f===0)return e;if(!o)return d??=Ve(t,i,r.polyfills),d;let w=k,x=!1;k=!1;let E=m.size;for(let y of h)if(!i.invalidCandidates.has(y))if(y[0]==="-"&&y[1]==="-"){let L=i.theme.markUsedVariable(y);w||=L,x||=L}else m.add(y),w||=m.size!==E;if(!w)return d??=Ve(t,i,r.polyfills),d;let A=Te(m,i,{onInvalidCandidate:c}).astNodes;return r.from&&_(A,y=>{y.src??=o.src}),!x&&p===A.length?(d??=Ve(t,i,r.polyfills),d):(p=A.length,o.nodes=A,d=Ve(t,i,r.polyfills),d)}}}async function La(e,r={}){let i=Ee(e,{from:r.from}),t=await sn(i,r),n=i,s=e;return{...t,build(o){let f=t.build(o);return f===n||(s=ie(f,!!r.from),n=f),s},buildSourceMap(){return nn({ast:n})}}}async function za(e,r={}){return(await ln(Ee(e),r)).designSystem}function at(){throw new Error("It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install `@tailwindcss/postcss` and update your PostCSS configuration.")}for(let e in Rt)e!=="default"&&(at[e]=Rt[e]);module.exports=at;
|