@tailwindcss/language-server 0.0.0-insiders.4dd357b → 0.0.0-insiders.4fa07ea
Sign up to get free protection for your applications and to get access to all the features.
@@ -1291,7 +1291,7 @@ If omitted, Tailwind will append these classes to the very end of your styleshee
|
|
1291
1291
|
`)+_.toString().replace(/\n\s*\n/g,`
|
1292
1292
|
`).replace(/(@apply [^;\n]+)$/gm,"$1;").replace(/([^\s^]){$/gm,"$1 {").replace(/^\s+/gm,v=>(typeof b>"u"&&(b=v),v.replace(new RegExp(b,"g"),D.indent))).replace(/^(\s+)(.*?[^{}]\n)([^\s}])/gm,"$1$2$1$3")}),!1})})})]).process(i,{from:void 0})}catch{return[]}return a.length?[{title:"Extract to new rule",kind:"quickfix",diagnostics:[r],edit:{changes:{[t.uri]:a}}}]:[]}function EY(e){return{start:{line:e.start.line-1,character:e.start.column-1},end:{line:e.end.line-1,character:e.end.column}}}function WOe(e,t,r,n=!1){let s=t[t.length-1],i=Nu(e,[s]);if(i===null||i.isApplyable===!1)return null;let o=ep(e,t);if(Array.isArray(o))return null;let a=o.context,u=o.pseudo,c=e.classNames.context,H=[];for(let f=0;f<t.length-1;f++){let h=t[f],m=c[h];if(!m)return null;e.screens.includes(h)&&(H.push(`@screen ${h}`),a=a.filter(A=>!m.includes(A)))}H.push(...a);let l={};for(let f=1;f<=H.length;f++)Fa(l,H.slice(0,f),{});if(r=VOe(r,u),r===null)return null;let d={[r]:{[`@apply ${s}${n?" !important":""}`]:""}};return H.length?Fa(l,H,d):l=d,_Y(l,e.modules.postcss)}function VOe(e,t){if(t.length===0)return e;let r=!0,n=(0,pk.default)(s=>{Hl(s.split(i=>!0)).forEach(i=>{for(let o=i.nodes.length-1;o>=0&&i.nodes[o].type==="pseudo";o--)if(t.includes(i.nodes[o].value)){r=!1;break}r&&t.forEach(o=>{i.append(pk.default.pseudo({value:o}))})})}).processSync(e);return r?n:null}function IY(e,t,r){return r.suggestions.map(n=>({title:`Replace with '${n}'`,kind:"quickfix",diagnostics:[r],edit:{changes:{[t.textDocument.uri]:[{range:r.range,newText:n}]}}}))}async function XOe(e,t,r,n){if(!r)return[];let s=await uI(e,r,n);return t.context.diagnostics.map(i=>s.find(o=>o.code===i.code&&o.message===i.message&&oy(o.range,i.range))).filter(Boolean)}async function AY(e,t,r){if(!e.enabled)return[];let n=await XOe(e,t,r,t.context.diagnostics.map(s=>s.code).filter(Boolean));return Promise.all(n.map(s=>xJ(s)?LY(e,r,s):DJ(s)?cY(e,t,s):kJ(s)||MJ(s)||CJ(s)||wJ(s)||NJ(s)?IY(e,t,s):[])).then(Hl).then(s=>r4(s,i=>JSON.stringify(i.edit)))}var bY=Kt(js());async function SY(e,t){let r=[];return!e.enabled||(await e.editor.getConfiguration(t.uri)).tailwindCSS.colorDecorators===!1?r:((await tf(e,t)).forEach(o=>{Mu(o,e.blocklist).forEach(u=>{let c=Io(e,u.className);c===null||typeof c=="string"||(c.alpha??1)===0||r.push({range:u.range,color:Jw(c)})})}),eI(e,t).forEach(o=>{let a=aI(o.path),u=o.helper==="theme"?["theme"]:[],c=(0,bY.default)(e.config,[...u,...a]),H=Yd(c);H&&typeof H!="string"&&(H.alpha??1)!==0&&r.push({range:o.ranges.path,color:Jw(H)})}),$p(r))}function vY(e,t,r){let n=[/@config\s*(?<path>'[^']+'|"[^"]+")/g];return e.v4&&n.push(/@plugin\s*(?<path>'[^']+'|"[^"]+")/g,/@source\s*(?<path>'[^']+'|"[^"]+")/g),qOe(e,t,n,r)}function qOe(e,t,r,n){if(!Dr(e.version,"3.2.0"))return[];let s=[],i=[];if(Sa(e,t))i.push(void 0);else{let o=as(e,t);if(!o)return[];i.push(...o.filter(a=>a.type==="css").map(({range:a})=>a))}for(let o of i){let a=Ji(t,"css",o),u=[];for(let c of r)u.push(...Ao(c,a));for(let c of u)s.push({target:n(c.groups.path.slice(1,-1)),range:HH({start:li(a,c.index+c[0].length-c.groups.path.length),end:li(a,c.index+c[0].length)},o)})}return s}var gue=Kt(PY());var nE=Kt(require("fs")),of=Kt(require("path"));var KOe=[".js",".cjs",".mjs"],GOe=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],ZOe=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];function zOe(e,t){for(let r of t){let n=`${e}${r}`;if(nE.default.existsSync(n)&&nE.default.statSync(n).isFile())return n}for(let r of t){let n=`${e}/index${r}`;if(nE.default.existsSync(n))return n}return null}function*$Y(e,t,r,n=of.default.extname(e)){let s=zOe(of.default.resolve(t,e),KOe.includes(n)?GOe:ZOe);if(s===null||r.has(s))return;r.add(s),yield s,t=of.default.dirname(s),n=of.default.extname(s);let i=nE.default.readFileSync(s,"utf-8");for(let o of[...i.matchAll(/import[\s\S]*?['"](.{3,}?)['"]/gi),...i.matchAll(/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi),...i.matchAll(/require\(['"`](.+)['"`]\)/gi)])o[1].startsWith(".")&&(yield*$Y(o[1],t,r,n))}function dI(e){return Array.from($Y(e,of.default.dirname(e),new Set)).filter(t=>t!==e).map(t=>Us(Zi(t)))}var A1=Kt(require("assert"));var Lue=Kt(pw());function iE(e){let t=[],r=e.startsWith("0.0.0-insiders");return!r&&Dr(e,"4.0.0-alpha.1")?["css-at-theme","layer:base","content-list"]:!r&&e.startsWith("0.0.0-oxide")?["css-at-theme","layer:base","content-list"]:(Dr(e,"0.99.0")?(t.push("layer:base"),t.push("separator:root")):(t.push("layer:preflight"),t.push("separator:options")),Dr(e,"1.4.0")&&Fc(e,"1.99.0")&&t.push("browserslist-in-plugins"),Dr(e,"3.0.0")||(Dr(e,"1.99.0")?t.push("apply-complex-classes"):Dr(e,"1.7.0")&&t.push("apply-complex-classes:flagged")),Dr(e,"3.0.0")?t.push("content-list"):t.push("purge-list"),Dr(e,"3.0.0")?t.push("jit"):Dr(e,"2.1.0"),Dr(e,"3.2.0")&&(t.push("css-at-config-as-project"),t.push("relative-content-paths")),Dr(e,"3.3.0")&&t.push("transpiled-configs"),t)}var qQ=Kt(require("node:fs/promises")),gI=Kt(require("node:path"));var VQ=Kt(jQ());var cE=Kt(require("node:path"));var vk="'",Tk='"';function WQ(){let e=new WeakSet;function t(r){if(e.has(r))return;let n=r.root().source?.input.file;if(!n)return;let s=r.source?.input.file;if(!s)return;let i=r.params[0],o=i[0]===Tk&&i[i.length-1]===Tk?Tk:i[0]===vk&&i[i.length-1]===vk?vk:null;if(!o)return;let a=r.params.slice(1,-1),u="";if(a.startsWith("!")&&(a=a.slice(1),u="!"),!a.startsWith("./")&&!a.startsWith("../"))return;let c=cE.default.posix.join(Zi(cE.default.dirname(s)),a),H=cE.default.posix.dirname(Zi(n)),l=cE.default.posix.relative(H,c);l.startsWith(".")||(l="./"+l),r.params=o+u+l+o,e.add(r)}return{postcssPlugin:"tailwindcss-postcss-fix-relative-paths",AtRule:{source:t,plugin:t}}}var l3e=gy({extensions:[".css"],mainFields:["style"],conditionNames:["style"]}),u3e=Va([(0,VQ.default)({resolve:(e,t)=>Pk(t,e)}),WQ()]);function yI(){return u3e}function Pk(e,t){return l3e.resolveSync({},e,t)||t}function XQ(e){return{postcssPlugin:"extract-at-rules",AtRule:{source:({params:t})=>{t[0]!=='"'&&t[0]!=="'"||e.push(t.slice(1,-1))}}}}var c3e=/@import\s*(?:'tailwindcss'|"tailwindcss")/,p3e=/@theme\s*\{/;async function d3e(e){return p3e.test(e)||c3e.test(e)}function $k({legacy:e,filepath:t,onError:r}){let n=`${+Date.now()}`;async function s(i,o,a){try{let u=Gr(o,i),c=id(u);return c.searchParams.append("t",n),await import(c.href).then(H=>H.default??H)}catch(u){return r(i,u,a)}}if(e){let i=gI.dirname(t);return o=>s(o,i,"module")}return async(i,o,a)=>({base:o,module:await s(i,o,a)})}async function Dk(e,t,r){if(!e.__unstable__loadDesignSystem||!d3e(r))return null;let n=!1;try{await e.__unstable__loadDesignSystem(r,{loadStylesheet:async(i,o)=>(n=!0,{base:o,content:""})})}catch{}n||(r=(await yI().process(r,{from:t})).css);let s=await e.__unstable__loadDesignSystem(r,{base:gI.dirname(t),loadModule:$k({legacy:!1,filepath:t,onError:(i,o,a)=>{if(console.error(`Unable to load ${a}: ${i}`,o),a==="config")return{};if(a==="plugin")return()=>{}}}),loadStylesheet:async(i,o)=>{let a=Pk(o,i);return{base:gI.dirname(a),content:await qQ.readFile(a,"utf-8")}},loadPlugin:$k({legacy:!0,filepath:t,onError(i,o){return console.error(`Unable to load plugin: ${i}`,o),()=>{}}}),loadConfig:$k({legacy:!0,filepath:t,onError(i,o){return console.error(`Unable to load config: ${i}`,o),{}}})});return Object.assign(s,{compile(i){let o=s.candidatesToCss(i),a=[],u=o.map(c=>{if(c===null)return Va.root();try{return Va.parse(c.trimEnd())}catch(H){return a.push(H),Va.root()}});return a.length>0&&console.error(JSON.stringify(a)),u},toCss(i){return Array.isArray(i)?Va.root({nodes:i}).toString().trim():i.toString().trim()}}),s}var KQ=require("node:fs/promises");async function ip(e){try{let t=await(0,KQ.readFile)(e,"utf8");return Ji(t,"css")}catch{return null}}var due=Object.keys(Lue.default);function fue(e,t){return JSON.stringify([e,...t].map(r=>[r,gp.statSync(r).mtimeMs]))}function Iue(e){if(typeof e.mode<"u")return e.mode;if(Array.isArray(e.presets))for(let t=e.presets.length-1;t>=0;t--){let r=Iue(e.presets[t]);if(typeof r<"u")return r}}function Aue(e){if(delete e.mode,Array.isArray(e.presets))for(let t of e.presets)Aue(t)}function $b(e,t){let r,n=jn.dirname(e),s=[e,n];if(n===t)return s;for(;n=jn.dirname(r=n),r!==n;)if(s.push(n),n===t)break;return s}async function bue(e,t,r,n,s,i,o,a,u,c,H,l){let d=!1,f=t.folder,h=[],m=t.documentSelector,A=n.capabilities.textDocument?.completion?.completionList?.itemDefaults??[];n.clientInfo?.name?.includes("Visual Studio Code")&&!A.includes("data")&&A.push("data");let g={enabled:!1,completionItemData:{_projectKey:e},editor:{connection:r,folder:f,userLanguages:l,capabilities:{configuration:!0,diagnosticRelatedInformation:!0,itemDefaults:A},getConfiguration:H,getDocumentSymbols:P=>r.sendRequest("@/tailwindCSS/getDocumentSymbols",{uri:P}),async readDirectory(P,S){try{S=jn.resolve(jn.dirname(cI(P.uri)),S);let T=await gp.promises.readdir(S,{withFileTypes:!0});return(await Promise.all(T.map(async N=>{let R=N.isDirectory();return await Ru(g,P,jn.join(S,N.name,R?"/":""))?null:[N.name,{isDirectory:R}]}))).filter(N=>N!==null)}catch{return[]}}}};if(t.configPath&&t.config.source==="js"){let P=[];try{P=dI(t.configPath)}catch{}u([...$b(t.configPath,t.folder),...P.flatMap(S=>$b(S,t.folder))])}function _(...P){console.log(`[${jn.relative(t.folder,t.configPath)}] ${P.join(" ")}`)}function L(P){let S=!1,T=!1,k=(0,_ue.default)(`**/${td}`,{dot:!0});for(let N of P){let R=Us(Zi(N.file)),O=nd(R,[t.configPath]),F=nd(R,g.dependencies??[]),B=k(R);if(!(!O&&!F&&!B)){if(!d){!t.isUserConfigured&&t.configPath&&(O||F)&&(m=[...m.filter(({priority:C})=>C!==1),...mue(t.configPath,c,t.folder)],o());continue}if(N.type===Db.FileChangeType.Created){_("File created:",N.file),S=!0;break}else if(N.type===Db.FileChangeType.Changed)if(_("File changed:",N.file),!g.enabled||B){S=!0;break}else T=!0;else if(N.type===Db.FileChangeType.Deleted)if(_("File deleted:",N.file),!g.enabled||O||B){S=!0;break}else T=!0}}S?D():T&&v()}function b(){Object.keys(g).forEach(P=>{P!=="editor"&&P!=="dependencies"&&delete g[P]}),g.enabled=!1,a(),i(),r.sendNotification("@/tailwindCSS/projectReset")}async function D(){if(d)try{await x(),r.sendNotification("@/tailwindCSS/projectInitialized")}catch(P){b(),wP(r,P)}}async function v(){if(d)try{await I()}catch(P){b(),wP(r,P)}}async function x(){_("Initializing..."),zh();let P=t.configPath;if(!P)throw new Tg("No config file found.");u($b(P,t.folder));let S=ac.default.sync(G=>{let se=jn.join(G,".pnp.js");if(ac.default.sync.exists(se)||(se=jn.join(G,".pnp.cjs"),ac.default.sync.exists(se)))return se;if(G===jn.normalize(f))return ac.default.stop},{cwd:f});if(S){let G=require(S);G.setup(),iU(G)}let T=t.config.source==="js"?dI(P):[],k=fue(P,T),N=jn.dirname(P),R,O,F,B,C,K,Z,ie,te,ne,W,j={future:[],experimental:[]},q;try{let G=Gr(N,"tailwindcss"),se=Gr(N,"tailwindcss/package.json"),de=jn.dirname(se);C=require(se).version;let me=iE(C);if(_(`supported features: ${JSON.stringify(me)}`),G=id(G).href,R=await import(G),R=R.default??R,_(`Loaded tailwindcss v${C}: ${de}`),me.includes("css-at-theme"))return g.configPath=P,g.version=C,g.isCssConfig=!0,g.v4=!0,g.jit=!0,g.modules={tailwindcss:{version:C,module:R},postcss:{version:null,module:null},resolveConfig:{module:null},loadConfig:{module:null}},v();if(t.config.source==="css"){_("CSS-based configuration is not supported before Tailwind CSS v4"),g.enabled=!1,d=!1;return}let Ae=Gr(de,"postcss"),Fe=Gr(de,"postcss/package.json"),Ve=jn.dirname(Fe),Pe=Gr(de,"postcss-selector-parser");if(K=require(Fe).version,Z=Object.keys(tL).map(ye=>{try{return require(Gr(N,`${ye}/package.json`)).version}catch{return""}}).join(","),g.enabled&&K===g.modules.postcss.version&&C===g.modules.tailwindcss.version&&Z===g.pluginVersions&&P===g.configPath&&k===g.configId)return;_(`Loaded Tailwind CSS config file: ${P}`),O=require(Ae),F=require(Pe),_(`Loaded postcss v${K}: ${Ve}`);try{te=require(Gr(de,"./resolveConfig.js"))}catch{try{let le=require(Gr(de,"./lib/util/resolveConfig.js")),ae=require(Gr(de,"./stubs/defaultConfig.stub.js"));te=V=>le([V,ae])}catch{try{let ae=require(Gr(de,"./lib/util/mergeConfigWithDefaults.js")),V=require(Gr(de,"./defaultConfig.js"));te=ce=>ae.default(ce,V())}catch{throw Error("Failed to load resolveConfig function.")}}}try{let ye=require(Gr(de,"./lib/util/transformThemeValue.js"));ne=ye.default??ye}catch{}try{W=require(Gr(de,"./loadConfig.js"))}catch{}if(Dr(C,"1.4.0")&&Fc(C,"1.99.0")){let ye=Gr(de,"browserslist");ie=require(ye)(void 0,{path:f})}Dr(C,"1.99.0")?q=xP(()=>require(Gr(de,"./lib/lib/substituteClassApplyAtRules"))):Dr(C,"1.7.0")&&(q=require(Gr(de,"./lib/flagged/applyComplexClasses")));try{j=require(Gr(de,"./lib/featureFlags.js")).default}catch{}let Ee=new Set,we=O.root(),Be={opts:{},messages:[]},Ye=()=>{};try{let ye=Ag(()=>{let le=require(Gr(N,"tailwindcss/lib/lib/setupContextUtils")).createContext;return A1.default.strictEqual(typeof le,"function"),ae=>le(ae.config)},()=>{let le=require(Gr(N,"tailwindcss/lib/jit/lib/setupContextUtils")).createContext;return A1.default.strictEqual(typeof le,"function"),ae=>le(ae.config)},()=>{let le=require(Gr(N,"tailwindcss/lib/jit/lib/setupTrackingContext")).default;return A1.default.strictEqual(typeof le,"function"),ae=>le(ae.configPath,Ee,Ye)(Be,we)},()=>{let le=require(Gr(N,"tailwindcss/lib/jit/lib/setupContext")).default;return A1.default.strictEqual(typeof le,"function"),ae=>le(ae.configPath,Ee)(Be,we)});B={generateRules:{module:Ag(()=>require(Gr(N,"tailwindcss/lib/lib/generateRules")).generateRules,()=>require(Gr(N,"tailwindcss/lib/jit/lib/generateRules")).generateRules)},createContext:{module:ye},expandApplyAtRules:{module:Ag(()=>require(Gr(N,"tailwindcss/lib/lib/expandApplyAtRules")).default,()=>require(Gr(N,"tailwindcss/lib/jit/lib/expandApplyAtRules")).default)},evaluateTailwindFunctions:{module:xP(()=>require(Gr(N,"tailwindcss/lib/lib/evaluateTailwindFunctions")).default)}}}catch{try{let le=require(Gr(N,"tailwindcss/jit/lib/setupContext"));B={generateRules:{module:require(Gr(N,"tailwindcss/jit/lib/generateRules")).generateRules},createContext:{module:ae=>le(ae.configPath,Ee)(Be,we)},expandApplyAtRules:{module:require(Gr(N,"tailwindcss/jit/lib/expandApplyAtRules"))}}}catch{}}}catch(G){let se=await import("node:util");console.error(se.format(G)),R=Hue(),te=UD(),ne=pf().default,W=cue(),O=ba(),C=NE().version,K=pue().version,F=AL(),B={generateRules:{module:RE().generateRules},createContext:{module:de=>hf().createContext(de.config)},expandApplyAtRules:{module:l9().default}},_("Failed to load workspace modules."),_(`Using bundled version of \`tailwindcss\`: v${C}`),_(`Using bundled version of \`postcss\`: v${K}`)}g.configPath=P,g.modules={tailwindcss:{version:C,module:R},postcss:{version:K,module:O},postcssSelectorParser:{module:F},resolveConfig:{module:te},loadConfig:{module:W},transformThemeValue:{module:ne},jit:B},g.browserslist=ie,g.featureFlags=j,g.version=C,g.pluginVersions=Z;try{g.corePlugins=Object.keys(require(Gr(jn.dirname(g.configPath),"tailwindcss/lib/plugins/index.js")))}catch{}if(q&&!q.default.__patched){let G=q.default;q.default=(se,...de)=>{if(g.jit)return g.modules.jit.expandApplyAtRules.module(g.jitContext);let me=gu(se);me.separator=typeof g.separator>"u"?":":g.separator;let Ae=G(me,...de);return async Fe=>(Fe.walkRules(Ve=>{let Pe=Ve.selector.replace(/__TWSEP__(.*?)__TWSEP__/g,"$1");Pe!==Ve.selector&&(Ve.before(O.comment({text:"__ORIGINAL_SELECTOR__:"+Ve.selector})),Ve.selector=Pe)}),await Ae(Fe),Fe.walkComments(Ve=>{Ve.text.startsWith("__ORIGINAL_SELECTOR__:")&&(Ve.next().selector=Ve.text.replace(/^__ORIGINAL_SELECTOR__:/,""),Ve.remove())}),Fe)},q.default.__patched=!0}await v()}async function I(){_("Building..."),zh();let{tailwindcss:P,postcss:S,resolveConfig:T,loadConfig:k}=g.modules,N=Dr(P.version,"0.99.0")?["separator"]:["options","separator"],R=[],O,F=Dr(P.version,"2.99.0"),B;if(g.isCssConfig)try{let Z=await ip(g.configPath),ie=await Dk(g.modules.tailwindcss.module,g.configPath,Z);g.designSystem=ie,O={theme:{}}}catch{d=!1,g.enabled=!1;return}else if(k.module){B=new Ed(gp.realpathSync(g.configPath));try{O=await k.module(g.configPath),O=O.default??O,g.jit=!0}finally{B.unhook()}}else{B=new Ed(gp.realpathSync(g.configPath),Z=>{O=gu(Z);let ie=(0,EH.default)(Z,N);typeof ie!="string"&&(ie=":"),Fa(Z,N,`__TWSEP__${ie}__TWSEP__`),Z[F?"content":"purge"]=[];let te=Iue(Z);if(Aue(Z),F||g.modules.jit&&te==="jit"){if(g.jit=!0,Z.variants=[],Array.isArray(Z.presets))for(let W of Z.presets)R.push(W.variants),W.variants=[]}else g.jit=!1;if(g.corePlugins){let W={};for(let j of g.corePlugins)W[j]=!0;Z.corePlugins=W}return Array.isArray(Z.plugins)&&(Z.plugins=Z.plugins.map(W=>{if(W.__isOptionsFunction&&(W=W()),typeof W=="function"){let j=(...q)=>(q[0].matchUtilities||(q[0].matchUtilities=()=>{}),W(...q));return j.__intellisense_cache_bust=Math.random(),j}return W.handler?{...W,handler:(...j)=>(j[0].matchUtilities||(j[0].matchUtilities=()=>{}),W.handler(...j)),__intellisense_cache_bust:Math.random()}:W})),Z});try{t.config.source==="js"&&require(g.configPath)}catch(Z){throw B.unhook(),Z}}if(!O)throw new Tg(`Failed to load config file: ${g.configPath}`);t.isUserConfigured||(m=[...m.filter(({priority:Z})=>Z!==1),...mue(g.configPath,P.version,t.folder,O)]);try{if(g.config=g.isCssConfig?O:T.module(O),g.separator=(0,EH.default)(g.config,N),typeof g.separator!="string"&&(g.separator=":"),g.blocklist=Array.isArray(g.config.blocklist)?g.config.blocklist:[],delete g.config.blocklist,g.v4){let Z=g.designSystem.getClassList();g.classList=Z.map(ie=>[ie[0],{...ie[1],color:Io(g,ie[0])}])}else if(g.jit){if(g.jitContext=g.modules.jit.createContext.module(g),g.jitContext.tailwindConfig.separator=g.config.separator,g.jitContext.getClassList){let Z=g.jitContext.getClassList({includeMetadata:!0}).filter(ie=>ie!=="*");g.classListContainsMetadata=Z.some(ie=>Array.isArray(ie)),g.classList=Z.map(ie=>Array.isArray(ie)?[ie[0],{color:Io(g,ie[0]),...ie[1]??{}}]:[ie,{color:Io(g,ie)}])}}else delete g.jitContext,delete g.classList}catch(Z){throw B?.unhook(),Z}let C;if(g.classList)B?.unhook();else try{C=await S.module([P.module(g.configPath)]).process([Dr(P.version,"0.99.0")?"base":"preflight","components","utilities"].map(Z=>`/*__tw_intellisense_layer_${Z}__*/
|
1293
1293
|
@tailwind ${Z};`).join(`
|
1294
|
-
`),{from:void 0})}catch(Z){throw Z}finally{B?.unhook()}g.dependencies=dI(g.configPath),u((g.dependencies??[]).flatMap(Z=>$b(Z,t.folder))),g.configId=fue(g.configPath,g.dependencies),g.plugins=await XQe(O),C&&(g.classNames=await Gq(C.root)),g.variants=VQe(g);let K=(0,EH.default)(g.config,"theme.screens",(0,EH.default)(g.config,"screens",{}));g.screens=xH(K)?Object.keys(K):[],g.enabled=!0,a(),i()}return{projectConfig:t,enabled(){return d},enable(){d=!0},async reload(){if(!g.v4)return;console.log("---- RELOADING DESIGN SYSTEM ----");let P=await ip(g.configPath),S=await Dk(g.modules.tailwindcss.module,g.configPath,P),T=Object.create(g,{designSystem:{value:S}}),k=S.getClassList().map(N=>[N[0],{...N[1],color:Io(T,N[0])}]);g.designSystem=S,g.classList=k,console.log("---- RELOADED ----")},state:g,documentSelector(){return m},tryInit:D,async dispose(){g={enabled:!1};for(let P of h)(await P).dispose()},async onUpdateSettings(P){g.enabled&&a(),P.editor?.colorDecorators?i():r.sendNotification("@/tailwindCSS/clearColors")},onFileEvents:L,async onHover(P){return rd(async()=>{if(!g.enabled)return null;let S=s.getDocument(P.textDocument.uri);return!S||!(await g.editor.getConfiguration(S.uri)).tailwindCSS.hovers||await Ru(g,S)?null:UJ(g,S,P.position)},null)},async onCompletion(P){return rd(async()=>{if(!g.enabled)return null;let S=s.getDocument(P.textDocument.uri);return!S||!(await g.editor.getConfiguration(S.uri)).tailwindCSS.suggestions||await Ru(g,S)?null:ZJ(g,S,P.position,P.context)},null)},onCompletionResolve(P){return rd(()=>g.enabled?zJ(g,P):null,null)},async onCodeAction(P){return rd(async()=>{if(!g.enabled)return null;let S=s.getDocument(P.textDocument.uri);return!S||!(await g.editor.getConfiguration(S.uri)).tailwindCSS.codeActions?null:AY(g,P,S)},null)},onDocumentLinks(P){if(!g.enabled)return null;let S=s.getDocument(P.textDocument.uri);return S?vY(g,S,T=>w9.URI.file(jn.resolve(jn.dirname(w9.URI.parse(S.uri).fsPath),T)).toString()):null},provideDiagnostics:(0,gue.debounce)(P=>{g.enabled&&uk(g,P)},n.initializationOptions?.testMode?0:500),provideDiagnosticsForce:P=>{g.enabled&&uk(g,P)},async onDocumentColor(P){return rd(async()=>{if(!g.enabled)return[];let S=s.getDocument(P.textDocument.uri);return S?await Ru(g,S)?null:SY(g,S):[]},null)},async onColorPresentation(P){let S=s.getDocument(P.textDocument.uri);if(!S)return[];let T=S.getText(P.range),k=T.match(new RegExp(`-\\[(${due.join("|")}|(?:(?:#|rgba?\\(|hsla?\\())[^\\]]+)\\]$`,"i"));if(k===null)return[];let N=k[1],R=due.includes(N),O={mode:"rgb",r:P.color.red,g:P.color.green,b:P.color.blue,alpha:P.color.alpha},F=D_(O);if(!R&&(N.length===4||N.length===5)){let[,...C]=F.match(/^#([a-f\d])\1([a-f\d])\2([a-f\d])\3(?:([a-f\d])\4)?$/i)??[];C.length&&(F=`#${C.filter(Boolean).join("")}`)}F.length===5?F=F.replace(/f$/,""):F.length===9&&(F=F.replace(/ff$/,""));let B=T.substr(0,k.index);return[F,Fd(O).replace(/ /g,""),ow(O).replace(/ /g,"").replace(/\d+\.\d+(%?)/g,(C,K)=>`${Math.round(parseFloat(C))}${K}`)].map(C=>({label:`${B}-[${C}]`}))},sortClassLists(P){return g.jit?P.map(S=>{let T="",k=S.split(/(\s+)/),N=k.filter((F,B)=>B%2===0),R=k.filter((F,B)=>B%2!==0);N[N.length-1]===""&&N.pop();let O;g.v4?O=g.designSystem.getClassOrder(N):g.jitContext.getClassOrder?O=g.jitContext.getClassOrder(N):O=UQe(g,N),N=O.sort(([,F],[,B])=>F===B?0:F===null?-1:B===null?1:Bd(F-B)).map(([F])=>F);for(let F=0;F<N.length;F++)T+=`${N[F]}${R[F]??""}`;return T}):P}}}function hue(e,t){let r=e.config.prefix;return typeof r=="function"?r(t):r+t}function UQe(e,t){let r=new Set([hue(e,"group"),hue(e,"peer")]),n=[];for(let s of t){let i=e.modules.jit.generateRules.module(new Set([s]),e.jitContext).sort(([o],[a])=>Bd(a-o))[0]?.[0]??null;i===null&&r.has(s)&&(i=e.jitContext.layerOrder.components),n.push([s,i])}return n}function jQe(e,t,r={}){let n=t.config,s=t.modules.postcss.module,i=t.browserslist,o=i&&i.includes("ie 11")?"ie11":"relaxed",a=typeof e=="function"?e:e.handler;try{a({addUtilities:()=>{},addComponents:()=>{},addBase:()=>{},matchUtilities:()=>{},addVariant:()=>{},e:u=>u,prefix:u=>u,theme:(u,c)=>(0,EH.default)(n,`theme.${u}`,c),variants:()=>[],config:(u,c)=>(0,EH.default)(n,u,c),corePlugins:u=>Array.isArray(n.corePlugins)?n.corePlugins.includes(u):(0,EH.default)(n,`corePlugins.${u}`,!0),target:u=>{if(typeof n.target=="string")return n.target==="browserslist"?o:n.target;let[c,H]=(0,EH.default)(n,"target"),l=(0,EH.default)(H,u,c);return l==="browserslist"?o:l},postcss:s,...r})}catch{}}function WQe(e){return e.type==="atrule"}function VQe(e){if(e.v4)return e.designSystem.getVariants();if(e.jitContext?.getVariants)return e.jitContext.getVariants();if(e.jit){let i=[];return Array.from(e.jitContext.variantMap).forEach(([o,a])=>{i.push({name:o,values:[],isArbitrary:!1,hasDash:!0,selectors:()=>{function u(A){let g=e.modules.postcssSelectorParser.module.className();return g.value=A,(0,EH.default)(g,"raws.value",g.value)}let c=(Array.isArray(a[0])?a:[a]).map(([A,g])=>g),H="__variant_placeholder__",l=e.modules.postcss.module.root({nodes:[e.modules.postcss.module.rule({selector:`.${u(H)}`,nodes:[]})]}),d=e.modules.postcssSelectorParser.module(A=>A.first.filter(({type:g})=>g==="class").pop().value);function f(A){return d.transformSync(A)}function h(A){return l.each(g=>{g.type==="rule"&&(g.selectors=g.selectors.map(_=>A({get className(){return f(_)},selector:_})))}),l}let m=[];for(let A of c){let g,_=l.clone(),L=_j(()=>A({container:_,separator:e.separator,modifySelectors:h,format:b=>{g=b.replace(/:merge\(([^)]+)\)/g,"$1")},wrap:b=>{WQe(b)&&(g=`@${b.name} ${b.params}`)}}));if(g||(g=L),g){m.push(g);continue}_.walkDecls(b=>{b.remove()}),g=_.toString().replace(`.${u(`${o}:${H}`)}`,"&").replace(/(?<!\\)[{}]/g,"").replace(/\s*\n\s*/g," ").trim(),g.includes(H)||m.push(g)}return m}})}),i}let t=e.config,r=e.modules.tailwindcss.version,n=["responsive","hover"];return Dr(r,"0.3.0")&&n.push("focus","group-hover"),Dr(r,"0.5.0")&&n.push("active"),Dr(r,"0.7.0")&&n.push("focus-within"),Dr(r,"1.0.0-beta.1")&&n.push("default"),Dr(r,"1.1.0")&&n.push("first","last","odd","even","disabled","visited"),Dr(r,"1.3.0")&&n.push("group-focus"),Dr(r,"1.5.0")&&n.push("focus-visible","checked"),Dr(r,"1.6.0")&&n.push("motion-safe","motion-reduce"),Dr(r,"2.0.0-alpha.1")&&n.push("dark"),(Array.isArray(t.plugins)?t.plugins:[]).forEach(i=>{jQe(i,e,{addVariant:o=>{n.push(o)}})}),n.map(i=>({name:i,values:[],isArbitrary:!1,hasDash:!0,selectors:()=>[]}))}async function XQe(e){let t=e.plugins;return Array.isArray(t)?Promise.all(t.map(async r=>{let n=r.config;xH(n)||(n={});let s={theme:xH(n.theme)?Object.keys(n.theme):[],variants:xH(n.variants)?Object.keys(n.variants):[]},i=r.handler||r,o=typeof i.name=="string"&&i.name!=="handler"&&i.name!==""?i.name:null;try{i()}catch(a){let u=yue.default.parse(a);if(u.length===0)return{name:o};let c=u[0].fileName,H=jn.dirname(c);if(!Eue.default.sync({cwd:H}))return{name:o};let d;try{d=require(d)}catch{return{name:o}}if(d.name&&jn.resolve(H,d.main||"index.js")===c)return{name:d.name,homepage:d.homepage,contributes:s}}return{name:o}})):[]}function qQe(e,t){try{let r=ac.default.sync(n=>{let s=jn.join(n,"package.json");if(ac.default.sync.exists(s))return s;if(n===jn.normalize(t))return ac.default.stop},{cwd:e});return r?jn.dirname(r):t}catch{return t}}function mue(e,t,r,n){let s=n??require(e),i=s.content?.files??s.content,o=Array.isArray(i)?i:[],a=Dr(t,"3.2.0")?s.future?.relativeContentPathsByDefault||s.content?.relative:!1,u;return a?u=jn.dirname(e):u=qQe(jn.dirname(e),r),o.filter(c=>typeof c=="string").map(c=>c.startsWith("!")?`!${jn.resolve(u,c.slice(1))}`:jn.resolve(u,c)).map(c=>({pattern:Us(Zi(c)),priority:1}))}var $ue=Kt(Pue());function aet(){return{editor:{tabSize:2},tailwindCSS:{emmetCompletions:!1,classAttributes:["class","className","ngClass","class:list"],codeActions:!0,hovers:!0,suggestions:!0,validate:!0,colorDecorators:!0,rootFontSize:16,lint:{cssConflict:"warning",invalidApply:"error",invalidScreen:"error",invalidVariant:"error",invalidConfigPath:"error",invalidTailwindDirective:"error",recommendedVariantOrder:"warning"},showPixelEquivalents:!0,includeLanguages:{},files:{exclude:["**/.git/**","**/node_modules/**","**/.hg/**","**/.svn/**"]},experimental:{classRegex:[],configFile:null}}}}function Due(e){let t=new Map;async function r(s){let i=t.get(s);return i||(i=await n(s),t.set(s,i)),i}async function n(s){let[i,o]=await Promise.all([e.workspace.getConfiguration({section:"editor",scopeUri:s}),e.workspace.getConfiguration({section:"tailwindCSS",scopeUri:s})]);return i=xH(i)?i:{},o=xH(o)?o:{},(0,$ue.default)(aet(),{editor:i,tailwindCSS:o},{arrayMerge:(a,u,c)=>u})}return{get:r,clear(){t.clear()}}}var hce=Kt(require("node:os")),us=Kt(require("node:path")),S1=Kt(require("node:fs/promises")),mce=Kt(dce()),_ce=Kt(Zh());var Ob=class{constructor(){this.parents=new Map;this.children=new Map;this.nodes=new Map}add(t,r){return this.nodes.has(t)?this.nodes.get(t):(this.nodes.set(t,r),this.parents.set(t,new Set),this.children.set(t,new Set),r)}connect(t,r){let n=this.children.get(t);if(!n)throw new Error(`Node ${t} does not exist`);let s=this.parents.get(r);if(!s)throw new Error(`Node ${r} does not exist`);s.add(t),n.add(r)}*descendants(t){let r=[],n=new Set;for(let s of this.children.get(t))r.push(s);for(;r.length>0;){let s=r.shift();if(!n.has(s)){yield this.nodes.get(s),n.add(s);for(let i of this.children.get(s))r.push(i)}}}*roots(){for(let[t,r]of this.parents)r.size===0&&(yield this.nodes.get(t))}*leaves(){for(let[t,r]of this.children)r.size===0&&(yield this.nodes.get(t))}};var Rb=class extends Map{remember(t,r){let n=super.get(t);return n||(n=r(t),this.set(t,n)),n}};var Fb=Kt(FP()),eh=Kt(require("node:path"));async function h8(e,t){async function r(n){let s=eh.join(n,"package.json");if(await Fb.default.exists(s))return s;if(n===eh.normalize(t))return Fb.default.stop}try{let n=await(0,Fb.default)(r,{cwd:e});return n?eh.dirname(n):t}catch{return t}}async function Ttt(e){let t=await import(e);return t.scanDir?t:null}async function fce(e){let t=await Ttt(e.oxidePath);if(!t)return null;if(Fc(e.oxideVersion,"4.0.0-alpha.18")){let n=t.scanDir?.({base:e.basePath,globs:!0});return{files:n.files,globs:n.globs.map(s=>({base:s.base,pattern:s.glob}))}}if(Fc(e.oxideVersion,"4.0.0-alpha.19")){let n=t.scanDir({base:e.basePath,sources:e.sources});return{files:n.files,globs:n.globs}}let r=new t.Scanner({detectSources:{base:e.basePath},sources:e.sources});return{files:r.files,globs:r.globs}}var Bb=class{constructor(t,r){this.base=t;this.settings=r}async search(){let t=await this.findConfigs(),r=await Promise.allSettled(t.map(s=>this.createProject(s))),n=[];for(let s of r)s.status==="rejected"?console.error(`[GLOBAL] Error creating project: ${s.reason}`):s.status==="fulfilled"&&s.value&&n.push(s.value);n.length===1&&n[0].documentSelector.push({pattern:Zi(us.join(this.base,"**")),priority:5});for(let s of n){s.folder=Us(s.folder),s.configPath=Us(s.configPath),s.config.path=Us(s.config.path);for(let i of s.config.entries)i.path=Us(i.path);for(let i of s.documentSelector)i.pattern=Us(i.pattern)}return n}async loadAllFromWorkspace(t){return Promise.all(t.map(r=>this.loadFromWorkspace(r[0],r[1])))}async loadFromWorkspace(t,r){let n={type:"js",path:t,source:"js",entries:[],content:[],packageRoot:""},s=await this.detectTailwindVersion(n);return n.packageRoot=await h8(us.dirname(n.path),this.base),{config:n,folder:this.base,isUserConfigured:!0,configPath:n.path,documentSelector:r.map(i=>({priority:0,pattern:i})),tailwind:s}}async createProject(t){let r=await this.detectTailwindVersion(t);if(console.log(JSON.stringify({tailwind:r})),t.type==="js"&&t.source==="css"&&(r.isDefaultVersion||!r.features.includes("css-at-config-as-project"))||t.type==="css"&&!r.features.includes("css-at-theme")||t.type==="js"&&r.features.includes("css-at-theme")||t.type==="js"&&(t.path.endsWith(".ts")||t.path.endsWith(".mjs"))&&!r.features.includes("transpiled-configs"))return null;t.packageRoot=await h8(us.dirname(t.path),this.base);let n=[];for(let s of t.entries)s.type==="css"&&n.push({pattern:s.path,priority:0});n.push({pattern:t.path,priority:0});for await(let s of $tt(t,r.features))n.push(s);for(let s of t.entries)s.type==="css"&&n.push({pattern:Zi(us.join(us.dirname(s.path),"**")),priority:2});return n.push({pattern:Zi(us.join(us.dirname(t.path),"**")),priority:3}),n.push({pattern:Zi(us.join(t.packageRoot,"**")),priority:4}),n.sort((s,i)=>s.priority-i.priority),n=n.filter(({pattern:s},i,o)=>o.findIndex(({pattern:a})=>a===s)===i),{config:t,folder:this.base,isUserConfigured:!1,configPath:t.path,documentSelector:n,tailwind:r}}async findConfigs(){let t=await(0,mce.default)([`**/${ed}`,`**/${pu}`],{cwd:this.base,ignore:this.settings.tailwindCSS.files.exclude,onlyFiles:!0,absolute:!0,suppressErrors:!0,dot:!0,concurrency:Math.max(hce.cpus().length,1)}),r=await Promise.all(t.map(d=>S1.realpath(d)));t=t.filter((d,f)=>{let h=r[f];return d===h?!0:!t.includes(h)}),t=t.map(d=>Zi(d)),t=Array.from(new Set(t)).sort();let n=new Rb,s=(0,_ce.default)(`**/${pu}`,{dot:!0}),i=t.map(d=>s(d)?new Ub("css",d):new Ub("js",d,[n.remember(d,()=>({source:"js",type:"js",path:d,entries:[],packageRoot:null,content:[]}))])),o=i.filter(d=>d.type==="css");await Promise.all(o.map(d=>d.read()));let a=[];for(let d of o){if(!d.content||!d.isMaybeTailwindRelated())continue;let f=d.configPathInCss();f&&(d.content=null,d.configs.push(n.remember(f,()=>({source:"css",type:"js",path:f,entries:[],packageRoot:null,content:[]})))),a.push(d)}await Promise.all(a.map(d=>d.resolveImports())),await Promise.all(a.map(d=>d.resolveRealpaths())),await Promise.all(a.map(d=>d.resolveSourceDirectives()));let u=new Ob,c=null,H=null,l=null;for(let d of a){u.add(d.realpath,d);for(let f of d.deps)u.add(f.realpath,f),u.connect(d.realpath,f.realpath);d.realpath.includes("node_modules/tailwindcss/index.css")?c=d.realpath:d.realpath.includes("node_modules/tailwindcss/theme.css")?H=d.realpath:d.realpath.includes("node_modules/tailwindcss/utilities.css")&&(l=d.realpath)}c&&H&&u.connect(c,H),c&&l&&u.connect(c,l);for(let d of u.roots()){let f=n.remember(d.path,()=>({source:"css",type:"css",path:d.path,entries:[],packageRoot:null,content:[{kind:"auto"}]}));d.configs.push(f);for(let h of u.descendants(d.realpath))h.configs.push(f)}for(let d of i)for(let f of d.configs)f.entries.push(d);return Array.from(n.values())}async detectTailwindVersion(t){try{let s=Gr(us.dirname(t.path),"tailwindcss/package.json"),{version:i}=require(s),o=iE(i);if(typeof i=="string")return{version:i,features:o,isDefaultVersion:!1}}catch{}let{version:r}=NE(),n=iE(r);return{version:r,features:n,isDefaultVersion:!0}}};function $tt(e,t,r){if(e.type==="css")return xtt(e);if(e.type==="js")return Dtt(e,t,r)}async function*Dtt(e,t,r){let n;try{n=r??require(e.path)}catch{return}let s=n.content?.files??n.content,i=Array.isArray(s)?s:[],a=(t.includes("relative-content-paths")?n.future?.relativeContentPathsByDefault||n.content?.relative:!1)?us.dirname(e.path):e.packageRoot;for(let u of i){if(typeof u!="string")continue;let c=u.startsWith("!")?`!${us.resolve(a,u.slice(1))}`:us.resolve(a,u);yield{pattern:Zi(c),priority:1}}}async function*xtt(e){let t=!1;for(let r of e.content)if(r.kind==="file")yield{pattern:Zi(r.file),priority:1};else if(r.kind==="auto"&&!t){t=!0;let n=e.entries.flatMap(s=>s.sources);for await(let s of Ctt(e.packageRoot,e.path,n))yield{pattern:s,priority:1}}}async function*Ctt(e,t,r){try{let n=Gr(us.dirname(e),"@tailwindcss/oxide");n=id(n).href;let s=Gr(us.dirname(e),"@tailwindcss/oxide/package.json"),i=JSON.parse(await S1.readFile(s,"utf8")),o=await fce({oxidePath:n,oxideVersion:i.version,basePath:e,sources:r.map(a=>({base:us.dirname(t),pattern:a}))});if(!o)return;for(let a of o.files)yield Zi(a);for(let{base:a,pattern:u}of o.globs)yield Zi(a)+"/"+u}catch{}}var Ub=class e{constructor(t,r,n=[]){this.type=t;this.path=r;this.configs=n;this.deps=[];this.sources=[]}async read(){try{this.content=await ip(this.path)}catch{this.content=null}}async resolveImports(){try{let t=await yI().process(this.content,{from:this.path}),r=t.messages.filter(n=>n.type==="dependency");this.deps=r.map(n=>new e("css",Zi(n.file))),this.content=t.css}catch{}}async resolveRealpaths(){this.realpath=Zi(await S1.realpath(this.path)),await Promise.all(this.deps.map(t=>t.resolveRealpaths()))}async resolveSourceDirectives(){try{if(this.sources.length>0)return;await Va([XQ(this.sources)]).process(this.content,{from:this.realpath})}catch{}}configPathInCss(){if(!this.content)return null;let t=this.content.match(/@config\s*(?<config>'[^']+'|"[^"]+")/);return t?Zi(us.resolve(us.dirname(this.path),t.groups.config.slice(1,-1))):null}isMaybeTailwindRelated(){if(!this.content)return!1;let t=/@import\s*('[^']+'|"[^"]+");/,r=/@tailwind\s*[^;]+;/,n=/@(theme|plugin|config|utility|variant|apply)\s*[^;{]+[;{]/;return t.test(this.content)||r.test(this.content)||n.test(this.content)}};var ope=['"',"'","`"," ",".","(","[","]","!","/","-"];async function Hpe(e){let t=await ip(e);if(!t)return null;let r=t.match(/@config\s*(?<config>'[^']+'|"[^"]+")/);return r?Us((0,ih.default)(No.resolve(No.dirname(e),r.groups.config.slice(1,-1)))):null}var eS=class{constructor(t){this.connection=t;this.lspHandlersAdded=!1;this.disposables=[];this.watchPatterns=()=>{};this.watched=[];this.documentService=new vg(this.connection),this.projects=new Map,this.projectCounter=0,this.settingsCache=Due(t)}async init(){this.initPromise||(this.initPromise=this._init()),await this.initPromise}getWorkspaceFolders(){return this.initializeParams.workspaceFolders?.length?this.initializeParams.workspaceFolders.map(t=>({uri:Kl.URI.parse(t.uri).fsPath,name:t.name})):this.initializeParams.rootUri?[{uri:Kl.URI.parse(this.initializeParams.rootUri).fsPath,name:"Root"}]:this.initializeParams.rootPath?[{uri:Kl.URI.file(this.initializeParams.rootPath).fsPath,name:"Root"}]:[]}async _init(){zh();let t=this.getWorkspaceFolders().map(n=>(0,ih.default)(n.uri));if(t.length===0){console.error("No workspace folders found, not initializing.");return}let r=await Promise.allSettled(t.map(n=>this._initFolder(Kl.URI.file(n))));for(let[n,s]of r.entries())s.status==="rejected"&&console.error("Failed to initialize workspace folder",t[n],s.reason);await this.listenForEvents()}async _initFolder(t){let r=this.initializeParams.initializationOptions?.userLanguages??{};Object.keys(r).length>0&&console.warn("Language mappings are currently set via initialization options (`userLanguages`). This is deprecated and will be removed in a future release. Please use the `tailwindCSS.includeLanguages` setting instead.");let n=t.fsPath,s=[],i=await this.settingsCache.get(),o=i.tailwindCSS.files.exclude,a=await this.settingsCache.get(t.toString()),u={...r,...a.tailwindCSS.includeLanguages??{}},c=new Map,H=new Map,l=this.initializeParams.initializationOptions?.workspaceFile?No.dirname(this.initializeParams.initializationOptions.workspaceFile):n;function d(b){function D(I){return Us((0,ih.default)(No.resolve(l,I)))}let v=b.experimental.configFile,x={};if(typeof v=="string"){let I=D(v),P=[D(No.resolve(n,"**"))];x[I]=P}else if(xH(v))for(let[I,P]of Object.entries(v)){if(typeof I!="string")return null;I=D(I);let S;if(typeof P=="string")S=[D(P)];else if(Array.isArray(P))S=P.map(D);else return null;x[I]=S}else if(v)return null;return Object.entries(x)}let f=d(i.tailwindCSS);if(f===null){console.error("Invalid `experimental.configFile` configuration, not initializing.");return}let h=new Bb(n,i);f.length>0?(console.log("Loading Tailwind CSS projects from the workspace settings."),s=await h.loadAllFromWorkspace(f)):(console.log("Searching for Tailwind CSS projects in the workspace's folders."),s=await h.search());for(let b of s)if(H.set(b.config.path,b.tailwind.version),b.config.source==="css")for(let D of b.config.entries)D.type==="css"&&c.set(D.path,b.config.path);let m=s.map(b=>({folder:b.folder,config:b.config.path,selectors:b.documentSelector,user:b.isUserConfigured,tailwind:b.tailwind}));console.log(`[Global] Creating projects: ${JSON.stringify(m)}`);let A=async b=>{let D=!1,v=!1,x=(0,Gl.default)(`**/${td}`,{dot:!0}),I=(0,Gl.default)(`**/${pu}`,{dot:!0}),P=(0,Gl.default)(`**/${ed}`,{dot:!0});e:for(let S of b){let T=(0,ih.default)(S.file);T=Us(T);for(let O of o)if((0,Gl.default)(O,{dot:!0})(T))continue e;if(x(T))for(let[,O]of this.projects){let F=NE().version;try{let B=require(Gr(No.dirname(O.projectConfig.configPath),"tailwindcss/package.json")).version;typeof B=="string"&&(F=B)}catch{}if(H.get(O.projectConfig.configPath)!==F){D=!0;break e}}for(let[,O]of this.projects){if(!O.state.v4)continue;let F=[O.projectConfig.configPath,...O.projectConfig.config.entries.map(B=>B.path)];if(nd(T,F)){v=!0;break e}}if(I(`**/${pu}`)&&S.type!==Kn.FileChangeType.Deleted){let O=await Hpe(T)||await Hpe(S.file);if(c.has(T)&&c.get(T)!==O){D=!0;break}else if(!c.has(T)&&O){D=!0;break}}if(P(T)&&S.type===Kn.FileChangeType.Created){D=!0;break}for(let[,O]of this.projects)if(S.type===Kn.FileChangeType.Deleted&&nd(T,[O.projectConfig.configPath])){D=!0;break e}}if(D){this.restart();return}if(v){try{await this.softRestart()}catch{this.restart()}return}for(let[,S]of this.projects)S.onFileEvents(b)};if(this.initializeParams.capabilities.workspace?.didChangeWatchedFiles?.dynamicRegistration){this.disposables.push(this.connection.onDidChangeWatchedFiles(async({changes:D})=>{let v=D.map(({uri:x,type:I})=>({file:Kl.URI.parse(x).fsPath,type:I})).filter((x,I,P)=>P.findIndex(S=>S.file===x.file&&S.type===x.type)===I);await A(v)}));let b=await this.connection.client.register(Kn.DidChangeWatchedFilesNotification.type,{watchers:[{globPattern:`**/${ed}`},{globPattern:`**/${td}`},{globPattern:`**/${pu}`}]});this.disposables.push(b),this.watchPatterns=D=>{let v=this.filterNewWatchPatterns(D);v.length&&(console.log(`[Global] Adding watch patterns: ${v.join(", ")}`),this.connection.client.register(Kn.DidChangeWatchedFilesNotification.type,{watchers:v.map(x=>({globPattern:x}))}).then(x=>{this.disposables.push(x)}))}}else if(tS.getBinding()){let b={create:Kn.FileChangeType.Created,update:Kn.FileChangeType.Changed,delete:Kn.FileChangeType.Deleted},D=await tS.subscribe(n,(v,x)=>{A(x.map(I=>({file:I.path,type:b[I.type]})))},{ignore:o.map(v=>No.resolve(n,v.replace(/^[*/]+/,"").replace(/[*/]+$/,"")))});this.disposables.push({dispose(){D.unsubscribe()}})}else{let b=ape().watch,D=b([`**/${ed}`,`**/${td}`,`**/${pu}`],{cwd:n,ignorePermissionErrors:!0,ignoreInitial:!0,ignored:o,awaitWriteFinish:{stabilityThreshold:100,pollInterval:20}});await new Promise(v=>{D.on("ready",()=>v())}),D.on("add",v=>A([{file:No.resolve(n,v),type:Kn.FileChangeType.Created}])).on("change",v=>A([{file:No.resolve(n,v),type:Kn.FileChangeType.Changed}])).on("unlink",v=>A([{file:No.resolve(n,v),type:Kn.FileChangeType.Deleted}])),this.disposables.push({dispose(){D.close()}}),this.watchPatterns=v=>{let x=this.filterNewWatchPatterns(v);x.length&&(console.log(`[Global] Adding watch patterns: ${x.join(", ")}`),D.add(x))}}console.log("[Global] Preparing projects..."),await Promise.all(s.map(b=>this.addProject(b,this.initializeParams,this.watchPatterns,H.get(b.configPath),u))),console.log("[Global] Initializing projects...");let g=[],_=0;for(let b of this.documentService.getAllDocuments()){let D=this.getProject(b);D&&!D.enabled()&&(D.enable(),await D.tryInit(),_++),g.push(b.uri)}console.log(`[Global] Initialized ${_} projects`),this.setupLSPHandlers(),this.disposables.push(this.connection.onDidChangeConfiguration(async({settings:b})=>{let D=i.tailwindCSS.files.exclude;if(this.settingsCache.clear(),i=await this.settingsCache.get(),!io(D,i.tailwindCSS.files.exclude)){this.restart();return}for(let[,v]of this.projects)v.onUpdateSettings(b)})),(this.initializeParams.initializationOptions?.testMode??!1)&&(console.log("[Global][Test] Sending document notifications..."),await Promise.all(g.map(b=>this.connection.sendNotification("@/tailwindCSS/documentReady",{uri:b}))))}async listenForEvents(){let t=this.initializeParams.initializationOptions?.testMode??!1;this.disposables.push(this.connection.onShutdown(()=>{this.dispose()})),this.disposables.push(this.documentService.onDidChangeContent(r=>{this.getProject(r.document)?.provideDiagnostics(r.document)})),this.disposables.push(this.documentService.onDidOpen(async r=>{let n=this.getProject(r.document);n&&(n.enabled()||(n.enable(),await n.tryInit()),t&&await this.connection.sendNotification("@/tailwindCSS/documentReady",{uri:r.document.uri}))})),this.initializeParams.capabilities.workspace.workspaceFolders&&this.disposables.push(this.connection.workspace.onDidChangeWorkspaceFolders(async r=>{let n=r.added.map(s=>({uri:Kl.URI.parse(s.uri).fsPath,name:s.name})).map(s=>(0,ih.default)(s.uri));await Promise.allSettled(n.map(s=>this._initFolder(Kl.URI.file(s))))}))}filterNewWatchPatterns(t){return t=Array.from(new Set(t)),t=t.filter(r=>!this.watched.includes(r)),this.watched.push(...t),t}async addProject(t,r,n,s,i){let o=String(this.projectCounter++),a=await bue(o,t,this.connection,r,this.documentService,()=>this.updateCapabilities(),()=>{for(let u of this.documentService.getAllDocuments()){let c=this.getProject(u);if(c&&!c.enabled()){c.enable(),c.tryInit();break}}},()=>this.refreshDiagnostics(),u=>n(u),s,this.settingsCache.get,i);this.projects.set(o,a),this.supportsTailwindProjectDetails&&this.connection.sendNotification("@/tailwindCSS/projectDetails",{config:t.configPath,tailwind:t.tailwind})}get supportsTailwindProjectDetails(){return this.initializeParams.capabilities.experimental?.tailwind?.projectDetails??!1}refreshDiagnostics(){for(let t of this.documentService.getAllDocuments()){let r=this.getProject(t);r?r.provideDiagnosticsForce(t):this.connection.sendDiagnostics({uri:t.uri,diagnostics:[]})}}setupLSPHandlers(){this.lspHandlersAdded||(this.lspHandlersAdded=!0,this.connection.onHover(this.onHover.bind(this)),this.connection.onCompletion(this.onCompletion.bind(this)),this.connection.onCompletionResolve(this.onCompletionResolve.bind(this)),this.connection.onDocumentColor(this.onDocumentColor.bind(this)),this.connection.onColorPresentation(this.onColorPresentation.bind(this)),this.connection.onCodeAction(this.onCodeAction.bind(this)),this.connection.onDocumentLinks(this.onDocumentLinks.bind(this)),this.connection.onRequest(this.onRequest.bind(this)))}onRequest(t,r){if(t==="@/tailwindCSS/sortSelection"){let n=this.getProject({uri:r.uri});if(!n)return{error:"no-project"};try{return{classLists:n.sortClassLists(r.classLists)}}catch{return{error:"unknown"}}}if(t==="@/tailwindCSS/getProject"){let n=this.getProject({uri:r.uri});return!n||!n.enabled()||!n.state?.enabled?null:{version:n.state.version}}}updateCapabilities(){if(!lpe(this.initializeParams))return;this.registrations&&this.registrations.then(n=>n.dispose());let t=Array.from(this.projects.values()),r=Kn.BulkRegistration.create();r.add(Kn.HoverRequest.type,{documentSelector:null}),r.add(Kn.DocumentColorRequest.type,{documentSelector:null}),r.add(Kn.CodeActionRequest.type,{documentSelector:null}),r.add(Kn.DocumentLinkRequest.type,{documentSelector:null}),r.add(Kn.CompletionRequest.type,{documentSelector:null,resolveProvider:!0,triggerCharacters:[...ope,...t.map(n=>n.state.separator).filter(n=>typeof n=="string").map(n=>n.slice(-1))].filter(Boolean)}),this.registrations=this.connection.client.register(r)}getProject(t){let r,n,s=1/0,i=Kl.URI.parse(t.uri),o=i.fsPath,a=i.path;o=Us(o);for(let c of this.projects.values()){if(!c.projectConfig.configPath){r=r??c;continue}let H=c.documentSelector().concat().sort((l,d)=>l.pattern.startsWith("!")&&!d.pattern.startsWith("!")?-1:!l.pattern.startsWith("!")&&d.pattern.startsWith("!")?1:0);for(let l of H){let d=l.pattern.replace(/[\[\]{}()]/g,f=>`\\${f}`);if(d.startsWith("!")&&((0,Gl.default)(d.slice(1),{dot:!0})(o)||(0,Gl.default)(d.slice(1),{dot:!0})(a)))break;if((0,Gl.default)(d,{dot:!0})(o)&&l.priority<s){n=c,s=l.priority;continue}if((0,Gl.default)(d,{dot:!0})(a)&&l.priority<s){n=c,s=l.priority;continue}}}let u=n??r;return u||console.debug("[GLOBAL] No matching project for document",{fsPath:o,normalPath:a}),u}async onDocumentColor(t){return await this.init(),this.getProject(t.textDocument)?.onDocumentColor(t)??[]}async onColorPresentation(t){return await this.init(),this.getProject(t.textDocument)?.onColorPresentation(t)??[]}async onHover(t){return await this.init(),this.getProject(t.textDocument)?.onHover(t)??null}async onCompletion(t){return await this.init(),this.getProject(t.textDocument)?.onCompletion(t)??null}async onCompletionResolve(t){return await this.init(),this.projects.get(t.data?._projectKey)?.onCompletionResolve(t)??null}async onCodeAction(t){return await this.init(),this.getProject(t.textDocument)?.onCodeAction(t)??null}async onDocumentLinks(t){return await this.init(),this.getProject(t.textDocument)?.onDocumentLinks(t)??null}setup(){this.connection.onInitialize(async t=>(this.initializeParams=t,lpe(t)?{capabilities:{textDocumentSync:Kn.TextDocumentSyncKind.Full}}:(this.setupLSPHandlers(),{capabilities:{textDocumentSync:Kn.TextDocumentSyncKind.Full,hoverProvider:!0,colorProvider:!0,codeActionProvider:!0,documentLinkProvider:{},completionProvider:{resolveProvider:!0,triggerCharacters:[...ope,":"]}}}))),this.connection.onInitialized(()=>this.init())}listen(){this.connection.listen()}dispose(){this.connection.sendNotification("@/tailwindCSS/projectsDestroyed");for(let[,t]of this.projects)t.dispose();this.projects=new Map,this.refreshDiagnostics(),this.registrations&&(this.registrations.then(t=>t.dispose()),this.registrations=void 0),this.disposables.forEach(t=>t.dispose()),this.disposables.length=0,this.watched.length=0}restart(){console.log(`----------
|
1294
|
+
`),{from:void 0})}catch(Z){throw Z}finally{B?.unhook()}g.dependencies=dI(g.configPath),u((g.dependencies??[]).flatMap(Z=>$b(Z,t.folder))),g.configId=fue(g.configPath,g.dependencies),g.plugins=await XQe(O),C&&(g.classNames=await Gq(C.root)),g.variants=VQe(g);let K=(0,EH.default)(g.config,"theme.screens",(0,EH.default)(g.config,"screens",{}));g.screens=xH(K)?Object.keys(K):[],g.enabled=!0,a(),i()}return{projectConfig:t,enabled(){return d},enable(){d=!0},async reload(){if(!g.v4)return;console.log("---- RELOADING DESIGN SYSTEM ----");let P=await ip(g.configPath),S=await Dk(g.modules.tailwindcss.module,g.configPath,P),T=Object.create(g,{designSystem:{value:S}}),k=S.getClassList().map(N=>[N[0],{...N[1],color:Io(T,N[0])}]);g.designSystem=S,g.classList=k,console.log("---- RELOADED ----")},state:g,documentSelector(){return m},tryInit:D,async dispose(){g={enabled:!1};for(let P of h)(await P).dispose()},async onUpdateSettings(P){g.enabled&&a(),P.editor?.colorDecorators?i():r.sendNotification("@/tailwindCSS/clearColors")},onFileEvents:L,async onHover(P){return rd(async()=>{if(!g.enabled)return null;let S=s.getDocument(P.textDocument.uri);return!S||!(await g.editor.getConfiguration(S.uri)).tailwindCSS.hovers||await Ru(g,S)?null:UJ(g,S,P.position)},null)},async onCompletion(P){return rd(async()=>{if(!g.enabled)return null;let S=s.getDocument(P.textDocument.uri);return!S||!(await g.editor.getConfiguration(S.uri)).tailwindCSS.suggestions||await Ru(g,S)?null:ZJ(g,S,P.position,P.context)},null)},onCompletionResolve(P){return rd(()=>g.enabled?zJ(g,P):null,null)},async onCodeAction(P){return rd(async()=>{if(!g.enabled)return null;let S=s.getDocument(P.textDocument.uri);return!S||!(await g.editor.getConfiguration(S.uri)).tailwindCSS.codeActions?null:AY(g,P,S)},null)},onDocumentLinks(P){if(!g.enabled)return null;let S=s.getDocument(P.textDocument.uri);return S?vY(g,S,T=>w9.URI.file(jn.resolve(jn.dirname(w9.URI.parse(S.uri).fsPath),T)).toString()):null},provideDiagnostics:(0,gue.debounce)(P=>{g.enabled&&uk(g,P)},n.initializationOptions?.testMode?0:500),provideDiagnosticsForce:P=>{g.enabled&&uk(g,P)},async onDocumentColor(P){return rd(async()=>{if(!g.enabled)return[];let S=s.getDocument(P.textDocument.uri);return S?await Ru(g,S)?null:SY(g,S):[]},null)},async onColorPresentation(P){let S=s.getDocument(P.textDocument.uri);if(!S)return[];let T=S.getText(P.range),k=T.match(new RegExp(`-\\[(${due.join("|")}|(?:(?:#|rgba?\\(|hsla?\\())[^\\]]+)\\]$`,"i"));if(k===null)return[];let N=k[1],R=due.includes(N),O={mode:"rgb",r:P.color.red,g:P.color.green,b:P.color.blue,alpha:P.color.alpha},F=D_(O);if(!R&&(N.length===4||N.length===5)){let[,...C]=F.match(/^#([a-f\d])\1([a-f\d])\2([a-f\d])\3(?:([a-f\d])\4)?$/i)??[];C.length&&(F=`#${C.filter(Boolean).join("")}`)}F.length===5?F=F.replace(/f$/,""):F.length===9&&(F=F.replace(/ff$/,""));let B=T.substr(0,k.index);return[F,Fd(O).replace(/ /g,""),ow(O).replace(/ /g,"").replace(/\d+\.\d+(%?)/g,(C,K)=>`${Math.round(parseFloat(C))}${K}`)].map(C=>({label:`${B}-[${C}]`}))},sortClassLists(P){return g.jit?P.map(S=>{let T="",k=S.split(/(\s+)/),N=k.filter((F,B)=>B%2===0),R=k.filter((F,B)=>B%2!==0);N[N.length-1]===""&&N.pop();let O;g.v4?O=g.designSystem.getClassOrder(N):g.jitContext.getClassOrder?O=g.jitContext.getClassOrder(N):O=UQe(g,N),N=O.sort(([,F],[,B])=>F===B?0:F===null?-1:B===null?1:Bd(F-B)).map(([F])=>F);for(let F=0;F<N.length;F++)T+=`${N[F]}${R[F]??""}`;return T}):P}}}function hue(e,t){let r=e.config.prefix;return typeof r=="function"?r(t):r+t}function UQe(e,t){let r=new Set([hue(e,"group"),hue(e,"peer")]),n=[];for(let s of t){let i=e.modules.jit.generateRules.module(new Set([s]),e.jitContext).sort(([o],[a])=>Bd(a-o))[0]?.[0]??null;i===null&&r.has(s)&&(i=e.jitContext.layerOrder.components),n.push([s,i])}return n}function jQe(e,t,r={}){let n=t.config,s=t.modules.postcss.module,i=t.browserslist,o=i&&i.includes("ie 11")?"ie11":"relaxed",a=typeof e=="function"?e:e.handler;try{a({addUtilities:()=>{},addComponents:()=>{},addBase:()=>{},matchUtilities:()=>{},addVariant:()=>{},e:u=>u,prefix:u=>u,theme:(u,c)=>(0,EH.default)(n,`theme.${u}`,c),variants:()=>[],config:(u,c)=>(0,EH.default)(n,u,c),corePlugins:u=>Array.isArray(n.corePlugins)?n.corePlugins.includes(u):(0,EH.default)(n,`corePlugins.${u}`,!0),target:u=>{if(typeof n.target=="string")return n.target==="browserslist"?o:n.target;let[c,H]=(0,EH.default)(n,"target"),l=(0,EH.default)(H,u,c);return l==="browserslist"?o:l},postcss:s,...r})}catch{}}function WQe(e){return e.type==="atrule"}function VQe(e){if(e.v4)return e.designSystem.getVariants();if(e.jitContext?.getVariants)return e.jitContext.getVariants();if(e.jit){let i=[];return Array.from(e.jitContext.variantMap).forEach(([o,a])=>{i.push({name:o,values:[],isArbitrary:!1,hasDash:!0,selectors:()=>{function u(A){let g=e.modules.postcssSelectorParser.module.className();return g.value=A,(0,EH.default)(g,"raws.value",g.value)}let c=(Array.isArray(a[0])?a:[a]).map(([A,g])=>g),H="__variant_placeholder__",l=e.modules.postcss.module.root({nodes:[e.modules.postcss.module.rule({selector:`.${u(H)}`,nodes:[]})]}),d=e.modules.postcssSelectorParser.module(A=>A.first.filter(({type:g})=>g==="class").pop().value);function f(A){return d.transformSync(A)}function h(A){return l.each(g=>{g.type==="rule"&&(g.selectors=g.selectors.map(_=>A({get className(){return f(_)},selector:_})))}),l}let m=[];for(let A of c){let g,_=l.clone(),L=_j(()=>A({container:_,separator:e.separator,modifySelectors:h,format:b=>{g=b.replace(/:merge\(([^)]+)\)/g,"$1")},wrap:b=>{WQe(b)&&(g=`@${b.name} ${b.params}`)}}));if(g||(g=L),g){m.push(g);continue}_.walkDecls(b=>{b.remove()}),g=_.toString().replace(`.${u(`${o}:${H}`)}`,"&").replace(/(?<!\\)[{}]/g,"").replace(/\s*\n\s*/g," ").trim(),g.includes(H)||m.push(g)}return m}})}),i}let t=e.config,r=e.modules.tailwindcss.version,n=["responsive","hover"];return Dr(r,"0.3.0")&&n.push("focus","group-hover"),Dr(r,"0.5.0")&&n.push("active"),Dr(r,"0.7.0")&&n.push("focus-within"),Dr(r,"1.0.0-beta.1")&&n.push("default"),Dr(r,"1.1.0")&&n.push("first","last","odd","even","disabled","visited"),Dr(r,"1.3.0")&&n.push("group-focus"),Dr(r,"1.5.0")&&n.push("focus-visible","checked"),Dr(r,"1.6.0")&&n.push("motion-safe","motion-reduce"),Dr(r,"2.0.0-alpha.1")&&n.push("dark"),(Array.isArray(t.plugins)?t.plugins:[]).forEach(i=>{jQe(i,e,{addVariant:o=>{n.push(o)}})}),n.map(i=>({name:i,values:[],isArbitrary:!1,hasDash:!0,selectors:()=>[]}))}async function XQe(e){let t=e.plugins;return Array.isArray(t)?Promise.all(t.map(async r=>{let n=r.config;xH(n)||(n={});let s={theme:xH(n.theme)?Object.keys(n.theme):[],variants:xH(n.variants)?Object.keys(n.variants):[]},i=r.handler||r,o=typeof i.name=="string"&&i.name!=="handler"&&i.name!==""?i.name:null;try{i()}catch(a){let u=yue.default.parse(a);if(u.length===0)return{name:o};let c=u[0].fileName,H=jn.dirname(c);if(!Eue.default.sync({cwd:H}))return{name:o};let d;try{d=require(d)}catch{return{name:o}}if(d.name&&jn.resolve(H,d.main||"index.js")===c)return{name:d.name,homepage:d.homepage,contributes:s}}return{name:o}})):[]}function qQe(e,t){try{let r=ac.default.sync(n=>{let s=jn.join(n,"package.json");if(ac.default.sync.exists(s))return s;if(n===jn.normalize(t))return ac.default.stop},{cwd:e});return r?jn.dirname(r):t}catch{return t}}function mue(e,t,r,n){let s=n??require(e),i=s.content?.files??s.content,o=Array.isArray(i)?i:[],a=Dr(t,"3.2.0")?s.future?.relativeContentPathsByDefault||s.content?.relative:!1,u;return a?u=jn.dirname(e):u=qQe(jn.dirname(e),r),o.filter(c=>typeof c=="string").map(c=>c.startsWith("!")?`!${jn.resolve(u,c.slice(1))}`:jn.resolve(u,c)).map(c=>({pattern:Us(Zi(c)),priority:1}))}var $ue=Kt(Pue());function aet(){return{editor:{tabSize:2},tailwindCSS:{emmetCompletions:!1,classAttributes:["class","className","ngClass","class:list"],codeActions:!0,hovers:!0,suggestions:!0,validate:!0,colorDecorators:!0,rootFontSize:16,lint:{cssConflict:"warning",invalidApply:"error",invalidScreen:"error",invalidVariant:"error",invalidConfigPath:"error",invalidTailwindDirective:"error",recommendedVariantOrder:"warning"},showPixelEquivalents:!0,includeLanguages:{},files:{exclude:["**/.git/**","**/node_modules/**","**/.hg/**","**/.svn/**"]},experimental:{classRegex:[],configFile:null}}}}function Due(e){let t=new Map;async function r(s){let i=t.get(s);return i||(i=await n(s),t.set(s,i)),i}async function n(s){let[i,o]=await Promise.all([e.workspace.getConfiguration({section:"editor",scopeUri:s}),e.workspace.getConfiguration({section:"tailwindCSS",scopeUri:s})]);return i=xH(i)?i:{},o=xH(o)?o:{},(0,$ue.default)(aet(),{editor:i,tailwindCSS:o},{arrayMerge:(a,u,c)=>u})}return{get:r,clear(){t.clear()}}}var hce=Kt(require("node:os")),us=Kt(require("node:path")),S1=Kt(require("node:fs/promises")),mce=Kt(dce()),_ce=Kt(Zh());var Ob=class{constructor(){this.parents=new Map;this.children=new Map;this.nodes=new Map}add(t,r){return this.nodes.has(t)?this.nodes.get(t):(this.nodes.set(t,r),this.parents.set(t,new Set),this.children.set(t,new Set),r)}connect(t,r){let n=this.children.get(t);if(!n)throw new Error(`Node ${t} does not exist`);let s=this.parents.get(r);if(!s)throw new Error(`Node ${r} does not exist`);s.add(t),n.add(r)}*descendants(t){let r=[],n=new Set;for(let s of this.children.get(t))r.push(s);for(;r.length>0;){let s=r.shift();if(!n.has(s)){yield this.nodes.get(s),n.add(s);for(let i of this.children.get(s))r.push(i)}}}*roots(){for(let[t,r]of this.parents)r.size===0&&(yield this.nodes.get(t))}*leaves(){for(let[t,r]of this.children)r.size===0&&(yield this.nodes.get(t))}};var Rb=class extends Map{remember(t,r){let n=super.get(t);return n||(n=r(t),this.set(t,n)),n}};var Fb=Kt(FP()),eh=Kt(require("node:path"));async function h8(e,t){async function r(n){let s=eh.join(n,"package.json");if(await Fb.default.exists(s))return s;if(n===eh.normalize(t))return Fb.default.stop}try{let n=await(0,Fb.default)(r,{cwd:e});return n?eh.dirname(n):t}catch{return t}}async function Ttt(e){let t=await import(e);return t.scanDir?t:null}async function fce(e){let t=await Ttt(e.oxidePath);if(!t)return null;if(Fc(e.oxideVersion,"4.0.0-alpha.18")){let n=t.scanDir?.({base:e.basePath,globs:!0});return{files:n.files,globs:n.globs.map(s=>({base:s.base,pattern:s.glob}))}}if(Fc(e.oxideVersion,"4.0.0-alpha.19")){let n=t.scanDir({base:e.basePath,sources:e.sources});return{files:n.files,globs:n.globs}}let r=new t.Scanner({detectSources:{base:e.basePath},sources:e.sources});return{files:r.files,globs:r.globs}}var Bb=class{constructor(t,r){this.base=t;this.settings=r}async search(){let t=await this.findConfigs(),r=await Promise.allSettled(t.map(s=>this.createProject(s))),n=[];for(let s of r)s.status==="rejected"?console.error(`[GLOBAL] Error creating project: ${s.reason}`):s.status==="fulfilled"&&s.value&&n.push(s.value);n.length===1&&n[0].documentSelector.push({pattern:Zi(us.join(this.base,"**")),priority:5});for(let s of n){s.folder=Us(s.folder),s.configPath=Us(s.configPath),s.config.path=Us(s.config.path);for(let i of s.config.entries)i.path=Us(i.path);for(let i of s.documentSelector)i.pattern=Us(i.pattern)}return n}async loadAllFromWorkspace(t){return Promise.all(t.map(r=>this.loadFromWorkspace(r[0],r[1])))}async loadFromWorkspace(t,r){let n={type:"js",path:t,source:"js",entries:[],content:[],packageRoot:""},s=await this.detectTailwindVersion(n);return n.packageRoot=await h8(us.dirname(n.path),this.base),{config:n,folder:this.base,isUserConfigured:!0,configPath:n.path,documentSelector:r.map(i=>({priority:0,pattern:i})),tailwind:s}}async createProject(t){let r=await this.detectTailwindVersion(t);if(console.log(JSON.stringify({tailwind:r})),t.type==="js"&&t.source==="css"&&(r.isDefaultVersion||!r.features.includes("css-at-config-as-project"))||t.type==="css"&&!r.features.includes("css-at-theme")||t.type==="js"&&r.features.includes("css-at-theme")||t.type==="js"&&(t.path.endsWith(".ts")||t.path.endsWith(".mjs"))&&!r.features.includes("transpiled-configs"))return null;t.packageRoot=await h8(us.dirname(t.path),this.base);let n=[];for(let s of t.entries)s.type==="css"&&n.push({pattern:s.path,priority:0});n.push({pattern:t.path,priority:0});for await(let s of $tt(t,r.features))n.push(s);for(let s of t.entries)s.type==="css"&&n.push({pattern:Zi(us.join(us.dirname(s.path),"**")),priority:2});return n.push({pattern:Zi(us.join(us.dirname(t.path),"**")),priority:3}),n.push({pattern:Zi(us.join(t.packageRoot,"**")),priority:4}),n.sort((s,i)=>s.priority-i.priority),n=n.filter(({pattern:s},i,o)=>o.findIndex(({pattern:a})=>a===s)===i),{config:t,folder:this.base,isUserConfigured:!1,configPath:t.path,documentSelector:n,tailwind:r}}async findConfigs(){let t=await(0,mce.default)([`**/${ed}`,`**/${pu}`],{cwd:this.base,ignore:this.settings.tailwindCSS.files.exclude,onlyFiles:!0,absolute:!0,suppressErrors:!0,dot:!0,concurrency:Math.max(hce.cpus().length,1)}),r=await Promise.all(t.map(d=>S1.realpath(d)));t=t.filter((d,f)=>{let h=r[f];return d===h?!0:!t.includes(h)}),t=t.map(d=>Zi(d)),t=Array.from(new Set(t)).sort();let n=new Rb,s=(0,_ce.default)(`**/${pu}`,{dot:!0}),i=t.map(d=>s(d)?new Ub("css",d):new Ub("js",d,[n.remember(d,()=>({source:"js",type:"js",path:d,entries:[],packageRoot:null,content:[]}))])),o=i.filter(d=>d.type==="css");await Promise.all(o.map(d=>d.read()));let a=[];for(let d of o){if(!d.content||!d.isMaybeTailwindRelated())continue;let f=d.configPathInCss();f&&(d.content=null,d.configs.push(n.remember(f,()=>({source:"css",type:"js",path:f,entries:[],packageRoot:null,content:[]})))),a.push(d)}await Promise.all(a.map(d=>d.resolveImports())),await Promise.all(a.map(d=>d.resolveRealpaths())),await Promise.all(a.map(d=>d.resolveSourceDirectives()));let u=new Ob,c=null,H=null,l=null;for(let d of a){u.add(d.realpath,d);for(let f of d.deps)u.add(f.realpath,f),u.connect(d.realpath,f.realpath);d.realpath.includes("node_modules/tailwindcss/index.css")?c=d.realpath:d.realpath.includes("node_modules/tailwindcss/theme.css")?H=d.realpath:d.realpath.includes("node_modules/tailwindcss/utilities.css")&&(l=d.realpath)}c&&H&&u.connect(c,H),c&&l&&u.connect(c,l);for(let d of u.roots()){let f=n.remember(d.path,()=>({source:"css",type:"css",path:d.path,entries:[],packageRoot:null,content:[{kind:"auto"}]}));d.configs.push(f);for(let h of u.descendants(d.realpath))h.configs.push(f)}for(let d of i)for(let f of d.configs)f.entries.push(d);return Array.from(n.values())}async detectTailwindVersion(t){try{let s=Gr(us.dirname(t.path),"tailwindcss/package.json"),{version:i}=require(s),o=iE(i);if(typeof i=="string")return{version:i,features:o,isDefaultVersion:!1}}catch{}let{version:r}=NE(),n=iE(r);return{version:r,features:n,isDefaultVersion:!0}}};function $tt(e,t,r){if(e.type==="css")return xtt(e);if(e.type==="js")return Dtt(e,t,r)}async function*Dtt(e,t,r){let n;try{n=r??require(e.path)}catch{return}let s=n.content?.files??n.content,i=Array.isArray(s)?s:[],a=(t.includes("relative-content-paths")?n.future?.relativeContentPathsByDefault||n.content?.relative:!1)?us.dirname(e.path):e.packageRoot;for(let u of i){if(typeof u!="string")continue;let c=u.startsWith("!")?`!${us.resolve(a,u.slice(1))}`:us.resolve(a,u);yield{pattern:Zi(c),priority:1}}}async function*xtt(e){let t=!1;for(let r of e.content)if(r.kind==="file")yield{pattern:Zi(r.file),priority:1};else if(r.kind==="auto"&&!t){t=!0;let n=e.entries.flatMap(s=>s.sources);for await(let s of Ctt(e.packageRoot,e.path,n))yield{pattern:s,priority:1}}}async function*Ctt(e,t,r){try{let n=Gr(us.dirname(e),"@tailwindcss/oxide");n=id(n).href;let s=Gr(us.dirname(e),"@tailwindcss/oxide/package.json"),i=JSON.parse(await S1.readFile(s,"utf8")),o=await fce({oxidePath:n,oxideVersion:i.version,basePath:e,sources:r.map(a=>({base:us.dirname(t),pattern:a}))});if(!o)return;for(let a of o.files)yield Zi(a);for(let{base:a,pattern:u}of o.globs)yield Zi(a)+"/"+u}catch{}}var Ub=class e{constructor(t,r,n=[]){this.type=t;this.path=r;this.configs=n;this.deps=[];this.sources=[]}async read(){try{this.content=await ip(this.path)}catch{this.content=null}}async resolveImports(){try{let t=await yI().process(this.content,{from:this.path}),r=t.messages.filter(n=>n.type==="dependency");this.deps=r.map(n=>new e("css",Zi(n.file))),this.content=t.css}catch{}}async resolveRealpaths(){this.realpath=Zi(await S1.realpath(this.path)),await Promise.all(this.deps.map(t=>t.resolveRealpaths()))}async resolveSourceDirectives(){try{if(this.sources.length>0)return;await Va([XQ(this.sources)]).process(this.content,{from:this.realpath})}catch{}}configPathInCss(){if(!this.content)return null;let t=this.content.match(/@config\s*(?<config>'[^']+'|"[^"]+")/);return t?Zi(us.resolve(us.dirname(this.path),t.groups.config.slice(1,-1))):null}isMaybeTailwindRelated(){if(!this.content)return!1;let t=/@import\s*['"]/,r=/@tailwind\s*[^;]+;/,n=/@(theme|plugin|config|utility|variant|apply)\s*[^;{]+[;{]/;return t.test(this.content)||r.test(this.content)||n.test(this.content)}};var ope=['"',"'","`"," ",".","(","[","]","!","/","-"];async function Hpe(e){let t=await ip(e);if(!t)return null;let r=t.match(/@config\s*(?<config>'[^']+'|"[^"]+")/);return r?Us((0,ih.default)(No.resolve(No.dirname(e),r.groups.config.slice(1,-1)))):null}var eS=class{constructor(t){this.connection=t;this.lspHandlersAdded=!1;this.disposables=[];this.watchPatterns=()=>{};this.watched=[];this.documentService=new vg(this.connection),this.projects=new Map,this.projectCounter=0,this.settingsCache=Due(t)}async init(){this.initPromise||(this.initPromise=this._init()),await this.initPromise}getWorkspaceFolders(){return this.initializeParams.workspaceFolders?.length?this.initializeParams.workspaceFolders.map(t=>({uri:Kl.URI.parse(t.uri).fsPath,name:t.name})):this.initializeParams.rootUri?[{uri:Kl.URI.parse(this.initializeParams.rootUri).fsPath,name:"Root"}]:this.initializeParams.rootPath?[{uri:Kl.URI.file(this.initializeParams.rootPath).fsPath,name:"Root"}]:[]}async _init(){zh();let t=this.getWorkspaceFolders().map(n=>(0,ih.default)(n.uri));if(t.length===0){console.error("No workspace folders found, not initializing.");return}let r=await Promise.allSettled(t.map(n=>this._initFolder(Kl.URI.file(n))));for(let[n,s]of r.entries())s.status==="rejected"&&console.error("Failed to initialize workspace folder",t[n],s.reason);await this.listenForEvents()}async _initFolder(t){let r=this.initializeParams.initializationOptions?.userLanguages??{};Object.keys(r).length>0&&console.warn("Language mappings are currently set via initialization options (`userLanguages`). This is deprecated and will be removed in a future release. Please use the `tailwindCSS.includeLanguages` setting instead.");let n=t.fsPath,s=[],i=await this.settingsCache.get(),o=i.tailwindCSS.files.exclude,a=await this.settingsCache.get(t.toString()),u={...r,...a.tailwindCSS.includeLanguages??{}},c=new Map,H=new Map,l=this.initializeParams.initializationOptions?.workspaceFile?No.dirname(this.initializeParams.initializationOptions.workspaceFile):n;function d(b){function D(I){return Us((0,ih.default)(No.resolve(l,I)))}let v=b.experimental.configFile,x={};if(typeof v=="string"){let I=D(v),P=[D(No.resolve(n,"**"))];x[I]=P}else if(xH(v))for(let[I,P]of Object.entries(v)){if(typeof I!="string")return null;I=D(I);let S;if(typeof P=="string")S=[D(P)];else if(Array.isArray(P))S=P.map(D);else return null;x[I]=S}else if(v)return null;return Object.entries(x)}let f=d(i.tailwindCSS);if(f===null){console.error("Invalid `experimental.configFile` configuration, not initializing.");return}let h=new Bb(n,i);f.length>0?(console.log("Loading Tailwind CSS projects from the workspace settings."),s=await h.loadAllFromWorkspace(f)):(console.log("Searching for Tailwind CSS projects in the workspace's folders."),s=await h.search());for(let b of s)if(H.set(b.config.path,b.tailwind.version),b.config.source==="css")for(let D of b.config.entries)D.type==="css"&&c.set(D.path,b.config.path);let m=s.map(b=>({folder:b.folder,config:b.config.path,selectors:b.documentSelector,user:b.isUserConfigured,tailwind:b.tailwind}));console.log(`[Global] Creating projects: ${JSON.stringify(m)}`);let A=async b=>{let D=!1,v=!1,x=(0,Gl.default)(`**/${td}`,{dot:!0}),I=(0,Gl.default)(`**/${pu}`,{dot:!0}),P=(0,Gl.default)(`**/${ed}`,{dot:!0});e:for(let S of b){let T=(0,ih.default)(S.file);T=Us(T);for(let O of o)if((0,Gl.default)(O,{dot:!0})(T))continue e;if(x(T))for(let[,O]of this.projects){let F=NE().version;try{let B=require(Gr(No.dirname(O.projectConfig.configPath),"tailwindcss/package.json")).version;typeof B=="string"&&(F=B)}catch{}if(H.get(O.projectConfig.configPath)!==F){D=!0;break e}}for(let[,O]of this.projects){if(!O.state.v4)continue;let F=[O.projectConfig.configPath,...O.projectConfig.config.entries.map(B=>B.path)];if(nd(T,F)){v=!0;break e}}if(I(`**/${pu}`)&&S.type!==Kn.FileChangeType.Deleted){let O=await Hpe(T)||await Hpe(S.file);if(c.has(T)&&c.get(T)!==O){D=!0;break}else if(!c.has(T)&&O){D=!0;break}}if(P(T)&&S.type===Kn.FileChangeType.Created){D=!0;break}for(let[,O]of this.projects)if(S.type===Kn.FileChangeType.Deleted&&nd(T,[O.projectConfig.configPath])){D=!0;break e}}if(D){this.restart();return}if(v){try{await this.softRestart()}catch{this.restart()}return}for(let[,S]of this.projects)S.onFileEvents(b)};if(this.initializeParams.capabilities.workspace?.didChangeWatchedFiles?.dynamicRegistration){this.disposables.push(this.connection.onDidChangeWatchedFiles(async({changes:D})=>{let v=D.map(({uri:x,type:I})=>({file:Kl.URI.parse(x).fsPath,type:I})).filter((x,I,P)=>P.findIndex(S=>S.file===x.file&&S.type===x.type)===I);await A(v)}));let b=await this.connection.client.register(Kn.DidChangeWatchedFilesNotification.type,{watchers:[{globPattern:`**/${ed}`},{globPattern:`**/${td}`},{globPattern:`**/${pu}`}]});this.disposables.push(b),this.watchPatterns=D=>{let v=this.filterNewWatchPatterns(D);v.length&&(console.log(`[Global] Adding watch patterns: ${v.join(", ")}`),this.connection.client.register(Kn.DidChangeWatchedFilesNotification.type,{watchers:v.map(x=>({globPattern:x}))}).then(x=>{this.disposables.push(x)}))}}else if(tS.getBinding()){let b={create:Kn.FileChangeType.Created,update:Kn.FileChangeType.Changed,delete:Kn.FileChangeType.Deleted},D=await tS.subscribe(n,(v,x)=>{A(x.map(I=>({file:I.path,type:b[I.type]})))},{ignore:o.map(v=>No.resolve(n,v.replace(/^[*/]+/,"").replace(/[*/]+$/,"")))});this.disposables.push({dispose(){D.unsubscribe()}})}else{let b=ape().watch,D=b([`**/${ed}`,`**/${td}`,`**/${pu}`],{cwd:n,ignorePermissionErrors:!0,ignoreInitial:!0,ignored:o,awaitWriteFinish:{stabilityThreshold:100,pollInterval:20}});await new Promise(v=>{D.on("ready",()=>v())}),D.on("add",v=>A([{file:No.resolve(n,v),type:Kn.FileChangeType.Created}])).on("change",v=>A([{file:No.resolve(n,v),type:Kn.FileChangeType.Changed}])).on("unlink",v=>A([{file:No.resolve(n,v),type:Kn.FileChangeType.Deleted}])),this.disposables.push({dispose(){D.close()}}),this.watchPatterns=v=>{let x=this.filterNewWatchPatterns(v);x.length&&(console.log(`[Global] Adding watch patterns: ${x.join(", ")}`),D.add(x))}}console.log("[Global] Preparing projects..."),await Promise.all(s.map(b=>this.addProject(b,this.initializeParams,this.watchPatterns,H.get(b.configPath),u))),console.log("[Global] Initializing projects...");let g=[],_=0;for(let b of this.documentService.getAllDocuments()){let D=this.getProject(b);D&&!D.enabled()&&(D.enable(),await D.tryInit(),_++),g.push(b.uri)}console.log(`[Global] Initialized ${_} projects`),this.setupLSPHandlers(),this.disposables.push(this.connection.onDidChangeConfiguration(async({settings:b})=>{let D=i.tailwindCSS.files.exclude;if(this.settingsCache.clear(),i=await this.settingsCache.get(),!io(D,i.tailwindCSS.files.exclude)){this.restart();return}for(let[,v]of this.projects)v.onUpdateSettings(b)})),(this.initializeParams.initializationOptions?.testMode??!1)&&(console.log("[Global][Test] Sending document notifications..."),await Promise.all(g.map(b=>this.connection.sendNotification("@/tailwindCSS/documentReady",{uri:b}))))}async listenForEvents(){let t=this.initializeParams.initializationOptions?.testMode??!1;this.disposables.push(this.connection.onShutdown(()=>{this.dispose()})),this.disposables.push(this.documentService.onDidChangeContent(r=>{this.getProject(r.document)?.provideDiagnostics(r.document)})),this.disposables.push(this.documentService.onDidOpen(async r=>{let n=this.getProject(r.document);n&&(n.enabled()||(n.enable(),await n.tryInit()),t&&await this.connection.sendNotification("@/tailwindCSS/documentReady",{uri:r.document.uri}))})),this.initializeParams.capabilities.workspace.workspaceFolders&&this.disposables.push(this.connection.workspace.onDidChangeWorkspaceFolders(async r=>{let n=r.added.map(s=>({uri:Kl.URI.parse(s.uri).fsPath,name:s.name})).map(s=>(0,ih.default)(s.uri));await Promise.allSettled(n.map(s=>this._initFolder(Kl.URI.file(s))))}))}filterNewWatchPatterns(t){return t=Array.from(new Set(t)),t=t.filter(r=>!this.watched.includes(r)),this.watched.push(...t),t}async addProject(t,r,n,s,i){let o=String(this.projectCounter++),a=await bue(o,t,this.connection,r,this.documentService,()=>this.updateCapabilities(),()=>{for(let u of this.documentService.getAllDocuments()){let c=this.getProject(u);if(c&&!c.enabled()){c.enable(),c.tryInit();break}}},()=>this.refreshDiagnostics(),u=>n(u),s,this.settingsCache.get,i);this.projects.set(o,a),this.supportsTailwindProjectDetails&&this.connection.sendNotification("@/tailwindCSS/projectDetails",{config:t.configPath,tailwind:t.tailwind})}get supportsTailwindProjectDetails(){return this.initializeParams.capabilities.experimental?.tailwind?.projectDetails??!1}refreshDiagnostics(){for(let t of this.documentService.getAllDocuments()){let r=this.getProject(t);r?r.provideDiagnosticsForce(t):this.connection.sendDiagnostics({uri:t.uri,diagnostics:[]})}}setupLSPHandlers(){this.lspHandlersAdded||(this.lspHandlersAdded=!0,this.connection.onHover(this.onHover.bind(this)),this.connection.onCompletion(this.onCompletion.bind(this)),this.connection.onCompletionResolve(this.onCompletionResolve.bind(this)),this.connection.onDocumentColor(this.onDocumentColor.bind(this)),this.connection.onColorPresentation(this.onColorPresentation.bind(this)),this.connection.onCodeAction(this.onCodeAction.bind(this)),this.connection.onDocumentLinks(this.onDocumentLinks.bind(this)),this.connection.onRequest(this.onRequest.bind(this)))}onRequest(t,r){if(t==="@/tailwindCSS/sortSelection"){let n=this.getProject({uri:r.uri});if(!n)return{error:"no-project"};try{return{classLists:n.sortClassLists(r.classLists)}}catch{return{error:"unknown"}}}if(t==="@/tailwindCSS/getProject"){let n=this.getProject({uri:r.uri});return!n||!n.enabled()||!n.state?.enabled?null:{version:n.state.version}}}updateCapabilities(){if(!lpe(this.initializeParams))return;this.registrations&&this.registrations.then(n=>n.dispose());let t=Array.from(this.projects.values()),r=Kn.BulkRegistration.create();r.add(Kn.HoverRequest.type,{documentSelector:null}),r.add(Kn.DocumentColorRequest.type,{documentSelector:null}),r.add(Kn.CodeActionRequest.type,{documentSelector:null}),r.add(Kn.DocumentLinkRequest.type,{documentSelector:null}),r.add(Kn.CompletionRequest.type,{documentSelector:null,resolveProvider:!0,triggerCharacters:[...ope,...t.map(n=>n.state.separator).filter(n=>typeof n=="string").map(n=>n.slice(-1))].filter(Boolean)}),this.registrations=this.connection.client.register(r)}getProject(t){let r,n,s=1/0,i=Kl.URI.parse(t.uri),o=i.fsPath,a=i.path;o=Us(o);for(let c of this.projects.values()){if(!c.projectConfig.configPath){r=r??c;continue}let H=c.documentSelector().concat().sort((l,d)=>l.pattern.startsWith("!")&&!d.pattern.startsWith("!")?-1:!l.pattern.startsWith("!")&&d.pattern.startsWith("!")?1:0);for(let l of H){let d=l.pattern.replace(/[\[\]{}()]/g,f=>`\\${f}`);if(d.startsWith("!")&&((0,Gl.default)(d.slice(1),{dot:!0})(o)||(0,Gl.default)(d.slice(1),{dot:!0})(a)))break;if((0,Gl.default)(d,{dot:!0})(o)&&l.priority<s){n=c,s=l.priority;continue}if((0,Gl.default)(d,{dot:!0})(a)&&l.priority<s){n=c,s=l.priority;continue}}}let u=n??r;return u||console.debug("[GLOBAL] No matching project for document",{fsPath:o,normalPath:a}),u}async onDocumentColor(t){return await this.init(),this.getProject(t.textDocument)?.onDocumentColor(t)??[]}async onColorPresentation(t){return await this.init(),this.getProject(t.textDocument)?.onColorPresentation(t)??[]}async onHover(t){return await this.init(),this.getProject(t.textDocument)?.onHover(t)??null}async onCompletion(t){return await this.init(),this.getProject(t.textDocument)?.onCompletion(t)??null}async onCompletionResolve(t){return await this.init(),this.projects.get(t.data?._projectKey)?.onCompletionResolve(t)??null}async onCodeAction(t){return await this.init(),this.getProject(t.textDocument)?.onCodeAction(t)??null}async onDocumentLinks(t){return await this.init(),this.getProject(t.textDocument)?.onDocumentLinks(t)??null}setup(){this.connection.onInitialize(async t=>(this.initializeParams=t,lpe(t)?{capabilities:{textDocumentSync:Kn.TextDocumentSyncKind.Full}}:(this.setupLSPHandlers(),{capabilities:{textDocumentSync:Kn.TextDocumentSyncKind.Full,hoverProvider:!0,colorProvider:!0,codeActionProvider:!0,documentLinkProvider:{},completionProvider:{resolveProvider:!0,triggerCharacters:[...ope,":"]}}}))),this.connection.onInitialized(()=>this.init())}listen(){this.connection.listen()}dispose(){this.connection.sendNotification("@/tailwindCSS/projectsDestroyed");for(let[,t]of this.projects)t.dispose();this.projects=new Map,this.refreshDiagnostics(),this.registrations&&(this.registrations.then(t=>t.dispose()),this.registrations=void 0),this.disposables.forEach(t=>t.dispose()),this.disposables.length=0,this.watched.length=0}restart(){console.log(`----------
|
1295
1295
|
RESTARTING
|
1296
1296
|
----------`),this.dispose(),this.initPromise=void 0,this.init()}async softRestart(){for(let[,t]of this.projects)if(t.state.v4)try{await t.reload()}catch{}}};function lpe(e){return e.capabilities.textDocument.hover?.dynamicRegistration&&e.capabilities.textDocument.colorProvider?.dynamicRegistration&&e.capabilities.textDocument.codeAction?.dynamicRegistration&&e.capabilities.textDocument.completion?.dynamicRegistration&&e.capabilities.textDocument.documentLink?.dynamicRegistration}var upe=require("node:util");function k1(e){return e.map(t=>(0,upe.format)(t)).join(" ")}function cpe(e,t){e.debug=(...r)=>t.console.info(k1(r)),e.error=(...r)=>t.console.error(k1(r)),e.warn=(...r)=>t.console.warn(k1(r)),e.info=(...r)=>t.console.info(k1(r)),e.log=(...r)=>t.console.log(k1(r))}global.__preflight=f7;new Function("require","__dirname",`
|
1297
1297
|
let oldReadFileSync = require('fs').readFileSync
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@tailwindcss/language-server",
|
3
3
|
"description": "Tailwind CSS Language Server",
|
4
4
|
"license": "MIT",
|
5
|
-
"version": "0.0.0-insiders.
|
5
|
+
"version": "0.0.0-insiders.4fa07ea",
|
6
6
|
"repository": {
|
7
7
|
"type": "git",
|
8
8
|
"url": "git+https://github.com/tailwindlabs/tailwindcss-intellisense.git",
|