39 lines
270 KiB
JavaScript
39 lines
270 KiB
JavaScript
|
|
"use strict";var wn=Object.defineProperty;var bn=(e,r)=>{for(var i in r)wn(e,i,{get:r[i],enumerable:!0})};var Kt={};bn(Kt,{Features:()=>Ie,Polyfills:()=>bt,__unstable__loadDesignSystem:()=>pa,compile:()=>fa,compileAst:()=>kn,default:()=>ft});var wr="4.2.4";function pt(e){let r=[0];for(let n=0;n<e.length;n++)e.charCodeAt(n)===10&&r.push(n+1);function i(n){let a=0,o=r.length;for(;o>0;){let u=(o|0)>>1,c=a+u;r[c]<=n?(a=c+1,o=o-u-1):o=u}a-=1;let f=n-r[a];return{line:a+1,column:f}}function t({line:n,column:a}){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+a,0),f)}return{find:i,findOffset:t}}var Qe=92,dt=47,mt=42,br=34,yr=39,xn=58,gt=59,fe=10,ht=13,Je=32,Xe=9,xr=123,jt=125,Bt=40,Ar=41,An=91,Cn=93,Cr=45,Ft=64,Sn=33,pe=class e extends Error{loc;constructor(r,i){if(i){let t=i[0],n=pt(t.code).find(i[1]);r=`${t.file}:${n.line}:${n.column+1}: ${r}`}super(r),this.name="CssSyntaxError",this.loc=i,Error.captureStackTrace&&Error.captureStackTrace(this,e)}};function Oe(e,r){let i=r?.from?{file:r.from,code:e}:null;e[0]==="\uFEFF"&&(e=" "+e.slice(1));let t=[],n=[],a=[],o=null,f=null,u="",c="",m=0,d;for(let p=0;p<e.length;p++){let v=e.charCodeAt(p);if(!(v===ht&&(d=e.charCodeAt(p+1),d===fe)))if(v===Qe)u===""&&(m=p),u+=e.slice(p,p+2),p+=1;else if(v===dt&&e.charCodeAt(p+1)===mt){let h=p;for(let y=p+2;y<e.length;y++)if(d=e.charCodeAt(y),d===Qe)y+=1;else if(d===mt&&e.charCodeAt(y+1)===dt){p=y+1;break}let w=e.slice(h,p+1);if(w.charCodeAt(2)===Sn){let y=vt(w.slice(2,-2));n.push(y),i&&(y.src=[i,h,p+1],y.dst=[i,h,p+1])}}else if(v===yr||v===br){let h=Sr(e,p,v,i);u+=e.slice(p,h+1),p=h}else{if((v===Je||v===fe||v===Xe)&&(d=e.charCodeAt(p+1))&&(d===Je||d===fe||d===Xe||d===ht&&(d=e.charCodeAt(p+2))&&d==fe))continue;if(v===fe){if(u.length===0)continue;d=u.charCodeAt(u.length-1),d!==Je&&d!==fe&&d!==Xe&&(u+=" ")}else if(v===Cr&&e.charCodeAt(p+1)===Cr&&u.length===0){let h="",w=p,y=-1;for(let A=p+2;A<e.length;A++)if(d=e.charCodeAt(A),d===Qe)A+=1;else if(d===yr||d===br)A=Sr(e,A,d,i);else if(d===dt&&e.charCodeAt(A+1)===mt){for(let b=A+2;b<e.length;b++)if(d=e.charCodeAt(b),d===Qe)b+=1;else if(d===mt&&e.charCodeAt(b+1)===dt){A=b+1;break}}else if(y===-1&&d===xn)y=u.length+A-w;else if(d===gt&&h.length===0){u+=e.slice(w,A),p=A;break}else if(d===Bt)h+=")";else if(d===An)h+="]";else if(d===xr)h+="}";else if((d===jt||e.length-1===A)&&h.length===0){p=A-1,u+=e.slice(w,A);break}else(d===Ar||d===Cn||d===jt)&&h.length>0&&e[A]===h[h.length-1]&&(h=h.slice(0,-1));let V=Wt(u,y);if(!V)throw new pe("Invalid custom property, expected a value",i?[i,w,p]:null);i&&(V.src=[i,w,p],V.dst=[i,w,p]),o?o.nodes.push(V):t.push(V),u=""}else if(v===gt&&u.charCodeAt(0)===Ft)f=et(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(v===gt&&c[c.length-1]!==")"){let h=Wt(u);if(!h){if(u.length===0)continue;throw new pe(`Invalid declaration: \`${u.trim()}\``,i?[i,m,p]:null)}i&&(h.src=[i,m,p],h.dst=[i,m,p]),o?o.nodes.push(h):t.push(h),u=""}else if(v===xr&&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),a.push(o),o=f,u="",f=null;else if(v===jt&&c[c.length-1]!==")"){if(c==="")throw new pe("Missing opening {",i?[i,p,p]:null);if(c=c.slice(0,-1),u.length>0)if(u.charCodeAt(0)===Ft)f=et(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 y=Wt(u,w);if(!y)throw new pe(`Invalid declaration: \`${u.trim()}\``,i?[i,m,p]:null);i&&(y.src=[i,m,p],y.dst=[i,m,p]),o.nodes.push(y)}}let h=a.pop()??null;h===null&&o&&t.push(o),o=h,u="",f=null}else if(v===Bt)c+=")",u+="(";else if(v===Ar){if(c[c.length-1]!==")")throw new pe("Missing opening (",i?[i,p,p]:null);c=c.slice(0,-1),u+=")"}else{if(u.length===0&&(v===Je||v===fe||v===Xe))continue;u===""&&(m=p),u+=String.fromCharCode(v)}}}if(u.charCodeAt(0)===Ft){let p=et(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 pe(`Missing closing } at ${o.selector}`,o.src?[o.src[0],o.src[1],o.src[1]]:null);if(o.kind==="at-rule")throw new pe(`Missing closing }
|
||
|
|
`,`
|
||
|
|
`);let r=[],i=[],t=null,n="",a;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 On:{if(n.length>0){let c=oe(n);t?t.nodes.push(c):r.push(c),n=""}let u=oe(e[o]);t?t.nodes.push(u):r.push(u);break}case Er:case Nr:case Rr:case Or:case Pr:case _r:case Ir:case Dr:{if(n.length>0){let d=oe(n);t?t.nodes.push(d):r.push(d),n=""}let u=o,c=o+1;for(;c<e.length&&(a=e.charCodeAt(c),!(a!==Er&&a!==Nr&&a!==Rr&&a!==Or&&a!==Pr&&a!==_r&&a!==Ir&&a!==Dr));c++);o=c-1;let m=Tn(e.slice(u,c));t?t.nodes.push(m):r.push(m);break}case Rn:case En:{let u=o;for(let c=o+1;c<e.length;c++)if(a=e.charCodeAt(c),a===Vr)c+=1;else if(a===f){o=c;break}n+=e.slice(u,o+1);break}case Nn:{let u=$n(n,[]);n="",t?t.nodes.push(u):r.push(u),i.push(u),t=u;break}case Vn:{let u=i.pop();if(n.length>0){let c=oe(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(oe(n)),r}var qt=(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))(qt||{}),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 I(e,r){typeof r=="function"?Ur(e,r):Ur(e,r.enter,r.exit)}function Ur(e,r=()=>R.Continue,i=()=>R.Continue){let t={value:[e,0,null],prev:null},n={parent:null,depth:0,path(){let a=[],o=t;for(;o;){let f=o.value[2];f&&a.push(f),o=o.prev}return a.reverse(),a}};for(;t!==null;){let a=t.value,o=a[0],f=a[1],u=a[2];if(f>=o.length){t=t.prev,n.depth-=1;continue}if(n.parent=u,f>=0){let p=o[f],v=r(p,n)??R.Continue;switch(v.kind){case 0:{p.nodes&&p.nodes.length>0&&(n.depth+=1,t={value:[p.nodes,0,p],prev:t}),a[1]=~f;continue}case 2:return;case 1:{a[1]=~f;continue}case 3:{o.splice(f,1,...v.nodes);continue}case 5:{o.splice(f,1,...v.nodes);return}case 4:{o.splice(f,1,...v.nodes),a[1]+=v.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${qt[v.kind]??`Unknown(${v.kind})`}\` in enter.`)}}let c=~f,m=o[c],d=i(m,n)??R.Continue;switch(d.kind){case 0:a[1]=c+1;continue;case 2:return;case 3:{o.splice(c,1,...d.nodes),a[1]=c+d.nodes.length;continue}case 5:{o.splice(c,1,...d.nodes);return}case 4:{o.splice(c,1,...d.nodes),a[1]=c+d.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${qt[d.kind]??`Unknown(${d.kind})`}\` in exit.`)}}}function wt(e){let r=[];return I(F(e),i=>{if(!(i.kind!=="function"||i.value!=="var"))return I(i.nodes,t=>{t.kind!=="word"||t.value[0]!=="-"||t.value[1]!=="-"||r.push(t.value)}),R.Skip}),r}var Pn=64;function G(e,r=[]){return{kind:"rule",selector:e,nodes:r}}function W(e,r="",i=[]){return{kind:"at-rule",name:e,params:r,nodes:i}}function Z(e,r=[]){return e.charCodeAt(0)===Pn?et(e,r):G(e,r)}function l(e,r,i=!1){return{kind:"declaration",property:e,value:r,important:i}}function vt(e){return{kind:"comment",value:e}}function ve(e,r){return{kind:"context",context:e,nodes:r}}function B(e){return{kind:"at-root",nodes:e}}function te(e){switch(e.kind){case"rule":return{kind:e.kind,selector:e.selector,nodes:e.nodes.map(te),src:e.src,dst:e.dst};case"at-rule":return{kind:e.kind,name:e.name,params:e.params,nodes:e.nodes.map(te),src:e.src,dst:e.dst};case"at-root":return{kind:e.kind,nodes:e.nodes.map(te),src:e.src,dst:e.dst};case"context":return{kind:e.kind,context:{...e.context},nodes:e.nodes.map(te),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 rt(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")
|
||
|
|
`,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 a="";for(let o of e)a+=n(o,0);return t.code=a,a}function _n(e,r){let i=[];return I(e,(t,n)=>{if(r(t))return i=n.path(),i.push(t),R.Stop}),i}function zr(e,r,i,t=new Set){if(t.has(e)||(t.add(e),r.getOptions(e)&24))return!0;{let a=i.get(e)??[];for(let o of a)if(zr(o,r,i,t))return!0}return!1}function Lr(e){return e.split(/[\s,]+/)}var Gt=["calc","min","max","clamp","mod","rem","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","round"];function it(e){return e.indexOf("(")!==-1&&Gt.some(r=>e.includes(`${r}(`))}function Kr(e){if(!Gt.some(a=>e.includes(a)))return e;let r="",i=[],t=null,n=null;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=48&&o<=57||t!==null&&(o===37||o>=97&&o<=122||o>=65&&o<=90)?t=a:(n=t,t=null),o===40){r+=e[a];let f=a;for(let c=a-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,a);if(Gt.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[a],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(a+1);if((u===101||u===69)&&c>=48&&c<=57){r+=e[a];continue}else if(u===43||u===42||u===47||u===45){r+=e[a];continue}else if(u===40||u===44){r+=e[a];continue}else e.charCodeAt(a-1)===32?r+=`${e[a]} `:u>=48&&u<=57||m>=48&&m<=57||u===41||m===40||m===43||m===42||m===47||m===45||n!==null&&n===a-1?r+=` ${e[a]} `:r+=e[a]}else r+=e[a]}}return r}function $e(e){if(e.indexOf("(")===-1)return Me(e);let r=F(e);return Ht(r),e=Y(r),e=Kr(e),e}function Me(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 Ht(e){for(let r of e)switch(r.kind){case"function":{if(r.value==="url"||r.value.endsWith("_url")){r.value=Me(r.value);break}if(r.value==="var"||r.value.endsWith("_var")||r.value==="theme"||r.value.endsWith("_theme")){r.value=Me(r.value);for(let i=0;i<r.nodes.length;i++){if(i==0&&r.nodes[i].kind==="word"){r.nodes[i].value=Me(r.nodes[i].value,!0);continue}Ht([r.nodes[i]])}break}r.value=Me(r.value),Ht(r.nodes);break}case"separator":case"word":{r.value=Me(r.value);break}default:In(r)}}function In(e){throw new Error(`Unexpected value: ${e}`)}var Zt=new Uint8Array(256);function xe(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 a=e.charCodeAt(t);if(a===92){t+=1;continue}if(a===n)break}break;case 40:Zt[r]=41,r++;break;case 91:Zt[r]=93,r++;break;case 123:break;case 93:case 125:case 41:if(r===0)return!1;r>0&&n===Zt[r-1]&&r--;break;case 59:if(r===0)return!1;break}}return!0}var yt=new Uint8Array(256);function K(e,r){let i=0,t=[],n=0,a=e.length,o=r.charCodeAt(0);for(let f=0;f<a;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<a;){let c=e.charCodeAt(f);if(c===92){f+=1;continue}if(c===u)break}break;case 40:yt[i]=41,i++;break;case 91:yt[i]=93,i++;break;case 123:yt[i]=125,i++;break;case 93:case 125:case 41:i>0&&u===yt[i-1]&&i--;break}}return t.push(e.slice(n)),t}var Dn=58,Mr=45,jr=97,Fr=122,Xt=/^[a-zA-Z0-9_.%-]+$/;function Fe(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(je),important:e.important,raw:e.raw};case"static":return{kind:e.kind,root:e.root,variants:e.variants.map(je),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.modif
|
||
|
|
Only valid data types are: ${nr.map(w=>`"${w}"`).join(", ")}.
|
||
|
|
`);let c=u.value,m=structuredClone(o),d="\xB6";I(m.nodes,w=>{if(w.kind==="word"&&w.value===c)return R.ReplaceSkip({kind:"word",value:d})});let p="^".repeat(Y([u]).length),v=Y([m]).indexOf(d),h=["```css",Y([o])," ".repeat(v)+p,"```"].join(`
|
||
|
|
`);console.warn(h)}}),n.value=Y(a)}),i.utilities.functional(r.slice(0,-2),n=>{let a=te(e),o=n.value,f=n.modifier;if(o===null)return;let u=!1,c=!1,m=!1,d=!1,p=new Map,v=!1;if(I([a],(h,w)=>{let y=w.parent;if(y?.kind!=="rule"&&y?.kind!=="at-rule"||h.kind!=="declaration"||!h.value)return;let V=!1,A=F(h.value);if(I(A,b=>{if(b.kind==="function"){if(b.value==="--value"){u=!0;let D=Xr(o,b,i);return D?(c=!0,D.ratio?v=!0:p.set(h,y),R.ReplaceSkip(D.nodes)):(u||=!1,V=!0,R.Stop)}else if(b.value==="--modifier"){if(f===null)return V=!0,R.Stop;m=!0;let D=Xr(f,b,i);return D?(d=!0,R.ReplaceSkip(D.nodes)):(m||=!1,V=!0,R.Stop)}}}),V)return R.ReplaceSkip([]);h.value=Y(A)}),u&&!c||m&&!d||v&&d||f&&!v&&!d)return null;if(v)for(let[h,w]of p){let y=w.nodes.indexOf(h);y!==-1&&w.nodes.splice(y,1)}return a.nodes}),i.utilities.suggest(r.slice(0,-2),()=>{let n=[],a=[];for(let[o,{literals:f,usedSpacingNumber:u,usedSpacingInteger:c,themeKeys:m}]of[[n,t["--value"]],[a,t["--modifier"]]]){for(let d of f)o.push(d);if(u)o.push(...Tt);else if(c)for(let d of Tt)P(d)&&o.push(d);for(let d of i.theme.keysInNamespaces(m))o.push(d.replace(ti,(p,v,h)=>`${v}.${h}`))}return[{values:n,modifiers:a}]})}:So(r)?i=>{i.utilities.static(r,()=>e.nodes.map(te))}:null}function Xr(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:F(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 a=i.theme.resolve(e.value,[n]);if(a)return{nodes:F(a)}}else{let a=n.split("-*");if(a.length<=1)continue;let o=[a.shift()],f=i.theme.resolveWith(e.value,o,a);if(f){let[,u={}]=f;{let c=u[a.pop()];if(c)return{nodes:F(c)}}}}}else if(e.kind==="named"&&t.kind==="word"){if(!nr.includes(t.value))continue;let n=t.value==="ratio"&&"fraction"in e?e.fraction:e.value;if(!n)continue;let a=Q(n,[t.value]);if(a===null)continue;if(a==="ratio"){let[o,f]=K(n,"/").map(Number);if(!P(o)||!P(f))continue}else{if(a==="number"&&!ee(n))continue;if(a==="percentage"&&!P(n.slice(0,-1)))continue}if(a==="ratio"){let[o,f]=K(n,"/");return{nodes:F(`${o.trim()} / ${f.trim()}`),ratio:!0}}return{nodes:F(n),ratio:!1}}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:F(e.value)};if("dataType"in e&&e.dataType&&e.dataType!==n)continue;if("dataType"in e&&e.dataType)return{nodes:F(e.value)};if(Q(e.value,[n])!==null)return{nodes:F(e.value)}}}}function Ce(e,r,i,t,n=""){let a=!1,o=lt(r,u=>i==null?t(u):u.startsWith("current")?t(J(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(a=!0),t(ei(u,i))));function f(u){return n?K(u,",").map(c=>n.trim()+" "+c.trim()).join(", "):u}return a?[l(e,f(lt(r,t))),Z("@supports (color: lab(from red l a b))",[l(e,f(o))])]:[l(e,f(o))]}function Ct(e,r,i,t,n=""){let a=!1,o=K(r,",").map(f=>lt(f,u=>i==null?t(u):u.startsWith("current")?t(J(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(a=!0),t(ei(u,i))))).map(f=>`drop-shadow(${f})`).join(" ");return a?[l(e,n+K(r,",").map(f=>`drop-shadow(${lt(f,t)})`).join(" ")),Z("@supports (color: lab(from red l a b))",[l(e,n+o)])]:[l(e,n+o)]}var ni=/^-?[a-z][a-zA-Z0-9_-]*/,ho=37,vo=47,ko=46,wo=97,bo=122,yo=65,xo=90,St=48,$t=57,Ao=95,Co=45;function So(e){let r=ni.exec(e);if(r===null)return!1;let i=r[0],t=e.slice(i.length);if(t.length===0&&i.endsWith("-"))return!1;if(t.length===0)return!0;let n=!1;for(let a=0;a<t.length;a++){let o=t.charCodeAt(a);switch(o){case ho:{if(a!==t.length-1)return!1;let u=(t[a-1]||i[i.length-1]||"").charCodeAt(0);if(u<St||u>$t)return!1;break}case vo:{if(a===t.length-1||n)return!1;n=!0;break}case ko:{let u=(t[a-1]||i[i.length-1]||"").charCodeAt(0);if(u<St||u>$t)return!1;let m=(t[a+1]||"").charCodeAt(0);if(m<St||m>$t)return!1;break}case Ao:case Co:continue;default:{if(o>=wo&&o<=bo||o>=yo&&o<=xo||o>=St&&o<=$t)continue;return!1}}}return!0}function $o(e){if(!e.endsWith("-*"))return!1;e=e.slice(0,-2);let r=ni.exec(e);if(r===null)return!1;let i=
|
||
|
|
`,`
|
||
|
|
`);let r=[],i=[],t=null,n="",a;for(let o=0;o<e.length;o++){let f=e.charCodeAt(o);switch(f){case ki:case wi:case bi:case Ci:case Ai:case Si:case $i:{if(n.length>0){let p=Ve(n);t?t.nodes.push(p):r.push(p),n=""}let u=o,c=o+1;for(;c<e.length&&(a=e.charCodeAt(c),!(a!==ki&&a!==wi&&a!==bi&&a!==Ci&&a!==Ai&&a!==Si&&a!==$i));c++);o=c-1;let m=e.slice(u,c),d=m.trim()===","?Bo(m):Fo(m);t?t.nodes.push(d):r.push(d);break}case xi:{let u=Wo(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(a=e.charCodeAt(p),a===xi){m++;continue}if(a===vi){if(m===0){o=p;break}m--}}let d=o;u.nodes.push(Yo(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 vi:{let u=i.pop();if(n.length>0){let c=Ve(n);u.nodes.push(c),n=""}i.length>0?t=i[i.length-1]:t=null;break}case Zo:case Go:case Qo:{if(n.length>0){let u=Ve(n);t?t.nodes.push(u):r.push(u)}n=e[o];break}case yi:{if(n.length>0){let m=Ve(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(a=e.charCodeAt(m),a===yi){c++;continue}if(a===qo){if(c===0){o=m;break}c--}}n+=e.slice(u,o+1);break}case Jo:case Ho:{let u=o;for(let c=o+1;c<e.length;c++)if(a=e.charCodeAt(c),a===hi)c+=1;else if(a===f){o=c;break}n+=e.slice(u,o+1);break}case Xo:case el:{if(n.length>0){let u=Ve(n);t?t.nodes.push(u):r.push(u),n=""}t?t.nodes.push(Ve(e[o])):r.push(Ve(e[o]));break}case hi:{n+=e[o]+e[o+1],o+=1;break}default:n+=e[o]}}return n.length>0&&r.push(Ve(n)),r}function de(e,r){for(let i in e)delete e[i];return Object.assign(e,r)}function Le(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),a=i.indexOf("]",n);if(n===-1||a===-1)break;n>t&&r.push(i.slice(t,n)),r.push(i.slice(n+1,a)),t=a+1}t<=i.length-1&&r.push(i.slice(t))}return r}function ar(e,r){let i=e;return i.storage[Ri]??=tl(),i.storage[Oi]??=nl(i),i.storage[Pi]??=al(),i.storage[_i]??=ul(),i.storage[Ii]??=fl(),i.storage[ur]??=vl(i),i.storage[Rt]??=wl(i,r),i.storage[we]??=_l(i),i.storage[cr]??=Dl(),i.storage[Ot]??=Ul(i),i.storage[fr]??=Ll(i),i.storage[_t]??=zl(i),i.storage[zi]??=Kl(i),i.storage[st]??=rl(i),i}var Ri=Symbol();function tl(){return new z(e=>new z(r=>({rem:e,features:r})))}var st=Symbol();function rl(e){return new z(r=>{let i=e.storage[we].get(r);return function(n,a){let o=typeof n=="string"?n:e.printCandidate(n),f=i.get(o);if(typeof f!="string")return!1;let u=typeof a=="string"?a:e.printCandidate(a),c=i.get(u);return typeof c!="string"?!1:f===c}})}function il(e,r){let i=0;return r?.collapse&&(i|=1),r?.logicalToPhysical&&(i|=2),ar(e,r).storage[Ri].get(r?.rem??null).get(i)}var Oi=Symbol();function nl(e){return new z(r=>new z(i=>({features:i,designSystem:e,signatureOptions:r})))}function ol(e,r,i){let t=0;return i?.collapse&&(t|=1),ar(e).storage[Oi].get(r).get(t)}function sr(e,r,i){let t=il(e,i),n=ol(e,t,i),a=ar(e),o=new Set,f=a.storage[Pi].get(n);for(let u of r)o.add(f.get(u));return o.size<=1||!(n.features&1)?Array.from(o):ll(n,Array.from(o))}function ll(e,r){let i=e.designSystem,t=new z(f=>new z(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 a=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)),a.add(`${f}${d}${c}`);return Array.from(a);function o(f){let u=e.signatureOptions,c=i.storage[Ot].get(u),m=i.storage[cr].get(u),d=f.map(A=>c.get(A));if(d.some(A=>A.has("line-height"))){let A=i.theme.keysInNamespaces(["--text"]);if(A.length>0){let b=new Set,D=new Set;for(let N of d)if(N.has("line-height"))for(let L of N.get("line-height")){if(D.has(L))continue;D.add(L);let _=i.storage[Rt]?.get(L)??null;if(_!==null)if(ee(_)){b.add(_);for(let M of A)c.get(`text-${M}/${_}`)}else{b.add(L);for(let M of A)c.get(`text-${M}/[${L}]`)}}let E=new Set;for(let N of d)if(N.has("font-size")){for(l
|
||
|
|
`),a=!0;return I(F(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 a=!1,R.Stop}}),a}function xl(e,r){if(e.kind!=="functional"||e.value?.kind!=="named")return e;let i=r.designSystem,t=i.storage[fr].get(r.signatureOptions),n=i.storage[we].get(r.signatureOptions),a=i.storage[st].get(r.signatureOptions),o=i.printCandidate(e),f=n.get(o);if(typeof f!="string")return e;for(let c of u(f,e))if(a(e,c))return c;return e;function*u(c,m){let d=t.get(c);if(d.length>1){let p;for(let v of d)if(v[0]!=="-"){if(p)return;p=v}if(p)for(let v of se(i,p))yield v;return}if(d.length===0&&m.modifier){let p={...m,modifier:null},v=n.get(i.printCandidate(p));if(typeof v=="string")for(let h of u(v,p))yield Object.assign({},h,{modifier:m.modifier})}if(d.length===1)for(let p of se(i,d[0]))yield p}}var Al=new Map([["order-none","order-0"],["break-words","wrap-break-word"],["overflow-ellipsis","text-ellipsis"]]),Cl=new Map([[/^(-)?start-(.*?)$/,"$1inset-s-$2"],[/^(-)?end-(.*?)$/,"$1inset-e-$2"]]);function*Sl(e){let r=Al.get(e);r&&(yield r);for(let[i,t]of Cl){let n=e.replace(i,t);n!==e&&(yield n)}}function $l(e,r){let i=r.designSystem,t=i.storage[st].get(r.signatureOptions),n=Di(i,e);for(let a of Sl(n)){if(!t(e,a))continue;let[o]=se(i,a);return o}return e}function Tl(e,r){let i=r.designSystem,t=i.storage[_t],n=i.storage[zi],a=Pt(e);for(let[o]of a){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&&de(o,d)}return e}function Vl(e,r){let i=r.designSystem,t=i.storage[we].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 El(e,r){if(e.kind!=="functional"||e.value?.kind!=="arbitrary")return e;let i=r.designSystem,t=i.storage[we].get(r.signatureOptions),n=t.get(i.printCandidate(e));if(n===null)return e;for(let a of Ui(e))if(t.get(i.printCandidate({...e,value:a}))===n)return e.value=a,e;return e}function Nl(e){let r=Pt(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*Ui(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("%")&&ee(r.slice(0,-1))&&(yield{kind:"named",value:r.slice(0,-1),fraction:null}),r.includes("/")){let[a,o]=r.split("/");P(a)&&P(o)&&(yield{kind:"named",value:a,fraction:`${a}/${o}`})}let t=new Set;for(let a of r.matchAll(/(\d+\/\d+)|(\d+\.?\d+)/g))t.add(a[0].trim());let n=Array.from(t).sort((a,o)=>a.length-o.length);for(let a of n)yield*Ui(e,a,i)}function Ei(e){return!e.some(r=>r.kind==="separator"&&r.value.trim()===",")}function Nt(e){let r=e.value.trim();return e.kind==="selector"&&r[0]==="["&&r[r.length-1]==="]"}function Rl(e,r){let i=[e],t=r.designSystem,n=t.storage[_t],a=Pt(e);for(let[o,f]of a)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=Ue(o.selector.trim());if(!Ei(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].k
|
||
|
|
|
||
|
|
${ne([d])}
|
||
|
|
Relies on:
|
||
|
|
|
||
|
|
${ne([v])}`)}c.add(d);for(let v of a.get(d))for(let h of o.get(v))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&&I(d.nodes,p=>{if(p.kind!=="at-rule"||p.name!=="@apply")return;let v=p.params.split(/(\s+)/g),h={},w=0;for(let[y,V]of v.entries())y%2===0&&(h[V]=w),w+=V.length;{let y=Object.keys(h),V=Ne(y,r,{respectImportant:!1,onInvalidCandidate:E=>{if(r.theme.prefix&&!E.startsWith(r.theme.prefix))throw new Error(`Cannot apply unprefixed utility class \`${E}\`. Did you mean \`${r.theme.prefix}:${E}\`?`);if(r.invalidCandidates.has(E))throw new Error(`Cannot apply utility class \`${E}\` because it has been explicitly disabled: https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-excluding-classes`);let N=K(E,":");if(N.length>1){let L=N.pop();if(r.candidatesToCss([L])[0]){let _=r.candidatesToCss(N.map(q=>`${q}:[--tw-variant-check:1]`)),M=N.filter((q,H)=>_[H]===null);if(M.length>0){if(M.length===1)throw new Error(`Cannot apply utility class \`${E}\` because the ${M.map(q=>`\`${q}\``)} variant does not exist.`);{let q=new Intl.ListFormat("en",{style:"long",type:"conjunction"});throw new Error(`Cannot apply utility class \`${E}\` because the ${q.format(M.map(H=>`\`${H}\``))} variants do not exist.`)}}}}throw r.theme.size===0?new Error(`Cannot apply unknown utility class \`${E}\`. 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 \`${E}\``)}}),A=p.src,b=V.astNodes.map(E=>{let N=V.nodeSorting.get(E)?.candidate,L=N?h[N]:void 0;if(E=te(E),!A||!N||L===void 0)return I([E],M=>{M.src=A}),E;let _=[A[0],A[1],A[2]];return _[1]+=7+L,_[2]=_[1]+N.length,I([E],M=>{M.src=_}),E}),D=[];for(let E of b)if(E.kind==="rule")for(let N of E.nodes)D.push(N);else D.push(E);return R.Replace(D)}});return i}function*Hi(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 gr(e,r,i,t=0,n=!1){let a=0,o=[];return I(e,f=>{if(f.kind==="at-rule"&&(f.name==="@import"||f.name==="@reference")){let u=Gl(F(f.params));if(u===null)return;f.name==="@reference"&&(u.media="reference"),a|=2;let{uri:c,layer:m,media:d,supports:p}=u;if(c.startsWith("data:")||c.startsWith("http://")||c.startsWith("https://"))return;let v=ve({},[]);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=Oe(h.content,{from:n?h.path:void 0});await gr(w,h.base,i,t+1,n),v.nodes=Hl(f,[ve({base:h.base},w)],m,d,p)})()),R.ReplaceSkip(v)}}),o.length>0&&await Promise.all(o),a}function Gl(e){let r,i=null,t=null,n=null;for(let a=0;a<e.length;a++){let o=e[a];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=Y(o.nodes):i="";continue}if(o.kind==="function"&&o.value.toLowerCase()==="supports"){if(n)return null;n=Y(o.nodes);continue}t=Y(e.slice(a));break}}return r?{uri:r,layer:i,media:t,supports:n}:null}function Hl(e,r,i,t,n){let a=r;if(i!==null){let o=W("@layer",i,a);o.src=e.src,a=[o]}if(t!==null){let o=W("@media",t,a);o.src=e.src,a=[o]}if(n!==null){let o=W("@supports",n[0]==="("?n:`(${n})`,a);o.src=e.src,a=[o]}return a}function Ze(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let r=Object.getPrototypeOf(e);return r===null||Object.getPrototypeOf(r)===null}function ct(e,r,i,t=[]){for(let n of r)if(n!=null)for(let a of Reflect.ownKeys(n)){t.push(a);let o=i(e[a],n[a],t);o!==void 0?e[a]=o:!Ze(e[a])||!Ze(n[a])?e[a]=n[a]:e[a]=ct({},[e[a],n[a]],i,t),t.pop()}return e}function Dt(e,r,i){return function(n
|
||
|
|
|
||
|
|
${ne([y])}
|
||
|
|
|
||
|
|
\`@plugin\` options must be a flat list of declarations.`);if(y.value===void 0)continue;let V=y.value,A=K(V,",").map(b=>{if(b=b.trim(),b==="null")return null;if(b==="true")return!0;if(b==="false")return!1;if(Number.isNaN(Number(b))){if(b[0]==='"'&&b[b.length-1]==='"'||b[0]==="'"&&b[b.length-1]==="'")return b.slice(1,-1);if(b[0]==="{"&&b[b.length-1]==="}")throw new Error(`Unexpected \`@plugin\` option: Value of declaration \`${ne([y]).trim()}\` is not supported.
|
||
|
|
|
||
|
|
Using an object as a plugin option is currently only supported in JavaScript configuration files.`)}else return Number(b);return b});w[y.property]=A.length===1?A[0]:A}return o.push([{id:h,base:v.context.base,reference:!!v.context.reference,src:d.src},Object.keys(w).length>0?w:null]),a|=4,R.Replace([])}if(d.name==="@config"){if(d.nodes.length>0)throw new Error("`@config` cannot have a body.");if(v.parent!==null)throw new Error("`@config` cannot be nested.");return f.push({id:d.params.slice(1,-1),base:v.context.base,reference:!!v.context.reference,src:d.src}),a|=4,R.Replace([])}}),un(e);let u=e.resolveThemeValue;if(e.resolveThemeValue=function(p,v){return p.startsWith("--")?u(p,v):(a|=pn({designSystem:e,base:r,ast:i,sources:n,configs:[],pluginDetails:[]}),e.resolveThemeValue(p,v))},!o.length&&!f.length)return 0;let[c,m]=await Promise.all([Promise.all(f.map(async({id:d,base:p,reference:v,src:h})=>{let w=await t(d,p,"config");return{path:d,base:w.base,config:w.module,reference:v,src:h}})),Promise.all(o.map(async([{id:d,base:p,reference:v,src:h},w])=>{let y=await t(d,p,"plugin");return{path:d,base:y.base,plugin:y.module,options:w,reference:v,src:h}}))]);return a|=pn({designSystem:e,base:r,ast:i,sources:n,configs:c,pluginDetails:m}),a}function pn({designSystem:e,base:r,ast:i,sources:t,configs:n,pluginDetails:a}){let o=0,u=[...a.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}=kr(e,[{config:ln(e.theme),base:r,reference:!0,src:void 0},...u,{config:{plugins:[sn]},base:r,reference:!0,src:void 0}]),{resolvedConfig:m,replacedThemeKeys:d}=kr(e,u),p={designSystem:e,ast:i,resolvedConfig:c,featuresRef:{set current(w){o|=w}}},v=hr({...p,referenceMode:!1,src:void 0}),h=e.resolveThemeValue;e.resolveThemeValue=function(y,V){if(y[0]==="-"&&y[1]==="-")return h(y,V);let A=v.theme(y,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:y,src:V}of c.plugins){let A=hr({...p,referenceMode:y??!1,src:V});w(A)}if(ui(e,m,d),tn(e,m),fn(m,e),cn(m,e),an(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.`)),!na.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(i,(y,V)=>{if(y.kind!=="at-rule"||y.name!=="@tailwind"||y.params!=="utilities")return;let A=rt(V);return A.parent?.kind==="rule"&&A.parent.selector===w?R.Stop:R.ReplaceStop(G(w,[y]))})}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 y=!1;w.pattern[0]=="!"&&(y=!0,w.pattern=w.pattern.slice(1)),t.push({...w,negated:y})}return o}function mn({ast:e}){let r=new z(n=>pt(n.code)),i=new z(n=>({url:n.file,content:n.code,ignore:!1})),t={file:null,sources:[],mappings:[]};I(e,n=>{if(!n.src||!n.dst)return;let a=i.get(n.src[0]);if(!a.content)return;let o=r.get(n.src[0]),f=r.get(n.dst[0]),u=a.content.slice(n.src[1],n.src[2]),c=0;for(let p of u.split(`
|
||
|
|
`)){if(p.trim()!==""){let v=o.find(n.src[1]+c),h=f.find(n.dst[1]);t.mappings.push({name:null,originalPosition:{source:a,...v},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:a,...m},generatedPosition:d})});for(let n of r.keys())t.sources.push(i.get(n));return t.mappings.sort((n,a)=>n.generatedPosition.line-a.generatedPosition.line||n.generatedPosition.column-a.generatedPosition.column||(n.originalPosition?.line??0)-(a.originalPosition?.line??0)||(n.originalPosition?.column??0)-(a.originalPosition?.column??0)),t}var gn=/^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;function zt(e){let r=e.indexOf("{");if(r===-1)return[e];let i=[],t=e.slice(0,r),n=e.slice(r),a=0,o=n.lastIndexOf("}");for(let d=0;d<n.length;d++){let p=n[d];if(p==="{")a++;else if(p==="}"&&(a--,a===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;oa(f)?c=la(f):c=K(f,","),c=c.flatMap(d=>zt(d));let m=zt(u);for(let d of m)for(let p of c)i.push(t+p+d);return i}function oa(e){return gn.test(e)}function la(e){let r=e.match(gn);if(!r)return[e];let[,i,t,n]=r,a=n?parseInt(n,10):void 0,o=[];if(/^-?\d+$/.test(i)&&/^-?\d+$/.test(t)){let f=parseInt(i,10),u=parseInt(t,10);if(a===void 0&&(a=f<=u?1:-1),a===0)throw new Error("Step cannot be zero in sequence expansion.");let c=f<u;c&&a<0&&(a=-a),!c&&a>0&&(a=-a);for(let m=f;c?m<=u:m>=u;m+=a)o.push(m.toString())}return o}function hn(e,r){let i=new Set,t=new Set,n=[];function a(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),a(u,f),f.pop();i.add(o),t.delete(o),n.push(o)}}for(let o of e.keys())a(o);return n}var aa=/^[a-z]+$/,bt=(n=>(n[n.None=0]="None",n[n.AtProperty=1]="AtProperty",n[n.ColorMix=2]="ColorMix",n[n.All=3]="All",n))(bt||{});function sa(){throw new Error("No `loadModule` function provided to `compile`")}function ua(){throw new Error("No `loadStylesheet` function provided to `compile`")}function ca(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 Ie=(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))(Ie||{});async function vn(e,{base:r="",from:i,loadModule:t=sa,loadStylesheet:n=ua}={}){let a=0;e=[ve({base:r},e)],a|=await gr(e,r,n,0,i!==void 0);let o=null,f=new kt,u=new Map,c=new Map,m=[],d=null,p=null,v=[],h=[],w=[],y=[],V=null;I(e,(b,D)=>{if(b.kind!=="at-rule")return;let E=rt(D);if(b.name==="@tailwind"&&(b.params==="utilities"||b.params.startsWith("utilities"))){if(p!==null)return R.Replace([]);if(E.context.reference)return R.Replace([]);let N=K(b.params," ");for(let L of N)if(L.startsWith("source(")){let _=L.slice(7,-1);if(_==="none"){V=_;continue}if(_[0]==='"'&&_[_.length-1]!=='"'||_[0]==="'"&&_[_.length-1]!=="'"||_[0]!=="'"&&_[0]!=='"')throw new Error("`source(\u2026)` paths must be quoted.");V={base:E.context.sourceBase??E.context.base,pattern:_.slice(1,-1)}}p=b,a|=16}if(b.name==="@utility"){if(E.parent!==null)throw new Error("`@utility` cannot be nested.");if(b.nodes.length===0)throw new Error(`\`@utility ${b.params}\` is empty. Utilities should include at least one property.`);let N=ii(b);if(N===null){if(!b.params.endsWith("-*")){if(b.params.endsWith("*"))throw new Error(`\`@utility ${b.params}\` defines an invalid utility name. A functional utility must end in \`-*\`.`);if(b.params.includes("*"))throw new Error(`\`@utility ${b.params}\` defines an invalid utility name. The dynamic portion marked by \`-*\` must appear once at the end.`)}throw new Error(`\`@utility ${b.params}\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter.`)}m.push(N)}if(b.name==="@source"){if(b.nodes.length>0)throw new Error("`@source` cannot have a body.")
|
||
|
|
`).map((q,H,ue)=>`${H===0||H>=ue.length-2?" ":">"} ${q}`).join(`
|
||
|
|
`);throw new Error(`\`@theme\` blocks must only contain custom properties or \`@keyframes\`.
|
||
|
|
|
||
|
|
${M}`)}),d?R.ReplaceSkip([]):(d=G(":root, :host",[]),d.src=b.src,R.ReplaceSkip(d))}});let A=Bi(f,p?.src);if(o&&(A.important=o),y.length>0)for(let b of y)A.invalidCandidates.add(b);a|=await dn({designSystem:A,base:r,ast:e,loadModule:t,sources:h});for(let b of u.keys())A.variants.static(b,()=>{});for(let b of hn(c,{onCircularDependency(D,E){let N=ne(D.map((L,_)=>W("@custom-variant",L,[W("@variant",D[_+1]??E,[])]))).replaceAll(";"," { \u2026 }").replace(`@custom-variant ${E} {`,`@custom-variant ${E} { /* \u2190 */`);throw new Error(`Circular dependency detected in custom variants:
|
||
|
|
|
||
|
|
${N}`)}}))u.get(b)?.(A);for(let b of m)b(A);if(d){let b=[];for(let[E,N]of A.theme.entries()){if(N.options&2)continue;let L=l(Se(E),N.value);L.src=N.src,b.push(L)}let D=A.theme.getKeyframes();for(let E of D)e.push(ve({theme:!0},[B([E])]));d.nodes=[ve({theme:!0},b)]}if(a|=ut(e,A),a|=Be(e,A),a|=Ee(e,A),p){let b=p;b.kind="context",b.context={}}return I(e,b=>{if(b.kind==="at-rule")return b.name==="@utility"?R.Replace([]):R.Skip}),{designSystem:A,ast:e,sources:h,root:V,utilitiesNode:p,features:a,inlineCandidates:w}}async function kn(e,r={}){let{designSystem:i,ast:t,sources:n,root:a,utilitiesNode:o,features:f,inlineCandidates:u}=await vn(e,r);t.unshift(vt(`! tailwindcss v${wr} | MIT License | https://tailwindcss.com `));function c(h){i.invalidCandidates.add(h)}let m=new Set,d=null,p=0,v=!1;for(let h of u)i.invalidCandidates.has(h)||(m.add(h),v=!0);return{sources:n,root:a,features:f,build(h){if(f===0)return e;if(!o)return d??=Pe(t,i,r.polyfills),d;let w=v,y=!1;v=!1;let V=m.size;for(let b of h)if(!i.invalidCandidates.has(b))if(b[0]==="-"&&b[1]==="-"){let D=i.theme.markUsedVariable(b);w||=D,y||=D}else m.add(b),w||=m.size!==V;if(!w)return d??=Pe(t,i,r.polyfills),d;let A=Ne(m,i,{onInvalidCandidate:c}).astNodes;return r.from&&I(A,b=>{b.src??=o.src}),!y&&p===A.length?(d??=Pe(t,i,r.polyfills),d):(p=A.length,o.nodes=A,d=Pe(t,i,r.polyfills),d)}}}async function fa(e,r={}){let i=Oe(e,{from:r.from}),t=await kn(i,r),n=i,a=e;return{...t,build(o){let f=t.build(o);return f===n||(a=ne(f,!!r.from),n=f),a},buildSourceMap(){return mn({ast:n})}}}async function pa(e,r={}){return(await vn(Oe(e,{from:r.from}),r)).designSystem}function ft(){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 Kt)e!=="default"&&(ft[e]=Kt[e]);module.exports=ft;
|