@xaendar/cli 0.9.18 → 0.9.19
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/cli.js +28 -2917
- package/package.json +8 -2
- package/dist/api-BQOKPGRV.js +0 -90
- package/dist/build-GBGQNBHY.js +0 -25
- package/dist/chunk-4TR6Q4JL.js +0 -628
- package/dist/chunk-JDYMX3OY.js +0 -3
- package/dist/chunk-KNI7SFGP.js +0 -3
- package/dist/chunk-MMVDHF5O.js +0 -47
- package/dist/chunk-OL5QH2XE.js +0 -3
- package/dist/dist-H2NBAJAI.js +0 -3
- package/dist/dist-JMGYIFWH.js +0 -3
- package/dist/false-QKAHAALV.js +0 -3
- package/dist/lexer-DQCqS3nf-43JHI7TC.js +0 -5
- package/dist/main-BEZFE5MG.js +0 -68
- package/dist/node-RONF2ICS.js +0 -3
- package/dist/postcss-INPVFW34.js +0 -35
- package/dist/postcss-import-KX43CMCJ.js +0 -6
- package/dist/prompt-CH6TK0bC-7PB4PZOW.js +0 -47
package/dist/main-BEZFE5MG.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';
|
|
2
|
-
const require = createRequire(import.meta.url);
|
|
3
|
-
import{a as Y,d as yt}from"./chunk-KNI7SFGP.js";var cr=yt((fr,pt)=>{var qe=Object.defineProperty,bt=Object.getOwnPropertyDescriptor,vt=Object.getOwnPropertyNames,xt=Object.prototype.hasOwnProperty,kt=(e,t)=>{for(var r in t)qe(e,r,{get:t[r],enumerable:!0})},$t=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of vt(t))!xt.call(e,o)&&o!==r&&qe(e,o,{get:()=>t[o],enumerable:!(n=bt(t,o))||n.enumerable});return e},St=e=>$t(qe({},"__esModule",{value:!0}),e),Pe={};kt(Pe,{analyzeMetafile:()=>tr,analyzeMetafileSync:()=>lr,build:()=>Gt,buildSync:()=>rr,context:()=>Xt,default:()=>ur,formatMessages:()=>er,formatMessagesSync:()=>ir,initialize:()=>or,stop:()=>ar,transform:()=>Zt,transformSync:()=>nr,version:()=>Qt});pt.exports=St(Pe);function Je(e){let t=n=>{if(n===null)r.write8(0);else if(typeof n=="boolean")r.write8(1),r.write8(+n);else if(typeof n=="number")r.write8(2),r.write32(n|0);else if(typeof n=="string")r.write8(3),r.write(ie(n));else if(n instanceof Uint8Array)r.write8(4),r.write(n);else if(n instanceof Array){r.write8(5),r.write32(n.length);for(let o of n)t(o)}else{let o=Object.keys(n);r.write8(6),r.write32(o.length);for(let s of o)r.write(ie(s)),t(n[s])}},r=new tt;return r.write32(0),r.write32(e.id<<1|+!e.isRequest),t(e.value),Ue(r.buf,r.len-4,0),r.buf.subarray(0,r.len)}function Et(e){let t=()=>{switch(r.read8()){case 0:return null;case 1:return!!r.read8();case 2:return r.read32();case 3:return we(r.read());case 4:return r.read();case 5:{let a=r.read32(),d=[];for(let i=0;i<a;i++)d.push(t());return d}case 6:{let a=r.read32(),d={};for(let i=0;i<a;i++)d[we(r.read())]=t();return d}default:throw new Error("Invalid packet")}},r=new tt(e),n=r.read32(),o=(n&1)===0;n>>>=1;let s=t();if(r.ptr!==e.length)throw new Error("Invalid packet");return{id:n,isRequest:o,value:s}}var tt=class{constructor(e=new Uint8Array(1024)){this.buf=e,this.len=0,this.ptr=0}_write(e){if(this.len+e>this.buf.length){let t=new Uint8Array((this.len+e)*2);t.set(this.buf),this.buf=t}return this.len+=e,this.len-e}write8(e){let t=this._write(1);this.buf[t]=e}write32(e){let t=this._write(4);Ue(this.buf,e,t)}write(e){let t=this._write(4+e.length);Ue(this.buf,e.length,t),this.buf.set(e,t+4)}_read(e){if(this.ptr+e>this.buf.length)throw new Error("Invalid packet");return this.ptr+=e,this.ptr-e}read8(){return this.buf[this._read(1)]}read32(){return rt(this.buf,this._read(4))}read(){let e=this.read32(),t=new Uint8Array(e),r=this._read(t.length);return t.set(this.buf.subarray(r,r+e)),t}},ie,we,Re;if(typeof TextEncoder<"u"&&typeof TextDecoder<"u"){let e=new TextEncoder,t=new TextDecoder;ie=r=>e.encode(r),we=r=>t.decode(r),Re='new TextEncoder().encode("")'}else if(typeof Buffer<"u")ie=e=>Buffer.from(e),we=e=>{let{buffer:t,byteOffset:r,byteLength:n}=e;return Buffer.from(t,r,n).toString()},Re='Buffer.from("")';else throw new Error("No UTF-8 codec found");if(!(ie("")instanceof Uint8Array))throw new Error(`Invariant violation: "${Re} instanceof Uint8Array" is incorrectly false
|
|
4
|
-
|
|
5
|
-
This indicates that your JavaScript environment is broken. You cannot use
|
|
6
|
-
esbuild in this environment because esbuild relies on this invariant. This
|
|
7
|
-
is not a problem with esbuild. You need to fix your environment instead.
|
|
8
|
-
`);function rt(e,t){return(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)>>>0}function Ue(e,t,r){e[r++]=t,e[r++]=t>>8,e[r++]=t>>16,e[r++]=t>>24}var ue=String.fromCharCode;function re(e,t,r){let n=e[t],o=1,s=0;for(let a=0;a<t;a++)e[a]===10?(o++,s=0):s++;throw new SyntaxError(r||(t===e.length?"Unexpected end of input while parsing JSON":n>=32&&n<=126?`Unexpected character ${ue(n)} in JSON at position ${t} (line ${o}, column ${s})`:`Unexpected byte 0x${n.toString(16)} in JSON at position ${t} (line ${o}, column ${s})`))}function At(e){if(!(e instanceof Uint8Array))throw new Error("JSON input must be a Uint8Array");let t=[],r=[],n=[],o=e.length,s=null,a=0,d,i=0;for(;i<o;){let c=e[i++];if(c<=32)continue;let u;switch(a===2&&s===null&&c!==34&&c!==125&&re(e,--i),c){case 116:{(e[i++]!==114||e[i++]!==117||e[i++]!==101)&&re(e,--i),u=!0;break}case 102:{(e[i++]!==97||e[i++]!==108||e[i++]!==115||e[i++]!==101)&&re(e,--i),u=!1;break}case 110:{(e[i++]!==117||e[i++]!==108||e[i++]!==108)&&re(e,--i),u=null;break}case 45:case 46:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:{let y=i;for(u=ue(c),c=e[i];;){switch(c){case 43:case 45:case 46:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 101:case 69:{u+=ue(c),c=e[++i];continue}}break}u=+u,isNaN(u)&&re(e,--y,"Invalid number");break}case 34:{for(u="";i>=o&&re(e,o),c=e[i++],c!==34;)if(c===92)switch(e[i++]){case 34:u+='"';break;case 47:u+="/";break;case 92:u+="\\";break;case 98:u+="\b";break;case 102:u+="\f";break;case 110:u+=`
|
|
9
|
-
`;break;case 114:u+="\r";break;case 116:u+=" ";break;case 117:{let y=0;for(let B=0;B<4;B++)c=e[i++],y<<=4,c>=48&&c<=57?y|=c-48:c>=97&&c<=102?y|=c+-87:c>=65&&c<=70?y|=c+-55:re(e,--i);u+=ue(y);break}default:re(e,--i);break}else if(c<=127)u+=ue(c);else if((c&224)===192)u+=ue((c&31)<<6|e[i++]&63);else if((c&240)===224)u+=ue((c&15)<<12|(e[i++]&63)<<6|e[i++]&63);else if((c&248)==240){let y=(c&7)<<18|(e[i++]&63)<<12|(e[i++]&63)<<6|e[i++]&63;y>65535&&(y-=65536,u+=ue(y>>10&1023|55296),y=56320|y&1023),u+=ue(y)}u[0];break}case 91:{u=[],t.push(s),r.push(d),n.push(a),s=null,d=u,a=1;continue}case 123:{u={},t.push(s),r.push(d),n.push(a),s=null,d=u,a=2;continue}case 93:{a!==1&&re(e,--i),u=d,s=t.pop(),d=r.pop(),a=n.pop();break}case 125:{a!==2&&re(e,--i),u=d,s=t.pop(),d=r.pop(),a=n.pop();break}default:re(e,--i)}for(c=e[i];c<=32;)c=e[++i];switch(a){case 0:{if(i===o)return u;break}case 1:{if(d.push(u),c===44){i++;continue}if(c===93)continue;break}case 2:{if(s===null){if(s=u,c===58){i++;continue}}else{if(d[s]=u,s=null,c===44){i++;continue}if(c===125)continue}break}}break}re(e,i)}var V=JSON.stringify,Ve="warning",Ye="silent";function xe(e,t){let r=[];for(let n of e){if(G(n,t),n.indexOf(",")>=0)throw new Error(`Invalid ${t}: ${n}`);r.push(n)}return r.join(",")}var Me=()=>null,U=e=>typeof e=="boolean"?null:"a boolean",b=e=>typeof e=="string"?null:"a string",De=e=>e instanceof RegExp?null:"a RegExp object",me=e=>typeof e=="number"&&e===(e|0)?null:"an integer",Pt=e=>typeof e=="number"&&e===(e|0)&&e>=0&&e<=65535?null:"a valid port number",nt=e=>typeof e=="function"?null:"a function",ce=e=>Array.isArray(e)?null:"an array",X=e=>Array.isArray(e)&&e.every(t=>typeof t=="string")?null:"an array of strings",Z=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"an object",Ot=e=>typeof e=="object"&&e!==null?null:"an array or an object",jt=e=>e instanceof WebAssembly.Module?null:"a WebAssembly.Module",He=e=>typeof e=="object"&&!Array.isArray(e)?null:"an object or null",it=e=>typeof e=="string"||typeof e=="boolean"?null:"a string or a boolean",Ct=e=>typeof e=="string"||typeof e=="object"&&e!==null&&!Array.isArray(e)?null:"a string or an object",lt=e=>typeof e=="string"||Array.isArray(e)&&e.every(t=>typeof t=="string")?null:"a string or an array of strings",at=e=>typeof e=="string"||e instanceof Uint8Array?null:"a string or a Uint8Array",Mt=e=>typeof e=="string"||e instanceof URL?null:"a string or a URL";function l(e,t,r,n){let o=e[r];if(t[r+""]=!0,o===void 0)return;let s=n(o);if(s!==null)throw new Error(`${V(r)} must be ${s}`);return o}function J(e,t,r){for(let n in e)if(!(n in t))throw new Error(`Invalid option ${r}: ${V(n)}`)}function Dt(e){let t=Object.create(null),r=l(e,t,"wasmURL",Mt),n=l(e,t,"wasmModule",jt),o=l(e,t,"worker",U);return J(e,t,"in initialize() call"),{wasmURL:r,wasmModule:n,worker:o}}function ot(e){let t;if(e!==void 0){t=Object.create(null);for(let r in e){let n=e[r];if(typeof n=="string"||n===!1)t[r]=n;else throw new Error(`Expected ${V(r)} in mangle cache to map to either a string or false`)}}return t}function Be(e,t,r,n,o){let s=l(t,r,"color",U),a=l(t,r,"logLevel",b),d=l(t,r,"logLimit",me);s!==void 0?e.push(`--color=${s}`):n&&e.push("--color=true"),e.push(`--log-level=${a||o}`),e.push(`--log-limit=${d||0}`)}function G(e,t,r){if(typeof e!="string")throw new Error(`Expected value for ${t}${r!==void 0?" "+V(r):""} to be a string, got ${typeof e} instead`);return e}function st(e,t,r){let n=l(t,r,"legalComments",b),o=l(t,r,"sourceRoot",b),s=l(t,r,"sourcesContent",U),a=l(t,r,"target",lt),d=l(t,r,"format",b),i=l(t,r,"globalName",b),c=l(t,r,"mangleProps",De),u=l(t,r,"reserveProps",De),y=l(t,r,"mangleQuoted",U),B=l(t,r,"minify",U),_=l(t,r,"minifySyntax",U),N=l(t,r,"minifyWhitespace",U),I=l(t,r,"minifyIdentifiers",U),L=l(t,r,"lineLimit",me),W=l(t,r,"drop",X),z=l(t,r,"dropLabels",X),k=l(t,r,"charset",b),w=l(t,r,"treeShaking",U),p=l(t,r,"ignoreAnnotations",U),f=l(t,r,"jsx",b),$=l(t,r,"jsxFactory",b),E=l(t,r,"jsxFragment",b),C=l(t,r,"jsxImportSource",b),A=l(t,r,"jsxDev",U),h=l(t,r,"jsxSideEffects",U),m=l(t,r,"define",Z),x=l(t,r,"logOverride",Z),O=l(t,r,"supported",Z),M=l(t,r,"pure",X),P=l(t,r,"keepNames",U),S=l(t,r,"platform",b),j=l(t,r,"tsconfigRaw",Ct),R=l(t,r,"absPaths",X);if(n&&e.push(`--legal-comments=${n}`),o!==void 0&&e.push(`--source-root=${o}`),s!==void 0&&e.push(`--sources-content=${s}`),a&&e.push(`--target=${xe(Array.isArray(a)?a:[a],"target")}`),d&&e.push(`--format=${d}`),i&&e.push(`--global-name=${i}`),S&&e.push(`--platform=${S}`),j&&e.push(`--tsconfig-raw=${typeof j=="string"?j:JSON.stringify(j)}`),B&&e.push("--minify"),_&&e.push("--minify-syntax"),N&&e.push("--minify-whitespace"),I&&e.push("--minify-identifiers"),L&&e.push(`--line-limit=${L}`),k&&e.push(`--charset=${k}`),w!==void 0&&e.push(`--tree-shaking=${w}`),p&&e.push("--ignore-annotations"),W)for(let g of W)e.push(`--drop:${G(g,"drop")}`);if(z&&e.push(`--drop-labels=${xe(z,"drop label")}`),R&&e.push(`--abs-paths=${xe(R,"abs paths")}`),c&&e.push(`--mangle-props=${Le(c)}`),u&&e.push(`--reserve-props=${Le(u)}`),y!==void 0&&e.push(`--mangle-quoted=${y}`),f&&e.push(`--jsx=${f}`),$&&e.push(`--jsx-factory=${$}`),E&&e.push(`--jsx-fragment=${E}`),C&&e.push(`--jsx-import-source=${C}`),A&&e.push("--jsx-dev"),h&&e.push("--jsx-side-effects"),m)for(let g in m){if(g.indexOf("=")>=0)throw new Error(`Invalid define: ${g}`);e.push(`--define:${g}=${G(m[g],"define",g)}`)}if(x)for(let g in x){if(g.indexOf("=")>=0)throw new Error(`Invalid log override: ${g}`);e.push(`--log-override:${g}=${G(x[g],"log override",g)}`)}if(O)for(let g in O){if(g.indexOf("=")>=0)throw new Error(`Invalid supported: ${g}`);let F=O[g];if(typeof F!="boolean")throw new Error(`Expected value for supported ${V(g)} to be a boolean, got ${typeof F} instead`);e.push(`--supported:${g}=${F}`)}if(M)for(let g of M)e.push(`--pure:${G(g,"pure")}`);P&&e.push("--keep-names")}function Lt(e,t,r,n,o){var s;let a=[],d=[],i=Object.create(null),c=null,u=null;Be(a,t,i,r,n),st(a,t,i);let y=l(t,i,"sourcemap",it),B=l(t,i,"bundle",U),_=l(t,i,"splitting",U),N=l(t,i,"preserveSymlinks",U),I=l(t,i,"metafile",U),L=l(t,i,"outfile",b),W=l(t,i,"outdir",b),z=l(t,i,"outbase",b),k=l(t,i,"tsconfig",b),w=l(t,i,"resolveExtensions",X),p=l(t,i,"nodePaths",X),f=l(t,i,"mainFields",X),$=l(t,i,"conditions",X),E=l(t,i,"external",X),C=l(t,i,"packages",b),A=l(t,i,"alias",Z),h=l(t,i,"loader",Z),m=l(t,i,"outExtension",Z),x=l(t,i,"publicPath",b),O=l(t,i,"entryNames",b),M=l(t,i,"chunkNames",b),P=l(t,i,"assetNames",b),S=l(t,i,"inject",X),j=l(t,i,"banner",Z),R=l(t,i,"footer",Z),g=l(t,i,"entryPoints",Ot),F=l(t,i,"absWorkingDir",b),T=l(t,i,"stdin",Z),D=(s=l(t,i,"write",U))!=null?s:o,Q=l(t,i,"allowOverwrite",U),q=l(t,i,"mangleCache",Z);if(i.plugins=!0,J(t,i,`in ${e}() call`),y&&a.push(`--sourcemap${y===!0?"":`=${y}`}`),B&&a.push("--bundle"),Q&&a.push("--allow-overwrite"),_&&a.push("--splitting"),N&&a.push("--preserve-symlinks"),I&&a.push("--metafile"),L&&a.push(`--outfile=${L}`),W&&a.push(`--outdir=${W}`),z&&a.push(`--outbase=${z}`),k&&a.push(`--tsconfig=${k}`),C&&a.push(`--packages=${C}`),w&&a.push(`--resolve-extensions=${xe(w,"resolve extension")}`),x&&a.push(`--public-path=${x}`),O&&a.push(`--entry-names=${O}`),M&&a.push(`--chunk-names=${M}`),P&&a.push(`--asset-names=${P}`),f&&a.push(`--main-fields=${xe(f,"main field")}`),$&&a.push(`--conditions=${xe($,"condition")}`),E)for(let v of E)a.push(`--external:${G(v,"external")}`);if(A)for(let v in A){if(v.indexOf("=")>=0)throw new Error(`Invalid package name in alias: ${v}`);a.push(`--alias:${v}=${G(A[v],"alias",v)}`)}if(j)for(let v in j){if(v.indexOf("=")>=0)throw new Error(`Invalid banner file type: ${v}`);a.push(`--banner:${v}=${G(j[v],"banner",v)}`)}if(R)for(let v in R){if(v.indexOf("=")>=0)throw new Error(`Invalid footer file type: ${v}`);a.push(`--footer:${v}=${G(R[v],"footer",v)}`)}if(S)for(let v of S)a.push(`--inject:${G(v,"inject")}`);if(h)for(let v in h){if(v.indexOf("=")>=0)throw new Error(`Invalid loader extension: ${v}`);a.push(`--loader:${v}=${G(h[v],"loader",v)}`)}if(m)for(let v in m){if(v.indexOf("=")>=0)throw new Error(`Invalid out extension: ${v}`);a.push(`--out-extension:${v}=${G(m[v],"out extension",v)}`)}if(g)if(Array.isArray(g))for(let v=0,oe=g.length;v<oe;v++){let ee=g[v];if(typeof ee=="object"&&ee!==null){let le=Object.create(null),se=l(ee,le,"in",b),te=l(ee,le,"out",b);if(J(ee,le,"in entry point at index "+v),se===void 0)throw new Error('Missing property "in" for entry point at index '+v);if(te===void 0)throw new Error('Missing property "out" for entry point at index '+v);d.push([te,se])}else d.push(["",G(ee,"entry point at index "+v)])}else for(let v in g)d.push([v,G(g[v],"entry point",v)]);if(T){let v=Object.create(null),oe=l(T,v,"contents",at),ee=l(T,v,"resolveDir",b),le=l(T,v,"sourcefile",b),se=l(T,v,"loader",b);J(T,v,'in "stdin" object'),le&&a.push(`--sourcefile=${le}`),se&&a.push(`--loader=${se}`),ee&&(u=ee),typeof oe=="string"?c=ie(oe):oe instanceof Uint8Array&&(c=oe)}let ae=[];if(p)for(let v of p)v+="",ae.push(v);return{entries:d,flags:a,write:D,stdinContents:c,stdinResolveDir:u,absWorkingDir:F,nodePaths:ae,mangleCache:ot(q)}}function Tt(e,t,r,n){let o=[],s=Object.create(null);Be(o,t,s,r,n),st(o,t,s);let a=l(t,s,"sourcemap",it),d=l(t,s,"sourcefile",b),i=l(t,s,"loader",b),c=l(t,s,"banner",b),u=l(t,s,"footer",b),y=l(t,s,"mangleCache",Z);return J(t,s,`in ${e}() call`),a&&o.push(`--sourcemap=${a===!0?"external":a}`),d&&o.push(`--sourcefile=${d}`),i&&o.push(`--loader=${i}`),c&&o.push(`--banner=${c}`),u&&o.push(`--footer=${u}`),{flags:o,mangleCache:ot(y)}}function ut(e){let t={},r={didClose:!1,reason:""},n={},o=0,s=0,a=new Uint8Array(16*1024),d=0,i=k=>{let w=d+k.length;if(w>a.length){let f=new Uint8Array(w*2);f.set(a),a=f}a.set(k,d),d+=k.length;let p=0;for(;p+4<=d;){let f=rt(a,p);if(p+4+f>d)break;p+=4,N(a.subarray(p,p+f)),p+=f}p>0&&(a.copyWithin(0,p,d),d-=p)},c=k=>{r.didClose=!0,k&&(r.reason=": "+(k.message||k));let w="The service was stopped"+r.reason;for(let p in n)n[p](w,null);n={}},u=(k,w,p)=>{if(r.didClose)return p("The service is no longer running"+r.reason,null);let f=o++;n[f]=($,E)=>{try{p($,E)}finally{k&&k.unref()}},k&&k.ref(),e.writeToStdin(Je({id:f,isRequest:!0,value:w}))},y=(k,w)=>{if(r.didClose)throw new Error("The service is no longer running"+r.reason);e.writeToStdin(Je({id:k,isRequest:!1,value:w}))},B=async(k,w)=>{try{if(w.command==="ping"){y(k,{});return}if(typeof w.key=="number"){let p=t[w.key];if(!p)return;let f=p[w.command];if(f){await f(k,w);return}}throw new Error("Invalid command: "+w.command)}catch(p){let f=[he(p,e,null,void 0,"")];try{y(k,{errors:f})}catch{}}},_=!0,N=k=>{if(_){_=!1;let p=String.fromCharCode(...k);if(p!=="0.27.7")throw new Error(`Cannot start service: Host version "0.27.7" does not match binary version ${V(p)}`);return}let w=Et(k);if(w.isRequest)B(w.id,w.value);else{let p=n[w.id];delete n[w.id],w.value.error?p(w.value.error,{}):p(null,w.value)}};return{readFromStdout:i,afterClose:c,service:{buildOrContext:({callName:k,refs:w,options:p,isTTY:f,defaultWD:$,callback:E})=>{let C=0,A=s++,h={},m={ref(){++C===1&&w&&w.ref()},unref(){--C===0&&(delete t[A],w&&w.unref())}};t[A]=h,m.ref(),Ft(k,A,u,y,m,e,h,p,f,$,(x,O)=>{try{E(x,O)}finally{m.unref()}})},transform:({callName:k,refs:w,input:p,options:f,isTTY:$,fs:E,callback:C})=>{let A=ct(),h=m=>{try{if(typeof p!="string"&&!(p instanceof Uint8Array))throw new Error('The input to "transform" must be a string or a Uint8Array');let{flags:x,mangleCache:O}=Tt(k,f,$,Ye),M={command:"transform",flags:x,inputFS:m!==null,input:m!==null?ie(m):typeof p=="string"?ie(p):p};O&&(M.mangleCache=O),u(w,M,(P,S)=>{if(P)return C(new Error(P),null);let j=ke(S.errors,A),R=ke(S.warnings,A),g=1,F=()=>{if(--g===0){let T={warnings:R,code:S.code,map:S.map,mangleCache:void 0,legalComments:void 0};"legalComments"in S&&(T.legalComments=S?.legalComments),S.mangleCache&&(T.mangleCache=S?.mangleCache),C(null,T)}};if(j.length>0)return C(Ee("Transform failed",j,R),null);S.codeFS&&(g++,E.readFile(S.code,(T,D)=>{T!==null?C(T,null):(S.code=D,F())})),S.mapFS&&(g++,E.readFile(S.map,(T,D)=>{T!==null?C(T,null):(S.map=D,F())})),F()})}catch(x){let O=[];try{Be(O,f,{},$,Ye)}catch{}let M=he(x,e,A,void 0,"");u(w,{command:"error",flags:O,error:M},()=>{M.detail=A.load(M.detail),C(Ee("Transform failed",[M],[]),null)})}};if((typeof p=="string"||p instanceof Uint8Array)&&p.length>1024*1024){let m=h;h=()=>E.writeFile(p,m)}h(null)},formatMessages:({callName:k,refs:w,messages:p,options:f,callback:$})=>{if(!f)throw new Error(`Missing second argument in ${k}() call`);let E={},C=l(f,E,"kind",b),A=l(f,E,"color",U),h=l(f,E,"terminalWidth",me);if(J(f,E,`in ${k}() call`),C===void 0)throw new Error(`Missing "kind" in ${k}() call`);if(C!=="error"&&C!=="warning")throw new Error(`Expected "kind" to be "error" or "warning" in ${k}() call`);let m={command:"format-msgs",messages:fe(p,"messages",null,"",h),isWarning:C==="warning"};A!==void 0&&(m.color=A),h!==void 0&&(m.terminalWidth=h),u(w,m,(x,O)=>{if(x)return $(new Error(x),null);$(null,O.messages)})},analyzeMetafile:({callName:k,refs:w,metafile:p,options:f,callback:$})=>{f===void 0&&(f={});let E={},C=l(f,E,"color",U),A=l(f,E,"verbose",U);J(f,E,`in ${k}() call`);let h={command:"analyze-metafile",metafile:p};C!==void 0&&(h.color=C),A!==void 0&&(h.verbose=A),u(w,h,(m,x)=>{if(m)return $(new Error(m),null);$(null,x.result)})}}}}function Ft(e,t,r,n,o,s,a,d,i,c,u){let y=ct(),B=e==="context",_=(L,W)=>{let z=[];try{Be(z,d,{},i,Ve)}catch{}let k=he(L,s,y,void 0,W);r(o,{command:"error",flags:z,error:k},()=>{k.detail=y.load(k.detail),u(Ee(B?"Context failed":"Build failed",[k],[]),null)})},N;if(typeof d=="object"){let L=d.plugins;if(L!==void 0){if(!Array.isArray(L))return _(new Error('"plugins" must be an array'),"");N=L}}if(N&&N.length>0){if(s.isSync)return _(new Error("Cannot use plugins in synchronous API calls"),"");_t(t,r,n,o,s,a,d,N,y).then(L=>{if(!L.ok)return _(L.error,L.pluginName);try{I(L.requestPlugins,L.runOnEndCallbacks,L.scheduleOnDisposeCallbacks)}catch(W){_(W,"")}},L=>_(L,""));return}try{I(null,(L,W)=>W([],[]),()=>{})}catch(L){_(L,"")}function I(L,W,z){let k=s.hasFS,{entries:w,flags:p,write:f,stdinContents:$,stdinResolveDir:E,absWorkingDir:C,nodePaths:A,mangleCache:h}=Lt(e,d,i,Ve,k);if(f&&!s.hasFS)throw new Error('The "write" option is unavailable in this environment');let m={command:"build",key:t,entries:w,flags:p,write:f,stdinContents:$,stdinResolveDir:E,absWorkingDir:C||c,nodePaths:A,context:B};L&&(m.plugins=L),h&&(m.mangleCache=h);let x=(P,S)=>{let j={errors:ke(P.errors,y),warnings:ke(P.warnings,y),outputFiles:void 0,metafile:void 0,mangleCache:void 0},R=j.errors.slice(),g=j.warnings.slice();P.outputFiles&&(j.outputFiles=P.outputFiles.map(Nt)),P.metafile&&P.metafile.length&&(j.metafile=It(P.metafile)),P.mangleCache&&(j.mangleCache=P.mangleCache),P.writeToStdout!==void 0&&console.log(we(P.writeToStdout).replace(/\n$/,"")),W(j,(F,T)=>{if(R.length>0||F.length>0){let D=Ee("Build failed",R.concat(F),g.concat(T));return S(D,null,F,T)}S(null,j,F,T)})},O,M;B&&(a["on-end"]=(P,S)=>new Promise(j=>{x(S,(R,g,F,T)=>{let D={errors:F,warnings:T};M&&M(R,g),O=void 0,M=void 0,n(P,D),j()})})),r(o,m,(P,S)=>{if(P)return u(new Error(P),null);if(!B)return x(S,(g,F)=>(z(),u(g,F)));if(S.errors.length>0)return u(Ee("Context failed",S.errors,S.warnings),null);let j=!1,R={rebuild:()=>(O||(O=new Promise((g,F)=>{let T;M=(Q,q)=>{T||(T=()=>Q?F(Q):g(q))};let D=()=>{r(o,{command:"rebuild",key:t},(q,ae)=>{q?F(new Error(q)):T?T():D()})};D()})),O),watch:(g={})=>new Promise((F,T)=>{if(!s.hasFS)throw new Error('Cannot use the "watch" API in this environment');let D={},Q=l(g,D,"delay",me);J(g,D,"in watch() call");let q={command:"watch",key:t};Q&&(q.delay=Q),r(o,q,ae=>{ae?T(new Error(ae)):F(void 0)})}),serve:(g={})=>new Promise((F,T)=>{if(!s.hasFS)throw new Error('Cannot use the "serve" API in this environment');let D={},Q=l(g,D,"port",Pt),q=l(g,D,"host",b),ae=l(g,D,"servedir",b),v=l(g,D,"keyfile",b),oe=l(g,D,"certfile",b),ee=l(g,D,"fallback",b),le=l(g,D,"cors",Z),se=l(g,D,"onRequest",nt);J(g,D,"in serve() call");let te={command:"serve",key:t,onRequest:!!se};if(Q!==void 0&&(te.port=Q),q!==void 0&&(te.host=q),ae!==void 0&&(te.servedir=ae),v!==void 0&&(te.keyfile=v),oe!==void 0&&(te.certfile=oe),ee!==void 0&&(te.fallback=ee),le){let $e={},be=l(le,$e,"origin",lt);J(le,$e,'on "cors" object'),Array.isArray(be)?te.corsOrigin=be:be!==void 0&&(te.corsOrigin=[be])}r(o,te,($e,be)=>{if($e)return T(new Error($e));se&&(a["serve-request"]=(gt,wt)=>{se(wt.args),n(gt,{})}),F(be)})}),cancel:()=>new Promise(g=>{if(j)return g();r(o,{command:"cancel",key:t},()=>{g()})}),dispose:()=>new Promise(g=>{if(j)return g();j=!0,r(o,{command:"dispose",key:t},()=>{g(),z(),o.unref()})})};o.ref(),u(null,R)})}}var _t=async(e,t,r,n,o,s,a,d,i)=>{let c=[],u=[],y={},B={},_=[],N=0,I=0,L=[],W=!1;d=[...d];for(let w of d){let p={};if(typeof w!="object")throw new Error(`Plugin at index ${I} must be an object`);let f=l(w,p,"name",b);if(typeof f!="string"||f==="")throw new Error(`Plugin at index ${I} is missing a name`);try{let $=l(w,p,"setup",nt);if(typeof $!="function")throw new Error("Plugin is missing a setup function");J(w,p,`on plugin ${V(f)}`);let E={name:f,onStart:!1,onEnd:!1,onResolve:[],onLoad:[]};I++;let A=$({initialOptions:a,resolve:(h,m={})=>{if(!W)throw new Error('Cannot call "resolve" before plugin setup has completed');if(typeof h!="string")throw new Error("The path to resolve must be a string");let x=Object.create(null),O=l(m,x,"pluginName",b),M=l(m,x,"importer",b),P=l(m,x,"namespace",b),S=l(m,x,"resolveDir",b),j=l(m,x,"kind",b),R=l(m,x,"pluginData",Me),g=l(m,x,"with",Z);return J(m,x,"in resolve() call"),new Promise((F,T)=>{let D={command:"resolve",path:h,key:e,pluginName:f};if(O!=null&&(D.pluginName=O),M!=null&&(D.importer=M),P!=null&&(D.namespace=P),S!=null&&(D.resolveDir=S),j!=null)D.kind=j;else throw new Error('Must specify "kind" when calling "resolve"');R!=null&&(D.pluginData=i.store(R)),g!=null&&(D.with=Bt(g,"with")),t(n,D,(Q,q)=>{Q!==null?T(new Error(Q)):F({errors:ke(q.errors,i),warnings:ke(q.warnings,i),path:q.path,external:q.external,sideEffects:q.sideEffects,namespace:q.namespace,suffix:q.suffix,pluginData:i.load(q.pluginData)})})})},onStart(h){let m='This error came from the "onStart" callback registered here:',x=je(new Error(m),o,"onStart");c.push({name:f,callback:h,note:x}),E.onStart=!0},onEnd(h){let m='This error came from the "onEnd" callback registered here:',x=je(new Error(m),o,"onEnd");u.push({name:f,callback:h,note:x}),E.onEnd=!0},onResolve(h,m){let x='This error came from the "onResolve" callback registered here:',O=je(new Error(x),o,"onResolve"),M={},P=l(h,M,"filter",De),S=l(h,M,"namespace",b);if(J(h,M,`in onResolve() call for plugin ${V(f)}`),P==null)throw new Error("onResolve() call is missing a filter");let j=N++;y[j]={name:f,callback:m,note:O},E.onResolve.push({id:j,filter:Le(P),namespace:S||""})},onLoad(h,m){let x='This error came from the "onLoad" callback registered here:',O=je(new Error(x),o,"onLoad"),M={},P=l(h,M,"filter",De),S=l(h,M,"namespace",b);if(J(h,M,`in onLoad() call for plugin ${V(f)}`),P==null)throw new Error("onLoad() call is missing a filter");let j=N++;B[j]={name:f,callback:m,note:O},E.onLoad.push({id:j,filter:Le(P),namespace:S||""})},onDispose(h){_.push(h)},esbuild:o.esbuild});A&&await A,L.push(E)}catch($){return{ok:!1,error:$,pluginName:f}}}s["on-start"]=async(w,p)=>{i.clear();let f={errors:[],warnings:[]};await Promise.all(c.map(async({name:$,callback:E,note:C})=>{try{let A=await E();if(A!=null){if(typeof A!="object")throw new Error(`Expected onStart() callback in plugin ${V($)} to return an object`);let h={},m=l(A,h,"errors",ce),x=l(A,h,"warnings",ce);J(A,h,`from onStart() callback in plugin ${V($)}`),m!=null&&f.errors.push(...fe(m,"errors",i,$,void 0)),x!=null&&f.warnings.push(...fe(x,"warnings",i,$,void 0))}}catch(A){f.errors.push(he(A,o,i,C&&C(),$))}})),r(w,f)},s["on-resolve"]=async(w,p)=>{let f={},$="",E,C;for(let A of p.ids)try{({name:$,callback:E,note:C}=y[A]);let h=await E({path:p.path,importer:p.importer,namespace:p.namespace,resolveDir:p.resolveDir,kind:p.kind,pluginData:i.load(p.pluginData),with:p.with});if(h!=null){if(typeof h!="object")throw new Error(`Expected onResolve() callback in plugin ${V($)} to return an object`);let m={},x=l(h,m,"pluginName",b),O=l(h,m,"path",b),M=l(h,m,"namespace",b),P=l(h,m,"suffix",b),S=l(h,m,"external",U),j=l(h,m,"sideEffects",U),R=l(h,m,"pluginData",Me),g=l(h,m,"errors",ce),F=l(h,m,"warnings",ce),T=l(h,m,"watchFiles",X),D=l(h,m,"watchDirs",X);J(h,m,`from onResolve() callback in plugin ${V($)}`),f.id=A,x!=null&&(f.pluginName=x),O!=null&&(f.path=O),M!=null&&(f.namespace=M),P!=null&&(f.suffix=P),S!=null&&(f.external=S),j!=null&&(f.sideEffects=j),R!=null&&(f.pluginData=i.store(R)),g!=null&&(f.errors=fe(g,"errors",i,$,void 0)),F!=null&&(f.warnings=fe(F,"warnings",i,$,void 0)),T!=null&&(f.watchFiles=Ce(T,"watchFiles")),D!=null&&(f.watchDirs=Ce(D,"watchDirs"));break}}catch(h){f={id:A,errors:[he(h,o,i,C&&C(),$)]};break}r(w,f)},s["on-load"]=async(w,p)=>{let f={},$="",E,C;for(let A of p.ids)try{({name:$,callback:E,note:C}=B[A]);let h=await E({path:p.path,namespace:p.namespace,suffix:p.suffix,pluginData:i.load(p.pluginData),with:p.with});if(h!=null){if(typeof h!="object")throw new Error(`Expected onLoad() callback in plugin ${V($)} to return an object`);let m={},x=l(h,m,"pluginName",b),O=l(h,m,"contents",at),M=l(h,m,"resolveDir",b),P=l(h,m,"pluginData",Me),S=l(h,m,"loader",b),j=l(h,m,"errors",ce),R=l(h,m,"warnings",ce),g=l(h,m,"watchFiles",X),F=l(h,m,"watchDirs",X);J(h,m,`from onLoad() callback in plugin ${V($)}`),f.id=A,x!=null&&(f.pluginName=x),O instanceof Uint8Array?f.contents=O:O!=null&&(f.contents=ie(O)),M!=null&&(f.resolveDir=M),P!=null&&(f.pluginData=i.store(P)),S!=null&&(f.loader=S),j!=null&&(f.errors=fe(j,"errors",i,$,void 0)),R!=null&&(f.warnings=fe(R,"warnings",i,$,void 0)),g!=null&&(f.watchFiles=Ce(g,"watchFiles")),F!=null&&(f.watchDirs=Ce(F,"watchDirs"));break}}catch(h){f={id:A,errors:[he(h,o,i,C&&C(),$)]};break}r(w,f)};let z=(w,p)=>p([],[]);u.length>0&&(z=(w,p)=>{(async()=>{let f=[],$=[];for(let{name:E,callback:C,note:A}of u){let h,m;try{let x=await C(w);if(x!=null){if(typeof x!="object")throw new Error(`Expected onEnd() callback in plugin ${V(E)} to return an object`);let O={},M=l(x,O,"errors",ce),P=l(x,O,"warnings",ce);J(x,O,`from onEnd() callback in plugin ${V(E)}`),M!=null&&(h=fe(M,"errors",i,E,void 0)),P!=null&&(m=fe(P,"warnings",i,E,void 0))}}catch(x){h=[he(x,o,i,A&&A(),E)]}if(h){f.push(...h);try{w.errors.push(...h)}catch{}}if(m){$.push(...m);try{w.warnings.push(...m)}catch{}}}p(f,$)})()});let k=()=>{for(let w of _)setTimeout(()=>w(),0)};return W=!0,{ok:!0,requestPlugins:L,runOnEndCallbacks:z,scheduleOnDisposeCallbacks:k}};function ct(){let e=new Map,t=0;return{clear(){e.clear()},load(r){return e.get(r)},store(r){if(r===void 0)return-1;let n=t++;return e.set(n,r),n}}}function je(e,t,r){let n,o=!1;return()=>{if(o)return n;o=!0;try{let s=(e.stack+"").split(`
|
|
10
|
-
`);s.splice(1,1);let a=ft(t,s,r);if(a)return n={text:e.message,location:a},n}catch{}}}function he(e,t,r,n,o){let s="Internal error",a=null;try{s=(e&&e.message||e)+""}catch{}try{a=ft(t,(e.stack+"").split(`
|
|
11
|
-
`),"")}catch{}return{id:"",pluginName:o,text:s,location:a,notes:n?[n]:[],detail:r?r.store(e):-1}}function ft(e,t,r){let n=" at ";if(e.readFileSync&&!t[0].startsWith(n)&&t[1].startsWith(n))for(let o=1;o<t.length;o++){let s=t[o];if(s.startsWith(n))for(s=s.slice(n.length);;){let a=/^(?:new |async )?\S+ \((.*)\)$/.exec(s);if(a){s=a[1];continue}if(a=/^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(s),a){s=a[1];continue}if(a=/^(\S+):(\d+):(\d+)$/.exec(s),a){let d;try{d=e.readFileSync(a[1],"utf8")}catch{break}let i=d.split(/\r\n|\r|\n|\u2028|\u2029/)[+a[2]-1]||"",c=+a[3]-1,u=i.slice(c,c+r.length)===r?r.length:0;return{file:a[1],namespace:"file",line:+a[2],column:ie(i.slice(0,c)).length,length:ie(i.slice(c,c+u)).length,lineText:i+`
|
|
12
|
-
`+t.slice(1).join(`
|
|
13
|
-
`),suggestion:""}}break}}return null}function Ee(e,t,r){let n=5;e+=t.length<1?"":` with ${t.length} error${t.length<2?"":"s"}:`+t.slice(0,n+1).map((s,a)=>{if(a===n)return`
|
|
14
|
-
...`;if(!s.location)return`
|
|
15
|
-
error: ${s.text}`;let{file:d,line:i,column:c}=s.location,u=s.pluginName?`[plugin: ${s.pluginName}] `:"";return`
|
|
16
|
-
${d}:${i}:${c}: ERROR: ${u}${s.text}`}).join("");let o=new Error(e);for(let[s,a]of[["errors",t],["warnings",r]])Object.defineProperty(o,s,{configurable:!0,enumerable:!0,get:()=>a,set:d=>Object.defineProperty(o,s,{configurable:!0,enumerable:!0,value:d})});return o}function ke(e,t){for(let r of e)r.detail=t.load(r.detail);return e}function Ke(e,t,r){if(e==null)return null;let n={},o=l(e,n,"file",b),s=l(e,n,"namespace",b),a=l(e,n,"line",me),d=l(e,n,"column",me),i=l(e,n,"length",me),c=l(e,n,"lineText",b),u=l(e,n,"suggestion",b);if(J(e,n,t),c){let y=c.slice(0,(d&&d>0?d:0)+(i&&i>0?i:0)+(r&&r>0?r:80));!/[\x7F-\uFFFF]/.test(y)&&!/\n/.test(c)&&(c=y)}return{file:o||"",namespace:s||"",line:a||0,column:d||0,length:i||0,lineText:c||"",suggestion:u||""}}function fe(e,t,r,n,o){let s=[],a=0;for(let d of e){let i={},c=l(d,i,"id",b),u=l(d,i,"pluginName",b),y=l(d,i,"text",b),B=l(d,i,"location",He),_=l(d,i,"notes",ce),N=l(d,i,"detail",Me),I=`in element ${a} of "${t}"`;J(d,i,I);let L=[];if(_)for(let W of _){let z={},k=l(W,z,"text",b),w=l(W,z,"location",He);J(W,z,I),L.push({text:k||"",location:Ke(w,I,o)})}s.push({id:c||"",pluginName:u||n,text:y||"",location:Ke(B,I,o),notes:L,detail:r?r.store(N):-1}),a++}return s}function Ce(e,t){let r=[];for(let n of e){if(typeof n!="string")throw new Error(`${V(t)} must be an array of strings`);r.push(n)}return r}function Bt(e,t){let r=Object.create(null);for(let n in e){let o=e[n];if(typeof o!="string")throw new Error(`key ${V(n)} in object ${V(t)} must be a string`);r[n]=o}return r}function Nt({path:e,contents:t,hash:r}){let n=null;return{path:e,contents:t,hash:r,get text(){let o=this.contents;return(n===null||o!==t)&&(t=o,n=we(o)),n}}}function Le(e){let t=e.source;return e.flags&&(t=`(?${e.flags})${t}`),t}function It(e){let t;try{t=we(e)}catch{return At(e)}return JSON.parse(t)}var de=Y("fs"),Qe=Y("os"),ne=Y("path"),ve=process.env.ESBUILD_BINARY_PATH||ve,Rt=e=>!!e&&e!=="/usr/bin/esbuild",Ge="@esbuild/darwin-arm64",Xe="@esbuild/darwin-x64",Te={"win32 arm64 LE":"@esbuild/win32-arm64","win32 ia32 LE":"@esbuild/win32-ia32","win32 x64 LE":"@esbuild/win32-x64"},Fe={"aix ppc64 BE":"@esbuild/aix-ppc64","android arm64 LE":"@esbuild/android-arm64","darwin arm64 LE":"@esbuild/darwin-arm64","darwin x64 LE":"@esbuild/darwin-x64","freebsd arm64 LE":"@esbuild/freebsd-arm64","freebsd x64 LE":"@esbuild/freebsd-x64","linux arm LE":"@esbuild/linux-arm","linux arm64 LE":"@esbuild/linux-arm64","linux ia32 LE":"@esbuild/linux-ia32","linux mips64el LE":"@esbuild/linux-mips64el","linux ppc64 LE":"@esbuild/linux-ppc64","linux riscv64 LE":"@esbuild/linux-riscv64","linux s390x BE":"@esbuild/linux-s390x","linux x64 LE":"@esbuild/linux-x64","linux loong64 LE":"@esbuild/linux-loong64","netbsd arm64 LE":"@esbuild/netbsd-arm64","netbsd x64 LE":"@esbuild/netbsd-x64","openbsd arm64 LE":"@esbuild/openbsd-arm64","openbsd x64 LE":"@esbuild/openbsd-x64","sunos x64 LE":"@esbuild/sunos-x64"},Ze={"android arm LE":"@esbuild/android-arm","android x64 LE":"@esbuild/android-x64","openharmony arm64 LE":"@esbuild/openharmony-arm64"};function Ut(){let e,t,r=!1,n=`${process.platform} ${Qe.arch()} ${Qe.endianness()}`;if(n in Te)e=Te[n],t="esbuild.exe";else if(n in Fe)e=Fe[n],t="bin/esbuild";else if(n in Ze)e=Ze[n],t="bin/esbuild",r=!0;else throw new Error(`Unsupported platform: ${n}`);return{pkg:e,subpath:t,isWASM:r}}function Wt(){let e=Y.resolve("esbuild"),t=ne.dirname(ne.dirname(ne.dirname(e)));if(ne.basename(t)==="node_modules"){for(let r in Fe)try{let n=Fe[r];if(de.existsSync(ne.join(t,n)))return n}catch{}for(let r in Te)try{let n=Te[r];if(de.existsSync(ne.join(t,n)))return n}catch{}}return null}function zt(e,t){let r=ne.dirname(Y.resolve("esbuild"));return ne.join(r,`downloaded-${e.replace("/","-")}-${ne.basename(t)}`)}function qt(){if(Rt(ve))if(!de.existsSync(ve))console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ve}`);else return{binPath:ve,isWASM:!1};let{pkg:e,subpath:t,isWASM:r}=Ut(),n;try{n=Y.resolve(`${e}/${t}`)}catch(o){if(n=zt(e,t),!de.existsSync(n)){try{Y.resolve(e)}catch{let s=Wt();if(s){let a=`
|
|
17
|
-
Specifically the "${s}" package is present but this platform
|
|
18
|
-
needs the "${e}" package instead. People often get into this
|
|
19
|
-
situation by installing esbuild on Windows or macOS and copying "node_modules"
|
|
20
|
-
into a Docker image that runs Linux, or by copying "node_modules" between
|
|
21
|
-
Windows and WSL environments.
|
|
22
|
-
|
|
23
|
-
If you are installing with npm, you can try not copying the "node_modules"
|
|
24
|
-
directory when you copy the files over, and running "npm ci" or "npm install"
|
|
25
|
-
on the destination platform after the copy. Or you could consider using yarn
|
|
26
|
-
instead of npm which has built-in support for installing a package on multiple
|
|
27
|
-
platforms simultaneously.
|
|
28
|
-
|
|
29
|
-
If you are installing with yarn, you can try listing both this platform and the
|
|
30
|
-
other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
|
|
31
|
-
feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
|
|
32
|
-
Keep in mind that this means multiple copies of esbuild will be present.
|
|
33
|
-
`;throw(e===Xe&&s===Ge||e===Ge&&s===Xe)&&(a=`
|
|
34
|
-
Specifically the "${s}" package is present but this platform
|
|
35
|
-
needs the "${e}" package instead. People often get into this
|
|
36
|
-
situation by installing esbuild with npm running inside of Rosetta 2 and then
|
|
37
|
-
trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta
|
|
38
|
-
2 is Apple's on-the-fly x86_64-to-arm64 translation service).
|
|
39
|
-
|
|
40
|
-
If you are installing with npm, you can try ensuring that both npm and node are
|
|
41
|
-
not running under Rosetta 2 and then reinstalling esbuild. This likely involves
|
|
42
|
-
changing how you installed npm and/or node. For example, installing node with
|
|
43
|
-
the universal installer here should work: https://nodejs.org/en/download/. Or
|
|
44
|
-
you could consider using yarn instead of npm which has built-in support for
|
|
45
|
-
installing a package on multiple platforms simultaneously.
|
|
46
|
-
|
|
47
|
-
If you are installing with yarn, you can try listing both "arm64" and "x64"
|
|
48
|
-
in your ".yarnrc.yml" file using the "supportedArchitectures" feature:
|
|
49
|
-
https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
|
|
50
|
-
Keep in mind that this means multiple copies of esbuild will be present.
|
|
51
|
-
`),new Error(`
|
|
52
|
-
You installed esbuild for another platform than the one you're currently using.
|
|
53
|
-
This won't work because esbuild is written with native code and needs to
|
|
54
|
-
install a platform-specific binary executable.
|
|
55
|
-
${a}
|
|
56
|
-
Another alternative is to use the "esbuild-wasm" package instead, which works
|
|
57
|
-
the same way on all platforms. But it comes with a heavy performance cost and
|
|
58
|
-
can sometimes be 10x slower than the "esbuild" package, so you may also not
|
|
59
|
-
want to do that.
|
|
60
|
-
`)}throw new Error(`The package "${e}" could not be found, and is needed by esbuild.
|
|
61
|
-
|
|
62
|
-
If you are installing esbuild with npm, make sure that you don't specify the
|
|
63
|
-
"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature
|
|
64
|
-
of "package.json" is used by esbuild to install the correct binary executable
|
|
65
|
-
for your current platform.`)}throw o}}if(/\.zip\//.test(n)){let o;try{o=Y("pnpapi")}catch{}if(o){let s=o.getPackageInformation(o.topLevel).packageLocation,a=ne.join(s,"node_modules",".cache","esbuild",`pnpapi-${e.replace("/","-")}-0.27.7-${ne.basename(t)}`);return de.existsSync(a)||(de.mkdirSync(ne.dirname(a),{recursive:!0}),de.copyFileSync(n,a),de.chmodSync(a,493)),{binPath:a,isWASM:r}}}return{binPath:n,isWASM:r}}var dt=Y("child_process"),Jt=Y("crypto"),We=Y("path"),pe=Y("fs"),Vt=Y("os"),Yt=Y("tty"),H;if(process.env.ESBUILD_WORKER_THREADS!=="0"){try{H=Y("worker_threads")}catch{}let[e,t]=process.versions.node.split(".");(+e<12||+e==12&&+t<17||+e==13&&+t<13)&&(H=void 0)}var et,Oe=((et=H?.workerData)==null?void 0:et.esbuildVersion)==="0.27.7",ht=()=>{if(!ve&&(We.basename(__filename)!=="main.js"||We.basename(__dirname)!=="lib"))throw new Error(`The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle.
|
|
66
|
-
|
|
67
|
-
More information: The file containing the code for esbuild's JavaScript API (${__filename}) does not appear to be inside the esbuild package on the file system, which usually means that the esbuild package was bundled into another file. This is problematic because the API needs to run a binary executable inside the esbuild package which is located using a relative path from the API code to the executable. If the esbuild package is bundled, the relative path will be incorrect and the executable won't be found.`);{let{binPath:e,isWASM:t}=qt();return t?["node",[e]]:[e,[]]}},Ae=()=>Yt.isatty(2),Ht={readFile(e,t){try{let r=pe.readFileSync(e,"utf8");try{pe.unlinkSync(e)}catch{}t(null,r)}catch(r){t(r,null)}},writeFile(e,t){try{let r=mt();pe.writeFileSync(r,e),t(r)}catch{t(null)}}},Kt={readFile(e,t){try{pe.readFile(e,"utf8",(r,n)=>{try{pe.unlink(e,()=>t(r,n))}catch{t(r,n)}})}catch(r){t(r,null)}},writeFile(e,t){try{let r=mt();pe.writeFile(r,e,n=>t(n!==null?null:r))}catch{t(null)}}},Qt="0.27.7",Gt=e=>ye().build(e),Xt=e=>ye().context(e),Zt=(e,t)=>ye().transform(e,t),er=(e,t)=>ye().formatMessages(e,t),tr=(e,t)=>ye().analyzeMetafile(e,t),rr=e=>{if(H&&!Oe)return K||(K=Ie(H)),K.buildSync(e);let t;return Ne(r=>r.buildOrContext({callName:"buildSync",refs:null,options:e,isTTY:Ae(),defaultWD:ge,callback:(n,o)=>{if(n)throw n;t=o}})),t},nr=(e,t)=>{if(H&&!Oe)return K||(K=Ie(H)),K.transformSync(e,t);let r;return Ne(n=>n.transform({callName:"transformSync",refs:null,input:e,options:t||{},isTTY:Ae(),fs:Ht,callback:(o,s)=>{if(o)throw o;r=s}})),r},ir=(e,t)=>{if(H&&!Oe)return K||(K=Ie(H)),K.formatMessagesSync(e,t);let r;return Ne(n=>n.formatMessages({callName:"formatMessagesSync",refs:null,messages:e,options:t,callback:(o,s)=>{if(o)throw o;r=s}})),r},lr=(e,t)=>{if(H&&!Oe)return K||(K=Ie(H)),K.analyzeMetafileSync(e,t);let r;return Ne(n=>n.analyzeMetafile({callName:"analyzeMetafileSync",refs:null,metafile:typeof e=="string"?e:JSON.stringify(e),options:t,callback:(o,s)=>{if(o)throw o;r=s}})),r},ar=()=>(_e&&_e(),K&&K.stop(),Promise.resolve()),ze=!1,or=e=>{if(e=Dt(e||{}),e.wasmURL)throw new Error('The "wasmURL" option only works in the browser');if(e.wasmModule)throw new Error('The "wasmModule" option only works in the browser');if(e.worker)throw new Error('The "worker" option only works in the browser');if(ze)throw new Error('Cannot call "initialize" more than once');return ye(),ze=!0,Promise.resolve()},ge=process.cwd(),Se,_e,ye=()=>{if(Se)return Se;let[e,t]=ht(),r=dt.spawn(e,t.concat("--service=0.27.7","--ping"),{windowsHide:!0,stdio:["pipe","pipe","inherit"],cwd:ge}),{readFromStdout:n,afterClose:o,service:s}=ut({writeToStdin(u){r.stdin.write(u,y=>{y&&o(y)})},readFileSync:pe.readFileSync,isSync:!1,hasFS:!0,esbuild:Pe});r.stdin.on("error",o),r.on("error",o);let a=r.stdin,d=r.stdout;d.on("data",n),d.on("end",o),_e=()=>{a.destroy(),d.destroy(),r.kill(),ze=!1,Se=void 0,_e=void 0};let i=0;r.unref(),a.unref&&a.unref(),d.unref&&d.unref();let c={ref(){++i===1&&r.ref()},unref(){--i===0&&r.unref()}};return Se={build:u=>new Promise((y,B)=>{s.buildOrContext({callName:"build",refs:c,options:u,isTTY:Ae(),defaultWD:ge,callback:(_,N)=>_?B(_):y(N)})}),context:u=>new Promise((y,B)=>s.buildOrContext({callName:"context",refs:c,options:u,isTTY:Ae(),defaultWD:ge,callback:(_,N)=>_?B(_):y(N)})),transform:(u,y)=>new Promise((B,_)=>s.transform({callName:"transform",refs:c,input:u,options:y||{},isTTY:Ae(),fs:Kt,callback:(N,I)=>N?_(N):B(I)})),formatMessages:(u,y)=>new Promise((B,_)=>s.formatMessages({callName:"formatMessages",refs:c,messages:u,options:y,callback:(N,I)=>N?_(N):B(I)})),analyzeMetafile:(u,y)=>new Promise((B,_)=>s.analyzeMetafile({callName:"analyzeMetafile",refs:c,metafile:typeof u=="string"?u:JSON.stringify(u),options:y,callback:(N,I)=>N?_(N):B(I)}))},Se},Ne=e=>{let[t,r]=ht(),n=new Uint8Array,{readFromStdout:o,afterClose:s,service:a}=ut({writeToStdin(i){if(n.length!==0)throw new Error("Must run at most one command");n=i},isSync:!0,hasFS:!0,esbuild:Pe});e(a);let d=dt.execFileSync(t,r.concat("--service=0.27.7"),{cwd:ge,windowsHide:!0,input:n,maxBuffer:+process.env.ESBUILD_MAX_BUFFER||16*1024*1024});o(d),s(null)},mt=()=>We.join(Vt.tmpdir(),`esbuild-${Jt.randomBytes(32).toString("hex")}`),K=null,Ie=e=>{let{port1:t,port2:r}=new e.MessageChannel,n=new e.Worker(__filename,{workerData:{workerPort:r,defaultWD:ge,esbuildVersion:"0.27.7"},transferList:[r],execArgv:[]}),o=0,s=c=>{let u=new Error(`Build failed with 1 error:
|
|
68
|
-
error: ${c}`),y=[{id:"",pluginName:"",text:c,location:null,notes:[],detail:void 0}];return u.errors=y,u.warnings=[],u},a=c=>{if(!c)return;let u=c.plugins;if(u&&u.length>0)throw s("Cannot use plugins in synchronous API calls")},d=(c,u)=>{for(let y in u)c[y]=u[y]},i=(c,u)=>{let y=o++,B=new SharedArrayBuffer(8),_=new Int32Array(B),N={sharedBuffer:B,id:y,command:c,args:u};n.postMessage(N);let I=Atomics.wait(_,0,0);if(I!=="ok"&&I!=="not-equal")throw new Error("Internal error: Atomics.wait() failed: "+I);let{message:{id:L,resolve:W,reject:z,properties:k}}=e.receiveMessageOnPort(t);if(y!==L)throw new Error(`Internal error: Expected id ${y} but got id ${L}`);if(z)throw d(z,k),z;return W};return n.unref(),{buildSync(c){return a(c),i("build",[c])},transformSync(c,u){return i("transform",[c,u])},formatMessagesSync(c,u){return i("formatMessages",[c,u])},analyzeMetafileSync(c,u){return i("analyzeMetafile",[c,u])},stop(){n.terminate(),K=null}}},sr=()=>{let e=H.workerData.workerPort,t=H.parentPort,r=n=>{let o={};if(n&&typeof n=="object")for(let s in n)o[s]=n[s];return o};try{let n=ye();ge=H.workerData.defaultWD,t.on("message",o=>{(async()=>{let{sharedBuffer:s,id:a,command:d,args:i}=o,c=new Int32Array(s);try{switch(d){case"build":e.postMessage({id:a,resolve:await n.build(i[0])});break;case"transform":e.postMessage({id:a,resolve:await n.transform(i[0],i[1])});break;case"formatMessages":e.postMessage({id:a,resolve:await n.formatMessages(i[0],i[1])});break;case"analyzeMetafile":e.postMessage({id:a,resolve:await n.analyzeMetafile(i[0],i[1])});break;default:throw new Error(`Invalid command: ${d}`)}}catch(u){e.postMessage({id:a,reject:u,properties:r(u)})}Atomics.add(c,0,1),Atomics.notify(c,0,1/0)})()})}catch(n){t.on("message",o=>{let{sharedBuffer:s,id:a}=o,d=new Int32Array(s);e.postMessage({id:a,reject:n,properties:r(n)}),Atomics.add(d,0,1),Atomics.notify(d,0,1/0)})}};Oe&&sr();var ur=Pe});export default cr();
|
package/dist/node-RONF2ICS.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';
|
|
2
|
-
const require = createRequire(import.meta.url);
|
|
3
|
-
import{a as I,b as j,c as Ie,d as h,f as Ee}from"./chunk-KNI7SFGP.js";var $e,N=Ie(()=>{$e=j({})});var O=h((Je,D)=>{"use strict";var q=()=>process.platform==="linux",E=null,Ae=()=>{if(!E)if(q()&&process.report){let e=process.report.excludeNetwork;process.report.excludeNetwork=!0,E=process.report.getReport(),process.report.excludeNetwork=e}else E={};return E};D.exports={isLinux:q,getReport:Ae}});var G=h((Ye,v)=>{"use strict";var S=I("fs"),Ve="/usr/bin/ldd",ke="/proc/self/exe",A=2048,Re=e=>{let t=S.openSync(e,"r"),n=Buffer.alloc(A),o=S.readSync(t,n,0,A,0);return S.close(t,()=>{}),n.subarray(0,o)},Ne=e=>new Promise((t,n)=>{S.open(e,"r",(o,r)=>{if(o)n(o);else{let s=Buffer.alloc(A);S.read(r,s,0,A,0,(l,u)=>{t(s.subarray(0,u)),S.close(r,()=>{})})}})});v.exports={LDD_PATH:Ve,SELF_PATH:ke,readFileSync:Re,readFile:Ne}});var H=h((Ze,B)=>{"use strict";var Pe=e=>{if(e.length<64||e.readUInt32BE(0)!==2135247942||e.readUInt8(4)!==2||e.readUInt8(5)!==1)return null;let t=e.readUInt32LE(32),n=e.readUInt16LE(54),o=e.readUInt16LE(56);for(let r=0;r<o;r++){let s=t+r*n;if(e.readUInt32LE(s)===3){let u=e.readUInt32LE(s+8),a=e.readUInt32LE(s+32);return e.subarray(u,u+a).toString().replace(/\0.*$/g,"")}}return null};B.exports={interpreterPath:Pe}});var ce=h((et,ae)=>{"use strict";var z=I("child_process"),{isLinux:C,getReport:K}=O(),{LDD_PATH:V,SELF_PATH:$,readFile:P,readFileSync:T}=G(),{interpreterPath:W}=H(),f,d,p,X="getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true",b="",J=()=>b||new Promise(e=>{z.exec(X,(t,n)=>{b=t?" ":n,e(b)})}),Y=()=>{if(!b)try{b=z.execSync(X,{encoding:"utf8"})}catch{b=" "}return b},y="glibc",Z=/LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i,x="musl",Te=e=>e.includes("libc.musl-")||e.includes("ld-musl-"),ee=()=>{let e=K();return e.header&&e.header.glibcVersionRuntime?y:Array.isArray(e.sharedObjects)&&e.sharedObjects.some(Te)?x:null},te=e=>{let[t,n]=e.split(/[\r\n]+/);return t&&t.includes(y)?y:n&&n.includes(x)?x:null},ne=e=>{if(e){if(e.includes("/ld-musl-"))return x;if(e.includes("/ld-linux-"))return y}return null},re=e=>(e=e.toString(),e.includes("musl")?x:e.includes("GNU C Library")?y:null),_e=async()=>{if(d!==void 0)return d;d=null;try{let e=await P(V);d=re(e)}catch{}return d},Ue=()=>{if(d!==void 0)return d;d=null;try{let e=T(V);d=re(e)}catch{}return d},Me=async()=>{if(f!==void 0)return f;f=null;try{let e=await P($),t=W(e);f=ne(t)}catch{}return f},je=()=>{if(f!==void 0)return f;f=null;try{let e=T($),t=W(e);f=ne(t)}catch{}return f},oe=async()=>{let e=null;if(C()&&(e=await Me(),!e&&(e=await _e(),e||(e=ee()),!e))){let t=await J();e=te(t)}return e},le=()=>{let e=null;if(C()&&(e=je(),!e&&(e=Ue(),e||(e=ee()),!e))){let t=Y();e=te(t)}return e},qe=async()=>C()&&await oe()!==y,De=()=>C()&&le()!==y,Oe=async()=>{if(p!==void 0)return p;p=null;try{let t=(await P(V)).match(Z);t&&(p=t[1])}catch{}return p},ve=()=>{if(p!==void 0)return p;p=null;try{let t=T(V).match(Z);t&&(p=t[1])}catch{}return p},se=()=>{let e=K();return e.header&&e.header.glibcVersionRuntime?e.header.glibcVersionRuntime:null},Q=e=>e.trim().split(/\s+/)[1],ue=e=>{let[t,n,o]=e.split(/[\r\n]+/);return t&&t.includes(y)?Q(t):n&&o&&n.includes(x)?Q(o):null},Ge=async()=>{let e=null;if(C()&&(e=await Oe(),e||(e=se()),!e)){let t=await J();e=ue(t)}return e},Be=()=>{let e=null;if(C()&&(e=ve(),e||(e=se()),!e)){let t=Y();e=ue(t)}return e};ae.exports={GLIBC:y,MUSL:x,family:oe,familySync:le,isNonGlibcLinux:qe,isNonGlibcLinuxSync:De,version:Ge,versionSync:Be}});var fe=h((tt,ie)=>{var He={and_chr:"chrome",and_ff:"firefox",ie_mob:"ie",op_mob:"opera",and_qq:null,and_uc:null,baidu:null,bb:null,kaios:null,op_mini:null};function Qe(e){let t={};for(let n of e){let[o,r]=n.split(" ");if(He[o]===null)continue;let s=ze(r);s!=null&&(t[o]==null||s<t[o])&&(t[o]=s)}return t}function ze(e){let[t,n=0,o=0]=e.split("-")[0].split(".").map(r=>parseInt(r,10));return isNaN(t)||isNaN(n)||isNaN(o)?null:t<<16|n<<8|o}ie.exports=Qe});var Fe=h((nt,xe)=>{function he(e){if(e.length===1)return e[0];if(e.some(n=>typeof n=="function"))return n=>{let o=e.map(r=>typeof r=="function"?r(n):r);return he(o)};let t={};return c(t,e,"StyleSheet"),c(t,e,"StyleSheetExit"),k(t,e,"Rule",me,de),k(t,e,"RuleExit",me,de),k(t,e,"Declaration",ye,pe),k(t,e,"DeclarationExit",ye,pe),c(t,e,"Url"),c(t,e,"Color"),c(t,e,"Image"),c(t,e,"ImageExit"),c(t,e,"Length"),c(t,e,"Angle"),c(t,e,"Ratio"),c(t,e,"Resolution"),c(t,e,"Time"),c(t,e,"CustomIdent"),c(t,e,"DashedIdent"),_(t,e,"MediaQuery"),_(t,e,"MediaQueryExit"),c(t,e,"SupportsCondition"),c(t,e,"SupportsConditionExit"),_(t,e,"Selector"),F(t,e,"Token","token",!1),F(t,e,"Function","function",!1),F(t,e,"FunctionExit","function",!0),F(t,e,"Variable","var",!1),F(t,e,"VariableExit","var",!0),F(t,e,"EnvironmentVariable","env",!1),F(t,e,"EnvironmentVariableExit","env",!0),t}xe.exports=he;function de(e,t){return e==="unknown"?(n=>t({type:"unknown",value:n})):e==="custom"?(n=>t({type:"custom",value:n})):t}function pe(e,t){return e==="custom"?(n=>t({property:"custom",value:n})):t}function me(e,t){if(typeof e=="object"){if(t.type==="unknown"){let n=e.unknown;return typeof n=="object"&&(n=n[t.value.name]),n?.(t.value)}if(t.type==="custom"){let n=e.custom;return typeof n=="object"&&(n=n[t.value.name]),n?.(t.value)}return e[t.type]?.(t)}return e?.(t)}function ye(e,t){if(typeof e=="object"){let n=t.property;if(t.property==="unparsed")n=t.value.propertyId.property;else if(t.property==="custom"){let o=e.custom;return typeof o=="object"&&(o=o[t.value.name]),o?.(t.value)}return e[n]?.(t)}return e?.(t)}function be(e,t){let n=[],o=!1,r=new Set;for(let s of e){let l=s[t];if(l){if(typeof l=="function")o=!0;else for(let u in l)r.add(u);n.push(l)}}return[n,o,r]}function k(e,t,n,o,r){let[s,l,u]=be(t,n);if(s.length===0)return;if(s.length===1){e[n]=s[0];return}let a=M(t,(m,i)=>o(m[n],i));if(l)e[n]=a;else{let m={};for(let i of u)m[i]=r(i,a);e[n]=m}}function F(e,t,n,o,r){let[s,l,u]=be(t,n);if(s.length===0)return;if(s.length===1){e[n]=s[0];return}let a=Ke(t,o,r);if(l)e[n]=a;else{let m={};for(let i of u)m[i]=a;e[n]=m}}function Ke(e,t,n){let o=M(e,(r,s)=>{let l;switch(s.type){case"token":l=r.Token,typeof l=="object"&&(l=l[s.value.type]);break;case"function":l=n?r.FunctionExit:r.Function,typeof l=="object"&&(l=l[s.value.name]);break;case"var":l=n?r.VariableExit:r.Variable;break;case"env":if(l=n?r.EnvironmentVariableExit:r.EnvironmentVariable,typeof l=="object"){let a;switch(s.value.name.type){case"ua":case"unknown":a=s.value.name.value;break;case"custom":a=s.value.name.ident;break}l=l[a]}break;case"color":l=r.Color;break;case"url":l=r.Url;break;case"length":l=r.Length;break;case"angle":l=r.Angle;break;case"time":l=r.Time;break;case"resolution":l=r.Resolution;break;case"dashed-ident":l=r.DashedIdent;break}if(!l)return;let u=l(s.value);switch(s.type){case"color":case"url":case"length":case"angle":case"time":case"resolution":case"dashed-ident":Array.isArray(u)?u=u.map(a=>({type:s.type,value:a})):u&&(u={type:s.type,value:u});break}return u});return r=>o({type:t,value:r})}function ge(e,t){let n=[];for(let o of e){let r=o[t];r&&n.push(r)}return n}function c(e,t,n){let o=ge(t,n);if(o.length!==0){if(o.length===1){e[n]=o[0];return}e[n]=r=>{let s=!1;for(let l of o){let u=l(r);u&&(r=u,s=!0)}return s?r:void 0}}}function _(e,t,n){let o=ge(t,n);if(o.length!==0){if(o.length===1){e[n]=o[0];return}e[n]=M(o,(r,s)=>r(s))}}function M(e,t){let n=new U(e.length);return o=>{let r=[o],s=!1;n.clear();for(let l=0;l<r.length;l++)for(let u=0;u<e.length&&l<r.length;){if(n.get(u)){u++;continue}let a=r[l],m=e[u],i=t(m,a);Array.isArray(i)?(i.length===0?r.splice(l,1):i.length===1?r[l]=i[0]:r.splice(l,1,...i),s=!0,n.set(u),u=0):i?(r[l]=i,s=!0,n.set(u),u=0):u++}if(s)return r.length===1?r[0]:r}}var U=class{constructor(t=32){this.bits=0,this.more=t>32?new Uint32Array(Math.ceil((t-32)/32)):null}get(t){if(t>=32&&this.more){let n=Math.floor((t-32)/32),o=t%32;return!!(this.more[n]&1<<o)}else return!!(this.bits&1<<t)}set(t){if(t>=32&&this.more){let n=Math.floor((t-32)/32),o=t%32;this.more[n]|=1<<o}else this.bits|=1<<t}clear(){this.bits=0,this.more&&this.more.fill(0)}}});var Ce=h(Se=>{Se.Features={Nesting:1,NotSelectorList:2,DirSelector:4,LangSelectorList:8,IsSelector:16,TextDecorationThicknessPercent:32,MediaIntervalSyntax:64,MediaRangeSyntax:128,CustomMediaQueries:256,ClampFunction:512,ColorFunction:1024,OklabColors:2048,LabColors:4096,P3Colors:8192,HexAlphaColors:16384,SpaceSeparatedColorNotation:32768,FontFamilySystemUi:65536,DoublePositionGradients:131072,VendorPrefixes:262144,LogicalProperties:524288,LightDark:1048576,Selectors:31,MediaQueries:448,Colors:1113088}});var we=h((ot,g)=>{N();var w=[process.platform,process.arch];if(process.platform==="linux"){let{MUSL:e,familySync:t}=ce();t()===e?w.push("musl"):process.arch==="arm"?w.push("gnueabihf"):w.push("gnu")}else process.platform==="win32"&&w.push("msvc");var L;try{L=I(`lightningcss-${w.join("-")}`)}catch{L=$e(`../lightningcss.${w.join("-")}.node`)}g.exports.transform=R(L.transform);g.exports.transformStyleAttribute=R(L.transformStyleAttribute);g.exports.bundle=R(L.bundle);g.exports.bundleAsync=R(L.bundleAsync);g.exports.browserslistToTargets=fe();g.exports.composeVisitors=Fe();g.exports.Features=Ce().Features;function R(e){return t=>{if(typeof t.visitor=="function"){let n=[];t.visitor=t.visitor({addDependency(r){n.push(r)}});let o=e(t);return o instanceof Promise?o=o.then(r=>(n.length&&(r.dependencies??=[],r.dependencies.push(...n)),r)):n.length&&(o.dependencies??=[],o.dependencies.push(...n)),o}else return e(t)}}});var Le=Ee(we(),1),{transform:ut,transformStyleAttribute:at,bundle:ct,bundleAsync:it,browserslistToTargets:ft,composeVisitors:dt,Features:pt}=Le.default;export{pt as Features,ft as browserslistToTargets,ct as bundle,it as bundleAsync,dt as composeVisitors,ut as transform,at as transformStyleAttribute};
|
package/dist/postcss-INPVFW34.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';
|
|
2
|
-
const require = createRequire(import.meta.url);
|
|
3
|
-
import{a as J,d as y,f as Un}from"./chunk-KNI7SFGP.js";var Ye=y((Js,He)=>{var Ae=process||{},Nt=Ae.argv||[],Ee=Ae.env||{},Bn=!(Ee.NO_COLOR||Nt.includes("--no-color"))&&(!!Ee.FORCE_COLOR||Nt.includes("--color")||Ae.platform==="win32"||(Ae.stdout||{}).isTTY&&Ee.TERM!=="dumb"||!!Ee.CI),Dn=(i,e,t=i)=>r=>{let n=""+r,s=n.indexOf(e,i.length);return~s?i+Fn(n,e,t,s)+e:i+n+e},Fn=(i,e,t,r)=>{let n="",s=0;do n+=i.substring(s,r)+t,s=r+e.length,r=i.indexOf(e,s);while(~r);return n+i.substring(s)},qt=(i=Bn)=>{let e=i?Dn:()=>String;return{isColorSupported:i,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};He.exports=qt();He.exports.createColors=qt});var Ke=y((Hs,Tt)=>{"use strict";var Le=/[\t\n\f\r "#'()/;[\\\]{}]/g,Me=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,jn=/.[\r\n"'(/\\]/,kt=/[\da-f]/i;Tt.exports=function(e,t={}){let r=e.css.valueOf(),n=t.ignoreErrors,s,o,u,l,f,a,p,c,h,g,w=r.length,m=0,C=[],A=[],j=-1;function ie(){return m}function B(Q){throw e.error("Unclosed "+Q,m)}function $(){return A.length===0&&m>=w}function kn(Q){if(A.length)return A.pop();if(m>=w)return;let Je=Q?Q.ignoreUnclosed:!1;switch(s=r.charCodeAt(m),s){case 10:case 32:case 9:case 13:case 12:{l=m;do l+=1,s=r.charCodeAt(l);while(s===32||s===10||s===9||s===13||s===12);a=["space",r.slice(m,l)],m=l-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let Pt=String.fromCharCode(s);a=[Pt,Pt,m];break}case 40:{if(g=C.length?C.pop()[1]:"",h=r.charCodeAt(m+1),g==="url"&&h!==39&&h!==34&&h!==32&&h!==10&&h!==9&&h!==12&&h!==13){l=m;do{if(p=!1,l=r.indexOf(")",l+1),l===-1)if(n||Je){l=m;break}else B("bracket");for(c=l;r.charCodeAt(c-1)===92;)c-=1,p=!p}while(p);a=["brackets",r.slice(m,l+1),m,l],m=l}else m<=j?a=["(","(",m]:(l=r.indexOf(")",m+1),o=r.slice(m,l+1),l===-1||jn.test(o)?(j=l===-1?w:l,a=["(","(",m]):(a=["brackets",o,m,l],m=l));break}case 39:case 34:{f=s===39?"'":'"',l=m;do{if(p=!1,l=r.indexOf(f,l+1),l===-1)if(n||Je){l=m+1;break}else B("string");for(c=l;r.charCodeAt(c-1)===92;)c-=1,p=!p}while(p);a=["string",r.slice(m,l+1),m,l],m=l;break}case 64:{Le.lastIndex=m+1,Le.test(r),Le.lastIndex===0?l=r.length-1:l=Le.lastIndex-2,a=["at-word",r.slice(m,l+1),m,l],m=l;break}case 92:{for(l=m,u=!0;r.charCodeAt(l+1)===92;)l+=1,u=!u;if(s=r.charCodeAt(l+1),u&&s!==47&&s!==32&&s!==10&&s!==9&&s!==13&&s!==12&&(l+=1,kt.test(r.charAt(l)))){for(;kt.test(r.charAt(l+1));)l+=1;r.charCodeAt(l+1)===32&&(l+=1)}a=["word",r.slice(m,l+1),m,l],m=l;break}default:{s===47&&r.charCodeAt(m+1)===42?(l=r.indexOf("*/",m+2)+1,l===0&&(n||Je?l=r.length:B("comment")),a=["comment",r.slice(m,l+1),m,l],m=l):(Me.lastIndex=m+1,Me.test(r),Me.lastIndex===0?l=r.length-1:l=Me.lastIndex-2,a=["word",r.slice(m,l+1),m,l],C.push(a),m=l);break}}return m++,a}function Tn(Q){A.push(Q)}return{back:Tn,endOfFile:$,nextToken:kn,position:ie}}});var Xe=y((Ys,Dt)=>{"use strict";var E=Ye(),Gn=Ke(),Ut;function zn(i){Ut=i}var Wn={";":E.yellow,":":E.yellow,"(":E.cyan,")":E.cyan,"[":E.yellow,"]":E.yellow,"{":E.yellow,"}":E.yellow,"at-word":E.cyan,brackets:E.cyan,call:E.cyan,class:E.yellow,comment:E.gray,hash:E.magenta,string:E.green};function Vn([i,e],t){if(i==="word"){if(e[0]===".")return"class";if(e[0]==="#")return"hash"}if(!t.endOfFile()){let r=t.nextToken();if(t.back(r),r[0]==="brackets"||r[0]==="(")return"call"}return i}function Bt(i){let e=Gn(new Ut(i),{ignoreErrors:!0}),t="";for(;!e.endOfFile();){let r=e.nextToken(),n=Wn[Vn(r,e)];n?t+=r[1].split(/\r?\n/).map(s=>n(s)).join(`
|
|
4
|
-
`):t+=r[1]}return t}Bt.registerInput=zn;Dt.exports=Bt});var Re=y((Ks,Gt)=>{"use strict";var Ft=Ye(),jt=Xe(),se=class i extends Error{constructor(e,t,r,n,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Ft.isColorSupported);let r=a=>a,n=a=>a,s=a=>a;if(e){let{bold:a,gray:p,red:c}=Ft.createColors(!0);n=h=>a(c(h)),r=h=>p(h),jt&&(s=h=>jt(h))}let o=t.split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,o.length),f=String(l).length;return o.slice(u,l).map((a,p)=>{let c=u+1+p,h=" "+(" "+c).slice(-f)+" | ";if(c===this.line){if(a.length>160){let w=20,m=Math.max(0,this.column-w),C=Math.max(this.column+w,this.endColumn+w),A=a.slice(m,C),j=r(h.replace(/\d/g," "))+a.slice(0,Math.min(this.column-1,w-1)).replace(/[^\t]/g," ");return n(">")+r(h)+s(A)+`
|
|
5
|
-
`+j+n("^")}let g=r(h.replace(/\d/g," "))+a.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(h)+s(a)+`
|
|
6
|
-
`+g+n("^")}return" "+r(h)+s(a)}).join(`
|
|
7
|
-
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
8
|
-
|
|
9
|
-
`+e+`
|
|
10
|
-
`),this.name+": "+this.message+e}};Gt.exports=se;se.default=se});var Ze=y((Xs,Qt)=>{"use strict";var $n=/(<)(\/?style\b)/gi,Qn=/(<)(!--)/g,Jn=/[\t\n\f\r "#'()/;[\\\]{}]/;function R(i){return typeof i!="string"||!i.includes("<")?i:i.replace($n,"\\3c $2").replace(Qn,"\\3c $2")}var zt={after:`
|
|
11
|
-
`,beforeClose:`
|
|
12
|
-
`,beforeComment:`
|
|
13
|
-
`,beforeDecl:`
|
|
14
|
-
`,beforeOpen:" ",beforeRule:`
|
|
15
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Hn(i){return i[0].toUpperCase()+i.slice(1)}function Wt(i,e){let t="@"+e.name,r=e.params?i.rawValue(e,"params"):"",n=e.raws.afterName;return typeof n>"u"?n=r?" ":"":n===""&&r&&!Jn.test(r[0])&&(n=" "),t+n+r}function $t(i,e,t){let r=t.nodes,n=r.length-1;for(;n>0&&r[n].type==="comment";)n-=1;let s=i.raw(t,"semicolon"),o=t.type==="document";for(let u=r.length-1;u>=0;u--){let l=r[u],f=n!==u||s;!f&&u<r.length-1&&(l.type==="atrule"&&!l.nodes||l.type==="decl"&&l.prop.startsWith("--"))&&(f=!0),e.push({document:o,node:l,semicolon:f})}}function Vt(i,e,t,r){let n=i.raw(t,"between","beforeOpen");i.builder(R(r+n)+"{",t,"start");let s=t.nodes&&t.nodes.length,o=()=>{let u=s?i.raw(t,"after"):i.raw(t,"after","emptyBody");u&&i.builder(R(u)),i.builder("}",t,"end"),t.type==="rule"&&t.raws.ownSemicolon&&i.builder(R(t.raws.ownSemicolon),t,"end")};s?(e.push(o),$t(i,e,t)):o()}var oe=class i{constructor(e){this.builder=e}atrule(e,t){let r=Wt(this,e);if(e.nodes)this.block(e,r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(R(r+n),e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&n.type!=="root";)s+=1,n=n.parent;if(r.includes(`
|
|
16
|
-
`)){let o=this.raw(e,null,"indent");if(o.length)for(let u=0;u<s;u++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(R(t+r)+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(R(n)),this.builder("}",e,"end")}body(e){let t=i.prototype,r=["atrule","block","body","rule","stringify"].every(s=>this[s]===t[s]),n=[];for($t(this,n,e);n.length>0;){let s=n.pop();if(typeof s=="function"){s();continue}let o=s.node,u=this.raw(o,"before");u&&this.builder(s.document?u:R(u)),r&&o.type==="rule"?Vt(this,n,o,this.rawValue(o,"selector")):r&&o.type==="atrule"&&o.nodes?Vt(this,n,o,Wt(this,o)):this.stringify(o,s.semicolon)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(R("/*"+t+e.text+r+"*/"),e)}decl(e,t){let r=e.raws,n=this.raw(e,"between","colon"),s=e.prop+n+this.rawValue(e,"value");e.important&&(s+=r.important||" !important"),t&&(s+=";"),this.builder(R(s),e)}document(e){this.body(e)}raw(e,t,r){let n;if(r||(r=t),t&&(n=e.raws[t],typeof n<"u"))return n;let s=e.parent;if(r==="before"&&(!s||s.type==="root"&&s.first===e||s&&s.type==="document"))return"";if(!s)return zt[r];let o=e.root(),u=o.rawCache||(o.rawCache={});if(typeof u[r]<"u")return u[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+Hn(r);this[l]?n=this[l](o,e):o.walk(f=>{if(n=f.raws[t],typeof n<"u")return!1})}return typeof n>"u"&&(n=zt[r]),u[r]=n,n}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
|
|
17
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
|
|
18
|
-
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
|
|
19
|
-
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
|
|
20
|
-
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){let s=r.raws.before.split(`
|
|
21
|
-
`);return t=s[s.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){if(e.source&&e.source.input.hasBOM&&this.builder("\uFEFF",e,"start"),this.body(e),e.raws.after){let t=e.raws.after,r=e.parent&&e.parent.type==="document";this.builder(r?t:R(t))}}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(R(e.raws.ownSemicolon),e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};Qt.exports=oe;oe.default=oe});var le=y((Zs,Jt)=>{"use strict";var Yn=Ze();function et(i,e){new Yn(e).stringify(i)}Jt.exports=et;et.default=et});var ue=y((eo,tt)=>{"use strict";tt.exports.isClean=Symbol("isClean");tt.exports.my=Symbol("my")});var ce=y((to,Ht)=>{"use strict";var Kn=Re(),Xn=Ze(),Zn=le(),{isClean:ae,my:ei}=ue();function ti(i,e){let t=new i.constructor,r=[[i,t,e]];for(;r.length>0;){let[n,s,o]=r.pop();for(let u in n){if(!Object.prototype.hasOwnProperty.call(n,u)||u==="proxyCache")continue;let l=n[u],f=typeof l;if(u==="parent"&&f==="object")o&&(s[u]=o);else if(u==="source")s[u]=l;else if(Array.isArray(l)){let a=[];s[u]=a;for(let p of l){let c=new p.constructor;a.push(c),r.push([p,c,s])}}else{if(f==="object"&&l!==null){let a=new l.constructor;r.push([l,a,void 0]),l=a}s[u]=l}}}return t}function N(i,e){if(e&&typeof e.offset<"u")return e.offset;let t=1,r=1,n=0;for(let s=0;s<i.length;s++){if(r===e.line&&t===e.column){n=s;break}i[s]===`
|
|
22
|
-
`?(t=1,r+=1):t+=1}return n}var fe=class i{get proxyOf(){return this}constructor(e={}){this.raws={},this[ae]=!1,this[ei]=!0;for(let t of Object.keys(e))if(t!=="__proto__")if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"&&r.parent?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ti(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new Kn(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[ae]=!0}markDirty(){if(this[ae]){this[ae]=!1;let e=this;for(;e=e.parent;)e[ae]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:N(t,this.source.start)};if(e.index)r=this.positionInside(e.index);else if(e.word){let s=t.slice(N(t,this.source.start),N(t,this.source.end)).indexOf(e.word);s!==-1&&(r=this.positionInside(s))}return r}positionInside(e){let t=this.source.start.column,r=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,s=N(n,this.source.start),o=s+e;for(let u=s;u<o;u++)n[u]===`
|
|
23
|
-
`?(t=1,r+=1):t+=1;return{column:t,line:r,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:N(t,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:N(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let o=t.slice(N(t,this.source.start),N(t,this.source.end)).indexOf(e.word);o!==-1&&(r=this.positionInside(o),n=this.positionInside(o+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:N(t,e.start)}:typeof e.index=="number"&&(r=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line,offset:N(t,e.end)}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):typeof e.index=="number"&&(n=this.positionInside(e.index+1));return(n.line<r.line||n.line===r.line&&n.column<=r.column)&&(n={column:r.column+1,line:r.line,offset:r.offset+1}),{end:n,start:r}}raw(e,t){return new Xn().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r=t==null;t=t||new Map;let n=[],s=[[this,n,0]];for(let u=0;u<s.length;u++){let[l,f,a]=s[u],p={};f[a]=p;for(let c in l){if(!Object.prototype.hasOwnProperty.call(l,c)||c==="parent"||c==="proxyCache")continue;let h=l[c];if(Array.isArray(h)){let g=[];p[c]=g;for(let w=0;w<h.length;w++){let m=h[w];typeof m=="object"&&m.toJSON?m.toJSON===i.prototype.toJSON?s.push([m,g,w]):g[w]=m.toJSON(null,t):g[w]=m}}else if(typeof h=="object"&&h.toJSON)h.toJSON===i.prototype.toJSON?s.push([h,p,c]):p[c]=h.toJSON(null,t);else if(c==="source"){if(h==null)continue;let g=t.get(h.input);g==null&&(g=t.size,t.set(h.input,g)),p[c]={end:h.end,inputId:g,start:h.start}}else p[c]=h}}let o=n[0];return r&&(o.inputs=[...t.keys()].map(u=>u.toJSON())),o}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Zn){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r={}){let n={node:this};for(let s in r)n[s]=r[s];return e.warn(t,n)}};Ht.exports=fe;fe.default=fe});var pe=y((ro,Yt)=>{"use strict";var ri=ce(),he=class extends ri{constructor(e){super(e),this.type="comment"}};Yt.exports=he;he.default=he});var me=y((no,Kt)=>{"use strict";var ni=ce(),de=class extends ni{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};Kt.exports=de;de.default=de});var k=y((io,sr)=>{"use strict";var Zt=pe(),er=me(),Xt=ce(),{isClean:tr,my:rr}=ue(),rt,nr,ir,nt;function ii(i){let e=i.slice();for(;e.length>0;){let t=e.pop();if(delete t.source,t.nodes){t.nodes=t.nodes.slice();for(let r of t.nodes)e.push(r)}}return i.slice()}function si(i){let e=[i];for(;e.length>0;){let t=e.pop();if(t[tr]=!1,t.proxyOf.nodes)for(let r of t.proxyOf.nodes)e.push(r)}}var q=class i extends Xt{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){let t=[this];for(;t.length>0;){let r=t.pop();if(r!==this&&r.cleanRaws!==i.prototype.cleanRaws){r.cleanRaws(e);continue}if(Xt.prototype.cleanRaws.call(r,e),r.nodes)for(let n of r.nodes)t.push(n)}}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,n;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],n=e(this.proxyOf.nodes[r],r),n!==!1);)this.indexes[t]+=1;return delete this.indexes[t],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(n=>typeof n=="function"?(s,o)=>n(s.toProxy(),o):n)):t==="every"||t==="some"?r=>e[t]((n,...s)=>r(n.toProxy(),...s)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let s;for(let o in this.indexes)s=this.indexes[o],r<s&&(this.indexes[o]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),n=r===0?"prepend":!1,s=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let u of s)this.proxyOf.nodes.splice(r,0,u);let o;for(let u in this.indexes)o=this.indexes[u],r<=o&&(this.indexes[u]=o+s.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=ii(nr(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new er(e)]}else if(e.selector||e.selectors)e=[new nt(e)];else if(e.name)e=[new rt(e)];else if(e.text)e=[new Zt(e)];else throw new Error("Unknown node type in node creation");return e.map(n=>(n[rr]||i.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[tr]&&si(n),n.raws||(n.raws={}),typeof n.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(n.raws.before=t.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let n of r)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){if(!this.proxyOf.nodes)return;let t=[{iterator:this.getIterator(),node:this.proxyOf}];for(;t.length>0;){let{iterator:r,node:n}=t[t.length-1],s=n.indexes[r];if(s>=n.proxyOf.nodes.length){delete n.indexes[r],t.pop();let l=t[t.length-1];l&&(l.node.indexes[l.iterator]+=1);continue}let o=n.proxyOf.nodes[s],u;try{u=e(o,s)}catch(l){throw o.addToError(l)}if(u===!1){for(let l of t)delete l.node.indexes[l.iterator];return!1}o.walk&&o.proxyOf.nodes?t.push({iterator:o.getIterator(),node:o}):n.indexes[r]+=1}}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if(r.type==="atrule"&&r.name===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="atrule")return t(r,n)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if(r.type==="decl"&&r.prop===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="decl")return t(r,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if(r.type==="rule"&&r.selector===e)return t(r,n)}):(t=e,this.walk((r,n)=>{if(r.type==="rule")return t(r,n)}))}};q.registerParse=i=>{nr=i};q.registerRule=i=>{nt=i};q.registerAtRule=i=>{rt=i};q.registerRoot=i=>{ir=i};sr.exports=q;q.default=q;q.rebuild=i=>{let e=[i];for(;e.length>0;){let t=e.pop();if(t.type==="atrule"?Object.setPrototypeOf(t,rt.prototype):t.type==="rule"?Object.setPrototypeOf(t,nt.prototype):t.type==="decl"?Object.setPrototypeOf(t,er.prototype):t.type==="comment"?Object.setPrototypeOf(t,Zt.prototype):t.type==="root"&&Object.setPrototypeOf(t,ir.prototype),t[rr]=!0,t.nodes)for(let r of t.nodes)e.push(r)}}});var Ie=y((so,lr)=>{"use strict";var or=k(),H=class extends or{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};lr.exports=H;H.default=H;or.registerAtRule(H)});var Pe=y((oo,fr)=>{"use strict";var oi=k(),ur,ar,G=class extends oi{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new ur(new ar,this,e).stringify()}};G.registerLazyResult=i=>{ur=i};G.registerProcessor=i=>{ar=i};fr.exports=G;G.default=G});var hr=y((lo,cr)=>{var li="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ui=(i,e=21)=>(t=e)=>{let r="",n=t|0;for(;n-- >0;)r+=i[Math.random()*i.length|0];return r},ai=(i=21)=>{let e="",t=i|0;for(;t-- >0;)e+=li[Math.random()*64|0];return e};cr.exports={nanoid:ai,customAlphabet:ui}});var dr=y(it=>{var pr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");it.encode=function(i){if(0<=i&&i<pr.length)return pr[i];throw new TypeError("Must be between 0 and 63: "+i)};it.decode=function(i){var e=65,t=90,r=97,n=122,s=48,o=57,u=43,l=47,f=26,a=52;return e<=i&&i<=t?i-e:r<=i&&i<=n?i-r+f:s<=i&&i<=o?i-s+a:i==u?62:i==l?63:-1}});var lt=y(ot=>{var mr=dr(),st=5,gr=1<<st,yr=gr-1,wr=gr;function fi(i){return i<0?(-i<<1)+1:(i<<1)+0}function ci(i){var e=(i&1)===1,t=i>>1;return e?-t:t}ot.encode=function(e){var t="",r,n=fi(e);do r=n&yr,n>>>=st,n>0&&(r|=wr),t+=mr.encode(r);while(n>0);return t};ot.decode=function(e,t,r){var n=e.length,s=0,o=0,u,l;do{if(t>=n)throw new Error("Expected more digits in base 64 VLQ value.");if(l=mr.decode(e.charCodeAt(t++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));u=!!(l&wr),l&=yr,s=s+(l<<o),o+=st}while(u);r.value=ci(s),r.rest=t}});var K=y(_=>{function hi(i,e,t){if(e in i)return i[e];if(arguments.length===3)return t;throw new Error('"'+e+'" is a required argument.')}_.getArg=hi;var vr=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,pi=/^data:.+\,.+$/;function ge(i){var e=i.match(vr);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}_.urlParse=ge;function Y(i){var e="";return i.scheme&&(e+=i.scheme+":"),e+="//",i.auth&&(e+=i.auth+"@"),i.host&&(e+=i.host),i.port&&(e+=":"+i.port),i.path&&(e+=i.path),e}_.urlGenerate=Y;var di=32;function mi(i){var e=[];return function(t){for(var r=0;r<e.length;r++)if(e[r].input===t){var n=e[0];return e[0]=e[r],e[r]=n,e[0].result}var s=i(t);return e.unshift({input:t,result:s}),e.length>di&&e.pop(),s}}var ut=mi(function(e){var t=e,r=ge(e);if(r){if(!r.path)return e;t=r.path}for(var n=_.isAbsolute(t),s=[],o=0,u=0;;)if(o=u,u=t.indexOf("/",o),u===-1){s.push(t.slice(o));break}else for(s.push(t.slice(o,u));u<t.length&&t[u]==="/";)u++;for(var l,f=0,u=s.length-1;u>=0;u--)l=s[u],l==="."?s.splice(u,1):l===".."?f++:f>0&&(l===""?(s.splice(u+1,f),f=0):(s.splice(u,2),f--));return t=s.join("/"),t===""&&(t=n?"/":"."),r?(r.path=t,Y(r)):t});_.normalize=ut;function xr(i,e){i===""&&(i="."),e===""&&(e=".");var t=ge(e),r=ge(i);if(r&&(i=r.path||"/"),t&&!t.scheme)return r&&(t.scheme=r.scheme),Y(t);if(t||e.match(pi))return e;if(r&&!r.host&&!r.path)return r.host=e,Y(r);var n=e.charAt(0)==="/"?e:ut(i.replace(/\/+$/,"")+"/"+e);return r?(r.path=n,Y(r)):n}_.join=xr;_.isAbsolute=function(i){return i.charAt(0)==="/"||vr.test(i)};function gi(i,e){i===""&&(i="."),i=i.replace(/\/$/,"");for(var t=0;e.indexOf(i+"/")!==0;){var r=i.lastIndexOf("/");if(r<0||(i=i.slice(0,r),i.match(/^([^\/]+:\/)?\/*$/)))return e;++t}return Array(t+1).join("../")+e.substr(i.length+1)}_.relative=gi;var br=(function(){var i=Object.create(null);return!("__proto__"in i)})();function Sr(i){return i}function yi(i){return Cr(i)?"$"+i:i}_.toSetString=br?Sr:yi;function wi(i){return Cr(i)?i.slice(1):i}_.fromSetString=br?Sr:wi;function Cr(i){if(!i)return!1;var e=i.length;if(e<9||i.charCodeAt(e-1)!==95||i.charCodeAt(e-2)!==95||i.charCodeAt(e-3)!==111||i.charCodeAt(e-4)!==116||i.charCodeAt(e-5)!==111||i.charCodeAt(e-6)!==114||i.charCodeAt(e-7)!==112||i.charCodeAt(e-8)!==95||i.charCodeAt(e-9)!==95)return!1;for(var t=e-10;t>=0;t--)if(i.charCodeAt(t)!==36)return!1;return!0}function vi(i,e,t){var r=T(i.source,e.source);return r!==0||(r=i.originalLine-e.originalLine,r!==0)||(r=i.originalColumn-e.originalColumn,r!==0||t)||(r=i.generatedColumn-e.generatedColumn,r!==0)||(r=i.generatedLine-e.generatedLine,r!==0)?r:T(i.name,e.name)}_.compareByOriginalPositions=vi;function xi(i,e,t){var r;return r=i.originalLine-e.originalLine,r!==0||(r=i.originalColumn-e.originalColumn,r!==0||t)||(r=i.generatedColumn-e.generatedColumn,r!==0)||(r=i.generatedLine-e.generatedLine,r!==0)?r:T(i.name,e.name)}_.compareByOriginalPositionsNoSource=xi;function bi(i,e,t){var r=i.generatedLine-e.generatedLine;return r!==0||(r=i.generatedColumn-e.generatedColumn,r!==0||t)||(r=T(i.source,e.source),r!==0)||(r=i.originalLine-e.originalLine,r!==0)||(r=i.originalColumn-e.originalColumn,r!==0)?r:T(i.name,e.name)}_.compareByGeneratedPositionsDeflated=bi;function Si(i,e,t){var r=i.generatedColumn-e.generatedColumn;return r!==0||t||(r=T(i.source,e.source),r!==0)||(r=i.originalLine-e.originalLine,r!==0)||(r=i.originalColumn-e.originalColumn,r!==0)?r:T(i.name,e.name)}_.compareByGeneratedPositionsDeflatedNoLine=Si;function T(i,e){return i===e?0:i===null?1:e===null?-1:i>e?1:-1}function Ci(i,e){var t=i.generatedLine-e.generatedLine;return t!==0||(t=i.generatedColumn-e.generatedColumn,t!==0)||(t=T(i.source,e.source),t!==0)||(t=i.originalLine-e.originalLine,t!==0)||(t=i.originalColumn-e.originalColumn,t!==0)?t:T(i.name,e.name)}_.compareByGeneratedPositionsInflated=Ci;function _i(i){return JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}_.parseSourceMapInput=_i;function Oi(i,e,t){if(e=e||"",i&&(i[i.length-1]!=="/"&&e[0]!=="/"&&(i+="/"),e=i+e),t){var r=ge(t);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var n=r.path.lastIndexOf("/");n>=0&&(r.path=r.path.substring(0,n+1))}e=xr(Y(r),e)}return ut(e)}_.computeSourceURL=Oi});var ct=y(_r=>{var at=K(),ft=Object.prototype.hasOwnProperty,z=typeof Map<"u";function U(){this._array=[],this._set=z?new Map:Object.create(null)}U.fromArray=function(e,t){for(var r=new U,n=0,s=e.length;n<s;n++)r.add(e[n],t);return r};U.prototype.size=function(){return z?this._set.size:Object.getOwnPropertyNames(this._set).length};U.prototype.add=function(e,t){var r=z?e:at.toSetString(e),n=z?this.has(e):ft.call(this._set,r),s=this._array.length;(!n||t)&&this._array.push(e),n||(z?this._set.set(e,s):this._set[r]=s)};U.prototype.has=function(e){if(z)return this._set.has(e);var t=at.toSetString(e);return ft.call(this._set,t)};U.prototype.indexOf=function(e){if(z){var t=this._set.get(e);if(t>=0)return t}else{var r=at.toSetString(e);if(ft.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')};U.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};U.prototype.toArray=function(){return this._array.slice()};_r.ArraySet=U});var Ar=y(Er=>{var Or=K();function Ei(i,e){var t=i.generatedLine,r=e.generatedLine,n=i.generatedColumn,s=e.generatedColumn;return r>t||r==t&&s>=n||Or.compareByGeneratedPositionsInflated(i,e)<=0}function Ne(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Ne.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)};Ne.prototype.add=function(e){Ei(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Ne.prototype.toArray=function(){return this._sorted||(this._array.sort(Or.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Er.MappingList=Ne});var ht=y(Lr=>{var ye=lt(),S=K(),qe=ct().ArraySet,Ai=Ar().MappingList;function M(i){i||(i={}),this._file=S.getArg(i,"file",null),this._sourceRoot=S.getArg(i,"sourceRoot",null),this._skipValidation=S.getArg(i,"skipValidation",!1),this._ignoreInvalidMapping=S.getArg(i,"ignoreInvalidMapping",!1),this._sources=new qe,this._names=new qe,this._mappings=new Ai,this._sourcesContents=null}M.prototype._version=3;M.fromSourceMap=function(e,t){var r=e.sourceRoot,n=new M(Object.assign(t||{},{file:e.file,sourceRoot:r}));return e.eachMapping(function(s){var o={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(o.source=s.source,r!=null&&(o.source=S.relative(r,o.source)),o.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(o.name=s.name)),n.addMapping(o)}),e.sources.forEach(function(s){var o=s;r!==null&&(o=S.relative(r,s)),n._sources.has(o)||n._sources.add(o);var u=e.sourceContentFor(s);u!=null&&n.setSourceContent(s,u)}),n};M.prototype.addMapping=function(e){var t=S.getArg(e,"generated"),r=S.getArg(e,"original",null),n=S.getArg(e,"source",null),s=S.getArg(e,"name",null);!this._skipValidation&&this._validateMapping(t,r,n,s)===!1||(n!=null&&(n=String(n),this._sources.has(n)||this._sources.add(n)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:n,name:s}))};M.prototype.setSourceContent=function(e,t){var r=e;this._sourceRoot!=null&&(r=S.relative(this._sourceRoot,r)),t!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[S.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[S.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};M.prototype.applySourceMap=function(e,t,r){var n=t;if(t==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);n=e.file}var s=this._sourceRoot;s!=null&&(n=S.relative(s,n));var o=new qe,u=new qe;this._mappings.unsortedForEach(function(l){if(l.source===n&&l.originalLine!=null){var f=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});f.source!=null&&(l.source=f.source,r!=null&&(l.source=S.join(r,l.source)),s!=null&&(l.source=S.relative(s,l.source)),l.originalLine=f.line,l.originalColumn=f.column,f.name!=null&&(l.name=f.name))}var a=l.source;a!=null&&!o.has(a)&&o.add(a);var p=l.name;p!=null&&!u.has(p)&&u.add(p)},this),this._sources=o,this._names=u,e.sources.forEach(function(l){var f=e.sourceContentFor(l);f!=null&&(r!=null&&(l=S.join(r,l)),s!=null&&(l=S.relative(s,l)),this.setSourceContent(l,f))},this)};M.prototype._validateMapping=function(e,t,r,n){if(t&&typeof t.line!="number"&&typeof t.column!="number"){var s="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!r&&!n)){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r)return;var s="Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};M.prototype._serializeMappings=function(){for(var e=0,t=1,r=0,n=0,s=0,o=0,u="",l,f,a,p,c=this._mappings.toArray(),h=0,g=c.length;h<g;h++){if(f=c[h],l="",f.generatedLine!==t)for(e=0;f.generatedLine!==t;)l+=";",t++;else if(h>0){if(!S.compareByGeneratedPositionsInflated(f,c[h-1]))continue;l+=","}l+=ye.encode(f.generatedColumn-e),e=f.generatedColumn,f.source!=null&&(p=this._sources.indexOf(f.source),l+=ye.encode(p-o),o=p,l+=ye.encode(f.originalLine-1-n),n=f.originalLine-1,l+=ye.encode(f.originalColumn-r),r=f.originalColumn,f.name!=null&&(a=this._names.indexOf(f.name),l+=ye.encode(a-s),s=a)),u+=l}return u};M.prototype._generateSourcesContent=function(e,t){return e.map(function(r){if(!this._sourcesContents)return null;t!=null&&(r=S.relative(t,r));var n=S.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)};M.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};M.prototype.toString=function(){return JSON.stringify(this.toJSON())};Lr.SourceMapGenerator=M});var Mr=y(W=>{W.GREATEST_LOWER_BOUND=1;W.LEAST_UPPER_BOUND=2;function pt(i,e,t,r,n,s){var o=Math.floor((e-i)/2)+i,u=n(t,r[o],!0);return u===0?o:u>0?e-o>1?pt(o,e,t,r,n,s):s==W.LEAST_UPPER_BOUND?e<r.length?e:-1:o:o-i>1?pt(i,o,t,r,n,s):s==W.LEAST_UPPER_BOUND?o:i<0?-1:i}W.search=function(e,t,r,n){if(t.length===0)return-1;var s=pt(-1,t.length,e,t,r,n||W.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&r(t[s],t[s-1],!0)===0;)--s;return s}});var Pr=y(Ir=>{function Li(i){function e(n,s,o){var u=n[s];n[s]=n[o],n[o]=u}function t(n,s){return Math.round(n+Math.random()*(s-n))}function r(n,s,o,u){if(o<u){var l=t(o,u),f=o-1;e(n,l,u);for(var a=n[u],p=o;p<u;p++)s(n[p],a,!1)<=0&&(f+=1,e(n,f,p));e(n,f+1,p);var c=f+1;r(n,s,o,c-1),r(n,s,c+1,u)}}return r}function Mi(i){let e=Li.toString();return new Function(`return ${e}`)()(i)}var Rr=new WeakMap;Ir.quickSort=function(i,e,t=0){let r=Rr.get(e);r===void 0&&(r=Mi(e),Rr.set(e,r)),r(i,e,t,i.length-1)}});var kr=y(ke=>{var d=K(),mt=Mr(),X=ct().ArraySet,Ri=lt(),we=Pr().quickSort;function b(i,e){var t=i;return typeof i=="string"&&(t=d.parseSourceMapInput(i)),t.sections!=null?new I(t,e):new O(t,e)}b.fromSourceMap=function(i,e){return O.fromSourceMap(i,e)};b.prototype._version=3;b.prototype.__generatedMappings=null;Object.defineProperty(b.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});b.prototype.__originalMappings=null;Object.defineProperty(b.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});b.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return r===";"||r===","};b.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")};b.GENERATED_ORDER=1;b.ORIGINAL_ORDER=2;b.GREATEST_LOWER_BOUND=1;b.LEAST_UPPER_BOUND=2;b.prototype.eachMapping=function(e,t,r){var n=t||null,s=r||b.GENERATED_ORDER,o;switch(s){case b.GENERATED_ORDER:o=this._generatedMappings;break;case b.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var u=this.sourceRoot,l=e.bind(n),f=this._names,a=this._sources,p=this._sourceMapURL,c=0,h=o.length;c<h;c++){var g=o[c],w=g.source===null?null:a.at(g.source);w!==null&&(w=d.computeSourceURL(u,w,p)),l({source:w,generatedLine:g.generatedLine,generatedColumn:g.generatedColumn,originalLine:g.originalLine,originalColumn:g.originalColumn,name:g.name===null?null:f.at(g.name)})}};b.prototype.allGeneratedPositionsFor=function(e){var t=d.getArg(e,"line"),r={source:d.getArg(e,"source"),originalLine:t,originalColumn:d.getArg(e,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var n=[],s=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",d.compareByOriginalPositions,mt.LEAST_UPPER_BOUND);if(s>=0){var o=this._originalMappings[s];if(e.column===void 0)for(var u=o.originalLine;o&&o.originalLine===u;)n.push({line:d.getArg(o,"generatedLine",null),column:d.getArg(o,"generatedColumn",null),lastColumn:d.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var l=o.originalColumn;o&&o.originalLine===t&&o.originalColumn==l;)n.push({line:d.getArg(o,"generatedLine",null),column:d.getArg(o,"generatedColumn",null),lastColumn:d.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return n};ke.SourceMapConsumer=b;function O(i,e){var t=i;typeof i=="string"&&(t=d.parseSourceMapInput(i));var r=d.getArg(t,"version"),n=d.getArg(t,"sources"),s=d.getArg(t,"names",[]),o=d.getArg(t,"sourceRoot",null),u=d.getArg(t,"sourcesContent",null),l=d.getArg(t,"mappings"),f=d.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);o&&(o=d.normalize(o)),n=n.map(String).map(d.normalize).map(function(a){return o&&d.isAbsolute(o)&&d.isAbsolute(a)?d.relative(o,a):a}),this._names=X.fromArray(s.map(String),!0),this._sources=X.fromArray(n,!0),this._absoluteSources=this._sources.toArray().map(function(a){return d.computeSourceURL(o,a,e)}),this.sourceRoot=o,this.sourcesContent=u,this._mappings=l,this._sourceMapURL=e,this.file=f}O.prototype=Object.create(b.prototype);O.prototype.consumer=b;O.prototype._findSourceIndex=function(i){var e=i;if(this.sourceRoot!=null&&(e=d.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var t;for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==i)return t;return-1};O.fromSourceMap=function(e,t){var r=Object.create(O.prototype),n=r._names=X.fromArray(e._names.toArray(),!0),s=r._sources=X.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=t,r._absoluteSources=r._sources.toArray().map(function(h){return d.computeSourceURL(r.sourceRoot,h,t)});for(var o=e._mappings.toArray().slice(),u=r.__generatedMappings=[],l=r.__originalMappings=[],f=0,a=o.length;f<a;f++){var p=o[f],c=new qr;c.generatedLine=p.generatedLine,c.generatedColumn=p.generatedColumn,p.source&&(c.source=s.indexOf(p.source),c.originalLine=p.originalLine,c.originalColumn=p.originalColumn,p.name&&(c.name=n.indexOf(p.name)),l.push(c)),u.push(c)}return we(r.__originalMappings,d.compareByOriginalPositions),r};O.prototype._version=3;Object.defineProperty(O.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function qr(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var dt=d.compareByGeneratedPositionsDeflatedNoLine;function Nr(i,e){let t=i.length,r=i.length-e;if(!(r<=1))if(r==2){let n=i[e],s=i[e+1];dt(n,s)>0&&(i[e]=s,i[e+1]=n)}else if(r<20)for(let n=e;n<t;n++)for(let s=n;s>e;s--){let o=i[s-1],u=i[s];if(dt(o,u)<=0)break;i[s-1]=u,i[s]=o}else we(i,dt,e)}O.prototype._parseMappings=function(e,t){var r=1,n=0,s=0,o=0,u=0,l=0,f=e.length,a=0,p={},c={},h=[],g=[],w,m,C,A,j;let ie=0;for(;a<f;)if(e.charAt(a)===";")r++,a++,n=0,Nr(g,ie),ie=g.length;else if(e.charAt(a)===",")a++;else{for(w=new qr,w.generatedLine=r,A=a;A<f&&!this._charIsMappingSeparator(e,A);A++);for(m=e.slice(a,A),C=[];a<A;)Ri.decode(e,a,c),j=c.value,a=c.rest,C.push(j);if(C.length===2)throw new Error("Found a source, but no line and column");if(C.length===3)throw new Error("Found a source and line, but no column");if(w.generatedColumn=n+C[0],n=w.generatedColumn,C.length>1&&(w.source=u+C[1],u+=C[1],w.originalLine=s+C[2],s=w.originalLine,w.originalLine+=1,w.originalColumn=o+C[3],o=w.originalColumn,C.length>4&&(w.name=l+C[4],l+=C[4])),g.push(w),typeof w.originalLine=="number"){let $=w.source;for(;h.length<=$;)h.push(null);h[$]===null&&(h[$]=[]),h[$].push(w)}}Nr(g,ie),this.__generatedMappings=g;for(var B=0;B<h.length;B++)h[B]!=null&&we(h[B],d.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...h)};O.prototype._findMapping=function(e,t,r,n,s,o){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return mt.search(e,t,s,o)};O.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}};O.prototype.originalPositionFor=function(e){var t={generatedLine:d.getArg(e,"line"),generatedColumn:d.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",d.compareByGeneratedPositionsDeflated,d.getArg(e,"bias",b.GREATEST_LOWER_BOUND));if(r>=0){var n=this._generatedMappings[r];if(n.generatedLine===t.generatedLine){var s=d.getArg(n,"source",null);s!==null&&(s=this._sources.at(s),s=d.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=d.getArg(n,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:d.getArg(n,"originalLine",null),column:d.getArg(n,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};O.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};O.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var n=e;this.sourceRoot!=null&&(n=d.relative(this.sourceRoot,n));var s;if(this.sourceRoot!=null&&(s=d.urlParse(this.sourceRoot))){var o=n.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!s.path||s.path=="/")&&this._sources.has("/"+n))return this.sourcesContent[this._sources.indexOf("/"+n)]}if(t)return null;throw new Error('"'+n+'" is not in the SourceMap.')};O.prototype.generatedPositionFor=function(e){var t=d.getArg(e,"source");if(t=this._findSourceIndex(t),t<0)return{line:null,column:null,lastColumn:null};var r={source:t,originalLine:d.getArg(e,"line"),originalColumn:d.getArg(e,"column")},n=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",d.compareByOriginalPositions,d.getArg(e,"bias",b.GREATEST_LOWER_BOUND));if(n>=0){var s=this._originalMappings[n];if(s.source===r.source)return{line:d.getArg(s,"generatedLine",null),column:d.getArg(s,"generatedColumn",null),lastColumn:d.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};ke.BasicSourceMapConsumer=O;function I(i,e){var t=i;typeof i=="string"&&(t=d.parseSourceMapInput(i));var r=d.getArg(t,"version"),n=d.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new X,this._names=new X;var s={line:-1,column:0};this._sections=n.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var u=d.getArg(o,"offset"),l=d.getArg(u,"line"),f=d.getArg(u,"column");if(l<s.line||l===s.line&&f<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=u,{generatedOffset:{generatedLine:l+1,generatedColumn:f+1},consumer:new b(d.getArg(o,"map"),e)}})}I.prototype=Object.create(b.prototype);I.prototype.constructor=b;I.prototype._version=3;Object.defineProperty(I.prototype,"sources",{get:function(){for(var i=[],e=0;e<this._sections.length;e++)for(var t=0;t<this._sections[e].consumer.sources.length;t++)i.push(this._sections[e].consumer.sources[t]);return i}});I.prototype.originalPositionFor=function(e){var t={generatedLine:d.getArg(e,"line"),generatedColumn:d.getArg(e,"column")},r=mt.search(t,this._sections,function(s,o){var u=s.generatedLine-o.generatedOffset.generatedLine;return u||s.generatedColumn-o.generatedOffset.generatedColumn}),n=this._sections[r];return n?n.consumer.originalPositionFor({line:t.generatedLine-(n.generatedOffset.generatedLine-1),column:t.generatedColumn-(n.generatedOffset.generatedLine===t.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};I.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};I.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r],s=n.consumer.sourceContentFor(e,!0);if(s||s==="")return s}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')};I.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(r.consumer._findSourceIndex(d.getArg(e,"source"))!==-1){var n=r.consumer.generatedPositionFor(e);if(n){var s={line:n.line+(r.generatedOffset.generatedLine-1),column:n.column+(r.generatedOffset.generatedLine===n.line?r.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};I.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var n=this._sections[r],s=n.consumer._generatedMappings,o=0;o<s.length;o++){var u=s[o],l=n.consumer._sources.at(u.source);l!==null&&(l=d.computeSourceURL(n.consumer.sourceRoot,l,this._sourceMapURL)),this._sources.add(l),l=this._sources.indexOf(l);var f=null;u.name&&(f=n.consumer._names.at(u.name),this._names.add(f),f=this._names.indexOf(f));var a={source:l,generatedLine:u.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:u.generatedColumn+(n.generatedOffset.generatedLine===u.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:u.originalLine,originalColumn:u.originalColumn,name:f};this.__generatedMappings.push(a),typeof a.originalLine=="number"&&this.__originalMappings.push(a)}we(this.__generatedMappings,d.compareByGeneratedPositionsDeflated),we(this.__originalMappings,d.compareByOriginalPositions)};ke.IndexedSourceMapConsumer=I});var Ur=y(Tr=>{var Ii=ht().SourceMapGenerator,Te=K(),Pi=/(\r?\n)/,Ni=10,Z="$$$isSourceNode$$$";function L(i,e,t,r,n){this.children=[],this.sourceContents={},this.line=i??null,this.column=e??null,this.source=t??null,this.name=n??null,this[Z]=!0,r!=null&&this.add(r)}L.fromStringWithSourceMap=function(e,t,r){var n=new L,s=e.split(Pi),o=0,u=function(){var c=g(),h=g()||"";return c+h;function g(){return o<s.length?s[o++]:void 0}},l=1,f=0,a=null;return t.eachMapping(function(c){if(a!==null)if(l<c.generatedLine)p(a,u()),l++,f=0;else{var h=s[o]||"",g=h.substr(0,c.generatedColumn-f);s[o]=h.substr(c.generatedColumn-f),f=c.generatedColumn,p(a,g),a=c;return}for(;l<c.generatedLine;)n.add(u()),l++;if(f<c.generatedColumn){var h=s[o]||"";n.add(h.substr(0,c.generatedColumn)),s[o]=h.substr(c.generatedColumn),f=c.generatedColumn}a=c},this),o<s.length&&(a&&p(a,u()),n.add(s.splice(o).join(""))),t.sources.forEach(function(c){var h=t.sourceContentFor(c);h!=null&&(r!=null&&(c=Te.join(r,c)),n.setSourceContent(c,h))}),n;function p(c,h){if(c===null||c.source===void 0)n.add(h);else{var g=r?Te.join(r,c.source):c.source;n.add(new L(c.originalLine,c.originalColumn,g,h,c.name))}}};L.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(t){this.add(t)},this);else if(e[Z]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};L.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[Z]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};L.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r<n;r++)t=this.children[r],t[Z]?t.walk(e):t!==""&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})};L.prototype.join=function(e){var t,r,n=this.children.length;if(n>0){for(t=[],r=0;r<n-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this};L.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[Z]?r.replaceRight(e,t):typeof r=="string"?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this};L.prototype.setSourceContent=function(e,t){this.sourceContents[Te.toSetString(e)]=t};L.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][Z]&&this.children[t].walkSourceContents(e);for(var n=Object.keys(this.sourceContents),t=0,r=n.length;t<r;t++)e(Te.fromSetString(n[t]),this.sourceContents[n[t]])};L.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e};L.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new Ii(e),n=!1,s=null,o=null,u=null,l=null;return this.walk(function(f,a){t.code+=f,a.source!==null&&a.line!==null&&a.column!==null?((s!==a.source||o!==a.line||u!==a.column||l!==a.name)&&r.addMapping({source:a.source,original:{line:a.line,column:a.column},generated:{line:t.line,column:t.column},name:a.name}),s=a.source,o=a.line,u=a.column,l=a.name,n=!0):n&&(r.addMapping({generated:{line:t.line,column:t.column}}),s=null,n=!1);for(var p=0,c=f.length;p<c;p++)f.charCodeAt(p)===Ni?(t.line++,t.column=0,p+1===c?(s=null,n=!1):n&&r.addMapping({source:a.source,original:{line:a.line,column:a.column},generated:{line:t.line,column:t.column},name:a.name})):t.column++}),this.walkSourceContents(function(f,a){r.setSourceContent(f,a)}),{code:t.code,map:r}};Tr.SourceNode=L});var Be=y(Ue=>{Ue.SourceMapGenerator=ht().SourceMapGenerator;Ue.SourceMapConsumer=kr().SourceMapConsumer;Ue.SourceNode=Ur().SourceNode});var gt=y((xo,jr)=>{"use strict";var{existsSync:qi,readFileSync:ki,realpathSync:Ti}=J("fs"),{dirname:De,isAbsolute:Ui,join:Bi,relative:Di,sep:Fi}=J("path"),{SourceMapConsumer:Br,SourceMapGenerator:Dr}=Be();function Fr(i){try{return Ti(i)}catch{return i}}function ji(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}var ve=class{constructor(e,t){if(t.map===!1)return;t.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=De(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new Br(this.json||this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,n=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/,o=e.match(n)||e.match(s);if(o)return decodeURIComponent(e.substr(o[0].length));let u=e.match(t)||e.match(r);if(u)return ji(e.substr(u[0].length));let l=e.slice(22);throw l=l.slice(0,l.indexOf(",")),new Error("Unsupported source map encoding "+l)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e,t,r){if(!r&&!this.unsafeMap){if(!/\.map$/i.test(e)||!t)return;let n=Di(Fr(De(t)),Fr(e));if(n===".."||n.startsWith(".."+Fi)||Ui(n))return}if(this.root=De(e),qi(e))return this.mapFile=e,ki(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let n=this.loadFile(r,e,!0);if(!n)throw new Error("Unable to load previous source map: "+r.toString());return n}}else{if(t instanceof Br)return Dr.fromSourceMap(t).toString();if(t instanceof Dr)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;e&&(r=Bi(De(e),r));let n=this.loadFile(r,e,!1);if(n)try{this.json=JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return n}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};jr.exports=ve;ve.default=ve});var xe=y((bo,$r)=>{"use strict";var{nanoid:Gi}=hr(),{isAbsolute:vt,resolve:xt}=J("path"),{SourceMapConsumer:zi,SourceMapGenerator:Wi}=Be(),{fileURLToPath:Gr,pathToFileURL:Fe}=J("url"),zr=Re(),Vi=gt(),yt=Xe(),wt=Symbol("lineToIndexCache"),$i=!!(zi&&Wi),Wr=!!(xt&&vt);function Vr(i){if(i[wt])return i[wt];let e=i.css.split(`
|
|
24
|
-
`),t=new Array(e.length),r=0;for(let n=0,s=e.length;n<s;n++)t[n]=r,r+=e[n].length+1;return i[wt]=t,t}var ee=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!Wr||/^\w+:\/\//.test(t.from)||vt(t.from)?this.file=t.from:this.file=xt(t.from)),Wr&&$i){let r=new Vi(this.css,t);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+Gi(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let s,o,u,l,f;if(t&&typeof t=="object"){let p=t,c=r;if(typeof p.offset=="number"){l=p.offset;let h=this.fromOffset(l);t=h.line,r=h.col}else t=p.line,r=p.column,l=this.fromLineAndColumn(t,r);if(typeof c.offset=="number"){u=c.offset;let h=this.fromOffset(u);o=h.line,s=h.col}else o=c.line,s=c.column,u=this.fromLineAndColumn(c.line,c.column)}else if(r)l=this.fromLineAndColumn(t,r);else{l=t;let p=this.fromOffset(l);t=p.line,r=p.col}let a=this.origin(t,r,o,s);return a?f=new zr(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):f=new zr(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:s,line:o},this.css,this.file,n.plugin),f.input={column:r,endColumn:s,endLine:o,endOffset:u,line:t,offset:l,source:this.css},this.file&&(Fe&&(f.input.url=Fe(this.file).toString()),f.input.file=this.file),f}fromLineAndColumn(e,t){return Vr(this)[e-1]+t-1}fromOffset(e){let t=Vr(this),r=t[t.length-1],n=0;if(e>=r)n=t.length-1;else{let s=t.length-2,o;for(;n<s;)if(o=n+(s-n>>1),e<t[o])s=o-1;else if(e>=t[o+1])n=o+1;else{n=o;break}}return{col:e-t[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:xt(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return!1;let s=this.map.consumer(),o=s.originalPositionFor({column:t-1,line:e});if(!o.source)return!1;let u;if(typeof r=="number"){let p=s.originalPositionFor({column:n-1,line:r});p.source&&(u=p)}let l;vt(o.source)?l=Fe(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||Fe(this.map.mapFile));let f={column:o.column+1,endColumn:u&&u.column+1,endLine:u&&u.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(Gr)f.file=Gr(l);else throw new Error("file: protocol is not available in this PostCSS build");let a=s.sourceContentFor(o.source);return a&&(f.source=a),f}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};$r.exports=ee;ee.default=ee;yt&&yt.registerInput&&yt.registerInput(ee)});var te=y((So,Yr)=>{"use strict";var Qr=k(),Jr,Hr,D=class extends Qr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=new Set;for(let o of Array.isArray(e)?e:[e])o&&typeof o=="object"&&!o.parent&&o.raws&&typeof o.raws.before<"u"&&n.add(o.raws);let s=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of s)n.has(o.raws)||(o.raws.before=t.raws.before)}return s}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Jr(new Hr,this,e).stringify()}};D.registerLazyResult=i=>{Jr=i};D.registerProcessor=i=>{Hr=i};Yr.exports=D;D.default=D;Qr.registerRoot(D)});var bt=y((Co,Kr)=>{"use strict";var be={comma(i){return be.split(i,[","],!0)},space(i){let e=[" ",`
|
|
25
|
-
`," "];return be.split(i,e)},split(i,e,t){if(typeof i!="string")return[];let r=[],n="",s=!1,o=0,u=!1,l="",f=!1;for(let a of i)f?f=!1:a==="\\"?f=!0:u?a===l&&(u=!1):a==='"'||a==="'"?(u=!0,l=a):a==="("?o+=1:a===")"?o>0&&(o-=1):o===0&&e.includes(a)&&(s=!0),s?(n!==""&&r.push(n.trim()),n="",s=!1):n+=a;return(t||n!=="")&&r.push(n.trim()),r}};Kr.exports=be;be.default=be});var je=y((_o,Zr)=>{"use strict";var Xr=k(),Qi=bt(),re=class extends Xr{get selectors(){return Qi.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};Zr.exports=re;re.default=re;Xr.registerRule(re)});var rn=y((Oo,tn)=>{"use strict";var Ji=Ie(),Hi=pe(),Yi=me(),Ki=xe(),Xi=gt(),Zi=te(),es=je();function en(i,e){return i.inputs?i.inputs.map(t=>{let r={...t,__proto__:Ki.prototype};return r.map&&(r.map={...r.map,__proto__:Xi.prototype}),r}):e}function ts(i,e,t){let r={...i};if(delete r.inputs,delete r.nodes,r.source){let{inputId:s,...o}=r.source;r.source=o,s!=null&&(r.source.input=e[s])}let n;if(r.type==="root")n=new Zi(r);else if(r.type==="decl")n=new Yi(r);else if(r.type==="rule")n=new es(r);else if(r.type==="comment")n=new Hi(r);else if(r.type==="atrule")n=new Ji(r);else throw new Error("Unknown node type: "+i.type);if(t){n.nodes=t;for(let s of t)s.parent=n}return n}function Ge(i,e){if(Array.isArray(i))return i.map(n=>Ge(n));let t,r=[{childIndex:0,children:[],inputs:en(i,e),json:i}];for(;r.length>0;){let n=r[r.length-1],s=n.json.nodes;if(s&&n.childIndex<s.length){let u=s[n.childIndex];n.childIndex+=1,r.push({childIndex:0,children:[],inputs:en(u,n.inputs),json:u});continue}r.pop();let o=ts(n.json,n.inputs,s?n.children:void 0);r.length>0?r[r.length-1].children.push(o):t=o}return t}tn.exports=Ge;Ge.default=Ge});var Ct=y((Eo,an)=>{"use strict";var{dirname:ze,relative:sn,resolve:on,sep:ln}=J("path"),{SourceMapConsumer:un,SourceMapGenerator:We}=Be(),{pathToFileURL:nn}=J("url"),rs=xe(),ns=!!(un&&We),is=!!(ze&&on&&sn&&ln),St=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
26
|
-
`;this.css.includes(`\r
|
|
27
|
-
`)&&(t=`\r
|
|
28
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||ze(e.file),n;this.mapOpts.sourcesContent===!1?(n=new un(e.text),n.sourcesContent&&(n.sourcesContent=null)):n=e.consumer(),this.map.applySourceMap(n,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else if(this.css){let e;for(;(e=this.css.lastIndexOf("/*#"))!==-1;){let t=this.css.indexOf("*/",e+3);if(t===-1)break;for(;e>0&&this.css[e-1]===`
|
|
29
|
-
`;)e--;this.css=this.css.slice(0,e)+this.css.slice(t+2)}}}}generate(){if(this.clearAnnotation(),is&&ns&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=We.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new We({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new We({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",n={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,o;this.stringify(this.root,(u,l,f)=>{if(this.css+=u,l&&f!=="end"&&(n.generated.line=e,n.generated.column=t-1,l.source&&l.source.start?(n.source=this.sourcePath(l),n.original.line=l.source.start.line,n.original.column=l.source.start.column-1,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,this.map.addMapping(n))),o=u.match(/\n/g),o?(e+=o.length,s=u.lastIndexOf(`
|
|
30
|
-
`),t=u.length-s):t+=u.length,l&&f!=="start"){let a=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==a.last||a.raws.semicolon)&&(l.source&&l.source.end?(n.source=this.sourcePath(l),n.original.line=l.source.end.line,n.original.column=l.source.end.column-1,n.generated.line=e,n.generated.column=t-2,this.map.addMapping(n)):(n.source=r,n.original.line=1,n.original.column=0,n.generated.line=e,n.generated.column=t-1,this.map.addMapping(n)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?ze(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=ze(on(r,this.mapOpts.annotation)));let n=sn(r,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new rs(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(nn){let r=nn(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;ln==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};an.exports=St});var pn=y((Ao,hn)=>{"use strict";var ss=Ie(),os=pe(),ls=me(),us=te(),fn=je(),as=Ke(),cn={empty:!0,space:!0};function fs(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}function _t(i,e,t){let r="";for(let n=e;n<t;n++)r+=i[n][1];return r}var Ot=class{constructor(e){this.input=e,this.root=new us,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new ss;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,n,s,o=!1,u=!1,l=[],f=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?f.push(r==="("?")":"]"):r==="{"&&f.length>0?f.push("}"):r===f[f.length-1]&&f.pop(),f.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(l.length>0){for(s=l.length-1,n=l[s];n&&n[0]==="space";)n=l[--s];n&&(t.source.end=this.getPosition(n[3]||n[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),u&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,n;for(let s=t-1;s>=0&&(n=e[s],!(n[0]!=="space"&&(r+=1,r===2)));s--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let t=0,r,n,s;for(let[o,u]of e.entries()){if(n=u,s=n[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!r)this.doubleColon(n);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=n}return!1}comment(e){let t=new os;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(!r.trim())t.text="",t.raws.left=r,t.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=n[2],t.raws.left=n[1],t.raws.right=n[3]}}createTokenizer(){this.tokenizer=as(this.input)}decl(e,t){let r=new ls;this.init(r,e[0][2]);let n=e[e.length-1];n[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||fs(e)),r.source.end.offset++;let s=0;for(;e[s][0]!=="word";)s===e.length-1&&this.unknownWord([e[s]]),s++;r.raws.before+=_t(e,0,s),r.source.start=this.getPosition(e[s][2]);let o=s;for(;s<e.length;){let c=e[s][0];if(c===":"||c==="space"||c==="comment")break;s++}r.prop=_t(e,o,s);let u=s,l;for(;s<e.length&&(l=e[s],s++,l[0]!==":");)l[0]==="word"&&/\w/.test(l[1])&&this.unknownWord([l]);r.raws.between=_t(e,u,s),(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let f=s;for(;s<e.length;){let c=e[s][0];if(c!=="space"&&c!=="comment")break;s++}let a=e.slice(f,s);e=e.slice(s),this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(l=e[c],l[1].toLowerCase()==="!important"){r.important=!0;let h=this.stringFrom(e,c);h=this.spacesFromEnd(e)+h,h!==" !important"&&(r.raws.important=h);break}else if(l[1].toLowerCase()==="important"){let h=e.slice(0),g="";for(let w=c;w>0;w--){let m=h[w][0];if(g.trim().startsWith("!")&&m!=="space")break;g=h.pop()[1]+g}g.trim().startsWith("!")&&(r.important=!0,r.raws.important=g,e=h)}if(l[0]!=="space"&&l[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=a.map(c=>c[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new fn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,s=null,o=[],u=e[1].startsWith("--"),l=[],f=e;for(;f;){if(r=f[0],l.push(f),r==="("||r==="[")s||(s=f),o.push(r==="("?")":"]");else if(u&&n&&r==="{")s||(s=f),o.push("}");else if(o.length===0)if(r===";")if(n){this.decl(l,u);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(n=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(s=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(s),t&&n){if(!u)for(;l.length&&(f=l[l.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,u)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let s,o,u=r.length,l="",f=!0,a,p;for(let c=0;c<u;c+=1)s=r[c],o=s[0],o==="space"&&c===u-1&&!n?f=!1:o==="comment"?(p=r[c-1]?r[c-1][0]:"empty",a=r[c+1]?r[c+1][0]:"empty",!cn[p]&&!cn[a]?l.slice(-1)===","?f=!1:l+=s[1]:f=!1):l+=s[1];if(!f){let c=r.reduce((h,g)=>h+g[1],"");e.raws[t]={raw:c,value:l}}e[t]=l}rule(e){e.pop();let t=new fn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};hn.exports=Ot});var $e=y((Lo,dn)=>{"use strict";var cs=k(),hs=xe(),ps=pn();function Ve(i,e){let t=new hs(i,e),r=new ps(t);try{r.parse()}catch(n){throw process.env.NODE_ENV!=="production"&&n.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?n.message+=`
|
|
31
|
-
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?n.message+=`
|
|
32
|
-
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(n.message+=`
|
|
33
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),n}return r.root}dn.exports=Ve;Ve.default=Ve;cs.registerParse(Ve)});var Et=y((Mo,mn)=>{"use strict";var ds=k(),{my:ms}=ue(),Se=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){t.node[ms]||ds.rebuild(t.node);let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};mn.exports=Se;Se.default=Se});var Qe=y((Ro,gn)=>{"use strict";var gs=Et(),Ce=class{get content(){return this.css}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new gs(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};gn.exports=Ce;Ce.default=Ce});var At=y((Io,wn)=>{"use strict";var yn={};wn.exports=function(e){yn[e]||(yn[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))}});var Rt=y((Po,Sn)=>{"use strict";var ys=k(),ws=Pe(),vs=Ct(),xs=$e(),vn=Qe(),bs=te(),Ss=le(),{isClean:P,my:Cs}=ue(),_s=At(),Os={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Es={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},As={Once:!0,postcssPlugin:!0,prepare:!0},ne=0;function _e(i){return typeof i=="object"&&typeof i.then=="function"}function Lt(i){let e=!1,t=Os[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,ne,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,ne,t+"Exit"]:[t,t+"Exit"]}function xn(i){let e;return i.type==="document"?e=["Document",ne,"DocumentExit"]:i.type==="root"?e=["Root",ne,"RootExit"]:e=Lt(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function bn(i){let e=[i];for(;e.length>0;){let t=e.pop();if(t[P]=!1,t.nodes)for(let r of t.nodes)e.push(r)}return i}var Mt={},F=class i{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,t,r){this.stringified=!1,this.processed=!1;let n;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))n=bn(t);else if(t instanceof i||t instanceof vn)n=bn(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let s=xs;r.syntax&&(s=r.syntax.parse),r.parser&&(s=r.parser),s.parse&&(s=s.parse);try{n=s(t,r)}catch(o){this.processed=!0,this.error=o}n&&!n[Cs]&&ys.rebuild(n)}this.result=new vn(e,n,r),this.helpers={...Mt,postcss:Mt,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let n=r.postcssPlugin,s=r.postcssVersion,o=this.result.processor.version,u=s.split("."),l=o.split(".");(u[0]!==l[0]||parseInt(u[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+n+" uses "+s+". Perhaps this is the source of the error below.")}}catch(n){console&&console.error&&console.error(n)}return e}prepareVisitors(){this.listeners={};let e=(t,r,n)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,n])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Es[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!As[r])if(typeof t[r]=="object")for(let n in t[r])n==="*"?e(t,r,t[r][n]):e(t,r+"-"+n.toLowerCase(),t[r][n]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(_e(r))try{await r}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[P];){e[P]=!0;let t=[xn(e)];for(;t.length>0;){let r=this.visitTick(t);if(_e(r))try{await r}catch(n){let s=t[t.length-1].node;throw this.handleError(n,s)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let n=e.nodes.map(s=>r(s,this.helpers));await Promise.all(n)}else await r(e,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return _e(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Ss;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=this.result.root.source;if(e.map===void 0&&!(r&&r.input&&r.input.map)){let o="";return t(this.result.root,u=>{o+=u}),this.result.css=o,this.result}let s=new vs(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(_e(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[P];)e[P]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||_s("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){this.result.lastPlugin=r;let s;try{s=n(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(_e(s))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(n.length>0&&t.visitorIndex<n.length){let[o,u]=n[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return u(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let o=t.iterator;t.descending&&(t.descending=!1,r.indexes[o]+=1);let u;for(;u=r.nodes[r.indexes[o]];){if(!u[P]){u[P]=!0,t.descending=!0,e.push(xn(u));return}r.indexes[o]+=1}t.iterator=0,delete r.indexes[o]}let s=t.events;for(;t.eventIndex<s.length;){let o=s[t.eventIndex];if(t.eventIndex+=1,o===ne){r.nodes&&r.nodes.length&&(r[P]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[P]=!0;let t=[{eventIndex:0,events:Lt(e),iterator:0,node:e}];for(;t.length>0;){let r=t[t.length-1],n=r.node;if(r.iterator!==0){let s=r.iterator;r.descending&&(r.descending=!1,n.indexes[s]+=1);let o,u=!1;for(;o=n.nodes[n.indexes[s]];){if(!o[P]){o[P]=!0,r.descending=!0,t.push({eventIndex:0,events:Lt(o),iterator:0,node:o}),u=!0;break}n.indexes[s]+=1}if(u)continue;r.iterator=0,delete n.indexes[s]}if(r.eventIndex<r.events.length){let s=r.events[r.eventIndex];if(r.eventIndex+=1,s===ne)n.nodes&&n.nodes.length&&(r.iterator=n.getIterator());else{let o=this.listeners[s];o&&this.visitSync(o,n.toProxy())&&t.pop()}continue}t.pop()}}warnings(){return this.sync().warnings()}};F.registerPostcss=i=>{Mt=i};Sn.exports=F;F.default=F;bs.registerLazyResult(F);ws.registerLazyResult(F)});var _n=y((No,Cn)=>{"use strict";var Ls=Ct(),Ms=$e(),Rs=Qe(),Is=le(),Ps=At(),Oe=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Ms;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=Is;this.result=new Rs(this._processor,void 0,this._opts),this.result.css=t;let s=this;Object.defineProperty(this.result,"root",{get(){return s.root}});let o=new Ls(n,void 0,this._opts,t);if(o.isMap()){let[u,l]=o.generate();u&&(this.result.css=u),l&&(this.result.map=l)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||Ps("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};Cn.exports=Oe;Oe.default=Oe});var En=y((qo,On)=>{"use strict";var Ns=Pe(),qs=Rt(),ks=_n(),Ts=te(),V=class{constructor(e=[]){this.version="8.5.26",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new ks(this,e,t):new qs(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};On.exports=V;V.default=V;Ts.registerProcessor(V);Ns.registerProcessor(V)});var qn=y((ko,Nn)=>{"use strict";var An=Ie(),Ln=pe(),Us=k(),Bs=Re(),Mn=me(),Rn=Pe(),Ds=rn(),Fs=xe(),js=Rt(),Gs=bt(),zs=ce(),Ws=$e(),It=En(),Vs=Qe(),In=te(),Pn=je(),$s=le(),Qs=Et();function v(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new It(i)}v.plugin=function(e,t){let r=!1;function n(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
34
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
35
|
-
https://www.w3ctech.com/topic/2226`));let u=t(...o);return u.postcssPlugin=e,u.postcssVersion=new It().version,u}let s;return Object.defineProperty(n,"postcss",{get(){return s||(s=n()),s}}),n.process=function(o,u,l){return v([n(l)]).process(o,u)},n};v.stringify=$s;v.parse=Ws;v.fromJSON=Ds;v.list=Gs;v.comment=i=>new Ln(i);v.atRule=i=>new An(i);v.decl=i=>new Mn(i);v.rule=i=>new Pn(i);v.root=i=>new In(i);v.document=i=>new Rn(i);v.CssSyntaxError=Bs;v.Declaration=Mn;v.Container=Us;v.Processor=It;v.Document=Rn;v.Comment=Ln;v.Warning=Qs;v.AtRule=An;v.Result=Vs;v.Input=Fs;v.Rule=Pn;v.Root=In;v.Node=zs;js.registerPostcss(v);Nn.exports=v;v.default=v});var x=Un(qn(),1),To=x.default,Uo=x.default.stringify,Bo=x.default.fromJSON,Do=x.default.plugin,Fo=x.default.parse,jo=x.default.list,Go=x.default.document,zo=x.default.comment,Wo=x.default.atRule,Vo=x.default.rule,$o=x.default.decl,Qo=x.default.root,Jo=x.default.CssSyntaxError,Ho=x.default.Declaration,Yo=x.default.Container,Ko=x.default.Processor,Xo=x.default.Document,Zo=x.default.Comment,el=x.default.Warning,tl=x.default.AtRule,rl=x.default.Result,nl=x.default.Input,il=x.default.Rule,sl=x.default.Root,ol=x.default.Node;export{tl as AtRule,Zo as Comment,Yo as Container,Jo as CssSyntaxError,Ho as Declaration,Xo as Document,nl as Input,ol as Node,Ko as Processor,rl as Result,sl as Root,il as Rule,el as Warning,Wo as atRule,zo as comment,$o as decl,To as default,Go as document,Bo as fromJSON,jo as list,Fo as parse,Do as plugin,Qo as root,Vo as rule,Uo as stringify};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';
|
|
2
|
-
const require = createRequire(import.meta.url);
|
|
3
|
-
import{a as E}from"./chunk-JDYMX3OY.js";import{a as _,b as C}from"./chunk-4TR6Q4JL.js";import"./chunk-MMVDHF5O.js";import"./chunk-OL5QH2XE.js";import"./chunk-KNI7SFGP.js";var q=_(((I,g)=>{g.exports=function(d,u,c){let f=[];if(typeof d<"u"){let t="layer";d&&(t=`layer(${d})`),f.push(t)}return typeof c<"u"&&f.push(`supports(${c})`),typeof u<"u"&&f.push(u),f.join(" ")}})),L=_(((I,g)=>{let m=q();g.exports=function(u,c){if(!c?.length)return u;c.reverse();let f=c.pop(),t=`${u} ${m(f.layer,f.media,f.supports)}`;for(let e of c)t=`'data:text/css;base64,${Buffer.from(`@import ${t}`).toString("base64")}' ${m(e.layer,e.media,e.supports)}`;return t}})),P=_(((I,g)=>{let m=L();g.exports=function(u,c){let f=u.findIndex(e=>e.type==="import"),t=u.findLastIndex(e=>e.type==="import");u.forEach((e,h)=>{if(e.type==="charset"||e.type==="warning")return;if(e.type==="layer"&&(h<t&&e.conditions?.length||h>f&&h<t)){e.type="import",e.node=e.node.clone({name:"import",params:m(`'data:text/css;base64,${Buffer.from(e.node.toString()).toString("base64")}'`,e.conditions)});return}if(!e.conditions?.length)return;if(e.type==="import"){e.node.params=m(e.fullUri,e.conditions);return}let r,o;e.type==="layer"?(r=[e.node],o=e.node.parent):(r=e.nodes,o=r[0].parent);let a=[];for(let i of e.conditions){if(typeof i.media<"u"){let s=c({name:"media",params:i.media,source:o.source});a.push(s)}if(typeof i.supports<"u"){let s=c({name:"supports",params:`(${i.supports})`,source:o.source});a.push(s)}if(typeof i.layer<"u"){let s=c({name:"layer",params:i.layer,source:o.source});a.push(s)}}let n=a.shift(),p=a.reduce((i,s)=>(i.append(s),s),n);o.insertBefore(r[0],n),r.forEach(i=>{i.parent=void 0}),r[0].raws.before=r[0].raws.before||`
|
|
4
|
-
`,p.append(r),e.type="nodes",e.nodes=[n],delete e.node})}})),k=_(((I,g)=>{g.exports=function(d){d.forEach((u,c)=>{c!==0&&(u.type==="nodes"?delete u.nodes[0].raws.before:u.parent&&delete u.node.raws.before)})}})),D=_(((I,g)=>{g.exports=function(d,u){u.nodes=[],d.forEach(c=>{["charset","import","layer"].includes(c.type)?(c.node.parent=void 0,u.append(c.node)):c.type==="nodes"&&c.nodes.forEach(f=>{f.parent=void 0,u.append(f)})})}})),A=_(((I,g)=>{let m=/^data:text\/css(?:;(base64|plain))?,/i,d=/^data:text\/css;base64,/i,u=/^data:text\/css;plain,/i;function c(t){return m.test(t)}function f(t){return d.test(t)?Buffer.from(t.slice(21),"base64").toString():u.test(t)?decodeURIComponent(t.slice(20)):decodeURIComponent(t.slice(14))}g.exports={isValid:c,contents:f}})),M=_(((I,g)=>{let m=E(),{stringify:d}=m;g.exports=function(e,h,r,o){let a=[],n=[],p=!1;return h.each(i=>{let s;i.type==="atrule"?i.name==="import"?s=c(e,i,r,o):i.name==="charset"?s=u(e,i,r,o):i.name==="layer"&&!p&&!i.nodes&&(s=f(e,i,r,o)):i.type!=="comment"&&(p=!0),s?(n.length&&(a.push({type:"nodes",nodes:n,conditions:[...r],from:o}),n=[]),a.push(s)):n.push(i)}),n.length&&a.push({type:"nodes",nodes:n,conditions:[...r],from:o}),a};function u(t,e,h,r){return e.prev()?t.warn("@charset must precede all other statements",{node:e}):{type:"charset",node:e,conditions:[...h],from:r}}function c(t,e,h,r){let o=e.prev();if(o)do{if(o.type==="comment"||o.type==="atrule"&&o.name==="import"){o=o.prev();continue}break}while(o);if(o)do{if(o.type==="comment"||o.type==="atrule"&&(o.name==="charset"||o.name==="layer"&&!o.nodes)){o=o.prev();continue}return t.warn("@import statements must precede all other statements (besides @charset or empty @layer) and be consecutive",{node:e})}while(o);if(e.nodes)return t.warn("It looks like you didn't end your @import statement correctly. Child nodes are attached to it.",{node:e});let a=m(e.params).nodes,n={type:"import",uri:"",fullUri:"",node:e,conditions:[...h],from:r},p,i,s;for(let v=0;v<a.length;v++){let l=a[v];if(!(l.type==="space"||l.type==="comment")){if(l.type==="string"){if(n.uri)return t.warn(`Multiple url's in '${e.toString()}'`,{node:e});if(!l.value)return t.warn(`Unable to find uri in '${e.toString()}'`,{node:e});n.uri=l.value,n.fullUri=d(l);continue}if(l.type==="function"&&/^url$/i.test(l.value)){if(n.uri)return t.warn(`Multiple url's in '${e.toString()}'`,{node:e});if(!l.nodes?.[0]?.value)return t.warn(`Unable to find uri in '${e.toString()}'`,{node:e});n.uri=l.nodes[0].value,n.fullUri=d(l);continue}if(!n.uri)return t.warn(`Unable to find uri in '${e.toString()}'`,{node:e});if((l.type==="word"||l.type==="function")&&/^layer$/i.test(l.value)){if(typeof p<"u")return t.warn(`Multiple layers in '${e.toString()}'`,{node:e});if(typeof s<"u")return t.warn(`layers must be defined before support conditions in '${e.toString()}'`,{node:e});l.nodes?p=d(l.nodes):p="";continue}if(l.type==="function"&&/^supports$/i.test(l.value)){if(typeof s<"u")return t.warn(`Multiple support conditions in '${e.toString()}'`,{node:e});s=d(l.nodes);continue}i=d(a.slice(v));break}}return n.uri?((typeof i<"u"||typeof p<"u"||typeof s<"u")&&n.conditions.push({layer:p,media:i,supports:s}),n):t.warn(`Unable to find uri in '${e.toString()}'`,{node:e})}function f(t,e,h,r){return{type:"layer",node:e,conditions:[...h],from:r}}})),B=_(((I,g)=>{let m=C("path"),d;g.exports=function(f,t,e,h,r){let{plugins:o}=h,a=m.extname(e),n=[];if(a===".sss"){if(!d)try{d=C("sugarss")}catch{}if(d)return u(r,t,e,o,[d])}return f.opts.syntax?.parse&&n.push(f.opts.syntax.parse),f.opts.parser&&n.push(f.opts.parser),n.push(null),u(r,t,e,o,n)};function u(c,f,t,e,h,r){return r||(r=0),c(e).process(f,{from:t,parser:h[r]}).catch(o=>{if(r++,r===h.length)throw o;return u(c,f,t,e,h,r)})}})),N=_(((I,g)=>{let m=C("path"),d=A(),u=M(),c=B(),f=a=>a,t=q();async function e(a,n,p,i,s,v,l){let S=u(a,n,s,v);for(let y of S)y.type!=="import"||!o(y.uri)||p.filter&&!p.filter(y.uri)||await h(a,y,p,i,l);let $,x=[],w=[];function U(y){if(!$)$=y;else if(y.node.params.toLowerCase()!==$.node.params.toLowerCase())throw y.node.error(`Incompatible @charset statements:
|
|
5
|
-
${y.node.params} specified in ${y.node.source.input.file}
|
|
6
|
-
${$.node.params} specified in ${$.node.source.input.file}`)}return S.forEach(y=>{y.type==="charset"?U(y):y.type==="import"?y.children?y.children.forEach((b,F)=>{b.type==="import"||b.type==="layer"?x.push(b):b.type==="charset"?U(b):w.push(b),F===0&&(b.parent=y)}):x.push(y):y.type==="layer"?x.push(y):y.type==="nodes"&&w.push(y)}),$?[$,...x.concat(w)]:x.concat(w)}async function h(a,n,p,i,s){if(d.isValid(n.uri)){n.children=await r(a,n,n.uri,p,i,s);return}else if(d.isValid(n.from.slice(-1)))throw n.node.error(`Unable to import '${n.uri}' from a stylesheet that is embedded in a data url`);let v=n.node,l;v.source?.input?.file&&(l=v.source.input.file);let S=l?m.dirname(v.source.input.file):p.root,$=[await p.resolve(n.uri,S,p,v)].flat(),x=await Promise.all($.map(w=>m.isAbsolute(w)?w:f(w,S,p,v)));x.forEach(w=>{a.messages.push({type:"dependency",plugin:"postcss-import",file:w,parent:l})}),n.children=(await Promise.all(x.map(w=>r(a,n,w,p,i,s)))).flat().filter(w=>!!w)}async function r(a,n,p,i,s,v){let l=n.node,{conditions:S,from:$}=n,x=S.map(b=>t(b.layer,b.media,b.supports)).join(":");if(i.skipDuplicates){if(s.importedFiles[p]?.[x])return;s.importedFiles[p]||(s.importedFiles[p]={}),s.importedFiles[p][x]=!0}if($.includes(p))return;let w=await i.load(p,i);if(w.trim()===""&&i.warnOnEmpty){a.warn(`${p} is empty`,{node:l});return}if(i.skipDuplicates&&s.hashFiles[w]?.[x])return;let U=await c(a,w,p,i,v),y=U.root;return a.messages=a.messages.concat(U.messages),i.skipDuplicates&&(y.some(b=>b.type==="atrule"&&b.name==="import")||(s.hashFiles[w]||(s.hashFiles[w]={}),s.hashFiles[w][x]=!0)),e(a,y,i,s,S,[...$,p],v)}function o(a){if(/^(?:[a-z]+:)?\/\//i.test(a))return!1;try{if(new URL(a,"https://example.com").search)return!1}catch{}return!0}g.exports=e})),O=_(((I,g)=>{let m=C("path"),d=P(),u=k(),c=D(),f=()=>"",t=N(),e=r=>r;function h(r){return r={root:process.cwd(),path:[],skipDuplicates:!0,resolve:e,load:f,plugins:[],addModulesDirectories:[],warnOnEmpty:!0,...r},r.root=m.resolve(r.root),typeof r.path=="string"&&(r.path=[r.path]),Array.isArray(r.path)||(r.path=[]),r.path=r.path.map(o=>m.resolve(r.root,o)),{postcssPlugin:"postcss-import",async Once(o,{result:a,atRule:n,postcss:p}){let i={importedFiles:{},hashFiles:{}};if(o.source?.input?.file&&(i.importedFiles[o.source.input.file]={}),r.plugins&&!Array.isArray(r.plugins))throw new Error("plugins option must be an array");let s=await t(a,o,r,i,[],[],p);u(s),d(s,n),c(s,o)}}}h.postcss=!0,g.exports=h})),z=O();export{z as default};
|