nf3 0.3.15 → 0.3.17

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.
@@ -5,7 +5,6 @@ import * as fsp from "node:fs/promises";
5
5
  import { readFile, writeFile } from "node:fs/promises";
6
6
  import { nodeFileTrace } from "@vercel/nft";
7
7
  import semver from "semver";
8
- //#region \0rolldown/runtime.js
9
8
  var __defProp = Object.defineProperty;
10
9
  var __exportAll = (all, no_symbols) => {
11
10
  let target = {};
@@ -16,8 +15,6 @@ var __exportAll = (all, no_symbols) => {
16
15
  if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
17
16
  return target;
18
17
  };
19
- //#endregion
20
- //#region src/_utils.ts
21
18
  const isWindows = process.platform === "win32";
22
19
  const NODE_MODULES_RE = /^(?<dir>.+[\\/]node_modules[\\/])(?<name>[^@\\/]+|@[^\\/]+[\\/][^\\/]+)(?:[\\/](?<subpath>.+))?$/;
23
20
  function parseNodeModulePath(path) {
@@ -88,8 +85,6 @@ function toPathRegExp(input) {
88
85
  if (typeof input === "string") return new RegExp(pathRegExp(input));
89
86
  throw new TypeError("Expected a string or RegExp", { cause: input });
90
87
  }
91
- //#endregion
92
- //#region src/trace.ts
93
88
  var trace_exports = /* @__PURE__ */ __exportAll({
94
89
  DEFAULT_CONDITIONS: () => DEFAULT_CONDITIONS,
95
90
  applyProductionCondition: () => applyProductionCondition,
@@ -204,6 +199,24 @@ async function traceNodeModules(input, opts) {
204
199
  };
205
200
  }
206
201
  }
202
+ const nativeLoaderRE = /(?:^|\/)(node-gyp-build(?:-optional-packages)?|bindings|prebuild-install|node-pre-gyp)$/;
203
+ for (const tracedPackage of Object.values(tracedPackages)) for (const versionEntry of Object.values(tracedPackage.versions)) {
204
+ const deps = {
205
+ ...versionEntry.pkgJSON.dependencies,
206
+ ...versionEntry.pkgJSON.devDependencies
207
+ };
208
+ if (!Object.keys(deps).some((d) => nativeLoaderRE.test(d)) && !versionEntry.pkgJSON.gypfile) {
209
+ const install = versionEntry.pkgJSON.scripts?.install;
210
+ if (!install || !/node-gyp|pre-gyp|prebuild|napi/.test(install)) continue;
211
+ }
212
+ if (fsp.glob) for await (const file of fsp.glob("**/*.node", {
213
+ cwd: versionEntry.path,
214
+ exclude: (name) => name === "node_modules"
215
+ })) {
216
+ const fullPath = join(versionEntry.path, file);
217
+ if (!versionEntry.files.includes(fullPath) && await isFile(fullPath)) versionEntry.files.push(fullPath);
218
+ }
219
+ }
207
220
  await opts?.hooks?.tracedPackages?.(tracedPackages);
208
221
  const usedAliases = {};
209
222
  const outDir = resolve(rootDir, opts.outDir || "dist", "node_modules");
@@ -335,5 +348,4 @@ async function isFile(file) {
335
348
  throw error;
336
349
  }
337
350
  }
338
- //#endregion
339
351
  export { pathRegExp as a, guessSubpath as i, traceNodeModules as n, toImport as o, trace_exports as r, toPathRegExp as s, DEFAULT_CONDITIONS as t };
@@ -1,7 +1,5 @@
1
1
  import { t as PackageJson } from "./libs/pkg-types.mjs";
2
2
  import { NodeFileTraceOptions, NodeFileTraceResult } from "@vercel/nft";
3
-
4
- //#region src/types.d.ts
5
3
  interface ExternalsPluginOptions {
6
4
  /**
7
5
  * The root directory to use when resolving files. Defaults to `process.cwd()`.
@@ -115,5 +113,4 @@ interface TraceHooks {
115
113
  tracedFiles?: (files: Record<string, TracedFile>) => void | Promise<void>;
116
114
  tracedPackages?: (packages: Record<string, TracedPackage>) => void | Promise<void>;
117
115
  }
118
- //#endregion
119
116
  export { ExternalsTraceOptions as n, ExternalsPluginOptions as t };
package/dist/db.d.mts CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/db.d.ts
2
1
  /**
3
2
  * Known packages that include native code and require platform-specific builds.
4
3
  *
@@ -18,5 +17,4 @@ declare const FullTracePackages: readonly ["usb", "sodium-native", "aws-crt", "y
18
17
  * due to bundler compatibility issues with their module format or dynamic imports.
19
18
  */
20
19
  declare const NonBundleablePackages: string[];
21
- //#endregion
22
20
  export { FullTracePackages, NodeNativePackages, NonBundleablePackages };
package/dist/db.mjs CHANGED
@@ -1,9 +1,3 @@
1
- //#region src/db.ts
2
- /**
3
- * Known packages that include native code and require platform-specific builds.
4
- *
5
- * These packages cannot be bundled and should be traced as external dependencies most of the time.
6
- */
7
1
  const NodeNativePackages = Object.freeze([
8
2
  "canvas",
9
3
  "sharp",
@@ -12,6 +6,7 @@ const NodeNativePackages = Object.freeze([
12
6
  "@napi-rs/canvas",
13
7
  "@napi-rs/image",
14
8
  "@takumi-rs/core",
9
+ "@resvg/resvg-js",
15
10
  "bcrypt",
16
11
  "kerberos",
17
12
  "scrypt",
@@ -20,38 +15,94 @@ const NodeNativePackages = Object.freeze([
20
15
  "argon2",
21
16
  "@node-rs/argon2",
22
17
  "@node-rs/bcrypt",
18
+ "@node-rs/jsonwebtoken",
23
19
  "cpu-features",
24
20
  "farmhash",
25
21
  "@node-rs/xxhash",
26
22
  "@node-rs/crc32",
23
+ "bigint-buffer",
24
+ "keytar",
27
25
  "better-sqlite3",
26
+ "better-sqlite3-multiple-ciphers",
27
+ "sqlite3",
28
28
  "leveldown",
29
+ "classic-level",
29
30
  "lmdb",
30
- "sqlite3",
31
31
  "libsql",
32
- "node-rdkafka",
33
- "couchbase",
34
32
  "duckdb",
33
+ "rocksdb",
34
+ "level-rocksdb",
35
+ "pg-native",
36
+ "oracledb",
37
+ "mongodb-client-encryption",
38
+ "odbc",
39
+ "ibm_db",
40
+ "hiredis",
41
+ "couchbase",
35
42
  "realm",
43
+ "node-rdkafka",
36
44
  "lz4",
45
+ "lz4-napi",
37
46
  "zlib-sync",
38
47
  "snappy",
39
48
  "@napi-rs/snappy",
40
- "lz4-napi",
41
- "msgpackr-extract",
49
+ "@napi-rs/lzma",
42
50
  "@mongodb-js/zstd",
43
- "deasync",
44
- "node-sass",
45
- "@parcel/watcher",
46
- "@parcel/source-map",
47
- "@swc/core",
51
+ "msgpackr-extract",
52
+ "cbor-extract",
53
+ "@napi-rs/tar",
48
54
  "esbuild",
55
+ "rolldown",
56
+ "vite",
57
+ "@rspack/core",
58
+ "@swc/core",
59
+ "@swc-node/register",
49
60
  "lightningcss",
61
+ "@parcel/css",
62
+ "@parcel/watcher",
63
+ "@parcel/source-map",
50
64
  "@biomejs/biome",
65
+ "oxfmt",
66
+ "oxlint",
67
+ "oxc-parser",
68
+ "oxc-transform",
69
+ "oxc-resolver",
70
+ "oxc-minify",
71
+ "@ast-grep/napi",
72
+ "@napi-rs/cli",
73
+ "@node-rs/deno-lint",
74
+ "vize",
75
+ "node-sass",
51
76
  "tree-sitter",
52
77
  "re2",
78
+ "rollup",
79
+ "sass-embedded",
80
+ "@tailwindcss/oxide",
81
+ "turbo",
82
+ "deasync",
83
+ "@xenova/transformers",
84
+ "node-llama-cpp",
85
+ "llama-node",
53
86
  "onnxruntime-node",
54
- "edge-js",
87
+ "@tensorflow/tfjs-node",
88
+ "@sentry/profiling-node",
89
+ "@datadog/native-metrics",
90
+ "@datadog/native-appsec",
91
+ "@datadog/native-iast-taint-tracking",
92
+ "@datadog/pprof",
93
+ "@newrelic/native-metrics",
94
+ "@appsignal/nodejs",
95
+ "@statsig/statsig-node-core",
96
+ "v8-profiler-next",
97
+ "heapdump",
98
+ "grpc",
99
+ "zeromq",
100
+ "unix-dgram",
101
+ "ssh2",
102
+ "aws-crt",
103
+ "node-libcurl",
104
+ "bufferutil",
105
+ "utf-8-validate",
55
106
  "fsevents",
56
107
  "node-pty",
57
108
  "usb",
@@ -63,53 +114,34 @@ const NodeNativePackages = Object.freeze([
63
114
  "microtime",
64
115
  "node-datachannel",
65
116
  "zigpty",
117
+ "edge-js",
118
+ "nsfw",
119
+ "native-reg",
120
+ "diskusage",
121
+ "@napi-rs/clipboard",
122
+ "@napi-rs/nice",
123
+ "@napi-rs/webcodecs",
124
+ "workerd",
125
+ "node-web-audio-api",
66
126
  "ffi-napi",
67
127
  "ref-napi",
68
128
  "ref-struct-napi",
69
129
  "ref-union-napi",
70
- "grpc",
71
- "zeromq",
72
- "unix-dgram",
73
- "ssh2",
74
- "aws-crt",
130
+ "iconv",
75
131
  "libxmljs2",
76
132
  "node-expat",
77
- "@xenova/transformers",
78
- "bufferutil",
79
- "utf-8-validate",
80
- "keytar",
81
- "iconv",
82
- "nodegit",
83
- "@sentry/profiling-node",
84
- "@napi-rs/clipboard",
85
- "better-sqlite3-multiple-ciphers",
86
- "cbor-extract",
87
- "diskusage",
88
- "nsfw",
89
- "native-reg",
90
- "integer",
133
+ "@node-rs/jieba",
91
134
  "md4x/napi",
92
- "node-web-audio-api",
93
- "@appsignal/nodejs",
94
- "@statsig/statsig-node-core"
135
+ "@discordjs/opus",
136
+ "nodegit",
137
+ "integer"
95
138
  ]);
96
- /**
97
- * Packages that should be fully traced (all files copied, not just NFT-detected ones).
98
- *
99
- * These packages use dynamic requires, runtime asset loading, or other patterns
100
- * that prevent static analysis from detecting all required files.
101
- * Can be passed to the plugin's `traceInclude` option to ensure they are always traced.
102
- */
103
139
  const FullTracePackages = [
104
140
  "usb",
105
141
  "sodium-native",
106
142
  "aws-crt",
107
143
  "youch"
108
144
  ];
109
- /**
110
- * Packages that must be externalized (traced as dependencies) rather than bundled,
111
- * due to bundler compatibility issues with their module format or dynamic imports.
112
- */
113
145
  const NonBundleablePackages = [
114
146
  "youch",
115
147
  "pg-native",
@@ -131,5 +163,4 @@ const NonBundleablePackages = [
131
163
  "import-in-the-middle",
132
164
  "require-in-the-middle"
133
165
  ];
134
- //#endregion
135
166
  export { FullTracePackages, NodeNativePackages, NonBundleablePackages };
package/dist/index.d.mts CHANGED
@@ -1,7 +1,4 @@
1
1
  import { NodeNativePackages } from "./db.mjs";
2
2
  import { n as ExternalsTraceOptions } from "./_chunks/types.mjs";
3
-
4
- //#region src/trace.d.ts
5
3
  declare function traceNodeModules(input: string[], opts: ExternalsTraceOptions): Promise<void>;
6
- //#endregion
7
4
  export { type ExternalsTraceOptions, NodeNativePackages, traceNodeModules };
@@ -1,3 +1,3 @@
1
1
  "use strict";var R=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ge=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.range=e.balanced=void 0,e.balanced=(n,r,i)=>{let a=n instanceof RegExp?t(n,i):n,o=r instanceof RegExp?t(r,i):r,s=a!==null&&o!=null&&(0,e.range)(a,o,i);return s&&{start:s[0],end:s[1],pre:i.slice(0,s[0]),body:i.slice(s[0]+a.length,s[1]),post:i.slice(s[1]+o.length)}};var t=(e,t)=>{let n=t.match(e);return n?n[0]:null};e.range=(e,t,n)=>{let r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let e=r.pop();e!==void 0&&(s=[e,l])}else i=r.pop(),i!==void 0&&i<a&&(a=i,o=l),l=n.indexOf(t,u+1);u=c<l&&c>=0?c:l}r.length&&o!==void 0&&(s=[a,o])}return s}}),Ke=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.EXPANSION_MAX=void 0,e.expand=S;var n=Ge(),r=`\0SLASH`+Math.random()+`\0`,i=`\0OPEN`+Math.random()+`\0`,a=`\0CLOSE`+Math.random()+`\0`,o=`\0COMMA`+Math.random()+`\0`,s=`\0PERIOD`+Math.random()+`\0`,c=new RegExp(r,`g`),l=new RegExp(i,`g`),u=new RegExp(a,`g`),d=new RegExp(o,`g`),f=new RegExp(s,`g`),p=/\\\\/g,m=/\\{/g,h=/\\}/g,g=/\\,/g,_=/\\./g;e.EXPANSION_MAX=1e5;function v(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function y(e){return e.replace(p,r).replace(m,i).replace(h,a).replace(g,o).replace(_,s)}function b(e){return e.replace(c,`\\`).replace(l,`{`).replace(u,`}`).replace(d,`,`).replace(f,`.`)}function x(e){if(!e)return[``];let t=[],r=(0,n.balanced)(`{`,`}`,e);if(!r)return e.split(`,`);let{pre:i,body:a,post:o}=r,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;let c=x(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),t.push.apply(t,s),t}function S(t,n={}){if(!t)return[];let{max:r=e.EXPANSION_MAX}=n;return t.slice(0,2)===`{}`&&(t=`\\{\\}`+t.slice(2)),D(y(t),r,!0).map(b)}function C(e){return`{`+e+`}`}function w(e){return/^-?0\d/.test(e)}function T(e,t){return e<=t}function E(e,t){return e>=t}function D(e,t,r){let i=[],o=(0,n.balanced)(`{`,`}`,e);if(!o)return[e];let s=o.pre,c=o.post.length?D(o.post,t,!1):[``];if(/\$$/.test(o.pre))for(let e=0;e<c.length&&e<t;e++){let t=s+`{`+o.body+`}`+c[e];i.push(t)}else{let n=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),u=n||l,d=o.body.indexOf(`,`)>=0;if(!u&&!d)return o.post.match(/,(?!,).*\}/)?(e=o.pre+`{`+o.body+a+o.post,D(e,t,!0)):[e];let f;if(u)f=o.body.split(/\.\./);else if(f=x(o.body),f.length===1&&f[0]!==void 0&&(f=D(f[0],t,!1).map(C),f.length===1))return c.map(e=>o.pre+f[0]+e);let p;if(u&&f[0]!==void 0&&f[1]!==void 0){let e=v(f[0]),t=v(f[1]),n=Math.max(f[0].length,f[1].length),r=f.length===3&&f[2]!==void 0?Math.abs(v(f[2])):1,i=T;t<e&&(r*=-1,i=E);let a=f.some(w);p=[];for(let o=e;i(o,t);o+=r){let e;if(l)e=String.fromCharCode(o),e===`\\`&&(e=``);else if(e=String(o),a){let t=n-e.length;if(t>0){let n=Array(t+1).join(`0`);e=o<0?`-`+n+e.slice(1):n+e}}p.push(e)}}else{p=[];for(let e=0;e<f.length;e++)p.push.apply(p,D(f[e],t,!1))}for(let e=0;e<p.length;e++)for(let n=0;n<c.length&&i.length<t;n++){let t=s+p[e]+c[n];(!r||u||t)&&i.push(t)}}return i}}),Xe=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.assertValidPattern=void 0;var t=1024*64;e.assertValidPattern=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>t)throw TypeError(`pattern is too long`)}}),Je=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.parseClass=void 0;var t={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`,!0],"[:alpha:]":[`\\p{L}\\p{Nl}`,!0],"[:ascii:]":[`\\x00-\\x7f`,!1],"[:blank:]":[`\\p{Zs}\\t`,!0],"[:cntrl:]":[`\\p{Cc}`,!0],"[:digit:]":[`\\p{Nd}`,!0],"[:graph:]":[`\\p{Z}\\p{C}`,!0,!0],"[:lower:]":[`\\p{Ll}`,!0],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}`,!0],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`,!0],"[:upper:]":[`\\p{Lu}`,!0],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`,!0],"[:xdigit:]":[`A-Fa-f0-9`,!1]},n=e=>e.replace(/[[\]\\-]/g,`\\$&`),r=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),i=e=>e.join(``);e.parseClass=(e,a)=>{let o=a;if(e.charAt(o)!==`[`)throw Error(`not in a brace expression`);let s=[],c=[],l=o+1,u=!1,d=!1,f=!1,p=!1,m=o,h=``;t:for(;l<e.length;){let r=e.charAt(l);if((r===`!`||r===`^`)&&l===o+1){p=!0,l++;continue}if(r===`]`&&u&&!f){m=l+1;break}if(u=!0,r===`\\`&&!f){f=!0,l++;continue}if(r===`[`&&!f){for(let[n,[r,i,a]]of Object.entries(t))if(e.startsWith(n,l)){if(h)return[`$.`,!1,e.length-o,!0];l+=n.length,a?c.push(r):s.push(r),d||=i;continue t}}if(f=!1,h){r>h?s.push(n(h)+`-`+n(r)):r===h&&s.push(n(r)),h=``,l++;continue}if(e.startsWith(`-]`,l+1)){s.push(n(r+`-`)),l+=2;continue}if(e.startsWith(`-`,l+1)){h=r,l+=2;continue}s.push(n(r)),l++}if(m<l)return[``,!1,0,!1];if(!s.length&&!c.length)return[`$.`,!1,e.length-o,!0];if(c.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!p)return[r(s[0].length===2?s[0].slice(-1):s[0]),!1,m-o,!1];let g=`[`+(p?`^`:``)+i(s)+`]`,_=`[`+(p?``:`^`)+i(c)+`]`;return[s.length&&c.length?`(`+g+`|`+_+`)`:s.length?g:_,d,m-o,!0]}}),kt=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.unescape=void 0,e.unescape=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^\/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,`$1$2`).replace(/\\([^\/])/g,`$1`):t?e.replace(/\[([^\/\\{}])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,`$1$2`).replace(/\\([^\/{}])/g,`$1`)}),pe=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.AST=void 0;var t=Je(),n=kt(),r=new Set([`!`,`?`,`+`,`*`,`@`]),o=e=>r.has(e),s=`(?!(?:^|/)\\.\\.?(?:$|/))`,c=`(?!\\.)`,l=new Set([`[`,`.`]),u=new Set([`..`,`.`]),d=new Set(`().*{}+?[]^$\\!`),f=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),p=`[^/]`,m=p+`*?`,h=p+`+?`;e.AST=class e{type;#t;#s;#n=!1;#r=[];#h;#S;#w;#c=!1;#o;#f;#u=!1;constructor(e,t,n={}){this.type=e,e&&(this.#s=!0),this.#h=t,this.#t=this.#h?this.#h.#t:this,this.#o=this.#t===this?n:this.#t.#o,this.#w=this.#t===this?[]:this.#t.#w,e===`!`&&!this.#t.#c&&this.#w.push(this),this.#S=this.#h?this.#h.#r.length:0}get hasMagic(){if(this.#s!==void 0)return this.#s;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#s=!0;return this.#s}toString(){return this.#f===void 0?this.type?this.#f=this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#f=this.#r.map(e=>String(e)).join(``):this.#f}#a(){if(this!==this.#t)throw Error(`should only call on root`);if(this.#c)return this;this.toString(),this.#c=!0;let e;for(;e=this.#w.pop();){if(e.type!==`!`)continue;let t=e,n=t.#h;for(;n;){for(let r=t.#S+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#h}}return this}push(...t){for(let n of t)if(n!==``){if(typeof n!=`string`&&!(n instanceof e&&n.#h===this))throw Error(`invalid part: `+n);this.#r.push(n)}}toJSON(){let e=this.type===null?this.#r.slice().map(e=>typeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#c&&this.#h?.type===`!`)&&e.push({}),e}isStart(){if(this.#t===this)return!0;if(!this.#h?.isStart())return!1;if(this.#S===0)return!0;let t=this.#h;for(let n=0;n<this.#S;n++){let r=t.#r[n];if(!(r instanceof e&&r.type===`!`))return!1}return!0}isEnd(){if(this.#t===this||this.#h?.type===`!`)return!0;if(!this.#h?.isEnd())return!1;if(!this.type)return this.#h?.isEnd();let e=this.#h?this.#h.#r.length:0;return this.#S===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(t){let n=new e(this.type,t);for(let e of this.#r)n.copyIn(e);return n}static#i(t,n,r,i){let a=!1,s=!1,c=-1,l=!1;if(n.type===null){let u=r,d=``;for(;u<t.length;){let r=t.charAt(u++);if(a||r===`\\`){a=!a,d+=r;continue}if(s){u===c+1?(r===`^`||r===`!`)&&(l=!0):r===`]`&&!(u===c+2&&l)&&(s=!1),d+=r;continue}else if(r===`[`){s=!0,c=u,l=!1,d+=r;continue}if(!i.noext&&o(r)&&t.charAt(u)===`(`){n.push(d),d=``;let a=new e(r,n);u=e.#i(t,a,u,i),n.push(a);continue}d+=r}return n.push(d),u}let u=r+1,d=new e(null,n),f=[],p=``;for(;u<t.length;){let r=t.charAt(u++);if(a||r===`\\`){a=!a,p+=r;continue}if(s){u===c+1?(r===`^`||r===`!`)&&(l=!0):r===`]`&&!(u===c+2&&l)&&(s=!1),p+=r;continue}else if(r===`[`){s=!0,c=u,l=!1,p+=r;continue}if(o(r)&&t.charAt(u)===`(`){d.push(p),p=``;let n=new e(r,d);d.push(n),u=e.#i(t,n,u,i);continue}if(r===`|`){d.push(p),p=``,f.push(d),d=new e(null,n);continue}if(r===`)`)return p===``&&n.#r.length===0&&(n.#u=!0),d.push(p),p=``,n.push(...f,d),u;p+=r}return n.type=null,n.#s=void 0,n.#r=[t.substring(r-1)],u}static fromGlob(t,n={}){let r=new e(null,void 0,n);return e.#i(t,r,0,n),r}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#s||this.#o.nocase&&!this.#o.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#o.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#o}toRegExpSource(t){let r=t??!!this.#o.dot;if(this.#t===this&&this.#a(),!this.type){let i=this.isStart()&&this.isEnd()&&!this.#r.some(e=>typeof e!=`string`),a=this.#r.map(n=>{let[r,a,o,s]=typeof n==`string`?e.#v(n,this.#s,i):n.toRegExpSource(t);return this.#s=this.#s||o,this.#n=this.#n||s,r}).join(``),o=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&u.has(this.#r[0]))){let e=l,n=r&&e.has(a.charAt(0))||a.startsWith(`\\.`)&&e.has(a.charAt(2))||a.startsWith(`\\.\\.`)&&e.has(a.charAt(4)),i=!r&&!t&&e.has(a.charAt(0));o=n?s:i?c:``}let d=``;return this.isEnd()&&this.#t.#c&&this.#h?.type===`!`&&(d=`(?:$|\\/)`),[o+a+d,(0,n.unescape)(a),this.#s=!!this.#s,this.#n]}let i=this.type===`*`||this.type===`+`,a=this.type===`!`?`(?:(?!(?:`:`(?:`,o=this.#d(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!==`!`){let e=this.toString();return this.#r=[e],this.type=null,this.#s=void 0,[e,(0,n.unescape)(this.toString()),!1,!1]}let d=!i||t||r||!c?``:this.#d(!0);d===o&&(d=``),d&&(o=`(?:${o})(?:${d})*?`);let f=``;if(this.type===`!`&&this.#u)f=(this.isStart()&&!r?c:``)+h;else{let e=this.type===`!`?`))`+(this.isStart()&&!r&&!t?c:``)+m+`)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&d?`)`:this.type===`*`&&d?`)?`:`)${this.type}`;f=a+o+e}return[f,(0,n.unescape)(o),this.#s=!!this.#s,this.#n]}#d(e){return this.#r.map(t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}static#v(e,r,i=!1){let a=!1,o=``,s=!1,c=!1;for(let n=0;n<e.length;n++){let l=e.charAt(n);if(a){a=!1,o+=(d.has(l)?`\\`:``)+l;continue}if(l===`*`){if(c)continue;c=!0,o+=i&&/^[*]+$/.test(e)?h:m,r=!0;continue}else c=!1;if(l===`\\`){n===e.length-1?o+=`\\\\`:a=!0;continue}if(l===`[`){let[i,a,c,l]=(0,t.parseClass)(e,n);if(c){o+=i,s||=a,n+=c-1,r||=l;continue}}if(l===`?`){o+=p,r=!0;continue}o+=f(l)}return[o,(0,n.unescape)(e),!!r,s]}}}),me=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.escape=void 0,e.escape=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`)}),H=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;var t=Ke(),i=Xe(),c=pe(),l=me(),u=kt();e.minimatch=(e,t,n={})=>((0,i.assertValidPattern)(t),!n.nocomment&&t.charAt(0)===`#`?!1:new B(t,n).match(e));var d=/^\*+([^+@!?\*\[\(]*)$/,f=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),p=e=>t=>t.endsWith(e),m=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),h=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),g=/^\*+\.\*+$/,_=e=>!e.startsWith(`.`)&&e.includes(`.`),v=e=>e!==`.`&&e!==`..`&&e.includes(`.`),y=/^\.\*+$/,b=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),x=/^\*+$/,S=e=>e.length!==0&&!e.startsWith(`.`),C=e=>e.length!==0&&e!==`.`&&e!==`..`,w=/^\?+([^+@!?\*\[\(]*)?$/,T=([e,t=``])=>{let n=k([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},E=([e,t=``])=>{let n=A([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},D=([e,t=``])=>{let n=A([e]);return t?e=>n(e)&&e.endsWith(t):n},O=([e,t=``])=>{let n=k([e]);return t?e=>n(e)&&e.endsWith(t):n},k=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},A=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},j=typeof process==`object`&&process?typeof process.env==`object`&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,M={win32:{sep:`\\`},posix:{sep:`/`}};e.sep=j===`win32`?M.win32.sep:M.posix.sep,e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol(`globstar **`),e.minimatch.GLOBSTAR=e.GLOBSTAR;var N=`[^/]*?`,P=`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`,F=`(?:(?!(?:\\/|^)\\.).)*?`;e.filter=(t,n={})=>r=>(0,e.minimatch)(r,t,n),e.minimatch.filter=e.filter;var I=(e,t={})=>Object.assign({},e,t);e.defaults=t=>{if(!t||typeof t!=`object`||!Object.keys(t).length)return e.minimatch;let n=e.minimatch;return Object.assign((e,r,i={})=>n(e,r,I(t,i)),{Minimatch:class extends n.Minimatch{constructor(e,n={}){super(e,I(t,n))}static defaults(e){return n.defaults(I(t,e)).Minimatch}},AST:class extends n.AST{constructor(e,n,r={}){super(e,n,I(t,r))}static fromGlob(e,r={}){return n.AST.fromGlob(e,I(t,r))}},unescape:(e,r={})=>n.unescape(e,I(t,r)),escape:(e,r={})=>n.escape(e,I(t,r)),filter:(e,r={})=>n.filter(e,I(t,r)),defaults:e=>n.defaults(I(t,e)),makeRe:(e,r={})=>n.makeRe(e,I(t,r)),braceExpand:(e,r={})=>n.braceExpand(e,I(t,r)),match:(e,r,i={})=>n.match(e,r,I(t,i)),sep:n.sep,GLOBSTAR:e.GLOBSTAR})},e.minimatch.defaults=e.defaults,e.braceExpand=(e,n={})=>((0,i.assertValidPattern)(e),n.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,t.expand)(e,{max:n.braceExpandMax})),e.minimatch.braceExpand=e.braceExpand,e.makeRe=(e,t={})=>new B(e,t).makeRe(),e.minimatch.makeRe=e.makeRe,e.match=(e,t,n={})=>{let r=new B(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e},e.minimatch.match=e.match;var L=/[?*]|[+@!]\(.*?\)|\[|\]/,z=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),B=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,i.assertValidPattern)(e),t||={},this.options=t,this.pattern=e,this.platform=t.platform||j,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!L.test(e[2]))&&!L.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let n=0;n<e[t].length;n++)e[t][n]===`**`&&(e[t][n]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];n===1&&r===``&&e[0]===``||(r===`.`||r===``)&&(t=!0,e.splice(n,1),n--)}e[0]===`.`&&e.length===2&&(e[1]===`.`||e[1]===``)&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];e===1&&r===``&&n[0]===``||(r===`.`||r===``)&&(t=!0,n.splice(e,1),e--)}n[0]===`.`&&n.length===2&&(n[1]===`.`||n[1]===``)&&(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(t,n,r=!1){let i=this.options;if(this.isWindows){let e=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),r=!e&&t[0]===``&&t[1]===``&&t[2]===`?`&&/^[a-z]:$/i.test(t[3]),i=typeof n[0]==`string`&&/^[a-z]:$/i.test(n[0]),a=!i&&n[0]===``&&n[1]===``&&n[2]===`?`&&typeof n[3]==`string`&&/^[a-z]:$/i.test(n[3]),o=r?3:e?0:void 0,s=a?3:i?0:void 0;if(typeof o==`number`&&typeof s==`number`){let[e,r]=[t[o],n[s]];e.toLowerCase()===r.toLowerCase()&&(n[s]=e,s>o?n=n.slice(s):o>s&&(t=t.slice(o)))}}let{optimizationLevel:a=1}=this.options;a>=2&&(t=this.levelTwoFileOptimize(t)),this.debug(`matchOne`,this,{file:t,pattern:n}),this.debug(`matchOne`,t.length,n.length);for(var o=0,s=0,c=t.length,l=n.length;o<c&&s<l;o++,s++){this.debug(`matchOne loop`);var u=n[s],d=t[o];if(this.debug(n,u,d),u===!1)return!1;if(u===e.GLOBSTAR){this.debug(`GLOBSTAR`,[n,u,d]);var f=o,p=s+1;if(p===l){for(this.debug(`** at the end`);o<c;o++)if(t[o]===`.`||t[o]===`..`||!i.dot&&t[o].charAt(0)===`.`)return!1;return!0}for(;f<c;){var m=t[f];if(this.debug(`
2
2
  globstar while`,t,f,n,p,m),this.matchOne(t.slice(f),n.slice(p),r))return this.debug(`globstar found match!`,f,c,m),!0;if(m===`.`||m===`..`||!i.dot&&m.charAt(0)===`.`){this.debug(`dot detected!`,t,f,n,p);break}this.debug(`globstar swallow a segment, and continue`),f++}return!!(r&&(this.debug(`
3
- >>> no match, partial?`,t,f,n,p),f===c))}let a;if(typeof u==`string`?(a=d===u,this.debug(`string match`,u,d,a)):(a=u.test(d),this.debug(`pattern match`,u,d,a)),!a)return!1}if(o===c&&s===l)return!0;if(o===c)return r;if(s===l)return o===c-1&&t[o]===``;throw Error(`wtf?`)}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(t){(0,i.assertValidPattern)(t);let n=this.options;if(t===`**`)return e.GLOBSTAR;if(t===``)return``;let r,a=null;(r=t.match(x))?a=n.dot?C:S:(r=t.match(d))?a=(n.nocase?n.dot?h:m:n.dot?p:f)(r[1]):(r=t.match(w))?a=(n.nocase?n.dot?E:T:n.dot?D:O)(r):(r=t.match(g))?a=n.dot?v:_:(r=t.match(y))&&(a=b);let o=c.AST.fromGlob(t,this.options).toMMPattern();return a&&typeof o==`object`&&Reflect.defineProperty(o,`test`,{value:a}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?N:n.dot?P:F,i=new Set(n.nocase?[`i`]:[]),a=t.map(t=>{let n=t.map(t=>{if(t instanceof RegExp)for(let e of t.flags.split(``))i.add(e);return typeof t==`string`?z(t):t===e.GLOBSTAR?e.GLOBSTAR:t._src});n.forEach((t,i)=>{let a=n[i+1],o=n[i-1];t!==e.GLOBSTAR||o===e.GLOBSTAR||(o===void 0?a!==void 0&&a!==e.GLOBSTAR?n[i+1]=`(?:\\/|`+r+`\\/)?`+a:n[i]=r:a===void 0?n[i-1]=o+`(?:\\/|\\/`+r+`)?`:a!==e.GLOBSTAR&&(n[i-1]=o+`(?:\\/|\\/`+r+`\\/)`+a,n[i+1]=e.GLOBSTAR))});let a=n.filter(t=>t!==e.GLOBSTAR);if(this.partial&&a.length>=1){let e=[];for(let t=1;t<=a.length;t++)e.push(a.slice(0,t).join(`/`));return`(?:`+e.join(`|`)+`)`}return a.join(`/`)}).join(`|`),[o,s]=t.length>1?[`(?:`,`)`]:[``,``];a=`^`+o+a+s+`$`,this.partial&&(a=`^(?:\\/|`+o+a.slice(1,-1)+s+`)$`),this.negate&&(a=`^(?!`+a+`).+$`);try{this.regexp=new RegExp(a,[...i].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^\/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e=0;e<i.length;e++){let o=i[e],s=r;if(n.matchBase&&o.length===1&&(s=[a]),this.matchOne(s,o,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return e.minimatch.defaults(t).Minimatch}};e.Minimatch=B;var V=pe();Object.defineProperty(e,`AST`,{enumerable:!0,get:function(){return V.AST}});var U=me();Object.defineProperty(e,`escape`,{enumerable:!0,get:function(){return U.escape}});var W=kt();Object.defineProperty(e,`unescape`,{enumerable:!0,get:function(){return W.unescape}}),e.minimatch.AST=c.AST,e.minimatch.Minimatch=B,e.minimatch.escape=l.escape,e.minimatch.unescape=u.unescape}),fs=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LRUCache=void 0;var t=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,n=new Set,r=typeof process==`object`&&process?process:{},i=(e,t,n,i)=>{typeof r.emitWarning==`function`?r.emitWarning(e,t,n,i):console.error(`[${n}] ${t}: ${e}`)},a=globalThis.AbortController,o=globalThis.AbortSignal;if(typeof a>`u`){o=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},a=class{constructor(){t()}signal=new o;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e=r.env?.LRU_CACHE_IGNORE_AC_WARNING!==`1`,t=()=>{e&&(e=!1,i("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.",`NO_ABORT_CONTROLLER`,`ENOTSUP`,t))}}var s=e=>!n.has(e),c=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),l=e=>c(e)?e<=2**8?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?u:null:null,u=class extends Array{constructor(e){super(e),this.fill(0)}},d=class e{heap;length;static#t=!1;static create(t){let n=l(t);if(!n)return[];e.#t=!0;let r=new e(t,n);return e.#t=!1,r}constructor(t,n){if(!e.#t)throw TypeError(`instantiate Stack using Stack.create(n)`);this.heap=new n(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};e.LRUCache=class e{#t;#s;#n;#r;#h;#S;#w;#c;get perf(){return this.#c}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#f;#u;#a;#i;#d;#v;#y;#p;#R;#m;#O;#x;#g;#b;#E;#T;#e;#F;static unsafeExposeInternals(e){return{starts:e.#x,ttls:e.#g,autopurgeTimers:e.#b,sizes:e.#O,keyMap:e.#u,keyList:e.#a,valList:e.#i,next:e.#d,prev:e.#v,get head(){return e.#y},get tail(){return e.#p},free:e.#R,isBackgroundFetch:t=>e.#l(t),backgroundFetch:(t,n,r,i)=>e.#z(t,n,r,i),moveToTail:t=>e.#N(t),indexes:t=>e.#k(t),rindexes:t=>e.#M(t),isStale:t=>e.#_(t)}}get max(){return this.#t}get maxSize(){return this.#s}get calculatedSize(){return this.#f}get size(){return this.#o}get fetchMethod(){return this.#S}get memoMethod(){return this.#w}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#h}constructor(r){let{max:a=0,ttl:o,ttlResolution:u=1,ttlAutopurge:f,updateAgeOnGet:p,updateAgeOnHas:m,allowStale:h,dispose:g,onInsert:_,disposeAfter:v,noDisposeOnSet:y,noUpdateTTL:b,maxSize:x=0,maxEntrySize:S=0,sizeCalculation:C,fetchMethod:w,memoMethod:T,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:O,allowStaleOnFetchAbort:k,ignoreFetchAbort:A,perf:j}=r;if(j!==void 0&&typeof j?.now!=`function`)throw TypeError(`perf option must have a now() method if specified`);if(this.#c=j??t,a!==0&&!c(a))throw TypeError(`max option must be a nonnegative integer`);let M=a?l(a):Array;if(!M)throw Error(`invalid max value: `+a);if(this.#t=a,this.#s=x,this.maxEntrySize=S||this.#s,this.sizeCalculation=C,this.sizeCalculation){if(!this.#s&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(T!==void 0&&typeof T!=`function`)throw TypeError(`memoMethod must be a function if defined`);if(this.#w=T,w!==void 0&&typeof w!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(this.#S=w,this.#T=!!w,this.#u=new Map,this.#a=Array(a).fill(void 0),this.#i=Array(a).fill(void 0),this.#d=new M(a),this.#v=new M(a),this.#y=0,this.#p=0,this.#R=d.create(a),this.#o=0,this.#f=0,typeof g==`function`&&(this.#n=g),typeof _==`function`&&(this.#r=_),typeof v==`function`?(this.#h=v,this.#m=[]):(this.#h=void 0,this.#m=void 0),this.#E=!!this.#n,this.#F=!!this.#r,this.#e=!!this.#h,this.noDisposeOnSet=!!y,this.noUpdateTTL=!!b,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!O,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#s!==0&&!c(this.#s))throw TypeError(`maxSize must be a positive integer if specified`);if(!c(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);this.#$()}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!p,this.updateAgeOnHas=!!m,this.ttlResolution=c(u)||u===0?u:1,this.ttlAutopurge=!!f,this.ttl=o||0,this.ttl){if(!c(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);this.#P()}if(this.#t===0&&this.ttl===0&&this.#s===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!this.#t&&!this.#s){let t=`LRU_CACHE_UNBOUNDED`;s(t)&&(n.add(t),i(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,t,e))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#P(){let e=new u(this.#t),t=new u(this.#t);this.#g=e,this.#x=t;let n=this.ttlAutopurge?Array(this.#t):void 0;this.#b=n,this.#W=(r,i,a=this.#c.now())=>{if(t[r]=i===0?0:a,e[r]=i,n?.[r]&&(clearTimeout(n[r]),n[r]=void 0),i!==0&&n){let e=setTimeout(()=>{this.#_(r)&&this.#A(this.#a[r],`expire`)},i+1);e.unref&&e.unref(),n[r]=e}},this.#C=n=>{t[n]=e[n]===0?0:this.#c.now()},this.#D=(n,a)=>{if(e[a]){let o=e[a],s=t[a];if(!o||!s)return;n.ttl=o,n.start=s,n.now=r||i(),n.remainingTTL=o-(n.now-s)}};let r=0,i=()=>{let e=this.#c.now();if(this.ttlResolution>0){r=e;let t=setTimeout(()=>r=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=n=>{let a=this.#u.get(n);if(a===void 0)return 0;let o=e[a],s=t[a];return!o||!s?1/0:o-((r||i())-s)},this.#_=n=>{let a=t[n],o=e[n];return!!o&&!!a&&(r||i())-a>o}}#C=()=>{};#D=()=>{};#W=()=>{};#_=()=>!1;#$(){let e=new u(this.#t);this.#f=0,this.#O=e,this.#L=t=>{this.#f-=e[t],e[t]=0},this.#B=(e,t,n,r)=>{if(this.#l(t))return 0;if(!c(n))if(r){if(typeof r!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=r(t,e),!c(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`);return n},this.#j=(t,n,r)=>{if(e[t]=n,this.#s){let n=this.#s-e[t];for(;this.#f>n;)this.#G(!0)}this.#f+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#f)}}#L=e=>{};#j=(e,t,n)=>{};#B=(e,t,n,r)=>{if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`);return 0};*#k({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#p;!(!this.#I(t)||((e||!this.#_(t))&&(yield t),t===this.#y));)t=this.#v[t]}*#M({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#y;!(!this.#I(t)||((e||!this.#_(t))&&(yield t),t===this.#p));)t=this.#d[t]}#I(e){return e!==void 0&&this.#u.get(this.#a[e])===e}*entries(){for(let e of this.#k())this.#i[e]!==void 0&&this.#a[e]!==void 0&&!this.#l(this.#i[e])&&(yield[this.#a[e],this.#i[e]])}*rentries(){for(let e of this.#M())this.#i[e]!==void 0&&this.#a[e]!==void 0&&!this.#l(this.#i[e])&&(yield[this.#a[e],this.#i[e]])}*keys(){for(let e of this.#k()){let t=this.#a[e];t!==void 0&&!this.#l(this.#i[e])&&(yield t)}}*rkeys(){for(let e of this.#M()){let t=this.#a[e];t!==void 0&&!this.#l(this.#i[e])&&(yield t)}}*values(){for(let e of this.#k())this.#i[e]!==void 0&&!this.#l(this.#i[e])&&(yield this.#i[e])}*rvalues(){for(let e of this.#M())this.#i[e]!==void 0&&!this.#l(this.#i[e])&&(yield this.#i[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]=`LRUCache`;find(e,t={}){for(let n of this.#k()){let r=this.#i[n],i=this.#l(r)?r.__staleWhileFetching:r;if(i!==void 0&&e(i,this.#a[n],this))return this.get(this.#a[n],t)}}forEach(e,t=this){for(let n of this.#k()){let r=this.#i[n],i=this.#l(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#a[n],this)}}rforEach(e,t=this){for(let n of this.#M()){let r=this.#i[n],i=this.#l(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#a[n],this)}}purgeStale(){let e=!1;for(let t of this.#M({allowStale:!0}))this.#_(t)&&(this.#A(this.#a[t],`expire`),e=!0);return e}info(e){let t=this.#u.get(e);if(t===void 0)return;let n=this.#i[t],r=this.#l(n)?n.__staleWhileFetching:n;if(r===void 0)return;let i={value:r};if(this.#g&&this.#x){let e=this.#g[t],n=this.#x[t];e&&n&&(i.ttl=e-(this.#c.now()-n),i.start=Date.now())}return this.#O&&(i.size=this.#O[t]),i}dump(){let e=[];for(let t of this.#k({allowStale:!0})){let n=this.#a[t],r=this.#i[t],i=this.#l(r)?r.__staleWhileFetching:r;if(i===void 0||n===void 0)continue;let a={value:i};if(this.#g&&this.#x){a.ttl=this.#g[t];let e=this.#c.now()-this.#x[t];a.start=Math.floor(Date.now()-e)}this.#O&&(a.size=this.#O[t]),e.unshift([n,a])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let e=Date.now()-n.start;n.start=this.#c.now()-e}this.set(t,n.value,n)}}set(e,t,n={}){if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:s}=n,{noUpdateTTL:c=this.noUpdateTTL}=n,l=this.#B(e,t,n.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize)return s&&(s.set=`miss`,s.maxEntrySizeExceeded=!0),this.#A(e,`set`),this;let u=this.#o===0?void 0:this.#u.get(e);if(u===void 0)u=this.#o===0?this.#p:this.#R.length===0?this.#o===this.#t?this.#G(!1):this.#o:this.#R.pop(),this.#a[u]=e,this.#i[u]=t,this.#u.set(e,u),this.#d[this.#p]=u,this.#v[u]=this.#p,this.#p=u,this.#o++,this.#j(u,l,s),s&&(s.set=`add`),c=!1,this.#F&&this.#r?.(t,e,`add`);else{this.#N(u);let n=this.#i[u];if(t!==n){if(this.#T&&this.#l(n)){n.__abortController.abort(Error(`replaced`));let{__staleWhileFetching:t}=n;t!==void 0&&!a&&(this.#E&&this.#n?.(t,e,`set`),this.#e&&this.#m?.push([t,e,`set`]))}else a||(this.#E&&this.#n?.(n,e,`set`),this.#e&&this.#m?.push([n,e,`set`]));if(this.#L(u),this.#j(u,l,s),this.#i[u]=t,s){s.set=`replace`;let e=n&&this.#l(n)?n.__staleWhileFetching:n;e!==void 0&&(s.oldValue=e)}}else s&&(s.set=`update`);this.#F&&this.onInsert?.(t,e,t===n?`update`:`replace`)}if(r!==0&&!this.#g&&this.#P(),this.#g&&(c||this.#W(u,r,i),s&&this.#D(s,u)),!a&&this.#e&&this.#m){let e=this.#m,t;for(;t=e?.shift();)this.#h?.(...t)}return this}pop(){try{for(;this.#o;){let e=this.#i[this.#y];if(this.#G(!0),this.#l(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#e&&this.#m){let e=this.#m,t;for(;t=e?.shift();)this.#h?.(...t)}}}#G(e){let t=this.#y,n=this.#a[t],r=this.#i[t];return this.#T&&this.#l(r)?r.__abortController.abort(Error(`evicted`)):(this.#E||this.#e)&&(this.#E&&this.#n?.(r,n,`evict`),this.#e&&this.#m?.push([r,n,`evict`])),this.#L(t),this.#b?.[t]&&(clearTimeout(this.#b[t]),this.#b[t]=void 0),e&&(this.#a[t]=void 0,this.#i[t]=void 0,this.#R.push(t)),this.#o===1?(this.#y=this.#p=0,this.#R.length=0):this.#y=this.#d[t],this.#u.delete(n),this.#o--,t}has(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#u.get(e);if(i!==void 0){let e=this.#i[i];if(this.#l(e)&&e.__staleWhileFetching===void 0)return!1;if(this.#_(i))r&&(r.has=`stale`,this.#D(r,i));else return n&&this.#C(i),r&&(r.has=`hit`,this.#D(r,i)),!0}else r&&(r.has=`miss`);return!1}peek(e,t={}){let{allowStale:n=this.allowStale}=t,r=this.#u.get(e);if(r===void 0||!n&&this.#_(r))return;let i=this.#i[r];return this.#l(i)?i.__staleWhileFetching:i}#z(e,t,n,r){let i=t===void 0?void 0:this.#i[t];if(this.#l(i))return i;let o=new a,{signal:s}=n;s?.addEventListener(`abort`,()=>o.abort(s.reason),{signal:o.signal});let c={signal:o.signal,options:n,context:r},l=(r,i=!1)=>{let{aborted:a}=o.signal,s=n.ignoreFetchAbort&&r!==void 0,l=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&r!==void 0);if(n.status&&(a&&!i?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,s&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),a&&!s&&!i)return d(o.signal.reason,l);let u=p,f=this.#i[t];return(f===p||s&&i&&f===void 0)&&(r===void 0?u.__staleWhileFetching===void 0?this.#A(e,`fetch`):this.#i[t]=u.__staleWhileFetching:(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,c.options))),r},u=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),d(e,!1)),d=(r,i)=>{let{aborted:a}=o.signal,s=a&&n.allowStaleOnFetchAbort,c=s||n.allowStaleOnFetchRejection,l=c||n.noDeleteOnFetchRejection,u=p;if(this.#i[t]===p&&(!l||!i&&u.__staleWhileFetching===void 0?this.#A(e,`fetch`):s||(this.#i[t]=u.__staleWhileFetching)),c)return n.status&&u.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw r},f=(t,r)=>{let a=this.#S?.(e,i,c);a&&a instanceof Promise&&a.then(e=>t(e===void 0?void 0:e),r),o.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))})};n.status&&(n.status.fetchDispatched=!0);let p=new Promise(f).then(l,u),m=Object.assign(p,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return t===void 0?(this.set(e,m,{...c.options,status:void 0}),t=this.#u.get(e)):this.#i[t]=m,m}#l(e){if(!this.#T)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty(`__staleWhileFetching`)&&t.__abortController instanceof a}async fetch(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:h=!1,status:g,signal:_}=t;if(!this.#T)return g&&(g.fetch=`get`),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:g});let v={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:s,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:g,signal:_},y=this.#u.get(e);if(y===void 0){g&&(g.fetch=`miss`);let t=this.#z(e,y,v,m);return t.__returned=t}else{let t=this.#i[y];if(this.#l(t)){let e=n&&t.__staleWhileFetching!==void 0;return g&&(g.fetch=`inflight`,e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=this.#_(y);if(!h&&!i)return g&&(g.fetch=`hit`),this.#N(y),r&&this.#C(y),g&&this.#D(g,y),t;let a=this.#z(e,y,v,m),o=a.__staleWhileFetching!==void 0&&n;return g&&(g.fetch=i?`stale`:`refresh`,o&&i&&(g.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}async forceFetch(e,t={}){let n=await this.fetch(e,t);if(n===void 0)throw Error(`fetch() returned undefined`);return n}memo(e,t={}){let n=this.#w;if(!n)throw Error(`no memoMethod provided to constructor`);let{context:r,forceRefresh:i,...a}=t,o=this.get(e,a);if(!i&&o!==void 0)return o;let s=n(e,o,{options:a,context:r});return this.set(e,s,a),s}get(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=this.#u.get(e);if(o!==void 0){let t=this.#i[o],s=this.#l(t);return a&&this.#D(a,o),this.#_(o)?(a&&(a.get=`stale`),s?(a&&n&&t.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?t.__staleWhileFetching:void 0):(i||this.#A(e,`expire`),a&&n&&(a.returnedStale=!0),n?t:void 0)):(a&&(a.get=`hit`),s?t.__staleWhileFetching:(this.#N(o),r&&this.#C(o),t))}else a&&(a.get=`miss`)}#U(e,t){this.#v[t]=e,this.#d[e]=t}#N(e){e!==this.#p&&(e===this.#y?this.#y=this.#d[e]:this.#U(this.#v[e],this.#d[e]),this.#U(this.#p,e),this.#p=e)}delete(e){return this.#A(e,`delete`)}#A(e,t){let n=!1;if(this.#o!==0){let r=this.#u.get(e);if(r!==void 0)if(this.#b?.[r]&&(clearTimeout(this.#b?.[r]),this.#b[r]=void 0),n=!0,this.#o===1)this.#q(t);else{this.#L(r);let n=this.#i[r];if(this.#l(n)?n.__abortController.abort(Error(`deleted`)):(this.#E||this.#e)&&(this.#E&&this.#n?.(n,e,t),this.#e&&this.#m?.push([n,e,t])),this.#u.delete(e),this.#a[r]=void 0,this.#i[r]=void 0,r===this.#p)this.#p=this.#v[r];else if(r===this.#y)this.#y=this.#d[r];else{let e=this.#v[r];this.#d[e]=this.#d[r];let t=this.#d[r];this.#v[t]=this.#v[r]}this.#o--,this.#R.push(r)}}if(this.#e&&this.#m?.length){let e=this.#m,t;for(;t=e?.shift();)this.#h?.(...t)}return n}clear(){return this.#q(`delete`)}#q(e){for(let t of this.#M({allowStale:!0})){let n=this.#i[t];if(this.#l(n))n.__abortController.abort(Error(`deleted`));else{let r=this.#a[t];this.#E&&this.#n?.(n,r,e),this.#e&&this.#m?.push([n,r,e])}}if(this.#u.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#g&&this.#x){this.#g.fill(0),this.#x.fill(0);for(let e of this.#b??[])e!==void 0&&clearTimeout(e);this.#b?.fill(void 0)}if(this.#O&&this.#O.fill(0),this.#y=0,this.#p=0,this.#R.length=0,this.#f=0,this.#o=0,this.#e&&this.#m){let e=this.#m,t;for(;t=e?.shift();)this.#h?.(...t)}}}}),Oe=R(e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;var n=typeof process==`object`&&process?process:{stdout:null,stderr:null},r=require(`node:events`),i=t(require(`node:stream`)),a=require(`node:string_decoder`);e.isStream=t=>!!t&&typeof t==`object`&&(t instanceof J||t instanceof i.default||(0,e.isReadable)(t)||(0,e.isWritable)(t)),e.isReadable=e=>!!e&&typeof e==`object`&&e instanceof r.EventEmitter&&typeof e.pipe==`function`&&e.pipe!==i.default.Writable.prototype.pipe,e.isWritable=e=>!!e&&typeof e==`object`&&e instanceof r.EventEmitter&&typeof e.write==`function`&&typeof e.end==`function`;var o=Symbol(`EOF`),s=Symbol(`maybeEmitEnd`),c=Symbol(`emittedEnd`),l=Symbol(`emittingEnd`),u=Symbol(`emittedError`),d=Symbol(`closed`),f=Symbol(`read`),p=Symbol(`flush`),m=Symbol(`flushChunk`),h=Symbol(`encoding`),g=Symbol(`decoder`),_=Symbol(`flowing`),v=Symbol(`paused`),y=Symbol(`resume`),b=Symbol(`buffer`),x=Symbol(`pipes`),S=Symbol(`bufferLength`),C=Symbol(`bufferPush`),w=Symbol(`bufferShift`),T=Symbol(`objectMode`),E=Symbol(`destroyed`),D=Symbol(`error`),O=Symbol(`emitData`),k=Symbol(`emitEnd`),A=Symbol(`emitEnd2`),j=Symbol(`async`),M=Symbol(`abort`),N=Symbol(`aborted`),P=Symbol(`signal`),F=Symbol(`dataListeners`),I=Symbol(`discarded`),L=e=>Promise.resolve().then(e),z=e=>e(),B=e=>e===`end`||e===`finish`||e===`prefinish`,V=e=>e instanceof ArrayBuffer||!!e&&typeof e==`object`&&e.constructor&&e.constructor.name===`ArrayBuffer`&&e.byteLength>=0,U=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e),W=class{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[y](),this.dest.on(`drain`,this.ondrain)}unpipe(){this.dest.removeListener(`drain`,this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},G=class extends W{unpipe(){this.src.removeListener(`error`,this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>this.dest.emit(`error`,e),e.on(`error`,this.proxyErrors)}},K=e=>!!e.objectMode,q=e=>!e.objectMode&&!!e.encoding&&e.encoding!==`buffer`,J=class extends r.EventEmitter{[_]=!1;[v]=!1;[x]=[];[b]=[];[T];[h];[j];[g];[o]=!1;[c]=!1;[l]=!1;[d]=!1;[u]=null;[S]=0;[E]=!1;[P];[N]=!1;[F]=0;[I]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding==`string`)throw TypeError(`Encoding and objectMode may not be used together`);K(t)?(this[T]=!0,this[h]=null):q(t)?(this[h]=t.encoding,this[T]=!1):(this[T]=!1,this[h]=null),this[j]=!!t.async,this[g]=this[h]?new a.StringDecoder(this[h]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,`buffer`,{get:()=>this[b]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,`pipes`,{get:()=>this[x]});let{signal:n}=t;n&&(this[P]=n,n.aborted?this[M]():n.addEventListener(`abort`,()=>this[M]()))}get bufferLength(){return this[S]}get encoding(){return this[h]}set encoding(e){throw Error(`Encoding must be set at instantiation time`)}setEncoding(e){throw Error(`Encoding must be set at instantiation time`)}get objectMode(){return this[T]}set objectMode(e){throw Error(`objectMode must be set at instantiation time`)}get async(){return this[j]}set async(e){this[j]=this[j]||!!e}[M](){this[N]=!0,this.emit(`abort`,this[P]?.reason),this.destroy(this[P]?.reason)}get aborted(){return this[N]}set aborted(e){}write(e,t,n){if(this[N])return!1;if(this[o])throw Error(`write after end`);if(this[E])return this.emit(`error`,Object.assign(Error(`Cannot call write after a stream was destroyed`),{code:`ERR_STREAM_DESTROYED`})),!0;typeof t==`function`&&(n=t,t=`utf8`),t||=`utf8`;let r=this[j]?L:z;if(!this[T]&&!Buffer.isBuffer(e)){if(U(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(V(e))e=Buffer.from(e);else if(typeof e!=`string`)throw Error(`Non-contiguous data written to non-objectMode stream`)}return this[T]?(this[_]&&this[S]!==0&&this[p](!0),this[_]?this.emit(`data`,e):this[C](e),this[S]!==0&&this.emit(`readable`),n&&r(n),this[_]):e.length?(typeof e==`string`&&!(t===this[h]&&!this[g]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[h]&&(e=this[g].write(e)),this[_]&&this[S]!==0&&this[p](!0),this[_]?this.emit(`data`,e):this[C](e),this[S]!==0&&this.emit(`readable`),n&&r(n),this[_]):(this[S]!==0&&this.emit(`readable`),n&&r(n),this[_])}read(e){if(this[E])return null;if(this[I]=!1,this[S]===0||e===0||e&&e>this[S])return this[s](),null;this[T]&&(e=null),this[b].length>1&&!this[T]&&(this[b]=[this[h]?this[b].join(``):Buffer.concat(this[b],this[S])]);let t=this[f](e||null,this[b][0]);return this[s](),t}[f](e,t){if(this[T])this[w]();else{let n=t;e===n.length||e===null?this[w]():typeof n==`string`?(this[b][0]=n.slice(e),t=n.slice(0,e),this[S]-=e):(this[b][0]=n.subarray(e),t=n.subarray(0,e),this[S]-=e)}return this.emit(`data`,t),!this[b].length&&!this[o]&&this.emit(`drain`),t}end(e,t,n){return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=`utf8`),e!==void 0&&this.write(e,t),n&&this.once(`end`,n),this[o]=!0,this.writable=!1,(this[_]||!this[v])&&this[s](),this}[y](){this[E]||(!this[F]&&!this[x].length&&(this[I]=!0),this[v]=!1,this[_]=!0,this.emit(`resume`),this[b].length?this[p]():this[o]?this[s]():this.emit(`drain`))}resume(){return this[y]()}pause(){this[_]=!1,this[v]=!0,this[I]=!1}get destroyed(){return this[E]}get flowing(){return this[_]}get paused(){return this[v]}[C](e){this[T]?this[S]+=1:this[S]+=e.length,this[b].push(e)}[w](){return this[T]?--this[S]:this[S]-=this[b][0].length,this[b].shift()}[p](e=!1){do;while(this[m](this[w]())&&this[b].length);!e&&!this[b].length&&!this[o]&&this.emit(`drain`)}[m](e){return this.emit(`data`,e),this[_]}pipe(e,t){if(this[E])return e;this[I]=!1;let r=this[c];return t||={},e===n.stdout||e===n.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,r?t.end&&e.end():(this[x].push(t.proxyErrors?new G(this,e,t):new W(this,e,t)),this[j]?L(()=>this[y]()):this[y]()),e}unpipe(e){let t=this[x].find(t=>t.dest===e);t&&(this[x].length===1?(this[_]&&this[F]===0&&(this[_]=!1),this[x]=[]):this[x].splice(this[x].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e===`data`)this[I]=!1,this[F]++,!this[x].length&&!this[_]&&this[y]();else if(e===`readable`&&this[S]!==0)super.emit(`readable`);else if(B(e)&&this[c])super.emit(e),this.removeAllListeners(e);else if(e===`error`&&this[u]){let e=t;this[j]?L(()=>e.call(this,this[u])):e.call(this,this[u])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e===`data`&&(this[F]=this.listeners(`data`).length,this[F]===0&&!this[I]&&!this[x].length&&(this[_]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e===`data`||e===void 0)&&(this[F]=0,!this[I]&&!this[x].length&&(this[_]=!1)),t}get emittedEnd(){return this[c]}[s](){!this[l]&&!this[c]&&!this[E]&&this[b].length===0&&this[o]&&(this[l]=!0,this.emit(`end`),this.emit(`prefinish`),this.emit(`finish`),this[d]&&this.emit(`close`),this[l]=!1)}emit(e,...t){let n=t[0];if(e!==`error`&&e!==`close`&&e!==E&&this[E])return!1;if(e===`data`)return!this[T]&&!n?!1:this[j]?(L(()=>this[O](n)),!0):this[O](n);if(e===`end`)return this[k]();if(e===`close`){if(this[d]=!0,!this[c]&&!this[E])return!1;let e=super.emit(`close`);return this.removeAllListeners(`close`),e}else if(e===`error`){this[u]=n,super.emit(D,n);let e=!this[P]||this.listeners(`error`).length?super.emit(`error`,n):!1;return this[s](),e}else if(e===`resume`){let e=super.emit(`resume`);return this[s](),e}else if(e===`finish`||e===`prefinish`){let t=super.emit(e);return this.removeAllListeners(e),t}let r=super.emit(e,...t);return this[s](),r}[O](e){for(let t of this[x])t.dest.write(e)===!1&&this.pause();let t=this[I]?!1:super.emit(`data`,e);return this[s](),t}[k](){return this[c]?!1:(this[c]=!0,this.readable=!1,this[j]?(L(()=>this[A]()),!0):this[A]())}[A](){if(this[g]){let e=this[g].end();if(e){for(let t of this[x])t.dest.write(e);this[I]||super.emit(`data`,e)}}for(let e of this[x])e.end();let e=super.emit(`end`);return this.removeAllListeners(`end`),e}async collect(){let e=Object.assign([],{dataLength:0});this[T]||(e.dataLength=0);let t=this.promise();return this.on(`data`,t=>{e.push(t),this[T]||(e.dataLength+=t.length)}),await t,e}async concat(){if(this[T])throw Error(`cannot concat in objectMode`);let e=await this.collect();return this[h]?e.join(``):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(E,()=>t(Error(`stream destroyed`))),this.on(`error`,e=>t(e)),this.on(`end`,()=>e())})}[Symbol.asyncIterator](){this[I]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[o])return t();let r,i,a=e=>{this.off(`data`,s),this.off(`end`,c),this.off(E,l),t(),i(e)},s=e=>{this.off(`error`,a),this.off(`end`,c),this.off(E,l),this.pause(),r({value:e,done:!!this[o]})},c=()=>{this.off(`error`,a),this.off(`data`,s),this.off(E,l),t(),r({done:!0,value:void 0})},l=()=>a(Error(`stream destroyed`));return new Promise((e,t)=>{i=t,r=e,this.once(E,l),this.once(`error`,a),this.once(`end`,c),this.once(`data`,s)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[I]=!1;let e=!1,t=()=>(this.pause(),this.off(D,t),this.off(E,t),this.off(`end`,t),e=!0,{done:!0,value:void 0});return this.once(`end`,t),this.once(D,t),this.once(E,t),{next:()=>{if(e)return t();let n=this.read();return n===null?t():{done:!1,value:n}},throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[E])return e?this.emit(`error`,e):this.emit(E),this;this[E]=!0,this[I]=!0,this[b].length=0,this[S]=0;let t=this;return typeof t.close==`function`&&!this[d]&&t.close(),e?this.emit(`error`,e):this.emit(E),this}static get isStream(){return e.isStream}};e.Minipass=J}),Ms=R(e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r};Object.defineProperty(e,`__esModule`,{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;var i=fs(),a=require(`node:path`),o=require(`node:url`),s=require(`fs`),c=r(require(`node:fs`)),d=s.realpathSync.native,f=require(`node:fs/promises`),p=Oe(),m={lstatSync:s.lstatSync,readdir:s.readdir,readdirSync:s.readdirSync,readlinkSync:s.readlinkSync,realpathSync:d,promises:{lstat:f.lstat,readdir:f.readdir,readlink:f.readlink,realpath:f.realpath}},h=e=>!e||e===m||e===c?m:{...m,...e,promises:{...m.promises,...e.promises||{}}},g=/^\\\\\?\\([a-z]:)\\?$/i,_=e=>e.replace(/\//g,`\\`).replace(g,`$1\\`),v=/[\\\/]/,y=0,b=1,x=2,S=4,C=6,w=8,T=10,E=12,D=15,O=~D,k=16,A=32,j=64,M=128,N=256,P=512,F=j|M|P,I=1023,L=e=>e.isFile()?w:e.isDirectory()?S:e.isSymbolicLink()?T:e.isCharacterDevice()?x:e.isBlockDevice()?C:e.isSocket()?E:e.isFIFO()?b:y,z=new i.LRUCache({max:2**12}),B=e=>{let t=z.get(e);if(t)return t;let n=e.normalize(`NFKD`);return z.set(e,n),n},V=new i.LRUCache({max:2**12}),U=e=>{let t=V.get(e);if(t)return t;let n=B(e.toLowerCase());return V.set(e,n),n},W=class extends i.LRUCache{constructor(){super({max:256})}};e.ResolveCache=W;var G=class extends i.LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:e=>e.length+1})}};e.ChildrenCache=G;var K=Symbol(`PathScurry setAsCwd`),q=class{name;root;roots;parent;nocase;isCWD=!1;#t;#s;get dev(){return this.#s}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#h;get uid(){return this.#h}#S;get gid(){return this.#S}#w;get rdev(){return this.#w}#c;get blksize(){return this.#c}#o;get ino(){return this.#o}#f;get size(){return this.#f}#u;get blocks(){return this.#u}#a;get atimeMs(){return this.#a}#i;get mtimeMs(){return this.#i}#d;get ctimeMs(){return this.#d}#v;get birthtimeMs(){return this.#v}#y;get atime(){return this.#y}#p;get mtime(){return this.#p}#R;get ctime(){return this.#R}#m;get birthtime(){return this.#m}#O;#x;#g;#b;#E;#T;#e;#F;#P;#C;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=y,n,r,i,a,o){this.name=e,this.#O=i?U(e):B(e),this.#e=t&I,this.nocase=i,this.roots=r,this.root=n||this,this.#F=a,this.#g=o.fullpath,this.#E=o.relative,this.#T=o.relativePosix,this.parent=o.parent,this.parent?this.#t=this.parent.#t:this.#t=h(o.fs)}depth(){return this.#x===void 0?this.parent?this.#x=this.parent.depth()+1:this.#x=0:this.#x}childrenCache(){return this.#F}resolve(e){if(!e)return this;let t=this.getRootString(e),n=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#D(n):this.#D(n)}#D(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#F.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#F.set(this,t),this.#e&=~k,t}child(e,t){if(e===``||e===`.`)return this;if(e===`..`)return this.parent||this;let n=this.children(),r=this.nocase?U(e):B(e);for(let e of n)if(e.#O===r)return e;let i=this.parent?this.sep:``,a=this.#g?this.#g+i+e:void 0,o=this.newChild(e,y,{...t,parent:this,fullpath:a});return this.canReaddir()||(o.#e|=M),n.push(o),o}relative(){if(this.isCWD)return``;if(this.#E!==void 0)return this.#E;let e=this.name,t=this.parent;if(!t)return this.#E=this.name;let n=t.relative();return n+(!n||!t.parent?``:this.sep)+e}relativePosix(){if(this.sep===`/`)return this.relative();if(this.isCWD)return``;if(this.#T!==void 0)return this.#T;let e=this.name,t=this.parent;if(!t)return this.#T=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?``:`/`)+e}fullpath(){if(this.#g!==void 0)return this.#g;let e=this.name,t=this.parent;return t?this.#g=t.fullpath()+(t.parent?this.sep:``)+e:this.#g=this.name}fullpathPosix(){if(this.#b!==void 0)return this.#b;if(this.sep===`/`)return this.#b=this.fullpath();if(!this.parent){let e=this.fullpath().replace(/\\/g,`/`);return/^[a-z]:\//i.test(e)?this.#b=`//?/${e}`:this.#b=e}let e=this.parent,t=e.fullpathPosix();return this.#b=t+(!t||!e.parent?``:`/`)+this.name}isUnknown(){return(this.#e&D)===y}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?`Unknown`:this.isDirectory()?`Directory`:this.isFile()?`File`:this.isSymbolicLink()?`SymbolicLink`:this.isFIFO()?`FIFO`:this.isCharacterDevice()?`CharacterDevice`:this.isBlockDevice()?`BlockDevice`:this.isSocket()?`Socket`:`Unknown`}isFile(){return(this.#e&D)===w}isDirectory(){return(this.#e&D)===S}isCharacterDevice(){return(this.#e&D)===x}isBlockDevice(){return(this.#e&D)===C}isFIFO(){return(this.#e&D)===b}isSocket(){return(this.#e&D)===E}isSymbolicLink(){return(this.#e&T)===T}lstatCached(){return this.#e&A?this:void 0}readlinkCached(){return this.#P}realpathCached(){return this.#C}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#P)return!0;if(!this.parent)return!1;let e=this.#e&D;return!(e!==y&&e!==T||this.#e&N||this.#e&M)}calledReaddir(){return!!(this.#e&k)}isENOENT(){return!!(this.#e&M)}isNamed(e){return this.nocase?this.#O===U(e):this.#O===B(e)}async readlink(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),t=(await this.parent.realpath())?.resolve(e);if(t)return this.#P=t}catch(e){this.#M(e.code);return}}readlinkSync(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),t=this.parent.realpathSync()?.resolve(e);if(t)return this.#P=t}catch(e){this.#M(e.code);return}}#W(e){this.#e|=k;for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&n.#_()}}#_(){this.#e&M||(this.#e=(this.#e|M)&O,this.#$())}#$(){let e=this.children();e.provisional=0;for(let t of e)t.#_()}#L(){this.#e|=P,this.#j()}#j(){if(this.#e&j)return;let e=this.#e;(e&D)===S&&(e&=O),this.#e=e|j,this.#$()}#B(e=``){e===`ENOTDIR`||e===`EPERM`?this.#j():e===`ENOENT`?this.#_():this.children().provisional=0}#k(e=``){e===`ENOTDIR`?this.parent.#j():e===`ENOENT`&&this.#_()}#M(e=``){let t=this.#e;t|=N,e===`ENOENT`&&(t|=M),(e===`EINVAL`||e===`UNKNOWN`)&&(t&=O),this.#e=t,e===`ENOTDIR`&&this.parent&&this.parent.#j()}#I(e,t){return this.#z(e,t)||this.#G(e,t)}#G(e,t){let n=L(e),r=this.newChild(e.name,n,{parent:this}),i=r.#e&D;return i!==S&&i!==T&&i!==y&&(r.#e|=j),t.unshift(r),t.provisional++,r}#z(e,t){for(let n=t.provisional;n<t.length;n++){let r=t[n];if((this.nocase?U(e.name):B(e.name))===r.#O)return this.#l(e,r,n,t)}}#l(e,t,n,r){let i=t.name;return t.#e=t.#e&O|L(e),i!==e.name&&(t.name=e.name),n!==r.provisional&&(n===r.length-1?r.pop():r.splice(n,1),r.unshift(t)),r.provisional++,t}async lstat(){if((this.#e&M)===0)try{return this.#U(await this.#t.promises.lstat(this.fullpath())),this}catch(e){this.#k(e.code)}}lstatSync(){if((this.#e&M)===0)try{return this.#U(this.#t.lstatSync(this.fullpath())),this}catch(e){this.#k(e.code)}}#U(e){let{atime:t,atimeMs:n,birthtime:r,birthtimeMs:i,blksize:a,blocks:o,ctime:s,ctimeMs:c,dev:l,gid:u,ino:d,mode:f,mtime:p,mtimeMs:m,nlink:h,rdev:g,size:_,uid:v}=e;this.#y=t,this.#a=n,this.#m=r,this.#v=i,this.#c=a,this.#u=o,this.#R=s,this.#d=c,this.#s=l,this.#S=u,this.#o=d,this.#n=f,this.#p=p,this.#i=m,this.#r=h,this.#w=g,this.#f=_,this.#h=v;let b=L(e);this.#e=this.#e&O|b|A,b!==y&&b!==S&&b!==T&&(this.#e|=j)}#N=[];#A=!1;#q(e){this.#A=!1;let t=this.#N.slice();this.#N.length=0,t.forEach(t=>t(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let r=n.slice(0,n.provisional);t?e(null,r):queueMicrotask(()=>e(null,r));return}if(this.#N.push(e),this.#A)return;this.#A=!0;let r=this.fullpath();this.#t.readdir(r,{withFileTypes:!0},(e,t)=>{if(e)this.#B(e.code),n.provisional=0;else{for(let e of t)this.#I(e,n);this.#W(n)}this.#q(n.slice(0,n.provisional))})}#H;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#H)await this.#H;else{let n=()=>{};this.#H=new Promise(e=>n=e);try{for(let n of await this.#t.promises.readdir(t,{withFileTypes:!0}))this.#I(n,e);this.#W(e)}catch(t){this.#B(t.code),e.provisional=0}this.#H=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#t.readdirSync(t,{withFileTypes:!0}))this.#I(n,e);this.#W(e)}catch(t){this.#B(t.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#e&F)return!1;let e=D&this.#e;return e===y||e===S||e===T}shouldWalk(e,t){return(this.#e&S)===S&&!(this.#e&F)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#C)return this.#C;if(!((P|N|M)&this.#e))try{let e=await this.#t.promises.realpath(this.fullpath());return this.#C=this.resolve(e)}catch{this.#L()}}realpathSync(){if(this.#C)return this.#C;if(!((P|N|M)&this.#e))try{let e=this.#t.realpathSync(this.fullpath());return this.#C=this.resolve(e)}catch{this.#L()}}[K](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],r=this;for(;r&&r.parent;)t.add(r),r.#E=n.join(this.sep),r.#T=n.join(`/`),r=r.parent,n.push(`..`);for(r=e;r&&r.parent&&!t.has(r);)r.#E=void 0,r.#T=void 0,r=r.parent}};e.PathBase=q;var J=class e extends q{sep=`\\`;splitSep=v;constructor(e,t=y,n,r,i,a,o){super(e,t,n,r,i,a,o)}newChild(t,n=y,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return a.win32.parse(e).root}getRoot(e){if(e=_(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new Z(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,`\\`).replace(g,`$1\\`),e===t}};e.PathWin32=J;var Y=class e extends q{splitSep=`/`;sep=`/`;constructor(e,t=y,n,r,i,a,o){super(e,t,n,r,i,a,o)}getRootString(e){return e.startsWith(`/`)?`/`:``}getRoot(e){return this.root}newChild(t,n=y,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}};e.PathPosix=Y;var X=class{root;rootPath;roots;cwd;#t;#s;#n;nocase;#r;constructor(e=process.cwd(),t,n,{nocase:r,childrenCacheSize:i=16*1024,fs:a=m}={}){this.#r=h(a),(e instanceof URL||e.startsWith(`file://`))&&(e=(0,o.fileURLToPath)(e));let s=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(s),this.#t=new W,this.#s=new W,this.#n=new G(i);let c=s.substring(this.rootPath.length).split(n);if(c.length===1&&!c[0]&&c.pop(),r===void 0)throw TypeError(`must provide nocase setting to PathScurryBase ctor`);this.nocase=r,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,u=c.length-1,d=t.sep,f=this.rootPath,p=!1;for(let e of c){let t=u--;l=l.child(e,{relative:Array(t).fill(`..`).join(d),relativePosix:Array(t).fill(`..`).join(`/`),fullpath:f+=(p?``:d)+e}),p=!0}this.cwd=l}depth(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#t.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpath();return this.#t.set(t,r),r}resolvePosix(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#s.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpathPosix();return this.#s.set(t,r),r}relative(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let t=await e.readdir();return n?t:t.map(e=>e.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(e=>e.name):[]}async lstat(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set,c=(e,t)=>{s.add(e),e.readdirCB((e,l)=>{if(e)return t(e);let u=l.length;if(!u)return t();let d=()=>{--u===0&&t()};for(let e of l)(!i||i(e))&&o.push(n?e:e.fullpath()),r&&e.isSymbolicLink()?e.realpath().then(e=>e?.isUnknown()?e.lstat():e).then(e=>e?.shouldWalk(s,a)?c(e,d):d()):e.shouldWalk(s,a)?c(e,d):d()},!0)},l=e;return new Promise((e,t)=>{c(l,n=>{if(n)return t(n);e(o)})})}walkSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set([e]);for(let e of s){let t=e.readdirSync();for(let e of t){(!i||i(e))&&o.push(n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&s.add(t)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t;(!i||i(e))&&(yield n?e:e.fullpath());let o=new Set([e]);for(let e of o){let t=e.readdirSync();for(let e of t){(!i||i(e))&&(yield n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(o,a)&&o.add(t)}}}stream(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new p.Minipass({objectMode:!0});(!i||i(e))&&o.write(n?e:e.fullpath());let s=new Set,c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let d=(t,p,m=!1)=>{if(t)return o.emit(`error`,t);if(r&&!m){let e=[];for(let t of p)t.isSymbolicLink()&&e.push(t.realpath().then(e=>e?.isUnknown()?e.lstat():e));if(e.length){Promise.all(e).then(()=>d(null,p,!0));return}}for(let t of p)t&&(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of p){let t=e.realpathCached()||e;t.shouldWalk(s,a)&&c.push(t)}e&&!o.flowing?o.once(`drain`,u):f||u()},f=!0;t.readdirCB(d,!0),f=!1}};return u(),o}streamSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new p.Minipass({objectMode:!0}),s=new Set;(!i||i(e))&&o.write(n?e:e.fullpath());let c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let u=t.readdirSync();for(let t of u)(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of u){let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&c.push(t)}}e&&!o.flowing&&o.once(`drain`,u)};return u(),o}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e==`string`?this.cwd.resolve(e):e,this.cwd[K](t)}};e.PathScurryBase=X;var Z=class extends X{sep=`\\`;constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,a.win32,`\\`,{...t,nocase:n}),this.nocase=n;for(let e=this.cwd;e;e=e.parent)e.nocase=this.nocase}parseRootPath(e){return a.win32.parse(e).root.toUpperCase()}newRoot(e){return new J(this.rootPath,S,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)||e.startsWith(`\\`)||/^[a-z]:(\/|\\)/i.test(e)}};e.PathScurryWin32=Z;var Q=class extends X{sep=`/`;constructor(e=process.cwd(),t={}){let{nocase:n=!1}=t;super(e,a.posix,`/`,{...t,nocase:n}),this.nocase=n}parseRootPath(e){return`/`}newRoot(e){return new Y(this.rootPath,S,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)}};e.PathScurryPosix=Q;var $=class extends Q{constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}};e.PathScurryDarwin=$,e.Path=process.platform===`win32`?J:Y,e.PathScurry=process.platform===`win32`?Z:process.platform===`darwin`?$:Q}),Re=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pattern=void 0;var t=H(),n=e=>e.length>=1,r=e=>e.length>=1,i=Symbol.for(`nodejs.util.inspect.custom`);e.Pattern=class e{#t;#s;#n;length;#r;#h;#S;#w;#c;#o;#f=!0;constructor(e,t,i,a){if(!n(e))throw TypeError(`empty pattern list`);if(!r(t))throw TypeError(`empty glob list`);if(t.length!==e.length)throw TypeError(`mismatched pattern list and glob list lengths`);if(this.length=e.length,i<0||i>=this.length)throw TypeError(`index out of range`);if(this.#t=e,this.#s=t,this.#n=i,this.#r=a,this.#n===0){if(this.isUNC()){let[e,t,n,r,...i]=this.#t,[a,o,s,c,...l]=this.#s;i[0]===``&&(i.shift(),l.shift());let u=[e,t,n,r,``].join(`/`),d=[a,o,s,c,``].join(`/`);this.#t=[u,...i],this.#s=[d,...l],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[e,...t]=this.#t,[n,...r]=this.#s;t[0]===``&&(t.shift(),r.shift());let i=e+`/`,a=n+`/`;this.#t=[i,...t],this.#s=[a,...r],this.length=this.#t.length}}}[i](){return`Pattern <`+this.#s.slice(this.#n).join(`/`)+`>`}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]==`string`}isGlobstar(){return this.#t[this.#n]===t.GLOBSTAR}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#S=this.#S||(this.#n===0?this.isAbsolute()?this.#s[0]+this.#s.slice(1).join(`/`):this.#s.join(`/`):this.#s.slice(this.#n).join(`/`))}hasMore(){return this.length>this.#n+1}rest(){return this.#h===void 0?this.hasMore()?(this.#h=new e(this.#t,this.#s,this.#n+1,this.#r),this.#h.#o=this.#o,this.#h.#c=this.#c,this.#h.#w=this.#w,this.#h):this.#h=null:this.#h}isUNC(){let e=this.#t;return this.#c===void 0?this.#c=this.#r===`win32`&&this.#n===0&&e[0]===``&&e[1]===``&&typeof e[2]==`string`&&!!e[2]&&typeof e[3]==`string`&&!!e[3]:this.#c}isDrive(){let e=this.#t;return this.#w===void 0?this.#w=this.#r===`win32`&&this.#n===0&&this.length>1&&typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]):this.#w}isAbsolute(){let e=this.#t;return this.#o===void 0?this.#o=e[0]===``&&e.length>1||this.isDrive()||this.isUNC():this.#o}root(){let e=this.#t[0];return typeof e==`string`&&this.isAbsolute()&&this.#n===0?e:``}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#f)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#f?!1:(this.#f=!1,!0)}}}),ke=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Ignore=void 0;var t=H(),n=Re(),r=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:i,noglobstar:a,platform:o=r}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:i,noglobstar:a,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let t of e)this.add(t)}add(e){let r=new t.Minimatch(e,this.mmopts);for(let e=0;e<r.set.length;e++){let i=r.set[e],a=r.globParts[e];if(!i||!a)throw Error(`invalid pattern object`);for(;i[0]===`.`&&a[0]===`.`;)i.shift(),a.shift();let o=new n.Pattern(i,a,0,this.platform),s=new t.Minimatch(o.globString(),this.mmopts),c=a[a.length-1]===`**`,l=o.isAbsolute();l?this.absolute.push(s):this.relative.push(s),c&&(l?this.absoluteChildren.push(s):this.relativeChildren.push(s))}}ignored(e){let t=e.fullpath(),n=`${t}/`,r=e.relative()||`.`,i=`${r}/`;for(let e of this.relative)if(e.match(r)||e.match(i))return!0;for(let e of this.absolute)if(e.match(t)||e.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+`/`,n=(e.relative()||`.`)+`/`;for(let e of this.relativeChildren)if(e.match(n))return!0;for(let e of this.absoluteChildren)if(e.match(t))return!0;return!1}}}),Fs=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;var t=H(),n=class e{store;constructor(e=new Map){this.store=e}copy(){return new e(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),r=this.store.get(n);r?r.add(t.globString()):this.store.set(n,new Set([t.globString()]))}};e.HasWalkedCache=n;var r=class{store=new Map;add(e,t,n){let r=(t?2:0)|!!n,i=this.store.get(e);this.store.set(e,i===void 0?r:r&i)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}};e.MatchRecord=r;var i=class{store=new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(e=>e.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw Error(`attempting to walk unknown path`);return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};e.SubWalks=i,e.Processor=class e{hasWalkedCache;matches=new r;subwalks=new i;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new n}processPatterns(e,n){this.patterns=n;let r=n.map(t=>[e,t]);for(let[e,n]of r){this.hasWalkedCache.storeWalked(e,n);let r=n.root(),i=n.isAbsolute()&&this.opts.absolute!==!1;if(r){e=e.resolve(r===`/`&&this.opts.root!==void 0?this.opts.root:r);let t=n.rest();if(t)n=t;else{this.matches.add(e,!0,!1);continue}}if(e.isENOENT())continue;let a,o,s=!1;for(;typeof(a=n.pattern())==`string`&&(o=n.rest());)e=e.resolve(a),n=o,s=!0;if(a=n.pattern(),o=n.rest(),s){if(this.hasWalkedCache.hasWalked(e,n))continue;this.hasWalkedCache.storeWalked(e,n)}if(typeof a==`string`){let t=a===`..`||a===``||a===`.`;this.matches.add(e.resolve(a),i,t);continue}else if(a===t.GLOBSTAR){(!e.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(e,n);let t=o?.pattern(),r=o?.rest();if(!o||(t===``||t===`.`)&&!r)this.matches.add(e,i,t===``||t===`.`);else if(t===`..`){let t=e.parent||e;r?this.hasWalkedCache.hasWalked(t,r)||this.subwalks.add(t,r):this.matches.add(t,i,!0)}}else a instanceof RegExp&&this.subwalks.add(e,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(e,n){let r=this.subwalks.get(e),i=this.child();for(let e of n)for(let n of r){let r=n.isAbsolute(),a=n.pattern(),o=n.rest();a===t.GLOBSTAR?i.testGlobstar(e,n,o,r):a instanceof RegExp?i.testRegExp(e,a,o,r):i.testString(e,a,o,r)}return i}testGlobstar(e,t,n,r){if((this.dot||!e.name.startsWith(`.`))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let t=n.pattern();if(typeof t==`string`&&t!==`..`&&t!==``&&t!==`.`)this.testString(e,t,n.rest(),r);else if(t===`..`){let t=e.parent||e;this.subwalks.add(t,n)}else t instanceof RegExp&&this.testRegExp(e,t,n.rest(),r)}}testRegExp(e,t,n,r){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}testString(e,t,n,r){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}}}),Ls=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;var t=Oe(),n=ke(),r=Fs(),i=(e,t)=>typeof e==`string`?new n.Ignore([e],t):Array.isArray(e)?new n.Ignore(e,t):e,a=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#s;#n;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#n=!n.posix&&n.platform===`win32`?`\\`:`/`,this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#s=i(n.ignore??[],n),!this.includeChildMatches&&typeof this.#s.add!=`function`))throw Error(`cannot ignore child matches, ignore lacks add() method.`);this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener(`abort`,()=>{this.#t.length=0}))}#r(e){return this.seen.has(e)||!!this.#s?.ignored?.(e)}#h(e){return!!this.#s?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#t.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#t.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=await r.realpath();e&&(e.isUnknown()||this.opts.stat)&&await e.lstat()}return this.matchCheckTest(r,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#r(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=r.realpathSync();e&&(e?.isUnknown()||this.opts.stat)&&e.lstatSync()}return this.matchCheckTest(r,t)}matchFinish(e,t){if(this.#r(e))return;if(!this.includeChildMatches&&this.#s?.add){let t=`${e.relativePosix()}/**`;this.#s.add(t)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#n:``;if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+r)}else{let t=this.opts.posix?e.relativePosix():e.relative(),n=this.opts.dotRelative&&!t.startsWith(`..`+this.#n)?`.`+this.#n:``;this.matchEmit(t?n+t+r:`.`+r)}}async match(e,t,n){let r=await this.matchCheck(e,n);r&&this.matchFinish(r,t)}matchSync(e,t,n){let r=this.matchCheckSync(e,n);r&&this.matchFinish(r,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new r.Processor(this.opts),n)}walkCB2(e,t,n,r){if(this.#h(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,n,a):e.readdirCB((t,r)=>this.walkCB3(e,r,n,a),!0)}a()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let[e,t]of n.subwalks.entries())i++,this.walkCB2(e,t,n.child(),a);a()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new r.Processor(this.opts),n)}walkCB2Sync(e,t,n,r){if(this.#h(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirSync();this.walkCB3Sync(e,t,n,a)}a()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let[e,t]of n.subwalks.entries())i++,this.walkCB2Sync(e,t,n.child(),a);a()}};e.GlobUtil=a,e.GlobWalker=class extends a{matches=new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},e.GlobStream=class extends a{results;constructor(e,n,r){super(e,n,r),this.results=new t.Minipass({signal:this.signal,objectMode:!0}),this.results.on(`drain`,()=>this.resume()),this.results.on(`resume`,()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}}),je=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Glob=void 0;var t=H(),n=require(`node:url`),r=Ms(),i=Re(),a=Ls(),o=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Glob=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,a){if(!a)throw TypeError(`glob options required`);if(this.withFileTypes=!!a.withFileTypes,this.signal=a.signal,this.follow=!!a.follow,this.dot=!!a.dot,this.dotRelative=!!a.dotRelative,this.nodir=!!a.nodir,this.mark=!!a.mark,a.cwd?(a.cwd instanceof URL||a.cwd.startsWith(`file://`))&&(a.cwd=(0,n.fileURLToPath)(a.cwd)):this.cwd=``,this.cwd=a.cwd||``,this.root=a.root,this.magicalBraces=!!a.magicalBraces,this.nobrace=!!a.nobrace,this.noext=!!a.noext,this.realpath=!!a.realpath,this.absolute=a.absolute,this.includeChildMatches=a.includeChildMatches!==!1,this.noglobstar=!!a.noglobstar,this.matchBase=!!a.matchBase,this.maxDepth=typeof a.maxDepth==`number`?a.maxDepth:1/0,this.stat=!!a.stat,this.ignore=a.ignore,this.withFileTypes&&this.absolute!==void 0)throw Error(`cannot set absolute and withFileTypes:true`);if(typeof e==`string`&&(e=[e]),this.windowsPathsNoEscape=!!a.windowsPathsNoEscape||a.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(e=>e.replace(/\\/g,`/`))),this.matchBase){if(a.noglobstar)throw TypeError(`base matching requires globstar`);e=e.map(e=>e.includes(`/`)?e:`./**/${e}`)}if(this.pattern=e,this.platform=a.platform||o,this.opts={...a,platform:this.platform},a.scurry){if(this.scurry=a.scurry,a.nocase!==void 0&&a.nocase!==a.scurry.nocase)throw Error(`nocase option contradicts provided scurry option`)}else this.scurry=new(a.platform===`win32`?r.PathScurryWin32:a.platform===`darwin`?r.PathScurryDarwin:a.platform?r.PathScurryPosix:r.PathScurry)(this.cwd,{nocase:a.nocase,fs:a.fs});this.nocase=this.scurry.nocase;let s=this.platform===`darwin`||this.platform===`win32`,c={braceExpandMax:1e4,...a,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},[l,u]=this.pattern.map(e=>new t.Minimatch(e,c)).reduce((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e),[[],[]]);this.patterns=l.map((e,t)=>{let n=u[t];if(!n)throw Error(`invalid pattern object`);return new i.Pattern(e,n,0,this.platform)})}async walk(){return[...await new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}}),Ne=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hasMagic=void 0;var t=H();e.hasMagic=(e,n={})=>{Array.isArray(e)||(e=[e]);for(let r of e)if(new t.Minimatch(r,n).hasMagic())return!0;return!1}});Object.defineProperty(exports,`__esModule`,{value:!0}),exports.glob=exports.sync=exports.iterate=exports.iterateSync=exports.stream=exports.streamSync=exports.Ignore=exports.hasMagic=exports.Glob=exports.unescape=exports.escape=void 0,exports.globStreamSync=xt,exports.globStream=Le,exports.globSync=We,exports.globIterateSync=Tt,exports.globIterate=Be;var Ws=H(),tt=je(),Br=Ne(),Is=H();Object.defineProperty(exports,`escape`,{enumerable:!0,get:function(){return Is.escape}}),Object.defineProperty(exports,`unescape`,{enumerable:!0,get:function(){return Is.unescape}});var Ir=je();Object.defineProperty(exports,`Glob`,{enumerable:!0,get:function(){return Ir.Glob}});var Gr=Ne();Object.defineProperty(exports,`hasMagic`,{enumerable:!0,get:function(){return Gr.hasMagic}});var zr=ke();Object.defineProperty(exports,`Ignore`,{enumerable:!0,get:function(){return zr.Ignore}});function xt(e,t={}){return new tt.Glob(e,t).streamSync()}function Le(e,t={}){return new tt.Glob(e,t).stream()}function We(e,t={}){return new tt.Glob(e,t).walkSync()}async function Bs(e,t={}){return new tt.Glob(e,t).walk()}function Tt(e,t={}){return new tt.Glob(e,t).iterateSync()}function Be(e,t={}){return new tt.Glob(e,t).iterate()}exports.streamSync=xt,exports.stream=Object.assign(Le,{sync:xt}),exports.iterateSync=Tt,exports.iterate=Object.assign(Be,{sync:Tt}),exports.sync=Object.assign(We,{stream:xt,iterate:Tt}),exports.glob=Object.assign(Bs,{glob:Bs,globSync:We,sync:exports.sync,globStream:Le,stream:exports.stream,globStreamSync:xt,streamSync:exports.streamSync,globIterate:Be,iterate:exports.iterate,globIterateSync:Tt,iterateSync:exports.iterateSync,Glob:tt.Glob,hasMagic:Br.hasMagic,escape:Ws.escape,unescape:Ws.unescape}),exports.glob.glob=exports.glob;
3
+ >>> no match, partial?`,t,f,n,p),f===c))}let a;if(typeof u==`string`?(a=d===u,this.debug(`string match`,u,d,a)):(a=u.test(d),this.debug(`pattern match`,u,d,a)),!a)return!1}if(o===c&&s===l)return!0;if(o===c)return r;if(s===l)return o===c-1&&t[o]===``;throw Error(`wtf?`)}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(t){(0,i.assertValidPattern)(t);let n=this.options;if(t===`**`)return e.GLOBSTAR;if(t===``)return``;let r,a=null;(r=t.match(x))?a=n.dot?C:S:(r=t.match(d))?a=(n.nocase?n.dot?h:m:n.dot?p:f)(r[1]):(r=t.match(w))?a=(n.nocase?n.dot?E:T:n.dot?D:O)(r):(r=t.match(g))?a=n.dot?v:_:(r=t.match(y))&&(a=b);let o=c.AST.fromGlob(t,this.options).toMMPattern();return a&&typeof o==`object`&&Reflect.defineProperty(o,`test`,{value:a}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?N:n.dot?P:F,i=new Set(n.nocase?[`i`]:[]),a=t.map(t=>{let n=t.map(t=>{if(t instanceof RegExp)for(let e of t.flags.split(``))i.add(e);return typeof t==`string`?z(t):t===e.GLOBSTAR?e.GLOBSTAR:t._src});n.forEach((t,i)=>{let a=n[i+1],o=n[i-1];t!==e.GLOBSTAR||o===e.GLOBSTAR||(o===void 0?a!==void 0&&a!==e.GLOBSTAR?n[i+1]=`(?:\\/|`+r+`\\/)?`+a:n[i]=r:a===void 0?n[i-1]=o+`(?:\\/|\\/`+r+`)?`:a!==e.GLOBSTAR&&(n[i-1]=o+`(?:\\/|\\/`+r+`\\/)`+a,n[i+1]=e.GLOBSTAR))});let a=n.filter(t=>t!==e.GLOBSTAR);if(this.partial&&a.length>=1){let e=[];for(let t=1;t<=a.length;t++)e.push(a.slice(0,t).join(`/`));return`(?:`+e.join(`|`)+`)`}return a.join(`/`)}).join(`|`),[o,s]=t.length>1?[`(?:`,`)`]:[``,``];a=`^`+o+a+s+`$`,this.partial&&(a=`^(?:\\/|`+o+a.slice(1,-1)+s+`)$`),this.negate&&(a=`^(?!`+a+`).+$`);try{this.regexp=new RegExp(a,[...i].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^\/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e=0;e<i.length;e++){let o=i[e],s=r;if(n.matchBase&&o.length===1&&(s=[a]),this.matchOne(s,o,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(t){return e.minimatch.defaults(t).Minimatch}};e.Minimatch=B;var V=pe();Object.defineProperty(e,`AST`,{enumerable:!0,get:function(){return V.AST}});var U=me();Object.defineProperty(e,`escape`,{enumerable:!0,get:function(){return U.escape}});var W=kt();Object.defineProperty(e,`unescape`,{enumerable:!0,get:function(){return W.unescape}}),e.minimatch.AST=c.AST,e.minimatch.Minimatch=B,e.minimatch.escape=l.escape,e.minimatch.unescape=u.unescape}),fs=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LRUCache=void 0;var t=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,n=new Set,r=typeof process==`object`&&process?process:{},i=(e,t,n,i)=>{typeof r.emitWarning==`function`?r.emitWarning(e,t,n,i):console.error(`[${n}] ${t}: ${e}`)},a=globalThis.AbortController,o=globalThis.AbortSignal;if(typeof a>`u`){o=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},a=class{constructor(){t()}signal=new o;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e=r.env?.LRU_CACHE_IGNORE_AC_WARNING!==`1`,t=()=>{e&&(e=!1,i("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.",`NO_ABORT_CONTROLLER`,`ENOTSUP`,t))}}var s=e=>!n.has(e),c=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),l=e=>c(e)?e<=2**8?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?u:null:null,u=class extends Array{constructor(e){super(e),this.fill(0)}},d=class e{heap;length;static#t=!1;static create(t){let n=l(t);if(!n)return[];e.#t=!0;let r=new e(t,n);return e.#t=!1,r}constructor(t,n){if(!e.#t)throw TypeError(`instantiate Stack using Stack.create(n)`);this.heap=new n(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};e.LRUCache=class e{#t;#s;#n;#r;#h;#S;#w;#c;get perf(){return this.#c}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#f;#u;#a;#i;#d;#v;#y;#p;#R;#m;#O;#x;#g;#b;#E;#T;#e;#F;static unsafeExposeInternals(e){return{starts:e.#x,ttls:e.#g,autopurgeTimers:e.#b,sizes:e.#O,keyMap:e.#u,keyList:e.#a,valList:e.#i,next:e.#d,prev:e.#v,get head(){return e.#y},get tail(){return e.#p},free:e.#R,isBackgroundFetch:t=>e.#l(t),backgroundFetch:(t,n,r,i)=>e.#z(t,n,r,i),moveToTail:t=>e.#N(t),indexes:t=>e.#k(t),rindexes:t=>e.#M(t),isStale:t=>e.#_(t)}}get max(){return this.#t}get maxSize(){return this.#s}get calculatedSize(){return this.#f}get size(){return this.#o}get fetchMethod(){return this.#S}get memoMethod(){return this.#w}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#h}constructor(r){let{max:a=0,ttl:o,ttlResolution:u=1,ttlAutopurge:f,updateAgeOnGet:p,updateAgeOnHas:m,allowStale:h,dispose:g,onInsert:_,disposeAfter:v,noDisposeOnSet:y,noUpdateTTL:b,maxSize:x=0,maxEntrySize:S=0,sizeCalculation:C,fetchMethod:w,memoMethod:T,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:O,allowStaleOnFetchAbort:k,ignoreFetchAbort:A,perf:j}=r;if(j!==void 0&&typeof j?.now!=`function`)throw TypeError(`perf option must have a now() method if specified`);if(this.#c=j??t,a!==0&&!c(a))throw TypeError(`max option must be a nonnegative integer`);let M=a?l(a):Array;if(!M)throw Error(`invalid max value: `+a);if(this.#t=a,this.#s=x,this.maxEntrySize=S||this.#s,this.sizeCalculation=C,this.sizeCalculation){if(!this.#s&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(T!==void 0&&typeof T!=`function`)throw TypeError(`memoMethod must be a function if defined`);if(this.#w=T,w!==void 0&&typeof w!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(this.#S=w,this.#T=!!w,this.#u=new Map,this.#a=Array(a).fill(void 0),this.#i=Array(a).fill(void 0),this.#d=new M(a),this.#v=new M(a),this.#y=0,this.#p=0,this.#R=d.create(a),this.#o=0,this.#f=0,typeof g==`function`&&(this.#n=g),typeof _==`function`&&(this.#r=_),typeof v==`function`?(this.#h=v,this.#m=[]):(this.#h=void 0,this.#m=void 0),this.#E=!!this.#n,this.#F=!!this.#r,this.#e=!!this.#h,this.noDisposeOnSet=!!y,this.noUpdateTTL=!!b,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!O,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#s!==0&&!c(this.#s))throw TypeError(`maxSize must be a positive integer if specified`);if(!c(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);this.#$()}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!p,this.updateAgeOnHas=!!m,this.ttlResolution=c(u)||u===0?u:1,this.ttlAutopurge=!!f,this.ttl=o||0,this.ttl){if(!c(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);this.#P()}if(this.#t===0&&this.ttl===0&&this.#s===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!this.#t&&!this.#s){let t=`LRU_CACHE_UNBOUNDED`;s(t)&&(n.add(t),i(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,t,e))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#P(){let e=new u(this.#t),t=new u(this.#t);this.#g=e,this.#x=t;let n=this.ttlAutopurge?Array(this.#t):void 0;this.#b=n,this.#W=(r,i,a=this.#c.now())=>{if(t[r]=i===0?0:a,e[r]=i,n?.[r]&&(clearTimeout(n[r]),n[r]=void 0),i!==0&&n){let e=setTimeout(()=>{this.#_(r)&&this.#A(this.#a[r],`expire`)},i+1);e.unref&&e.unref(),n[r]=e}},this.#C=n=>{t[n]=e[n]===0?0:this.#c.now()},this.#D=(n,a)=>{if(e[a]){let o=e[a],s=t[a];if(!o||!s)return;n.ttl=o,n.start=s,n.now=r||i(),n.remainingTTL=o-(n.now-s)}};let r=0,i=()=>{let e=this.#c.now();if(this.ttlResolution>0){r=e;let t=setTimeout(()=>r=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=n=>{let a=this.#u.get(n);if(a===void 0)return 0;let o=e[a],s=t[a];return!o||!s?1/0:o-((r||i())-s)},this.#_=n=>{let a=t[n],o=e[n];return!!o&&!!a&&(r||i())-a>o}}#C=()=>{};#D=()=>{};#W=()=>{};#_=()=>!1;#$(){let e=new u(this.#t);this.#f=0,this.#O=e,this.#L=t=>{this.#f-=e[t],e[t]=0},this.#B=(e,t,n,r)=>{if(this.#l(t))return 0;if(!c(n))if(r){if(typeof r!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=r(t,e),!c(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`);return n},this.#j=(t,n,r)=>{if(e[t]=n,this.#s){let n=this.#s-e[t];for(;this.#f>n;)this.#G(!0)}this.#f+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#f)}}#L=e=>{};#j=(e,t,n)=>{};#B=(e,t,n,r)=>{if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`);return 0};*#k({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#p;!(!this.#I(t)||((e||!this.#_(t))&&(yield t),t===this.#y));)t=this.#v[t]}*#M({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#y;!(!this.#I(t)||((e||!this.#_(t))&&(yield t),t===this.#p));)t=this.#d[t]}#I(e){return e!==void 0&&this.#u.get(this.#a[e])===e}*entries(){for(let e of this.#k())this.#i[e]!==void 0&&this.#a[e]!==void 0&&!this.#l(this.#i[e])&&(yield[this.#a[e],this.#i[e]])}*rentries(){for(let e of this.#M())this.#i[e]!==void 0&&this.#a[e]!==void 0&&!this.#l(this.#i[e])&&(yield[this.#a[e],this.#i[e]])}*keys(){for(let e of this.#k()){let t=this.#a[e];t!==void 0&&!this.#l(this.#i[e])&&(yield t)}}*rkeys(){for(let e of this.#M()){let t=this.#a[e];t!==void 0&&!this.#l(this.#i[e])&&(yield t)}}*values(){for(let e of this.#k())this.#i[e]!==void 0&&!this.#l(this.#i[e])&&(yield this.#i[e])}*rvalues(){for(let e of this.#M())this.#i[e]!==void 0&&!this.#l(this.#i[e])&&(yield this.#i[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]=`LRUCache`;find(e,t={}){for(let n of this.#k()){let r=this.#i[n],i=this.#l(r)?r.__staleWhileFetching:r;if(i!==void 0&&e(i,this.#a[n],this))return this.get(this.#a[n],t)}}forEach(e,t=this){for(let n of this.#k()){let r=this.#i[n],i=this.#l(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#a[n],this)}}rforEach(e,t=this){for(let n of this.#M()){let r=this.#i[n],i=this.#l(r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,this.#a[n],this)}}purgeStale(){let e=!1;for(let t of this.#M({allowStale:!0}))this.#_(t)&&(this.#A(this.#a[t],`expire`),e=!0);return e}info(e){let t=this.#u.get(e);if(t===void 0)return;let n=this.#i[t],r=this.#l(n)?n.__staleWhileFetching:n;if(r===void 0)return;let i={value:r};if(this.#g&&this.#x){let e=this.#g[t],n=this.#x[t];e&&n&&(i.ttl=e-(this.#c.now()-n),i.start=Date.now())}return this.#O&&(i.size=this.#O[t]),i}dump(){let e=[];for(let t of this.#k({allowStale:!0})){let n=this.#a[t],r=this.#i[t],i=this.#l(r)?r.__staleWhileFetching:r;if(i===void 0||n===void 0)continue;let a={value:i};if(this.#g&&this.#x){a.ttl=this.#g[t];let e=this.#c.now()-this.#x[t];a.start=Math.floor(Date.now()-e)}this.#O&&(a.size=this.#O[t]),e.unshift([n,a])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let e=Date.now()-n.start;n.start=this.#c.now()-e}this.set(t,n.value,n)}}set(e,t,n={}){if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:s}=n,{noUpdateTTL:c=this.noUpdateTTL}=n,l=this.#B(e,t,n.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize)return s&&(s.set=`miss`,s.maxEntrySizeExceeded=!0),this.#A(e,`set`),this;let u=this.#o===0?void 0:this.#u.get(e);if(u===void 0)u=this.#o===0?this.#p:this.#R.length===0?this.#o===this.#t?this.#G(!1):this.#o:this.#R.pop(),this.#a[u]=e,this.#i[u]=t,this.#u.set(e,u),this.#d[this.#p]=u,this.#v[u]=this.#p,this.#p=u,this.#o++,this.#j(u,l,s),s&&(s.set=`add`),c=!1,this.#F&&this.#r?.(t,e,`add`);else{this.#N(u);let n=this.#i[u];if(t!==n){if(this.#T&&this.#l(n)){n.__abortController.abort(Error(`replaced`));let{__staleWhileFetching:t}=n;t!==void 0&&!a&&(this.#E&&this.#n?.(t,e,`set`),this.#e&&this.#m?.push([t,e,`set`]))}else a||(this.#E&&this.#n?.(n,e,`set`),this.#e&&this.#m?.push([n,e,`set`]));if(this.#L(u),this.#j(u,l,s),this.#i[u]=t,s){s.set=`replace`;let e=n&&this.#l(n)?n.__staleWhileFetching:n;e!==void 0&&(s.oldValue=e)}}else s&&(s.set=`update`);this.#F&&this.onInsert?.(t,e,t===n?`update`:`replace`)}if(r!==0&&!this.#g&&this.#P(),this.#g&&(c||this.#W(u,r,i),s&&this.#D(s,u)),!a&&this.#e&&this.#m){let e=this.#m,t;for(;t=e?.shift();)this.#h?.(...t)}return this}pop(){try{for(;this.#o;){let e=this.#i[this.#y];if(this.#G(!0),this.#l(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#e&&this.#m){let e=this.#m,t;for(;t=e?.shift();)this.#h?.(...t)}}}#G(e){let t=this.#y,n=this.#a[t],r=this.#i[t];return this.#T&&this.#l(r)?r.__abortController.abort(Error(`evicted`)):(this.#E||this.#e)&&(this.#E&&this.#n?.(r,n,`evict`),this.#e&&this.#m?.push([r,n,`evict`])),this.#L(t),this.#b?.[t]&&(clearTimeout(this.#b[t]),this.#b[t]=void 0),e&&(this.#a[t]=void 0,this.#i[t]=void 0,this.#R.push(t)),this.#o===1?(this.#y=this.#p=0,this.#R.length=0):this.#y=this.#d[t],this.#u.delete(n),this.#o--,t}has(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=this.#u.get(e);if(i!==void 0){let e=this.#i[i];if(this.#l(e)&&e.__staleWhileFetching===void 0)return!1;if(this.#_(i))r&&(r.has=`stale`,this.#D(r,i));else return n&&this.#C(i),r&&(r.has=`hit`,this.#D(r,i)),!0}else r&&(r.has=`miss`);return!1}peek(e,t={}){let{allowStale:n=this.allowStale}=t,r=this.#u.get(e);if(r===void 0||!n&&this.#_(r))return;let i=this.#i[r];return this.#l(i)?i.__staleWhileFetching:i}#z(e,t,n,r){let i=t===void 0?void 0:this.#i[t];if(this.#l(i))return i;let o=new a,{signal:s}=n;s?.addEventListener(`abort`,()=>o.abort(s.reason),{signal:o.signal});let c={signal:o.signal,options:n,context:r},l=(r,i=!1)=>{let{aborted:a}=o.signal,s=n.ignoreFetchAbort&&r!==void 0,l=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&r!==void 0);if(n.status&&(a&&!i?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,s&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),a&&!s&&!i)return d(o.signal.reason,l);let u=p,f=this.#i[t];return(f===p||s&&i&&f===void 0)&&(r===void 0?u.__staleWhileFetching===void 0?this.#A(e,`fetch`):this.#i[t]=u.__staleWhileFetching:(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,c.options))),r},u=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),d(e,!1)),d=(r,i)=>{let{aborted:a}=o.signal,s=a&&n.allowStaleOnFetchAbort,c=s||n.allowStaleOnFetchRejection,l=c||n.noDeleteOnFetchRejection,u=p;if(this.#i[t]===p&&(!l||!i&&u.__staleWhileFetching===void 0?this.#A(e,`fetch`):s||(this.#i[t]=u.__staleWhileFetching)),c)return n.status&&u.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw r},f=(t,r)=>{let a=this.#S?.(e,i,c);a&&a instanceof Promise&&a.then(e=>t(e===void 0?void 0:e),r),o.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))})};n.status&&(n.status.fetchDispatched=!0);let p=new Promise(f).then(l,u),m=Object.assign(p,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return t===void 0?(this.set(e,m,{...c.options,status:void 0}),t=this.#u.get(e)):this.#i[t]=m,m}#l(e){if(!this.#T)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty(`__staleWhileFetching`)&&t.__abortController instanceof a}async fetch(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:h=!1,status:g,signal:_}=t;if(!this.#T)return g&&(g.fetch=`get`),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:g});let v={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:s,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:p,ignoreFetchAbort:f,status:g,signal:_},y=this.#u.get(e);if(y===void 0){g&&(g.fetch=`miss`);let t=this.#z(e,y,v,m);return t.__returned=t}else{let t=this.#i[y];if(this.#l(t)){let e=n&&t.__staleWhileFetching!==void 0;return g&&(g.fetch=`inflight`,e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=this.#_(y);if(!h&&!i)return g&&(g.fetch=`hit`),this.#N(y),r&&this.#C(y),g&&this.#D(g,y),t;let a=this.#z(e,y,v,m),o=a.__staleWhileFetching!==void 0&&n;return g&&(g.fetch=i?`stale`:`refresh`,o&&i&&(g.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}async forceFetch(e,t={}){let n=await this.fetch(e,t);if(n===void 0)throw Error(`fetch() returned undefined`);return n}memo(e,t={}){let n=this.#w;if(!n)throw Error(`no memoMethod provided to constructor`);let{context:r,forceRefresh:i,...a}=t,o=this.get(e,a);if(!i&&o!==void 0)return o;let s=n(e,o,{options:a,context:r});return this.set(e,s,a),s}get(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=this.#u.get(e);if(o!==void 0){let t=this.#i[o],s=this.#l(t);return a&&this.#D(a,o),this.#_(o)?(a&&(a.get=`stale`),s?(a&&n&&t.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?t.__staleWhileFetching:void 0):(i||this.#A(e,`expire`),a&&n&&(a.returnedStale=!0),n?t:void 0)):(a&&(a.get=`hit`),s?t.__staleWhileFetching:(this.#N(o),r&&this.#C(o),t))}else a&&(a.get=`miss`)}#U(e,t){this.#v[t]=e,this.#d[e]=t}#N(e){e!==this.#p&&(e===this.#y?this.#y=this.#d[e]:this.#U(this.#v[e],this.#d[e]),this.#U(this.#p,e),this.#p=e)}delete(e){return this.#A(e,`delete`)}#A(e,t){let n=!1;if(this.#o!==0){let r=this.#u.get(e);if(r!==void 0)if(this.#b?.[r]&&(clearTimeout(this.#b?.[r]),this.#b[r]=void 0),n=!0,this.#o===1)this.#q(t);else{this.#L(r);let n=this.#i[r];if(this.#l(n)?n.__abortController.abort(Error(`deleted`)):(this.#E||this.#e)&&(this.#E&&this.#n?.(n,e,t),this.#e&&this.#m?.push([n,e,t])),this.#u.delete(e),this.#a[r]=void 0,this.#i[r]=void 0,r===this.#p)this.#p=this.#v[r];else if(r===this.#y)this.#y=this.#d[r];else{let e=this.#v[r];this.#d[e]=this.#d[r];let t=this.#d[r];this.#v[t]=this.#v[r]}this.#o--,this.#R.push(r)}}if(this.#e&&this.#m?.length){let e=this.#m,t;for(;t=e?.shift();)this.#h?.(...t)}return n}clear(){return this.#q(`delete`)}#q(e){for(let t of this.#M({allowStale:!0})){let n=this.#i[t];if(this.#l(n))n.__abortController.abort(Error(`deleted`));else{let r=this.#a[t];this.#E&&this.#n?.(n,r,e),this.#e&&this.#m?.push([n,r,e])}}if(this.#u.clear(),this.#i.fill(void 0),this.#a.fill(void 0),this.#g&&this.#x){this.#g.fill(0),this.#x.fill(0);for(let e of this.#b??[])e!==void 0&&clearTimeout(e);this.#b?.fill(void 0)}if(this.#O&&this.#O.fill(0),this.#y=0,this.#p=0,this.#R.length=0,this.#f=0,this.#o=0,this.#e&&this.#m){let e=this.#m,t;for(;t=e?.shift();)this.#h?.(...t)}}}}),Oe=R(e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;var n=typeof process==`object`&&process?process:{stdout:null,stderr:null},r=require(`node:events`),i=t(require(`node:stream`)),a=require(`node:string_decoder`);e.isStream=t=>!!t&&typeof t==`object`&&(t instanceof J||t instanceof i.default||(0,e.isReadable)(t)||(0,e.isWritable)(t)),e.isReadable=e=>!!e&&typeof e==`object`&&e instanceof r.EventEmitter&&typeof e.pipe==`function`&&e.pipe!==i.default.Writable.prototype.pipe,e.isWritable=e=>!!e&&typeof e==`object`&&e instanceof r.EventEmitter&&typeof e.write==`function`&&typeof e.end==`function`;var o=Symbol(`EOF`),s=Symbol(`maybeEmitEnd`),c=Symbol(`emittedEnd`),l=Symbol(`emittingEnd`),u=Symbol(`emittedError`),d=Symbol(`closed`),f=Symbol(`read`),p=Symbol(`flush`),m=Symbol(`flushChunk`),h=Symbol(`encoding`),g=Symbol(`decoder`),_=Symbol(`flowing`),v=Symbol(`paused`),y=Symbol(`resume`),b=Symbol(`buffer`),x=Symbol(`pipes`),S=Symbol(`bufferLength`),C=Symbol(`bufferPush`),w=Symbol(`bufferShift`),T=Symbol(`objectMode`),E=Symbol(`destroyed`),D=Symbol(`error`),O=Symbol(`emitData`),k=Symbol(`emitEnd`),A=Symbol(`emitEnd2`),j=Symbol(`async`),M=Symbol(`abort`),N=Symbol(`aborted`),P=Symbol(`signal`),F=Symbol(`dataListeners`),I=Symbol(`discarded`),L=e=>Promise.resolve().then(e),z=e=>e(),B=e=>e===`end`||e===`finish`||e===`prefinish`,V=e=>e instanceof ArrayBuffer||!!e&&typeof e==`object`&&e.constructor&&e.constructor.name===`ArrayBuffer`&&e.byteLength>=0,U=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e),W=class{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[y](),this.dest.on(`drain`,this.ondrain)}unpipe(){this.dest.removeListener(`drain`,this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},G=class extends W{unpipe(){this.src.removeListener(`error`,this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>this.dest.emit(`error`,e),e.on(`error`,this.proxyErrors)}},K=e=>!!e.objectMode,q=e=>!e.objectMode&&!!e.encoding&&e.encoding!==`buffer`,J=class extends r.EventEmitter{[_]=!1;[v]=!1;[x]=[];[b]=[];[T];[h];[j];[g];[o]=!1;[c]=!1;[l]=!1;[d]=!1;[u]=null;[S]=0;[E]=!1;[P];[N]=!1;[F]=0;[I]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding==`string`)throw TypeError(`Encoding and objectMode may not be used together`);K(t)?(this[T]=!0,this[h]=null):q(t)?(this[h]=t.encoding,this[T]=!1):(this[T]=!1,this[h]=null),this[j]=!!t.async,this[g]=this[h]?new a.StringDecoder(this[h]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,`buffer`,{get:()=>this[b]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,`pipes`,{get:()=>this[x]});let{signal:n}=t;n&&(this[P]=n,n.aborted?this[M]():n.addEventListener(`abort`,()=>this[M]()))}get bufferLength(){return this[S]}get encoding(){return this[h]}set encoding(e){throw Error(`Encoding must be set at instantiation time`)}setEncoding(e){throw Error(`Encoding must be set at instantiation time`)}get objectMode(){return this[T]}set objectMode(e){throw Error(`objectMode must be set at instantiation time`)}get async(){return this[j]}set async(e){this[j]=this[j]||!!e}[M](){this[N]=!0,this.emit(`abort`,this[P]?.reason),this.destroy(this[P]?.reason)}get aborted(){return this[N]}set aborted(e){}write(e,t,n){if(this[N])return!1;if(this[o])throw Error(`write after end`);if(this[E])return this.emit(`error`,Object.assign(Error(`Cannot call write after a stream was destroyed`),{code:`ERR_STREAM_DESTROYED`})),!0;typeof t==`function`&&(n=t,t=`utf8`),t||=`utf8`;let r=this[j]?L:z;if(!this[T]&&!Buffer.isBuffer(e)){if(U(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(V(e))e=Buffer.from(e);else if(typeof e!=`string`)throw Error(`Non-contiguous data written to non-objectMode stream`)}return this[T]?(this[_]&&this[S]!==0&&this[p](!0),this[_]?this.emit(`data`,e):this[C](e),this[S]!==0&&this.emit(`readable`),n&&r(n),this[_]):e.length?(typeof e==`string`&&!(t===this[h]&&!this[g]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[h]&&(e=this[g].write(e)),this[_]&&this[S]!==0&&this[p](!0),this[_]?this.emit(`data`,e):this[C](e),this[S]!==0&&this.emit(`readable`),n&&r(n),this[_]):(this[S]!==0&&this.emit(`readable`),n&&r(n),this[_])}read(e){if(this[E])return null;if(this[I]=!1,this[S]===0||e===0||e&&e>this[S])return this[s](),null;this[T]&&(e=null),this[b].length>1&&!this[T]&&(this[b]=[this[h]?this[b].join(``):Buffer.concat(this[b],this[S])]);let t=this[f](e||null,this[b][0]);return this[s](),t}[f](e,t){if(this[T])this[w]();else{let n=t;e===n.length||e===null?this[w]():typeof n==`string`?(this[b][0]=n.slice(e),t=n.slice(0,e),this[S]-=e):(this[b][0]=n.subarray(e),t=n.subarray(0,e),this[S]-=e)}return this.emit(`data`,t),!this[b].length&&!this[o]&&this.emit(`drain`),t}end(e,t,n){return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=`utf8`),e!==void 0&&this.write(e,t),n&&this.once(`end`,n),this[o]=!0,this.writable=!1,(this[_]||!this[v])&&this[s](),this}[y](){this[E]||(!this[F]&&!this[x].length&&(this[I]=!0),this[v]=!1,this[_]=!0,this.emit(`resume`),this[b].length?this[p]():this[o]?this[s]():this.emit(`drain`))}resume(){return this[y]()}pause(){this[_]=!1,this[v]=!0,this[I]=!1}get destroyed(){return this[E]}get flowing(){return this[_]}get paused(){return this[v]}[C](e){this[T]?this[S]+=1:this[S]+=e.length,this[b].push(e)}[w](){return this[T]?--this[S]:this[S]-=this[b][0].length,this[b].shift()}[p](e=!1){do;while(this[m](this[w]())&&this[b].length);!e&&!this[b].length&&!this[o]&&this.emit(`drain`)}[m](e){return this.emit(`data`,e),this[_]}pipe(e,t){if(this[E])return e;this[I]=!1;let r=this[c];return t||={},e===n.stdout||e===n.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,r?t.end&&e.end():(this[x].push(t.proxyErrors?new G(this,e,t):new W(this,e,t)),this[j]?L(()=>this[y]()):this[y]()),e}unpipe(e){let t=this[x].find(t=>t.dest===e);t&&(this[x].length===1?(this[_]&&this[F]===0&&(this[_]=!1),this[x]=[]):this[x].splice(this[x].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e===`data`)this[I]=!1,this[F]++,!this[x].length&&!this[_]&&this[y]();else if(e===`readable`&&this[S]!==0)super.emit(`readable`);else if(B(e)&&this[c])super.emit(e),this.removeAllListeners(e);else if(e===`error`&&this[u]){let e=t;this[j]?L(()=>e.call(this,this[u])):e.call(this,this[u])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e===`data`&&(this[F]=this.listeners(`data`).length,this[F]===0&&!this[I]&&!this[x].length&&(this[_]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e===`data`||e===void 0)&&(this[F]=0,!this[I]&&!this[x].length&&(this[_]=!1)),t}get emittedEnd(){return this[c]}[s](){!this[l]&&!this[c]&&!this[E]&&this[b].length===0&&this[o]&&(this[l]=!0,this.emit(`end`),this.emit(`prefinish`),this.emit(`finish`),this[d]&&this.emit(`close`),this[l]=!1)}emit(e,...t){let n=t[0];if(e!==`error`&&e!==`close`&&e!==E&&this[E])return!1;if(e===`data`)return!this[T]&&!n?!1:this[j]?(L(()=>this[O](n)),!0):this[O](n);if(e===`end`)return this[k]();if(e===`close`){if(this[d]=!0,!this[c]&&!this[E])return!1;let e=super.emit(`close`);return this.removeAllListeners(`close`),e}else if(e===`error`){this[u]=n,super.emit(D,n);let e=!this[P]||this.listeners(`error`).length?super.emit(`error`,n):!1;return this[s](),e}else if(e===`resume`){let e=super.emit(`resume`);return this[s](),e}else if(e===`finish`||e===`prefinish`){let t=super.emit(e);return this.removeAllListeners(e),t}let r=super.emit(e,...t);return this[s](),r}[O](e){for(let t of this[x])t.dest.write(e)===!1&&this.pause();let t=this[I]?!1:super.emit(`data`,e);return this[s](),t}[k](){return this[c]?!1:(this[c]=!0,this.readable=!1,this[j]?(L(()=>this[A]()),!0):this[A]())}[A](){if(this[g]){let e=this[g].end();if(e){for(let t of this[x])t.dest.write(e);this[I]||super.emit(`data`,e)}}for(let e of this[x])e.end();let e=super.emit(`end`);return this.removeAllListeners(`end`),e}async collect(){let e=Object.assign([],{dataLength:0});this[T]||(e.dataLength=0);let t=this.promise();return this.on(`data`,t=>{e.push(t),this[T]||(e.dataLength+=t.length)}),await t,e}async concat(){if(this[T])throw Error(`cannot concat in objectMode`);let e=await this.collect();return this[h]?e.join(``):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(E,()=>t(Error(`stream destroyed`))),this.on(`error`,e=>t(e)),this.on(`end`,()=>e())})}[Symbol.asyncIterator](){this[I]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[o])return t();let r,i,a=e=>{this.off(`data`,s),this.off(`end`,c),this.off(E,l),t(),i(e)},s=e=>{this.off(`error`,a),this.off(`end`,c),this.off(E,l),this.pause(),r({value:e,done:!!this[o]})},c=()=>{this.off(`error`,a),this.off(`data`,s),this.off(E,l),t(),r({done:!0,value:void 0})},l=()=>a(Error(`stream destroyed`));return new Promise((e,t)=>{i=t,r=e,this.once(E,l),this.once(`error`,a),this.once(`end`,c),this.once(`data`,s)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[I]=!1;let e=!1,t=()=>(this.pause(),this.off(D,t),this.off(E,t),this.off(`end`,t),e=!0,{done:!0,value:void 0});return this.once(`end`,t),this.once(D,t),this.once(E,t),{next:()=>{if(e)return t();let n=this.read();return n===null?t():{done:!1,value:n}},throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[E])return e?this.emit(`error`,e):this.emit(E),this;this[E]=!0,this[I]=!0,this[b].length=0,this[S]=0;let t=this;return typeof t.close==`function`&&!this[d]&&t.close(),e?this.emit(`error`,e):this.emit(E),this}static get isStream(){return e.isStream}};e.Minipass=J}),Ms=R(e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r};Object.defineProperty(e,`__esModule`,{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;var i=fs(),a=require(`node:path`),o=require(`node:url`),s=require(`fs`),c=r(require(`node:fs`)),d=s.realpathSync.native,f=require(`node:fs/promises`),p=Oe(),m={lstatSync:s.lstatSync,readdir:s.readdir,readdirSync:s.readdirSync,readlinkSync:s.readlinkSync,realpathSync:d,promises:{lstat:f.lstat,readdir:f.readdir,readlink:f.readlink,realpath:f.realpath}},h=e=>!e||e===m||e===c?m:{...m,...e,promises:{...m.promises,...e.promises||{}}},g=/^\\\\\?\\([a-z]:)\\?$/i,_=e=>e.replace(/\//g,`\\`).replace(g,`$1\\`),v=/[\\\/]/,y=0,b=1,x=2,S=4,C=6,w=8,T=10,E=12,D=15,O=~D,k=16,A=32,j=64,M=128,N=256,P=512,F=j|M|P,I=1023,L=e=>e.isFile()?w:e.isDirectory()?S:e.isSymbolicLink()?T:e.isCharacterDevice()?x:e.isBlockDevice()?C:e.isSocket()?E:e.isFIFO()?b:y,z=new i.LRUCache({max:2**12}),B=e=>{let t=z.get(e);if(t)return t;let n=e.normalize(`NFKD`);return z.set(e,n),n},V=new i.LRUCache({max:2**12}),U=e=>{let t=V.get(e);if(t)return t;let n=B(e.toLowerCase());return V.set(e,n),n},W=class extends i.LRUCache{constructor(){super({max:256})}};e.ResolveCache=W;var G=class extends i.LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:e=>e.length+1})}};e.ChildrenCache=G;var K=Symbol(`PathScurry setAsCwd`),q=class{name;root;roots;parent;nocase;isCWD=!1;#t;#s;get dev(){return this.#s}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#h;get uid(){return this.#h}#S;get gid(){return this.#S}#w;get rdev(){return this.#w}#c;get blksize(){return this.#c}#o;get ino(){return this.#o}#f;get size(){return this.#f}#u;get blocks(){return this.#u}#a;get atimeMs(){return this.#a}#i;get mtimeMs(){return this.#i}#d;get ctimeMs(){return this.#d}#v;get birthtimeMs(){return this.#v}#y;get atime(){return this.#y}#p;get mtime(){return this.#p}#R;get ctime(){return this.#R}#m;get birthtime(){return this.#m}#O;#x;#g;#b;#E;#T;#e;#F;#P;#C;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=y,n,r,i,a,o){this.name=e,this.#O=i?U(e):B(e),this.#e=t&I,this.nocase=i,this.roots=r,this.root=n||this,this.#F=a,this.#g=o.fullpath,this.#E=o.relative,this.#T=o.relativePosix,this.parent=o.parent,this.parent?this.#t=this.parent.#t:this.#t=h(o.fs)}depth(){return this.#x===void 0?this.parent?this.#x=this.parent.depth()+1:this.#x=0:this.#x}childrenCache(){return this.#F}resolve(e){if(!e)return this;let t=this.getRootString(e),n=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#D(n):this.#D(n)}#D(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#F.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#F.set(this,t),this.#e&=~k,t}child(e,t){if(e===``||e===`.`)return this;if(e===`..`)return this.parent||this;let n=this.children(),r=this.nocase?U(e):B(e);for(let e of n)if(e.#O===r)return e;let i=this.parent?this.sep:``,a=this.#g?this.#g+i+e:void 0,o=this.newChild(e,y,{...t,parent:this,fullpath:a});return this.canReaddir()||(o.#e|=M),n.push(o),o}relative(){if(this.isCWD)return``;if(this.#E!==void 0)return this.#E;let e=this.name,t=this.parent;if(!t)return this.#E=this.name;let n=t.relative();return n+(!n||!t.parent?``:this.sep)+e}relativePosix(){if(this.sep===`/`)return this.relative();if(this.isCWD)return``;if(this.#T!==void 0)return this.#T;let e=this.name,t=this.parent;if(!t)return this.#T=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?``:`/`)+e}fullpath(){if(this.#g!==void 0)return this.#g;let e=this.name,t=this.parent;if(!t)return this.#g=this.name;let n=t.fullpath()+(t.parent?this.sep:``)+e;return this.#g=n}fullpathPosix(){if(this.#b!==void 0)return this.#b;if(this.sep===`/`)return this.#b=this.fullpath();if(!this.parent){let e=this.fullpath().replace(/\\/g,`/`);return/^[a-z]:\//i.test(e)?this.#b=`//?/${e}`:this.#b=e}let e=this.parent,t=e.fullpathPosix(),n=t+(!t||!e.parent?``:`/`)+this.name;return this.#b=n}isUnknown(){return(this.#e&D)===y}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?`Unknown`:this.isDirectory()?`Directory`:this.isFile()?`File`:this.isSymbolicLink()?`SymbolicLink`:this.isFIFO()?`FIFO`:this.isCharacterDevice()?`CharacterDevice`:this.isBlockDevice()?`BlockDevice`:this.isSocket()?`Socket`:`Unknown`}isFile(){return(this.#e&D)===w}isDirectory(){return(this.#e&D)===S}isCharacterDevice(){return(this.#e&D)===x}isBlockDevice(){return(this.#e&D)===C}isFIFO(){return(this.#e&D)===b}isSocket(){return(this.#e&D)===E}isSymbolicLink(){return(this.#e&T)===T}lstatCached(){return this.#e&A?this:void 0}readlinkCached(){return this.#P}realpathCached(){return this.#C}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#P)return!0;if(!this.parent)return!1;let e=this.#e&D;return!(e!==y&&e!==T||this.#e&N||this.#e&M)}calledReaddir(){return!!(this.#e&k)}isENOENT(){return!!(this.#e&M)}isNamed(e){return this.nocase?this.#O===U(e):this.#O===B(e)}async readlink(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=await this.#t.promises.readlink(this.fullpath()),t=(await this.parent.realpath())?.resolve(e);if(t)return this.#P=t}catch(e){this.#M(e.code);return}}readlinkSync(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let e=this.#t.readlinkSync(this.fullpath()),t=this.parent.realpathSync()?.resolve(e);if(t)return this.#P=t}catch(e){this.#M(e.code);return}}#W(e){this.#e|=k;for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&n.#_()}}#_(){this.#e&M||(this.#e=(this.#e|M)&O,this.#$())}#$(){let e=this.children();e.provisional=0;for(let t of e)t.#_()}#L(){this.#e|=P,this.#j()}#j(){if(this.#e&j)return;let e=this.#e;(e&D)===S&&(e&=O),this.#e=e|j,this.#$()}#B(e=``){e===`ENOTDIR`||e===`EPERM`?this.#j():e===`ENOENT`?this.#_():this.children().provisional=0}#k(e=``){e===`ENOTDIR`?this.parent.#j():e===`ENOENT`&&this.#_()}#M(e=``){let t=this.#e;t|=N,e===`ENOENT`&&(t|=M),(e===`EINVAL`||e===`UNKNOWN`)&&(t&=O),this.#e=t,e===`ENOTDIR`&&this.parent&&this.parent.#j()}#I(e,t){return this.#z(e,t)||this.#G(e,t)}#G(e,t){let n=L(e),r=this.newChild(e.name,n,{parent:this}),i=r.#e&D;return i!==S&&i!==T&&i!==y&&(r.#e|=j),t.unshift(r),t.provisional++,r}#z(e,t){for(let n=t.provisional;n<t.length;n++){let r=t[n];if((this.nocase?U(e.name):B(e.name))===r.#O)return this.#l(e,r,n,t)}}#l(e,t,n,r){let i=t.name;return t.#e=t.#e&O|L(e),i!==e.name&&(t.name=e.name),n!==r.provisional&&(n===r.length-1?r.pop():r.splice(n,1),r.unshift(t)),r.provisional++,t}async lstat(){if((this.#e&M)===0)try{return this.#U(await this.#t.promises.lstat(this.fullpath())),this}catch(e){this.#k(e.code)}}lstatSync(){if((this.#e&M)===0)try{return this.#U(this.#t.lstatSync(this.fullpath())),this}catch(e){this.#k(e.code)}}#U(e){let{atime:t,atimeMs:n,birthtime:r,birthtimeMs:i,blksize:a,blocks:o,ctime:s,ctimeMs:c,dev:l,gid:u,ino:d,mode:f,mtime:p,mtimeMs:m,nlink:h,rdev:g,size:_,uid:v}=e;this.#y=t,this.#a=n,this.#m=r,this.#v=i,this.#c=a,this.#u=o,this.#R=s,this.#d=c,this.#s=l,this.#S=u,this.#o=d,this.#n=f,this.#p=p,this.#i=m,this.#r=h,this.#w=g,this.#f=_,this.#h=v;let b=L(e);this.#e=this.#e&O|b|A,b!==y&&b!==S&&b!==T&&(this.#e|=j)}#N=[];#A=!1;#q(e){this.#A=!1;let t=this.#N.slice();this.#N.length=0,t.forEach(t=>t(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let r=n.slice(0,n.provisional);t?e(null,r):queueMicrotask(()=>e(null,r));return}if(this.#N.push(e),this.#A)return;this.#A=!0;let r=this.fullpath();this.#t.readdir(r,{withFileTypes:!0},(e,t)=>{if(e)this.#B(e.code),n.provisional=0;else{for(let e of t)this.#I(e,n);this.#W(n)}this.#q(n.slice(0,n.provisional))})}#H;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#H)await this.#H;else{let n=()=>{};this.#H=new Promise(e=>n=e);try{for(let n of await this.#t.promises.readdir(t,{withFileTypes:!0}))this.#I(n,e);this.#W(e)}catch(t){this.#B(t.code),e.provisional=0}this.#H=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#t.readdirSync(t,{withFileTypes:!0}))this.#I(n,e);this.#W(e)}catch(t){this.#B(t.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#e&F)return!1;let e=D&this.#e;return e===y||e===S||e===T}shouldWalk(e,t){return(this.#e&S)===S&&!(this.#e&F)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#C)return this.#C;if(!((P|N|M)&this.#e))try{let e=await this.#t.promises.realpath(this.fullpath());return this.#C=this.resolve(e)}catch{this.#L()}}realpathSync(){if(this.#C)return this.#C;if(!((P|N|M)&this.#e))try{let e=this.#t.realpathSync(this.fullpath());return this.#C=this.resolve(e)}catch{this.#L()}}[K](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],r=this;for(;r&&r.parent;)t.add(r),r.#E=n.join(this.sep),r.#T=n.join(`/`),r=r.parent,n.push(`..`);for(r=e;r&&r.parent&&!t.has(r);)r.#E=void 0,r.#T=void 0,r=r.parent}};e.PathBase=q;var J=class e extends q{sep=`\\`;splitSep=v;constructor(e,t=y,n,r,i,a,o){super(e,t,n,r,i,a,o)}newChild(t,n=y,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return a.win32.parse(e).root}getRoot(e){if(e=_(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new Z(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,`\\`).replace(g,`$1\\`),e===t}};e.PathWin32=J;var Y=class e extends q{splitSep=`/`;sep=`/`;constructor(e,t=y,n,r,i,a,o){super(e,t,n,r,i,a,o)}getRootString(e){return e.startsWith(`/`)?`/`:``}getRoot(e){return this.root}newChild(t,n=y,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}};e.PathPosix=Y;var X=class{root;rootPath;roots;cwd;#t;#s;#n;nocase;#r;constructor(e=process.cwd(),t,n,{nocase:r,childrenCacheSize:i=16*1024,fs:a=m}={}){this.#r=h(a),(e instanceof URL||e.startsWith(`file://`))&&(e=(0,o.fileURLToPath)(e));let s=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(s),this.#t=new W,this.#s=new W,this.#n=new G(i);let c=s.substring(this.rootPath.length).split(n);if(c.length===1&&!c[0]&&c.pop(),r===void 0)throw TypeError(`must provide nocase setting to PathScurryBase ctor`);this.nocase=r,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let l=this.root,u=c.length-1,d=t.sep,f=this.rootPath,p=!1;for(let e of c){let t=u--;l=l.child(e,{relative:Array(t).fill(`..`).join(d),relativePosix:Array(t).fill(`..`).join(`/`),fullpath:f+=(p?``:d)+e}),p=!0}this.cwd=l}depth(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#t.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpath();return this.#t.set(t,r),r}resolvePosix(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=this.#s.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpathPosix();return this.#s.set(t,r),r}relative(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let t=await e.readdir();return n?t:t.map(e=>e.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(e=>e.name):[]}async lstat(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set,c=(e,t)=>{s.add(e),e.readdirCB((e,l)=>{if(e)return t(e);let u=l.length;if(!u)return t();let d=()=>{--u===0&&t()};for(let e of l)(!i||i(e))&&o.push(n?e:e.fullpath()),r&&e.isSymbolicLink()?e.realpath().then(e=>e?.isUnknown()?e.lstat():e).then(e=>e?.shouldWalk(s,a)?c(e,d):d()):e.shouldWalk(s,a)?c(e,d):d()},!0)},l=e;return new Promise((e,t)=>{c(l,n=>{if(n)return t(n);e(o)})})}walkSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set([e]);for(let e of s){let t=e.readdirSync();for(let e of t){(!i||i(e))&&o.push(n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&s.add(t)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t;(!i||i(e))&&(yield n?e:e.fullpath());let o=new Set([e]);for(let e of o){let t=e.readdirSync();for(let e of t){(!i||i(e))&&(yield n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(o,a)&&o.add(t)}}}stream(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new p.Minipass({objectMode:!0});(!i||i(e))&&o.write(n?e:e.fullpath());let s=new Set,c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let d=(t,p,m=!1)=>{if(t)return o.emit(`error`,t);if(r&&!m){let e=[];for(let t of p)t.isSymbolicLink()&&e.push(t.realpath().then(e=>e?.isUnknown()?e.lstat():e));if(e.length){Promise.all(e).then(()=>d(null,p,!0));return}}for(let t of p)t&&(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of p){let t=e.realpathCached()||e;t.shouldWalk(s,a)&&c.push(t)}e&&!o.flowing?o.once(`drain`,u):f||u()},f=!0;t.readdirCB(d,!0),f=!1}};return u(),o}streamSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof q||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new p.Minipass({objectMode:!0}),s=new Set;(!i||i(e))&&o.write(n?e:e.fullpath());let c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let u=t.readdirSync();for(let t of u)(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of u){let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&c.push(t)}}e&&!o.flowing&&o.once(`drain`,u)};return u(),o}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e==`string`?this.cwd.resolve(e):e,this.cwd[K](t)}};e.PathScurryBase=X;var Z=class extends X{sep=`\\`;constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,a.win32,`\\`,{...t,nocase:n}),this.nocase=n;for(let e=this.cwd;e;e=e.parent)e.nocase=this.nocase}parseRootPath(e){return a.win32.parse(e).root.toUpperCase()}newRoot(e){return new J(this.rootPath,S,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)||e.startsWith(`\\`)||/^[a-z]:(\/|\\)/i.test(e)}};e.PathScurryWin32=Z;var Q=class extends X{sep=`/`;constructor(e=process.cwd(),t={}){let{nocase:n=!1}=t;super(e,a.posix,`/`,{...t,nocase:n}),this.nocase=n}parseRootPath(e){return`/`}newRoot(e){return new Y(this.rootPath,S,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)}};e.PathScurryPosix=Q;var $=class extends Q{constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}};e.PathScurryDarwin=$,e.Path=process.platform===`win32`?J:Y,e.PathScurry=process.platform===`win32`?Z:process.platform===`darwin`?$:Q}),Re=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pattern=void 0;var t=H(),n=e=>e.length>=1,r=e=>e.length>=1,i=Symbol.for(`nodejs.util.inspect.custom`);e.Pattern=class e{#t;#s;#n;length;#r;#h;#S;#w;#c;#o;#f=!0;constructor(e,t,i,a){if(!n(e))throw TypeError(`empty pattern list`);if(!r(t))throw TypeError(`empty glob list`);if(t.length!==e.length)throw TypeError(`mismatched pattern list and glob list lengths`);if(this.length=e.length,i<0||i>=this.length)throw TypeError(`index out of range`);if(this.#t=e,this.#s=t,this.#n=i,this.#r=a,this.#n===0){if(this.isUNC()){let[e,t,n,r,...i]=this.#t,[a,o,s,c,...l]=this.#s;i[0]===``&&(i.shift(),l.shift());let u=[e,t,n,r,``].join(`/`),d=[a,o,s,c,``].join(`/`);this.#t=[u,...i],this.#s=[d,...l],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[e,...t]=this.#t,[n,...r]=this.#s;t[0]===``&&(t.shift(),r.shift());let i=e+`/`,a=n+`/`;this.#t=[i,...t],this.#s=[a,...r],this.length=this.#t.length}}}[i](){return`Pattern <`+this.#s.slice(this.#n).join(`/`)+`>`}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]==`string`}isGlobstar(){return this.#t[this.#n]===t.GLOBSTAR}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#S=this.#S||(this.#n===0?this.isAbsolute()?this.#s[0]+this.#s.slice(1).join(`/`):this.#s.join(`/`):this.#s.slice(this.#n).join(`/`))}hasMore(){return this.length>this.#n+1}rest(){return this.#h===void 0?this.hasMore()?(this.#h=new e(this.#t,this.#s,this.#n+1,this.#r),this.#h.#o=this.#o,this.#h.#c=this.#c,this.#h.#w=this.#w,this.#h):this.#h=null:this.#h}isUNC(){let e=this.#t;return this.#c===void 0?this.#c=this.#r===`win32`&&this.#n===0&&e[0]===``&&e[1]===``&&typeof e[2]==`string`&&!!e[2]&&typeof e[3]==`string`&&!!e[3]:this.#c}isDrive(){let e=this.#t;return this.#w===void 0?this.#w=this.#r===`win32`&&this.#n===0&&this.length>1&&typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]):this.#w}isAbsolute(){let e=this.#t;return this.#o===void 0?this.#o=e[0]===``&&e.length>1||this.isDrive()||this.isUNC():this.#o}root(){let e=this.#t[0];return typeof e==`string`&&this.isAbsolute()&&this.#n===0?e:``}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#f)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#f?!1:(this.#f=!1,!0)}}}),ke=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Ignore=void 0;var t=H(),n=Re(),r=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:i,noglobstar:a,platform:o=r}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:i,noglobstar:a,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let t of e)this.add(t)}add(e){let r=new t.Minimatch(e,this.mmopts);for(let e=0;e<r.set.length;e++){let i=r.set[e],a=r.globParts[e];if(!i||!a)throw Error(`invalid pattern object`);for(;i[0]===`.`&&a[0]===`.`;)i.shift(),a.shift();let o=new n.Pattern(i,a,0,this.platform),s=new t.Minimatch(o.globString(),this.mmopts),c=a[a.length-1]===`**`,l=o.isAbsolute();l?this.absolute.push(s):this.relative.push(s),c&&(l?this.absoluteChildren.push(s):this.relativeChildren.push(s))}}ignored(e){let t=e.fullpath(),n=`${t}/`,r=e.relative()||`.`,i=`${r}/`;for(let e of this.relative)if(e.match(r)||e.match(i))return!0;for(let e of this.absolute)if(e.match(t)||e.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+`/`,n=(e.relative()||`.`)+`/`;for(let e of this.relativeChildren)if(e.match(n))return!0;for(let e of this.absoluteChildren)if(e.match(t))return!0;return!1}}}),Fs=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;var t=H(),n=class e{store;constructor(e=new Map){this.store=e}copy(){return new e(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),r=this.store.get(n);r?r.add(t.globString()):this.store.set(n,new Set([t.globString()]))}};e.HasWalkedCache=n;var r=class{store=new Map;add(e,t,n){let r=(t?2:0)|!!n,i=this.store.get(e);this.store.set(e,i===void 0?r:r&i)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}};e.MatchRecord=r;var i=class{store=new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(e=>e.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw Error(`attempting to walk unknown path`);return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};e.SubWalks=i,e.Processor=class e{hasWalkedCache;matches=new r;subwalks=new i;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new n}processPatterns(e,n){this.patterns=n;let r=n.map(t=>[e,t]);for(let[e,n]of r){this.hasWalkedCache.storeWalked(e,n);let r=n.root(),i=n.isAbsolute()&&this.opts.absolute!==!1;if(r){e=e.resolve(r===`/`&&this.opts.root!==void 0?this.opts.root:r);let t=n.rest();if(t)n=t;else{this.matches.add(e,!0,!1);continue}}if(e.isENOENT())continue;let a,o,s=!1;for(;typeof(a=n.pattern())==`string`&&(o=n.rest());)e=e.resolve(a),n=o,s=!0;if(a=n.pattern(),o=n.rest(),s){if(this.hasWalkedCache.hasWalked(e,n))continue;this.hasWalkedCache.storeWalked(e,n)}if(typeof a==`string`){let t=a===`..`||a===``||a===`.`;this.matches.add(e.resolve(a),i,t);continue}else if(a===t.GLOBSTAR){(!e.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(e,n);let t=o?.pattern(),r=o?.rest();if(!o||(t===``||t===`.`)&&!r)this.matches.add(e,i,t===``||t===`.`);else if(t===`..`){let t=e.parent||e;r?this.hasWalkedCache.hasWalked(t,r)||this.subwalks.add(t,r):this.matches.add(t,i,!0)}}else a instanceof RegExp&&this.subwalks.add(e,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(e,n){let r=this.subwalks.get(e),i=this.child();for(let e of n)for(let n of r){let r=n.isAbsolute(),a=n.pattern(),o=n.rest();a===t.GLOBSTAR?i.testGlobstar(e,n,o,r):a instanceof RegExp?i.testRegExp(e,a,o,r):i.testString(e,a,o,r)}return i}testGlobstar(e,t,n,r){if((this.dot||!e.name.startsWith(`.`))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let t=n.pattern();if(typeof t==`string`&&t!==`..`&&t!==``&&t!==`.`)this.testString(e,t,n.rest(),r);else if(t===`..`){let t=e.parent||e;this.subwalks.add(t,n)}else t instanceof RegExp&&this.testRegExp(e,t,n.rest(),r)}}testRegExp(e,t,n,r){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}testString(e,t,n,r){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}}}),Ls=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;var t=Oe(),n=ke(),r=Fs(),i=(e,t)=>typeof e==`string`?new n.Ignore([e],t):Array.isArray(e)?new n.Ignore(e,t):e,a=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#s;#n;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#n=!n.posix&&n.platform===`win32`?`\\`:`/`,this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#s=i(n.ignore??[],n),!this.includeChildMatches&&typeof this.#s.add!=`function`))throw Error(`cannot ignore child matches, ignore lacks add() method.`);this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener(`abort`,()=>{this.#t.length=0}))}#r(e){return this.seen.has(e)||!!this.#s?.ignored?.(e)}#h(e){return!!this.#s?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#t.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#t.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=await r.realpath();e&&(e.isUnknown()||this.opts.stat)&&await e.lstat()}return this.matchCheckTest(r,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#r(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=r.realpathSync();e&&(e?.isUnknown()||this.opts.stat)&&e.lstatSync()}return this.matchCheckTest(r,t)}matchFinish(e,t){if(this.#r(e))return;if(!this.includeChildMatches&&this.#s?.add){let t=`${e.relativePosix()}/**`;this.#s.add(t)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#n:``;if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+r)}else{let t=this.opts.posix?e.relativePosix():e.relative(),n=this.opts.dotRelative&&!t.startsWith(`..`+this.#n)?`.`+this.#n:``;this.matchEmit(t?n+t+r:`.`+r)}}async match(e,t,n){let r=await this.matchCheck(e,n);r&&this.matchFinish(r,t)}matchSync(e,t,n){let r=this.matchCheckSync(e,n);r&&this.matchFinish(r,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new r.Processor(this.opts),n)}walkCB2(e,t,n,r){if(this.#h(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,n,a):e.readdirCB((t,r)=>this.walkCB3(e,r,n,a),!0)}a()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||(i++,this.match(e,t,r).then(()=>a()));for(let[e,t]of n.subwalks.entries())i++,this.walkCB2(e,t,n.child(),a);a()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new r.Processor(this.opts),n)}walkCB2Sync(e,t,n,r){if(this.#h(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,r));return}n.processPatterns(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;let t=e.readdirSync();this.walkCB3Sync(e,t,n,a)}a()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let i=1,a=()=>{--i===0&&r()};for(let[e,t,r]of n.matches.entries())this.#r(e)||this.matchSync(e,t,r);for(let[e,t]of n.subwalks.entries())i++,this.walkCB2Sync(e,t,n.child(),a);a()}};e.GlobUtil=a,e.GlobWalker=class extends a{matches=new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},e.GlobStream=class extends a{results;constructor(e,n,r){super(e,n,r),this.results=new t.Minipass({signal:this.signal,objectMode:!0}),this.results.on(`drain`,()=>this.resume()),this.results.on(`resume`,()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}}),je=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Glob=void 0;var t=H(),n=require(`node:url`),r=Ms(),i=Re(),a=Ls(),o=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Glob=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,a){if(!a)throw TypeError(`glob options required`);if(this.withFileTypes=!!a.withFileTypes,this.signal=a.signal,this.follow=!!a.follow,this.dot=!!a.dot,this.dotRelative=!!a.dotRelative,this.nodir=!!a.nodir,this.mark=!!a.mark,a.cwd?(a.cwd instanceof URL||a.cwd.startsWith(`file://`))&&(a.cwd=(0,n.fileURLToPath)(a.cwd)):this.cwd=``,this.cwd=a.cwd||``,this.root=a.root,this.magicalBraces=!!a.magicalBraces,this.nobrace=!!a.nobrace,this.noext=!!a.noext,this.realpath=!!a.realpath,this.absolute=a.absolute,this.includeChildMatches=a.includeChildMatches!==!1,this.noglobstar=!!a.noglobstar,this.matchBase=!!a.matchBase,this.maxDepth=typeof a.maxDepth==`number`?a.maxDepth:1/0,this.stat=!!a.stat,this.ignore=a.ignore,this.withFileTypes&&this.absolute!==void 0)throw Error(`cannot set absolute and withFileTypes:true`);if(typeof e==`string`&&(e=[e]),this.windowsPathsNoEscape=!!a.windowsPathsNoEscape||a.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(e=>e.replace(/\\/g,`/`))),this.matchBase){if(a.noglobstar)throw TypeError(`base matching requires globstar`);e=e.map(e=>e.includes(`/`)?e:`./**/${e}`)}if(this.pattern=e,this.platform=a.platform||o,this.opts={...a,platform:this.platform},a.scurry){if(this.scurry=a.scurry,a.nocase!==void 0&&a.nocase!==a.scurry.nocase)throw Error(`nocase option contradicts provided scurry option`)}else{let e=a.platform===`win32`?r.PathScurryWin32:a.platform===`darwin`?r.PathScurryDarwin:a.platform?r.PathScurryPosix:r.PathScurry;this.scurry=new e(this.cwd,{nocase:a.nocase,fs:a.fs})}this.nocase=this.scurry.nocase;let s=this.platform===`darwin`||this.platform===`win32`,c={braceExpandMax:1e4,...a,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},[l,u]=this.pattern.map(e=>new t.Minimatch(e,c)).reduce((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e),[[],[]]);this.patterns=l.map((e,t)=>{let n=u[t];if(!n)throw Error(`invalid pattern object`);return new i.Pattern(e,n,0,this.platform)})}async walk(){return[...await new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}}),Ne=R(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hasMagic=void 0;var t=H();e.hasMagic=(e,n={})=>{Array.isArray(e)||(e=[e]);for(let r of e)if(new t.Minimatch(r,n).hasMagic())return!0;return!1}});Object.defineProperty(exports,`__esModule`,{value:!0}),exports.glob=exports.sync=exports.iterate=exports.iterateSync=exports.stream=exports.streamSync=exports.Ignore=exports.hasMagic=exports.Glob=exports.unescape=exports.escape=void 0,exports.globStreamSync=xt,exports.globStream=Le,exports.globSync=We,exports.globIterateSync=Tt,exports.globIterate=Be;var Ws=H(),tt=je(),Br=Ne(),Is=H();Object.defineProperty(exports,`escape`,{enumerable:!0,get:function(){return Is.escape}}),Object.defineProperty(exports,`unescape`,{enumerable:!0,get:function(){return Is.unescape}});var Ir=je();Object.defineProperty(exports,`Glob`,{enumerable:!0,get:function(){return Ir.Glob}});var Gr=Ne();Object.defineProperty(exports,`hasMagic`,{enumerable:!0,get:function(){return Gr.hasMagic}});var zr=ke();Object.defineProperty(exports,`Ignore`,{enumerable:!0,get:function(){return zr.Ignore}});function xt(e,t={}){return new tt.Glob(e,t).streamSync()}function Le(e,t={}){return new tt.Glob(e,t).stream()}function We(e,t={}){return new tt.Glob(e,t).walkSync()}async function Bs(e,t={}){return new tt.Glob(e,t).walk()}function Tt(e,t={}){return new tt.Glob(e,t).iterateSync()}function Be(e,t={}){return new tt.Glob(e,t).iterate()}exports.streamSync=xt,exports.stream=Object.assign(Le,{sync:xt}),exports.iterateSync=Tt,exports.iterate=Object.assign(Be,{sync:Tt}),exports.sync=Object.assign(We,{stream:xt,iterate:Tt}),exports.glob=Object.assign(Bs,{glob:Bs,globSync:We,sync:exports.sync,globStream:Le,stream:exports.stream,globStreamSync:xt,streamSync:exports.streamSync,globIterate:Be,iterate:exports.iterate,globIterateSync:Tt,iterateSync:exports.iterateSync,Glob:tt.Glob,hasMagic:Br.hasMagic,escape:Ws.escape,unescape:Ws.unescape}),exports.glob.glob=exports.glob;
package/dist/plugin.d.mts CHANGED
@@ -1,7 +1,4 @@
1
1
  import { t as ExternalsPluginOptions } from "./_chunks/types.mjs";
2
2
  import { Plugin } from "rollup";
3
-
4
- //#region src/plugin.d.ts
5
3
  declare function externals(opts: ExternalsPluginOptions): Plugin;
6
- //#endregion
7
4
  export { type ExternalsPluginOptions, externals };
package/dist/plugin.mjs CHANGED
@@ -3,7 +3,6 @@ import { n as isAbsolute, o as resolve } from "./_chunks/libs/pathe.mjs";
3
3
  import { t as resolveModulePath } from "./_chunks/libs/exsolve.mjs";
4
4
  import { builtinModules } from "node:module";
5
5
  import { pathToFileURL } from "node:url";
6
- //#region src/plugin.ts
7
6
  const PLUGIN_NAME = "nitro:externals";
8
7
  function externals(opts) {
9
8
  const rootDir = resolve(opts.rootDir || ".");
@@ -92,5 +91,4 @@ function externals(opts) {
92
91
  }
93
92
  };
94
93
  }
95
- //#endregion
96
94
  export { externals };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nf3",
3
- "version": "0.3.15",
3
+ "version": "0.3.17",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "repository": "unjs/nf3",
@@ -27,27 +27,27 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@rollup/plugin-node-resolve": "^16.0.3",
30
- "@types/node": "^25.5.0",
30
+ "@types/node": "^25.6.0",
31
31
  "@types/semver": "^7.7.1",
32
- "@typescript/native-preview": "^7.0.0-dev.20260401.1",
32
+ "@typescript/native-preview": "^7.0.0-dev.20260507.1",
33
33
  "@vercel/nft": "^1.5.0",
34
- "@vitest/coverage-v8": "^4.1.2",
34
+ "@vitest/coverage-v8": "^4.1.5",
35
35
  "automd": "^0.4.3",
36
36
  "changelogen": "^0.6.2",
37
37
  "eslint-config-unjs": "^0.6.2",
38
38
  "exsolve": "^1.0.8",
39
- "obuild": "^0.4.32",
40
- "oxc-minify": "^0.123.0",
41
- "oxfmt": "^0.43.0",
42
- "oxlint": "^1.58.0",
39
+ "obuild": "^0.4.35",
40
+ "oxc-minify": "^0.129.0",
41
+ "oxfmt": "^0.48.0",
42
+ "oxlint": "^1.63.0",
43
43
  "pathe": "^2.0.3",
44
- "pkg-types": "^2.3.0",
45
- "rolldown": "^1.0.0-rc.13",
46
- "rollup": "^4.60.1",
44
+ "pkg-types": "^2.3.1",
45
+ "rolldown": "^1.0.0",
46
+ "rollup": "^4.60.3",
47
47
  "rollup-plugin-esbuild": "^6.2.1",
48
48
  "semver": "^7.7.4",
49
- "typescript": "^6.0.2",
50
- "vitest": "^4.1.2"
49
+ "typescript": "^6.0.3",
50
+ "vitest": "^4.1.5"
51
51
  },
52
- "packageManager": "pnpm@10.33.0"
52
+ "packageManager": "pnpm@11.0.8"
53
53
  }