@tailwindcss/upgrade 4.0.0-alpha.33 → 4.0.0-alpha.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +53 -50
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{globby as di}from"globby";import pi from"node:fs/promises";import No from"node:path";import Po from"postcss";import ft from"postcss";import{format as ct}from"prettier";function x(e,t){let r;return e.each?.((n,i)=>{let o=t(n,i,e)??0;if(o===2)return r=!1,r;if(o!==1)return r=x(n,t),r}),r}function ze(e,t){e?.each?.(r=>{ze(r,t),t(r)})}var dt={parser:"css",semi:!0,singleQuote:!0};function pt(){async function e(t){let r=[];x(t,(i,o,a)=>{i.type==="atrule"&&(i.raws.semicolon=!0),i.type==="atrule"&&i.name==="tw-bucket"?r.push(i):i.raws.tailwind_pretty&&(i.parent??=a,r.unshift(i))});let n=[];for(let i of r){let o=i.type==="atrule"&&i.name==="tw-bucket"?i.toString().trim().replace(/@tw-bucket(.*?){([\s\S]*)}/,"$2"):i.toString();if(i.type==="atrule"&&i.name==="tw-bucket"&&i.params==="user"){n.push(o);continue}if(i.type==="atrule"&&i.name==="tw-bucket"){n.push(await ct(o,dt));continue}i.replaceWith(ft.parse(`${i.raws.before??""}${(await ct(o,dt)).trim()}`))}t.removeAll(),t.append(ft.parse(n.map(i=>i.trim()).filter(Boolean).join(`
|
|
2
|
+
var Bn=Object.create;var $t=Object.defineProperty;var qn=Object.getOwnPropertyDescriptor;var Jn=Object.getOwnPropertyNames;var Gn=Object.getPrototypeOf,Hn=Object.prototype.hasOwnProperty;var Yn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Qn=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Jn(t))!Hn.call(e,n)&&n!==r&&$t(e,n,{get:()=>t[n],enumerable:!(i=qn(t,n))||i.enumerable});return e};var Zn=(e,t,r)=>(r=e!=null?Bn(Gn(e)):{},Qn(t||!e||!e.__esModule?$t(r,"default",{value:e,enumerable:!0}):r,e));var wn=Yn((Nf,vn)=>{"use strict";var Mo=["anchor-size"],Cf=new RegExp(`(${Mo.join("|")})\\(`,"g"),Be=new Uint8Array(256);function Lo(e,t){let r=0,i=[],n=0,l=e.length,a=t.charCodeAt(0);for(let s=0;s<l;s++){let o=e.charCodeAt(s);if(r===0&&o===a){i.push(e.slice(n,s)),n=s+1;continue}switch(o){case 92:s+=1;break;case 39:case 34:for(;++s<l;){let u=e.charCodeAt(s);if(u===92){s+=1;continue}if(u===o)break}break;case 40:Be[r]=41,r++;break;case 91:Be[r]=93,r++;break;case 123:Be[r]=125,r++;break;case 93:case 125:case 41:r>0&&o===Be[r-1]&&r--;break}}return i.push(e.slice(n)),i}var ne=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,Sf=new RegExp(`^${ne.source}$`),Af=new RegExp(`^${ne.source}%$`),zo=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],$f=new RegExp(`^${ne.source}(${zo.join("|")})$`),Wo=["deg","rad","grad","turn"],Tf=new RegExp(`^${ne.source}(${Wo.join("|")})$`),Vf=new RegExp(`^${ne.source} +${ne.source} +${ne.source}$`);function Y(e){let t=Number(e);return Number.isInteger(t)&&t>=0&&String(t)===String(e)}var Bo={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(0.984 0.003 247.858)",100:"oklch(0.968 0.007 247.896)",200:"oklch(0.929 0.013 255.508)",300:"oklch(0.869 0.022 252.894)",400:"oklch(0.704 0.04 256.788)",500:"oklch(0.554 0.046 257.417)",600:"oklch(0.446 0.043 257.281)",700:"oklch(0.372 0.044 257.287)",800:"oklch(0.279 0.041 260.031)",900:"oklch(0.208 0.042 265.755)",950:"oklch(0.129 0.042 264.695)"},gray:{50:"oklch(0.985 0.002 247.839)",100:"oklch(0.967 0.003 264.542)",200:"oklch(0.928 0.006 264.531)",300:"oklch(0.872 0.01 258.338)",400:"oklch(0.707 0.022 261.325)",500:"oklch(0.551 0.027 264.364)",600:"oklch(0.446 0.03 256.802)",700:"oklch(0.373 0.034 259.733)",800:"oklch(0.278 0.033 256.848)",900:"oklch(0.21 0.034 264.665)",950:"oklch(0.13 0.028 261.692)"},zinc:{50:"oklch(0.985 0 0)",100:"oklch(0.967 0.001 286.375)",200:"oklch(0.92 0.004 286.32)",300:"oklch(0.871 0.006 286.286)",400:"oklch(0.705 0.015 286.067)",500:"oklch(0.552 0.016 285.938)",600:"oklch(0.442 0.017 285.786)",700:"oklch(0.37 0.013 285.805)",800:"oklch(0.274 0.006 286.033)",900:"oklch(0.21 0.006 285.885)",950:"oklch(0.141 0.005 285.823)"},neutral:{50:"oklch(0.985 0 0)",100:"oklch(0.97 0 0)",200:"oklch(0.922 0 0)",300:"oklch(0.87 0 0)",400:"oklch(0.708 0 0)",500:"oklch(0.556 0 0)",600:"oklch(0.439 0 0)",700:"oklch(0.371 0 0)",800:"oklch(0.269 0 0)",900:"oklch(0.205 0 0)",950:"oklch(0.145 0 0)"},stone:{50:"oklch(0.985 0.001 106.423)",100:"oklch(0.97 0.001 106.424)",200:"oklch(0.923 0.003 48.717)",300:"oklch(0.869 0.005 56.366)",400:"oklch(0.709 0.01 56.259)",500:"oklch(0.553 0.013 58.071)",600:"oklch(0.444 0.011 73.639)",700:"oklch(0.374 0.01 67.558)",800:"oklch(0.268 0.007 34.298)",900:"oklch(0.216 0.006 56.043)",950:"oklch(0.147 0.004 49.25)"},red:{50:"oklch(0.971 0.013 17.38)",100:"oklch(0.936 0.032 17.717)",200:"oklch(0.885 0.062 18.334)",300:"oklch(0.808 0.114 19.571)",400:"oklch(0.704 0.191 22.216)",500:"oklch(0.637 0.237 25.331)",600:"oklch(0.577 0.245 27.325)",700:"oklch(0.505 0.213 27.518)",800:"oklch(0.444 0.177 26.899)",900:"oklch(0.396 0.141 25.723)",950:"oklch(0.258 0.092 26.042)"},orange:{50:"oklch(0.98 0.016 73.684)",100:"oklch(0.954 0.038 75.164)",200:"oklch(0.901 0.076 70.697)",300:"oklch(0.837 0.128 66.29)",400:"oklch(0.75 0.183 55.934)",500:"oklch(0.705 0.213 47.604)",600:"oklch(0.646 0.222 41.116)",700:"oklch(0.553 0.195 38.402)",800:"oklch(0.47 0.157 37.304)",900:"oklch(0.408 0.123 38.172)",950:"oklch(0.266 0.079 36.259)"},amber:{50:"oklch(0.987 0.022 95.277)",100:"oklch(0.962 0.059 95.617)",200:"oklch(0.924 0.12 95.746)",300:"oklch(0.879 0.169 91.605)",400:"oklch(0.828 0.189 84.429)",500:"oklch(0.769 0.188 70.08)",600:"oklch(0.666 0.179 58.318)",700:"oklch(0.555 0.163 48.998)",800:"oklch(0.473 0.137 46.201)",900:"oklch(0.414 0.112 45.904)",950:"oklch(0.279 0.077 45.635)"},yellow:{50:"oklch(0.987 0.026 102.212)",100:"oklch(0.973 0.071 103.193)",200:"oklch(0.945 0.129 101.54)",300:"oklch(0.905 0.182 98.111)",400:"oklch(0.852 0.199 91.936)",500:"oklch(0.795 0.184 86.047)",600:"oklch(0.681 0.162 75.834)",700:"oklch(0.554 0.135 66.442)",800:"oklch(0.476 0.114 61.907)",900:"oklch(0.421 0.095 57.708)",950:"oklch(0.286 0.066 53.813)"},lime:{50:"oklch(0.986 0.031 120.757)",100:"oklch(0.967 0.067 122.328)",200:"oklch(0.938 0.127 124.321)",300:"oklch(0.897 0.196 126.665)",400:"oklch(0.841 0.238 128.85)",500:"oklch(0.768 0.233 130.85)",600:"oklch(0.648 0.2 131.684)",700:"oklch(0.532 0.157 131.589)",800:"oklch(0.453 0.124 130.933)",900:"oklch(0.405 0.101 131.063)",950:"oklch(0.274 0.072 132.109)"},green:{50:"oklch(0.982 0.018 155.826)",100:"oklch(0.962 0.044 156.743)",200:"oklch(0.925 0.084 155.995)",300:"oklch(0.871 0.15 154.449)",400:"oklch(0.792 0.209 151.711)",500:"oklch(0.723 0.219 149.579)",600:"oklch(0.627 0.194 149.214)",700:"oklch(0.527 0.154 150.069)",800:"oklch(0.448 0.119 151.328)",900:"oklch(0.393 0.095 152.535)",950:"oklch(0.266 0.065 152.934)"},emerald:{50:"oklch(0.979 0.021 166.113)",100:"oklch(0.95 0.052 163.051)",200:"oklch(0.905 0.093 164.15)",300:"oklch(0.845 0.143 164.978)",400:"oklch(0.765 0.177 163.223)",500:"oklch(0.696 0.17 162.48)",600:"oklch(0.596 0.145 163.225)",700:"oklch(0.508 0.118 165.612)",800:"oklch(0.432 0.095 166.913)",900:"oklch(0.378 0.077 168.94)",950:"oklch(0.262 0.051 172.552)"},teal:{50:"oklch(0.984 0.014 180.72)",100:"oklch(0.953 0.051 180.801)",200:"oklch(0.91 0.096 180.426)",300:"oklch(0.855 0.138 181.071)",400:"oklch(0.777 0.152 181.912)",500:"oklch(0.704 0.14 182.503)",600:"oklch(0.6 0.118 184.704)",700:"oklch(0.511 0.096 186.391)",800:"oklch(0.437 0.078 188.216)",900:"oklch(0.386 0.063 188.416)",950:"oklch(0.277 0.046 192.524)"},cyan:{50:"oklch(0.984 0.019 200.873)",100:"oklch(0.956 0.045 203.388)",200:"oklch(0.917 0.08 205.041)",300:"oklch(0.865 0.127 207.078)",400:"oklch(0.789 0.154 211.53)",500:"oklch(0.715 0.143 215.221)",600:"oklch(0.609 0.126 221.723)",700:"oklch(0.52 0.105 223.128)",800:"oklch(0.45 0.085 224.283)",900:"oklch(0.398 0.07 227.392)",950:"oklch(0.302 0.056 229.695)"},sky:{50:"oklch(0.977 0.013 236.62)",100:"oklch(0.951 0.026 236.824)",200:"oklch(0.901 0.058 230.902)",300:"oklch(0.828 0.111 230.318)",400:"oklch(0.746 0.16 232.661)",500:"oklch(0.685 0.169 237.323)",600:"oklch(0.588 0.158 241.966)",700:"oklch(0.5 0.134 242.749)",800:"oklch(0.443 0.11 240.79)",900:"oklch(0.391 0.09 240.876)",950:"oklch(0.293 0.066 243.157)"},blue:{50:"oklch(0.97 0.014 254.604)",100:"oklch(0.932 0.032 255.585)",200:"oklch(0.882 0.059 254.128)",300:"oklch(0.809 0.105 251.813)",400:"oklch(0.707 0.165 254.624)",500:"oklch(0.623 0.214 259.815)",600:"oklch(0.546 0.245 262.881)",700:"oklch(0.488 0.243 264.376)",800:"oklch(0.424 0.199 265.638)",900:"oklch(0.379 0.146 265.522)",950:"oklch(0.282 0.091 267.935)"},indigo:{50:"oklch(0.962 0.018 272.314)",100:"oklch(0.93 0.034 272.788)",200:"oklch(0.87 0.065 274.039)",300:"oklch(0.785 0.115 274.713)",400:"oklch(0.673 0.182 276.935)",500:"oklch(0.585 0.233 277.117)",600:"oklch(0.511 0.262 276.966)",700:"oklch(0.457 0.24 277.023)",800:"oklch(0.398 0.195 277.366)",900:"oklch(0.359 0.144 278.697)",950:"oklch(0.257 0.09 281.288)"},violet:{50:"oklch(0.969 0.016 293.756)",100:"oklch(0.943 0.029 294.588)",200:"oklch(0.894 0.057 293.283)",300:"oklch(0.811 0.111 293.571)",400:"oklch(0.702 0.183 293.541)",500:"oklch(0.606 0.25 292.717)",600:"oklch(0.541 0.281 293.009)",700:"oklch(0.491 0.27 292.581)",800:"oklch(0.432 0.232 292.759)",900:"oklch(0.38 0.189 293.745)",950:"oklch(0.283 0.141 291.089)"},purple:{50:"oklch(0.977 0.014 308.299)",100:"oklch(0.946 0.033 307.174)",200:"oklch(0.902 0.063 306.703)",300:"oklch(0.827 0.119 306.383)",400:"oklch(0.714 0.203 305.504)",500:"oklch(0.627 0.265 303.9)",600:"oklch(0.558 0.288 302.321)",700:"oklch(0.496 0.265 301.924)",800:"oklch(0.438 0.218 303.724)",900:"oklch(0.381 0.176 304.987)",950:"oklch(0.291 0.149 302.717)"},fuchsia:{50:"oklch(0.977 0.017 320.058)",100:"oklch(0.952 0.037 318.852)",200:"oklch(0.903 0.076 319.62)",300:"oklch(0.833 0.145 321.434)",400:"oklch(0.74 0.238 322.16)",500:"oklch(0.667 0.295 322.15)",600:"oklch(0.591 0.293 322.896)",700:"oklch(0.518 0.253 323.949)",800:"oklch(0.452 0.211 324.591)",900:"oklch(0.401 0.17 325.612)",950:"oklch(0.293 0.136 325.661)"},pink:{50:"oklch(0.971 0.014 343.198)",100:"oklch(0.948 0.028 342.258)",200:"oklch(0.899 0.061 343.231)",300:"oklch(0.823 0.12 346.018)",400:"oklch(0.718 0.202 349.761)",500:"oklch(0.656 0.241 354.308)",600:"oklch(0.592 0.249 0.584)",700:"oklch(0.525 0.223 3.958)",800:"oklch(0.459 0.187 3.815)",900:"oklch(0.408 0.153 2.432)",950:"oklch(0.284 0.109 3.907)"},rose:{50:"oklch(0.969 0.015 12.422)",100:"oklch(0.941 0.03 12.58)",200:"oklch(0.892 0.058 10.001)",300:"oklch(0.81 0.117 11.638)",400:"oklch(0.712 0.194 13.428)",500:"oklch(0.645 0.246 16.439)",600:"oklch(0.586 0.253 17.585)",700:"oklch(0.514 0.222 16.935)",800:"oklch(0.455 0.188 13.697)",900:"oklch(0.41 0.159 10.272)",950:"oklch(0.271 0.105 12.094)"}};function ie(e){return{__BARE_VALUE__:e}}var K=ie(e=>{if(Y(e.value))return e.value}),V=ie(e=>{if(Y(e.value))return`${e.value}%`}),H=ie(e=>{if(Y(e.value))return`${e.value}px`}),hn=ie(e=>{if(Y(e.value))return`${e.value}ms`}),qe=ie(e=>{if(Y(e.value))return`${e.value}deg`}),qo=ie(e=>{if(e.fraction===null)return;let[t,r]=Lo(e.fraction,"/");if(!(!Y(t)||!Y(r)))return e.fraction}),yn=ie(e=>{if(Y(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),Jo={accentColor:({theme:e})=>e("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...qo},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>({...e("brightness"),...V}),backdropContrast:({theme:e})=>({...e("contrast"),...V}),backdropGrayscale:({theme:e})=>({...e("grayscale"),...V}),backdropHueRotate:({theme:e})=>({...e("hueRotate"),...qe}),backdropInvert:({theme:e})=>({...e("invert"),...V}),backdropOpacity:({theme:e})=>({...e("opacity"),...V}),backdropSaturate:({theme:e})=>({...e("saturate"),...V}),backdropSepia:({theme:e})=>({...e("sepia"),...V}),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({DEFAULT:"currentColor",...e("colors")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>e("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...H},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...V},caretColor:({theme:e})=>e("colors"),colors:()=>({...Bo}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...K},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...V},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>({...e("borderWidth"),...H}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>e("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...e("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...K},flexShrink:{0:"0",DEFAULT:"1",...K},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...V},grayscale:{0:"0",DEFAULT:"100%",...V},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...K},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...K},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...K},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...K},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...yn},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...yn},height:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...qe},inset:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),invert:{0:"0",DEFAULT:"100%",...V},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...K},maxHeight:({theme:e})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),maxWidth:({theme:e})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e("spacing")}),minHeight:({theme:e})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),minWidth:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...V},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...K},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...H},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...H},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:"currentColor",...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...H},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...H},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...qe},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...V},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...V},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:e})=>e("spacing"),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%",...V},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...qe},space:({theme:e})=>e("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...K},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...H},textIndent:({theme:e})=>e("spacing"),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...H},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...hn},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...hn},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),size:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),width:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...K}};vn.exports=Jo});import{globby as Ln}from"globby";import zn from"node:fs/promises";import Pl from"node:path";import El from"postcss";import Tt from"postcss";import{format as Vt}from"prettier";function A(e,t){let r;return e.each?.((i,n)=>{let l=t(i,n,e)??0;if(l===2)return r=!1,r;if(l!==1)return r=A(i,t),r}),r}function rt(e,t){e?.each?.(r=>{rt(r,t),t(r)})}var Nt={parser:"css",semi:!0,singleQuote:!0};function Rt(){async function e(t){let r=[];A(t,(n,l,a)=>{n.type==="atrule"&&(n.raws.semicolon=!0),n.type==="atrule"&&n.name==="tw-bucket"?r.push(n):n.raws.tailwind_pretty&&(n.parent??=a,r.unshift(n))});let i=[];for(let n of r){let l=n.type==="atrule"&&n.name==="tw-bucket"?n.toString().trim().replace(/@tw-bucket(.*?){([\s\S]*)}/,"$2"):n.toString();if(n.type==="atrule"&&n.name==="tw-bucket"&&n.params==="user"){i.push(l);continue}if(n.type==="atrule"&&n.name==="tw-bucket"){i.push(await Vt(l,Nt));continue}n.replaceWith(Tt.parse(`${n.raws.before??""}${(await Vt(l,Nt)).trim()}`))}t.removeAll(),t.append(Tt.parse(i.map(n=>n.trim()).filter(Boolean).join(`
|
|
3
3
|
|
|
4
|
-
`)))}return{postcssPlugin:"@tailwindcss/upgrade/format-nodes",OnceExit:e}}import
|
|
4
|
+
`)))}return{postcssPlugin:"@tailwindcss/upgrade/format-nodes",OnceExit:e}}import Xn from"postcss";var k=class extends Map{constructor(r){super();this.factory=r}get(r){let i=super.get(r);return i===void 0&&(i=this.factory(r,this),this.set(r,i)),i}};var _t=["import","config","plugin","source","variant","theme","compatibility","utility","user"];function Ot(){async function e(t){{let s=function(o,...u){a=o,l.get(o).nodes?.push(...n.splice(0),...u)};var i=s;let n=[],l=new k(o=>{let u=Xn.atRule({name:"tw-bucket",params:o,nodes:[]});return t.append(u),u});t.walkAtRules("tw-bucket",o=>{l.set(o.params,o)});let a="user";A(t,o=>{if(o.type==="atrule"&&o.name==="tw-bucket")return 1;if(o.type==="comment"){if(n.length>0){n.push(o);return}let u=Pt(o.prev(),o)??1/0,c=Pt(o,o.next())??1/0;u<c?l.get(a).nodes?.push(o):n.push(o)}else o.type==="atrule"&&["config","plugin","source","theme","utility","variant"].includes(o.name)?s(o.name,o):o.type==="atrule"&&o.name==="layer"&&!o.nodes||o.type==="atrule"&&o.name==="import"||o.type==="atrule"&&o.name==="charset"||o.type==="atrule"&&o.name==="tailwind"?s("import",o):(o.type==="rule"||o.type,s("user",o));return 1}),n.length>0&&s(a)}let r=new Map;t.walkAtRules("tw-bucket",n=>{let l=r.get(n.params);if(!l){r.set(n.params,n);return}n.nodes&&l.append(...n.nodes)}),t.walkAtRules("tw-bucket",n=>{n.nodes?.length||n.remove()});{let n=Array.from(r.values()).sort((l,a)=>{let s=_t.indexOf(l.params),o=_t.indexOf(a.params);return s-o});t.removeAll(),t.append(n)}}return{postcssPlugin:"@tailwindcss/upgrade/sort-buckets",OnceExit:e}}function Pt(e,t){return!e||!t||!e.source||!t.source||!e.source.start||!t.source.start||!e.source.end||!t.source.end?null:Math.abs(e.source.end.line-t.source.start.line)}import W from"picocolors";import oi from"node:fs";import It from"node:path";import{stripVTControlCharacters as Kt}from"node:util";import _ from"picocolors";import oe from"enhanced-resolve";import nt from"node:fs";import{createRequire as ei}from"node:module";var ti=ei(import.meta.url).resolve;function Dt(e){if(typeof globalThis.__tw_resolve=="function"){let t=globalThis.__tw_resolve(e);if(t)return t}return ti(e)}var ri=oe.ResolverFactory.createResolver({fileSystem:new oe.CachedInputFileSystem(nt,4e3),useSyncFileSystemCalls:!0,extensions:[".js",".json",".node",".ts"],conditionNames:["node","import"]}),ni=oe.ResolverFactory.createResolver({fileSystem:new oe.CachedInputFileSystem(nt,4e3),useSyncFileSystemCalls:!0,extensions:[".js",".json",".node",".ts"],conditionNames:["node","require"]});function jt(e,t){try{return ri.resolveSync({},t,e)}catch{return ni.resolveSync({},t,e)}}var ii=oe.ResolverFactory.createResolver({fileSystem:new oe.CachedInputFileSystem(nt,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"]});function it(e,t){return ii.resolveSync({},t,e)}var Ae={indent:2};function $e(){return`${_.italic(_.bold(_.blue("\u2248")))} tailwindcss ${_.blue(`v${li()}`)}`}function y(e){return`${_.dim(_.blue("`"))}${_.blue(e)}${_.dim(_.blue("`"))}`}function N(e,t=process.cwd(),{preferAbsoluteIfShorter:r=!0}={}){let i=It.relative(t,e);return i.startsWith("..")||(i=`.${It.sep}${i}`),r&&i.length>e.length?e:i}function pe(e,t){if(e.includes(`
|
|
5
5
|
`))return e.split(`
|
|
6
|
-
`).flatMap(a=>
|
|
7
|
-
`)}function
|
|
8
|
-
`)}function
|
|
6
|
+
`).flatMap(a=>pe(a,t));let r=e.split(" "),i=[],n="",l=0;for(let a of r){let s=Kt(a).length;l+s+1>t&&(i.push(n),n="",l=0),n+=(l?" ":"")+a,l+=s+(l?1:0)}return l&&i.push(n),i}function de(e,t=0){return`${" ".repeat(t+Ae.indent)}${e}`}function Te(e,{art:t=_.gray("\u2502"),prefix:r="",print:i=z}){let n=r.length,l=" ",a=l.length,s=Kt(t).length,u=process.stderr.columns-n-a*2-s;pe(e,u).map((c,f)=>i(`${t}${l}${f===0?r:" ".repeat(n)}${c}${l}`)),i()}function $(e,{prefix:t="",print:r=z}={}){Te(e,{art:_.green("\u2502"),prefix:t,print:r})}function E(e,{prefix:t="",print:r=z}={}){Te(e,{art:_.blue("\u2502"),prefix:t,print:r})}function P(e,{prefix:t="",print:r=z}={}){Te(e,{art:_.red("\u2502"),prefix:t,print:r})}function Ve(e,{prefix:t="",print:r=z}={}){Te(e,{art:_.yellow("\u2502"),prefix:t,print:r})}function z(e=""){process.stderr.write(`${e}
|
|
7
|
+
`)}function O(e=""){process.stdout.write(`${e}
|
|
8
|
+
`)}function li(){if(typeof globalThis.__tw_version=="string")return globalThis.__tw_version;let{version:e}=JSON.parse(oi.readFileSync(Dt("tailwindcss/package.json"),"utf-8"));return e}function Ft({invalid:e,usage:t,options:r}){let i=process.stdout.columns;if(O($e()),e&&(O(),O(`${W.dim("Invalid command:")} ${e}`)),t&&t.length>0){O(),O(W.dim("Usage:"));for(let[n,l]of t.entries()){let a=l.slice(0,l.indexOf("[")),s=l.slice(l.indexOf("["));s=s.replace(/\[.*?\]/g,c=>W.dim(c));let u=pe(s,i-Ae.indent-a.length-1);u.length>1&&n!==0&&O(),O(de(`${a}${u.shift()}`));for(let c of u)O(de(c,a.length))}}if(r){let n=0;for(let{alias:o}of Object.values(r))o&&(n=Math.max(n,o.length));let l=[],a=0;for(let[o,{alias:u}]of Object.entries(r)){let c=[u&&`${u.padStart(n)}`,u?o:" ".repeat(n+2)+o].filter(Boolean).join(", ");l.push(c),a=Math.max(a,c.length)}O(),O(W.dim("Options:"));let s=8;for(let{description:o,default:u=null}of Object.values(r)){let c=l.shift(),f=s+(a-c.length),p=2,d=i-c.length-f-p-Ae.indent,m=pe(u!==null?`${o} ${W.dim(`[default:\u202F${y(`${u}`)}]`)}`:o,d);O(de(`${W.blue(c)} ${W.dim(W.gray("\xB7")).repeat(f)} ${m.shift()}`));for(let h of m)O(de(`${" ".repeat(c.length+f+p)}${h}`))}}}import{normalizePath as Ko}from"@tailwindcss/node";import{isGitIgnored as Fo}from"globby";import G from"node:path";import We from"postcss";var Ne=new Uint8Array(256);function v(e,t){let r=0,i=[],n=0,l=e.length,a=t.charCodeAt(0);for(let s=0;s<l;s++){let o=e.charCodeAt(s);if(r===0&&o===a){i.push(e.slice(n,s)),n=s+1;continue}switch(o){case 92:s+=1;break;case 39:case 34:for(;++s<l;){let u=e.charCodeAt(s);if(u===92){s+=1;continue}if(u===o)break}break;case 40:Ne[r]=41,r++;break;case 91:Ne[r]=93,r++;break;case 123:Ne[r]=125,r++;break;case 93:case 125:case 41:r>0&&o===Ne[r-1]&&r--;break}}return i.push(e.slice(n)),i}import Tr from"node:fs/promises";import Vr,{extname as Xi}from"node:path";import{Scanner as mi}from"@tailwindcss/oxide";function ot(e){return{kind:"word",value:e}}function ai(e,t){return{kind:"function",value:e,nodes:t}}function si(e){return{kind:"separator",value:e}}function I(e,t,r=null){for(let i=0;i<e.length;i++){let n=e[i],l=t(n,{parent:r,replaceWith(a){e.splice(i,1,...Array.isArray(a)?a:[a]),i--}})??0;if(l===2)return;l!==1&&n.kind==="function"&&I(n.nodes,t,n)}}function C(e){let t="";for(let r of e)switch(r.kind){case"word":case"separator":{t+=r.value;break}case"function":t+=r.value+"("+C(r.nodes)+")"}return t}var ui=92,ci=41,Ut=58,Mt=44,fi=34,Lt=61,zt=62,Wt=60,Bt=10,pi=40,di=39,qt=47,Jt=32,Gt=9;function T(e){e=e.replaceAll(`\r
|
|
9
9
|
`,`
|
|
10
|
-
`);let t=[],r=[],n=null,i="",o;for(let a=0;a<e.length;a++){let s=e.charCodeAt(a);switch(s){case kt:case xt:case Ct:case At:case St:case $t:case Tt:case Vt:case _t:{if(i.length>0){let d=Be(i);n?n.nodes.push(d):t.push(d),i=""}let l=a,u=a+1;for(;u<e.length&&(o=e.charCodeAt(u),!(o!==kt&&o!==xt&&o!==Ct&&o!==At&&o!==St&&o!==$t&&o!==Tt&&o!==Vt&&o!==_t));u++);a=u-1;let f=Ai(e.slice(l,u));n?n.nodes.push(f):t.push(f);break}case _i:case Ti:{let l=a;for(let u=a+1;u<e.length;u++)if(o=e.charCodeAt(u),o===Si)u+=1;else if(o===s){a=u;break}i+=e.slice(l,a+1);break}case Vi:{let l=Ci(i,[]);i="",n?n.nodes.push(l):t.push(l),r.push(l),n=l;break}case $i:{let l=r.pop();if(i.length>0){let u=Be(i);l.nodes.push(u),i=""}r.length>0?n=r[r.length-1]:n=null;break}default:i+=String.fromCharCode(s)}}return i.length>0&&t.push(Be(i)),t}async function Rt(e,t="html"){let n=new Ri({}).getCandidatesWithPositions({content:e,extension:t}),i=[];for(let{candidate:o,position:a}of n)i.push({rawCandidate:o,start:a,end:a+o.length});return i}function w(e,t){let r=[];for(let i of t.variants)r.unshift(Nt(i));e.theme.prefix&&r.unshift(e.theme.prefix);let n="";return t.kind==="static"&&(n+=t.root),t.kind==="functional"&&(n+=t.root,t.value&&(t.value.kind==="arbitrary"?t.value===null?n+="":t.value.dataType?n+=`-[${t.value.dataType}:${W(t.value.value)}]`:n+=`-[${W(t.value.value)}]`:t.value.kind==="named"&&(n+=`-${t.value.value}`))),t.kind==="arbitrary"&&(n+=`[${t.property}:${W(t.value)}]`),(t.kind==="arbitrary"||t.kind==="functional")&&t.modifier&&(t.modifier.kind==="arbitrary"?n+=`/[${W(t.modifier.value)}]`:t.modifier.kind==="named"&&(n+=`/${t.modifier.value}`)),t.important&&(n+="!"),r.push(n),r.join(":")}function Nt(e){if(e.kind==="static")return e.root;if(e.kind==="arbitrary")return`[${W(Ni(e.selector))}]`;let t="";return e.kind==="functional"&&(t+=e.root,e.value&&(e.value.kind==="arbitrary"?t+=`-[${W(e.value.value)}]`:e.value.kind==="named"&&(t+=`-${e.value.value}`))),e.kind==="compound"&&(t+=e.root,t+="-",t+=Nt(e.variant)),(e.kind==="functional"||e.kind==="compound")&&e.modifier&&(e.modifier.kind==="arbitrary"?t+=`/[${W(e.modifier.value)}]`:e.modifier.kind==="named"&&(t+=`/${e.modifier.value}`)),t}function W(e){let t=A(e),r=new Set;return P(t,(n,{parent:i})=>{let o=i===null?t:i.nodes??[];if(n.kind==="word"&&(n.value==="+"||n.value==="-"||n.value==="*"||n.value==="/")){let a=o.indexOf(n)??-1;if(a===-1)return;let s=o[a-1];if(s?.kind!=="separator"||s.value!==" ")return;let l=o[a+1];if(l?.kind!=="separator"||l.value!==" ")return;r.add(s),r.add(l)}else n.kind==="separator"&&n.value.trim()==="/"?n.value="/":n.kind==="separator"&&n.value.length>0&&n.value.trim()===""?(o[0]===n||o[o.length-1]===n)&&r.add(n):n.kind==="separator"&&n.value.trim()===","&&(n.value=",")}),r.size>0&&P(t,(n,{replaceWith:i})=>{r.has(n)&&(r.delete(n),i([]))}),qe(t),b(t)}function Ni(e){let t=A(e);return t.length===3&&t[0].kind==="word"&&t[0].value==="&"&&t[1].kind==="separator"&&t[1].value===":"&&t[2].kind==="function"&&t[2].value==="is"?b(t[2].nodes):e}function qe(e){for(let t of e)switch(t.kind){case"function":{if(t.value==="url"||t.value.endsWith("_url")){t.value=ge(t.value);break}if(t.value==="var"||t.value.endsWith("_var")||t.value==="theme"||t.value.endsWith("_theme")){t.value=ge(t.value);for(let r=0;r<t.nodes.length;r++)r==0&&t.nodes[r].kind==="word"||qe([t.nodes[r]]);break}t.value=ge(t.value),qe(t.nodes);break}case"separator":case"word":{t.value=ge(t.value);break}default:Pi(t)}}function Pi(e){throw new Error(`Unexpected value: ${e}`)}function ge(e){return e.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}var Pt=["calc","min","max","clamp","mod","rem","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","round"],he=["anchor-size"],Et=new RegExp(`(${he.join("|")})\\(`,"g");function Ot(e){if(!Pt.some(i=>e.includes(i)))return e;let t=!1;he.some(i=>e.includes(i))&&(Et.lastIndex=0,e=e.replace(Et,(i,o)=>(t=!0,`$${he.indexOf(o)}$(`)));let r="",n=[];for(let i=0;i<e.length;i++){let o=e[i];if(o==="("){r+=o;let a=i;for(let l=i-1;l>=0;l--){let u=e.charCodeAt(l);if(u>=48&&u<=57)a=l;else if(u>=97&&u<=122)a=l;else break}let s=e.slice(a,i);if(Pt.includes(s)){n.unshift(!0);continue}else if(n[0]&&s===""){n.unshift(!0);continue}n.unshift(!1);continue}else if(o===")")r+=o,n.shift();else if(o===","&&n[0]){r+=", ";continue}else{if(o===" "&&n[0]&&r[r.length-1]===" ")continue;if((o==="+"||o==="*"||o==="/"||o==="-")&&n[0]){let a=r.trimEnd(),s=a[a.length-1];if(s==="+"||s==="*"||s==="/"||s==="-"){r+=o;continue}else if(s==="("||s===","){r+=o;continue}else e[i-1]===" "?r+=`${o} `:r+=` ${o} `}else if(n[0]&&e.startsWith("to-zero",i)){let a=i;i+=7,r+=e.slice(a,i+1)}else r+=o}}return t?r.replace(/\$(\d+)\$/g,(i,o)=>he[o]??i):r}function ye(e){if(e.indexOf("(")===-1)return re(e);let t=A(e);return Je(t),e=b(t),e=Ot(e),e}function re(e){let t="";for(let r=0;r<e.length;r++){let n=e[r];n==="\\"&&e[r+1]==="_"?(t+="_",r+=1):n==="_"?t+=" ":t+=n}return t}function Je(e){for(let t of e)switch(t.kind){case"function":{if(t.value==="url"||t.value.endsWith("_url")){t.value=re(t.value);break}if(t.value==="var"||t.value.endsWith("_var")||t.value==="theme"||t.value.endsWith("_theme")){t.value=re(t.value);for(let r=0;r<t.nodes.length;r++)r==0&&t.nodes[r].kind==="word"||Je([t.nodes[r]]);break}t.value=re(t.value),Je(t.nodes);break}case"separator":case"word":{t.value=re(t.value);break}default:Ei(t)}}function Ei(e){throw new Error(`Unexpected value: ${e}`)}var Oi=58,Dt=45,jt=97,Kt=122;function*V(e,t){let r=v(e,":");if(t.theme.prefix){if(r.length===1||r[0]!==t.theme.prefix)return null;r.shift()}let n=r.pop(),i=[];for(let f=r.length-1;f>=0;--f){let d=t.parseVariant(r[f]);if(d===null)return;i.push(d)}let o=!1;n[n.length-1]==="!"?(o=!0,n=n.slice(0,-1)):n[0]==="!"&&(o=!0,n=n.slice(1)),t.utilities.has(n,"static")&&!n.includes("[")&&(yield{kind:"static",root:n,variants:i,important:o,raw:e});let[a,s=null,l]=v(n,"/");if(l)return;if(a[0]==="["){if(a[a.length-1]!=="]")return;let f=a.charCodeAt(1);if(f!==Dt&&!(f>=jt&&f<=Kt))return;a=a.slice(1,-1);let d=a.indexOf(":");if(d===-1||d===0||d===a.length-1)return;let c=a.slice(0,d),p=ye(a.slice(d+1));yield{kind:"arbitrary",property:c,value:p,modifier:s===null?null:It(s),variants:i,important:o,raw:e};return}let u;if(a[a.length-1]==="]"){let f=a.indexOf("-[");if(f===-1)return;let d=a.slice(0,f);if(!t.utilities.has(d,"functional"))return;let c=a.slice(f+1);u=[[d,c]]}else u=Di(a,f=>t.utilities.has(f,"functional"));for(let[f,d]of u){let c={kind:"functional",root:f,modifier:s===null?null:It(s),value:null,variants:i,important:o,raw:e};if(d===null){yield c;continue}{let p=d.indexOf("[");if(p!==-1){let g=d.slice(p+1,-1),y="";for(let h=0;h<g.length;h++){let k=g.charCodeAt(h);if(k===Oi){y=g.slice(0,h),g=g.slice(h+1);break}if(!(k===Dt||k>=jt&&k<=Kt))break}c.value={kind:"arbitrary",dataType:y||null,value:ye(g)}}else{let g=s===null||c.modifier?.kind==="arbitrary"?null:`${d}/${s}`;c.value={kind:"named",value:d,fraction:g}}}yield c}}function It(e){if(e[0]==="["&&e[e.length-1]==="]"){let t=e.slice(1,-1);return{kind:"arbitrary",value:ye(t)}}return{kind:"named",value:e}}function*Di(e,t){t(e)&&(yield[e,null]);let r=e.lastIndexOf("-");if(r===-1){e[0]==="@"&&t("@")&&(yield["@",e.slice(1)]);return}do{let n=e.slice(0,r);if(t(n)){let i=[n,e.slice(r+1)];if(i[1]==="")break;yield i}r=e.lastIndexOf("-",r-1)}while(r>0)}var B=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,xl=new RegExp(`^${B.source}$`);var Cl=new RegExp(`^${B.source}%$`);var ji=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],Al=new RegExp(`^${B.source}(${ji.join("|")})$`);var Ki=["deg","rad","grad","turn"],Sl=new RegExp(`^${B.source}(${Ki.join("|")})$`);var $l=new RegExp(`^${B.source} +${B.source} +${B.source}$`);function q(e){let t=Number(e);return Number.isInteger(t)&&t>=0&&String(t)===String(e)}function ie(e){let t=Number(e);return t>=0&&t%.25===0&&String(t)===String(e)}function Mt(e,t,r){for(let n of V(r,e)){let i=structuredClone(n),o=!1;if(i.kind==="functional"&&i.value?.kind==="arbitrary"&&i.value.value==="subgrid"&&(i.root==="grid-cols"||i.root=="grid-rows")&&(o=!0,i.value={kind:"named",value:"subgrid",fraction:null}),i.kind==="functional"&&i.value?.kind==="arbitrary"&&i.value.dataType===null&&(i.root==="from"||i.root==="via"||i.root==="to"||i.root==="font-stretch")){if(i.value.value.endsWith("%")&&q(i.value.value.slice(0,-1))){let a=parseInt(i.value.value);(i.root==="from"||i.root==="via"||i.root==="to"||i.root==="font-stretch"&&a>=50&&a<=200)&&(o=!0,i.value={kind:"named",value:i.value.value,fraction:null})}}else if(i.kind==="functional"&&i.value?.kind==="arbitrary"&&i.value.dataType===null){let a=v(i.value.value,"/");if(a.every(s=>q(s))){o=!0;let s=i.value,l=i.modifier;a.length===1?i.value={kind:"named",value:i.value.value,fraction:null}:(i.value={kind:"named",value:a[0],fraction:i.value.value},i.modifier={kind:"named",value:a[1]}),e.compileAstNodes(i).length===0&&(i.value=s,i.modifier=l,o=!1)}}for(let a of Ii(i))if(a.kind==="functional"&&a.root==="data"&&a.value?.kind==="arbitrary"&&!a.value.value.includes("="))o=!0,a.value={kind:"named",value:a.value.value};else if(a.kind==="functional"&&a.root==="aria"&&a.value?.kind==="arbitrary"&&(a.value.value.endsWith("=true")||a.value.value.endsWith('="true"')||a.value.value.endsWith("='true'"))){let[s,l]=v(a.value.value,"=");if(s[s.length-1]==="~"||s[s.length-1]==="|"||s[s.length-1]==="^"||s[s.length-1]==="$"||s[s.length-1]==="*")continue;o=!0,a.value={kind:"named",value:a.value.value.slice(0,a.value.value.indexOf("="))}}else a.kind==="functional"&&a.root==="supports"&&a.value?.kind==="arbitrary"&&/^[a-z-][a-z0-9-]*$/i.test(a.value.value)&&(o=!0,a.value={kind:"named",value:a.value.value});return o?w(e,i):r}return r}function*Ii(e){function*t(r){yield r,r.kind==="compound"&&(yield*t(r.variant))}for(let r of e.variants)yield*t(r)}var Mi=32;var Ui=40;function Ut(e,t=[]){for(let r=5;r<e.length;r++){let n=e.charCodeAt(r);if(n===Mi||n===Ui){let i=e.slice(0,r).trim(),o=e.slice(r).trim();return S(i,o,t)}}return S(e.trim(),"",t)}var Fi=64;function ve(e,t=[]){return{kind:"rule",selector:e,nodes:t}}function S(e,t="",r=[]){return{kind:"at-rule",name:e,params:t,nodes:r}}function O(e,t=[]){return e.charCodeAt(0)===Fi?Ut(e,t):ve(e,t)}function M(e,t){return{kind:"declaration",property:e,value:t,important:!1}}function _(e,t,r=[],n={}){for(let i=0;i<e.length;i++){let o=e[i],a=[...r,o],s=r.at(-1)??null;if(o.kind==="context"){_(o.nodes,t,r,{...n,...o.context});continue}let l=t(o,{parent:s,context:n,path:a,replaceWith(u){e.splice(i,1,...Array.isArray(u)?u:[u]),i--}})??0;if(l===2)return;l!==1&&(o.kind==="rule"||o.kind==="at-rule")&&_(o.nodes,t,a,n)}}function we(e){let t="",r=new Set,n=[],i=[];function o(u,f=0){let d="",c=" ".repeat(f);if(u.kind==="rule"){d+=`${c}${u.selector} {
|
|
11
|
-
`;for(let
|
|
12
|
-
`}else if(u.kind==="at-rule"){if(u.nodes.length===0)return`${
|
|
13
|
-
`;if(u.name==="@property"&&
|
|
14
|
-
`;for(let
|
|
15
|
-
`}else if(u.kind==="comment")
|
|
16
|
-
`;else if(u.kind==="context")for(let
|
|
17
|
-
`);return
|
|
18
|
-
`)break;
|
|
19
|
-
`)break;a+=f}let s=Bt.some(u=>o.includes(u)),l=Bt.some(u=>a.includes(u));if(!s||!l||a[0]===".")continue e;for(let u of Bi)if(a.trim().startsWith(u)||o.trim().endsWith(u))continue e;for(let u of qi)if(u.test(o))continue e}return w(e,i)}return r}function Jt(e,t,r){for(let n of V(r,e)){let i=structuredClone(n),o=!1;return i.kind==="functional"&&i.value?.kind==="arbitrary"&&(i.root==="grid-cols"||i.root=="grid-rows"||i.root=="object")&&(o=!0,i.value.value=v(i.value.value,",").join(" ")),o?w(e,i):r}return r}function Gt(e,t,r){for(let n of e.parseCandidate(r))if(n.kind==="functional"&&n.root==="max-w"&&n.value?.value.startsWith("screen-"))return w(e,{...n,value:{...n.value,value:`[theme(screens.${n.value.value.slice(7)})]`}});return r}import Ji from"postcss-selector-parser";function Yt(e,t,r){for(let n of V(r,e)){let i=structuredClone(n),o=!1;for(let[a,s]of Gi(i)){if(a.kind!=="arbitrary"||a.relative)continue;let l=Ji().astSync(a.selector);if(l.nodes.length!==1)continue;let u=null,f=!1;s===null&&l.nodes[0].length===3&&l.nodes[0].nodes[0].type==="nesting"&&l.nodes[0].nodes[0].value==="&"&&l.nodes[0].nodes[1].type==="combinator"&&l.nodes[0].nodes[1].value===">"&&l.nodes[0].nodes[2].type==="attribute"&&(l.nodes[0].nodes=[l.nodes[0].nodes[2]],u=e.parseVariant("*")),s===null&&l.nodes[0].length===3&&l.nodes[0].nodes[0].type==="nesting"&&l.nodes[0].nodes[0].value==="&"&&l.nodes[0].nodes[1].type==="combinator"&&l.nodes[0].nodes[1].value===" "&&l.nodes[0].nodes[2].type==="attribute"&&(l.nodes[0].nodes=[l.nodes[0].nodes[2]],u=e.parseVariant("**"));let d=l.nodes[0].filter(p=>p.type!=="nesting");if(d.length!==1)continue;let c=d[0];if(c.type==="pseudo"&&c.value===":is"){if(c.nodes.length!==1||c.nodes[0].nodes.length!==1)continue;c=c.nodes[0].nodes[0]}if(c.type==="pseudo"){let p=c,m=!1;if(c.value===":not"){if(m=!0,c.nodes.length!==1||c.nodes[0].type!=="selector"||c.nodes[0].nodes.length!==1||c.nodes[0].nodes[0].type!=="pseudo")continue;p=c.nodes[0].nodes[0]}let g=(h=>{if(h===":first-letter")return"first-letter";if(h===":first-line")return"first-line";if(h===":file-selector-button")return"file";if(h===":placeholder")return"placeholder";if(h===":backdrop")return"backdrop";if(h===":first-child")return"first";if(h===":last-child")return"last";if(h===":only-child")return"only";if(h===":first-of-type")return"first-of-type";if(h===":last-of-type")return"last-of-type";if(h===":only-of-type")return"only-of-type";if(h===":visited")return"visited";if(h===":target")return"target";if(h===":default")return"default";if(h===":checked")return"checked";if(h===":indeterminate")return"indeterminate";if(h===":placeholder-shown")return"placeholder-shown";if(h===":autofill")return"autofill";if(h===":optional")return"optional";if(h===":required")return"required";if(h===":valid")return"valid";if(h===":invalid")return"invalid";if(h===":in-range")return"in-range";if(h===":out-of-range")return"out-of-range";if(h===":read-only")return"read-only";if(h===":empty")return"empty";if(h===":focus-within")return"focus-within";if(h===":focus")return"focus";if(h===":focus-visible")return"focus-visible";if(h===":active")return"active";if(h===":enabled")return"enabled";if(h===":disabled")return"disabled";if(h===":nth-child"&&p.nodes.length===1&&p.nodes[0].nodes.length===1&&p.nodes[0].nodes[0].type==="tag"&&p.nodes[0].nodes[0].value==="odd")return m?(m=!1,"even"):"odd";if(h===":nth-child"&&p.nodes.length===1&&p.nodes[0].nodes.length===1&&p.nodes[0].nodes[0].type==="tag"&&p.nodes[0].nodes[0].value==="even")return m?(m=!1,"odd"):"even";for(let[k,ee]of[[":nth-child","nth"],[":nth-last-child","nth-last"],[":nth-of-type","nth-of-type"],[":nth-last-of-type","nth-of-last-type"]])if(h===k&&p.nodes.length===1)return p.nodes[0].nodes.length===1&&p.nodes[0].nodes[0].type==="tag"&&q(p.nodes[0].nodes[0].value)?`${ee}-${p.nodes[0].nodes[0].value}`:`${ee}-[${p.nodes[0].toString()}]`;return null})(p.value);if(g===null)continue;m&&(g=`not-${g}`);let y=e.parseVariant(g);if(y===null)continue;o=!0,Object.assign(a,y)}else if(c.type==="attribute"){let p=c.attribute,m=c.value?c.quoted?`${c.quoteMark}${c.value}${c.quoteMark}`:c.value:null;c.insensitive&&m&&(m+=" i");let g=c.operator??"=";p.startsWith("data-")?(o=!0,p=p.slice(5),Object.assign(a,{kind:"functional",root:"data",modifier:null,value:m===null?{kind:"named",value:p}:{kind:"arbitrary",value:`${p}${g}${m}`}})):p.startsWith("aria-")&&(o=!0,p=p.slice(5),Object.assign(a,{kind:"functional",root:"aria",modifier:null,value:m===null?{kind:"arbitrary",value:p}:g==="="&&c.value==="true"&&!c.insensitive?{kind:"named",value:p}:{kind:"arbitrary",value:`${p}${g}${m}`}}))}if(u){let p=i.variants.indexOf(a);if(p===-1)continue;i.variants.splice(p,1,a,u)}}return o?w(e,i):r}return r}function*Gi(e){function*t(r,n=null){yield[r,n],r.kind==="compound"&&(yield*t(r.variant,r))}for(let r of e.variants)yield*t(r,null)}function Ht(e,t,r){if(!e.theme.prefix)return r;let n=Yi(e,t,r);if(!n)return r;let i=e.theme.prefix,o=null;try{e.theme.prefix=null;let a=r.slice(0,n.start)+n.base+r.slice(n.end),s=[...V(a,e)];s.length>0&&(o=s[0])}finally{e.theme.prefix=i}return o?w(e,o):r}function Yi(e,t,r){if(!e.theme.prefix)return null;if(!t.prefix)throw new Error("Could not find the Tailwind CSS v3 `prefix` configuration inside the JavaScript config.");let i=v(r,":").pop(),o=r.length-i.length,a=o+i.length,s=!1,l=!1;return i[i.length-1]==="!"?(s=!0,i=i.slice(0,-1)):i[0]==="!"&&(s=!0,i=i.slice(1)),i[0]==="-"&&(l=!0,i=i.slice(1)),!i.startsWith(t.prefix)&&i[0]!=="["?null:(i[0]!=="["&&(i=i.slice(t.prefix.length)),l&&(i="-"+i),s&&(i+="!"),{base:i,start:o,end:a})}var Hi=/([a-z]+)/;function Qt(e){let t=Hi.exec(e.toLocaleLowerCase());return t?t[0]:(console.warn(`The prefix "${e} can not be used with Tailwind CSS v4 and cannot be converted to a valid one automatically. We've updated it to "tw" for you.`),"tw")}var Ge={"overflow-clip":"text-clip","overflow-ellipsis":"text-ellipsis","flex-grow":"grow","flex-grow-0":"grow-0","flex-shrink":"shrink","flex-shrink-0":"shrink-0","decoration-clone":"box-decoration-clone","decoration-slice":"box-decoration-slice",shadow:"shadow-sm","shadow-sm":"shadow-xs","shadow-xs":"shadow-2xs","inset-shadow":"inset-shadow-sm","inset-shadow-sm":"inset-shadow-xs","inset-shadow-xs":"inset-shadow-2xs","drop-shadow":"drop-shadow-sm","drop-shadow-sm":"drop-shadow-xs",rounded:"rounded-sm","rounded-sm":"rounded-xs",blur:"blur-sm","blur-sm":"blur-xs","outline-none":"outline-hidden"},Zt=new WeakSet;function Xt(e,t,r){if(!Zt.has(e)){for(let n in Ge)e.utilities.static(n,()=>[]);Zt.add(e)}for(let n of e.parseCandidate(r))if(n.kind==="static"&&Object.hasOwn(Ge,n.root))return w(e,{...n,root:Ge[n.root]});return r}function U(e){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");var t=String(e),r=t.length,n=-1,i,o="",a=t.charCodeAt(0);if(r==1&&a==45)return"\\"+t;for(;++n<r;){if(i=t.charCodeAt(n),i==0){o+="\uFFFD";continue}if(i>=1&&i<=31||i==127||n==0&&i>=48&&i<=57||n==1&&i>=48&&i<=57&&a==45){o+="\\"+i.toString(16)+" ";continue}if(i>=128||i==45||i==95||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122){o+=t.charAt(n);continue}o+="\\"+t.charAt(n)}return o}function er(e){return e.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g,t=>t.length>2?String.fromCodePoint(Number.parseInt(t.slice(1).trim(),16)):t[1])}function tr(e){let t=[];return rr(e,[],(r,n)=>{if(Xi(r))return t.push([n,r]),1;if(en(r)){t.push([n,r[0]]);for(let i of Reflect.ownKeys(r[1]))t.push([[...n,`-${i}`],r[1][i]]);return 1}if(Array.isArray(r)&&r.every(i=>typeof i=="string"))return t.push([n,r.join(", ")]),1}),t}var Zi=/^[a-zA-Z0-9-_%/\.]+$/;function D(e){e=structuredClone(e),e[0]==="animation"&&(e[0]="animate"),e[0]==="borderRadius"&&(e[0]="radius"),e[0]==="boxShadow"&&(e[0]="shadow"),e[0]==="colors"&&(e[0]="color"),e[0]==="fontFamily"&&(e[0]="font"),e[0]==="fontSize"&&(e[0]="text"),e[0]==="letterSpacing"&&(e[0]="tracking"),e[0]==="lineHeight"&&(e[0]="leading"),e[0]==="maxWidth"&&(e[0]="container"),e[0]==="screens"&&(e[0]="breakpoint"),e[0]==="transitionTimingFunction"&&(e[0]="ease");for(let t of e)if(!Zi.test(t))return null;return e.map((t,r,n)=>t==="1"&&r!==n.length-1?"":t).map(t=>t.replaceAll(".","_").replace(/([a-z])([A-Z])/g,(r,n,i)=>`${n}-${i.toLowerCase()}`)).filter((t,r)=>t!=="DEFAULT"||r!==e.length-1).join("-")}function Xi(e){return typeof e=="number"||typeof e=="string"}function en(e){if(!Array.isArray(e)||e.length!==2||typeof e[0]!="string"&&typeof e[0]!="number"||e[1]===void 0||e[1]===null||typeof e[1]!="object")return!1;for(let t of Reflect.ownKeys(e[1]))if(typeof t!="string"||typeof e[1][t]!="string"&&typeof e[1][t]!="number")return!1;return!0}function rr(e,t=[],r){for(let n of Reflect.ownKeys(e)){let i=e[n];if(i==null)continue;let o=[...t,n],a=r(i,o)??0;if(a!==1){if(a===2)break;!Array.isArray(i)&&typeof i!="object"||rr(i,o,r)}}}function F(e){let t=[];for(let r of v(e,".")){if(!r.includes("[")){t.push(r);continue}let n=0;for(;;){let i=r.indexOf("[",n),o=r.indexOf("]",i);if(i===-1||o===-1)break;i>n&&t.push(r.slice(n,i)),t.push(r.slice(i+1,o)),n=o+1}n<=r.length-1&&t.push(r.slice(n))}return t}function ir(e,t,r){let n=Ye(e);for(let i of V(r,e)){let o=structuredClone(i),a=!1;if(o.kind==="arbitrary"){let[s,l]=n(o.value,o.modifier===null?1:0);s!==o.value&&(a=!0,o.value=s,l!==null&&(o.modifier=l))}else if(o.kind==="functional"&&o.value?.kind==="arbitrary"){let[s,l]=n(o.value.value,o.modifier===null?1:0);s!==o.value.value&&(a=!0,o.value.value=s,l!==null&&(o.modifier=l))}for(let s of rn(o))if(s.kind==="arbitrary"){let[l]=n(s.selector,2);l!==s.selector&&(a=!0,s.selector=l)}else if(s.kind==="functional"&&s.value?.kind==="arbitrary"){let[l]=n(s.value.value,2);l!==s.value.value&&(a=!0,s.value.value=l)}return a?w(e,o):r}return r}function Ye(e,{prettyPrint:t=!1}={}){function r(a,s=0){let l=A(a);if(s&2)return[Ce(l,o),null];let u=0,f=0;if(P(l,p=>{p.kind==="function"&&p.value==="theme"&&(u+=1,P(p.nodes,m=>m.kind==="separator"&&m.value.includes(",")?2:m.kind==="separator"&&m.value.trim()==="/"?(f+=1,2):1))}),u===0)return[a,null];if(f===0)return[Ce(l,i),null];if(f>1)return[Ce(l,o),null];let d=null;return[Ce(l,(p,m)=>{let g=v(p,"/").map(y=>y.trim());if(g.length>2)return null;if(l.length===1&&g.length===2&&s&1){let[y,h]=g;if(/^\d+%$/.test(h))d={kind:"named",value:h.slice(0,-1)};else if(/^0?\.\d+$/.test(h)){let k=Number(h)*100;d={kind:Number.isInteger(k)?"named":"arbitrary",value:k.toString()}}else d={kind:"arbitrary",value:h};p=y}return i(p,m)||o(p,m)}),d]}function n(a){let s=`--${D(F(a))}`;return e.theme.get([s])?s:null}function i(a,s){let l=n(a);if(l)return s?`var(${l}, ${s})`:`var(${l})`;let u=F(a);if(u[0]==="spacing"&&e.theme.get(["--spacing"])){let f=u[1];return ie(f)?"calc(var(--spacing) * "+f+")":null}return null}function o(a,s){let l=v(a,"/").map(d=>d.trim());a=l.shift();let u=n(a);if(!u)return null;let f=l.length>0?t?` / ${l.join(" / ")}`:`/${l.join("/")}`:"";return s?`theme(${u}${f}, ${s})`:`theme(${u}${f})`}return r}function Ce(e,t){return P(e,(r,{replaceWith:n})=>{if(r.kind==="function"&&r.value==="theme"){if(r.nodes.length<1)return;r.nodes[0].kind==="separator"&&r.nodes[0].value.trim()===""&&r.nodes.shift();let i=r.nodes[0];if(i.kind!=="word")return;let o=i.value,a=1;for(let u=a;u<r.nodes.length&&!r.nodes[u].value.includes(",");u++)o+=b([r.nodes[u]]),a=u+1;o=tn(o);let s=r.nodes.slice(a+1),l=s.length>0?t(o,b(s)):t(o);if(l===null)return;n(A(l))}}),b(e)}function tn(e){if(e[0]!=="'"&&e[0]!=='"')return e;let t="",r=e[0];for(let n=1;n<e.length-1;n++){let i=e[n],o=e[n+1];i==="\\"&&(o===r||o==="\\")?(t+=o,n++):t+=i}return t}function*rn(e){function*t(r){yield r,r.kind==="compound"&&(yield*t(r.variant))}for(let r of e.variants)yield*t(r)}function nr(e,t,r){for(let n of e.parseCandidate(r)){if(n.variants.length<=1)continue;let i=[],o=[],a=[],s=n.variants;for(let f of n.variants)nn(e,f)?i.push(f):ln(e,f)?a.push(f):o.push(f);let l=o.some(f=>on(e,f)),u=[...a,...l?o.reverse():o,...i];if(!an(s,u))return w(e,{...n,variants:u})}return r}function nn(e,t){return t.kind==="static"&&t.root==="dark"?!0:He(e,t).every(n=>n.kind==="at-rule")}function on(e,t){return He(e,t).some(n=>n.kind==="rule"&&(n.selector.includes(" ")||n.selector.includes(">")||n.selector.includes("+")||n.selector.includes("~")))}function ln(e,t){return He(e,t).some(n=>n.kind==="rule"&&(n.selector.includes("::after")||n.selector.includes("::backdrop")||n.selector.includes("::before")||n.selector.includes("::first-letter")||n.selector.includes("::first-line")||n.selector.includes("::marker")||n.selector.includes("::placeholder")||n.selector.includes("::selection")))}function He(e,t){let r=[],n=e.compileAstNodes({kind:"arbitrary",property:"color",value:"red",modifier:null,variants:[t],important:!1,raw:"candidate"}).map(i=>i.node);return _(n,i=>{i.kind==="rule"&&i.selector===".candidate"||i.kind==="declaration"&&i.property==="color"&&i.value==="red"||r.push(i)}),r}function an(e,t){return e.length!==t.length?!1:e.every((r,n)=>t[n]===r)}function or(e,t){if(!t[0])return e;t.sort((i,o)=>i.end-o.end||i.start-o.start);let r="",n=t[0];r+=e.slice(0,n.start),r+=n.replacement;for(let i=1;i<t.length;++i){let o=t[i];r+=e.slice(n.end,o.start),r+=o.replacement,n=o}return r+=e.slice(n.end),r}var un=[Ht,qt,Wt,Xt,Gt,ir,nr,Lt,Jt,Mt,Yt];function Qe(e,t,r,n){for(let i of un)r=i(e,t,r,n);return r}async function sr(e,t,r,n){let i=await Rt(r,n),o=[];for(let{rawCandidate:a,start:s,end:l}of i){let u=Qe(e,t,a,{contents:r,start:s,end:l});u!==a&&o.push({start:s,end:l,replacement:u})}return or(r,o)}async function ur(e,t,r){let n=ar.isAbsolute(r)?r:ar.resolve(process.cwd(),r),i=await lr.readFile(n,"utf-8");await lr.writeFile(n,await sr(e,t,i,sn(r)))}function fr({designSystem:e,userConfig:t}){function r(n){let i=n.params.split(/(\s+)/),o=i[i.length-1]==="!important"||i[i.length-1]==="#{!important}";o&&i.pop();let a=i.map(s=>{if(s.trim()==="")return s;let l=v(s,":"),u=l.pop();return o&&u[0]!=="!"&&u[u.length-1]!=="!"&&(u+="!"),[...l,u].join(":")});a=a.map(s=>Qe(e,t,s)),n.params=a.join("").trim()}return{postcssPlugin:"@tailwindcss/upgrade/migrate-at-apply",OnceExit(n){n.walkAtRules("apply",r)}}}import"postcss";import Se from"postcss-selector-parser";import*as cr from"node:fs/promises";import*as Ae from"node:path";import*as dr from"node:util";import*as Ze from"postcss";var J=class e{id;root;isTailwindRoot=!1;linkedConfigPath=null;file=null;parents=new Set;children=new Set;canMigrate=!0;extension=null;static async load(t){t=Ae.resolve(process.cwd(),t);let r=await cr.readFile(t,"utf-8"),n=Ze.parse(r,{from:t});return new e(n,t)}static async fromString(t){let r=Ze.parse(t);return new e(r)}static async fromRoot(t,r){return new e(t,r)}constructor(t,r){this.id=Math.random().toString(36).slice(2),this.root=t,this.file=r??null,r&&(this.extension=Ae.extname(r))}get importRules(){let t=new Set;return this.root.walkAtRules("import",r=>{t.add(r)}),t}get isEmpty(){return this.root.toString().trim()===""}*ancestors(){for(let{item:t}of ne(this,r=>r.parents))yield t}*descendants(){for(let{item:t}of ne(this,r=>r.children))yield t}layers(){let t=new Set;for(let{item:r,path:n}of ne(this,i=>i.parents))if(!(r.parents.size>0))for(let{meta:i}of n)for(let o of i.layers)t.add(o);return t}*pathsToRoot(){for(let{item:t,path:r}of ne(this,n=>n.parents))t.parents.size>0||(yield r)}analyzeImportPaths(){let t=[],r=[];for(let n of this.pathsToRoot()){let i=!1;for(let{meta:o}of n)for(let a of o.layers)i||=a==="utilities"||a==="components";i?t.push(n):r.push(n)}return{convertiblePaths:t,nonConvertiblePaths:r}}containsRule(t){let r=!1;if(this.root.walk(n=>{if(t(n))return r=!0,!1}),r)return!0;for(let n of this.children)if(n.item.containsRule(t))return!0;return!1}[dr.inspect.custom](){return{...this,root:this.root.toString(),layers:Array.from(this.layers()),parents:Array.from(this.parents,t=>t.item.id),children:Array.from(this.children,t=>t.item.id),parentsMeta:Array.from(this.parents,t=>t.meta),childrenMeta:Array.from(this.children,t=>t.meta)}}};function*ne(e,t,r=[]){for(let n of t(e)){let i=[...r,n];yield*ne(n.item,t,i),yield{item:n.item,path:i}}}function pr(e){function t(r){if(r.params!=="utilities"&&r.params!=="components")return;let n=r.clone();x(r,a=>{if(a.type!=="rule")return;let s=v(a.selector,",");if(s.length>1){let l=[];for(let u of s){let f=a.clone({selector:u});l.push(f)}a.replaceWith(l)}return 1});let i=new Set;x(r,a=>{if(a.type==="rule")return Se(s=>{s.each(l=>{x(l,u=>{if(u.type==="pseudo"&&u.value===":not")return 1;u.type==="class"&&i.add(u.value)})})}).processSync(a.selector,{updateSelector:!1}),1}),x(n,a=>{a.type==="rule"&&Se(s=>{s.each(l=>{x(l,u=>{if(u.type==="pseudo"&&u.value===":not")return 1;if(u.type==="class"&&i.has(u.value))return a.remove(),2})})}).processSync(a,{updateSelector:!0})});let o=[n];for(let a of i){let s=r.clone();o.push(s),x(s,l=>{if(l.type==="atrule"&&(!l.nodes||l.nodes?.length===0)&&l.remove(),l.type!=="rule")return;let u=!1;if(Se(f=>{f.each(d=>{x(d,c=>{if(c.type==="pseudo"&&c.value===":not")return 1;if(c.type==="class"&&c.value===a){u=!0;let p=d.atPosition(c.source.start.line,c.source.start.column),m=p.parent,g=(p.parent?.index(p)??0)-1;for(;g>=0&&m.at(g)?.type!=="combinator";){let y=m.at(g+1),h=m.at(g);m.at(g+1).replaceWith(h),m.at(g).replaceWith(y),g--}p.replaceWith(Se.nesting())}})})}).processSync(l,{updateSelector:!0}),!u){let f=[l],d=l.parent?.index(l)??null;if(d!==null)for(let c=d-1;c>=0&&l.parent?.nodes.at(c)?.type!=="rule";c--)l.parent?.nodes.at(c)?.type==="comment"&&f.push(l.parent?.nodes.at(c));for(let c of f)c.remove()}return 1}),s.name="utility",s.params=a,s.raws.before=`${s.raws.before??""}
|
|
10
|
+
`);let t=[],r=[],i=null,n="",l;for(let a=0;a<e.length;a++){let s=e.charCodeAt(a);switch(s){case Ut:case Mt:case Lt:case zt:case Wt:case Bt:case qt:case Jt:case Gt:{if(n.length>0){let f=ot(n);i?i.nodes.push(f):t.push(f),n=""}let o=a,u=a+1;for(;u<e.length&&(l=e.charCodeAt(u),!(l!==Ut&&l!==Mt&&l!==Lt&&l!==zt&&l!==Wt&&l!==Bt&&l!==qt&&l!==Jt&&l!==Gt));u++);a=u-1;let c=si(e.slice(o,u));i?i.nodes.push(c):t.push(c);break}case di:case fi:{let o=a;for(let u=a+1;u<e.length;u++)if(l=e.charCodeAt(u),l===ui)u+=1;else if(l===s){a=u;break}n+=e.slice(o,a+1);break}case pi:{let o=ai(n,[]);n="",i?i.nodes.push(o):t.push(o),r.push(o),i=o;break}case ci:{let o=r.pop();if(n.length>0){let u=ot(n);o.nodes.push(u),n=""}r.length>0?i=r[r.length-1]:i=null;break}default:n+=String.fromCharCode(s)}}return n.length>0&&t.push(ot(n)),t}async function Ht(e,t="html"){let i=new mi({}).getCandidatesWithPositions({content:e,extension:t}),n=[];for(let{candidate:l,position:a}of i)n.push({rawCandidate:l,start:a,end:a+l.length});return n}function b(e,t){let r=[];for(let n of t.variants)r.unshift(Yt(n));e.theme.prefix&&r.unshift(e.theme.prefix);let i="";if(t.kind==="static"&&(i+=t.root),t.kind==="functional"&&(i+=t.root,t.value))if(t.value.kind==="arbitrary"){if(t.value!==null){let n=at(t.value.value),l=n?t.value.value.slice(4,-1):t.value.value,[a,s]=n?["(",")"]:["[","]"];t.value.dataType?i+=`-${a}${t.value.dataType}:${X(l)}${s}`:i+=`-${a}${X(l)}${s}`}}else t.value.kind==="named"&&(i+=`-${t.value.value}`);if(t.kind==="arbitrary"&&(i+=`[${t.property}:${X(t.value)}]`),(t.kind==="arbitrary"||t.kind==="functional")&&t.modifier){let n=at(t.modifier.value),l=n?t.modifier.value.slice(4,-1):t.modifier.value,[a,s]=n?["(",")"]:["[","]"];t.modifier.kind==="arbitrary"?i+=`/${a}${X(l)}${s}`:t.modifier.kind==="named"&&(i+=`/${t.modifier.value}`)}return t.important&&(i+="!"),r.push(i),r.join(":")}function Yt(e){if(e.kind==="static")return e.root;if(e.kind==="arbitrary")return`[${X(gi(e.selector))}]`;let t="";if(e.kind==="functional"&&(t+=e.root,e.value))if(e.value.kind==="arbitrary"){let r=at(e.value.value),i=r?e.value.value.slice(4,-1):e.value.value,[n,l]=r?["(",")"]:["[","]"];t+=`-${n}${X(i)}${l}`}else e.value.kind==="named"&&(t+=`-${e.value.value}`);return e.kind==="compound"&&(t+=e.root,t+="-",t+=Yt(e.variant)),(e.kind==="functional"||e.kind==="compound")&&e.modifier&&(e.modifier.kind==="arbitrary"?t+=`/[${X(e.modifier.value)}]`:e.modifier.kind==="named"&&(t+=`/${e.modifier.value}`)),t}function X(e){let t=T(e),r=new Set;return I(t,(i,{parent:n})=>{let l=n===null?t:n.nodes??[];if(i.kind==="word"&&(i.value==="+"||i.value==="-"||i.value==="*"||i.value==="/")){let a=l.indexOf(i)??-1;if(a===-1)return;let s=l[a-1];if(s?.kind!=="separator"||s.value!==" ")return;let o=l[a+1];if(o?.kind!=="separator"||o.value!==" ")return;r.add(s),r.add(o)}else i.kind==="separator"&&i.value.trim()==="/"?i.value="/":i.kind==="separator"&&i.value.length>0&&i.value.trim()===""?(l[0]===i||l[l.length-1]===i)&&r.add(i):i.kind==="separator"&&i.value.trim()===","&&(i.value=",")}),r.size>0&&I(t,(i,{replaceWith:n})=>{r.has(i)&&(r.delete(i),n([]))}),lt(t),C(t)}function gi(e){let t=T(e);return t.length===3&&t[0].kind==="word"&&t[0].value==="&"&&t[1].kind==="separator"&&t[1].value===":"&&t[2].kind==="function"&&t[2].value==="is"?C(t[2].nodes):e}function lt(e){for(let t of e)switch(t.kind){case"function":{if(t.value==="url"||t.value.endsWith("_url")){t.value=me(t.value);break}if(t.value==="var"||t.value.endsWith("_var")||t.value==="theme"||t.value.endsWith("_theme")){t.value=me(t.value);for(let r=0;r<t.nodes.length;r++)r==0&&t.nodes[r].kind==="word"||lt([t.nodes[r]]);break}t.value=me(t.value),lt(t.nodes);break}case"separator":t.value=me(t.value);break;case"word":{t.value[0]!=="-"&&t.value[1]!=="-"&&(t.value=me(t.value));break}default:hi(t)}}function at(e){let t=T(e);return t.length===1&&t[0].kind==="function"&&t[0].value==="var"}function hi(e){throw new Error(`Unexpected value: ${e}`)}function me(e){return e.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}var Qt=["calc","min","max","clamp","mod","rem","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","round"],Re=["anchor-size"],Zt=new RegExp(`(${Re.join("|")})\\(`,"g");function Xt(e){if(!Qt.some(n=>e.includes(n)))return e;let t=!1;Re.some(n=>e.includes(n))&&(Zt.lastIndex=0,e=e.replace(Zt,(n,l)=>(t=!0,`$${Re.indexOf(l)}$(`)));let r="",i=[];for(let n=0;n<e.length;n++){let l=e[n];if(l==="("){r+=l;let a=n;for(let o=n-1;o>=0;o--){let u=e.charCodeAt(o);if(u>=48&&u<=57)a=o;else if(u>=97&&u<=122)a=o;else break}let s=e.slice(a,n);if(Qt.includes(s)){i.unshift(!0);continue}else if(i[0]&&s===""){i.unshift(!0);continue}i.unshift(!1);continue}else if(l===")")r+=l,i.shift();else if(l===","&&i[0]){r+=", ";continue}else{if(l===" "&&i[0]&&r[r.length-1]===" ")continue;if((l==="+"||l==="*"||l==="/"||l==="-")&&i[0]){let a=r.trimEnd(),s=a[a.length-1];if(s==="+"||s==="*"||s==="/"||s==="-"){r+=l;continue}else if(s==="("||s===","){r+=l;continue}else e[n-1]===" "?r+=`${l} `:r+=` ${l} `}else if(i[0]&&e.startsWith("to-zero",n)){let a=n;n+=7,r+=e.slice(a,n+1)}else r+=l}}return t?r.replace(/\$(\d+)\$/g,(n,l)=>Re[l]??n):r}function he(e){if(e.indexOf("(")===-1)return ge(e);let t=T(e);return st(t),e=C(t),e=Xt(e),e}function ge(e){let t="";for(let r=0;r<e.length;r++){let i=e[r];i==="\\"&&e[r+1]==="_"?(t+="_",r+=1):i==="_"?t+=" ":t+=i}return t}function st(e){for(let t of e)switch(t.kind){case"function":{if(t.value==="url"||t.value.endsWith("_url")){t.value=ge(t.value);break}if(t.value==="var"||t.value.endsWith("_var")||t.value==="theme"||t.value.endsWith("_theme")){t.value=ge(t.value);for(let r=0;r<t.nodes.length;r++)r==0&&t.nodes[r].kind==="word"||st([t.nodes[r]]);break}t.value=ge(t.value),st(t.nodes);break}case"separator":case"word":{t.value=ge(t.value);break}default:yi(t)}}function yi(e){throw new Error(`Unexpected value: ${e}`)}var vi=58,er=45,tr=97,rr=122;function*D(e,t){let r=v(e,":");if(t.theme.prefix){if(r.length===1||r[0]!==t.theme.prefix)return null;r.shift()}let i=r.pop(),n=[];for(let c=r.length-1;c>=0;--c){let f=t.parseVariant(r[c]);if(f===null)return;n.push(f)}let l=!1;i[i.length-1]==="!"?(l=!0,i=i.slice(0,-1)):i[0]==="!"&&(l=!0,i=i.slice(1)),t.utilities.has(i,"static")&&!i.includes("[")&&(yield{kind:"static",root:i,variants:n,important:l,raw:e});let[a,s=null,o]=v(i,"/");if(o)return;if(a[0]==="["){if(a[a.length-1]!=="]")return;let c=a.charCodeAt(1);if(c!==er&&!(c>=tr&&c<=rr))return;a=a.slice(1,-1);let f=a.indexOf(":");if(f===-1||f===0||f===a.length-1)return;let p=a.slice(0,f),d=he(a.slice(f+1));yield{kind:"arbitrary",property:p,value:d,modifier:s===null?null:nr(s),variants:n,important:l,raw:e};return}let u;if(a[a.length-1]==="]"){let c=a.indexOf("-[");if(c===-1)return;let f=a.slice(0,c);if(!t.utilities.has(f,"functional"))return;let p=a.slice(c+1);u=[[f,p]]}else if(a[a.length-1]===")"){let c=a.indexOf("-(");if(c===-1)return;let f=a.slice(0,c);if(!t.utilities.has(f,"functional"))return;let p=a.slice(c+2,-1),d=v(p,":"),m=null;if(d.length===2&&(m=d[0],p=d[1]),p[0]!=="-"&&p[1]!=="-")return;u=[[f,m===null?`[var(${p})]`:`[${m}:var(${p})]`]]}else u=wi(a,c=>t.utilities.has(c,"functional"));for(let[c,f]of u){let p={kind:"functional",root:c,modifier:s===null?null:nr(s),value:null,variants:n,important:l,raw:e};if(f===null){yield p;continue}{let d=f.indexOf("[");if(d!==-1){let h=f.slice(d+1,-1),g="";for(let w=0;w<h.length;w++){let S=h.charCodeAt(w);if(S===vi){g=h.slice(0,w),h=h.slice(w+1);break}if(!(S===er||S>=tr&&S<=rr))break}p.value={kind:"arbitrary",dataType:g||null,value:he(h)}}else{let h=s===null||p.modifier?.kind==="arbitrary"?null:`${f}/${s}`;p.value={kind:"named",value:f,fraction:h}}}yield p}}function nr(e){if(e[0]==="["&&e[e.length-1]==="]"){let t=e.slice(1,-1);return{kind:"arbitrary",value:he(t)}}if(e[0]==="("&&e[e.length-1]===")"){let t=e.slice(1,-1);return{kind:"arbitrary",value:he(`var(${t})`)}}return{kind:"named",value:e}}function*wi(e,t){t(e)&&(yield[e,null]);let r=e.lastIndexOf("-");if(r===-1){e[0]==="@"&&t("@")&&(yield["@",e.slice(1)]);return}do{let i=e.slice(0,r);if(t(i)){let n=[i,e.slice(r+1)];if(n[1]==="")break;yield n}r=e.lastIndexOf("-",r-1)}while(r>0)}var ee=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,Ca=new RegExp(`^${ee.source}$`);var Sa=new RegExp(`^${ee.source}%$`);var bi=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],Aa=new RegExp(`^${ee.source}(${bi.join("|")})$`);var ki=["deg","rad","grad","turn"],$a=new RegExp(`^${ee.source}(${ki.join("|")})$`);var Ta=new RegExp(`^${ee.source} +${ee.source} +${ee.source}$`);function te(e){let t=Number(e);return Number.isInteger(t)&&t>=0&&String(t)===String(e)}function ye(e){return xi(e,.25)}function xi(e,t){let r=Number(e);return r>=0&&r%t===0&&String(r)===String(e)}function ir(e,t,r){for(let i of D(r,e)){let n=structuredClone(i),l=!1;if(n.kind==="functional"&&n.value?.kind==="arbitrary"&&n.value.value==="subgrid"&&(n.root==="grid-cols"||n.root=="grid-rows")&&(l=!0,n.value={kind:"named",value:"subgrid",fraction:null}),n.kind==="functional"&&n.value?.kind==="arbitrary"&&n.value.dataType===null&&(n.root==="from"||n.root==="via"||n.root==="to"||n.root==="font-stretch")){if(n.value.value.endsWith("%")&&te(n.value.value.slice(0,-1))){let a=parseInt(n.value.value);(n.root==="from"||n.root==="via"||n.root==="to"||n.root==="font-stretch"&&a>=50&&a<=200)&&(l=!0,n.value={kind:"named",value:n.value.value,fraction:null})}}else if(n.kind==="functional"&&n.value?.kind==="arbitrary"&&n.value.dataType===null){let a=v(n.value.value,"/");if(a.every(s=>te(s))){l=!0;let s=n.value,o=n.modifier;a.length===1?n.value={kind:"named",value:n.value.value,fraction:null}:(n.value={kind:"named",value:a[0],fraction:n.value.value},n.modifier={kind:"named",value:a[1]}),e.compileAstNodes(n).length===0&&(n.value=s,n.modifier=o,l=!1)}}for(let a of Ci(n))if(a.kind==="functional"&&a.root==="data"&&a.value?.kind==="arbitrary"&&!a.value.value.includes("="))l=!0,a.value={kind:"named",value:a.value.value};else if(a.kind==="functional"&&a.root==="aria"&&a.value?.kind==="arbitrary"&&(a.value.value.endsWith("=true")||a.value.value.endsWith('="true"')||a.value.value.endsWith("='true'"))){let[s,o]=v(a.value.value,"=");if(s[s.length-1]==="~"||s[s.length-1]==="|"||s[s.length-1]==="^"||s[s.length-1]==="$"||s[s.length-1]==="*")continue;l=!0,a.value={kind:"named",value:a.value.value.slice(0,a.value.value.indexOf("="))}}else a.kind==="functional"&&a.root==="supports"&&a.value?.kind==="arbitrary"&&/^[a-z-][a-z0-9-]*$/i.test(a.value.value)&&(l=!0,a.value={kind:"named",value:a.value.value});return l?b(e,n):r}return r}function*Ci(e){function*t(r){yield r,r.kind==="compound"&&(yield*t(r.variant))}for(let r of e.variants)yield*t(r)}var Si=32;var Ai=40;function or(e,t=[]){for(let r=5;r<e.length;r++){let i=e.charCodeAt(r);if(i===Si||i===Ai){let n=e.slice(0,r).trim(),l=e.slice(r).trim();return x(n,l,t)}}return x(e.trim(),"",t)}var $i=64;function _e(e,t=[]){return{kind:"rule",selector:e,nodes:t}}function x(e,t="",r=[]){return{kind:"at-rule",name:e,params:t,nodes:r}}function F(e,t=[]){return e.charCodeAt(0)===$i?or(e,t):_e(e,t)}function R(e,t){return{kind:"declaration",property:e,value:t,important:!1}}function j(e,t,r=[],i={}){for(let n=0;n<e.length;n++){let l=e[n],a=[...r,l],s=r.at(-1)??null;if(l.kind==="context"){j(l.nodes,t,r,{...i,...l.context});continue}let o=t(l,{parent:s,context:i,path:a,replaceWith(u){e.splice(n,1,...Array.isArray(u)?u:[u]),n--}})??0;if(o===2)return;o!==1&&(l.kind==="rule"||l.kind==="at-rule")&&j(l.nodes,t,a,i)}}function ve(e){let t="",r=new Set,i=[],n=[];function l(u,c=0){let f="",p=" ".repeat(c);if(u.kind==="rule"){f+=`${p}${u.selector} {
|
|
11
|
+
`;for(let d of u.nodes)f+=l(d,c+1);f+=`${p}}
|
|
12
|
+
`}else if(u.kind==="at-rule"){if(u.nodes.length===0)return`${p}${u.name} ${u.params};
|
|
13
|
+
`;if(u.name==="@property"&&c===0){if(r.has(u.params))return"";let d=u.params,m=null,h=!1;for(let g of u.nodes)g.kind==="declaration"&&(g.property==="initial-value"?m=g.value:g.property==="inherits"&&(h=g.value==="true"));h?i.push(R(d,m??"initial")):n.push(R(d,m??"initial")),r.add(u.params)}f+=`${p}${u.name}${u.params?` ${u.params} `:" "}{
|
|
14
|
+
`;for(let d of u.nodes)f+=l(d,c+1);f+=`${p}}
|
|
15
|
+
`}else if(u.kind==="comment")f+=`${p}/*${u.value}*/
|
|
16
|
+
`;else if(u.kind==="context")for(let d of u.nodes)f+=l(d,c);else if(u.kind==="at-root"){for(let d of u.nodes)t+=l(d,0);return f}else u.property!=="--tw-sort"&&u.value!==void 0&&u.value!==null&&(f+=`${p}${u.property}: ${u.value}${u.important?" !important":""};
|
|
17
|
+
`);return f}let a="";for(let u of e){let c=l(u);c!==""&&(a+=c)}let s=[];i.length&&s.push(F(":root",i)),n.length&&s.push(F("*, ::before, ::after, ::backdrop",n));let o="";return s.length&&(o=l(x("@supports","(-moz-orient: inline)",[x("@layer","base",s)]))),`${a}${o}${t}`}function ar(e,t,r){for(let i of e.parseCandidate(r)){let n=structuredClone(i),l=!1;if("modifier"in n&&n.modifier?.kind==="arbitrary"&&!Ee(e,n,n.modifier.value)){let{value:a,didChange:s}=Pe(n.modifier.value);n.modifier.value=a,l||=s}for(let a of n.variants)sr(e,a)&&(l=!0);if(n.kind==="arbitrary"&&!Ee(e,n,n.value)){let{value:a,didChange:s}=Pe(n.value);n.value=a,l||=s}if(n.kind==="functional"&&n.value&&n.value.kind==="arbitrary"&&!Ee(e,n,n.value.value)){let{value:a,didChange:s}=Pe(n.value.value);n.value.value=a,l||=s}if(l)return b(e,n)}return r}function Pe(e){let t=!1;return e.startsWith("--")?(e=`var(${e})`,t=!0):e.startsWith(" --")&&(e=e.slice(1),t=!0),{value:e,didChange:t}}function sr(e,t){let r=!1;if(t.kind==="functional"&&t.value&&t.value.kind==="arbitrary"&&!Ee(e,Ti(t),t.value.value)){let{value:i,didChange:n}=Pe(t.value.value);t.value.value=i,r||=n}return t.kind==="compound"&&sr(e,t.variant)&&(r=!0),r}function Ti(e){return{kind:"arbitrary",property:"color",value:"red",modifier:null,variants:[e],important:!1,raw:"candidate"}}var Vi=new Set(["scroll-timeline-name","timeline-scope","view-timeline-name","font-palette","anchor-name","anchor-scope","position-anchor","position-try-options","scroll-timeline","animation-timeline","view-timeline","position-try"]);function Ee(e,t,r){let i=e.compileAstNodes(t).map(l=>l.node),n=!1;return j(i,l=>{if(l.kind==="declaration"&&Vi.has(l.property)&&l.value==r)return n=!0,2}),n}var Ni=["t","tr","r","br","b","bl","l","tl"];function ur(e,t,r){for(let i of e.parseCandidate(r))if(i.kind==="static"&&i.root.startsWith("bg-gradient-to-")){let n=i.root.slice(15);if(!Ni.includes(n))continue;return b(e,{...i,root:`bg-linear-to-${n}`})}return r}var cr=['"',"'","`"],Ri=["&&","||","?","===","==","!=","!==",">",">=","<","<="],_i=[/v-else-if=['"]$/,/v-if=['"]$/,/v-show=['"]$/,/x-if=['"]$/,/x-show=['"]$/];function De(e){let t="";for(let l=e.start-1;l>=0;l--){let a=e.contents.at(l);if(a===`
|
|
18
|
+
`)break;t=a+t}let r="";for(let l=e.end;l<e.contents.length;l++){let a=e.contents.at(l);if(a===`
|
|
19
|
+
`)break;r+=a}let i=cr.some(l=>t.includes(l)),n=cr.some(l=>r.includes(l));if(!i||!n||r[0]===".")return!1;for(let l of Ri)if(r.trim().startsWith(l)||t.trim().endsWith(l))return!1;for(let l of _i)if(l.test(t))return!1;return!0}function fr(e,t,r,i){e:for(let n of D(r,e))if(n.important&&n.raw[n.raw.length-1]!=="!"){if(i&&!De(i))continue e;return b(e,n)}return r}function pr(e,t,r){for(let i of D(r,e)){let n=structuredClone(i),l=!1;return n.kind==="functional"&&n.value?.kind==="arbitrary"&&(n.root==="grid-cols"||n.root=="grid-rows"||n.root=="object")&&(l=!0,n.value.value=v(n.value.value,",").join(" ")),l?b(e,n):r}return r}import{__unstable__loadDesignSystem as Pi}from"@tailwindcss/node";import Ei from"node:path";import Oi from"node:url";var Di=Oi.fileURLToPath(import.meta.url),ji=Ei.dirname(Di),Ii=new Map([["shadow","shadow-sm"],["shadow-sm","shadow-xs"],["shadow-xs","shadow-2xs"],["inset-shadow","inset-shadow-sm"],["inset-shadow-sm","inset-shadow-xs"],["inset-shadow-xs","inset-shadow-2xs"],["drop-shadow","drop-shadow-sm"],["drop-shadow-sm","drop-shadow-xs"],["rounded","rounded-sm"],["rounded-sm","rounded-xs"],["blur","blur-sm"],["blur-sm","blur-xs"]]),dr=new Map([["shadow","--shadow"],["shadow-sm","--shadow-sm"],["shadow-xs","--shadow-xs"],["shadow-2xs","--shadow-2xs"],["drop-shadow","--drop-shadow"],["drop-shadow-sm","--drop-shadow-sm"],["drop-shadow-xs","--drop-shadow-xs"],["rounded","--radius"],["rounded-sm","--radius-sm"],["rounded-xs","--radius-xs"],["blur","--blur"],["blur-sm","--blur-sm"],["blur-xs","--blur-xs"]]),Ki=new k(e=>Pi('@import "tailwindcss";',{base:e}));async function mr(e,t,r,i){let n=await Ki.get(ji);function*l(a){for(let s of e.parseCandidate(a)){let o=structuredClone(s);o.variants=[],o.important=!1;let u=b(e,o),c=Ii.get(u);if(!c)continue;let[f]=e.parseCandidate(c);if(!f)continue;let p=structuredClone(f);p.variants=s.variants,p.important=s.important,yield[s,p,dr.get(u),dr.get(c)]}}for(let[a,s,o,u]of l(r)){let c=a.variants.length>0||a.kind==="arbitrary"?!1:a.kind==="static"?!a.root.includes("-"):a.kind==="functional"?a.value===null||!a.root.includes("-"):!1;if(!(i&&c&&!De(i))){if(o&&u){let f=e.resolveThemeValue(o),p=n.resolveThemeValue(o),d=e.resolveThemeValue(u),m=n.resolveThemeValue(u);if(d===void 0||f!==p||d!==m)continue}return b(e,s)}}return r}function gr(e,t,r){for(let i of e.parseCandidate(r))if(i.kind==="functional"&&i.root==="max-w"&&i.value?.value.startsWith("screen-"))return b(e,{...i,value:{...i.value,value:`[theme(screens.${i.value.value.slice(7)})]`}});return r}import Fi from"postcss-selector-parser";function hr(e,t,r){for(let i of D(r,e)){let n=structuredClone(i),l=!1;for(let[a,s]of Ui(n)){if(a.kind==="compound"&&(a.root==="has"||a.root==="not"||a.root==="in")&&a.modifier!==null&&"modifier"in a.variant&&(a.variant.modifier=a.modifier,a.modifier=null),a.kind!=="arbitrary"||a.relative)continue;let o=Fi().astSync(a.selector);if(o.nodes.length!==1)continue;let u=null;if(s===null&&o.nodes[0].length===3&&o.nodes[0].nodes[0].type==="nesting"&&o.nodes[0].nodes[0].value==="&"&&o.nodes[0].nodes[1].type==="combinator"&&o.nodes[0].nodes[1].value===">"&&o.nodes[0].nodes[2].type==="universal"){l=!0,Object.assign(a,e.parseVariant("*"));continue}if(s===null&&o.nodes[0].length===3&&o.nodes[0].nodes[0].type==="nesting"&&o.nodes[0].nodes[0].value==="&"&&o.nodes[0].nodes[1].type==="combinator"&&o.nodes[0].nodes[1].value===" "&&o.nodes[0].nodes[2].type==="universal"){l=!0,Object.assign(a,e.parseVariant("**"));continue}if(s===null&&o.nodes[0].length===3&&o.nodes[0].nodes[0].type==="nesting"&&o.nodes[0].nodes[0].value==="&"&&o.nodes[0].nodes[1].type==="combinator"&&o.nodes[0].nodes[1].value===">"&&o.nodes[0].nodes[2].type==="attribute"&&(o.nodes[0].nodes=[o.nodes[0].nodes[2]],u=e.parseVariant("*")),s===null&&o.nodes[0].length===3&&o.nodes[0].nodes[0].type==="nesting"&&o.nodes[0].nodes[0].value==="&"&&o.nodes[0].nodes[1].type==="combinator"&&o.nodes[0].nodes[1].value===" "&&o.nodes[0].nodes[2].type==="attribute"&&(o.nodes[0].nodes=[o.nodes[0].nodes[2]],u=e.parseVariant("**")),s===null&&o.nodes[0].length===3&&o.nodes[0].nodes[0].type==="attribute"&&o.nodes[0].nodes[1].type==="combinator"&&o.nodes[0].nodes[1].value===" "&&o.nodes[0].nodes[2].type==="nesting"&&o.nodes[0].nodes[2].value==="&"){o.nodes[0].nodes=[o.nodes[0].nodes[0]],l=!0,Object.assign(a,e.parseVariant(`in-[${o.toString()}]`));continue}if(s===null&&!(o.nodes[0].nodes[0].type==="attribute"&&(o.nodes[0].nodes[0].attribute.startsWith("data-")||o.nodes[0].nodes[0].attribute.startsWith("aria-")))&&o.nodes[0].nodes.at(-1)?.type==="nesting"){let p=o.nodes[0],d=p.nodes;d.pop();let m=d.at(-1);for(;m?.type==="combinator"&&m.value===" ";)d.pop(),m=d.at(-1);l=!0,Object.assign(a,e.parseVariant(`in-[${p.toString().trim()}]`));continue}let c=o.nodes[0].filter(p=>p.type!=="nesting");if(c.length!==1)continue;let f=c[0];if(f.type==="pseudo"&&f.value===":is"){if(f.nodes.length!==1||f.nodes[0].nodes.length!==1)continue;f=f.nodes[0].nodes[0]}if(f.type==="pseudo"){let p=f,d=!1;if(f.value===":not"){if(d=!0,f.nodes.length!==1||f.nodes[0].type!=="selector"||f.nodes[0].nodes.length!==1||f.nodes[0].nodes[0].type!=="pseudo")continue;p=f.nodes[0].nodes[0]}let m=(g=>{if(g===":first-letter")return"first-letter";if(g===":first-line")return"first-line";if(g===":file-selector-button")return"file";if(g===":placeholder")return"placeholder";if(g===":backdrop")return"backdrop";if(g===":first-child")return"first";if(g===":last-child")return"last";if(g===":only-child")return"only";if(g===":first-of-type")return"first-of-type";if(g===":last-of-type")return"last-of-type";if(g===":only-of-type")return"only-of-type";if(g===":visited")return"visited";if(g===":target")return"target";if(g===":default")return"default";if(g===":checked")return"checked";if(g===":indeterminate")return"indeterminate";if(g===":placeholder-shown")return"placeholder-shown";if(g===":autofill")return"autofill";if(g===":optional")return"optional";if(g===":required")return"required";if(g===":valid")return"valid";if(g===":invalid")return"invalid";if(g===":in-range")return"in-range";if(g===":out-of-range")return"out-of-range";if(g===":read-only")return"read-only";if(g===":empty")return"empty";if(g===":focus-within")return"focus-within";if(g===":focus")return"focus";if(g===":focus-visible")return"focus-visible";if(g===":active")return"active";if(g===":enabled")return"enabled";if(g===":disabled")return"disabled";if(g===":nth-child"&&p.nodes.length===1&&p.nodes[0].nodes.length===1&&p.nodes[0].nodes[0].type==="tag"&&p.nodes[0].nodes[0].value==="odd")return d?(d=!1,"even"):"odd";if(g===":nth-child"&&p.nodes.length===1&&p.nodes[0].nodes.length===1&&p.nodes[0].nodes[0].type==="tag"&&p.nodes[0].nodes[0].value==="even")return d?(d=!1,"odd"):"even";for(let[w,S]of[[":nth-child","nth"],[":nth-last-child","nth-last"],[":nth-of-type","nth-of-type"],[":nth-last-of-type","nth-of-last-type"]])if(g===w&&p.nodes.length===1)return p.nodes[0].nodes.length===1&&p.nodes[0].nodes[0].type==="tag"&&te(p.nodes[0].nodes[0].value)?`${S}-${p.nodes[0].nodes[0].value}`:`${S}-[${p.nodes[0].toString()}]`;return null})(p.value);if(m===null)continue;d&&(m=`not-${m}`);let h=e.parseVariant(m);if(h===null)continue;l=!0,Object.assign(a,h)}else if(f.type==="attribute"){let p=f.attribute,d=f.value?f.quoted?`${f.quoteMark}${f.value}${f.quoteMark}`:f.value:null;f.insensitive&&d&&(d+=" i");let m=f.operator??"=";p.startsWith("data-")?(l=!0,p=p.slice(5),Object.assign(a,{kind:"functional",root:"data",modifier:null,value:d===null?{kind:"named",value:p}:{kind:"arbitrary",value:`${p}${m}${d}`}})):p.startsWith("aria-")&&(l=!0,p=p.slice(5),Object.assign(a,{kind:"functional",root:"aria",modifier:null,value:d===null?{kind:"arbitrary",value:p}:m==="="&&f.value==="true"&&!f.insensitive?{kind:"named",value:p}:{kind:"arbitrary",value:`${p}${m}${d}`}}))}if(u){let p=n.variants.indexOf(a);if(p===-1)continue;n.variants.splice(p,1,a,u)}}return l?b(e,n):r}return r}function*Ui(e){function*t(r,i=null){yield[r,i],r.kind==="compound"&&(yield*t(r.variant,r))}for(let r of e.variants)yield*t(r,null)}function yr(e,t,r){if(!e.theme.prefix)return r;let i=Mi(e,t,r);if(!i)return r;let n=e.theme.prefix,l=null;try{e.theme.prefix=null;let a=r.slice(0,i.start)+i.base+r.slice(i.end),s=[...D(a,e)];s.length>0&&(l=s[0])}finally{e.theme.prefix=n}return l?b(e,l):r}function Mi(e,t,r){if(!e.theme.prefix)return null;if(!t.prefix)throw new Error("Could not find the Tailwind CSS v3 `prefix` configuration inside the JavaScript config.");let n=v(r,":").pop(),l=r.length-n.length,a=l+n.length,s=!1,o=!1;return n[n.length-1]==="!"?(s=!0,n=n.slice(0,-1)):n[0]==="!"&&(s=!0,n=n.slice(1)),n[0]==="-"&&(o=!0,n=n.slice(1)),!n.startsWith(t.prefix)&&n[0]!=="["?null:(n[0]!=="["&&(n=n.slice(t.prefix.length)),o&&(n="-"+n),s&&(n+="!"),{base:n,start:l,end:a})}var Li=/([a-z]+)/;function vr(e){let t=Li.exec(e.toLocaleLowerCase());return t?t[0]:(console.warn(`The prefix "${e} can not be used with Tailwind CSS v4 and cannot be converted to a valid one automatically. We've updated it to "tw" for you.`),"tw")}var ut={"overflow-clip":"text-clip","overflow-ellipsis":"text-ellipsis","flex-grow":"grow","flex-grow-0":"grow-0","flex-shrink":"shrink","flex-shrink-0":"shrink-0","decoration-clone":"box-decoration-clone","decoration-slice":"box-decoration-slice","outline-none":"outline-hidden"},wr=new WeakSet;function br(e,t,r){if(!wr.has(e)){for(let i in ut)e.utilities.static(i,()=>[]);wr.add(e)}for(let i of e.parseCandidate(r))if(i.kind==="static"&&Object.hasOwn(ut,i.root))return b(e,{...i,root:ut[i.root]});return r}function B(e){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");var t=String(e),r=t.length,i=-1,n,l="",a=t.charCodeAt(0);if(r==1&&a==45)return"\\"+t;for(;++i<r;){if(n=t.charCodeAt(i),n==0){l+="\uFFFD";continue}if(n>=1&&n<=31||n==127||i==0&&n>=48&&n<=57||i==1&&n>=48&&n<=57&&a==45){l+="\\"+n.toString(16)+" ";continue}if(n>=128||n==45||n==95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){l+=t.charAt(i);continue}l+="\\"+t.charAt(i)}return l}function kr(e){return e.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g,t=>t.length>2?String.fromCodePoint(Number.parseInt(t.slice(1).trim(),16)):t[1])}function xr(e){let t=[];return Cr(e,[],(r,i)=>{if(Bi(r))return t.push([i,r]),1;if(qi(r)){t.push([i,r[0]]);for(let n of Reflect.ownKeys(r[1]))t.push([[...i,`-${n}`],r[1][n]]);return 1}if(Array.isArray(r)&&r.every(n=>typeof n=="string"))return t.push([i,r.join(", ")]),1}),t}var Wi=/^[a-zA-Z0-9-_%/\.]+$/;function U(e){if(e[0]==="container")return null;e=structuredClone(e),e[0]==="animation"&&(e[0]="animate"),e[0]==="borderRadius"&&(e[0]="radius"),e[0]==="boxShadow"&&(e[0]="shadow"),e[0]==="colors"&&(e[0]="color"),e[0]==="fontFamily"&&(e[0]="font"),e[0]==="fontSize"&&(e[0]="text"),e[0]==="letterSpacing"&&(e[0]="tracking"),e[0]==="lineHeight"&&(e[0]="leading"),e[0]==="maxWidth"&&(e[0]="container"),e[0]==="screens"&&(e[0]="breakpoint"),e[0]==="transitionTimingFunction"&&(e[0]="ease");for(let t of e)if(!Wi.test(t))return null;return e.map((t,r,i)=>t==="1"&&r!==i.length-1?"":t).map(t=>t.replaceAll(".","_").replace(/([a-z])([A-Z])/g,(r,i,n)=>`${i}-${n.toLowerCase()}`)).filter((t,r)=>t!=="DEFAULT"||r!==e.length-1).join("-")}function Bi(e){return typeof e=="number"||typeof e=="string"}function qi(e){if(!Array.isArray(e)||e.length!==2||typeof e[0]!="string"&&typeof e[0]!="number"||e[1]===void 0||e[1]===null||typeof e[1]!="object")return!1;for(let t of Reflect.ownKeys(e[1]))if(typeof t!="string"||typeof e[1][t]!="string"&&typeof e[1][t]!="number")return!1;return!0}function Cr(e,t=[],r){for(let i of Reflect.ownKeys(e)){let n=e[i];if(n==null)continue;let l=[...t,i],a=r(n,l)??0;if(a!==1){if(a===2)break;!Array.isArray(n)&&typeof n!="object"||Cr(n,l,r)}}}function q(e){let t=[];for(let r of v(e,".")){if(!r.includes("[")){t.push(r);continue}let i=0;for(;;){let n=r.indexOf("[",i),l=r.indexOf("]",n);if(n===-1||l===-1)break;n>i&&t.push(r.slice(i,n)),t.push(r.slice(n+1,l)),i=l+1}i<=r.length-1&&t.push(r.slice(i))}return t}function Sr(e,t,r){let i=ct(e);for(let n of D(r,e)){let l=structuredClone(n),a=!1;if(l.kind==="arbitrary"){let[s,o]=i(l.value,l.modifier===null?1:0);s!==l.value&&(a=!0,l.value=s,o!==null&&(l.modifier=o))}else if(l.kind==="functional"&&l.value?.kind==="arbitrary"){let[s,o]=i(l.value.value,l.modifier===null?1:0);s!==l.value.value&&(a=!0,l.value.value=s,o!==null&&(l.modifier=o))}for(let s of Gi(l))if(s.kind==="arbitrary"){let[o]=i(s.selector,2);o!==s.selector&&(a=!0,s.selector=o)}else if(s.kind==="functional"&&s.value?.kind==="arbitrary"){let[o]=i(s.value.value,2);o!==s.value.value&&(a=!0,s.value.value=o)}return a?b(e,l):r}return r}function ct(e,{prettyPrint:t=!1}={}){function r(a,s=0){let o=T(a);if(s&2)return[je(o,l),null];let u=0,c=0;if(I(o,d=>{d.kind==="function"&&d.value==="theme"&&(u+=1,I(d.nodes,m=>m.kind==="separator"&&m.value.includes(",")?2:m.kind==="separator"&&m.value.trim()==="/"?(c+=1,2):1))}),u===0)return[a,null];if(c===0)return[je(o,n),null];if(c>1)return[je(o,l),null];let f=null;return[je(o,(d,m)=>{let h=v(d,"/").map(g=>g.trim());if(h.length>2)return null;if(o.length===1&&h.length===2&&s&1){let[g,w]=h;if(/^\d+%$/.test(w))f={kind:"named",value:w.slice(0,-1)};else if(/^0?\.\d+$/.test(w)){let S=Number(w)*100;f={kind:Number.isInteger(S)?"named":"arbitrary",value:S.toString()}}else f={kind:"arbitrary",value:w};d=g}return n(d,m)||l(d,m)}),f]}function i(a){let s=`--${U(q(a))}`;return e.theme.get([s])?s:null}function n(a,s){let o=i(a);if(o)return s?`var(${o}, ${s})`:`var(${o})`;let u=q(a);if(u[0]==="spacing"&&e.theme.get(["--spacing"])){let c=u[1];return ye(c)?"calc(var(--spacing) * "+c+")":null}return null}function l(a,s){let o=v(a,"/").map(f=>f.trim());a=o.shift();let u=i(a);if(!u)return null;let c=o.length>0?t?` / ${o.join(" / ")}`:`/${o.join("/")}`:"";return s?`theme(${u}${c}, ${s})`:`theme(${u}${c})`}return r}function je(e,t){return I(e,(r,{replaceWith:i})=>{if(r.kind==="function"&&r.value==="theme"){if(r.nodes.length<1)return;r.nodes[0].kind==="separator"&&r.nodes[0].value.trim()===""&&r.nodes.shift();let n=r.nodes[0];if(n.kind!=="word")return;let l=n.value,a=1;for(let u=a;u<r.nodes.length&&!r.nodes[u].value.includes(",");u++)l+=C([r.nodes[u]]),a=u+1;l=Ji(l);let s=r.nodes.slice(a+1),o=s.length>0?t(l,C(s)):t(l);if(o===null)return;i(T(o))}}),C(e)}function Ji(e){if(e[0]!=="'"&&e[0]!=='"')return e;let t="",r=e[0];for(let i=1;i<e.length-1;i++){let n=e[i],l=e[i+1];n==="\\"&&(l===r||l==="\\")?(t+=l,i++):t+=n}return t}function*Gi(e){function*t(r){yield r,r.kind==="compound"&&(yield*t(r.variant))}for(let r of e.variants)yield*t(r)}function Ar(e,t,r){for(let i of e.parseCandidate(r)){if(i.variants.length<=1)continue;let n=[],l=[],a=[],s=i.variants;for(let c of i.variants)Hi(e,c)?n.push(c):Qi(e,c)?a.push(c):l.push(c);let o=l.some(c=>Yi(e,c)),u=[...a,...o?l.reverse():l,...n];if(!Zi(s,u))return b(e,{...i,variants:u})}return r}function Hi(e,t){return t.kind==="static"&&t.root==="dark"?!0:ft(e,t).every(i=>i.kind==="at-rule")}function Yi(e,t){return ft(e,t).some(i=>i.kind==="rule"&&(i.selector.includes(" ")||i.selector.includes(">")||i.selector.includes("+")||i.selector.includes("~")))}function Qi(e,t){return ft(e,t).some(i=>i.kind==="rule"&&(i.selector.includes("::after")||i.selector.includes("::backdrop")||i.selector.includes("::before")||i.selector.includes("::first-letter")||i.selector.includes("::first-line")||i.selector.includes("::marker")||i.selector.includes("::placeholder")||i.selector.includes("::selection")))}function ft(e,t){let r=[],i=e.compileAstNodes({kind:"arbitrary",property:"color",value:"red",modifier:null,variants:[t],important:!1,raw:"candidate"}).map(n=>n.node);return j(i,n=>{n.kind==="rule"&&n.selector===".candidate"||n.kind==="declaration"&&n.property==="color"&&n.value==="red"||r.push(n)}),r}function Zi(e,t){return e.length!==t.length?!1:e.every((r,i)=>t[i]===r)}function $r(e,t){if(!t[0])return e;t.sort((n,l)=>n.end-l.end||n.start-l.start);let r="",i=t[0];r+=e.slice(0,i.start),r+=i.replacement;for(let n=1;n<t.length;++n){let l=t[n];r+=e.slice(i.end,l.start),r+=l.replacement,i=l}return r+=e.slice(i.end),r}var eo=[yr,fr,ur,br,mr,gr,Sr,Ar,ar,pr,ir,hr];async function pt(e,t,r,i){for(let n of eo)r=await n(e,t,r,i);return r}async function Nr(e,t,r,i){let n=await Ht(r,i),l=[];for(let{rawCandidate:a,start:s,end:o}of n){let u=await pt(e,t,a,{contents:r,start:s,end:o});u!==a&&l.push({start:s,end:o,replacement:u})}return $r(r,l)}async function Rr(e,t,r){let i=Vr.isAbsolute(r)?r:Vr.resolve(process.cwd(),r),n=await Tr.readFile(i,"utf-8");await Tr.writeFile(i,await Nr(e,t,n,Xi(r)))}function _r({designSystem:e,userConfig:t}){function r(i){let n=i.params.split(/(\s+)/),l=n[n.length-1]==="!important"||n[n.length-1]==="#{!important}";l&&n.pop();let a=n.map(s=>{if(s.trim()==="")return s;let o=v(s,":"),u=o.pop();return l&&u[0]!=="!"&&u[u.length-1]!=="!"&&(u+="!"),[...o,u].join(":")});return async()=>{a=await Promise.all(a.map(async s=>await pt(e,t,s))),i.params=a.join("").trim()}}return{postcssPlugin:"@tailwindcss/upgrade/migrate-at-apply",async OnceExit(i){let n=[];i.walkAtRules("apply",l=>{n.push(r(l))}),await Promise.allSettled(n.map(l=>l()))}}}import"postcss";import Ke from"postcss-selector-parser";import*as Pr from"node:fs";import*as Er from"node:fs/promises";import*as be from"node:path";import*as Or from"node:util";import*as Ie from"postcss";var J=class e{id;root;isTailwindRoot=!1;linkedConfigPath=null;file=null;parents=new Set;children=new Set;canMigrate=!0;extension=null;static async load(t){t=be.resolve(process.cwd(),t);let r=await Er.readFile(t,"utf-8"),i=Ie.parse(r,{from:t});return new e(i,t)}static loadSync(t){t=be.resolve(process.cwd(),t);let r=Pr.readFileSync(t,"utf-8"),i=Ie.parse(r,{from:t});return new e(i,t)}static async fromString(t){let r=Ie.parse(t);return new e(r)}static async fromRoot(t,r){return new e(t,r)}constructor(t,r){this.id=Math.random().toString(36).slice(2),this.root=t,this.file=r??null,r&&(this.extension=be.extname(r))}get importRules(){let t=new Set;return this.root.walkAtRules("import",r=>{t.add(r)}),t}get isEmpty(){return this.root.toString().trim()===""}*ancestors(){for(let{item:t}of we(this,r=>r.parents))yield t}*descendants(){for(let{item:t}of we(this,r=>r.children))yield t}layers(){let t=new Set;for(let{item:r,path:i}of we(this,n=>n.parents))if(!(r.parents.size>0))for(let{meta:n}of i)for(let l of n.layers)t.add(l);return t}*pathsToRoot(){for(let{item:t,path:r}of we(this,i=>i.parents))t.parents.size>0||(yield r)}analyzeImportPaths(){let t=[],r=[];for(let i of this.pathsToRoot()){let n=!1;for(let{meta:l}of i)for(let a of l.layers)n||=a==="utilities"||a==="components";n?t.push(i):r.push(i)}return{convertiblePaths:t,nonConvertiblePaths:r}}containsRule(t){let r=!1;if(this.root.walk(i=>{if(t(i))return r=!0,!1}),r)return!0;for(let i of this.children)if(i.item.containsRule(t))return!0;return!1}[Or.inspect.custom](){return{...this,root:this.root.toString(),layers:Array.from(this.layers()),parents:Array.from(this.parents,t=>t.item.id),children:Array.from(this.children,t=>t.item.id),parentsMeta:Array.from(this.parents,t=>t.meta),childrenMeta:Array.from(this.children,t=>t.meta)}}};function*we(e,t,r=[]){for(let i of t(e)){let n=[...r,i];yield*we(i.item,t,n),yield{item:i.item,path:n}}}function Dr(e){function t(r){if(r.params!=="utilities"&&r.params!=="components")return;let i=r.clone();A(r,a=>{if(a.type!=="rule")return;let s=v(a.selector,",");if(s.length>1){let o=[];for(let u of s){let c=a.clone({selector:u});o.push(c)}a.replaceWith(o)}return 1});let n=new Set;A(r,a=>{if(a.type==="rule")return Ke(s=>{s.each(o=>{A(o,u=>{if(u.type==="pseudo"&&u.value===":not")return 1;u.type==="class"&&n.add(u.value)})})}).processSync(a.selector,{updateSelector:!1}),1}),A(i,a=>{a.type==="rule"&&Ke(s=>{s.each(o=>{A(o,u=>{if(u.type==="pseudo"&&u.value===":not")return 1;if(u.type==="class"&&n.has(u.value))return a.remove(),2})})}).processSync(a,{updateSelector:!0})});let l=[i];for(let a of n){let s=r.clone();l.push(s),A(s,o=>{if(o.type==="atrule"&&(!o.nodes||o.nodes?.length===0)&&o.remove(),o.type!=="rule")return;let u=!1;if(Ke(c=>{c.each(f=>{A(f,p=>{if(p.type==="pseudo"&&p.value===":not")return 1;if(p.type==="class"&&p.value===a){u=!0;let d=f.atPosition(p.source.start.line,p.source.start.column),m=d.parent,h=(d.parent?.index(d)??0)-1;for(;h>=0&&m.at(h)?.type!=="combinator";){let g=m.at(h+1),w=m.at(h);m.at(h+1).replaceWith(w),m.at(h).replaceWith(g),h--}d.replaceWith(Ke.nesting())}})})}).processSync(o,{updateSelector:!0}),!u){let c=[o],f=o.parent?.index(o)??null;if(f!==null)for(let p=f-1;p>=0&&o.parent?.nodes.at(p)?.type!=="rule";p--)o.parent?.nodes.at(p)?.type==="comment"&&c.push(o.parent?.nodes.at(p));for(let p of c)p.remove()}return 1}),s.name="utility",s.params=a,s.raws.before=`${s.raws.before??""}
|
|
20
20
|
|
|
21
|
-
`}for(let a=
|
|
21
|
+
`}for(let a=l.length-1;a>=0;a--){let s=l[a];rt(s,o=>{if(s===i&&o.type==="comment"){let u=!1;for(let c of l)if(c!==i&&(A(c,f=>{if(f.type==="comment"&&f.source?.start?.offset===o.source?.start?.offset)return o.remove(),u=!0,2}),u))return 1}if((o.type==="rule"||o.type==="atrule")&&o.nodes?.length===0)o.remove();else if(o.type==="rule"&&o.selector==="&"){let u=o.parent,c=!1;for(;u;){if(u.type==="rule"){c=!0;break}u=u.parent}c||o.replaceWith(o.nodes)}}),s.nodes?.length===0&&l.splice(a,1)}r.replaceWith(l)}return{postcssPlugin:"@tailwindcss/upgrade/migrate-at-layer-utilities",OnceExit:(r,{atRule:i})=>{let n=e.layers(),l=n.has("utilities")||n.has("components");if(l){let a=i({name:"layer",params:"utilities"});a.append(r.nodes),r.append(a)}r.walkAtRules("layer",t);{let a=new Map;A(r,s=>{if(s.type==="atrule"&&s.name==="utility"){let o=a.get(s.params);o?(o.append(s.nodes),s.remove()):a.set(s.params,s)}})}l&&r.each(a=>{a.type==="atrule"&&a.name==="layer"&&a.params==="utilities"&&a.replaceWith(a.nodes??[])})}}}import to from"dedent";import ro from"postcss";var no="currentColor",io=to,oo=io`
|
|
22
22
|
/*
|
|
23
23
|
The default border color has changed to \`currentColor\` in Tailwind CSS v4,
|
|
24
24
|
so we've added these compatibility styles to make sure everything still
|
|
@@ -36,33 +36,35 @@ import{globby as di}from"globby";import pi from"node:fs/promises";import No from
|
|
|
36
36
|
border-color: theme(borderColor.DEFAULT);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
`;function
|
|
39
|
+
`;function jr({designSystem:e,userConfig:t}){let r=t?.theme?.borderColor?.DEFAULT;function i(l){let a=`--${U(q(l))}`;return!!e.theme.get([a])}function n(l){let a=!1;if(l.walkAtRules("import",u=>{if(/['"]tailwindcss['"]/.test(u.params)||/['"]tailwindcss\/preflight['"]/.test(u.params))return a=!0,!1}),!a)return;let s="";r!==no&&(s+=oo,s+=`
|
|
40
40
|
|
|
41
41
|
`),s=`
|
|
42
42
|
@tw-bucket compatibility {
|
|
43
43
|
${s}
|
|
44
44
|
}
|
|
45
|
-
`;let
|
|
45
|
+
`;let o=ro.parse(s);o.walkDecls(u=>{u.value.includes("theme(")&&(u.value=lo(T(u.value),c=>i(c)?r:c==="borderColor.DEFAULT"?"var(--color-gray-200, currentColor)":null))}),l.walkAtRules("theme",u=>{u.walkDecls("--border-color",c=>{c.remove()}),u.nodes?.length===0&&u.remove()}),l.append(o)}return{postcssPlugin:"@tailwindcss/upgrade/migrate-border-compatibility",OnceExit:n}}function lo(e,t){return I(e,(r,{replaceWith:i})=>{if(r.kind==="function"&&r.value==="theme"){if(r.nodes.length<1)return;r.nodes[0].kind==="separator"&&r.nodes[0].value.trim()===""&&r.nodes.shift();let n=r.nodes[0];if(n.kind!=="word")return;let l=n.value,a=1;for(let u=a;u<r.nodes.length&&!r.nodes[u].value.includes(",");u++)l+=C([r.nodes[u]]),a=u+1;l=ao(l);let s=r.nodes.slice(a+1),o=s.length>0?t(l,C(s)):t(l);if(o===null)return;i(T(o))}}),C(e)}function ao(e){if(e[0]!=="'"&&e[0]!=='"')return e;let t="",r=e[0];for(let i=1;i<e.length-1;i++){let n=e[i],l=e[i+1];n==="\\"&&(l===r||l==="\\")?(t+=l,i++):t+=n}return t}import Fe from"node:path";import uo,{AtRule as co}from"postcss";function so(e,t){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var r=e.length;if(r<=1)return e;var i="";if(r>4&&e[3]==="\\"){var n=e[2];(n==="?"||n===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),i="//")}var l=e.split(/[/\\]+/);return t!==!1&&l[l.length-1]===""&&l.pop(),i+l.join("/")}function dt(e){let t=so(e);return e.startsWith("\\\\")&&t.startsWith("/")&&!t.startsWith("//")?`/${t}`:t}var Ir=new WeakMap;function Ur(e,{configFilePath:t,jsConfigMigration:r}){function i(){if(!e.isTailwindRoot)return;let n=Ir.get(e);if(n&&n.includes(t))return;n?n.push(t):Ir.set(e,[t]);let l=e.root;if(!e.file)return;let a=new co;if(r!==null){l.walkAtRules("config",o=>{o.remove()});let s=`
|
|
46
46
|
|
|
47
|
-
`;
|
|
48
|
-
@tw-bucket source {`;for(let
|
|
49
|
-
`}
|
|
50
|
-
`,
|
|
47
|
+
`;s+=`
|
|
48
|
+
@tw-bucket source {`;for(let o of r.sources){let u=Fe.resolve(o.base,o.pattern);s+=`@source '${Kr(e,u)}';
|
|
49
|
+
`}s+=`}
|
|
50
|
+
`,s+=`
|
|
51
51
|
@tw-bucket plugin {
|
|
52
|
-
`;for(let
|
|
53
|
-
`;else{
|
|
54
|
-
`;for(let[c,
|
|
55
|
-
`}
|
|
56
|
-
`}}
|
|
57
|
-
`,l.append(vn.parse(u+r.css))}s.append(l.nodes)}function i(o){let a=!1,s=!1;if(o.walkAtRules("import",l=>{if(l.params.match(/['"]tailwindcss['"]/))return a=!0,s=!0,!1;l.params.match(/['"]tailwindcss\/.*?['"]/)&&(a=!0)}),!!a){if(s||e.parents.size<=0){n(e);return}if(e.parents.size>0)for(let l of e.ancestors())l.parents.size===0&&n(l)}}return{postcssPlugin:"@tailwindcss/upgrade/migrate-config",OnceExit:i}}function hr(e,t){if(!e.file)throw new Error("Can not find a path for the stylesheet");let r=e.file,n=$e.relative($e.dirname(r),t);return n[0]!=="."&&(n=`./${n}`),Xe(n)}function yr(e){return`'${e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}import bn from"node:fs/promises";import{dirname as kn,resolve as xn}from"node:path";import"postcss";function br(e){let t,r=null,n=null,i=null;for(let o=0;o<e.length;o++){let a=e[o];if(a.kind!=="separator"){if(a.kind==="word"&&!t){if(!a.value)throw new Error("Unable to find uri");if(a.value[0]!=='"'&&a.value[0]!=="'")throw new Error("Unable to find uri");t=a.value.slice(1,-1);continue}if(a.kind==="function"&&a.value.toLowerCase()==="url")throw new Error("url functions are not supported");if(!t)throw new Error("Unable to find uri");if((a.kind==="word"||a.kind==="function")&&a.value.toLowerCase()==="layer"){if(r)throw new Error("Multiple layers");if(i)throw new Error("layers must be defined before support conditions");"nodes"in a?r=b(a.nodes):r="";continue}if(a.kind==="function"&&a.value.toLowerCase()==="supports"){if(i)throw new Error("Multiple support conditions");i=b(a.nodes);continue}n=b(e.slice(o));break}}if(!t)throw new Error("Unable to find uri");return{uri:t,layer:r,media:n,supports:i}}function kr(){async function e(t){let r=t.source?.input.file;if(!r)return;let n=[];t.walkAtRules("import",i=>{let[o,...a]=v(i.params," "),s=br(A(o)),l=s.uri[0]===".",u=s.uri.endsWith(".css");if(l&&u)return;let f=xn(kn(r),s.uri);u||(f+=".css"),n.push(bn.stat(f).then(()=>{let d=u?"":".css",c=l?s.uri:`./${s.uri}`;i.params=[`'${c}${d}'`,...a].join(" ")}))}),await Promise.allSettled(n)}return{postcssPlugin:"@tailwindcss/upgrade/migrate-import",OnceExit:e}}import"postcss";var xr={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(0.984 0.003 247.858)",100:"oklch(0.968 0.007 247.896)",200:"oklch(0.929 0.013 255.508)",300:"oklch(0.869 0.022 252.894)",400:"oklch(0.704 0.04 256.788)",500:"oklch(0.554 0.046 257.417)",600:"oklch(0.446 0.043 257.281)",700:"oklch(0.372 0.044 257.287)",800:"oklch(0.279 0.041 260.031)",900:"oklch(0.208 0.042 265.755)",950:"oklch(0.129 0.042 264.695)"},gray:{50:"oklch(0.985 0.002 247.839)",100:"oklch(0.967 0.003 264.542)",200:"oklch(0.928 0.006 264.531)",300:"oklch(0.872 0.01 258.338)",400:"oklch(0.707 0.022 261.325)",500:"oklch(0.551 0.027 264.364)",600:"oklch(0.446 0.03 256.802)",700:"oklch(0.373 0.034 259.733)",800:"oklch(0.278 0.033 256.848)",900:"oklch(0.21 0.034 264.665)",950:"oklch(0.13 0.028 261.692)"},zinc:{50:"oklch(0.985 0 0)",100:"oklch(0.967 0.001 286.375)",200:"oklch(0.92 0.004 286.32)",300:"oklch(0.871 0.006 286.286)",400:"oklch(0.705 0.015 286.067)",500:"oklch(0.552 0.016 285.938)",600:"oklch(0.442 0.017 285.786)",700:"oklch(0.37 0.013 285.805)",800:"oklch(0.274 0.006 286.033)",900:"oklch(0.21 0.006 285.885)",950:"oklch(0.141 0.005 285.823)"},neutral:{50:"oklch(0.985 0 0)",100:"oklch(0.97 0 0)",200:"oklch(0.922 0 0)",300:"oklch(0.87 0 0)",400:"oklch(0.708 0 0)",500:"oklch(0.556 0 0)",600:"oklch(0.439 0 0)",700:"oklch(0.371 0 0)",800:"oklch(0.269 0 0)",900:"oklch(0.205 0 0)",950:"oklch(0.145 0 0)"},stone:{50:"oklch(0.985 0.001 106.423)",100:"oklch(0.97 0.001 106.424)",200:"oklch(0.923 0.003 48.717)",300:"oklch(0.869 0.005 56.366)",400:"oklch(0.709 0.01 56.259)",500:"oklch(0.553 0.013 58.071)",600:"oklch(0.444 0.011 73.639)",700:"oklch(0.374 0.01 67.558)",800:"oklch(0.268 0.007 34.298)",900:"oklch(0.216 0.006 56.043)",950:"oklch(0.147 0.004 49.25)"},red:{50:"oklch(0.971 0.013 17.38)",100:"oklch(0.936 0.032 17.717)",200:"oklch(0.885 0.062 18.334)",300:"oklch(0.808 0.114 19.571)",400:"oklch(0.704 0.191 22.216)",500:"oklch(0.637 0.237 25.331)",600:"oklch(0.577 0.245 27.325)",700:"oklch(0.505 0.213 27.518)",800:"oklch(0.444 0.177 26.899)",900:"oklch(0.396 0.141 25.723)",950:"oklch(0.258 0.092 26.042)"},orange:{50:"oklch(0.98 0.016 73.684)",100:"oklch(0.954 0.038 75.164)",200:"oklch(0.901 0.076 70.697)",300:"oklch(0.837 0.128 66.29)",400:"oklch(0.75 0.183 55.934)",500:"oklch(0.705 0.213 47.604)",600:"oklch(0.646 0.222 41.116)",700:"oklch(0.553 0.195 38.402)",800:"oklch(0.47 0.157 37.304)",900:"oklch(0.408 0.123 38.172)",950:"oklch(0.266 0.079 36.259)"},amber:{50:"oklch(0.987 0.022 95.277)",100:"oklch(0.962 0.059 95.617)",200:"oklch(0.924 0.12 95.746)",300:"oklch(0.879 0.169 91.605)",400:"oklch(0.828 0.189 84.429)",500:"oklch(0.769 0.188 70.08)",600:"oklch(0.666 0.179 58.318)",700:"oklch(0.555 0.163 48.998)",800:"oklch(0.473 0.137 46.201)",900:"oklch(0.414 0.112 45.904)",950:"oklch(0.279 0.077 45.635)"},yellow:{50:"oklch(0.987 0.026 102.212)",100:"oklch(0.973 0.071 103.193)",200:"oklch(0.945 0.129 101.54)",300:"oklch(0.905 0.182 98.111)",400:"oklch(0.852 0.199 91.936)",500:"oklch(0.795 0.184 86.047)",600:"oklch(0.681 0.162 75.834)",700:"oklch(0.554 0.135 66.442)",800:"oklch(0.476 0.114 61.907)",900:"oklch(0.421 0.095 57.708)",950:"oklch(0.286 0.066 53.813)"},lime:{50:"oklch(0.986 0.031 120.757)",100:"oklch(0.967 0.067 122.328)",200:"oklch(0.938 0.127 124.321)",300:"oklch(0.897 0.196 126.665)",400:"oklch(0.841 0.238 128.85)",500:"oklch(0.768 0.233 130.85)",600:"oklch(0.648 0.2 131.684)",700:"oklch(0.532 0.157 131.589)",800:"oklch(0.453 0.124 130.933)",900:"oklch(0.405 0.101 131.063)",950:"oklch(0.274 0.072 132.109)"},green:{50:"oklch(0.982 0.018 155.826)",100:"oklch(0.962 0.044 156.743)",200:"oklch(0.925 0.084 155.995)",300:"oklch(0.871 0.15 154.449)",400:"oklch(0.792 0.209 151.711)",500:"oklch(0.723 0.219 149.579)",600:"oklch(0.627 0.194 149.214)",700:"oklch(0.527 0.154 150.069)",800:"oklch(0.448 0.119 151.328)",900:"oklch(0.393 0.095 152.535)",950:"oklch(0.266 0.065 152.934)"},emerald:{50:"oklch(0.979 0.021 166.113)",100:"oklch(0.95 0.052 163.051)",200:"oklch(0.905 0.093 164.15)",300:"oklch(0.845 0.143 164.978)",400:"oklch(0.765 0.177 163.223)",500:"oklch(0.696 0.17 162.48)",600:"oklch(0.596 0.145 163.225)",700:"oklch(0.508 0.118 165.612)",800:"oklch(0.432 0.095 166.913)",900:"oklch(0.378 0.077 168.94)",950:"oklch(0.262 0.051 172.552)"},teal:{50:"oklch(0.984 0.014 180.72)",100:"oklch(0.953 0.051 180.801)",200:"oklch(0.91 0.096 180.426)",300:"oklch(0.855 0.138 181.071)",400:"oklch(0.777 0.152 181.912)",500:"oklch(0.704 0.14 182.503)",600:"oklch(0.6 0.118 184.704)",700:"oklch(0.511 0.096 186.391)",800:"oklch(0.437 0.078 188.216)",900:"oklch(0.386 0.063 188.416)",950:"oklch(0.277 0.046 192.524)"},cyan:{50:"oklch(0.984 0.019 200.873)",100:"oklch(0.956 0.045 203.388)",200:"oklch(0.917 0.08 205.041)",300:"oklch(0.865 0.127 207.078)",400:"oklch(0.789 0.154 211.53)",500:"oklch(0.715 0.143 215.221)",600:"oklch(0.609 0.126 221.723)",700:"oklch(0.52 0.105 223.128)",800:"oklch(0.45 0.085 224.283)",900:"oklch(0.398 0.07 227.392)",950:"oklch(0.302 0.056 229.695)"},sky:{50:"oklch(0.977 0.013 236.62)",100:"oklch(0.951 0.026 236.824)",200:"oklch(0.901 0.058 230.902)",300:"oklch(0.828 0.111 230.318)",400:"oklch(0.746 0.16 232.661)",500:"oklch(0.685 0.169 237.323)",600:"oklch(0.588 0.158 241.966)",700:"oklch(0.5 0.134 242.749)",800:"oklch(0.443 0.11 240.79)",900:"oklch(0.391 0.09 240.876)",950:"oklch(0.293 0.066 243.157)"},blue:{50:"oklch(0.97 0.014 254.604)",100:"oklch(0.932 0.032 255.585)",200:"oklch(0.882 0.059 254.128)",300:"oklch(0.809 0.105 251.813)",400:"oklch(0.707 0.165 254.624)",500:"oklch(0.623 0.214 259.815)",600:"oklch(0.546 0.245 262.881)",700:"oklch(0.488 0.243 264.376)",800:"oklch(0.424 0.199 265.638)",900:"oklch(0.379 0.146 265.522)",950:"oklch(0.282 0.091 267.935)"},indigo:{50:"oklch(0.962 0.018 272.314)",100:"oklch(0.93 0.034 272.788)",200:"oklch(0.87 0.065 274.039)",300:"oklch(0.785 0.115 274.713)",400:"oklch(0.673 0.182 276.935)",500:"oklch(0.585 0.233 277.117)",600:"oklch(0.511 0.262 276.966)",700:"oklch(0.457 0.24 277.023)",800:"oklch(0.398 0.195 277.366)",900:"oklch(0.359 0.144 278.697)",950:"oklch(0.257 0.09 281.288)"},violet:{50:"oklch(0.969 0.016 293.756)",100:"oklch(0.943 0.029 294.588)",200:"oklch(0.894 0.057 293.283)",300:"oklch(0.811 0.111 293.571)",400:"oklch(0.702 0.183 293.541)",500:"oklch(0.606 0.25 292.717)",600:"oklch(0.541 0.281 293.009)",700:"oklch(0.491 0.27 292.581)",800:"oklch(0.432 0.232 292.759)",900:"oklch(0.38 0.189 293.745)",950:"oklch(0.283 0.141 291.089)"},purple:{50:"oklch(0.977 0.014 308.299)",100:"oklch(0.946 0.033 307.174)",200:"oklch(0.902 0.063 306.703)",300:"oklch(0.827 0.119 306.383)",400:"oklch(0.714 0.203 305.504)",500:"oklch(0.627 0.265 303.9)",600:"oklch(0.558 0.288 302.321)",700:"oklch(0.496 0.265 301.924)",800:"oklch(0.438 0.218 303.724)",900:"oklch(0.381 0.176 304.987)",950:"oklch(0.291 0.149 302.717)"},fuchsia:{50:"oklch(0.977 0.017 320.058)",100:"oklch(0.952 0.037 318.852)",200:"oklch(0.903 0.076 319.62)",300:"oklch(0.833 0.145 321.434)",400:"oklch(0.74 0.238 322.16)",500:"oklch(0.667 0.295 322.15)",600:"oklch(0.591 0.293 322.896)",700:"oklch(0.518 0.253 323.949)",800:"oklch(0.452 0.211 324.591)",900:"oklch(0.401 0.17 325.612)",950:"oklch(0.293 0.136 325.661)"},pink:{50:"oklch(0.971 0.014 343.198)",100:"oklch(0.948 0.028 342.258)",200:"oklch(0.899 0.061 343.231)",300:"oklch(0.823 0.12 346.018)",400:"oklch(0.718 0.202 349.761)",500:"oklch(0.656 0.241 354.308)",600:"oklch(0.592 0.249 0.584)",700:"oklch(0.525 0.223 3.958)",800:"oklch(0.459 0.187 3.815)",900:"oklch(0.408 0.153 2.432)",950:"oklch(0.284 0.109 3.907)"},rose:{50:"oklch(0.969 0.015 12.422)",100:"oklch(0.941 0.03 12.58)",200:"oklch(0.892 0.058 10.001)",300:"oklch(0.81 0.117 11.638)",400:"oklch(0.712 0.194 13.428)",500:"oklch(0.645 0.246 16.439)",600:"oklch(0.586 0.253 17.585)",700:"oklch(0.514 0.222 16.935)",800:"oklch(0.455 0.188 13.697)",900:"oklch(0.41 0.159 10.272)",950:"oklch(0.271 0.105 12.094)"}};function Te(e,t){if(t===null)return e;let r=Number(t);return Number.isNaN(r)||(t=`${r*100}%`),`color-mix(in oklch, ${e} ${t}, transparent)`}function H(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function oe(e,t,r,n=[]){for(let i of t)if(i!=null)for(let o of Reflect.ownKeys(i)){let a=[...n,o],s=r(e[o],i[o],a);s!==void 0?e[o]=s:!H(e[o])||!H(i[o])?e[o]=i[o]:e[o]=oe({},[e[o],i[o]],r,a)}return e}function et(e,t,r){return function(i,o){let a=i.lastIndexOf("/"),s=null;a!==-1&&(s=i.slice(a+1).trim(),i=i.slice(0,a).trim());let l=(()=>{let u=F(i),[f,d]=Sn(e.theme,u),c=r(Cr(t()??{},u)??null);if(typeof f!="object")return typeof d!="object"&&d&4?c??f:f;if(c!==null&&typeof c=="object"&&!Array.isArray(c)){let p=oe({},[c],(m,g)=>g);if(f===null&&Object.hasOwn(c,"__CSS_VALUES__")){let m={};for(let g in c.__CSS_VALUES__)m[g]=c[g],delete p[g];f=m}for(let m in f)m!=="__CSS_VALUES__"&&(c?.__CSS_VALUES__?.[m]&4&&Cr(p,m.split("-"))!==void 0||(p[er(m)]=f[m]));return p}if(Array.isArray(f)&&Array.isArray(d)&&Array.isArray(c)){let p=f[0],m=f[1];d[0]&4&&(p=c[0]??p);for(let g of Object.keys(m))d[1][g]&4&&(m[g]=c[1][g]??m[g]);return[p,m]}return f??c})();return s&&typeof l=="string"&&(l=Te(l,s)),l??o}}function Sn(e,t){if(t.length===1&&t[0].startsWith("--"))return[e.get([t[0]]),e.getOptions(t[0])];let r=D(t),n=new Map,i=new C(()=>new Map),o=e.namespace(`--${r}`);if(o.size===0)return[null,0];let a=new Map;for(let[f,d]of o){if(!f||!f.includes("--")){n.set(f,d),a.set(f,e.getOptions(f?`--${r}-${f}`:`--${r}`));continue}let c=f.indexOf("--"),p=f.slice(0,c),m=f.slice(c+2);m=m.replace(/-([a-z])/g,(g,y)=>y.toUpperCase()),i.get(p===""?null:p).set(m,[d,e.getOptions(`--${r}${f}`)])}let s=e.getOptions(`--${r}`);for(let[f,d]of i){let c=n.get(f);if(typeof c!="string")continue;let p={},m={};for(let[g,[y,h]]of d)p[g]=y,m[g]=h;n.set(f,[c,p]),a.set(f,[s,m])}let l={},u={};for(let[f,d]of n)Ar(l,[f??"DEFAULT"],d);for(let[f,d]of a)Ar(u,[f??"DEFAULT"],d);return t[t.length-1]==="DEFAULT"?[l?.DEFAULT??null,u.DEFAULT??0]:"DEFAULT"in l&&Object.keys(l).length===1?[l.DEFAULT,u.DEFAULT??0]:(l.__CSS_VALUES__=u,[l,u])}function Cr(e,t){for(let r=0;r<t.length;++r){let n=t[r];if(e[n]===void 0){if(t[r+1]===void 0)return;t[r+1]=`${n}-${t[r+1]}`;continue}e=e[n]}return e}function Ar(e,t,r){for(let n of t.slice(0,-1))e[n]===void 0&&(e[n]={}),e=e[n];e[t[t.length-1]]=r}var $n={blocklist:[],future:{},prefix:"",important:!1,darkMode:null,theme:{},plugins:[],content:{files:[]}};function Q(e,t){let r={design:e,configs:[],plugins:[],content:{files:[]},theme:{},extend:{},result:structuredClone($n)};for(let i of t)tt(r,i);for(let i of r.configs)"darkMode"in i&&i.darkMode!==void 0&&(r.result.darkMode=i.darkMode??null),"prefix"in i&&i.prefix!==void 0&&(r.result.prefix=i.prefix??""),"blocklist"in i&&i.blocklist!==void 0&&(r.result.blocklist=i.blocklist??[]),"important"in i&&i.important!==void 0&&(r.result.important=i.important??!1);let n=Vn(r);return{resolvedConfig:{...r.result,content:r.content,theme:r.theme,plugins:r.plugins},replacedThemeKeys:n}}function Tn(e,t){if(Array.isArray(e)&&H(e[0]))return e.concat(t);if(Array.isArray(t)&&H(t[0])&&H(e))return[e,...t];if(Array.isArray(t))return t}function tt(e,{config:t,base:r,path:n}){let i=[];for(let s of t.plugins??[])"__isOptionsFunction"in s?i.push(s()):"handler"in s?i.push(s):i.push({handler:s});if(Array.isArray(t.presets)&&t.presets.length===0)throw new Error("Error in the config file/plugin/preset. An empty preset (`preset: []`) is not currently supported.");for(let s of t.presets??[])tt(e,{path:n,base:r,config:s});for(let s of i)e.plugins.push(s),s.config&&tt(e,{path:n,base:r,config:s.config});let o=t.content??[],a=Array.isArray(o)?o:o.files;for(let s of a)e.content.files.push(typeof s=="object"?s:{base:r,pattern:s});e.configs.push(t)}function Vn(e){let t=new Set,r=et(e.design,()=>e.theme,i),n=Object.assign(r,{theme:r,colors:xr});function i(o){return typeof o=="function"?o(n)??null:o??null}for(let o of e.configs){let a=o.theme??{},s=a.extend??{};for(let l in a)l!=="extend"&&t.add(l);Object.assign(e.theme,a);for(let l in s)e.extend[l]??=[],e.extend[l].push(s[l])}delete e.theme.extend;for(let o in e.extend){let a=[e.theme[o],...e.extend[o]];e.theme[o]=()=>{let s=a.map(i);return oe({},s,Tn)}}for(let o in e.theme)e.theme[o]=i(e.theme[o]);if(e.theme.screens&&typeof e.theme.screens=="object")for(let o of Object.keys(e.theme.screens)){let a=e.theme.screens[o];a&&typeof a=="object"&&("raw"in a||"max"in a||"min"in a&&(e.theme.screens[o]=a.min))}return t}function Sr(e){return(Array.isArray(e)?e:[e]).map(r=>typeof r=="string"?{min:r}:r&&typeof r=="object"?r:null).map(r=>{if(r===null)return null;if("raw"in r)return r.raw;let n="";return r.max!==void 0&&(n+=`${r.max} >= `),n+="width",r.min!==void 0&&(n+=` >= ${r.min}`),`(${n})`}).filter(Boolean).join(", ")}function $r({designSystem:e,userConfig:t}={}){function r(n){if(!e||!t)return;let{resolvedConfig:i}=Q(e,[{base:"",config:t}]),o=i?.theme?.screens||{},a=new C(s=>{let l=e?.resolveThemeValue(`--breakpoint-${s}`)??o?.[s];return typeof l=="string"?`(width >= theme(--breakpoint-${s}))`:l?Sr(l):null});n.walkAtRules("screen",s=>{s.name="media",s.params=`screen(${s.params})`}),n.walkAtRules(s=>{if(s.name!=="media")return;let l=s.params.match(/screen\(([^)]+)\)/);if(!l)return;let u=a.get(l[1]);u&&(s.params=u)})}return{postcssPlugin:"@tailwindcss/upgrade/migrate-media-screen",OnceExit:r}}import{AtRule as _n}from"postcss";function Tr(){function e(t){let r="",n=[],i=[],o=null;t.each(a=>{if(a.type==="atrule"){if(a.name==="config"||a.name==="source"||a.name==="theme"||a.name==="utility"||a.name==="variant"){n.length>0&&i.push([r,n.splice(0)]);return}if(a.name==="tailwind"&&a.params==="base"||a.name==="import"&&a.params.match(/^["']tailwindcss\/base["']/)){n.length>0&&i.push([r,n.splice(0)]),o??="base",r="base";return}if(a.name==="tailwind"&&a.params==="components"||a.name==="import"&&a.params.match(/^["']tailwindcss\/components["']/)){n.length>0&&i.push([r,n.splice(0)]),o??="components",r="components";return}if(a.name==="tailwind"&&a.params==="utilities"||a.name==="import"&&a.params.match(/^["']tailwindcss\/utilities["']/)){n.length>0&&i.push([r,n.splice(0)]),o??="utilities",r="utilities";return}if(a.name==="layer"){n.length>0&&i.push([r,n.splice(0)]);return}if(a.name==="import"){r!==""&&!a.params.includes("layer(")&&(a.params+=` layer(${r})`,a.raws.tailwind_injected_layer=!0),n.length>0&&i.push([r,n.splice(0)]);return}}r===""&&(a.type==="comment"||a.type==="atrule"&&!a.nodes||a.type==="atrule"&&a.name==="charset")||n.push(a)});for(let[a,s]of i){let l=a||o||"";if(l===""||s.every(d=>d.type==="comment"))continue;let u=s[0],f=new _n({name:"layer",params:l,nodes:s.map(d=>d===u?d:d.remove()),raws:{tailwind_pretty:!0}});u.replaceWith(f)}}return{postcssPlugin:"@tailwindcss/upgrade/migrate-missing-layers",OnceExit:e}}import{AtRule as Ve}from"postcss";var rt=["theme","base","components","utilities"];function Vr(e){let t=e.newPrefix?` prefix(${e.newPrefix})`:"";function r(n){let i=null,o=null,a=[],s=null,l=null,u=null,f=null,d=[];n.walkAtRules(c=>{if(c.name==="import"&&c.params.match(/^["']tailwindcss\/tailwind\.css["']$/)&&(c.params=c.params.replace("tailwindcss/tailwind.css","tailwindcss")),c.name==="import"&&c.params.match(/^["']tailwindcss["']/))c.params+=t;else if(c.name==="tailwind"&&c.params==="base"||c.name==="import"&&c.params.match(/^["']tailwindcss\/base["']$/))d.push("base"),a.push(c),i=c;else if(c.name==="tailwind"&&c.params==="utilities"||c.name==="import"&&c.params.match(/^["']tailwindcss\/utilities["']$/))d.push("utilities"),a.push(c),o=c;else if(c.name==="tailwind"&&c.params==="components"||c.name==="tailwind"&&c.params==="screens"||c.name==="tailwind"&&c.params==="variants"||c.name==="import"&&c.params.match(/^["']tailwindcss\/components["']$/))c.remove();else if(c.name==="responsive")if(c.nodes){for(let p of c.nodes)p.raws.tailwind_pretty=!0;c.replaceWith(c.nodes)}else c.remove()}),i!==null&&o!==null?(s||_e(a).before(new Ve({name:"import",params:`'tailwindcss'${t}`})),i?.remove(),o?.remove()):o!==null?(l||_e(a).before(new Ve({name:"import",params:"'tailwindcss/utilities' layer(utilities)"})),o?.remove()):i!==null&&(f||_e(a).before(new Ve({name:"import",params:`'tailwindcss/theme' layer(theme)${t}`})),u||_e(a).before(new Ve({name:"import",params:"'tailwindcss/preflight' layer(base)"})),i?.remove());{let c=d.toSorted((p,m)=>rt.indexOf(p)-rt.indexOf(m));if(d.some((p,m)=>p!==c[m])){let p=rt.toSorted((m,g)=>d.indexOf(m)-d.indexOf(g));n.prepend({name:"layer",params:p.join(", ")})}}}return{postcssPlugin:"@tailwindcss/upgrade/migrate-tailwind-directives",OnceExit:r}}function _e(e){let t=e.at(0),r=t.prev();for(;r;){if(r.type==="rule"&&(t=r),r.type==="atrule")if(r.name==="charset"||r.name==="import"){r=r.prev();continue}else if(r.name==="layer"&&!r.nodes){r=r.prev();continue}else t=r;r=r.prev()}return t}import"postcss";function _r({designSystem:e}={}){return{postcssPlugin:"@tailwindcss/upgrade/migrate-theme-to-var",OnceExit(t){if(!e)return;let r=Ye(e,{prettyPrint:!0});t.walkDecls(n=>{let[i]=r(n.value);n.value=i}),t.walkAtRules(n=>{if(n.name==="media"||n.name==="custom-media"||n.name==="container"||n.name==="supports"){let[i]=r(n.params,2);n.params=i}})}}}import"postcss";function Rr(){function e(t){t.walkAtRules("variants",r=>{r.name==="variants"&&(r.name="layer",r.params="utilities")})}return{postcssPlugin:"@tailwindcss/upgrade/migrate-variants-directive",OnceExit:e}}import{__unstable__loadDesignSystem as Mr,compile as Mn}from"@tailwindcss/node";import Un from"node:fs/promises";import Pe,{dirname as Ur}from"node:path";import{fileURLToPath as Fn}from"node:url";import Re from"enhanced-resolve";import{createJiti as jn}from"jiti";import Ir from"node:fs";import ku from"node:fs/promises";import Cu,{dirname as Er}from"node:path";import{pathToFileURL as Or}from"node:url";import{__unstable__loadDesignSystem as $u,compile as Tu}from"tailwindcss";import it from"node:fs/promises";import le from"node:path";var Rn=[/import[\s\S]*?['"](.{3,}?)['"]/gi,/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/require\(['"`](.+)['"`]\)/gi],Nn=[".js",".cjs",".mjs"],Pn=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],En=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];async function On(e,t){for(let r of t){let n=`${e}${r}`;if((await it.stat(n).catch(()=>null))?.isFile())return n}for(let r of t){let n=`${e}/index${r}`;if(await it.access(n).then(()=>!0,()=>!1))return n}return null}async function Nr(e,t,r,n){let i=Nn.includes(n)?Pn:En,o=await On(le.resolve(r,t),i);if(o===null||e.has(o))return;e.add(o),r=le.dirname(o),n=le.extname(o);let a=await it.readFile(o,"utf-8"),s=[];for(let l of Rn)for(let u of a.matchAll(l))u[1].startsWith(".")&&s.push(Nr(e,u[1],r,n));await Promise.all(s)}async function Pr(e){let t=new Set;return await Nr(t,e,le.dirname(e),le.extname(e)),Array.from(t)}import*as Dn from"node:path";async function Ne(e,t,r){if(e[0]!=="."){let a=await Kr(e,t);if(!a)throw new Error(`Could not resolve '${e}' from '${t}'`);let s=await jr(Or(a).href);return{base:Er(a),module:s.default??s}}let n=await Kr(e,t);if(!n)throw new Error(`Could not resolve '${e}' from '${t}'`);let[i,o]=await Promise.all([jr(Or(n).href+"?id="+Date.now()),Pr(n)]);for(let a of o)r(a);return{base:Er(n),module:i.default??i}}var Dr=null;async function jr(e){try{return await import(e)}catch{return Dr??=jn(import.meta.url,{moduleCache:!1,fsCache:!1}),await Dr.import(e)}}var Ru=Re.ResolverFactory.createResolver({fileSystem:new Re.CachedInputFileSystem(Ir,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"]});var Kn=Re.ResolverFactory.createResolver({fileSystem:new Re.CachedInputFileSystem(Ir,4e3),useSyncFileSystemCalls:!0,extensions:[".js",".json",".node",".ts"],conditionNames:import.meta.url?["node","import"]:["node","require"]});function Kr(e,t){return In(Kn,e,t)}function In(e,t,r){return new Promise((n,i)=>e.resolve({},r,t,{},(o,a)=>{if(o)return i(o);n(a)}))}var Ln=Fn(import.meta.url),ae=Ur(Ln),Fr=String.raw;async function Lr(e,t){try{e===null?e=await nt(t.base):Pe.isAbsolute(e)||(e=Pe.resolve(t.base,e));let r=Pe.relative(ae,e);r.startsWith(".")||(r="./"+r);let n=await zn(e),i=n.prefix?Qt(n.prefix):null,o=Fr`
|
|
58
|
-
@import 'tailwindcss' ${
|
|
52
|
+
`;for(let o of r.plugins){let u=o.path[0]==="."?Kr(e,Fe.resolve(o.base,o.path)):o.path;if(o.options===null)s+=`@plugin '${u}';
|
|
53
|
+
`;else{s+=`@plugin '${u}' {
|
|
54
|
+
`;for(let[c,f]of Object.entries(o.options)){let p="";typeof f=="string"?p=Fr(f):Array.isArray(f)?p=f.map(d=>typeof d=="string"?Fr(d):""+d).join(", "):p=""+f,s+=` ${c}: ${p};
|
|
55
|
+
`}s+=`}
|
|
56
|
+
`}}s+=`}
|
|
57
|
+
`,a.append(uo.parse(s+r.css))}l.append(a.nodes)}return{postcssPlugin:"@tailwindcss/upgrade/migrate-config",OnceExit:i}}function Kr(e,t){if(!e.file)throw new Error("Can not find a path for the stylesheet");let r=e.file,i=Fe.relative(Fe.dirname(r),t);return i[0]!=="."&&(i=`./${i}`),dt(i)}function Fr(e){return`'${e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}import fo from"node:fs/promises";import{dirname as po,resolve as mo}from"node:path";import"postcss";function Lr(e){let t,r=null,i=null,n=null;for(let l=0;l<e.length;l++){let a=e[l];if(a.kind!=="separator"){if(a.kind==="word"&&!t){if(!a.value)throw new Error("Unable to find uri");if(a.value[0]!=='"'&&a.value[0]!=="'")throw new Error("Unable to find uri");t=a.value.slice(1,-1);continue}if(a.kind==="function"&&a.value.toLowerCase()==="url")throw new Error("`url(\u2026)` functions are not supported");if(!t)throw new Error("Unable to find uri");if((a.kind==="word"||a.kind==="function")&&a.value.toLowerCase()==="layer"){if(r)throw new Error("Multiple layers");if(n)throw new Error("`layer(\u2026)` must be defined before `supports(\u2026)` conditions");"nodes"in a?r=C(a.nodes):r="";continue}if(a.kind==="function"&&a.value.toLowerCase()==="supports"){if(n)throw new Error("Multiple support conditions");n=C(a.nodes);continue}i=C(e.slice(l));break}}if(!t)throw new Error("Unable to find uri");return{uri:t,layer:r,media:i,supports:n}}function zr(){async function e(t){let r=t.source?.input.file;if(!r)return;let i=[];t.walkAtRules("import",n=>{try{let[l,...a]=v(n.params," "),s=Lr(T(l)),o=s.uri[0]===".",u=s.uri.endsWith(".css");if(o&&u)return;let c=mo(po(r),s.uri);u||(c+=".css"),i.push(fo.stat(c).then(()=>{let f=u?"":".css",p=o?s.uri:`./${s.uri}`;n.params=[`'${p}${f}'`,...a].join(" ")}))}catch{}}),await Promise.allSettled(i)}return{postcssPlugin:"@tailwindcss/upgrade/migrate-import",OnceExit:e}}import"postcss";var Wr={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(0.984 0.003 247.858)",100:"oklch(0.968 0.007 247.896)",200:"oklch(0.929 0.013 255.508)",300:"oklch(0.869 0.022 252.894)",400:"oklch(0.704 0.04 256.788)",500:"oklch(0.554 0.046 257.417)",600:"oklch(0.446 0.043 257.281)",700:"oklch(0.372 0.044 257.287)",800:"oklch(0.279 0.041 260.031)",900:"oklch(0.208 0.042 265.755)",950:"oklch(0.129 0.042 264.695)"},gray:{50:"oklch(0.985 0.002 247.839)",100:"oklch(0.967 0.003 264.542)",200:"oklch(0.928 0.006 264.531)",300:"oklch(0.872 0.01 258.338)",400:"oklch(0.707 0.022 261.325)",500:"oklch(0.551 0.027 264.364)",600:"oklch(0.446 0.03 256.802)",700:"oklch(0.373 0.034 259.733)",800:"oklch(0.278 0.033 256.848)",900:"oklch(0.21 0.034 264.665)",950:"oklch(0.13 0.028 261.692)"},zinc:{50:"oklch(0.985 0 0)",100:"oklch(0.967 0.001 286.375)",200:"oklch(0.92 0.004 286.32)",300:"oklch(0.871 0.006 286.286)",400:"oklch(0.705 0.015 286.067)",500:"oklch(0.552 0.016 285.938)",600:"oklch(0.442 0.017 285.786)",700:"oklch(0.37 0.013 285.805)",800:"oklch(0.274 0.006 286.033)",900:"oklch(0.21 0.006 285.885)",950:"oklch(0.141 0.005 285.823)"},neutral:{50:"oklch(0.985 0 0)",100:"oklch(0.97 0 0)",200:"oklch(0.922 0 0)",300:"oklch(0.87 0 0)",400:"oklch(0.708 0 0)",500:"oklch(0.556 0 0)",600:"oklch(0.439 0 0)",700:"oklch(0.371 0 0)",800:"oklch(0.269 0 0)",900:"oklch(0.205 0 0)",950:"oklch(0.145 0 0)"},stone:{50:"oklch(0.985 0.001 106.423)",100:"oklch(0.97 0.001 106.424)",200:"oklch(0.923 0.003 48.717)",300:"oklch(0.869 0.005 56.366)",400:"oklch(0.709 0.01 56.259)",500:"oklch(0.553 0.013 58.071)",600:"oklch(0.444 0.011 73.639)",700:"oklch(0.374 0.01 67.558)",800:"oklch(0.268 0.007 34.298)",900:"oklch(0.216 0.006 56.043)",950:"oklch(0.147 0.004 49.25)"},red:{50:"oklch(0.971 0.013 17.38)",100:"oklch(0.936 0.032 17.717)",200:"oklch(0.885 0.062 18.334)",300:"oklch(0.808 0.114 19.571)",400:"oklch(0.704 0.191 22.216)",500:"oklch(0.637 0.237 25.331)",600:"oklch(0.577 0.245 27.325)",700:"oklch(0.505 0.213 27.518)",800:"oklch(0.444 0.177 26.899)",900:"oklch(0.396 0.141 25.723)",950:"oklch(0.258 0.092 26.042)"},orange:{50:"oklch(0.98 0.016 73.684)",100:"oklch(0.954 0.038 75.164)",200:"oklch(0.901 0.076 70.697)",300:"oklch(0.837 0.128 66.29)",400:"oklch(0.75 0.183 55.934)",500:"oklch(0.705 0.213 47.604)",600:"oklch(0.646 0.222 41.116)",700:"oklch(0.553 0.195 38.402)",800:"oklch(0.47 0.157 37.304)",900:"oklch(0.408 0.123 38.172)",950:"oklch(0.266 0.079 36.259)"},amber:{50:"oklch(0.987 0.022 95.277)",100:"oklch(0.962 0.059 95.617)",200:"oklch(0.924 0.12 95.746)",300:"oklch(0.879 0.169 91.605)",400:"oklch(0.828 0.189 84.429)",500:"oklch(0.769 0.188 70.08)",600:"oklch(0.666 0.179 58.318)",700:"oklch(0.555 0.163 48.998)",800:"oklch(0.473 0.137 46.201)",900:"oklch(0.414 0.112 45.904)",950:"oklch(0.279 0.077 45.635)"},yellow:{50:"oklch(0.987 0.026 102.212)",100:"oklch(0.973 0.071 103.193)",200:"oklch(0.945 0.129 101.54)",300:"oklch(0.905 0.182 98.111)",400:"oklch(0.852 0.199 91.936)",500:"oklch(0.795 0.184 86.047)",600:"oklch(0.681 0.162 75.834)",700:"oklch(0.554 0.135 66.442)",800:"oklch(0.476 0.114 61.907)",900:"oklch(0.421 0.095 57.708)",950:"oklch(0.286 0.066 53.813)"},lime:{50:"oklch(0.986 0.031 120.757)",100:"oklch(0.967 0.067 122.328)",200:"oklch(0.938 0.127 124.321)",300:"oklch(0.897 0.196 126.665)",400:"oklch(0.841 0.238 128.85)",500:"oklch(0.768 0.233 130.85)",600:"oklch(0.648 0.2 131.684)",700:"oklch(0.532 0.157 131.589)",800:"oklch(0.453 0.124 130.933)",900:"oklch(0.405 0.101 131.063)",950:"oklch(0.274 0.072 132.109)"},green:{50:"oklch(0.982 0.018 155.826)",100:"oklch(0.962 0.044 156.743)",200:"oklch(0.925 0.084 155.995)",300:"oklch(0.871 0.15 154.449)",400:"oklch(0.792 0.209 151.711)",500:"oklch(0.723 0.219 149.579)",600:"oklch(0.627 0.194 149.214)",700:"oklch(0.527 0.154 150.069)",800:"oklch(0.448 0.119 151.328)",900:"oklch(0.393 0.095 152.535)",950:"oklch(0.266 0.065 152.934)"},emerald:{50:"oklch(0.979 0.021 166.113)",100:"oklch(0.95 0.052 163.051)",200:"oklch(0.905 0.093 164.15)",300:"oklch(0.845 0.143 164.978)",400:"oklch(0.765 0.177 163.223)",500:"oklch(0.696 0.17 162.48)",600:"oklch(0.596 0.145 163.225)",700:"oklch(0.508 0.118 165.612)",800:"oklch(0.432 0.095 166.913)",900:"oklch(0.378 0.077 168.94)",950:"oklch(0.262 0.051 172.552)"},teal:{50:"oklch(0.984 0.014 180.72)",100:"oklch(0.953 0.051 180.801)",200:"oklch(0.91 0.096 180.426)",300:"oklch(0.855 0.138 181.071)",400:"oklch(0.777 0.152 181.912)",500:"oklch(0.704 0.14 182.503)",600:"oklch(0.6 0.118 184.704)",700:"oklch(0.511 0.096 186.391)",800:"oklch(0.437 0.078 188.216)",900:"oklch(0.386 0.063 188.416)",950:"oklch(0.277 0.046 192.524)"},cyan:{50:"oklch(0.984 0.019 200.873)",100:"oklch(0.956 0.045 203.388)",200:"oklch(0.917 0.08 205.041)",300:"oklch(0.865 0.127 207.078)",400:"oklch(0.789 0.154 211.53)",500:"oklch(0.715 0.143 215.221)",600:"oklch(0.609 0.126 221.723)",700:"oklch(0.52 0.105 223.128)",800:"oklch(0.45 0.085 224.283)",900:"oklch(0.398 0.07 227.392)",950:"oklch(0.302 0.056 229.695)"},sky:{50:"oklch(0.977 0.013 236.62)",100:"oklch(0.951 0.026 236.824)",200:"oklch(0.901 0.058 230.902)",300:"oklch(0.828 0.111 230.318)",400:"oklch(0.746 0.16 232.661)",500:"oklch(0.685 0.169 237.323)",600:"oklch(0.588 0.158 241.966)",700:"oklch(0.5 0.134 242.749)",800:"oklch(0.443 0.11 240.79)",900:"oklch(0.391 0.09 240.876)",950:"oklch(0.293 0.066 243.157)"},blue:{50:"oklch(0.97 0.014 254.604)",100:"oklch(0.932 0.032 255.585)",200:"oklch(0.882 0.059 254.128)",300:"oklch(0.809 0.105 251.813)",400:"oklch(0.707 0.165 254.624)",500:"oklch(0.623 0.214 259.815)",600:"oklch(0.546 0.245 262.881)",700:"oklch(0.488 0.243 264.376)",800:"oklch(0.424 0.199 265.638)",900:"oklch(0.379 0.146 265.522)",950:"oklch(0.282 0.091 267.935)"},indigo:{50:"oklch(0.962 0.018 272.314)",100:"oklch(0.93 0.034 272.788)",200:"oklch(0.87 0.065 274.039)",300:"oklch(0.785 0.115 274.713)",400:"oklch(0.673 0.182 276.935)",500:"oklch(0.585 0.233 277.117)",600:"oklch(0.511 0.262 276.966)",700:"oklch(0.457 0.24 277.023)",800:"oklch(0.398 0.195 277.366)",900:"oklch(0.359 0.144 278.697)",950:"oklch(0.257 0.09 281.288)"},violet:{50:"oklch(0.969 0.016 293.756)",100:"oklch(0.943 0.029 294.588)",200:"oklch(0.894 0.057 293.283)",300:"oklch(0.811 0.111 293.571)",400:"oklch(0.702 0.183 293.541)",500:"oklch(0.606 0.25 292.717)",600:"oklch(0.541 0.281 293.009)",700:"oklch(0.491 0.27 292.581)",800:"oklch(0.432 0.232 292.759)",900:"oklch(0.38 0.189 293.745)",950:"oklch(0.283 0.141 291.089)"},purple:{50:"oklch(0.977 0.014 308.299)",100:"oklch(0.946 0.033 307.174)",200:"oklch(0.902 0.063 306.703)",300:"oklch(0.827 0.119 306.383)",400:"oklch(0.714 0.203 305.504)",500:"oklch(0.627 0.265 303.9)",600:"oklch(0.558 0.288 302.321)",700:"oklch(0.496 0.265 301.924)",800:"oklch(0.438 0.218 303.724)",900:"oklch(0.381 0.176 304.987)",950:"oklch(0.291 0.149 302.717)"},fuchsia:{50:"oklch(0.977 0.017 320.058)",100:"oklch(0.952 0.037 318.852)",200:"oklch(0.903 0.076 319.62)",300:"oklch(0.833 0.145 321.434)",400:"oklch(0.74 0.238 322.16)",500:"oklch(0.667 0.295 322.15)",600:"oklch(0.591 0.293 322.896)",700:"oklch(0.518 0.253 323.949)",800:"oklch(0.452 0.211 324.591)",900:"oklch(0.401 0.17 325.612)",950:"oklch(0.293 0.136 325.661)"},pink:{50:"oklch(0.971 0.014 343.198)",100:"oklch(0.948 0.028 342.258)",200:"oklch(0.899 0.061 343.231)",300:"oklch(0.823 0.12 346.018)",400:"oklch(0.718 0.202 349.761)",500:"oklch(0.656 0.241 354.308)",600:"oklch(0.592 0.249 0.584)",700:"oklch(0.525 0.223 3.958)",800:"oklch(0.459 0.187 3.815)",900:"oklch(0.408 0.153 2.432)",950:"oklch(0.284 0.109 3.907)"},rose:{50:"oklch(0.969 0.015 12.422)",100:"oklch(0.941 0.03 12.58)",200:"oklch(0.892 0.058 10.001)",300:"oklch(0.81 0.117 11.638)",400:"oklch(0.712 0.194 13.428)",500:"oklch(0.645 0.246 16.439)",600:"oklch(0.586 0.253 17.585)",700:"oklch(0.514 0.222 16.935)",800:"oklch(0.455 0.188 13.697)",900:"oklch(0.41 0.159 10.272)",950:"oklch(0.271 0.105 12.094)"}};function ke(e,t,r){if(e===t)return 0;let i=e.indexOf("("),n=t.indexOf("("),l=i===-1?e.replace(/[\d.]+/g,""):e.slice(0,i),a=n===-1?t.replace(/[\d.]+/g,""):t.slice(0,n),s=(l===a?0:l<a?-1:1)||(r==="asc"?parseInt(e)-parseInt(t):parseInt(t)-parseInt(e));return Number.isNaN(s)?e<t?-1:1:s}function Ue(e,t){if(t===null)return e;let r=Number(t);return Number.isNaN(r)||(t=`${r*100}%`),`color-mix(in oklch, ${e} ${t}, transparent)`}function le(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function xe(e,t,r,i=[]){for(let n of t)if(n!=null)for(let l of Reflect.ownKeys(n)){let a=[...i,l],s=r(e[l],n[l],a);s!==void 0?e[l]=s:!le(e[l])||!le(n[l])?e[l]=n[l]:e[l]=xe({},[e[l],n[l]],r,a)}return e}function mt(e,t,r){return function(n,l){let a=n.lastIndexOf("/"),s=null;a!==-1&&(s=n.slice(a+1).trim(),n=n.slice(0,a).trim());let o=(()=>{let u=q(n),[c,f]=yo(e.theme,u),p=r(Br(t()??{},u)??null);if(typeof p=="string"&&(p=p.replace("<alpha-value>","1")),typeof c!="object")return typeof f!="object"&&f&4?p??c:c;if(p!==null&&typeof p=="object"&&!Array.isArray(p)){let d=xe({},[p],(m,h)=>h);if(c===null&&Object.hasOwn(p,"__CSS_VALUES__")){let m={};for(let h in p.__CSS_VALUES__)m[h]=p[h],delete d[h];c=m}for(let m in c)m!=="__CSS_VALUES__"&&(p?.__CSS_VALUES__?.[m]&4&&Br(d,m.split("-"))!==void 0||(d[kr(m)]=c[m]));return d}if(Array.isArray(c)&&Array.isArray(f)&&Array.isArray(p)){let d=c[0],m=c[1];f[0]&4&&(d=p[0]??d);for(let h of Object.keys(m))f[1][h]&4&&(m[h]=p[1][h]??m[h]);return[d,m]}return c??p})();return s&&typeof o=="string"&&(o=Ue(o,s)),o??l}}function yo(e,t){if(t.length===1&&t[0].startsWith("--"))return[e.get([t[0]]),e.getOptions(t[0])];let r=U(t),i=new Map,n=new k(()=>new Map),l=e.namespace(`--${r}`);if(l.size===0)return[null,0];let a=new Map;for(let[c,f]of l){if(!c||!c.includes("--")){i.set(c,f),a.set(c,e.getOptions(c?`--${r}-${c}`:`--${r}`));continue}let p=c.indexOf("--"),d=c.slice(0,p),m=c.slice(p+2);m=m.replace(/-([a-z])/g,(h,g)=>g.toUpperCase()),n.get(d===""?null:d).set(m,[f,e.getOptions(`--${r}${c}`)])}let s=e.getOptions(`--${r}`);for(let[c,f]of n){let p=i.get(c);if(typeof p!="string")continue;let d={},m={};for(let[h,[g,w]]of f)d[h]=g,m[h]=w;i.set(c,[p,d]),a.set(c,[s,m])}let o={},u={};for(let[c,f]of i)qr(o,[c??"DEFAULT"],f);for(let[c,f]of a)qr(u,[c??"DEFAULT"],f);return t[t.length-1]==="DEFAULT"?[o?.DEFAULT??null,u.DEFAULT??0]:"DEFAULT"in o&&Object.keys(o).length===1?[o.DEFAULT,u.DEFAULT??0]:(o.__CSS_VALUES__=u,[o,u])}function Br(e,t){for(let r=0;r<t.length;++r){let i=t[r];if(e[i]===void 0){if(t[r+1]===void 0)return;t[r+1]=`${i}-${t[r+1]}`;continue}e=e[i]}return e}function qr(e,t,r){for(let i of t.slice(0,-1))e[i]===void 0&&(e[i]={}),e=e[i];e[t[t.length-1]]=r}var vo={blocklist:[],future:{},prefix:"",important:!1,darkMode:null,theme:{},plugins:[],content:{files:[]}};function ae(e,t){let r={design:e,configs:[],plugins:[],content:{files:[]},theme:{},extend:{},result:structuredClone(vo)};for(let n of t)gt(r,n);for(let n of r.configs)"darkMode"in n&&n.darkMode!==void 0&&(r.result.darkMode=n.darkMode??null),"prefix"in n&&n.prefix!==void 0&&(r.result.prefix=n.prefix??""),"blocklist"in n&&n.blocklist!==void 0&&(r.result.blocklist=n.blocklist??[]),"important"in n&&n.important!==void 0&&(r.result.important=n.important??!1);let i=bo(r);return{resolvedConfig:{...r.result,content:r.content,theme:r.theme,plugins:r.plugins},replacedThemeKeys:i}}function wo(e,t){if(Array.isArray(e)&&le(e[0]))return e.concat(t);if(Array.isArray(t)&&le(t[0])&&le(e))return[e,...t];if(Array.isArray(t))return t}function gt(e,{config:t,base:r,path:i}){let n=[];for(let s of t.plugins??[])"__isOptionsFunction"in s?n.push(s()):"handler"in s?n.push(s):n.push({handler:s});if(Array.isArray(t.presets)&&t.presets.length===0)throw new Error("Error in the config file/plugin/preset. An empty preset (`preset: []`) is not currently supported.");for(let s of t.presets??[])gt(e,{path:i,base:r,config:s});for(let s of n)e.plugins.push(s),s.config&>(e,{path:i,base:r,config:s.config});let l=t.content??[],a=Array.isArray(l)?l:l.files;for(let s of a)e.content.files.push(typeof s=="object"?s:{base:r,pattern:s});e.configs.push(t)}function bo(e){let t=new Set,r=mt(e.design,()=>e.theme,n),i=Object.assign(r,{theme:r,colors:Wr});function n(l){return typeof l=="function"?l(i)??null:l??null}for(let l of e.configs){let a=l.theme??{},s=a.extend??{};for(let o in a)o!=="extend"&&t.add(o);Object.assign(e.theme,a);for(let o in s)e.extend[o]??=[],e.extend[o].push(s[o])}delete e.theme.extend;for(let l in e.extend){let a=[e.theme[l],...e.extend[l]];e.theme[l]=()=>{let s=a.map(n);return xe({},s,wo)}}for(let l in e.theme)e.theme[l]=n(e.theme[l]);if(e.theme.screens&&typeof e.theme.screens=="object")for(let l of Object.keys(e.theme.screens)){let a=e.theme.screens[l];a&&typeof a=="object"&&("raw"in a||"max"in a||"min"in a&&(e.theme.screens[l]=a.min))}return t}function Jr(e){return(Array.isArray(e)?e:[e]).map(r=>typeof r=="string"?{min:r}:r&&typeof r=="object"?r:null).map(r=>{if(r===null)return null;if("raw"in r)return r.raw;let i="";return r.max!==void 0&&(i+=`${r.max} >= `),i+="width",r.min!==void 0&&(i+=` >= ${r.min}`),`(${i})`}).filter(Boolean).join(", ")}function Gr({designSystem:e,userConfig:t}={}){function r(i){if(!e||!t)return;let{resolvedConfig:n}=ae(e,[{base:"",config:t}]),l=n?.theme?.screens||{},a=new k(s=>{let o=e?.resolveThemeValue(`--breakpoint-${s}`)??l?.[s];return typeof o=="string"?`(width >= theme(--breakpoint-${s}))`:o?Jr(o):null});i.walkAtRules("screen",s=>{s.name="media",s.params=`screen(${s.params})`}),i.walkAtRules(s=>{if(s.name!=="media")return;let o=s.params.match(/screen\(([^)]+)\)/);if(!o)return;let u=a.get(o[1]);u&&(s.params=u)})}return{postcssPlugin:"@tailwindcss/upgrade/migrate-media-screen",OnceExit:r}}import{AtRule as ko}from"postcss";function Hr(){function e(t){let r="",i=[],n=[],l=null;t.each(a=>{if(a.type==="atrule"){if(a.name==="config"||a.name==="source"||a.name==="theme"||a.name==="utility"||a.name==="variant"){i.length>0&&n.push([r,i.splice(0)]);return}if(a.name==="tailwind"&&a.params==="base"||a.name==="import"&&a.params.match(/^["']tailwindcss\/base["']/)){i.length>0&&n.push([r,i.splice(0)]),l??="base",r="base";return}if(a.name==="tailwind"&&a.params==="components"||a.name==="import"&&a.params.match(/^["']tailwindcss\/components["']/)){i.length>0&&n.push([r,i.splice(0)]),l??="components",r="components";return}if(a.name==="tailwind"&&a.params==="utilities"||a.name==="import"&&a.params.match(/^["']tailwindcss\/utilities["']/)){i.length>0&&n.push([r,i.splice(0)]),l??="utilities",r="utilities";return}if(a.name==="layer"){i.length>0&&n.push([r,i.splice(0)]);return}if(a.name==="import"){i.length>0&&n.push([r,i.splice(0)]),n.push([r,[a]]);return}}r===""&&(a.type==="comment"||a.type==="atrule"&&!a.nodes||a.type==="atrule"&&a.name==="charset")||i.push(a)});for(let[a,s]of n){let o=a||l||"";if(o===""||s.every(f=>f.type==="comment"))continue;if(s.every(f=>f.type==="atrule"&&f.name==="import")){for(let f of s)f.type!=="atrule"||f.name!=="import"||f.params.includes("layer(")||(f.params+=` layer(${o})`,f.raws.tailwind_injected_layer=!0);continue}let u=s[0],c=new ko({name:"layer",params:o,nodes:s.map(f=>f===u?f:f.remove()),raws:{tailwind_pretty:!0}});u.replaceWith(c)}}return{postcssPlugin:"@tailwindcss/upgrade/migrate-missing-layers",OnceExit:e}}import{AtRule as Me}from"postcss";var ht=["theme","base","components","utilities"];function Yr(e){let t=e.newPrefix?` prefix(${e.newPrefix})`:"";function r(i){let n=null,l=null,a=[],s=null,o=null,u=null,c=null,f=[];i.walkAtRules(p=>{if(p.name==="import"&&p.params.match(/^["']tailwindcss\/tailwind\.css["']$/)&&(p.params=p.params.replace("tailwindcss/tailwind.css","tailwindcss")),p.name==="import"&&p.params.match(/^["']tailwindcss["']/))p.params+=t;else if(p.name==="tailwind"&&p.params==="base"||p.name==="import"&&p.params.match(/^["']tailwindcss\/base["']$/))f.push("base"),a.push(p),n=p;else if(p.name==="tailwind"&&p.params==="utilities"||p.name==="import"&&p.params.match(/^["']tailwindcss\/utilities["']$/))f.push("utilities"),a.push(p),l=p;else if(p.name==="tailwind"&&p.params==="components"||p.name==="tailwind"&&p.params==="screens"||p.name==="tailwind"&&p.params==="variants"||p.name==="import"&&p.params.match(/^["']tailwindcss\/components["']$/))p.remove();else if(p.name==="responsive")if(p.nodes){for(let d of p.nodes)d.raws.tailwind_pretty=!0;p.replaceWith(p.nodes)}else p.remove()}),n!==null&&l!==null?(s||Le(a).before(new Me({name:"import",params:`'tailwindcss'${t}`})),n?.remove(),l?.remove()):l!==null?(o||Le(a).before(new Me({name:"import",params:"'tailwindcss/utilities' layer(utilities)"})),l?.remove()):n!==null&&(c||Le(a).before(new Me({name:"import",params:`'tailwindcss/theme' layer(theme)${t}`})),u||Le(a).before(new Me({name:"import",params:"'tailwindcss/preflight' layer(base)"})),n?.remove());{let p=f.toSorted((d,m)=>ht.indexOf(d)-ht.indexOf(m));if(f.some((d,m)=>d!==p[m])){let d=ht.toSorted((m,h)=>f.indexOf(m)-f.indexOf(h));i.prepend({name:"layer",params:d.join(", ")})}}}return{postcssPlugin:"@tailwindcss/upgrade/migrate-tailwind-directives",OnceExit:r}}function Le(e){let t=e.at(0),r=t.prev();for(;r;){if(r.type==="rule"&&(t=r),r.type==="atrule")if(r.name==="charset"||r.name==="import"){r=r.prev();continue}else if(r.name==="layer"&&!r.nodes){r=r.prev();continue}else t=r;r=r.prev()}return t}import"postcss";function Qr({designSystem:e}={}){return{postcssPlugin:"@tailwindcss/upgrade/migrate-theme-to-var",OnceExit(t){if(!e)return;let r=ct(e,{prettyPrint:!0});t.walkDecls(i=>{let[n]=r(i.value);i.value=n}),t.walkAtRules(i=>{if(i.name==="media"||i.name==="custom-media"||i.name==="container"||i.name==="supports"){let[n]=r(i.params,2);i.params=n}})}}}import"postcss";function Zr(){function e(t){t.walkAtRules("variants",r=>{r.name==="variants"&&(r.name="layer",r.params="utilities")})}return{postcssPlugin:"@tailwindcss/upgrade/migrate-variants-directive",OnceExit:e}}import{__unstable__loadDesignSystem as sn,compile as _o}from"@tailwindcss/node";import Po from"node:fs/promises";import re,{dirname as un}from"node:path";import{fileURLToPath as Eo}from"node:url";import se from"enhanced-resolve";import{createJiti as Vo}from"jiti";import vt from"node:fs";import Oc from"node:fs/promises";import jc,{dirname as tn}from"node:path";import{pathToFileURL as rn}from"node:url";import{__unstable__loadDesignSystem as Fc,compile as Uc}from"tailwindcss";import yt from"node:fs/promises";import Ce from"node:path";var xo=[/import[\s\S]*?['"](.{3,}?)['"]/gi,/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/require\(['"`](.+)['"`]\)/gi],Co=[".js",".cjs",".mjs"],So=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],Ao=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];async function $o(e,t){for(let r of t){let i=`${e}${r}`;if((await yt.stat(i).catch(()=>null))?.isFile())return i}for(let r of t){let i=`${e}/index${r}`;if(await yt.access(i).then(()=>!0,()=>!1))return i}return null}async function Xr(e,t,r,i){let n=Co.includes(i)?So:Ao,l=await $o(Ce.resolve(r,t),n);if(l===null||e.has(l))return;e.add(l),r=Ce.dirname(l),i=Ce.extname(l);let a=await yt.readFile(l,"utf-8"),s=[];for(let o of xo)for(let u of a.matchAll(o))u[1].startsWith(".")&&s.push(Xr(e,u[1],r,i));await Promise.all(s)}async function en(e){let t=new Set;return await Xr(t,e,Ce.dirname(e),Ce.extname(e)),Array.from(t)}import*as To from"node:path";async function ze(e,t,r){if(e[0]!=="."){let a=await ln(e,t);if(!a)throw new Error(`Could not resolve '${e}' from '${t}'`);let s=await on(rn(a).href);return{base:tn(a),module:s.default??s}}let i=await ln(e,t);if(!i)throw new Error(`Could not resolve '${e}' from '${t}'`);let[n,l]=await Promise.all([on(rn(i).href+"?id="+Date.now()),en(i)]);for(let a of l)r(a);return{base:tn(i),module:n.default??n}}var nn=null;async function on(e){if(typeof globalThis.__tw_load=="function"){let t=await globalThis.__tw_load(e);if(t)return t}try{return await import(e)}catch{return nn??=Vo(import.meta.url,{moduleCache:!1,fsCache:!1}),await nn.import(e)}}var zc=se.ResolverFactory.createResolver({fileSystem:new se.CachedInputFileSystem(vt,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"]});var No=se.ResolverFactory.createResolver({fileSystem:new se.CachedInputFileSystem(vt,4e3),useSyncFileSystemCalls:!0,extensions:[".js",".json",".node",".ts"],conditionNames:["node","import"]}),Ro=se.ResolverFactory.createResolver({fileSystem:new se.CachedInputFileSystem(vt,4e3),useSyncFileSystemCalls:!0,extensions:[".js",".json",".node",".ts"],conditionNames:["node","require"]});function ln(e,t){if(typeof globalThis.__tw_resolve=="function"){let r=globalThis.__tw_resolve(e,t);if(r)return Promise.resolve(r)}return an(No,e,t).catch(()=>an(Ro,e,t))}function an(e,t,r){return new Promise((i,n)=>e.resolve({},r,t,{},(l,a)=>{if(l)return n(l);i(a)}))}var Oo=Eo(import.meta.url),Se=un(Oo),cn=String.raw;async function fn(e,t){try{e===null?e=await wt(t.base):re.isAbsolute(e)||(e=re.resolve(t.base,e));let r=re.relative(Se,e);r.startsWith(".")||(r="./"+r);let i=await Do(e),n=i.prefix?vr(i.prefix):null,l=cn`
|
|
58
|
+
@import 'tailwindcss' ${n?`prefix(${n})`:""};
|
|
59
59
|
@config './${r}';
|
|
60
|
-
`,[a,s]=await Promise.all([
|
|
60
|
+
`,[a,s]=await Promise.all([_o(l,{base:Se,onDependency:()=>{}}),sn(l,{base:Se})]);return{designSystem:s,globs:a.globs,userConfig:i,newPrefix:n,configFilePath:e}}catch(r){P("Could not load the configuration file: "+r.message,{prefix:"\u21B3 "}),process.exit(1)}}async function Do(e){let[t,r]=await Promise.all([sn(cn`
|
|
61
61
|
@import 'tailwindcss';
|
|
62
|
-
`,{base:
|
|
63
|
-
`;throw
|
|
64
|
-
`,new Error(
|
|
65
|
-
`))}async function
|
|
62
|
+
`,{base:Se}),ze(e,Se,()=>{}).then(i=>i.module)]);return ae(t,[{base:un(e),config:r}]).resolvedConfig}var jo=["./tailwind.config.js","./tailwind.config.cjs","./tailwind.config.mjs","./tailwind.config.ts","./tailwind.config.cts","./tailwind.config.mts"];async function wt(e,t=e){for(let r of Io(e,t))for(let i of jo){let n=re.resolve(r,i);try{return await Po.access(n),n}catch{}}throw new Error(`No configuration file found for ${y(N(e))}. Please provide a path to the Tailwind CSS v3 config file via the ${y("--config")} option.`)}function*Io(e,t=e){let r=re.resolve(e),i=re.resolve(t);if(!r.startsWith(i))throw new Error(`The path ${e} is not a parent of ${t}`);if(r===i){yield r;return}let n=r;do yield n,n=re.dirname(n);while(n!==i);yield i}async function Uo(e,t,r){return typeof e=="string"&&(e=await J.fromString(e),e.file=r??null),We().use(zr()).use(_r(t)).use(Gr(t)).use(Zr()).use(Dr(e)).use(Hr()).use(Yr(t)).use(Ur(e,t)).use(jr(t)).use(Qr(t)).process(e.root,{from:e.file??void 0})}async function pn(e,t){if(!e.file)throw new Error("Cannot migrate a stylesheet without a file path");e.canMigrate&&await Uo(e,t)}async function dn(e){let t=await Fo(),r=[],i=new k(o=>{if(t(o))return null;try{let u=J.loadSync(o);return e.push(u),r.push(()=>n.process(u.root,{from:u.file})),u}catch{return null}}),n=We([{postcssPlugin:"mark-import-nodes",AtRule:{import(o){let u=o.params.match(/['"](.*)['"]/)?.[1];if(!u)return;let c=o.source?.input.file?G.dirname(o.source.input.file):process.cwd(),f=!1;try{if(u[0]!==".")try{f=it(`./${u}`,c)}catch{}f||(f=it(u,c))}catch{if(u.startsWith("http://")||u.startsWith("https://")||u.startsWith("//"))return;P(`Failed to resolve import: ${y(u)} in ${y(N(o.source?.input.file,c))}. Skipping.`,{prefix:"\u21B3 "});return}if(!f)return;let p=i.get(f);if(!p)return;o.raws.tailwind_destination_sheet_id=p.id;let d=o.source?.input.file?i.get(o.source.input.file):void 0,m=[];for(let h of v(o.params," "))h.startsWith("layer(")&&h.endsWith(")")&&m.push(h.slice(6,-1).trim());if(d){let h={layers:m};p.parents.add({item:d,meta:h}),d.children.add({item:p,meta:h})}}}}]);for(let o of e)o.file&&(i.set(o.file,o),r.push(()=>n.process(o.root,{from:o.file??void 0})));for(;r.length>0;)await r.shift()();let l=process.cwd();function a(o){let u=[];for(let c of o){if(!c.item.file)continue;let f=c.item.file.replace(l,""),p=c.meta.layers.join(", ");p.length>0?u.push(`${f} (layers: ${p})`):u.push(f)}return u.join(" <- ")}let s=[];for(let o of e){if(!o.file)continue;let{convertiblePaths:u,nonConvertiblePaths:c}=o.analyzeImportPaths();if(!(u.length>0&&c.length>0))continue;o.canMigrate=!1;let p=o.file.replace(l,"");for(let d of u)s.push(`- ${p} <- ${a(d)}`);for(let d of c)s.push(`- ${p} <- ${a(d)}`)}if(s.length===0){let o=new Set;for(let u of e)u.root.walkAtRules("config",()=>(u.isTailwindRoot=!0,!1)),!u.isTailwindRoot&&u.root.walkAtRules(c=>{(c.name==="tailwind"||c.name==="import"&&c.params.match(/^["']tailwindcss["']/)||c.name==="import"&&c.params.match(/^["']tailwindcss\/.*?["']$/))&&(u.isTailwindRoot=!0,o.add(u))});if(o.size<=1)return;{let u=new k(()=>new Set);for(let f of o)u.get(f).add(f);let c=!0;e:for(;c;){c=!1;for(let[f,p]of u)for(let[d,m]of u){if(f===d)continue;let h=[f].concat(Array.from(f.ancestors()).reverse()),g=[d].concat(Array.from(d.ancestors()).reverse());for(let w of h)for(let S of g){if(w!==S)continue;let fe=w;u.delete(f),u.delete(d);for(let L of p)u.get(fe).add(L);for(let L of m)u.get(fe).add(L);c=!0;continue e}}}for(let[f,p]of u){f.isTailwindRoot=!0;for(let d of p)f!==d&&(d.isTailwindRoot=!1)}return}}{let o=`You have one or more stylesheets that are imported into a utility layer and non-utility layer.
|
|
63
|
+
`;throw o+=`We cannot convert stylesheets under these conditions. Please look at the following stylesheets:
|
|
64
|
+
`,new Error(o+s.join(`
|
|
65
|
+
`))}}async function mn(e,{configPath:t,base:r}){let i=e.filter(u=>u.isTailwindRoot);if(i.length===0)throw new Error(`Cannot find any CSS files that reference Tailwind CSS.
|
|
66
|
+
Before your project can be upgraded you need to create a CSS file that imports Tailwind CSS or uses ${y("@tailwind")}.`);let n=i.filter(u=>{let c=!1;return u.root.walkAtRules("config",f=>{let p=G.resolve(G.dirname(u.file),f.params.slice(1,-1));return u.linkedConfigPath=p,c=!0,!1}),!c});if(n.length===0)return;let l=new Map,a=new k(()=>new Set);for(let u of n){if(!u.file)continue;let c=t;t===null?c=await wt(G.dirname(u.file),r):G.isAbsolute(c)||(c=G.resolve(r,c)),l.set(u,c),a.get(c).add(u)}let s=new Set;for(let u of a.values())if(u.size>1)for(let c of u)s.add(c);if(s.size>1){for(let u of s)P(`Could not determine configuration file for: ${y(N(u.file,r))}
|
|
67
|
+
Update your stylesheet to use ${y("@config")} to specify the correct configuration file explicitly and then run the upgrade tool again.`,{prefix:"\u21B3 "});process.exit(1)}let o=N;for(let[u,c]of l)try{if(!u||!u.file)return;$(`Linked ${y(o(c,r))} to ${y(o(u.file,r))}`,{prefix:"\u21B3 "}),u.linkedConfigPath=c;let f=G.relative(G.dirname(u.file),c);f.startsWith(".")||(f="./"+f),f=Ko(f);{let p=u.root,d=We.atRule({name:"config",params:`'${f}'`});u.root.walkAtRules(m=>{(m.name==="tailwind"||m.name==="import")&&(p=m)}),p.type==="root"?u.root.prepend(d):p.type==="atrule"&&p.after(d)}}catch(f){P("Could not load the configuration file: "+f.message,{prefix:"\u21B3 "}),process.exit(1)}}async function gn(e){let t=new Map,r=new Map;for(let s of e)t.set(s.id,s),s.file&&r.set(s.file,s);let i=new Set;for(let s of e){if(s.isTailwindRoot)continue;let o=!1,u=s.layers().size>0;A(s.root,c=>{if(c.type==="atrule"&&c.name==="utility")o=!0;else{if(c.type==="atrule"&&c.name==="import"&&c.params.includes("layer(")||c.type==="atrule"&&c.name==="layer"||c.type==="comment")return 1;u=!0}return o&&u?2:1}),o&&u&&i.add(s)}let n=new Map;for(let s of e){if(!s.file||s.parents.size===0||!i.has(s)&&!Array.from(s.descendants()).some(p=>i.has(p)))continue;let o=We.root();A(s.root,p=>{if(p.type==="atrule"&&p.name==="utility")return o.append(p),1});let u=s.file.replace(/\.css$/,".utilities.css"),c=0;for(;r.has(u);)c+=1,u=s.file.replace(/\.css$/,`.utilities.${c}.css`);let f=await J.fromRoot(o,u);f.extension=c>0?`.utilities.${c}.css`:".utilities.css",n.set(s,f),t.set(f.id,f)}for(let[s,o]of n){for(let u of s.parents){let c=n.get(u.item);c&&o.parents.add({item:c,meta:u.meta})}for(let u of s.children){let c=n.get(u.item);c&&o.children.add({item:c,meta:u.meta})}}for(let s of e){let o=n.get(s),u=new Set;for(let c of s.importRules){let f=c.raws.tailwind_destination_sheet_id;if(!f)continue;let p=t.get(f);if(!p)continue;let d=n.get(p);if(!d)continue;let m=c.params.match(/(['"])(.*)\1/);if(!m)return;let h=m[1],g=m[2],w=g.replace(/\.css$/,d.extension),S=c.clone({params:`${h}${w}${h}`,raws:{tailwind_injected_layer:c.raws.tailwind_injected_layer,tailwind_original_params:`${h}${g}${h}`,tailwind_destination_sheet_id:d.id}});o?u.add(S):c.after(S)}o&&u.size>0&&o.root.prepend(Array.from(u))}let l=new k(()=>new Set);for(let s of t.values())for(let o of s.importRules){let u=o.raws.tailwind_destination_sheet_id;if(!u)continue;let c=t.get(u);c&&l.get(c).add(o)}let a=[];for(let s of e.slice()){for(let o of s.descendants())a.push(o);a.push(s)}for(let s of a){let o=n.get(s);if(o&&s.isEmpty){s.root=o.root;for(let u of l.get(o))u.params=u.raws.tailwind_original_params;for(let u of l.get(s))u.remove();n.delete(s)}}e.push(...n.values())}import{Scanner as Tn}from"@tailwindcss/oxide";import el from"node:fs/promises";import Vn from"node:path";import{fileURLToPath as tl}from"node:url";var Nn=Zn(wn());function Je(e){let t=[];e=Array.isArray(e)?e:[e];let r=e.flatMap(i=>Object.entries(i));for(let[i,n]of r)if(typeof n!="object")!i.startsWith("--")&&n==="@slot"?t.push(F(i,[x("@slot")])):(i=i.replace(/([A-Z])/g,"-$1").toLowerCase(),t.push(R(i,String(n))));else if(Array.isArray(n))for(let l of n)typeof l=="string"?t.push(R(i,l)):t.push(F(i,Je(l)));else n!==null&&t.push(F(i,Je(n)));return t}function kn(e){let t=[];if("keyframes"in e.theme)for(let[r,i]of Object.entries(e.theme.keyframes))t.push(x("@keyframes",r,Je(i)));return t}function xn({center:e,padding:t,screens:r},i){let n=[],l=null;if(e&&n.push(R("margin-inline","auto")),(typeof t=="string"||typeof t=="object"&&t!==null&&"DEFAULT"in t)&&n.push(R("padding-inline",typeof t=="string"?t:t.DEFAULT)),typeof r=="object"&&r!==null){l=new Map;let a=Array.from(i.theme.namespace("--breakpoint").entries());if(a.sort((s,o)=>ke(s[1],o[1],"asc")),a.length>0){let[s]=a[0];n.push(x("@media",`(width >= theme(--breakpoint-${s}))`,[R("max-width","none")]))}for(let[s,o]of Object.entries(r)){if(typeof o=="object")if("min"in o)o=o.min;else continue;l.set(s,x("@media",`(width >= ${o})`,[R("max-width",o)]))}}if(typeof t=="object"&&t!==null){let a=Object.entries(t).filter(([s])=>s!=="DEFAULT").map(([s,o])=>[s,i.theme.resolveValue(s,["--breakpoint"]),o]).filter(Boolean);a.sort((s,o)=>ke(s[1],o[1],"asc"));for(let[s,,o]of a)if(l&&l.has(s))l.get(s).nodes.push(R("padding-inline",o));else{if(l)continue;n.push(x("@media",`(width >= theme(--breakpoint-${s}))`,[R("padding-inline",o)]))}}if(l)for(let[,a]of l)n.push(a);return n}function Cn({addVariant:e,config:t}){let r=t("darkMode",null),[i,n=".dark"]=Array.isArray(r)?r:[r];if(i==="variant"){let l;if(Array.isArray(n)||typeof n=="function"?l=n:typeof n=="string"&&(l=[n]),Array.isArray(l))for(let a of l)a===".dark"?(i=!1,console.warn('When using `variant` for `darkMode`, you must provide a selector.\nExample: `darkMode: ["variant", ".your-selector &"]`')):a.includes("&")||(i=!1,console.warn('When using `variant` for `darkMode`, your selector must contain `&`.\nExample `darkMode: ["variant", ".your-selector &"]`'));n=l}i===null||(i==="selector"?e("dark",`&:where(${n}, ${n} *)`):i==="media"?e("dark","@media (prefers-color-scheme: dark)"):i==="variant"?e("dark",n):i==="class"&&e("dark",`&:is(${n} *)`))}import Ge from"tree-sitter";import He from"tree-sitter-typescript";var bt=new Ge;bt.setLanguage(He.typescript);var kt=String.raw,Yo=new Ge.Query(He.typescript,kt`
|
|
66
68
|
; export default {}
|
|
67
69
|
(export_statement
|
|
68
70
|
value: [
|
|
@@ -113,7 +115,7 @@ ${s}
|
|
|
113
115
|
]
|
|
114
116
|
)
|
|
115
117
|
)
|
|
116
|
-
`),
|
|
118
|
+
`),Qo=new Ge.Query(He.typescript,kt`
|
|
117
119
|
(call_expression
|
|
118
120
|
function: [
|
|
119
121
|
(call_expression
|
|
@@ -166,7 +168,7 @@ ${s}
|
|
|
166
168
|
(string (string_fragment) @module_string)
|
|
167
169
|
)
|
|
168
170
|
)
|
|
169
|
-
`);function
|
|
171
|
+
`);function xt(e){try{let r=bt.parse(e).rootNode,i=Xo(e),n=Yo.matches(r),l=[];for(let a of n)for(let s of a.captures)if(s.name==="imports"){for(let o of s.node.children)if(!(o.type==="["||o.type==="]"||o.type===","))switch(o.type){case"identifier":let u=i[o.text];if(!u||u.export!==null)return null;l.push([u.module,null]);break;case"string":l.push([o.children[1].text,null]);break;case"call_expression":let c=Qo.matches(o);if(c.length===0)return null;let f=null,p=null,d=null,m=null,h=c.flatMap(g=>g.captures);for(let g=0;g<h.length;g++){let w=h[g];switch(w.name){case"module_identifier":{p=w.node.text;break}case"module_string":{f=w.node.text;break}case"property":{if(m!==null)return null;m=w.node.text;break}case"str_value":case"num_value":case"null_value":case"true_value":case"false_value":{if(m===null)return null;d??={},d[m]=Sn(w),m=null;break}case"array_value":{if(m===null)return null;d??={};let S=[],fe=g;e:for(let L=g+1;L<h.length;L++){let tt=h[L];switch(tt.name){case"property":{if(tt.node.text!==m)break e;break}case"str_value":case"num_value":case"null_value":case"true_value":case"false_value":S.push(Sn(tt)),fe=L}}g=fe,d[m]=S,m=null;break}case"_name":case"_empty_args":break;default:return null}}if(m!==null)return null;if(p!==null){let g=i[p];if(!g||g.export!==null&&g.export!=="*")return null;f=g.module}if(f===null)return null;l.push([f,d]);break;default:return null}}return l}catch(t){return t(`${t?.message??t}`,{prefix:"\u21B3 "}),null}}var Zo=new Ge.Query(He.typescript,kt`
|
|
170
172
|
; ESM import
|
|
171
173
|
(import_statement
|
|
172
174
|
(import_clause
|
|
@@ -205,22 +207,23 @@ ${s}
|
|
|
205
207
|
)
|
|
206
208
|
)
|
|
207
209
|
)
|
|
208
|
-
`);function
|
|
209
|
-
`)}}async function
|
|
210
|
+
`);function Xo(e){let r=bt.parse(e).rootNode,i=Zo.matches(r),n={};for(let l of i){let a=[],s="";for(let o=0;o<l.captures.length;o++){let u=l.captures[o];switch(u.name){case"default":a.push({name:u.node.text,export:null});break;case"imported-name":a.push({name:u.node.text,export:u.node.text});break;case"imported-from":s=u.node.text;break;case"imported-namespace":a.push({name:u.node.text,export:"*"});break;case"imported-alias":if(a.length<1)throw new Error("Unexpected alias: "+JSON.stringify(i,null,2));let c=a[a.length-1],f=c.name;c.export=f,c.name=u.node.text;break}}for(let{name:o,export:u}of a)n[o]={module:s,export:u}}return n}function Sn(e){return e.name==="num_value"?parseFloat(e.node.text):e.name==="null_value"?null:e.name==="true_value"?!0:e.name==="false_value"?!1:e.node.text}var rl=tl(import.meta.url),nl=Vn.dirname(rl);async function Rn(e,t,r){let[i,n]=await Promise.all([ze(t,nl,()=>{}).then(u=>u.module),el.readFile(t,"utf-8")]);if(!sl(i,n))return E(`The configuration file at ${y(N(t,r))} could not be automatically migrated to the new CSS configuration format, so your CSS has been updated to load your existing configuration file.`,{prefix:"\u21B3 "}),null;let l=[],a=[],s=[];if("darkMode"in i&&s.push(ol(i)),"content"in i&&(l=await al(i,t,r)),"theme"in i){let u=await il(e,i,r);u&&s.push(u)}"corePlugins"in i&&E("The `corePlugins` option is no longer supported as of Tailwind CSS v4.0, so it's been removed from your configuration.");let o=xt(n);if(o!==null)for(let[u,c]of o)a.push({base:r,path:u,options:c});return{sources:l,plugins:a,css:s.join(`
|
|
211
|
+
`)}}async function il(e,t,r){let i={base:r,config:{...t,plugins:[],presets:void 0}},{resolvedConfig:n,replacedThemeKeys:l}=ae(e,[i]),a=new Map(Array.from(l.entries()).map(([c])=>[c,!1]));ml(e,n,l);let s="",o=`
|
|
210
212
|
@tw-bucket theme {
|
|
211
|
-
`;
|
|
213
|
+
`;o+=`
|
|
212
214
|
@theme {
|
|
213
|
-
`;let u=!1;for(let[f
|
|
214
|
-
`,s=
|
|
215
|
-
`)}let
|
|
216
|
-
`)}
|
|
217
|
-
`+
|
|
218
|
-
`,
|
|
219
|
-
|
|
215
|
+
`;let u=!1;for(let[c,f]of xr(n.theme)){if(typeof f!="string"&&typeof f!="number"||(typeof f=="string"&&(f=f.replace(/\s*\/\s*<alpha-value>/,"").replace(/<alpha-value>/,"1")),c[0]==="keyframes"))continue;u=!0;let p=ll(c);if(p!==s&&(o+=`
|
|
216
|
+
`,s=p),a.has(c[0])&&a.get(c[0])===!1){a.set(c[0],!0);let m=U([c[0]]);m!==null&&(o+=` ${B(`--${m}`)}-*: initial;
|
|
217
|
+
`)}let d=U(c);d!==null&&(o+=` ${B(`--${d}`)}: ${f};
|
|
218
|
+
`)}if("keyframes"in n.theme&&(u=!0,o+=`
|
|
219
|
+
`+fl(n.theme.keyframes)),!u)return null;if(o+=`}
|
|
220
|
+
`,"container"in n.theme){let c=xn(n.theme.container,e);c.length>0&&(o+=`
|
|
221
|
+
`+ve([x("@utility","container",c)]))}return o+=`}
|
|
222
|
+
`,o}function ol(e){let t="";return Cn({config:()=>e.darkMode,addVariant:(n,l)=>t=l}),t===""?"":`
|
|
220
223
|
@tw-bucket variant {
|
|
221
224
|
@variant dark (${t});
|
|
222
225
|
}
|
|
223
|
-
`}function
|
|
224
|
-
`}function
|
|
225
|
-
`),
|
|
226
|
-
`)),{didAddPostcssClient:
|
|
226
|
+
`}function ll(e){let t=[];for(let r=0;r<e.length-1;r++){let i=e[r];if(e[r+1][0]==="-")break;t.push(i)}return t.join("-")}async function al(e,t,r){let i=pl(r),n=[],l=!e.content||Array.isArray(e.content)?!1:e.content.relative?!0:e.future==="all"?!1:e.future?.relativeContentPathsByDefault??!1,a=Array.isArray(e.content)?e.content.map(s=>({base:r,pattern:s})):(e.content?.files??[]).map(s=>typeof s=="string"&&l?{base:Vn.dirname(t),pattern:s}:{base:r,pattern:s});for(let{base:s,pattern:o}of a){if(typeof o!="string")throw new Error("Unsupported content value: "+o);let u=dl({base:s,pattern:o}),c=!0;for(let f of u)if(!i.includes(f)){c=!1;break}c||n.push({base:s,pattern:o})}return n}function sl(e,t){function r(s){return typeof s=="function"?!1:Array.isArray(s)?s.every(r):typeof s=="object"&&s!==null?Object.values(s).every(r):["string","number","boolean","undefined"].includes(typeof s)}let{plugins:i,theme:n,...l}=e;if(!r(l))return!1;let a=["darkMode","content","theme","plugins","presets","prefix","corePlugins"];if(Object.keys(e).some(s=>!a.includes(s))||xt(t)===null||e.presets&&e.presets.length>0)return!1;if(n&&typeof n=="object"){if(n.extend&&!An(n.extend))return!1;let{extend:s,...o}=n;if(!An(o))return!1}return!0}var ul=[...Object.keys(Nn.default),"containers"],cl=["supports","data","aria"];function An(e){for(let t of Object.keys(e))if(!ul.includes(t)||cl.includes(t))return!1;if("screens"in e&&typeof e.screens=="object"&&e.screens!==null){for(let t of Object.values(e.screens))if(typeof t=="object"&&t!==null&&("max"in t||"raw"in t))return!1}return!0}function fl(e){let t=kn({theme:{keyframes:e}});return ve(t).trim()+`
|
|
227
|
+
`}function pl(e){let t=new Tn({sources:[{base:e,pattern:"**/*"}]});return t.scan(),t.files}function dl(e){let t=new Tn({sources:[e]});return t.scan(),t.files}function ml(e,t,r){if(r.has("spacing"))return;let i=e.theme.get(["--spacing"]);if(!i)return;let[n,l]=$n(i);if(!(!n||!l)&&i&&!r.has("spacing"))for(let[a,s]of Object.entries(t.theme.spacing??{})){let[o,u]=$n(s);o!==null&&ye(a)&&u===l&&parseFloat(o)===Number(a)*parseFloat(n)&&(delete t.theme.spacing[a],e.theme.clearNamespace(B(`--spacing-${a.replaceAll(".","_")}`),0))}}function $n(e){let t=e.match(/^([0-9.]+)(.*)$/);return t?[t[1],t[2]]:[null,null]}import M from"node:fs/promises";import Ct from"node:path";import{exec as gl}from"node:child_process";import ue from"node:fs/promises";import{dirname as hl,resolve as ce}from"node:path";import{promisify as yl}from"node:util";var _n=yl(gl),Pn={default:"-D",bun:"-d"};function Q(e){return{async add(t,r="dependencies"){let i=await On.get(e),n=t.slice();return r==="devDependencies"&&n.push(Pn[i]||Pn.default),_n(`${i} add ${n.join(" ")}`,{cwd:e})},async remove(t){let r=await On.get(e);return _n(`${r} remove ${t.join(" ")}`,{cwd:e})}}}var En=!1,On=new k(async e=>{do{let t=ce(e,"package.json");try{let i=await ue.readFile(t,"utf-8"),n=JSON.parse(i);if(n.packageManager){if(n.packageManager.includes("bun"))return"bun";if(n.packageManager.includes("yarn"))return"yarn";if(n.packageManager.includes("pnpm"))return"pnpm";if(n.packageManager.includes("npm"))return"npm"}}catch{}try{return await ue.access(ce(e,"bun.lockb")),"bun"}catch{}try{return await ue.access(ce(e,"bun.lock")),"bun"}catch{}try{return await ue.access(ce(e,"pnpm-lock.yaml")),"pnpm"}catch{}try{return await ue.access(ce(e,"yarn.lock")),"yarn"}catch{}try{return await ue.access(ce(e,"package-lock.json")),"npm"}catch{}let r=e;if(e=hl(e),r===e)return En||(En=!0,Ve("Could not detect a package manager. Please manually update `tailwindcss` to v4.")),Promise.reject("No package manager detected")}while(!0)});async function jn(e){let t=!1,r=!1,i=!1,n=!1,l=!1,a=Ct.resolve(e,"package.json"),s;try{s=JSON.parse(await M.readFile(a,"utf-8"))}catch{}let o=await bl(e);if(o){let u=await vl(o);t=!0,u&&(r=!0,i=u.didAddPostcssClient,n=u.didRemoveAutoprefixer,l=u.didRemovePostCSSImport)}if(!t&&s&&"postcss"in s){let u=await Dn(s.postcss);t=!0,u&&(await M.writeFile(a,JSON.stringify({...s,postcss:u?.json},null,2)),r=!0,i=u.didAddPostcssClient,n=u.didRemoveAutoprefixer,l=u.didRemovePostCSSImport)}if(!t){let u=await xl(e),c=null;if(u){try{c=JSON.parse(await M.readFile(u,"utf-8"))}catch{}if(c){let f=await Dn(c);t=!0,f&&(await M.writeFile(u,JSON.stringify(f.json,null,2)),r=!0,i=f.didAddPostcssClient,n=f.didRemoveAutoprefixer,l=f.didRemovePostCSSImport)}}}if(!t){E("No PostCSS config found, skipping migration.",{prefix:"\u21B3 "});return}if(i){let u=Object.hasOwn(s?.dependencies??{},"tailwindcss")?"dependencies":Object.hasOwn(s?.devDependencies??{},"tailwindcss")?"devDependencies":null;if(u!==null)try{await Q(e).add(["@tailwindcss/postcss@next"],u),$(`Installed package: ${y("@tailwindcss/postcss")}`,{prefix:"\u21B3 "})}catch{}}if(n)try{await Q(e).remove(["autoprefixer"]),$(`Removed package: ${y("autoprefixer")}`,{prefix:"\u21B3 "})}catch{}if(l)try{await Q(e).remove(["postcss-import"]),$(`Removed package: ${y("postcss-import")}`,{prefix:"\u21B3 "})}catch{}r&&o&&$(`Migrated PostCSS configuration: ${y(N(o,e))}`,{prefix:"\u21B3 "})}async function vl(e){function t(p){return/['"]?tailwindcss['"]?\: ?\{\}/.test(p)}function r(p){return/['"]?postcss-import['"]?\: ?\{\}/.test(p)}function i(p){return/['"]?autoprefixer['"]?\: ?\{\}/.test(p)}function n(p){return/['"]tailwindcss\/nesting['"]\: ?(\{\}|['"]postcss-nesting['"])/.test(p)}if(E("Migrating PostCSS configuration\u2026"),!await Cl(e))return Ve("The PostCSS config contains dynamic JavaScript and can not be automatically migrated.",{prefix:"\u21B3 "}),null;let a=!1,s=!1,o=!1,c=(await M.readFile(e,"utf-8")).split(`
|
|
228
|
+
`),f=[];for(let p=0;p<c.length;p++){let d=c[p];if(t(d))a=!0,f.push(d.replace("tailwindcss:","'@tailwindcss/postcss':"));else if(i(d))s=!0;else if(r(d)){let m=!1;for(let h=p+1;h<c.length;h++){let g=c[h];if(t(g))break;if(!n(g)){m=!0;break}}m?f.push(d):o=!0}else if(n(d)){let m=c[p+1];t(m)||f.push(d)}else f.push(d)}return await M.writeFile(e,f.join(`
|
|
229
|
+
`)),{didAddPostcssClient:a,didRemoveAutoprefixer:s,didRemovePostCSSImport:o}}async function Dn(e){function t(c,f){return c==="tailwindcss"&&Ye(f)}function r(c,f){return c==="postcss-import"&&Ye(f)}function i(c,f){return c==="autoprefixer"&&Ye(f)}function n(c,f){return c==="tailwindcss/nesting"&&(f==="postcss-nesting"||Ye(f))}let l=!1,a=!1,s=!1,o=Object.entries(e.plugins||{}),u=[];for(let c=0;c<o.length;c++){let[f,p]=o[c];if(t(f,p))l=!0,u.push(["@tailwindcss/postcss",p]);else if(i(f,p))a=!0;else if(r(f,p)){let d=!1;for(let m=c+1;m<o.length;m++){let[h,g]=o[m];if(t(h,g))break;if(!n(h,g)){d=!0;break}}d?u.push([f,p]):s=!0}else if(n(f,p)){let[d,m]=o[c+1];t(d,m)||u.push([f,p])}else u.push([f,p])}return{json:{...e,plugins:Object.fromEntries(u)},didAddPostcssClient:l,didRemoveAutoprefixer:a,didRemovePostCSSImport:s}}var wl=[".postcssrc.js",".postcssrc.mjs",".postcssrc.cjs",".postcssrc.ts",".postcssrc.mts",".postcssrc.cts","postcss.config.js","postcss.config.mjs","postcss.config.cjs","postcss.config.ts","postcss.config.mts","postcss.config.cts"];async function bl(e){for(let t of wl){let r=Ct.resolve(e,t);try{return await M.access(r),r}catch{}}return null}var kl=[".postcssrc",".postcssrc.json"];async function xl(e){for(let t of kl){let r=Ct.resolve(e,t);try{return await M.access(r),r}catch{}}return null}async function Cl(e){let t=await M.readFile(e,"utf-8");return t.includes("tailwindcss:")&&!(t.includes("require")||t.includes("import "))}function Ye(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===0}import Sl from"node:fs/promises";import Al from"node:path";async function In(e){let t=Al.resolve(e,"package.json");try{(await Sl.readFile(t,"utf-8")).includes("prettier-plugin-tailwindcss")&&(await Q(e).add(["prettier-plugin-tailwindcss@latest"]),$(`Updated package: ${y("prettier-plugin-tailwindcss")}`,{prefix:"\u21B3 "}))}catch{}}import $l from"mri";function Fn(e,t=process.argv.slice(2)){let r=$l(t),i={_:r._};for(let[n,{type:l,alias:a,default:s=l==="boolean"?!1:null}]of Object.entries(e)){if(i[n]=s,a){let o=a.slice(1);r[o]!==void 0&&(i[n]=Kn(r[o],l))}{let o=n.slice(2);r[o]!==void 0&&(i[n]=Kn(r[o],l))}}return i}function Kn(e,t){switch(t){case"string":return Xe(e);case"boolean":return Qe(e);case"number":return Ze(e);case"boolean | string":return Qe(e)??Xe(e);case"number | string":return Ze(e)??Xe(e);case"boolean | number":return Qe(e)??Ze(e);case"boolean | number | string":return Qe(e)??Ze(e)??Xe(e);default:throw new Error(`Unhandled type: ${t}`)}}function Qe(e){if(e===!0||e===!1)return e;if(e==="true")return!0;if(e==="false")return!1}function Ze(e){if(typeof e=="number")return e;{let t=Number(e);if(!Number.isNaN(t))return t}}function Xe(e){return`${e}`}import{execSync as Tl}from"node:child_process";function St(){try{return Tl("git status --porcelain",{encoding:"utf-8"}).trim()!==""}catch(e){return!e?.toString?.().includes("not a git repository")}}import{normalizePath as Vl}from"@tailwindcss/node";import Nl from"braces";import At from"node:path";function Un(e){return Nl(e.pattern,{expand:!0}).map(t=>{let r={...e},[i,n]=Rl(t),l=Vl(e.base);i!==null?r.base=At.posix.join(l,i):r.base=l,n===null?r.pattern="**/*":r.pattern=n;let a=At.basename(r.base);return a.includes(".")&&(r.pattern=a,r.base=At.dirname(r.base)),r})}function Rl(e){if(!e.includes("*"))return[e,null];let t=null;for(let n=0;n<e.length;n++){let l=e[n];if(l==="/"&&(t=n),l==="*"||l==="!")break}if(t===null)return[null,e];let r=e.slice(0,t).trim(),i=e.slice(t+1).trim();return[r||null,i||null]}import _l from"node:fs/promises";async function Mn(e,t){try{let r=jt(`${e}/package.json`,t);if(!r)return null;let{version:i}=JSON.parse(await _l.readFile(r,"utf8"));return i}catch{return null}}var Wn={"--config":{type:"string",description:"Path to the configuration file",alias:"-c"},"--help":{type:"boolean",description:"Display usage information",alias:"-h"},"--force":{type:"boolean",description:"Force the migration",alias:"-f"},"--version":{type:"boolean",description:"Display the version number",alias:"-v"}},et=Fn(Wn);et["--help"]&&(Ft({usage:["npx @tailwindcss/upgrade"],options:Wn}),process.exit(0));async function Ol(){let e=process.cwd();z($e()),z();let t=[];et["--force"]||St()&&(P("Git directory is not clean. Please stash or commit your changes before migrating."),E(`You may use the ${y("--force")} flag to silence this warning and perform the migration.`),process.exit(1));let r=await Mn("tailwindcss",e);r&&Number(r.split(".")[0])!==3&&(P(`Tailwind CSS v${r} found. The migration tool can only be run on v3 projects.`),process.exit(1));{let i=et._.map(o=>Pl.resolve(e,o));i.length===0&&(E("Searching for CSS files in the current directory and its subdirectories\u2026"),i=await Ln(["**/*.css"],{absolute:!0,gitignore:!0})),i=i.filter(o=>o.endsWith(".css"));let n=await Promise.allSettled(i.map(o=>J.load(o)));for(let o of n)o.status==="rejected"&&P(`${o.reason?.message??o.reason}`,{prefix:"\u21B3 "});let l=n.filter(o=>o.status==="fulfilled").map(o=>o.value);try{await dn(l)}catch(o){P(`${o?.message??o}`,{prefix:"\u21B3 "})}try{await mn(l,{configPath:et["--config"],base:e})}catch(o){P(`${o?.message??o}`,{prefix:"\u21B3 "})}l.some(o=>o.isTailwindRoot)&&E("Migrating JavaScript configuration files\u2026");let a=new Map,s=new Map;for(let o of l){if(!o.isTailwindRoot)continue;let u=await fn(o.linkedConfigPath,{base:e});a.set(o,u);let c=await Rn(u.designSystem,u.configFilePath,e);s.set(o,c),c!==null&&t.push(()=>zn.rm(u.configFilePath)),c!==null&&$(`Migrated configuration file: ${y(N(u.configFilePath,e))}`,{prefix:"\u21B3 "})}a.size>0&&E("Migrating templates\u2026");for(let o of a.values()){let u=new Set;for(let f of o.globs.flatMap(p=>Un(p))){let p=await Ln([f.pattern],{absolute:!0,gitignore:!0,cwd:f.base});for(let d of p)u.add(d)}let c=Array.from(u);c.sort(),await Promise.allSettled(c.map(f=>Rr(o.designSystem,o.userConfig,f))),$(`Migrated templates for configuration file: ${y(N(o.configFilePath,e))}`,{prefix:"\u21B3 "})}l.length>0&&E("Migrating stylesheets\u2026"),await Promise.all(l.map(async o=>{try{let u=a.get(o),c=s.get(o);if(!u){for(let f of o.ancestors())if(f.isTailwindRoot){u??=a.get(f),c??=s.get(f);break}}await pn(o,{...u,jsConfigMigration:c})}catch(u){P(`${u?.message??u} in ${y(N(o.file,e))}`,{prefix:"\u21B3 "})}}));try{await gn(l)}catch(o){P(`${o?.message??o}`,{prefix:"\u21B3 "})}for(let o of l)for(let u of o.importRules){if(!u.raws.tailwind_injected_layer)continue;let c=l.find(f=>f.id===u.raws.tailwind_destination_sheet_id);c&&c.containsRule(f=>f.type==="atrule"&&f.name==="utility")&&(u.params=u.params.replace(/ layer\([^)]+\)/,"").trim())}for(let o of l)await El([Ot(),Rt()]).process(o.root,{from:o.file});for(let o of l)o.file&&(await zn.writeFile(o.file,o.root.toString()),o.isTailwindRoot&&$(`Migrated stylesheet: ${y(N(o.file,e))}`,{prefix:"\u21B3 "}))}await jn(e),E("Updating dependencies\u2026"),await In(e);try{await Q(e).add(["tailwindcss@next"]),$(`Updated package: ${y("tailwindcss")}`,{prefix:"\u21B3 "})}catch{}await Promise.allSettled(t.map(i=>i())),St()?$("Verify the changes and commit them to your repository."):$("No changes were made to your repository.")}Ol().then(()=>process.exit(0)).catch(e=>{console.error(e),process.exit(1)});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailwindcss/upgrade",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.35",
|
|
4
4
|
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"postcss-selector-parser": "^7.0.0",
|
|
35
35
|
"prettier": "^3.3.3",
|
|
36
36
|
"tree-sitter": "^0.22.0",
|
|
37
|
-
"tree-sitter-typescript": "^0.23.
|
|
38
|
-
"@tailwindcss/node": "4.0.0-alpha.
|
|
39
|
-
"
|
|
40
|
-
"tailwindcss": "4.0.0-alpha.
|
|
37
|
+
"tree-sitter-typescript": "^0.23.2",
|
|
38
|
+
"@tailwindcss/node": "4.0.0-alpha.35",
|
|
39
|
+
"tailwindcss": "4.0.0-alpha.35",
|
|
40
|
+
"@tailwindcss/oxide": "4.0.0-alpha.35"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/braces": "^3.0.4",
|