@visulima/packem 2.0.0-alpha.95 → 2.0.0-alpha.96

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.
@@ -1 +1 @@
1
- import{t as e}from"../../../packem_shared/oxcTransformPlugin-Dwvbw2jE-CI_T_eTp.js";export{e as default};
1
+ import"@rollup/pluginutils";import{t as p}from"../../../packem_shared/oxcTransformPlugin-B5ATuMoi-DwCO2qaH.js";import"oxc-resolver";export{p as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/packem",
3
- "version": "2.0.0-alpha.95",
3
+ "version": "2.0.0-alpha.96",
4
4
  "description": "A fast and modern bundler for Node.js and TypeScript.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -174,10 +174,10 @@
174
174
  "@clack/prompts": "1.7.0",
175
175
  "@rollup/pluginutils": "5.4.0",
176
176
  "@visulima/cerebro": "3.0.0",
177
- "@visulima/packem-share": "1.0.0-alpha.52",
178
- "@visulima/rollup-plugin-css": "1.0.0-alpha.56",
179
- "@visulima/rollup-plugin-dts": "1.0.0-alpha.37",
180
- "@visulima/tsconfig": "3.0.0",
177
+ "@visulima/packem-share": "1.0.0-alpha.53",
178
+ "@visulima/rollup-plugin-css": "1.0.0-alpha.57",
179
+ "@visulima/rollup-plugin-dts": "1.0.0-alpha.38",
180
+ "@visulima/tsconfig": "3.0.2",
181
181
  "browserslist": "4.28.6",
182
182
  "cjs-module-lexer": "2.2.0",
183
183
  "clean-css": "^5.3.3",
@@ -202,7 +202,7 @@
202
202
  "@swc/core": ">=1.15.40",
203
203
  "@tailwindcss/node": "4.3.2",
204
204
  "@tailwindcss/oxide": "4.3.2",
205
- "@visulima/packem-rollup": "1.0.0-alpha.77",
205
+ "@visulima/packem-rollup": "1.0.0-alpha.78",
206
206
  "cssnano": ">=8.0.1",
207
207
  "esbuild": ">=0.28.0",
208
208
  "icss-utils": ">=5.1.0",
@@ -1 +0,0 @@
1
- var m=Object.defineProperty;var u=(t,e)=>m(t,"name",{value:e,configurable:!0});import{transformAsync as g}from"@babel/core";var f=Object.defineProperty,p=u((t,e)=>f(t,"name",{value:e,configurable:!0}),"o");const d=/\.tsx?$/,y=/['"]use memo['"]/,x="babel-options",v="__packem_babel_missing_options__",A=p(t=>t.find(e=>e==="babel-plugin-react-compiler"||Array.isArray(e)&&e[0]==="babel-plugin-react-compiler"),"getReactCompilerPlugin"),b=p((t,e)=>{if(t.length===0)return;const s=A(t);if(!(!s||!Array.isArray(s))&&s[1]?.compilationMode==="annotation"&&!y.test(e)){const a=t.indexOf(s);a!==-1&&t.splice(a,1)}},"filterReactCompilerByAnnotation"),w=p(async(t,e,{filename:s,generatorOpts:a,sourceFileName:h,...r})=>{let n=[];r.plugins&&Array.isArray(r.plugins)&&(n=[...r.plugins]),n.length>0&&b(n,t);const o=[];(e.endsWith(".jsx")||e.endsWith(".tsx"))&&o.push("jsx"),d.test(e)&&o.push("typescript");const i=r.parserOpts?.plugins;i&&Array.isArray(i)&&o.unshift(...i);const c=[...new Set(o)],l=await g(t,{...r,filename:e,generatorOpts:a,parserOpts:{...r.parserOpts,allowAwaitOutsideFunction:!0,plugins:c.length>0?c:[],sourceType:"module"},plugins:n.length>0?n:[],sourceFileName:e});if(l?.code)return{code:l.code,map:l.map??void 0}},"transformCode");export{x as N,v as O,w as t};
@@ -1,26 +0,0 @@
1
- import{createRequire as L}from"node:module";import{B as Et,L as Z,m as be,W as ge,J as mr,j as br,A as $r,H as $e}from"./utils-DqCpIxDx.js";const he=0,pt=1,xt=2,ft=3,ss=/^-{1,2}(no-color|no-colors|color=false|color=never)$/,os=/^-{1,2}(color=256)$/,ns=/^-{1,2}(color=16m|color=full|color=truecolor)$/,is=/^-{1,2}(color|colors|color=true|color=always)$/,us=/-mono|dumb/i,as=/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/,ls=/-256(color)?$/i,cs=/^screen|^tmux|^xterm|^vt[1-5]\d\d|^ansi|color|mintty|rxvt|cygwin|linux/i,ps=()=>{const t=globalThis.process?.getBuiltinModule;return typeof t!="function"?"":t("node:os").release()},vr=(t,e={})=>{const{isTTY:r,sniffFlags:n=!0}=e,o=globalThis,s=o.Deno!=null,i=o.process??o.Deno??{},l=i.argv??i.args??[],p=n?l.indexOf("--"):-1,y=a=>{if(!n)return!1;const A=l.findIndex(T=>a.test(T));return A!==-1&&(p===-1||A<p)};let u={};try{u=s?i.env.toObject():i.env??{}}catch{}const f="FORCE_COLOR",m=f in u,c=u[f]??void 0,b=typeof c=="string",R=typeof c=="number";let w;if(c==="true")w=pt;else if(c==="false")w=he;else if(b&&c.length===0)w=pt;else if(b&&c.length>0){const a=Number.parseInt(c,10);w=Number.isNaN(a)?void 0:Math.min(a,3)}else R&&(w=Number.isNaN(c)?void 0:Math.min(c,3));if(c!=="true"&&c!=="false"&&w!==void 0&&w<4)return w;const O=m&&w!==void 0&&w>0;if(m&&w===0||y(ss)||!O&&"NO_COLOR"in u)return he;if(y(os))return xt;if(y(ns))return ft;if(y(is))return pt;const $=w??he;if("TF_BUILD"in u&&"AGENT_NAME"in u)return pt;if(u.TERM&&us.test(u.TERM))return $;if((s?o.Deno.build.os:i.platform)==="win32"){if("WT_SESSION"in u)return ft;if("ANSICON"in u)return pt;try{let a;s?a=o.Deno.osRelease():typeof i.os?.release=="function"?a=i.os.release():a=ps();const A=a.split(".");return Number(A[0])>=10&&Number(A[2])>=10586?Number(A[2])>=14931?ft:xt:pt}catch{}}if("CI"in u)return["GITEA_ACTIONS","CIRCLECI","GITHUB_WORKFLOW","GITHUB_ACTIONS"].some(a=>a in u)?ft:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in u)||u.CI_NAME==="codeship"?pt:$;if(u.TERMINAL_EMULATOR?.includes("JediTerm"))return ft;if("TEAMCITY_VERSION"in u)return as.test(u.TEAMCITY_VERSION)?pt:he;if(u.COLORTERM==="truecolor"||u.TERM==="xterm-kitty"||u.TERM==="xterm-ghostty"||u.TERM==="wezterm")return ft;if("TERM_PROGRAM"in u){const a=Number.parseInt((u.TERM_PROGRAM_VERSION??"").split(".")[0],10);if(u.TERM_PROGRAM==="iTerm.app")return a>=3?ft:xt;if(u.TERM_PROGRAM==="Apple_Terminal")return xt}if(ls.test(u.TERM))return xt;let v;return r!==void 0?v=r:s?v=t==="out"?o.Deno.stdout.isTerminal():o.Deno.stderr.isTerminal():"PM2_HOME"in u&&"pm_id"in u?v=!0:v=!!i[`std${t}`]?.isTTY,v&&cs.test(u.TERM)||"COLORTERM"in u?pt:$},fs=()=>vr("out"),hs=()=>vr("err");function gs({onlyFirst:t=!1}={}){const e="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(e,t?void 0:"g")}const $t=(t,e,r)=>e>t?e:Math.min(t,r),ds=/^#?([a-f\d]{3}|[a-f\d]{6})$/i,ys=t=>{let[,e]=ds.exec(t)??[];const r=e?e.length:0;if(r===3){const o=e.charAt(0),s=e.charAt(1),i=e.charAt(2);e=o+o+s+s+i+i}else if(r!==6)return globalThis.process?.env?.NODE_ENV!=="production"&&console.warn(`[@visulima/colorize] Invalid hex color "${t}"; expected a 3- or 6-digit hex string (e.g. "#96C" or "#E0115F"). Falling back to black.`),[0,0,0];const n=Number.parseInt(e,16);return[n>>16&255,n>>8&255,n&255]},Er=(t,e,r)=>t===e&&e===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/51)+6*Math.round(e/51)+Math.round(r/51),Le=t=>{let e,r,n;if(t<8)return 30+t;if(t<16)return 90+(t-8);if(t>=232)e=r=n=((t-232)*10+8)/255;else{t-=16;const i=t%36;e=Math.floor(t/36)/5,r=Math.floor(i/6)/5,n=i%6/5}const o=Math.max(e,r,n)*2;if(o===0)return 30;const s=30+(Math.round(n)<<2|Math.round(r)<<1|Math.round(e));return o===2?s+60:s},Ge=(t,e,r)=>Le(Er(t,e,r)),K=39,X=49,Ue=10,We={close:"",open:""},Sr=t=>{const e=t>0?(f,m)=>({close:`\x1B[${String(m)}m`,open:`\x1B[${String(f)}m`}):()=>We,r=f=>(m,c,b)=>f(Er(Number(m),Number(c),Number(b))),n=f=>m=>{const[c,b,R]=ys(m);return f(c,b,R)};let o=f=>e(`38;5;${String(f)}`,K),s=f=>e(`48;5;${String(f)}`,X),i=(f,m,c)=>e(`38;2;${String(f)};${String(m)};${String(c)}`,K),l=(f,m,c)=>e(`48;2;${String(f)};${String(m)};${String(c)}`,X);t===1?(o=f=>e(Le(Number(f)),K),s=f=>e(Le(Number(f))+Ue,X),i=(f,m,c)=>e(Ge(Number(f),Number(m),Number(c)),K),l=(f,m,c)=>e(Ge(Number(f),Number(m),Number(c))+Ue,X)):t===2&&(i=r(o),l=r(s));const p={bold:e(1,22),dim:e(2,22),hidden:e(8,28),inverse:e(7,27),italic:e(3,23),overline:e(53,55),reset:e(0,0),strike:e(9,29),strikethrough:e(9,29),underline:e(4,24),visible:We},y={bgBlack:e(40,X),bgBlackBright:e(100,X),bgBlue:e(44,X),bgBlueBright:e(104,X),bgCyan:e(46,X),bgCyanBright:e(106,X),bgGray:e(100,X),bgGreen:e(42,X),bgGreenBright:e(102,X),bgGrey:e(100,X),bgMagenta:e(45,X),bgMagentaBright:e(105,X),bgRed:e(41,X),bgRedBright:e(101,X),bgWhite:e(47,X),bgWhiteBright:e(107,X),bgYellow:e(43,X),bgYellowBright:e(103,X),black:e(30,K),blackBright:e(90,K),blue:e(34,K),blueBright:e(94,K),cyan:e(36,K),cyanBright:e(96,K),gray:e(90,K),green:e(32,K),greenBright:e(92,K),grey:e(90,K),magenta:e(35,K),magentaBright:e(95,K),red:e(31,K),redBright:e(91,K),white:e(37,K),whiteBright:e(97,K),yellow:e(33,K),yellowBright:e(93,K)},u={bg:f=>s($t(f,0,255)),bgHex:n(l),bgRgb:(f,m,c)=>l($t(f,0,255),$t(m,0,255),$t(c,0,255)),fg:f=>o($t(f,0,255)),hex:n(i),rgb:(f,m,c)=>i($t(f,0,255),$t(m,0,255),$t(c,0,255))};return{baseColors:y,baseStyles:p,styleMethods:u}},Ar=fs(),ms=hs();Sr(Ar);const bs=(t,e,r)=>{if(e==="")return t;let n=t.indexOf(e);if(n<0)return t;const o=e.length;let s=0,i="";for(;~n;)i+=t.slice(s,n)+r,s=n+o,n=t.indexOf(e,s);return i+t.slice(s)},$s=(t,e,r)=>{if(!t)return"";let n;if(t.raw===void 0?n=String(t):n=String.raw(t,...e),n.includes("\x1B"))for(let o=r;o;o=o.props)n=bs(n,o.close,o.open);return n.includes(`
2
- `)&&(n=n.replace(/(\r*\n)/g,`${r.closeStack}$1${r.openStack}`)),r.openStack+n+r.closeStack},wr=function(t){const e=t?.level??Ar,{baseColors:r,baseStyles:n,styleMethods:o}=Sr(e),s={};let i=null;const l=({props:y},{close:u,open:f})=>{const m=(y?.openStack??"")+f,c=u+(y?.closeStack??""),b=(R,...w)=>$s(R,w,b.props);return Object.setPrototypeOf(b,i),b.props={close:u,closeStack:c,open:f,openStack:m,props:y},b.open=m,b.close=c,b},p=y=>String(y);p.strip=y=>y.replaceAll(gs(),"");for(const y in r)s[y]={get(){const u=l(this,r[y]);return Object.defineProperty(this,y,{value:u}),u}};for(const y in n)s[y]={get(){const u=l(this,n[y]);return Object.defineProperty(this,y,{value:u}),u}};for(const y in o)s[y]={get(){return(...u)=>l(this,o[y](...u))}};return s.ansi256=s.fg,s.bgAnsi256=s.bg,i=Object.defineProperties({},s),Object.setPrototypeOf(p,i),p},ht=new wr;new wr({level:ms});const Pu=ht.blue,Fu=ht.bold,Gu=ht.cyan,Uu=ht.dim,Wu=ht.gray,ju=ht.green,qu=ht.grey,Ku=ht.magenta,Xu=ht.red,Qu=ht.yellow,ve=0,Rr=4,Tr=Symbol("findUpStop");let xr=class extends Error{constructor(e){super(`EEXIST: ${e}`)}get code(){return"EEXIST"}set code(e){throw new Error("Cannot overwrite code EEXIST")}get name(){return"AlreadyExistsError"}set name(e){throw new Error("Cannot overwrite name of AlreadyExistsError")}};const gt=t=>{if(!t||!(t instanceof URL)&&typeof t!="string")throw new TypeError("Path must be a non-empty string or URL.")},vs=L(import.meta.url),_t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Es=t=>{if(typeof _t<"u"&&_t.versions&&_t.versions.node){const[e,r]=_t.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return _t.getBuiltinModule(t)}return vs(t)};Es("node:fs/promises");const Ss=L(import.meta.url),kt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,As=t=>{if(typeof kt<"u"&&kt.versions&&kt.versions.node){const[e,r]=kt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return kt.getBuiltinModule(t)}return Ss(t)};As("node:fs");const je=t=>{if(t.isFile())return"file";if(t.isDirectory())return"dir";if(t.isSymbolicLink())return"symlink"},ws=L(import.meta.url),Ot=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Rs=t=>{if(typeof Ot<"u"&&Ot.versions&&Ot.versions.node){const[e,r]=Ot.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ot.getBuiltinModule(t)}return ws(t)};Rs("node:fs/promises");const Ts=L(import.meta.url),Ct=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,xs=t=>{if(typeof Ct<"u"&&Ct.versions&&Ct.versions.node){const[e,r]=Ct.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ct.getBuiltinModule(t)}return Ts(t)},{lstatSync:qe,mkdirSync:_s}=xs("node:fs"),Yu=t=>{gt(t);try{const e=qe(t);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(je(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{_s(t,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const r=qe(t);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(je(r))}'`,{cause:e})}},ks=L(import.meta.url),Nt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Os=t=>{if(typeof Nt<"u"&&Nt.versions&&Nt.versions.node){const[e,r]=Nt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Nt.getBuiltinModule(t)}return ks(t)};Os("node:fs/promises");const Cs=L(import.meta.url),Mt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ns=t=>{if(typeof Mt<"u"&&Mt.versions&&Mt.versions.node){const[e,r]=Mt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Mt.getBuiltinModule(t)}return Cs(t)};Ns("node:fs");const Ms=L(import.meta.url),Bt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Bs=t=>{if(typeof Bt<"u"&&Bt.versions&&Bt.versions.node){const[e,r]=Bt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Bt.getBuiltinModule(t)}return Ms(t)};Bs("node:fs/promises");const Ls=L(import.meta.url),Lt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Hs=t=>{if(typeof Lt<"u"&&Lt.versions&&Lt.versions.node){const[e,r]=Lt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Lt.getBuiltinModule(t)}return Ls(t)};Hs("node:fs");const Is=L(import.meta.url),Ht=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ds=t=>{if(typeof Ht<"u"&&Ht.versions&&Ht.versions.node){const[e,r]=Ht.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ht.getBuiltinModule(t)}return Is(t)};Ds("node:fs/promises");const Ps=L(import.meta.url),It=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Fs=t=>{if(typeof It<"u"&&It.versions&&It.versions.node){const[e,r]=It.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return It.getBuiltinModule(t)}return Ps(t)};Fs("node:fs");L(import.meta.url);let de=class extends Error{root;constructor(e,r){super(`${e instanceof Error?e.message:String(e)} for path "${r}"`),this.cause=e,this.root=r}get name(){return"WalkError"}set name(e){throw new Error("Cannot overwrite name of WalkError")}};const ye=t=>{const e=t.replace(/[$()+\\^]/g,String.raw`\$&`).replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,String.raw`\.`).replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");try{return new RegExp(`^${e}$`)}catch(r){throw new Error(`Invalid glob pattern: ${t}`,{cause:r})}};let Gs=class{name;path;#t;constructor(e,r,n){this.#t=e,this.name=r,this.path=n}isDirectory(){return this.#t.isDirectory()}isFile(){return this.#t.isFile()}isSymbolicLink(){return this.#t.isSymbolicLink()}};const Tt=(t,e,r)=>new Gs(t,e,r),vt=(t,e,r,n)=>{if(Array.isArray(e)&&e.length>0&&!e.some(s=>t.endsWith(s)))return!1;const o=t.includes("\\")?t.replaceAll("\\","/"):t;return r&&!r.some(s=>s.test(o))?!1:!n?.some(s=>s.test(o))},Us=L(import.meta.url),Dt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ws=t=>{if(typeof Dt<"u"&&Dt.versions&&Dt.versions.node){const[e,r]=Dt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Dt.getBuiltinModule(t)}return Us(t)},{readdir:js,realpath:qs,stat:_r}=Ws("node:fs/promises"),Ks=async t=>{const e=ge(t),r=mr(e),n=await _r(e);return Tt(n,r,e)};async function*Xs(t,e={}){const{extensions:r,followSymlinks:n=!1,includeDirs:o=!0,includeFiles:s=!0,includeSymlinks:i=!0,match:l,maxDepth:p=Number.POSITIVE_INFINITY,skip:y}=e;if(gt(t),p<0)return;const u=e.visited??new Set,f=l?l.map(c=>typeof c=="string"?ye(c):c):void 0,m=y?y.map(c=>typeof c=="string"?ye(c):c):void 0;if(t=Et(Z(t)),o&&vt(t,r,f,m)&&(yield await Ks(t)),!(p<1||!vt(t,void 0,void 0,m)))try{const c=await js(t,{withFileTypes:!0});for(const b of c){let R=be(t,b.name),w=b.isDirectory(),O=b.isFile();if(b.isSymbolicLink())if(n){const $=await qs(R);if(u.has($))continue;R=$;const v=await _r($);w=v.isDirectory(),O=v.isFile()}else if(i&&vt(R,r,f,m)){yield Tt(b,b.name,R);continue}else continue;w?(n&&u.add(R),yield*Xs(R,{extensions:r,followSymlinks:n,includeDirs:o,includeFiles:s,includeSymlinks:i,match:f,maxDepth:p-1,skip:m,visited:u})):O&&s&&vt(R,r,f,m)&&(yield Tt(b,b.name,R))}}catch(c){throw c instanceof de?c:new de(c,t)}}const Qs=L(import.meta.url),Pt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,zs=t=>{if(typeof Pt<"u"&&Pt.versions&&Pt.versions.node){const[e,r]=Pt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Pt.getBuiltinModule(t)}return Qs(t)},{readdirSync:Ys,realpathSync:Vs,statSync:kr}=zs("node:fs"),Zs=t=>{const e=ge(t),r=kr(e);return Tt(r,mr(e),e)};function*Js(t,e={}){const{extensions:r,followSymlinks:n=!1,includeDirs:o=!0,includeFiles:s=!0,includeSymlinks:i=!0,match:l,maxDepth:p=Number.POSITIVE_INFINITY,skip:y}=e;if(gt(t),p<0)return;const u=e.visited??new Set,f=l?l.map(c=>typeof c=="string"?ye(c):c):void 0,m=y?y.map(c=>typeof c=="string"?ye(c):c):void 0;if(t=Et(Z(t)),o&&vt(t,r,f,m)&&(yield Zs(t)),!(p<1||!vt(t,void 0,void 0,m)))try{const c=Ys(t,{withFileTypes:!0});for(const b of c){let R=be(t,b.name),w=b.isDirectory(),O=b.isFile();if(b.isSymbolicLink())if(n){const $=Vs(R);if(u.has($))continue;R=$;const v=kr($);w=v.isDirectory(),O=v.isFile()}else if(i&&vt(R,r,f,m)){yield Tt(b,b.name,ge(R));continue}else continue;w?(n&&u.add(R),yield*Js(R,{extensions:r,followSymlinks:n,includeDirs:o,includeFiles:s,includeSymlinks:i,match:f,maxDepth:p-1,skip:m,visited:u})):O&&s&&vt(R,r,f,m)&&(yield Tt(b,b.name,ge(R)))}}catch(c){throw c instanceof de?c:new de(c,t)}}const to=L(import.meta.url),Ft=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,eo=t=>{if(typeof Ft<"u"&&Ft.versions&&Ft.versions.node){const[e,r]=Ft.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ft.getBuiltinModule(t)}return to(t)},{stat:ro,lstat:so}=eo("node:fs/promises"),Ju=async(t,e={})=>{const r=e.cwd?Z(e.cwd):process.cwd();let n=Et(r);const{root:o}=br(n),s=Z(e.stopAt??o),i=Et(n,s),l=e.type??"file",p=async function(u){return[t]};e.allowSymlinks??=!0;const y=e.allowSymlinks?ro:so;for(;n&&n!==i&&n!==o;){const u=await p();for(let f of u){if(f===Tr)return;if(f===void 0)continue;Buffer.isBuffer(f)?f=f.toString():f instanceof URL&&(f=Z(f));const m=$r(f)?f:Et(n,f);try{const c=await y(m);if(l==="file"&&c.isFile()||l==="directory"&&c.isDirectory())return m}catch{}}n=$e(n)}},oo=L(import.meta.url),Gt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,no=t=>{if(typeof Gt<"u"&&Gt.versions&&Gt.versions.node){const[e,r]=Gt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Gt.getBuiltinModule(t)}return oo(t)},{statSync:io,lstatSync:uo}=no("node:fs"),ta=(t,e={})=>{const r=e.cwd?Z(e.cwd):process.cwd();let n=Et(r);const{root:o}=br(n),s=Z(e.stopAt??o),i=Et(n,s),l=e.type??"file",p=function(u){return[t]};e.allowSymlinks??=!0;const y=e.allowSymlinks?io:uo;for(;n&&n!==i&&n!==o;){for(let u of p()){if(u===Tr)return;if(u===void 0)continue;Buffer.isBuffer(u)?u=u.toString():u instanceof URL&&(u=Z(u));const f=$r(u)?u:Et(n,u);try{const m=y(f);if(l==="file"&&m.isFile()||l==="directory"&&m.isDirectory())return f}catch{}}n=$e(n)}};function De(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ke={},we,Xe;function Ee(){if(Xe)return we;Xe=1;const t="[^\\\\/]",e=Symbol("unignore"),r="\\.",n="\\+",o="\\?",s="\\/",i="(?=.)",l="[^/]",p=`(?:${s}|$)`,y=`(?:^|${s})`,u=`${r}{1,2}${p}`,f=`(?!${r})`,m=`(?!${y}${u})`,c=`(?!${r}{0,1}${p})`,b=`(?!${u})`,R=`[^.${s}]`,w=`${l}*?`,O="/",$={DOT_LITERAL:r,PLUS_LITERAL:n,QMARK_LITERAL:o,SLASH_LITERAL:s,ONE_CHAR:i,QMARK:l,END_ANCHOR:p,DOTS_SLASH:u,NO_DOT:f,NO_DOTS:m,NO_DOT_SLASH:c,NO_DOTS_SLASH:b,QMARK_NO_DOT:R,STAR:w,START_ANCHOR:y,SEP:O},v={...$,SLASH_LITERAL:"[\\\\/]",QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${r}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[\\\\/])${r}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},a={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return we={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:a,UNIGNORE:e,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(A){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${A.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(A){return A===!0?v:$}},we}var Qe;function Se(){return Qe||(Qe=1,(function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:r,REGEX_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_GLOBAL:o}=Ee();t.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),t.hasRegexChars=s=>n.test(s),t.isRegexChar=s=>s.length===1&&t.hasRegexChars(s),t.escapeRegex=s=>s.replace(o,"\\$1"),t.toPosixSlashes=s=>s.replace(e,"/"),t.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const s=navigator.platform.toLowerCase();return s==="win32"||s==="windows"}return process.platform?process.platform==="win32":!1},t.removeBackslashes=s=>s.replace(r,i=>i==="\\"?"":i),t.escapeLast=(s,i,l)=>{const p=s.lastIndexOf(i,l);return p===-1?s:s[p-1]==="\\"?t.escapeLast(s,i,p-1):`${s.slice(0,p)}\\${s.slice(p)}`},t.removePrefix=(s,i={})=>{let l=s;return l.startsWith("./")&&(l=l.slice(2),i.prefix="./"),l},t.wrapOutput=(s,i={},l={})=>{const p=l.contains?"":"^",y=l.contains?"":"$";let u=`${p}(?:${s})${y}`;return i.negated===!0&&(u=`(?:^(?!${u}).*$)`),u},t.basename=(s,{windows:i}={})=>{const l=s.split(i?/[\\/]/:"/"),p=l[l.length-1];return p===""?l[l.length-2]:p}})(Ke)),Ke}var Re,ze;function ao(){if(ze)return Re;ze=1;const t=Se(),{CHAR_ASTERISK:e,CHAR_AT:r,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:i,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:p,CHAR_LEFT_PARENTHESES:y,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:f,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:c,CHAR_RIGHT_PARENTHESES:b,CHAR_RIGHT_SQUARE_BRACKET:R}=Ee(),w=$=>$===l||$===n,O=$=>{$.isPrefix!==!0&&($.depth=$.isGlobstar?1/0:1)};return Re=($,v)=>{const a=v||{},A=$.length-1,T=a.parts===!0||a.scanToEnd===!0,_=[],x=[],k=[];let F=$,I=-1,U=0,nt=0,J=!1,it=!1,W=!1,dt=!1,St=!1,ut=!1,P=!1,at=!1,At=!1,tt=!1,V=0,rt,C,B={value:"",depth:0,isGlob:!1};const d=()=>I>=A,et=()=>F.charCodeAt(I+1),z=()=>(rt=C,F.charCodeAt(++I));for(;I<A;){C=z();let H;if(C===n){P=B.backslashes=!0,C=z(),C===p&&(ut=!0);continue}if(ut===!0||C===p){for(V++;d()!==!0&&(C=z());){if(C===n){P=B.backslashes=!0,z();continue}if(C===p){V++;continue}if(ut!==!0&&C===s&&(C=z())===s){if(J=B.isBrace=!0,W=B.isGlob=!0,tt=!0,T===!0)continue;break}if(ut!==!0&&C===o){if(J=B.isBrace=!0,W=B.isGlob=!0,tt=!0,T===!0)continue;break}if(C===c&&(V--,V===0)){ut=!1,J=B.isBrace=!0,tt=!0;break}}if(T===!0)continue;break}if(C===l){if(_.push(I),x.push(B),B={value:"",depth:0,isGlob:!1},tt===!0)continue;if(rt===s&&I===U+1){U+=2;continue}nt=I+1;continue}if(a.noext!==!0&&(C===f||C===r||C===e||C===m||C===i)&&et()===y){if(W=B.isGlob=!0,dt=B.isExtglob=!0,tt=!0,C===i&&I===U&&(At=!0),T===!0){for(;d()!==!0&&(C=z());){if(C===n){P=B.backslashes=!0,C=z();continue}if(C===b){W=B.isGlob=!0,tt=!0;break}}continue}break}if(C===e){if(rt===e&&(St=B.isGlobstar=!0),W=B.isGlob=!0,tt=!0,T===!0)continue;break}if(C===m){if(W=B.isGlob=!0,tt=!0,T===!0)continue;break}if(C===u){for(;d()!==!0&&(H=z());){if(H===n){P=B.backslashes=!0,z();continue}if(H===R){it=B.isBracket=!0,W=B.isGlob=!0,tt=!0;break}}if(T===!0)continue;break}if(a.nonegate!==!0&&C===i&&I===U){at=B.negated=!0,U++;continue}if(a.noparen!==!0&&C===y){if(W=B.isGlob=!0,T===!0){for(;d()!==!0&&(C=z());){if(C===y){P=B.backslashes=!0,C=z();continue}if(C===b){tt=!0;break}}continue}break}if(W===!0){if(tt=!0,T===!0)continue;break}}a.noext===!0&&(dt=!1,W=!1);let Q=F,h="",g="";U>0&&(h=F.slice(0,U),F=F.slice(U),nt-=U),Q&&W===!0&&nt>0?(Q=F.slice(0,nt),g=F.slice(nt)):W===!0?(Q="",g=F):Q=F,Q&&Q!==""&&Q!=="/"&&Q!==F&&w(Q.charCodeAt(Q.length-1))&&(Q=Q.slice(0,-1)),a.unescape===!0&&(g&&(g=t.removeBackslashes(g)),Q&&P===!0&&(Q=t.removeBackslashes(Q)));const ot={prefix:h,input:$,start:U,base:Q,glob:g,isBrace:J,isBracket:it,isGlob:W,isExtglob:dt,isGlobstar:St,negated:at,negatedExtglob:At};if(a.tokens===!0&&(ot.maxDepth=0,w(C)||x.push(B),ot.tokens=x),a.parts===!0||a.tokens===!0){let H;for(let j=0;j<_.length;j++){const yt=H?H+1:U,st=_[j],mt=$.slice(yt,st);a.tokens&&(j===0&&U!==0?(x[j].isPrefix=!0,x[j].value=h):x[j].value=mt,O(x[j]),ot.maxDepth+=x[j].depth),(j!==0||mt!=="")&&k.push(mt),H=st}if(H&&H+1<$.length){const j=$.slice(H+1);k.push(j),a.tokens&&(x[x.length-1].value=j,O(x[x.length-1]),ot.maxDepth+=x[x.length-1].depth)}ot.slashes=_,ot.parts=k}return ot},Re}var Te,Ye;function lo(){if(Ye)return Te;Ye=1;const t=Ee(),e=Se(),{MAX_LENGTH:r,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:i}=t,l=($,v)=>typeof v.expandRange=="function"?v.expandRange(...$,v):($.sort(),`[${$.join("-")}]`),p=($,v)=>`Missing ${$}: "${v}" - use "\\\\${v}" to match literal characters`,y=$=>{const v=[];let a=0,A=0,T=0,_="",x=!1;for(const k of $){if(x===!0){_+=k,x=!1;continue}if(k==="\\"){_+=k,x=!0;continue}if(k==='"'){T=T===1?0:1,_+=k;continue}if(T===0){if(k==="[")a++;else if(k==="]"&&a>0)a--;else if(a===0){if(k==="(")A++;else if(k===")"&&A>0)A--;else if(k==="|"&&A===0){v.push(_),_="";continue}}}_+=k}return v.push(_),v},u=$=>{let v=!1;for(const a of $){if(v===!0){v=!1;continue}if(a==="\\"){v=!0;continue}if(/[?*+@!()[\]{}]/.test(a))return!1}return!0},f=$=>{let v=$.trim(),a=!0;for(;a===!0;)a=!1,/^@\([^\\()[\]{}|]+\)$/.test(v)&&(v=v.slice(2,-1),a=!0);if(u(v))return v.replace(/\\(.)/g,"$1")},m=$=>{const v=$.map(f).filter(Boolean);for(let a=0;a<v.length;a++)for(let A=a+1;A<v.length;A++){const T=v[a],_=v[A],x=T[0];if(!(!x||T!==x.repeat(T.length)||_!==x.repeat(_.length))&&(T===_||T.startsWith(_)||_.startsWith(T)))return!0}return!1},c=($,v=!0)=>{if($[0]!=="+"&&$[0]!=="*"||$[1]!=="(")return;let a=0,A=0,T=0,_=!1;for(let x=1;x<$.length;x++){const k=$[x];if(_===!0){_=!1;continue}if(k==="\\"){_=!0;continue}if(k==='"'){T=T===1?0:1;continue}if(T!==1){if(k==="["){a++;continue}if(k==="]"&&a>0){a--;continue}if(!(a>0)){if(k==="("){A++;continue}if(k===")"&&(A--,A===0))return v===!0&&x!==$.length-1?void 0:{type:$[0],body:$.slice(2,x),end:x}}}}},b=$=>{let v=0;const a=[];for(;v<$.length;){const A=c($.slice(v),!1);if(!A||A.type!=="*")return;const T=y(A.body).map(x=>x.trim());if(T.length!==1)return;const _=f(T[0]);if(!_||_.length!==1)return;a.push(_),v+=A.end+1}return a.length<1?void 0:`${a.length===1?e.escapeRegex(a[0]):`[${a.map(A=>e.escapeRegex(A)).join("")}]`}*`},R=$=>{let v=0,a=$.trim(),A=c(a);for(;A;)v++,a=A.body.trim(),A=c(a);return v},w=($,v)=>{if(v.maxExtglobRecursion===!1)return{risky:!1};const a=typeof v.maxExtglobRecursion=="number"?v.maxExtglobRecursion:t.DEFAULT_MAX_EXTGLOB_RECURSION,A=y($).map(T=>T.trim());if(A.length>1&&(A.some(T=>T==="")||A.some(T=>/^[*?]+$/.test(T))||m(A)))return{risky:!0};for(const T of A){const _=b(T);if(_)return{risky:!0,safeOutput:_};if(R(T)>a)return{risky:!0}}return{risky:!1}},O=($,v)=>{if(typeof $!="string")throw new TypeError("Expected a string");$=i[$]||$;const a={...v},A=typeof a.maxLength=="number"?Math.min(r,a.maxLength):r;let T=$.length;if(T>A)throw new SyntaxError(`Input length: ${T}, exceeds maximum allowed length: ${A}`);const _={type:"bos",value:"",output:a.prepend||""},x=[_],k=a.capture?"":"?:",F=t.globChars(a.windows),I=t.extglobChars(F),{DOT_LITERAL:U,PLUS_LITERAL:nt,SLASH_LITERAL:J,ONE_CHAR:it,DOTS_SLASH:W,NO_DOT:dt,NO_DOT_SLASH:St,NO_DOTS_SLASH:ut,QMARK:P,QMARK_NO_DOT:at,STAR:At,START_ANCHOR:tt}=F,V=S=>`(${k}(?:(?!${tt}${S.dot?W:U}).)*?)`,rt=a.dot?"":dt,C=a.dot?P:at;let B=a.bash===!0?V(a):At;a.capture&&(B=`(${B})`),typeof a.noext=="boolean"&&(a.noextglob=a.noext);const d={input:$,index:-1,start:0,dot:a.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:x};$=e.removePrefix($,d),T=$.length;const et=[],z=[],Q=[];let h=_,g;const ot=()=>d.index===T-1,H=d.peek=(S=1)=>$[d.index+S],j=d.advance=()=>$[++d.index]||"",yt=()=>$.slice(d.index+1),st=(S="",G=0)=>{d.consumed+=S,d.index+=G},mt=S=>{d.output+=S.output!=null?S.output:S.value,st(S.value)},es=()=>{let S=1;for(;H()==="!"&&(H(2)!=="("||H(3)==="?");)j(),d.start++,S++;return S%2===0?!1:(d.negated=!0,d.start++,!0)},pe=S=>{d[S]++,Q.push(S)},bt=S=>{d[S]--,Q.pop()},N=S=>{if(h.type==="globstar"){const G=d.braces>0&&(S.type==="comma"||S.type==="brace"),E=S.extglob===!0||et.length&&(S.type==="pipe"||S.type==="paren");S.type!=="slash"&&S.type!=="paren"&&!G&&!E&&(d.output=d.output.slice(0,-h.output.length),h.type="star",h.value="*",h.output=B,d.output+=h.output)}if(et.length&&S.type!=="paren"&&(et[et.length-1].inner+=S.value),(S.value||S.output)&&mt(S),h&&h.type==="text"&&S.type==="text"){h.output=(h.output||h.value)+S.value,h.value+=S.value;return}S.prev=h,x.push(S),h=S},fe=(S,G)=>{const E={...I[G],conditions:1,inner:""};E.prev=h,E.parens=d.parens,E.output=d.output,E.startIndex=d.index,E.tokensIndex=x.length;const M=(a.capture?"(":"")+E.open;pe("parens"),N({type:S,value:G,output:d.output?"":it}),N({type:"paren",extglob:!0,value:j(),output:M}),et.push(E)},rs=S=>{const G=$.slice(S.startIndex,d.index+1),E=$.slice(S.startIndex+2,d.index),M=w(E,a);if((S.type==="plus"||S.type==="star")&&M.risky){const D=M.safeOutput?(S.output?"":it)+(a.capture?`(${M.safeOutput})`:M.safeOutput):void 0,lt=x[S.tokensIndex];lt.type="text",lt.value=G,lt.output=D||e.escapeRegex(G);for(let ct=S.tokensIndex+1;ct<x.length;ct++)x[ct].value="",x[ct].output="",delete x[ct].suffix;d.output=S.output+lt.output,d.backtrack=!0,N({type:"paren",extglob:!0,value:g,output:""}),bt("parens");return}let q=S.close+(a.capture?")":""),Y;if(S.type==="negate"){let D=B;if(S.inner&&S.inner.length>1&&S.inner.includes("/")&&(D=V(a)),(D!==B||ot()||/^\)+$/.test(yt()))&&(q=S.close=`)$))${D}`),S.inner.includes("*")&&(Y=yt())&&/^\.[^\\/.]+$/.test(Y)){const lt=O(Y,{...v,fastpaths:!1}).output;q=S.close=`)${lt})${D})`}S.prev.type==="bos"&&(d.negatedExtglob=!0)}N({type:"paren",extglob:!0,value:g,output:q}),bt("parens")};if(a.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test($)){let S=!1,G=$.replace(s,(E,M,q,Y,D,lt)=>Y==="\\"?(S=!0,E):Y==="?"?M?M+Y+(D?P.repeat(D.length):""):lt===0?C+(D?P.repeat(D.length):""):P.repeat(q.length):Y==="."?U.repeat(q.length):Y==="*"?M?M+Y+(D?B:""):B:M?E:`\\${E}`);return S===!0&&(a.unescape===!0?G=G.replace(/\\/g,""):G=G.replace(/\\+/g,E=>E.length%2===0?"\\\\":E?"\\":"")),G===$&&a.contains===!0?(d.output=$,d):(d.output=e.wrapOutput(G,d,v),d)}for(;!ot();){if(g=j(),g==="\0")continue;if(g==="\\"){const E=H();if(E==="/"&&a.bash!==!0||E==="."||E===";")continue;if(!E){g+="\\",N({type:"text",value:g});continue}const M=/^\\+/.exec(yt());let q=0;if(M&&M[0].length>2&&(q=M[0].length,d.index+=q,q%2!==0&&(g+="\\")),a.unescape===!0?g=j():g+=j(),d.brackets===0){N({type:"text",value:g});continue}}if(d.brackets>0&&(g!=="]"||h.value==="["||h.value==="[^")){if(a.posix!==!1&&g===":"){const E=h.value.slice(1);if(E.includes("[")&&(h.posix=!0,E.includes(":"))){const M=h.value.lastIndexOf("["),q=h.value.slice(0,M),Y=h.value.slice(M+2),D=n[Y];if(D){h.value=q+D,d.backtrack=!0,j(),!_.output&&x.indexOf(h)===1&&(_.output=it);continue}}}(g==="["&&H()!==":"||g==="-"&&H()==="]")&&(g=`\\${g}`),g==="]"&&(h.value==="["||h.value==="[^")&&(g=`\\${g}`),a.posix===!0&&g==="!"&&h.value==="["&&(g="^"),h.value+=g,mt({value:g});continue}if(d.quotes===1&&g!=='"'){g=e.escapeRegex(g),h.value+=g,mt({value:g});continue}if(g==='"'){d.quotes=d.quotes===1?0:1,a.keepQuotes===!0&&N({type:"text",value:g});continue}if(g==="("){pe("parens"),N({type:"paren",value:g});continue}if(g===")"){if(d.parens===0&&a.strictBrackets===!0)throw new SyntaxError(p("opening","("));const E=et[et.length-1];if(E&&d.parens===E.parens+1){rs(et.pop());continue}N({type:"paren",value:g,output:d.parens?")":"\\)"}),bt("parens");continue}if(g==="["){if(a.nobracket===!0||!yt().includes("]")){if(a.nobracket!==!0&&a.strictBrackets===!0)throw new SyntaxError(p("closing","]"));g=`\\${g}`}else pe("brackets");N({type:"bracket",value:g});continue}if(g==="]"){if(a.nobracket===!0||h&&h.type==="bracket"&&h.value.length===1){N({type:"text",value:g,output:`\\${g}`});continue}if(d.brackets===0){if(a.strictBrackets===!0)throw new SyntaxError(p("opening","["));N({type:"text",value:g,output:`\\${g}`});continue}bt("brackets");const E=h.value.slice(1);if(h.posix!==!0&&E[0]==="^"&&!E.includes("/")&&(g=`/${g}`),h.value+=g,mt({value:g}),a.literalBrackets===!1||e.hasRegexChars(E))continue;const M=e.escapeRegex(h.value);if(d.output=d.output.slice(0,-h.value.length),a.literalBrackets===!0){d.output+=M,h.value=M;continue}h.value=`(${k}${M}|${h.value})`,d.output+=h.value;continue}if(g==="{"&&a.nobrace!==!0){pe("braces");const E={type:"brace",value:g,output:"(",outputIndex:d.output.length,tokensIndex:d.tokens.length};z.push(E),N(E);continue}if(g==="}"){const E=z[z.length-1];if(a.nobrace===!0||!E){N({type:"text",value:g,output:g});continue}let M=")";if(E.dots===!0){const q=x.slice(),Y=[];for(let D=q.length-1;D>=0&&(x.pop(),q[D].type!=="brace");D--)q[D].type!=="dots"&&Y.unshift(q[D].value);M=l(Y,a),d.backtrack=!0}if(E.comma!==!0&&E.dots!==!0){const q=d.output.slice(0,E.outputIndex),Y=d.tokens.slice(E.tokensIndex);E.value=E.output="\\{",g=M="\\}",d.output=q;for(const D of Y)d.output+=D.output||D.value}N({type:"brace",value:g,output:M}),bt("braces"),z.pop();continue}if(g==="|"){et.length>0&&et[et.length-1].conditions++,N({type:"text",value:g});continue}if(g===","){let E=g;const M=z[z.length-1];M&&Q[Q.length-1]==="braces"&&(M.comma=!0,E="|"),N({type:"comma",value:g,output:E});continue}if(g==="/"){if(h.type==="dot"&&d.index===d.start+1){d.start=d.index+1,d.consumed="",d.output="",x.pop(),h=_;continue}N({type:"slash",value:g,output:J});continue}if(g==="."){if(d.braces>0&&h.type==="dot"){h.value==="."&&(h.output=U);const E=z[z.length-1];h.type="dots",h.output+=g,h.value+=g,E.dots=!0;continue}if(d.braces+d.parens===0&&h.type!=="bos"&&h.type!=="slash"){N({type:"text",value:g,output:U});continue}N({type:"dot",value:g,output:U});continue}if(g==="?"){if(!(h&&h.value==="(")&&a.noextglob!==!0&&H()==="("&&H(2)!=="?"){fe("qmark",g);continue}if(h&&h.type==="paren"){const E=H();let M=g;(h.value==="("&&!/[!=<:]/.test(E)||E==="<"&&!/<([!=]|\w+>)/.test(yt()))&&(M=`\\${g}`),N({type:"text",value:g,output:M});continue}if(a.dot!==!0&&(h.type==="slash"||h.type==="bos")){N({type:"qmark",value:g,output:at});continue}N({type:"qmark",value:g,output:P});continue}if(g==="!"){if(a.noextglob!==!0&&H()==="("&&(H(2)!=="?"||!/[!=<:]/.test(H(3)))){fe("negate",g);continue}if(a.nonegate!==!0&&d.index===0){es();continue}}if(g==="+"){if(a.noextglob!==!0&&H()==="("&&H(2)!=="?"){fe("plus",g);continue}if(h&&h.value==="("||a.regex===!1){N({type:"plus",value:g,output:nt});continue}if(h&&(h.type==="bracket"||h.type==="paren"||h.type==="brace")||d.parens>0){N({type:"plus",value:g});continue}N({type:"plus",value:nt});continue}if(g==="@"){if(a.noextglob!==!0&&H()==="("&&H(2)!=="?"){N({type:"at",extglob:!0,value:g,output:""});continue}N({type:"text",value:g});continue}if(g!=="*"){(g==="$"||g==="^")&&(g=`\\${g}`);const E=o.exec(yt());E&&(g+=E[0],d.index+=E[0].length),N({type:"text",value:g});continue}if(h&&(h.type==="globstar"||h.star===!0)){h.type="star",h.star=!0,h.value+=g,h.output=B,d.backtrack=!0,d.globstar=!0,st(g);continue}let S=yt();if(a.noextglob!==!0&&/^\([^?]/.test(S)){fe("star",g);continue}if(h.type==="star"){if(a.noglobstar===!0){st(g);continue}const E=h.prev,M=E.prev,q=E.type==="slash"||E.type==="bos",Y=M&&(M.type==="star"||M.type==="globstar");if(a.bash===!0&&(!q||S[0]&&S[0]!=="/")){N({type:"star",value:g,output:""});continue}const D=d.braces>0&&(E.type==="comma"||E.type==="brace"),lt=et.length&&(E.type==="pipe"||E.type==="paren");if(!q&&E.type!=="paren"&&!D&&!lt){N({type:"star",value:g,output:""});continue}for(;S.slice(0,3)==="/**";){const ct=$[d.index+4];if(ct&&ct!=="/")break;S=S.slice(3),st("/**",3)}if(E.type==="bos"&&ot()){h.type="globstar",h.value+=g,h.output=V(a),d.output=h.output,d.globstar=!0,st(g);continue}if(E.type==="slash"&&E.prev.type!=="bos"&&!Y&&ot()){d.output=d.output.slice(0,-(E.output+h.output).length),E.output=`(?:${E.output}`,h.type="globstar",h.output=V(a)+(a.strictSlashes?")":"|$)"),h.value+=g,d.globstar=!0,d.output+=E.output+h.output,st(g);continue}if(E.type==="slash"&&E.prev.type!=="bos"&&S[0]==="/"){const ct=S[1]!==void 0?"|$":"";d.output=d.output.slice(0,-(E.output+h.output).length),E.output=`(?:${E.output}`,h.type="globstar",h.output=`${V(a)}${J}|${J}${ct})`,h.value+=g,d.output+=E.output+h.output,d.globstar=!0,st(g+j()),N({type:"slash",value:"/",output:""});continue}if(E.type==="bos"&&S[0]==="/"){h.type="globstar",h.value+=g,h.output=`(?:^|${J}|${V(a)}${J})`,d.output=h.output,d.globstar=!0,st(g+j()),N({type:"slash",value:"/",output:""});continue}if(D&&S[0]==="/"){h.type="globstar",h.value+=g,h.output=`(?:^|${J}|${V(a)}${J})`,d.output+=h.output,d.globstar=!0,st(g+j()),N({type:"slash",value:"/",output:""});continue}d.output=d.output.slice(0,-h.output.length),h.type="globstar",h.output=V(a),h.value+=g,d.output+=h.output,d.globstar=!0,st(g);continue}const G={type:"star",value:g,output:B};if(a.bash===!0){G.output=".*?",(h.type==="bos"||h.type==="slash")&&(G.output=rt+G.output),N(G);continue}if(h&&(h.type==="bracket"||h.type==="paren")&&a.regex===!0){G.output=g,N(G);continue}(d.index===d.start||h.type==="slash"||h.type==="dot")&&(h.type==="dot"?(d.output+=St,h.output+=St):a.dot===!0?(d.output+=ut,h.output+=ut):(d.output+=rt,h.output+=rt),H()!=="*"&&(d.output+=it,h.output+=it)),N(G)}for(;d.brackets>0;){if(a.strictBrackets===!0)throw new SyntaxError(p("closing","]"));d.output=e.escapeLast(d.output,"["),bt("brackets")}for(;d.parens>0;){if(a.strictBrackets===!0)throw new SyntaxError(p("closing",")"));d.output=e.escapeLast(d.output,"("),bt("parens")}for(;d.braces>0;){if(a.strictBrackets===!0)throw new SyntaxError(p("closing","}"));d.output=e.escapeLast(d.output,"{"),bt("braces")}if(a.strictSlashes!==!0&&(h.type==="star"||h.type==="bracket")&&N({type:"maybe_slash",value:"",output:`${J}?`}),d.backtrack===!0){d.output="";for(const S of d.tokens)d.output+=S.output!=null?S.output:S.value,S.suffix&&(d.output+=S.suffix)}return d};return O.fastpaths=($,v)=>{const a={...v},A=typeof a.maxLength=="number"?Math.min(r,a.maxLength):r,T=$.length;if(T>A)throw new SyntaxError(`Input length: ${T}, exceeds maximum allowed length: ${A}`);$=i[$]||$;const{DOT_LITERAL:_,SLASH_LITERAL:x,ONE_CHAR:k,DOTS_SLASH:F,NO_DOT:I,NO_DOTS:U,NO_DOTS_SLASH:nt,STAR:J,START_ANCHOR:it}=t.globChars(a.windows),W=a.dot?U:I,dt=a.dot?nt:I,St=a.capture?"":"?:",ut={negated:!1,prefix:""};let P=a.bash===!0?".*?":J;a.capture&&(P=`(${P})`);const at=rt=>rt.noglobstar===!0?P:`(${St}(?:(?!${it}${rt.dot?F:_}).)*?)`,At=rt=>{switch(rt){case"*":return`${W}${k}${P}`;case".*":return`${_}${k}${P}`;case"*.*":return`${W}${P}${_}${k}${P}`;case"*/*":return`${W}${P}${x}${k}${dt}${P}`;case"**":return W+at(a);case"**/*":return`(?:${W}${at(a)}${x})?${dt}${k}${P}`;case"**/*.*":return`(?:${W}${at(a)}${x})?${dt}${P}${_}${k}${P}`;case"**/.*":return`(?:${W}${at(a)}${x})?${_}${k}${P}`;default:{const C=/^(.*?)\.(\w+)$/.exec(rt);if(!C)return;const B=At(C[1]);return B?B+_+C[2]:void 0}}},tt=e.removePrefix($,ut);let V=At(tt);return V&&a.strictSlashes!==!0&&(V+=`${x}?`),V},Te=O,Te}var xe,Ve;function co(){if(Ve)return xe;Ve=1;const t=ao(),e=lo(),r=Se(),n=Ee(),o=i=>i&&typeof i=="object"&&!Array.isArray(i),s=(i,l,p=!1)=>{if(Array.isArray(i)){const w=i.map(O=>s(O,l,p));return O=>{for(const $ of w){const v=$(O);if(v)return v}return!1}}const y=o(i)&&i.tokens&&i.input;if(i===""||typeof i!="string"&&!y)throw new TypeError("Expected pattern to be a non-empty string");const u=l||{},f=u.windows,m=y?s.compileRe(i,l):s.makeRe(i,l,!1,!0),c=m.state;delete m.state;let b=()=>!1;if(u.ignore){const w={...l,ignore:null,onMatch:null,onResult:null};b=s(u.ignore,w,p)}const R=(w,O=!1)=>{const{isMatch:$,match:v,output:a}=s.test(w,m,l,{glob:i,posix:f}),A={glob:i,state:c,regex:m,posix:f,input:w,output:a,match:v,isMatch:$};if(typeof u.onResult=="function"&&u.onResult(A),$===!1)return A.isMatch=!1,O?A:!1;t:if(b(w)){if(typeof u.onIgnore=="function"&&u.onIgnore(A)===n.UNIGNORE){A.isMatch=!0;break t}return A.isMatch=!1,O?A:!1}return typeof u.onMatch=="function"&&u.onMatch(A),O?A:!0};return p&&(R.state=c),R};return s.test=(i,l,p,{glob:y,posix:u}={})=>{if(typeof i!="string")throw new TypeError("Expected input to be a string");if(i==="")return{isMatch:!1,output:""};const f=p||{},m=f.format||(u?r.toPosixSlashes:null);let c=i===y,b=c&&m?m(i):i;return c===!1&&(b=m?m(i):i,c=b===y),(c===!1||f.capture===!0)&&(f.matchBase===!0||f.basename===!0?c=s.matchBase(i,l,p,u):c=l.exec(b)),{isMatch:!!c,match:c,output:b}},s.matchBase=(i,l,p)=>(l instanceof RegExp?l:s.makeRe(l,p)).test(r.basename(i)),s.isMatch=(i,l,p)=>s(l,p)(i),s.parse=(i,l)=>Array.isArray(i)?i.map(p=>s.parse(p,l)):e(i,{...l,fastpaths:!1}),s.scan=(i,l)=>t(i,l),s.compileRe=(i,l,p=!1,y=!1)=>{if(p===!0)return i.output;const u=l||{},f=u.contains?"":"^",m=u.contains?"":"$";let c=`${f}(?:${i.output})${m}`;i&&i.negated===!0&&(c=`^(?!${c}).*$`);const b=s.toRegex(c,l);return y===!0&&(b.state=i),b},s.makeRe=(i,l={},p=!1,y=!1)=>{if(!i||typeof i!="string")throw new TypeError("Expected a non-empty string");let u={negated:!1,fastpaths:!0};return l.fastpaths!==!1&&(i[0]==="."||i[0]==="*")&&(u.output=e.fastpaths(i,l)),u.output||(u=e(i,l)),s.compileRe(u,l,p,y)},s.toRegex=(i,l)=>{try{const p=l||{};return new RegExp(i,p.flags||(p.nocase?"i":""))}catch(p){if(l&&l.debug===!0)throw p;return/$^/}},s.constants=n,xe=s,xe}var _e,Ze;function po(){if(Ze)return _e;Ze=1;const t=co(),e=Se();function r(n,o,s=!1){return o&&(o.windows===null||o.windows===void 0)&&(o={...o,windows:e.isWindows()}),t(n,o,s)}return Object.assign(r,t),_e=r,_e}var fo=po();const wt=De(fo),ho=L(import.meta.url),Ut=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,le=t=>{if(typeof Ut<"u"&&Ut.versions&&Ut.versions.node){const[e,r]=Ut.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Ut.getBuiltinModule(t)}return ho(t)},Je=le("fs"),go={...Je,default:Je},{statSync:yo,stat:mo,realpathSync:bo,realpath:$o,readdirSync:vo,readdir:Eo}=le("fs"),{sep:Or,basename:So,dirname:He,resolve:Cr,normalize:Ao,relative:wo,posix:Rt,isAbsolute:Ro}=le("path"),{fileURLToPath:To}=le("url"),{createRequire:xo}=le("module");var tr=xo(import.meta.url);function _o(t){let e=Ao(t);return e.length>1&&e[e.length-1]===Or&&(e=e.substring(0,e.length-1)),e}const ko=/[\\/]/g;function Nr(t,e){return t.replace(ko,e)}const Oo=/^[a-z]:[\\/]$/i;function Co(t){return t==="/"||Oo.test(t)}function ke(t,e){const{resolvePaths:r,normalizePath:n,pathSeparator:o}=e,s=process.platform==="win32"&&t.includes("/")||t.startsWith(".");if(r&&(t=Cr(t)),(n||s)&&(t=_o(t)),t===".")return"";const i=t[t.length-1]!==o;return Nr(i?t+o:t,o)}function Mr(t,e){return e+t}function No(t,e){return function(r,n){return n.startsWith(t)?n.slice(t.length)+r:Nr(wo(t,n),e.pathSeparator)+e.pathSeparator+r}}function Mo(t){return t}function Bo(t,e,r){return e+t+r}function Lo(t,e){const{relativePaths:r,includeBasePath:n}=e;return r&&t?No(t,e):n?Mr:Mo}function Ho(t){return function(e,r){r.push(e.substring(t.length)||".")}}function Io(t){return function(e,r,n){const o=e.substring(t.length)||".";n.every(s=>s(o,!0))&&r.push(o)}}const Do=(t,e)=>{e.push(t||".")},Po=(t,e,r)=>{const n=t||".";r.every(o=>o(n,!0))&&e.push(n)},Fo=()=>{};function Go(t,e){const{includeDirs:r,filters:n,relativePaths:o}=e;return r?o?n&&n.length?Io(t):Ho(t):n&&n.length?Po:Do:Fo}const Uo=(t,e,r,n)=>{n.every(o=>o(t,!1))&&r.files++},Wo=(t,e,r,n)=>{n.every(o=>o(t,!1))&&e.push(t)},jo=(t,e,r,n)=>{r.files++},qo=(t,e)=>{e.push(t)},Ko=()=>{};function Xo(t){const{excludeFiles:e,filters:r,onlyCounts:n}=t;return e?Ko:r&&r.length?n?Uo:Wo:n?jo:qo}const Qo=t=>t,zo=()=>[""].slice(0,0);function Yo(t){return t.group?zo:Qo}const Vo=(t,e,r)=>{t.push({directory:e,files:r,dir:e})},Zo=()=>{};function Jo(t){return t.group?Vo:Zo}const tn=function(t,e,r){const{queue:n,fs:o,options:{suppressErrors:s}}=e;n.enqueue(),o.realpath(t,(i,l)=>{if(i)return n.dequeue(s?null:i,e);o.stat(l,(p,y)=>{if(p)return n.dequeue(s?null:p,e);if(y.isDirectory()&&Br(t,l,e))return n.dequeue(null,e);r(y,l),n.dequeue(null,e)})})},en=function(t,e,r){const{queue:n,fs:o,options:{suppressErrors:s}}=e;n.enqueue();try{const i=o.realpathSync(t),l=o.statSync(i);if(l.isDirectory()&&Br(t,i,e))return;r(l,i)}catch(i){if(!s)throw i}};function rn(t,e){return!t.resolveSymlinks||t.excludeSymlinks?null:e?en:tn}function Br(t,e,r){if(r.options.useRealPaths)return sn(e,r);let n=He(t),o=1;for(;n!==r.root&&o<2;){const s=r.symlinks.get(n);s&&(s===e||s.startsWith(e)||e.startsWith(s))?o++:n=He(n)}return r.symlinks.set(t,e),o>1}function sn(t,e){return e.visited.includes(t+e.options.pathSeparator)}const on=t=>t.counts,nn=t=>t.groups,un=t=>t.paths,an=t=>t.paths.slice(0,t.options.maxFiles),ln=(t,e,r)=>(Ae(e,r,t.counts,t.options.suppressErrors),null),cn=(t,e,r)=>(Ae(e,r,t.paths,t.options.suppressErrors),null),pn=(t,e,r)=>(Ae(e,r,t.paths.slice(0,t.options.maxFiles),t.options.suppressErrors),null),fn=(t,e,r)=>(Ae(e,r,t.groups,t.options.suppressErrors),null);function Ae(t,e,r,n){e(t&&!n?t:null,r)}function hn(t,e){const{onlyCounts:r,group:n,maxFiles:o}=t;return r?e?on:ln:n?e?nn:fn:o?e?an:pn:e?un:cn}const Lr={withFileTypes:!0},gn=(t,e,r,n,o)=>{if(t.queue.enqueue(),n<0)return t.queue.dequeue(null,t);const{fs:s}=t;t.visited.push(e),t.counts.directories++,s.readdir(e||".",Lr,(i,l=[])=>{o(l,r,n),t.queue.dequeue(t.options.suppressErrors?null:i,t)})},dn=(t,e,r,n,o)=>{const{fs:s}=t;if(n<0)return;t.visited.push(e),t.counts.directories++;let i=[];try{i=s.readdirSync(e||".",Lr)}catch(l){if(!t.options.suppressErrors)throw l}o(i,r,n)};function yn(t){return t?dn:gn}var mn=class{count=0;constructor(t){this.onQueueEmpty=t}enqueue(){return this.count++,this.count}dequeue(t,e){this.onQueueEmpty&&(--this.count<=0||t)&&(this.onQueueEmpty(t,e),t&&(e.controller.abort(),this.onQueueEmpty=void 0))}},bn=class{_files=0;_directories=0;set files(t){this._files=t}get files(){return this._files}set directories(t){this._directories=t}get directories(){return this._directories}get dirs(){return this._directories}},$n=class{aborted=!1;abort(){this.aborted=!0}},Hr=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,r,n){this.isSynchronous=!n,this.callbackInvoker=hn(r,this.isSynchronous),this.root=ke(e,r),this.state={root:Co(this.root)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new bn,options:r,queue:new mn((o,s)=>this.callbackInvoker(s,o,n)),symlinks:new Map,visited:[""].slice(0,0),controller:new $n,fs:r.fs||go},this.joinPath=Lo(this.root,r),this.pushDirectory=Go(this.root,r),this.pushFile=Xo(r),this.getArray=Yo(r),this.groupFiles=Jo(r),this.resolveSymlink=rn(r,this.isSynchronous),this.walkDirectory=yn(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,r,n)=>{const{paths:o,options:{filters:s,resolveSymlinks:i,excludeSymlinks:l,exclude:p,maxFiles:y,signal:u,useRealPaths:f,pathSeparator:m},controller:c}=this.state;if(c.aborted||u&&u.aborted||y&&o.length>y)return;const b=this.getArray(this.state.paths);for(let R=0;R<e.length;++R){const w=e[R];if(w.isFile()||w.isSymbolicLink()&&!i&&!l){const O=this.joinPath(w.name,r);this.pushFile(O,b,this.state.counts,s)}else if(w.isDirectory()){let O=Bo(w.name,r,this.state.options.pathSeparator);if(p&&p(w.name,O))continue;this.pushDirectory(O,o,s),this.walkDirectory(this.state,O,O,n-1,this.walk)}else if(this.resolveSymlink&&w.isSymbolicLink()){let O=Mr(w.name,r);this.resolveSymlink(O,this.state,($,v)=>{if($.isDirectory()){if(v=ke(v,this.state.options),p&&p(w.name,f?v:O+m))return;this.walkDirectory(this.state,v,f?v:O+m,n-1,this.walk)}else{v=f?v:O;const a=So(v),A=ke(He(v),this.state.options);v=this.joinPath(a,A),this.pushFile(v,b,this.state.counts,s)}})}}this.groupFiles(this.state.groups,r,b)}};function vn(t,e){return new Promise((r,n)=>{Ir(t,e,(o,s)=>{if(o)return n(o);r(s)})})}function Ir(t,e,r){new Hr(t,e,r).start()}function En(t,e){return new Hr(t,e).start()}var er=class{constructor(e,r){this.root=e,this.options=r}withPromise(){return vn(this.root,this.options)}withCallback(e){Ir(this.root,this.options,e)}sync(){return En(this.root,this.options)}};let Dr=null;try{tr.resolve("picomatch"),Dr=tr("picomatch")}catch{}var Sn=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:Or,filters:[]};globFunction;constructor(t){this.options={...this.options,...t},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(t){return this.options.pathSeparator=t,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(t){return this.options.maxDepth=t,this}withMaxFiles(t){return this.options.maxFiles=t,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:t=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=t,this.withFullPaths()}withAbortSignal(t){return this.options.signal=t,this}normalize(){return this.options.normalizePath=!0,this}filter(t){return this.options.filters.push(t),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(t){return this.options.exclude=t,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(t){return new er(t||".",this.options)}withGlobFunction(t){return this.globFunction=t,this}crawlWithOptions(t,e){return this.options={...this.options,...e},new er(t||".",this.options)}glob(...t){return this.globFunction?this.globWithOptions(t):this.globWithOptions(t,{dot:!0})}globWithOptions(t,...e){const r=this.globFunction||Dr;if(!r)throw new Error("Please specify a glob function to use glob matching.");var n=this.globCache[t.join("\0")];return n||(n=r(t,...e),this.globCache[t.join("\0")]=n),this.options.filters.push(o=>n(o)),this}};const An=Array.isArray,Pr=/\\/g,wn=/^[A-Za-z]:$/,Fr=process.platform==="win32",Rn=/^(\/?\.\.)+$/;function rr(t,e={}){const r=t.length,n=Array(r),o=Array(r);let s,i;for(s=0;s<r;s++){const l=Gr(t[s]);n[s]=l;const p=l.length,y=Array(p);for(i=0;i<p;i++)y[i]=wt(l[i],e);o[s]=y}return l=>{const p=l.split("/");if(p[0]===".."&&Rn.test(l))return!0;for(s=0;s<r;s++){const y=n[s],u=o[s],f=p.length,m=Math.min(f,y.length);for(i=0;i<m;){const c=y[i];if(c.includes("/"))return!0;if(!u[i](p[i]))break;if(!e.noglobstar&&c==="**")return!0;i++}if(i===f)return!0}return!1}}const Tn=/^[A-Z]:\/$/i,xn=Fr?t=>Tn.test(t):t=>t==="/";function sr(t,e,r){if(t===e||e.startsWith(`${t}/`)){if(r){const o=t.length+ +!xn(t);return(s,i)=>s.slice(o,i?-1:void 0)||"."}const n=e.slice(t.length+1);return n?(o,s)=>{if(o===".")return n;const i=`${n}/${o}`;return s?i.slice(0,-1):i}:(o,s)=>s&&o!=="."?o.slice(0,-1):o}return r?n=>Rt.relative(t,n)||".":n=>Rt.relative(t,`${e}/${n}`)||"."}function _n(t,e){if(e.startsWith(`${t}/`)){const r=e.slice(t.length+1);return n=>`${r}/${n}`}return r=>{const n=Rt.relative(t,`${e}/${r}`);return r[r.length-1]==="/"&&n!==""?`${n}/`:n||"."}}function or(t){return t.replace(wn,e=>`${e}/`)}const kn={parts:!0};function Gr(t){var e;const r=wt.scan(t,kn);return!((e=r.parts)===null||e===void 0)&&e.length?r.parts:[t]}const On=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,Cn=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,Nn=t=>t.replace(On,"\\$&"),Mn=t=>t.replace(Cn,"\\$&"),Bn=Fr?Mn:Nn;function Ln(t,e){const r=wt.scan(t);return r.isGlob||r.negated}function ae(...t){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...t)}function Ur(t){return typeof t=="string"?[t]:t??[]}const Hn=/^(\/?\.\.)+/,In=/\\(?=[()[\]{}!*+?@|])/g;function Oe(t,e,r,n){var o;const s=e.cwd;let i=t;t[t.length-1]==="/"&&(i=t.slice(0,-1));const l=i.lastIndexOf("/"),p=(l===-1?i:i.slice(l+1)).startsWith("!(");i[i.length-1]!=="*"&&!p&&e.expandDirectories&&(i+="/**");const y=Bn(s);i=Ro(i.replace(In,""))?Rt.relative(y,i):Rt.normalize(i);const u=(o=Hn.exec(i))===null||o===void 0?void 0:o[0],f=Gr(i);if(u){const c=(u.length+1)/3;let b=0;const R=y.split("/");for(;b<c&&f[b+c]===R[R.length+b-c];)i=i.slice(0,(c-b-1)*3)+i.slice((c-b)*3+f[b+c].length+1)||".",b++;const w=Rt.join(s,u.slice(b*3));w[0]!=="."&&r.root.length>w.length&&(r.root=or(w),r.depthOffset=-c+b)}if(!n&&r.depthOffset>=0){var m;(m=r.commonPath)!==null&&m!==void 0||(r.commonPath=f);const c=[],b=Math.min(r.commonPath.length,f.length);for(let R=0;R<b;R++){const w=f[R];if(w==="**"&&!f[R+1]){c.pop();break}if(R===f.length-1||w!==r.commonPath[R]||Ln(w))break;c.push(w)}r.depthOffset=c.length,r.commonPath=c,r.root=or(c.length>0?Rt.join(s,...c):s)}return i}function Dn(t,e,r){const n=[],o=[],s=[];for(const i of t.ignore)i&&(i[0]!=="!"||i[1]==="("?o.push(Oe(i,t,r,!0)):s.push(i.slice(1)));for(const i of e)i&&(i[0]!=="!"||i[1]==="("?n.push(Oe(i,t,r,!1)):(i[1]!=="!"||i[2]==="(")&&o.push(Oe(i.slice(1),t,r,!0)));return{match:n,ignore:o,unignore:s}}function Pn(t,e){const r=t.cwd,n={root:r,depthOffset:0},o=Dn(t,e,n);t.debug&&ae("internal processing patterns:",o);const{absolute:s,caseSensitiveMatch:i,debug:l,dot:p,followSymbolicLinks:y,onlyDirectories:u}=t,f=n.root.replace(Pr,""),m={dot:p,nobrace:t.braceExpansion===!1,nocase:!i,noextglob:t.extglob===!1,noglobstar:t.globstar===!1,posix:!0},c=o.unignore.length>0,b=c?wt(o.unignore,m):void 0,R=c?rr(o.unignore,m):void 0,w=wt(o.match,{...m,ignore:o.ignore,onIgnore:b?k=>b(k.output)&&wt.constants.UNIGNORE:void 0}),O=wt(o.ignore,m),$=rr(o.match,m),v=sr(r,f,s),a=s?v:sr(r,f,!0),A=o.match.length>0&&o.match.every(k=>k==="**"||k==="**/*"),T=o.ignore.length>0||c||!A?(k,F)=>{const I=a(F,!0);return I==="."||R&&R(I)?!1:!$(I)||O(I)}:void 0;let _;t.deep!==void 0&&(_=Math.round(t.deep-n.depthOffset));const x=new Sn({filters:[l?(k,F)=>{const I=v(k,F),U=w(I);return U&&ae(`matched ${I}`),U}:(k,F)=>{const I=v(k,F);return w(I)}],exclude:l&&T?(k,F)=>{const I=T(k,F);return ae(`${I?"skipped":"crawling"} ${F}`),I}:T,fs:t.fs,pathSeparator:"/",relativePaths:!s,resolvePaths:s,includeBasePath:s,resolveSymlinks:y,excludeSymlinks:!y,excludeFiles:u,includeDirs:u||!t.onlyFiles,maxDepth:_,signal:t.signal}).crawl(f);return t.debug&&ae("internal properties:",{...n,root:f}),[x,r!==f&&!s&&_n(r,f)]}function Fn(t,e){if(e)for(let r=t.length-1;r>=0;r--)t[r]=e(t[r]);return t}const nr={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function Gn(t){const e=Object.assign({},t);for(const r in nr)e[r]===void 0&&Object.assign(e,{[r]:nr[r]});return e.cwd=(e.cwd instanceof URL?To(e.cwd):Cr(e.cwd||process.cwd())).replace(Pr,"/"),e.ignore=Ur(e.ignore),e.fs&&(e.fs={readdir:e.fs.readdir||Eo,readdirSync:e.fs.readdirSync||vo,realpath:e.fs.realpath||$o,realpathSync:e.fs.realpathSync||bo,stat:e.fs.stat||mo,statSync:e.fs.statSync||yo}),e.debug&&ae("globbing with options:",e),e}function Un(t,e={}){var r;if(t&&e?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");const n=An(t)||typeof t=="string",o=Ur((r=n?t:t.patterns)!==null&&r!==void 0?r:"**/*"),s=Gn(n?e:t);return o.length>0?Pn(s,o):[]}function sa(t,e){const[r,n]=Un(t,e);return r?Fn(r.sync(),n):[]}var Ce,ir;function Wn(){if(ir)return Ce;ir=1;/*!
3
- * is-extglob <https://github.com/jonschlinkert/is-extglob>
4
- *
5
- * Copyright (c) 2014-2016, Jon Schlinkert.
6
- * Licensed under the MIT License.
7
- */return Ce=function(t){if(typeof t!="string"||t==="")return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(e[2])return!0;t=t.slice(e.index+e[0].length)}return!1},Ce}var Ne,ur;function Wr(){if(ur)return Ne;ur=1;/*!
8
- * is-glob <https://github.com/jonschlinkert/is-glob>
9
- *
10
- * Copyright (c) 2014-2017, Jon Schlinkert.
11
- * Released under the MIT License.
12
- */var t=Wn(),e={"{":"}","(":")","[":"]"},r=function(o){if(o[0]==="!")return!0;for(var s=0,i=-2,l=-2,p=-2,y=-2,u=-2;s<o.length;){if(o[s]==="*"||o[s+1]==="?"&&/[\].+)]/.test(o[s])||l!==-1&&o[s]==="["&&o[s+1]!=="]"&&(l<s&&(l=o.indexOf("]",s)),l>s&&(u===-1||u>l||(u=o.indexOf("\\",s),u===-1||u>l)))||p!==-1&&o[s]==="{"&&o[s+1]!=="}"&&(p=o.indexOf("}",s),p>s&&(u=o.indexOf("\\",s),u===-1||u>p))||y!==-1&&o[s]==="("&&o[s+1]==="?"&&/[:!=]/.test(o[s+2])&&o[s+3]!==")"&&(y=o.indexOf(")",s),y>s&&(u=o.indexOf("\\",s),u===-1||u>y))||i!==-1&&o[s]==="("&&o[s+1]!=="|"&&(i<s&&(i=o.indexOf("|",s)),i!==-1&&o[i+1]!==")"&&(y=o.indexOf(")",i),y>i&&(u=o.indexOf("\\",i),u===-1||u>y))))return!0;if(o[s]==="\\"){var f=o[s+1];s+=2;var m=e[f];if(m){var c=o.indexOf(m,s);c!==-1&&(s=c+1)}if(o[s]==="!")return!0}else s++}return!1},n=function(o){if(o[0]==="!")return!0;for(var s=0;s<o.length;){if(/[*?{}()[\]]/.test(o[s]))return!0;if(o[s]==="\\"){var i=o[s+1];s+=2;var l=e[i];if(l){var p=o.indexOf(l,s);p!==-1&&(s=p+1)}if(o[s]==="!")return!0}else s++}return!1};return Ne=function(o,s){if(typeof o!="string"||o==="")return!1;if(t(o))return!0;var i=r;return s&&s.strict===!1&&(i=n),i(o)},Ne}const jn=L(import.meta.url),Wt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,jr=t=>{if(typeof Wt<"u"&&Wt.versions&&Wt.versions.node){const[e,r]=Wt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Wt.getBuiltinModule(t)}return jn(t)},qn=jr("path"),Kn=jr("os");var Me,ar;function Xn(){if(ar)return Me;ar=1;var t=Wr(),e=qn.posix.dirname,r=Kn.platform()==="win32",n="/",o=/\\/g,s=/\\([!*?|[\](){}])/g;Me=function(p,y){var u=Object.assign({flipBackslashes:!0},y);u.flipBackslashes&&r&&p.indexOf(n)<0&&(p=p.replace(o,n)),i(p)&&(p+=n),p+="a";do p=e(p);while(l(p));return p.replace(s,"$1")};function i(p){var y=p.slice(-1),u;switch(y){case"}":u="{";break;case"]":u="[";break;default:return!1}var f=p.indexOf(u);return f<0?!1:p.slice(f+1,-1).includes(n)}function l(p){return/\([^()]+$/.test(p)||p[0]==="{"||p[0]==="["||/[^\\][{[]/.test(p)?!0:t(p)}return Me}var Qn=Xn();De(Qn);const zn=L(import.meta.url),jt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Yn=t=>{if(typeof jt<"u"&&jt.versions&&jt.versions.node){const[e,r]=jt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return jt.getBuiltinModule(t)}return zn(t)},{access:Vn}=Yn("node:fs/promises");async function Ie(t,e=ve){gt(t),t=Z(t);try{return await Vn(t,e),!0}catch{return!1}}const Zn=L(import.meta.url),qt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Jn=t=>{if(typeof qt<"u"&&qt.versions&&qt.versions.node){const[e,r]=qt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return qt.getBuiltinModule(t)}return Zn(t)},{accessSync:ti}=Jn("node:fs");function me(t,e=ve){gt(t),t=Z(t);try{return ti(t,e),!0}catch{return!1}}var ei=Wr();const ri=De(ei),oa=(t,e)=>ri(t,e),si=L(import.meta.url),Kt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,qr=t=>{if(typeof Kt<"u"&&Kt.versions&&Kt.versions.node){const[e,r]=Kt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Kt.getBuiltinModule(t)}return si(t)};qr("node:fs/promises");qr("node:fs");let oi=class extends Error{constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}},ni=class extends Error{constructor(e){super(`EPERM: Operation not permitted, ${e}`)}get code(){return"EPERM"}set code(e){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(e){throw new Error("Cannot overwrite name of PermissionError")}};const Kr=(t,e)=>{const r=t?.code;return r==="ENOENT"?new oi(`no such file or directory, open '${e}'`):r==="EACCES"||r==="EPERM"?new ni(`unable to read the non-readable file: ${e}`):t},ii=L(import.meta.url),Xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xr=t=>{if(typeof Xt<"u"&&Xt.versions&&Xt.versions.node){const[e,r]=Xt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Xt.getBuiltinModule(t)}return ii(t)},{readFile:ui}=Xr("node:fs/promises"),{unzip:ai,brotliDecompress:li}=Xr("node:zlib"),ci={brotli:li,gzip:ai,none:(t,e)=>{e(null,t)}},ua=async(t,e)=>{gt(t),t=Z(t);const{buffer:r,compression:n,encoding:o,flag:s}=e??{};let i;try{i=await ui(t,s?{flag:s}:{})}catch(l){throw Kr(l,t)}return await new Promise((l,p)=>{ci[n??"none"](i,(y,u)=>{y?p(y):l(r?u:u.toString(o??"utf8"))})})},pi=L(import.meta.url),Qt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Qr=t=>{if(typeof Qt<"u"&&Qt.versions&&Qt.versions.node){const[e,r]=Qt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Qt.getBuiltinModule(t)}return pi(t)},{readFileSync:fi}=Qr("node:fs"),{unzipSync:hi,brotliDecompressSync:gi}=Qr("node:zlib"),di={brotli:gi,gzip:hi,none:t=>t},yi=(t,e)=>{gt(t),t=Z(t);const{buffer:r,compression:n,encoding:o,flag:s}=e??{};let i;try{i=fi(t,s?{flag:s}:{})}catch(y){throw Kr(y,t)}const l=di[n??"none"],p=l(i);return r?p:p.toString(o??"utf8")},mi=L(import.meta.url),zt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,bi=t=>{if(typeof zt<"u"&&zt.versions&&zt.versions.node){const[e,r]=zt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return zt.getBuiltinModule(t)}return mi(t)},{createRequire:zr}=bi("node:module"),$i=globalThis.process??Object.create(null),lr={versions:{}},cr=new Proxy($i,{get(t,e){if(e in t)return t[e];if(e in lr)return lr[e]}}),vi=t=>t.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
13
- `),Ei=(t,e,r,n)=>{const o={column:0,line:-1,...t.start},s={...o,...t.end},i=o.line,l=o.column,p=s.line,y=s.column;let u=Math.max(i-(r+1),0),f=Math.min(e.length,p+n);i===-1&&(u=0),p===-1&&(f=e.length);const m=p-i,c={};if(m)for(let b=0;b<=m;b++){const R=b+i;if(!l)c[R]=!0;else if(b===0){const w=e[R-1]?.length;c[R]=[l,(w??0)-l+1]}else if(b===m)c[R]=[0,y];else{const w=e[R-b]?.length;c[R]=[0,w]}}else l===y?c[i]=l?[l,0]:!0:c[i]=[l,(y??0)-(l??0)];return{end:f,markerLines:c,start:u}},Si=cr.platform==="win32"&&!cr.env?.WT_SESSION?">":"❯",Ai=(t,e,r)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:b=>b,marker:b=>b,message:b=>b,...r?.color}},o=typeof e.start.column=="number";let s=(t.includes("\r")?vi(t):t).split(`
14
- `);typeof n.tabWidth=="number"&&t.includes(" ")&&(s=s.map(b=>b.replaceAll(" "," ".repeat(n.tabWidth))));const{end:i,markerLines:l,start:p}=Ei(e,s,n.linesAbove,n.linesBelow),y=String(i).length,{gutter:u,marker:f,message:m}=n.color;let c=s.slice(p,i).map((b,R)=>{const w=p+1+R,O=l[w],$=String(w).padStart(y),v=!l[w+1],a=` ${$}${n.showGutter?" |":""}`;if(O){let A="";if(Array.isArray(O)){const T=b.replaceAll(/[^\t]/g," ").slice(0,Math.max(O[0]-1,0)),_=O[1]||1;A=[`
15
- `,n.prefix+u(a.replaceAll(/\d/g," "))," ",T,f("^").repeat(_)].join(""),v&&n.message&&(A+=` ${m(n.message)}`)}return[n.prefix+f(Si),u(a),b.length>0?` ${b}`:"",A].join("")}return`${n.prefix} ${u(a)}${b.length>0?` ${b}`:""}`}).join(`
16
- `);return n.message&&!o&&(c=`${n.prefix+" ".repeat(y+1)+n.message}
17
- ${c}`),c},pr=(t,e)=>{let r=0,n=e.length-2;for(;r<n;){const o=r+(n-r>>1);if(t<e[o])n=o-1;else if(t>=e[o+1])r=o+1;else{r=o;break}}return r},wi=/\n|\r(?!\n)/,Ri=t=>t.split(wi).reduce((e,r)=>(e.push(e.at(-1)+r.length+1),e),[0]),Ti=(t,e,r)=>{if(!Array.isArray(t)&&typeof t!="string"||(typeof t=="string"||Array.isArray(t))&&t.length===0)return{column:0,line:0};if(typeof e!="number"||typeof t=="string"&&e>=t.length||Array.isArray(t)&&e+1>=t.at(-1))return{column:0,line:0};if(typeof t=="string"){const o=Ri(t),s=pr(e,o);return{column:e-o[s]+1,line:s+1}}const n=pr(e,t);return{column:e-t[n]+1,line:n+1}},xi=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&xi.set("AggregateError",AggregateError);const _i=zr(import.meta.url),Yt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ki=t=>{if(typeof Yt<"u"&&Yt.versions&&Yt.versions.node){const[e,r]=Yt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Yt.getBuiltinModule(t)}return _i(t)};ki("node:util");const Oi=zr(import.meta.url),Vt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Pe=t=>{if(typeof Vt<"u"&&Vt.versions&&Vt.versions.node){const[e,r]=Vt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Vt.getBuiltinModule(t)}return Oi(t)};Pe("node:fs");Pe("node:path");Pe("node:url");let Ci=class extends Error{fileName;codeFrame;name="JSONError";#t;constructor(e){super(),this.#t=e}get message(){return`${this.#t}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
18
-
19
- ${this.codeFrame}
20
- `:""}`}set message(e){this.#t=e}};const Ni=t=>String.raw`\u{${t.codePointAt(0).toString(16)}}`,Mi=(t,e,r)=>Ai(t,{start:e},{tabWidth:!1,...r}),Bi=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,Li=(t,e)=>{const r=Bi.exec(e);if(!r)return;const[,n,o,s]=r;if(o&&s)return{column:Number(s),line:Number(o)};let i=Number(n);return i===t.length&&(i=t.length-1),Ti(t,i)},Hi=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,Ii=t=>t.replace(Hi,(e,r,n)=>`"${n}"(${Ni(n)})`);function Di(t,e,r,n){let o;try{return JSON.parse(t,e)}catch(l){o=l.message}let s;t?(s=Li(t,o),o=Ii(o)):o+=" while parsing empty string";const i=new Ci(o);throw i.fileName=r,s&&(i.codeFrame=Mi(t,s,n)),i}function Pi(t,e,r){const n=yi(t,{buffer:!0,encoding:void 0});let o=new TextDecoder().decode(n);const{beforeParse:s,color:i}={};return typeof s=="function"&&(o=s(o)),Di(o,e,Z(t),{color:i})}const Fi=t=>({force:!0,recursive:!0}),Gi=L(import.meta.url),Zt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Yr=t=>{if(typeof Zt<"u"&&Zt.versions&&Zt.versions.node){const[e,r]=Zt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Zt.getBuiltinModule(t)}return Gi(t)},{existsSync:Ui}=Yr("node:fs"),{mkdir:Wi,readdir:ji,rm:qi}=Yr("node:fs/promises"),la=async(t,e)=>{if(gt(t),!Ui(t)){await Wi(t,{recursive:!0});return}const r=await ji(t),n=Fi();for(const o of r)await qi(be(Z(t),o),n)},Ki=L(import.meta.url),Jt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xi=t=>{if(typeof Jt<"u"&&Jt.versions&&Jt.versions.node){const[e,r]=Jt.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return Jt.getBuiltinModule(t)}return Ki(t)};Xi("node:fs");const Qi=L(import.meta.url),te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,zi=t=>{if(typeof te<"u"&&te.versions&&te.versions.node){const[e,r]=te.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return te.getBuiltinModule(t)}return Qi(t)};zi("node:fs/promises");const Yi=L(import.meta.url),ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Vi=t=>{if(typeof ee<"u"&&ee.versions&&ee.versions.node){const[e,r]=ee.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return ee.getBuiltinModule(t)}return Yi(t)};Vi("node:fs");L(import.meta.url);const Vr=t=>{if(typeof t!="string"&&!(t instanceof ArrayBuffer)&&!ArrayBuffer.isView(t))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},Zi=L(import.meta.url),re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ji=t=>{if(typeof re<"u"&&re.versions&&re.versions.node){const[e,r]=re.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return re.getBuiltinModule(t)}return Zi(t)},{randomBytes:tu}=Ji("node:crypto"),Zr=t=>`${t}.${process.pid.toString(36)}.${tu(6).toString("hex")}.tmp`,eu=new TextEncoder,Jr=t=>{if(t instanceof Uint8Array)return t;if(typeof t=="string")return eu.encode(t);if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t)){const e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new Uint8Array(e)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},ru=L(import.meta.url),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,su=t=>{if(typeof se<"u"&&se.versions&&se.versions.node){const[e,r]=se.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return se.getBuiltinModule(t)}return ru(t)},{mkdir:ou,writeFile:nu,stat:iu,rename:fr,chown:uu,chmod:au,unlink:lu}=su("node:fs/promises"),cu=async(t,e,r)=>{r={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},gt(t),Vr(e),t=Z(t);const n=await Ie(t,ve);if(n&&!r.overwrite)throw new xr(`file already exists, open '${t}'`);const o=Zr(t);try{!n&&r.recursive&&await ou($e(t),{recursive:!0});let s;if(await nu(o,typeof e=="string"?Buffer.from(e,r.encoding??"utf8"):Jr(e),{flag:"wx"}),n&&r.backup&&(s=await iu(t),r.chown??={gid:s.gid,uid:s.uid},await fr(t,`${t}.bak`)),r.chown)try{await uu(o,r.chown.uid,r.chown.gid)}catch{}await au(o,s&&!r.mode?s.mode:r.mode??438),await fr(o,t)}catch(s){throw new Error(`Failed to write file at: ${t} - ${s.message}`,{cause:s})}finally{await Ie(o)&&await lu(o)}},pu=L(import.meta.url),oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,fu=t=>{if(typeof oe<"u"&&oe.versions&&oe.versions.node){const[e,r]=oe.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return oe.getBuiltinModule(t)}return pu(t)},{mkdirSync:hu,writeFileSync:gu,statSync:du,renameSync:hr,chownSync:yu,chmodSync:mu,unlinkSync:bu}=fu("node:fs"),$u=(t,e,r)=>{r={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},gt(t),Vr(e),t=Z(t);const n=me(t,ve);if(n&&!r.overwrite)throw new xr(`file already exists, open '${t}'`);const o=Zr(t);try{!n&&r.recursive&&hu($e(t),{recursive:!0});let s;if(gu(o,typeof e=="string"?Buffer.from(e,r.encoding??"utf8"):Jr(e),{flag:"wx"}),n&&r.backup&&(s=du(t),r.chown??={gid:s.gid,uid:s.uid},hr(t,`${t}.bak`)),r.chown)try{yu(o,r.chown.uid,r.chown.gid)}catch{}mu(o,s&&!r.mode?s.mode:r.mode??438),hr(o,t)}catch(s){throw new Error(`Failed to write file at: ${t} - ${s.message}`,{cause:s})}finally{me(o)&&bu(o)}},vu=/^(?:( )+|\t+)/,ce="space";function gr(t,e,r){return t&&e===ce&&r===1}function dr(t,e){const r=new Map;let n=0,o,s;for(const i of t.split(/\n/g)){if(!i)continue;const l=i.match(vu);if(l===null)n=0,o="";else{const p=l[0].length,y=l[1]?ce:"tab";if(gr(e,y,p))continue;y!==o&&(n=0),o=y;let u=1,f=0;const m=p-n;if(n=p,m===0)u=0,f=1;else{const b=Math.abs(m);if(gr(e,y,b))continue;s=Eu(y,b)}const c=r.get(s);r.set(s,c===void 0?[1,0]:[c[0]+u,c[1]+f])}}return r}function Eu(t,e){return(t===ce?"s":"t")+String(e)}function Su(t){const e=t[0]==="s"?ce:"tab",r=Number(t.slice(1));return{type:e,amount:r}}function Au(t){let e,r=0,n=0;for(const[o,[s,i]]of t)(s>r||s===r&&i>n)&&(r=s,n=i,e=o);return e}function wu(t,e){return(t===ce?" ":" ").repeat(e)}function ts(t){if(typeof t!="string")throw new TypeError("Expected a string");let e=dr(t,!0);e.size===0&&(e=dr(t,!1));const r=Au(e);let n,o=0,s="";return r!==void 0&&({type:n,amount:o}=Su(r),s=wu(n,o)),{amount:o,type:n,indent:s}}const Ru=L(import.meta.url),ne=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Tu=t=>{if(typeof ne<"u"&&ne.versions&&ne.versions.node){const[e,r]=ne.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return ne.getBuiltinModule(t)}return Ru(t)},{readFile:xu}=Tu("node:fs/promises"),ca=async(t,e,r={})=>{const{detectIndent:n,indent:o,replacer:s,stringify:i=JSON.stringify,...l}={indent:" ",...r};let p=o,y=`
21
- `;if(await Ie(t,Rr))try{const f=await xu(t,"utf8");if(n){const{indent:m}=ts(f);p=m}y=f.endsWith(`
22
- `)?`
23
- `:""}catch(f){if(f.code!=="ENOENT")throw f}const u=i(e,s,p);await cu(t,`${u}${y}`,l)},_u=L(import.meta.url),ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ku=t=>{if(typeof ie<"u"&&ie.versions&&ie.versions.node){const[e,r]=ie.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return ie.getBuiltinModule(t)}return _u(t)},{readFileSync:Ou}=ku("node:fs"),Cu=(t,e,r={})=>{const{detectIndent:n,indent:o,replacer:s,stringify:i=JSON.stringify,...l}={indent:" ",...r};let p=o,y=`
24
- `;if(me(t,Rr))try{const f=Ou(t,"utf8");if(n){const{indent:m}=ts(f);p=m}y=f.endsWith(`
25
- `)?`
26
- `:""}catch(f){if(f.code!=="ENOENT")throw f}const u=i(e,s,p);$u(t,`${u}${y}`,l)},Nu=L(import.meta.url),ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Fe=t=>{if(typeof ue<"u"&&ue.versions&&ue.versions.node){const[e,r]=ue.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return ue.getBuiltinModule(t)}return Nu(t)},Mu=Fe("fs"),Bu=Fe("os"),Lu=Fe("path");var Be={},yr;function Hu(){if(yr)return Be;yr=1;var t=Object.defineProperty,e=(u,f)=>t(u,"name",{value:f,configurable:!0}),r=Mu,n=Bu,o=Lu;const s=e(u=>{let f="";for(let m=0;m<u.length;m+=1){const c=u[m],b=c.toUpperCase();f+=c===b?c.toLowerCase():b}return f},"invertCase"),i=new Map,l=e((u,f)=>{const m=o.join(u,`.is-fs-case-sensitive-test-${process.pid}`);try{return f.writeFileSync(m,""),!f.existsSync(s(m))}finally{try{f.unlinkSync(m)}catch{}}},"checkDirectoryCaseWithWrite"),p=e((u,f,m)=>{try{return l(u,m)}catch(c){if(f===void 0)return l(n.tmpdir(),m);throw c}},"checkDirectoryCaseWithFallback"),y=e((u,f=r,m=!0)=>{const c=u??process.cwd();if(m&&i.has(c))return i.get(c);let b;const R=s(c);return R!==c&&f.existsSync(c)?b=!f.existsSync(R):b=p(c,u,f),m&&i.set(c,b),b},"isFsCaseSensitive");return Be.isFsCaseSensitive=y,Be}Hu();const pa=(t,e,r,n)=>{try{let o={};const s=be(e,"keystore.json");me(s)&&(o=Pi(s)),Object.hasOwn(o,t)||(o[t]=new Date().toISOString()),Cu(s,o,{overwrite:!0})}catch(o){r.debug({context:[o],message:o instanceof Error?o.message:String(o),prefix:"cache-key-store"})}};export{sa as C,Uu as E,ta as F,Js as I,qu as K,Pu as L,Di as N,Cu as O,Ju as P,Ku as Q,$u as T,Xu as V,cu as a,me as b,Pi as c,Ie as d,ht as e,pa as f,Wu as g,ju as h,oi as i,Fu as j,la as k,ca as l,oa as m,Yu as n,Gu as q,Qu as s,yi as v,Xs as x,ua as z};
@@ -1 +0,0 @@
1
- import{j as s,t as a}from"./oxcTransformPlugin-Dwvbw2jE-CI_T_eTp.js";export{s as oxcResolvePlugin,a as oxcTransformPlugin};