tsx 1.0.0 → 2.1.0

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.
Files changed (3) hide show
  1. package/README.md +58 -0
  2. package/dist/cli.js +53 -0
  3. package/package.json +70 -21
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # tsx
2
+
3
+ Node.js runtime that can instantaneously load TypeScript & ESM, powered by [esbuild](https://esbuild.github.io/).
4
+
5
+ ### Features
6
+ - Transforms TypeScript & ESM → to CJS or ESM (depending on [package type](https://nodejs.org/api/packages.html#type))
7
+ - Supports TS extensions `.cjs` & `.mjs` (`.cts` & `.mts`)
8
+ - Supports Node.js v12.20+
9
+ - Handles `node:` import prefixes
10
+ - Hides experimental feature warnings
11
+
12
+ ## Install
13
+ ```sh
14
+ npm install --save-dev tsx
15
+ ```
16
+
17
+ ### Install globally
18
+ Install it globally to use it anywhere, outside of your npm project, without [npx](https://docs.npmjs.com/cli/v8/commands/npx).
19
+ ```sh
20
+ npm install --global tsx
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ > Note: Commands are prefixed with [`npx`](https://docs.npmjs.com/cli/v8/commands/npx) to execute the `tsx` binary, but it's not necessary if globally installed or when using it in the `script` object in `package.json`
26
+
27
+ ### Run TypeScript / ESM / CJS module
28
+
29
+ ```sh
30
+ npx tsx ./file.ts
31
+ ```
32
+
33
+ ### Watch mode
34
+ Run file and automatically re-run on changes.
35
+
36
+ All imported files are watched except from the following directories:
37
+ `node_modules`, `bower_components`, `vendor`, `dist`, and `.*` (hidden directories).
38
+
39
+ Press <kbd>Return</kbd> to manually re-run.
40
+
41
+ ```sh
42
+ npx tsx watch ./file.ts
43
+ ```
44
+
45
+ ### Cache
46
+ Modules transformations are cached in the system cache directory ([`TMPDIR`](https://en.wikipedia.org/wiki/TMPDIR)). Transforms are cached by content hash so duplicate dependencies are not re-transformed.
47
+
48
+ Set the `--no-cache` flag to disable the cache:
49
+
50
+ ```sh
51
+ npx tsx --no-cache ./file.ts
52
+ ```
53
+
54
+ ## Dependencies
55
+
56
+ - [@esbuild-kit/esm-loader](https://github.com/esbuild-kit/esm-loader) - Node.js Loader to transform TypeScript to ESM.
57
+
58
+ - [@esbuild-kit/cjs-loader](https://github.com/esbuild-kit/cjs-loader) - Node.js `requie()` hook to transform TypeScript & ESM to CommonJS.
package/dist/cli.js ADDED
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env node
2
+ var Bn=Object.defineProperty,Sn=Object.defineProperties;var $n=Object.getOwnPropertyDescriptors;var mu=Object.getOwnPropertySymbols;var Tn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable;var _u=(t,e,u)=>e in t?Bn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,M=(t,e)=>{for(var u in e||(e={}))Tn.call(e,u)&&_u(t,u,e[u]);if(mu)for(var u of mu(e))xn.call(e,u)&&_u(t,u,e[u]);return t},De=(t,e)=>Sn(t,$n(e));import On from"tty";import{createRequire as Nn}from"module";import{pathToFileURL as Pn,fileURLToPath as Hn}from"url";import In from"child_process";import z from"path";import oe from"fs";import Ln,{Transform as kn}from"stream";import Mn from"events";import _e from"util";import Au from"os";var yu=/-(\w)/g,wu=t=>t.replace(yu,(e,u)=>u.toUpperCase()),Ru=/\B([A-Z])/g,Wn=t=>t.replace(Ru,"-$1").toLowerCase(),{stringify:Ae}=JSON,{hasOwnProperty:Gn}=Object.prototype,Ie=(t,e)=>Gn.call(t,e),jn=/^--?/,Un=/[.:=]/,Kn=t=>{let e=t.replace(jn,""),u,r=e.match(Un);if(r!=null&&r.index){let n=r.index;u=e.slice(n+1),e=e.slice(0,n)}return{flagName:e,flagValue:u}},Vn=/[\s.:=]/,zn=(t,e)=>{let u=`Invalid flag name ${Ae(e)}:`;if(e.length===0)throw new Error(`${u} flag name cannot be empty}`);if(e.length===1)throw new Error(`${u} single characters are reserved for aliases`);let r=e.match(Vn);if(r)throw new Error(`${u} flag name cannot contain the character ${Ae(r==null?void 0:r[0])}`);let n;if(yu.test(e)?n=wu(e):Ru.test(e)&&(n=Wn(e)),n&&Ie(t,n))throw new Error(`${u} collides with flag ${Ae(n)}`)};function Yn(t){let e=new Map;for(let u in t){if(!Ie(t,u))continue;zn(t,u);let r=t[u];if(r&&typeof r=="object"){let{alias:n}=r;if(typeof n=="string"){if(n.length===0)throw new Error(`Invalid flag alias ${Ae(u)}: flag alias cannot be empty`);if(n.length>1)throw new Error(`Invalid flag alias ${Ae(u)}: flag aliases can only be a single-character`);if(e.has(n))throw new Error(`Flag collision: Alias "${n}" is already used`);e.set(n,{name:u,schema:r})}}}return e}var qn=t=>!t||typeof t=="function"?!1:Array.isArray(t)||Array.isArray(t.type),Xn=t=>{let e={};for(let u in t)Ie(t,u)&&(e[u]=qn(t[u])?[]:void 0);return e},Dt=(t,e)=>t===Number&&e===""?Number.NaN:t===Boolean?e!=="false":e,Qn=(t,e)=>{for(let u in t){if(!Ie(t,u))continue;let r=t[u];if(!r)continue;let n=e[u];if(!(n!==void 0&&!(Array.isArray(n)&&n.length===0))&&"default"in r){let s=r.default;typeof s=="function"&&(s=s()),e[u]=s}}},bu=(t,e)=>{if(!e)throw new Error(`Missing type on flag "${t}"`);return typeof e=="function"?e:Array.isArray(e)?e[0]:bu(t,e.type)},Zn=/^-[\da-z]+/i,Jn=/^--[\w-]{2,}/,ot="--";function es(t,e=process.argv.slice(2)){let u=Yn(t),r={flags:Xn(t),unknownFlags:{},_:Object.assign([],{[ot]:[]})},n,s=(D,o,a)=>{let c=bu(D,o);a=Dt(c,a),a!==void 0&&!Number.isNaN(a)?Array.isArray(r.flags[D])?r.flags[D].push(c(a)):r.flags[D]=c(a):n=f=>{Array.isArray(r.flags[D])?r.flags[D].push(c(Dt(c,f||""))):r.flags[D]=c(Dt(c,f||"")),n=void 0}},i=(D,o)=>{D in r.unknownFlags||(r.unknownFlags[D]=[]),o!==void 0?r.unknownFlags[D].push(o):n=(a=!0)=>{r.unknownFlags[D].push(a),n=void 0}};for(let D=0;D<e.length;D+=1){let o=e[D];if(o===ot){let c=e.slice(D+1);r._[ot]=c,r._.push(...c);break}let a=Zn.test(o);if(Jn.test(o)||a){n&&n();let c=Kn(o),{flagValue:f}=c,{flagName:l}=c;if(a){for(let p=0;p<l.length;p+=1){let F=l[p],A=u.get(F),B=p===l.length-1;A?s(A.name,A.schema,B?f:!0):i(F,B?f:!0)}continue}let C=t[l];if(!C){let p=wu(l);C=t[p],C&&(l=p)}if(!C){i(l,f);continue}s(l,C,f)}else n?n(o):r._.push(o)}return n&&n(),Qn(t,r.flags),r}var ts=Object.create,Le=Object.defineProperty,us=Object.defineProperties,rs=Object.getOwnPropertyDescriptor,ns=Object.getOwnPropertyDescriptors,ss=Object.getOwnPropertyNames,vu=Object.getOwnPropertySymbols,is=Object.getPrototypeOf,Bu=Object.prototype.hasOwnProperty,Ds=Object.prototype.propertyIsEnumerable,Su=(t,e,u)=>e in t?Le(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,ke=(t,e)=>{for(var u in e||(e={}))Bu.call(e,u)&&Su(t,u,e[u]);if(vu)for(var u of vu(e))Ds.call(e,u)&&Su(t,u,e[u]);return t},at=(t,e)=>us(t,ns(e)),os=t=>Le(t,"__esModule",{value:!0}),as=(t,e)=>()=>(t&&(e=t(t=0)),e),ls=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),cs=(t,e,u,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ss(e))!Bu.call(t,n)&&(u||n!=="default")&&Le(t,n,{get:()=>e[n],enumerable:!(r=rs(e,n))||r.enumerable});return t},fs=(t,e)=>cs(os(Le(t!=null?ts(is(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),K=as(()=>{}),hs=ls((t,e)=>{K(),e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});K(),K(),K();var ds=t=>{var e,u,r;let n=(e=process.stdout.columns)!=null?e:Number.POSITIVE_INFINITY;return typeof t=="function"&&(t=t(n)),t||(t={}),Array.isArray(t)?{columns:t,stdoutColumns:n}:{columns:(u=t.columns)!=null?u:[],stdoutColumns:(r=t.stdoutColumns)!=null?r:n}};K(),K(),K(),K(),K();function Es({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}function $u(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(Es(),"")}K();function ps(t){return Number.isInteger(t)?t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141):!1}var Cs=fs(hs(),1);function ae(t){if(typeof t!="string"||t.length===0||(t=$u(t),t.length===0))return 0;t=t.replace((0,Cs.default)()," ");let e=0;for(let u=0;u<t.length;u++){let r=t.codePointAt(u);r<=31||r>=127&&r<=159||r>=768&&r<=879||(r>65535&&u++,e+=ps(r)?2:1)}return e}var Tu=t=>Math.max(...t.split(`
3
+ `).map(ae)),Fs=t=>{let e=[];for(let u of t){let{length:r}=u,n=r-e.length;for(let s=0;s<n;s+=1)e.push(0);for(let s=0;s<r;s+=1){let i=Tu(u[s]);i>e[s]&&(e[s]=i)}}return e};K();var xu=/^\d+%$/,Ou={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},gs=(t,e)=>{var u;let r=[];for(let n=0;n<t.length;n+=1){let s=(u=e[n])!=null?u:"auto";if(typeof s=="number"||s==="auto"||s==="content-width"||typeof s=="string"&&xu.test(s)){r.push(at(ke({},Ou),{width:s,contentWidth:t[n]}));continue}if(s&&typeof s=="object"){let i=at(ke(ke({},Ou),s),{contentWidth:t[n]});i.horizontalPadding=i.paddingLeft+i.paddingRight,r.push(i);continue}throw new Error(`Invalid column width: ${JSON.stringify(s)}`)}return r};function ms(t,e){for(let u of t){let{width:r}=u;if(r==="content-width"&&(u.width=u.contentWidth),r==="auto"){let o=Math.min(20,u.contentWidth);u.width=o,u.autoOverflow=u.contentWidth-o}if(typeof r=="string"&&xu.test(r)){let o=Number.parseFloat(r.slice(0,-1))/100;u.width=Math.floor(e*o)-(u.paddingLeft+u.paddingRight)}let{horizontalPadding:n}=u,s=1,i=s+n;if(i>=e){let o=i-e,a=Math.ceil(u.paddingLeft/n*o),c=o-a;u.paddingLeft-=a,u.paddingRight-=c,u.horizontalPadding=u.paddingLeft+u.paddingRight}u.paddingLeftString=u.paddingLeft?" ".repeat(u.paddingLeft):"",u.paddingRightString=u.paddingRight?" ".repeat(u.paddingRight):"";let D=e-u.horizontalPadding;u.width=Math.max(Math.min(u.width,D),s)}}var Nu=()=>Object.assign([],{columns:0});function _s(t,e){let u=[Nu()],[r]=u;for(let n of t){let s=n.width+n.horizontalPadding;r.columns+s>e&&(r=Nu(),u.push(r)),r.push(n),r.columns+=s}for(let n of u){let s=n.reduce((l,C)=>l+C.width+C.horizontalPadding,0),i=e-s;if(i===0)continue;let D=n.filter(l=>"autoOverflow"in l),o=D.filter(l=>l.autoOverflow>0),a=o.reduce((l,C)=>l+C.autoOverflow,0),c=Math.min(a,i);for(let l of o){let C=Math.floor(l.autoOverflow/a*c);l.width+=C,i-=C}let f=Math.floor(i/D.length);for(let l=0;l<D.length;l+=1){let C=D[l];l===D.length-1?C.width+=i:C.width+=f,i-=f}}return u}function As(t,e,u){let r=gs(u,e);return ms(r,t),_s(r,t)}K(),K(),K();var lt=10,Pu=(t=0)=>e=>`\x1B[${e+t}m`,Hu=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Iu=(t=0)=>(e,u,r)=>`\x1B[${38+t};2;${e};${u};${r}m`;function ys(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[u,r]of Object.entries(e)){for(let[n,s]of Object.entries(r))e[n]={open:`\x1B[${s[0]}m`,close:`\x1B[${s[1]}m`},r[n]=e[n],t.set(s[0],s[1]);Object.defineProperty(e,u,{value:r,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi=Pu(),e.color.ansi256=Hu(),e.color.ansi16m=Iu(),e.bgColor.ansi=Pu(lt),e.bgColor.ansi256=Hu(lt),e.bgColor.ansi16m=Iu(lt),Object.defineProperties(e,{rgbToAnsi256:{value:(u,r,n)=>u===r&&r===n?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:u=>{let r=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(u.toString(16));if(!r)return[0,0,0];let{colorString:n}=r.groups;n.length===3&&(n=n.split("").map(i=>i+i).join(""));let s=Number.parseInt(n,16);return[s>>16&255,s>>8&255,s&255]},enumerable:!1},hexToAnsi256:{value:u=>e.rgbToAnsi256(...e.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let r,n,s;if(u>=232)r=((u-232)*10+8)/255,n=r,s=r;else{u-=16;let o=u%36;r=Math.floor(u/36)/5,n=Math.floor(o/6)/5,s=o%6/5}let i=Math.max(r,n,s)*2;if(i===0)return 30;let D=30+(Math.round(s)<<2|Math.round(n)<<1|Math.round(r));return i===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(u,r,n)=>e.ansi256ToAnsi(e.rgbToAnsi256(u,r,n)),enumerable:!1},hexToAnsi:{value:u=>e.ansi256ToAnsi(e.hexToAnsi256(u)),enumerable:!1}}),e}var ws=ys(),Rs=ws,Me=new Set(["\x1B","\x9B"]),bs=39,ct="\x07",Lu="[",vs="]",ku="m",ft=`${vs}8;;`,Mu=t=>`${Me.values().next().value}${Lu}${t}${ku}`,Wu=t=>`${Me.values().next().value}${ft}${t}${ct}`,Bs=t=>t.split(" ").map(e=>ae(e)),ht=(t,e,u)=>{let r=[...e],n=!1,s=!1,i=ae($u(t[t.length-1]));for(let[D,o]of r.entries()){let a=ae(o);if(i+a<=u?t[t.length-1]+=o:(t.push(o),i=0),Me.has(o)&&(n=!0,s=r.slice(D+1).join("").startsWith(ft)),n){s?o===ct&&(n=!1,s=!1):o===ku&&(n=!1);continue}i+=a,i===u&&D<r.length-1&&(t.push(""),i=0)}!i&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},Ss=t=>{let e=t.split(" "),u=e.length;for(;u>0&&!(ae(e[u-1])>0);)u--;return u===e.length?t:e.slice(0,u).join(" ")+e.slice(u).join("")},$s=(t,e,u={})=>{if(u.trim!==!1&&t.trim()==="")return"";let r="",n,s,i=Bs(t),D=[""];for(let[a,c]of t.split(" ").entries()){u.trim!==!1&&(D[D.length-1]=D[D.length-1].trimStart());let f=ae(D[D.length-1]);if(a!==0&&(f>=e&&(u.wordWrap===!1||u.trim===!1)&&(D.push(""),f=0),(f>0||u.trim===!1)&&(D[D.length-1]+=" ",f++)),u.hard&&i[a]>e){let l=e-f,C=1+Math.floor((i[a]-l-1)/e);Math.floor((i[a]-1)/e)<C&&D.push(""),ht(D,c,e);continue}if(f+i[a]>e&&f>0&&i[a]>0){if(u.wordWrap===!1&&f<e){ht(D,c,e);continue}D.push("")}if(f+i[a]>e&&u.wordWrap===!1){ht(D,c,e);continue}D[D.length-1]+=c}u.trim!==!1&&(D=D.map(a=>Ss(a)));let o=[...D.join(`
4
+ `)];for(let[a,c]of o.entries()){if(r+=c,Me.has(c)){let{groups:l}=new RegExp(`(?:\\${Lu}(?<code>\\d+)m|\\${ft}(?<uri>.*)${ct})`).exec(o.slice(a).join(""))||{groups:{}};if(l.code!==void 0){let C=Number.parseFloat(l.code);n=C===bs?void 0:C}else l.uri!==void 0&&(s=l.uri.length===0?void 0:l.uri)}let f=Rs.codes.get(Number(n));o[a+1]===`
5
+ `?(s&&(r+=Wu("")),n&&f&&(r+=Mu(f))):c===`
6
+ `&&(n&&f&&(r+=Mu(n)),s&&(r+=Wu(s)))}return r};function Ts(t,e,u){return String(t).normalize().replace(/\r\n/g,`
7
+ `).split(`
8
+ `).map(r=>$s(r,e,u)).join(`
9
+ `)}var Gu=t=>Array.from({length:t}).fill("");function xs(t,e){let u=[],r=0;for(let n of t){let s=0,i=n.map(o=>{var a;let c=(a=e[r])!=null?a:"";r+=1,o.preprocess&&(c=o.preprocess(c)),Tu(c)>o.width&&(c=Ts(c,o.width,{hard:!0}));let f=c.split(`
10
+ `);if(o.postprocess){let{postprocess:l}=o;f=f.map((C,p)=>l.call(o,C,p))}return o.paddingTop&&f.unshift(...Gu(o.paddingTop)),o.paddingBottom&&f.push(...Gu(o.paddingBottom)),f.length>s&&(s=f.length),at(ke({},o),{lines:f})}),D=[];for(let o=0;o<s;o+=1){let a=i.map(c=>{var f;let l=(f=c.lines[o])!=null?f:"",C=Number.isFinite(c.width)?" ".repeat(c.width-ae(l)):"",p=c.paddingLeftString;return c.align==="right"&&(p+=C),p+=l,c.align==="left"&&(p+=C),p+c.paddingRightString}).join("");D.push(a)}u.push(D.join(`
11
+ `))}return u.join(`
12
+ `)}function Os(t,e){if(!t||t.length===0)return"";let u=Fs(t),r=u.length;if(r===0)return"";let{stdoutColumns:n,columns:s}=ds(e);if(s.length>r)throw new Error(`${s.length} columns defined, but only ${r} columns found`);let i=As(n,s,u);return t.map(D=>xs(i,D)).join(`
13
+ `)}K();var Ns=["<",">","=",">=","<="];function Ps(t){if(!Ns.includes(t))throw new TypeError(`Invalid breakpoint operator: ${t}`)}function Hs(t){let e=Object.keys(t).map(u=>{let[r,n]=u.split(" ");Ps(r);let s=Number.parseInt(n,10);if(Number.isNaN(s))throw new TypeError(`Invalid breakpoint value: ${n}`);let i=t[u];return{operator:r,breakpoint:s,value:i}}).sort((u,r)=>r.breakpoint-u.breakpoint);return u=>{var r;return(r=e.find(({operator:n,breakpoint:s})=>n==="="&&u===s||n===">"&&u>s||n==="<"&&u<s||n===">="&&u>=s||n==="<="&&u<=s))==null?void 0:r.value}}const Is=t=>t.replace(/[-_ ](\w)/g,(e,u)=>u.toUpperCase()),Ls=t=>t.replace(/\B([A-Z])/g,"-$1").toLowerCase(),ks={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:t=>t.trim()},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function Ms(t){let e=!1;const u=Object.keys(t).sort((r,n)=>r.localeCompare(n)).map(r=>{const n=t[r],s="alias"in n;return s&&(e=!0),{name:r,flag:n,flagFormatted:`--${Ls(r)}`,aliasesEnabled:e,aliasFormatted:s?`-${n.alias}`:void 0}}).map(r=>(r.aliasesEnabled=e,[{type:"flagName",data:r},{type:"flagDescription",data:r}]));return{type:"table",data:{tableData:u,tableBreakpoints:ks}}}const ju=t=>{var e;return!t||((e=t.version)!=null?e:t.help?t.help.version:void 0)},Uu=t=>{var e;const u="parent"in t&&((e=t.parent)==null?void 0:e.name);return(u?`${u} `:"")+t.name};function Ws(t){var e;const u=[];t.name&&u.push(Uu(t));const r=(e=ju(t))!=null?e:"parent"in t&&ju(t.parent);if(r&&u.push(`v${r}`),u.length!==0)return{id:"name",type:"text",data:`${u.join(" ")}
14
+ `}}function Gs(t){const{help:e}=t;if(!(!e||!e.description))return{id:"description",type:"text",data:`${e.description}
15
+ `}}function js(t){var e;const u=t.help||{};if("usage"in u)return u.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(u.usage)?u.usage.join(`
16
+ `):u.usage}}:void 0;if(t.name){const r=[],n=[Uu(t)];if(t.flags&&Object.keys(t.flags).length>0&&n.push("[flags...]"),t.parameters&&t.parameters.length>0){const{parameters:s}=t,i=s.indexOf("--"),D=i>-1&&s.slice(i+1).some(o=>o.startsWith("<"));n.push(s.map(o=>o!=="--"?o:D?"--":"[--]").join(" "))}if(n.length>1&&r.push(n.join(" ")),"commands"in t&&((e=t.commands)==null?void 0:e.length)&&r.push(`${t.name} <command>`),r.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:r.join(`
17
+ `)}}}}function Us(t){var e;if(!("commands"in t)||!((e=t.commands)!=null&&e.length))return;const u=t.commands.map(r=>[r.options.name,r.options.help?r.options.help.description:""]);return{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:u,tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}function Ks(t){if(!(!t.flags||Object.keys(t.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:Ms(t.flags),indentBody:0}}}function Vs(t){const{help:e}=t;if(!e||!e.examples||e.examples.length===0)return;let{examples:u}=e;if(Array.isArray(u)&&(u=u.join(`
18
+ `)),u)return{id:"examples",type:"section",data:{title:"Examples:",body:u}}}function zs(t){if(!("alias"in t)||!t.alias)return;const{alias:e}=t,u=Array.isArray(e)?e.join(", "):e;return{id:"aliases",type:"section",data:{title:"Aliases:",body:u}}}const Ys=t=>[Ws,Gs,js,Us,Ks,Vs,zs].map(e=>e(t)).filter(e=>Boolean(e)),qs=On.WriteStream.prototype.hasColors();class Xs{text(e){return e}bold(e){return qs?`\x1B[1m${e}\x1B[22m`:e.toLocaleUpperCase()}indentText({text:e,spaces:u}){return e.replace(/^/gm," ".repeat(u))}heading(e){return this.bold(e)}section({title:e,body:u,indentBody:r=2}){return`${(e?`${this.heading(e)}
19
+ `:"")+(u?this.indentText({text:this.render(u),spaces:r}):"")}
20
+ `}table({tableData:e,tableOptions:u,tableBreakpoints:r}){return Os(e.map(n=>n.map(s=>this.render(s))),r?Hs(r):u)}flagParameter(e){return e===Boolean?"":e===String?"<string>":e===Number?"<number>":Array.isArray(e)?this.flagParameter(e[0]):"<value>"}flagOperator(e){return" "}flagName(e){const{flag:u,flagFormatted:r,aliasesEnabled:n,aliasFormatted:s}=e;let i="";if(s?i+=`${s}, `:n&&(i+=" "),i+=r,"placeholder"in u&&typeof u.placeholder=="string")i+=`${this.flagOperator(e)}${u.placeholder}`;else{const D=this.flagParameter("type"in u?u.type:u);D&&(i+=`${this.flagOperator(e)}${D}`)}return i}flagDefault(e){return JSON.stringify(e)}flagDescription({flag:e}){var u;let r="description"in e&&(u=e.description)!=null?u:"";if("default"in e){let{default:n}=e;typeof n=="function"&&(n=n()),n&&(r+=` (default: ${this.flagDefault(n)})`)}return r}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(u=>this.render(u)).join(`
21
+ `);if("type"in e&&this[e.type]){const u=this[e.type];if(typeof u=="function")return u.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}}const dt=/^[\w.-]+$/;var Qs=Object.defineProperty,Zs=Object.defineProperties,Js=Object.getOwnPropertyDescriptors,Ku=Object.getOwnPropertySymbols,ei=Object.prototype.hasOwnProperty,ti=Object.prototype.propertyIsEnumerable,Vu=(t,e,u)=>e in t?Qs(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,he=(t,e)=>{for(var u in e||(e={}))ei.call(e,u)&&Vu(t,u,e[u]);if(Ku)for(var u of Ku(e))ti.call(e,u)&&Vu(t,u,e[u]);return t},Et=(t,e)=>Zs(t,Js(e));const{stringify:ee}=JSON,ui=/[|\\{}()[\]^$+*?.]/;function pt(t){const e=[];let u,r;for(const n of t){if(r)throw new Error(`Invalid parameter: Spread parameter ${ee(r)} must be last`);const s=n[0],i=n[n.length-1];let D;if(s==="<"&&i===">"&&(D=!0,u))throw new Error(`Invalid parameter: Required parameter ${ee(n)} cannot come after optional parameter ${ee(u)}`);if(s==="["&&i==="]"&&(D=!1,u=n),D===void 0)throw new Error(`Invalid parameter: ${ee(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let o=n.slice(1,-1);const a=o.slice(-3)==="...";a&&(r=n,o=o.slice(0,-3));const c=o.match(ui);if(c)throw new Error(`Invalid parameter: ${ee(n)}. Invalid character found ${ee(c[0])}`);e.push({name:o,required:D,spread:a})}return e}function Ct(t,e,u,r){for(let n=0;n<e.length;n+=1){const{name:s,required:i,spread:D}=e[n],o=Is(s);if(o in t)throw new Error(`Invalid parameter: ${ee(s)} is used more than once.`);const a=D?u.slice(n):u[n];if(D&&(n=e.length),i&&(!a||D&&a.length===0))return console.error(`Error: Missing required parameter ${ee(s)}
22
+ `),r(),process.exit(1);t[o]=a}}function ri(t){return t===void 0||t!==!1}function zu(t,e,u,r){const n=he({},e.flags),s=e.version;s&&(n.version={type:Boolean,description:"Show version"});const{help:i}=e,D=ri(i);D&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const o=es(n,r),a=()=>{console.log(e.version)};if(s&&o.flags.version===!0)return a(),process.exit(0);const c=new Xs,f=D&&(i==null?void 0:i.render)?i.render:p=>c.render(p),l=p=>{const F=Ys(Et(he(he({},e),p?{help:p}:{}),{flags:n}));console.log(f(F,c))};if(D&&o.flags.help===!0)return l(),process.exit(0);if(e.parameters){let{parameters:p}=e,F=o._;const A=p.indexOf("--"),B=p.slice(A+1),P=Object.create(null);if(A>-1&&B.length>0){p=p.slice(0,A);const S=o._["--"];F=F.slice(0,-S.length||void 0),Ct(P,pt(p),F,l),Ct(P,pt(B),S,l)}else Ct(P,pt(p),F,l);Object.assign(o._,P)}const C=Et(he({},o),{showVersion:a,showHelp:l});return typeof u=="function"&&u(C),he({command:t},C)}function ni(t,e){const u=new Map;for(const r of e){const n=[r.options.name],{alias:s}=r.options;s&&(Array.isArray(s)?n.push(...s):n.push(s));for(const i of n){if(u.has(i))throw new Error(`Duplicate command name found: ${ee(i)}`);u.set(i,r)}}return u.get(t)}function si(t,e,u=process.argv.slice(2)){if(!t)throw new Error("Options is required");if("name"in t&&(!t.name||!dt.test(t.name)))throw new Error(`Invalid script name: ${ee(t.name)}`);const r=u[0];if(t.commands&&dt.test(r)){const n=ni(r,t.commands);if(n)return zu(n.options.name,Et(he({},n.options),{parent:t}),n.callback,u.slice(1))}return zu(void 0,t,e,u)}function ii(t,e){if(!t)throw new Error("Command options are required");const{name:u}=t;if(t.name===void 0)throw new Error("Command name is required");if(!dt.test(u))throw new Error(`Invalid command name ${JSON.stringify(u)}. Command names must be one word.`);return{options:t,callback:e}}var Di="2.1.0",Ft=Nn(import.meta.url),oi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},de={exports:{}},gt,Yu;function ai(){if(Yu)return gt;Yu=1,gt=r,r.sync=n;var t=oe;function e(s,i){var D=i.pathExt!==void 0?i.pathExt:process.env.PATHEXT;if(!D||(D=D.split(";"),D.indexOf("")!==-1))return!0;for(var o=0;o<D.length;o++){var a=D[o].toLowerCase();if(a&&s.substr(-a.length).toLowerCase()===a)return!0}return!1}function u(s,i,D){return!s.isSymbolicLink()&&!s.isFile()?!1:e(i,D)}function r(s,i,D){t.stat(s,function(o,a){D(o,o?!1:u(a,s,i))})}function n(s,i){return u(t.statSync(s),s,i)}return gt}var mt,qu;function li(){if(qu)return mt;qu=1,mt=e,e.sync=u;var t=oe;function e(s,i,D){t.stat(s,function(o,a){D(o,o?!1:r(a,i))})}function u(s,i){return r(t.statSync(s),i)}function r(s,i){return s.isFile()&&n(s,i)}function n(s,i){var D=s.mode,o=s.uid,a=s.gid,c=i.uid!==void 0?i.uid:process.getuid&&process.getuid(),f=i.gid!==void 0?i.gid:process.getgid&&process.getgid(),l=parseInt("100",8),C=parseInt("010",8),p=parseInt("001",8),F=l|C,A=D&p||D&C&&a===f||D&l&&o===c||D&F&&c===0;return A}return mt}var We;process.platform==="win32"||oi.TESTING_WINDOWS?We=ai():We=li();var ci=_t;_t.sync=fi;function _t(t,e,u){if(typeof e=="function"&&(u=e,e={}),!u){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,n){_t(t,e||{},function(s,i){s?n(s):r(i)})})}We(t,e||{},function(r,n){r&&(r.code==="EACCES"||e&&e.ignoreErrors)&&(r=null,n=!1),u(r,n)})}function fi(t,e){try{return We.sync(t,e||{})}catch(u){if(e&&e.ignoreErrors||u.code==="EACCES")return!1;throw u}}const Ee=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Xu=z,hi=Ee?";":":",Qu=ci,Zu=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),Ju=(t,e)=>{const u=e.colon||hi,r=t.match(/\//)||Ee&&t.match(/\\/)?[""]:[...Ee?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(u)],n=Ee?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Ee?n.split(u):[""];return Ee&&t.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:r,pathExt:s,pathExtExe:n}},er=(t,e,u)=>{typeof e=="function"&&(u=e,e={}),e||(e={});const{pathEnv:r,pathExt:n,pathExtExe:s}=Ju(t,e),i=[],D=a=>new Promise((c,f)=>{if(a===r.length)return e.all&&i.length?c(i):f(Zu(t));const l=r[a],C=/^".*"$/.test(l)?l.slice(1,-1):l,p=Xu.join(C,t),F=!C&&/^\.[\\\/]/.test(t)?t.slice(0,2)+p:p;c(o(F,a,0))}),o=(a,c,f)=>new Promise((l,C)=>{if(f===n.length)return l(D(c+1));const p=n[f];Qu(a+p,{pathExt:s},(F,A)=>{if(!F&&A)if(e.all)i.push(a+p);else return l(a+p);return l(o(a,c,f+1))})});return u?D(0).then(a=>u(null,a),u):D(0)},di=(t,e)=>{e=e||{};const{pathEnv:u,pathExt:r,pathExtExe:n}=Ju(t,e),s=[];for(let i=0;i<u.length;i++){const D=u[i],o=/^".*"$/.test(D)?D.slice(1,-1):D,a=Xu.join(o,t),c=!o&&/^\.[\\\/]/.test(t)?t.slice(0,2)+a:a;for(let f=0;f<r.length;f++){const l=c+r[f];try{if(Qu.sync(l,{pathExt:n}))if(e.all)s.push(l);else return l}catch{}}}if(e.all&&s.length)return s;if(e.nothrow)return null;throw Zu(t)};var Ei=er;er.sync=di;var At={exports:{}};const tr=(t={})=>{const e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};At.exports=tr,At.exports.default=tr;const ur=z,pi=Ei,Ci=At.exports;function rr(t,e){const u=t.options.env||process.env,r=process.cwd(),n=t.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(t.options.cwd)}catch{}let i;try{i=pi.sync(t.command,{path:u[Ci({env:u})],pathExt:e?ur.delimiter:void 0})}catch{}finally{s&&process.chdir(r)}return i&&(i=ur.resolve(n?t.options.cwd:"",i)),i}function Fi(t){return rr(t)||rr(t,!0)}var gi=Fi,yt={};const wt=/([()\][%!^"`<>&|;, *?])/g;function mi(t){return t=t.replace(wt,"^$1"),t}function _i(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(wt,"^$1"),e&&(t=t.replace(wt,"^$1")),t}yt.command=mi,yt.argument=_i;var Ai=/^#!(.*)/;const yi=Ai;var wi=(t="")=>{const e=t.match(yi);if(!e)return null;const[u,r]=e[0].replace(/#! ?/,"").split(" "),n=u.split("/").pop();return n==="env"?r:r?`${n} ${r}`:n};const Rt=oe,Ri=wi;function bi(t){const u=Buffer.alloc(150);let r;try{r=Rt.openSync(t,"r"),Rt.readSync(r,u,0,150,0),Rt.closeSync(r)}catch{}return Ri(u.toString())}var vi=bi;const Bi=z,nr=gi,sr=yt,Si=vi,$i=process.platform==="win32",Ti=/\.(?:com|exe)$/i,xi=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Oi(t){t.file=nr(t);const e=t.file&&Si(t.file);return e?(t.args.unshift(t.file),t.command=e,nr(t)):t.file}function Ni(t){if(!$i)return t;const e=Oi(t),u=!Ti.test(e);if(t.options.forceShell||u){const r=xi.test(e);t.command=Bi.normalize(t.command),t.command=sr.command(t.command),t.args=t.args.map(s=>sr.argument(s,r));const n=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${n}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function Pi(t,e,u){e&&!Array.isArray(e)&&(u=e,e=null),e=e?e.slice(0):[],u=Object.assign({},u);const r={command:t,args:e,options:u,file:void 0,original:{command:t,args:e}};return u.shell?r:Ni(r)}var Hi=Pi;const bt=process.platform==="win32";function vt(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function Ii(t,e){if(!bt)return;const u=t.emit;t.emit=function(r,n){if(r==="exit"){const s=ir(n,e);if(s)return u.call(t,"error",s)}return u.apply(t,arguments)}}function ir(t,e){return bt&&t===1&&!e.file?vt(e.original,"spawn"):null}function Li(t,e){return bt&&t===1&&!e.file?vt(e.original,"spawnSync"):null}var ki={hookChildProcess:Ii,verifyENOENT:ir,verifyENOENTSync:Li,notFoundError:vt};const Dr=In,Bt=Hi,St=ki;function or(t,e,u){const r=Bt(t,e,u),n=Dr.spawn(r.command,r.args,r.options);return St.hookChildProcess(n,r),n}function Mi(t,e,u){const r=Bt(t,e,u),n=Dr.spawnSync(r.command,r.args,r.options);return n.error=n.error||St.verifyENOENTSync(n.status,r),n}de.exports=or,de.exports.spawn=or,de.exports.sync=Mi,de.exports._parse=Bt,de.exports._enoent=St;const Wi="(Use `node --trace-warnings ...` to show where the warning was created)",ar=/^\(node:\d+\) (.+)\n/m,Gi=()=>{const t=["ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time","ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time"];let e=!0,u=0;return new kn({transform(r,n,s){if(!e)return s(null,r);u+=1,u>10&&(e=!1);const i=r.toString(),D=i.match(ar);if(!D)return s(null,r);const[,o]=D,a=t.indexOf(o);if(a===-1)return s(null,r);t.splice(a,1),t.length===0&&(e=!1);const c=i.replace(ar,"").replace(Wi,"").trim();s(null,c)}})};var ji=Object.defineProperty,lr=Object.getOwnPropertySymbols,Ui=Object.prototype.hasOwnProperty,Ki=Object.prototype.propertyIsEnumerable,cr=(t,e,u)=>e in t?ji(t,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):t[e]=u,Vi=(t,e)=>{for(var u in e||(e={}))Ui.call(e,u)&&cr(t,u,e[u]);if(lr)for(var u of lr(e))Ki.call(e,u)&&cr(t,u,e[u]);return t};function fr(t,e){const u=Vi({},process.env);e!=null&&e.noCache&&(u.ESBK_DISABLE_CACHE="1");const r=["inherit","inherit","pipe"];e!=null&&e.ipc&&r.push("ipc");const n=de.exports(process.execPath,["--loader",Pn(Ft.resolve("@esbuild-kit/esm-loader")).toString(),"--require",Ft.resolve("@esbuild-kit/cjs-loader"),...t],{stdio:r,env:u});return n.stderr.pipe(Gi()).pipe(process.stderr),n}var $t={exports:{}},Ge={};const zi=z,te="\\\\/",hr=`[^${te}]`,ue="\\.",Yi="\\+",qi="\\?",je="\\/",Xi="(?=.)",dr="[^/]",Tt=`(?:${je}|$)`,Er=`(?:^|${je})`,xt=`${ue}{1,2}${Tt}`,Qi=`(?!${ue})`,Zi=`(?!${Er}${xt})`,Ji=`(?!${ue}{0,1}${Tt})`,eD=`(?!${xt})`,tD=`[^.${je}]`,uD=`${dr}*?`,pr={DOT_LITERAL:ue,PLUS_LITERAL:Yi,QMARK_LITERAL:qi,SLASH_LITERAL:je,ONE_CHAR:Xi,QMARK:dr,END_ANCHOR:Tt,DOTS_SLASH:xt,NO_DOT:Qi,NO_DOTS:Zi,NO_DOT_SLASH:Ji,NO_DOTS_SLASH:eD,QMARK_NO_DOT:tD,STAR:uD,START_ANCHOR:Er},rD=De(M({},pr),{SLASH_LITERAL:`[${te}]`,QMARK:hr,STAR:`${hr}*?`,DOTS_SLASH:`${ue}{1,2}(?:[${te}]|$)`,NO_DOT:`(?!${ue})`,NO_DOTS:`(?!(?:^|[${te}])${ue}{1,2}(?:[${te}]|$))`,NO_DOT_SLASH:`(?!${ue}{0,1}(?:[${te}]|$))`,NO_DOTS_SLASH:`(?!${ue}{1,2}(?:[${te}]|$))`,QMARK_NO_DOT:`[^.${te}]`,START_ANCHOR:`(?:^|[${te}])`,END_ANCHOR:`(?:[${te}]|$)`}),nD={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};var Ue={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:nD,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:zi.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?rD:pr}};(function(t){const e=z,u=process.platform==="win32",{REGEX_BACKSLASH:r,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:i}=Ue;t.isObject=D=>D!==null&&typeof D=="object"&&!Array.isArray(D),t.hasRegexChars=D=>s.test(D),t.isRegexChar=D=>D.length===1&&t.hasRegexChars(D),t.escapeRegex=D=>D.replace(i,"\\$1"),t.toPosixSlashes=D=>D.replace(r,"/"),t.removeBackslashes=D=>D.replace(n,o=>o==="\\"?"":o),t.supportsLookbehinds=()=>{const D=process.version.slice(1).split(".").map(Number);return D.length===3&&D[0]>=9||D[0]===8&&D[1]>=10},t.isWindows=D=>D&&typeof D.windows=="boolean"?D.windows:u===!0||e.sep==="\\",t.escapeLast=(D,o,a)=>{const c=D.lastIndexOf(o,a);return c===-1?D:D[c-1]==="\\"?t.escapeLast(D,o,c-1):`${D.slice(0,c)}\\${D.slice(c)}`},t.removePrefix=(D,o={})=>{let a=D;return a.startsWith("./")&&(a=a.slice(2),o.prefix="./"),a},t.wrapOutput=(D,o={},a={})=>{const c=a.contains?"":"^",f=a.contains?"":"$";let l=`${c}(?:${D})${f}`;return o.negated===!0&&(l=`(?:^(?!${l}).*$)`),l}})(Ge);const Cr=Ge,{CHAR_ASTERISK:Ot,CHAR_AT:sD,CHAR_BACKWARD_SLASH:ye,CHAR_COMMA:iD,CHAR_DOT:Nt,CHAR_EXCLAMATION_MARK:Pt,CHAR_FORWARD_SLASH:Fr,CHAR_LEFT_CURLY_BRACE:Ht,CHAR_LEFT_PARENTHESES:It,CHAR_LEFT_SQUARE_BRACKET:DD,CHAR_PLUS:oD,CHAR_QUESTION_MARK:gr,CHAR_RIGHT_CURLY_BRACE:aD,CHAR_RIGHT_PARENTHESES:mr,CHAR_RIGHT_SQUARE_BRACKET:lD}=Ue,_r=t=>t===Fr||t===ye,Ar=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},cD=(t,e)=>{const u=e||{},r=t.length-1,n=u.parts===!0||u.scanToEnd===!0,s=[],i=[],D=[];let o=t,a=-1,c=0,f=0,l=!1,C=!1,p=!1,F=!1,A=!1,B=!1,P=!1,S=!1,Q=!1,W=!1,ne=0,G,_,b={value:"",depth:0,isGlob:!1};const k=()=>a>=r,E=()=>o.charCodeAt(a+1),x=()=>(G=_,o.charCodeAt(++a));for(;a<r;){_=x();let j;if(_===ye){P=b.backslashes=!0,_=x(),_===Ht&&(B=!0);continue}if(B===!0||_===Ht){for(ne++;k()!==!0&&(_=x());){if(_===ye){P=b.backslashes=!0,x();continue}if(_===Ht){ne++;continue}if(B!==!0&&_===Nt&&(_=x())===Nt){if(l=b.isBrace=!0,p=b.isGlob=!0,W=!0,n===!0)continue;break}if(B!==!0&&_===iD){if(l=b.isBrace=!0,p=b.isGlob=!0,W=!0,n===!0)continue;break}if(_===aD&&(ne--,ne===0)){B=!1,l=b.isBrace=!0,W=!0;break}}if(n===!0)continue;break}if(_===Fr){if(s.push(a),i.push(b),b={value:"",depth:0,isGlob:!1},W===!0)continue;if(G===Nt&&a===c+1){c+=2;continue}f=a+1;continue}if(u.noext!==!0&&(_===oD||_===sD||_===Ot||_===gr||_===Pt)===!0&&E()===It){if(p=b.isGlob=!0,F=b.isExtglob=!0,W=!0,_===Pt&&a===c&&(Q=!0),n===!0){for(;k()!==!0&&(_=x());){if(_===ye){P=b.backslashes=!0,_=x();continue}if(_===mr){p=b.isGlob=!0,W=!0;break}}continue}break}if(_===Ot){if(G===Ot&&(A=b.isGlobstar=!0),p=b.isGlob=!0,W=!0,n===!0)continue;break}if(_===gr){if(p=b.isGlob=!0,W=!0,n===!0)continue;break}if(_===DD){for(;k()!==!0&&(j=x());){if(j===ye){P=b.backslashes=!0,x();continue}if(j===lD){C=b.isBracket=!0,p=b.isGlob=!0,W=!0;break}}if(n===!0)continue;break}if(u.nonegate!==!0&&_===Pt&&a===c){S=b.negated=!0,c++;continue}if(u.noparen!==!0&&_===It){if(p=b.isGlob=!0,n===!0){for(;k()!==!0&&(_=x());){if(_===It){P=b.backslashes=!0,_=x();continue}if(_===mr){W=!0;break}}continue}break}if(p===!0){if(W=!0,n===!0)continue;break}}u.noext===!0&&(F=!1,p=!1);let $=o,se="",h="";c>0&&(se=o.slice(0,c),o=o.slice(c),f-=c),$&&p===!0&&f>0?($=o.slice(0,f),h=o.slice(f)):p===!0?($="",h=o):$=o,$&&$!==""&&$!=="/"&&$!==o&&_r($.charCodeAt($.length-1))&&($=$.slice(0,-1)),u.unescape===!0&&(h&&(h=Cr.removeBackslashes(h)),$&&P===!0&&($=Cr.removeBackslashes($)));const d={prefix:se,input:t,start:c,base:$,glob:h,isBrace:l,isBracket:C,isGlob:p,isExtglob:F,isGlobstar:A,negated:S,negatedExtglob:Q};if(u.tokens===!0&&(d.maxDepth=0,_r(_)||i.push(b),d.tokens=i),u.parts===!0||u.tokens===!0){let j;for(let R=0;R<s.length;R++){const Z=j?j+1:c,J=s[R],V=t.slice(Z,J);u.tokens&&(R===0&&c!==0?(i[R].isPrefix=!0,i[R].value=se):i[R].value=V,Ar(i[R]),d.maxDepth+=i[R].depth),(R!==0||V!=="")&&D.push(V),j=J}if(j&&j+1<t.length){const R=t.slice(j+1);D.push(R),u.tokens&&(i[i.length-1].value=R,Ar(i[i.length-1]),d.maxDepth+=i[i.length-1].depth)}d.slashes=s,d.parts=D}return d};var fD=cD;const Ke=Ue,Y=Ge,{MAX_LENGTH:Ve,POSIX_REGEX_SOURCE:hD,REGEX_NON_SPECIAL_CHARS:dD,REGEX_SPECIAL_CHARS_BACKREF:ED,REPLACEMENTS:yr}=Ke,pD=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();const u=`[${t.join("-")}]`;try{new RegExp(u)}catch{return t.map(n=>Y.escapeRegex(n)).join("..")}return u},pe=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Lt=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=yr[t]||t;const u=M({},e),r=typeof u.maxLength=="number"?Math.min(Ve,u.maxLength):Ve;let n=t.length;if(n>r)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${r}`);const s={type:"bos",value:"",output:u.prepend||""},i=[s],D=u.capture?"":"?:",o=Y.isWindows(e),a=Ke.globChars(o),c=Ke.extglobChars(a),{DOT_LITERAL:f,PLUS_LITERAL:l,SLASH_LITERAL:C,ONE_CHAR:p,DOTS_SLASH:F,NO_DOT:A,NO_DOT_SLASH:B,NO_DOTS_SLASH:P,QMARK:S,QMARK_NO_DOT:Q,STAR:W,START_ANCHOR:ne}=a,G=m=>`(${D}(?:(?!${ne}${m.dot?F:f}).)*?)`,_=u.dot?"":A,b=u.dot?S:Q;let k=u.bash===!0?G(u):W;u.capture&&(k=`(${k})`),typeof u.noext=="boolean"&&(u.noextglob=u.noext);const E={input:t,index:-1,start:0,dot:u.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};t=Y.removePrefix(t,E),n=t.length;const x=[],$=[],se=[];let h=s,d;const j=()=>E.index===n-1,R=E.peek=(m=1)=>t[E.index+m],Z=E.advance=()=>t[++E.index]||"",J=()=>t.slice(E.index+1),V=(m="",T=0)=>{E.consumed+=m,E.index+=T},Oe=m=>{E.output+=m.output!=null?m.output:m.value,V(m.value)},bn=()=>{let m=1;for(;R()==="!"&&(R(2)!=="("||R(3)==="?");)Z(),E.start++,m++;return m%2===0?!1:(E.negated=!0,E.start++,!0)},Ne=m=>{E[m]++,se.push(m)},ie=m=>{E[m]--,se.pop()},w=m=>{if(h.type==="globstar"){const T=E.braces>0&&(m.type==="comma"||m.type==="brace"),g=m.extglob===!0||x.length&&(m.type==="pipe"||m.type==="paren");m.type!=="slash"&&m.type!=="paren"&&!T&&!g&&(E.output=E.output.slice(0,-h.output.length),h.type="star",h.value="*",h.output=k,E.output+=h.output)}if(x.length&&m.type!=="paren"&&(x[x.length-1].inner+=m.value),(m.value||m.output)&&Oe(m),h&&h.type==="text"&&m.type==="text"){h.value+=m.value,h.output=(h.output||"")+m.value;return}m.prev=h,i.push(m),h=m},Pe=(m,T)=>{const g=De(M({},c[T]),{conditions:1,inner:""});g.prev=h,g.parens=E.parens,g.output=E.output;const y=(u.capture?"(":"")+g.open;Ne("parens"),w({type:m,value:T,output:E.output?"":p}),w({type:"paren",extglob:!0,value:Z(),output:y}),x.push(g)},vn=m=>{let T=m.close+(u.capture?")":""),g;if(m.type==="negate"){let y=k;if(m.inner&&m.inner.length>1&&m.inner.includes("/")&&(y=G(u)),(y!==k||j()||/^\)+$/.test(J()))&&(T=m.close=`)$))${y}`),m.inner.includes("*")&&(g=J())&&/^\.[^\\/.]+$/.test(g)){const O=Lt(g,De(M({},e),{fastpaths:!1})).output;T=m.close=`)${O})${y})`}m.prev.type==="bos"&&(E.negatedExtglob=!0)}w({type:"paren",extglob:!0,value:d,output:T}),ie("parens")};if(u.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let m=!1,T=t.replace(ED,(g,y,O,U,H,it)=>U==="\\"?(m=!0,g):U==="?"?y?y+U+(H?S.repeat(H.length):""):it===0?b+(H?S.repeat(H.length):""):S.repeat(O.length):U==="."?f.repeat(O.length):U==="*"?y?y+U+(H?k:""):k:y?g:`\\${g}`);return m===!0&&(u.unescape===!0?T=T.replace(/\\/g,""):T=T.replace(/\\+/g,g=>g.length%2===0?"\\\\":g?"\\":"")),T===t&&u.contains===!0?(E.output=t,E):(E.output=Y.wrapOutput(T,E,e),E)}for(;!j();){if(d=Z(),d==="\0")continue;if(d==="\\"){const g=R();if(g==="/"&&u.bash!==!0||g==="."||g===";")continue;if(!g){d+="\\",w({type:"text",value:d});continue}const y=/^\\+/.exec(J());let O=0;if(y&&y[0].length>2&&(O=y[0].length,E.index+=O,O%2!==0&&(d+="\\")),u.unescape===!0?d=Z():d+=Z(),E.brackets===0){w({type:"text",value:d});continue}}if(E.brackets>0&&(d!=="]"||h.value==="["||h.value==="[^")){if(u.posix!==!1&&d===":"){const g=h.value.slice(1);if(g.includes("[")&&(h.posix=!0,g.includes(":"))){const y=h.value.lastIndexOf("["),O=h.value.slice(0,y),U=h.value.slice(y+2),H=hD[U];if(H){h.value=O+H,E.backtrack=!0,Z(),!s.output&&i.indexOf(h)===1&&(s.output=p);continue}}}(d==="["&&R()!==":"||d==="-"&&R()==="]")&&(d=`\\${d}`),d==="]"&&(h.value==="["||h.value==="[^")&&(d=`\\${d}`),u.posix===!0&&d==="!"&&h.value==="["&&(d="^"),h.value+=d,Oe({value:d});continue}if(E.quotes===1&&d!=='"'){d=Y.escapeRegex(d),h.value+=d,Oe({value:d});continue}if(d==='"'){E.quotes=E.quotes===1?0:1,u.keepQuotes===!0&&w({type:"text",value:d});continue}if(d==="("){Ne("parens"),w({type:"paren",value:d});continue}if(d===")"){if(E.parens===0&&u.strictBrackets===!0)throw new SyntaxError(pe("opening","("));const g=x[x.length-1];if(g&&E.parens===g.parens+1){vn(x.pop());continue}w({type:"paren",value:d,output:E.parens?")":"\\)"}),ie("parens");continue}if(d==="["){if(u.nobracket===!0||!J().includes("]")){if(u.nobracket!==!0&&u.strictBrackets===!0)throw new SyntaxError(pe("closing","]"));d=`\\${d}`}else Ne("brackets");w({type:"bracket",value:d});continue}if(d==="]"){if(u.nobracket===!0||h&&h.type==="bracket"&&h.value.length===1){w({type:"text",value:d,output:`\\${d}`});continue}if(E.brackets===0){if(u.strictBrackets===!0)throw new SyntaxError(pe("opening","["));w({type:"text",value:d,output:`\\${d}`});continue}ie("brackets");const g=h.value.slice(1);if(h.posix!==!0&&g[0]==="^"&&!g.includes("/")&&(d=`/${d}`),h.value+=d,Oe({value:d}),u.literalBrackets===!1||Y.hasRegexChars(g))continue;const y=Y.escapeRegex(h.value);if(E.output=E.output.slice(0,-h.value.length),u.literalBrackets===!0){E.output+=y,h.value=y;continue}h.value=`(${D}${y}|${h.value})`,E.output+=h.value;continue}if(d==="{"&&u.nobrace!==!0){Ne("braces");const g={type:"brace",value:d,output:"(",outputIndex:E.output.length,tokensIndex:E.tokens.length};$.push(g),w(g);continue}if(d==="}"){const g=$[$.length-1];if(u.nobrace===!0||!g){w({type:"text",value:d,output:d});continue}let y=")";if(g.dots===!0){const O=i.slice(),U=[];for(let H=O.length-1;H>=0&&(i.pop(),O[H].type!=="brace");H--)O[H].type!=="dots"&&U.unshift(O[H].value);y=pD(U,u),E.backtrack=!0}if(g.comma!==!0&&g.dots!==!0){const O=E.output.slice(0,g.outputIndex),U=E.tokens.slice(g.tokensIndex);g.value=g.output="\\{",d=y="\\}",E.output=O;for(const H of U)E.output+=H.output||H.value}w({type:"brace",value:d,output:y}),ie("braces"),$.pop();continue}if(d==="|"){x.length>0&&x[x.length-1].conditions++,w({type:"text",value:d});continue}if(d===","){let g=d;const y=$[$.length-1];y&&se[se.length-1]==="braces"&&(y.comma=!0,g="|"),w({type:"comma",value:d,output:g});continue}if(d==="/"){if(h.type==="dot"&&E.index===E.start+1){E.start=E.index+1,E.consumed="",E.output="",i.pop(),h=s;continue}w({type:"slash",value:d,output:C});continue}if(d==="."){if(E.braces>0&&h.type==="dot"){h.value==="."&&(h.output=f);const g=$[$.length-1];h.type="dots",h.output+=d,h.value+=d,g.dots=!0;continue}if(E.braces+E.parens===0&&h.type!=="bos"&&h.type!=="slash"){w({type:"text",value:d,output:f});continue}w({type:"dot",value:d,output:f});continue}if(d==="?"){if(!(h&&h.value==="(")&&u.noextglob!==!0&&R()==="("&&R(2)!=="?"){Pe("qmark",d);continue}if(h&&h.type==="paren"){const y=R();let O=d;if(y==="<"&&!Y.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(h.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(J()))&&(O=`\\${d}`),w({type:"text",value:d,output:O});continue}if(u.dot!==!0&&(h.type==="slash"||h.type==="bos")){w({type:"qmark",value:d,output:Q});continue}w({type:"qmark",value:d,output:S});continue}if(d==="!"){if(u.noextglob!==!0&&R()==="("&&(R(2)!=="?"||!/[!=<:]/.test(R(3)))){Pe("negate",d);continue}if(u.nonegate!==!0&&E.index===0){bn();continue}}if(d==="+"){if(u.noextglob!==!0&&R()==="("&&R(2)!=="?"){Pe("plus",d);continue}if(h&&h.value==="("||u.regex===!1){w({type:"plus",value:d,output:l});continue}if(h&&(h.type==="bracket"||h.type==="paren"||h.type==="brace")||E.parens>0){w({type:"plus",value:d});continue}w({type:"plus",value:l});continue}if(d==="@"){if(u.noextglob!==!0&&R()==="("&&R(2)!=="?"){w({type:"at",extglob:!0,value:d,output:""});continue}w({type:"text",value:d});continue}if(d!=="*"){(d==="$"||d==="^")&&(d=`\\${d}`);const g=dD.exec(J());g&&(d+=g[0],E.index+=g[0].length),w({type:"text",value:d});continue}if(h&&(h.type==="globstar"||h.star===!0)){h.type="star",h.star=!0,h.value+=d,h.output=k,E.backtrack=!0,E.globstar=!0,V(d);continue}let m=J();if(u.noextglob!==!0&&/^\([^?]/.test(m)){Pe("star",d);continue}if(h.type==="star"){if(u.noglobstar===!0){V(d);continue}const g=h.prev,y=g.prev,O=g.type==="slash"||g.type==="bos",U=y&&(y.type==="star"||y.type==="globstar");if(u.bash===!0&&(!O||m[0]&&m[0]!=="/")){w({type:"star",value:d,output:""});continue}const H=E.braces>0&&(g.type==="comma"||g.type==="brace"),it=x.length&&(g.type==="pipe"||g.type==="paren");if(!O&&g.type!=="paren"&&!H&&!it){w({type:"star",value:d,output:""});continue}for(;m.slice(0,3)==="/**";){const He=t[E.index+4];if(He&&He!=="/")break;m=m.slice(3),V("/**",3)}if(g.type==="bos"&&j()){h.type="globstar",h.value+=d,h.output=G(u),E.output=h.output,E.globstar=!0,V(d);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&!U&&j()){E.output=E.output.slice(0,-(g.output+h.output).length),g.output=`(?:${g.output}`,h.type="globstar",h.output=G(u)+(u.strictSlashes?")":"|$)"),h.value+=d,E.globstar=!0,E.output+=g.output+h.output,V(d);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&m[0]==="/"){const He=m[1]!==void 0?"|$":"";E.output=E.output.slice(0,-(g.output+h.output).length),g.output=`(?:${g.output}`,h.type="globstar",h.output=`${G(u)}${C}|${C}${He})`,h.value+=d,E.output+=g.output+h.output,E.globstar=!0,V(d+Z()),w({type:"slash",value:"/",output:""});continue}if(g.type==="bos"&&m[0]==="/"){h.type="globstar",h.value+=d,h.output=`(?:^|${C}|${G(u)}${C})`,E.output=h.output,E.globstar=!0,V(d+Z()),w({type:"slash",value:"/",output:""});continue}E.output=E.output.slice(0,-h.output.length),h.type="globstar",h.output=G(u),h.value+=d,E.output+=h.output,E.globstar=!0,V(d);continue}const T={type:"star",value:d,output:k};if(u.bash===!0){T.output=".*?",(h.type==="bos"||h.type==="slash")&&(T.output=_+T.output),w(T);continue}if(h&&(h.type==="bracket"||h.type==="paren")&&u.regex===!0){T.output=d,w(T);continue}(E.index===E.start||h.type==="slash"||h.type==="dot")&&(h.type==="dot"?(E.output+=B,h.output+=B):u.dot===!0?(E.output+=P,h.output+=P):(E.output+=_,h.output+=_),R()!=="*"&&(E.output+=p,h.output+=p)),w(T)}for(;E.brackets>0;){if(u.strictBrackets===!0)throw new SyntaxError(pe("closing","]"));E.output=Y.escapeLast(E.output,"["),ie("brackets")}for(;E.parens>0;){if(u.strictBrackets===!0)throw new SyntaxError(pe("closing",")"));E.output=Y.escapeLast(E.output,"("),ie("parens")}for(;E.braces>0;){if(u.strictBrackets===!0)throw new SyntaxError(pe("closing","}"));E.output=Y.escapeLast(E.output,"{"),ie("braces")}if(u.strictSlashes!==!0&&(h.type==="star"||h.type==="bracket")&&w({type:"maybe_slash",value:"",output:`${C}?`}),E.backtrack===!0){E.output="";for(const m of E.tokens)E.output+=m.output!=null?m.output:m.value,m.suffix&&(E.output+=m.suffix)}return E};Lt.fastpaths=(t,e)=>{const u=M({},e),r=typeof u.maxLength=="number"?Math.min(Ve,u.maxLength):Ve,n=t.length;if(n>r)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${r}`);t=yr[t]||t;const s=Y.isWindows(e),{DOT_LITERAL:i,SLASH_LITERAL:D,ONE_CHAR:o,DOTS_SLASH:a,NO_DOT:c,NO_DOTS:f,NO_DOTS_SLASH:l,STAR:C,START_ANCHOR:p}=Ke.globChars(s),F=u.dot?f:c,A=u.dot?l:c,B=u.capture?"":"?:",P={negated:!1,prefix:""};let S=u.bash===!0?".*?":C;u.capture&&(S=`(${S})`);const Q=_=>_.noglobstar===!0?S:`(${B}(?:(?!${p}${_.dot?a:i}).)*?)`,W=_=>{switch(_){case"*":return`${F}${o}${S}`;case".*":return`${i}${o}${S}`;case"*.*":return`${F}${S}${i}${o}${S}`;case"*/*":return`${F}${S}${D}${o}${A}${S}`;case"**":return F+Q(u);case"**/*":return`(?:${F}${Q(u)}${D})?${A}${o}${S}`;case"**/*.*":return`(?:${F}${Q(u)}${D})?${A}${S}${i}${o}${S}`;case"**/.*":return`(?:${F}${Q(u)}${D})?${i}${o}${S}`;default:{const b=/^(.*?)\.(\w+)$/.exec(_);if(!b)return;const k=W(b[1]);return k?k+i+b[2]:void 0}}},ne=Y.removePrefix(t,P);let G=W(ne);return G&&u.strictSlashes!==!0&&(G+=`${D}?`),G};var CD=Lt;const FD=z,gD=fD,kt=CD,Mt=Ge,mD=Ue,_D=t=>t&&typeof t=="object"&&!Array.isArray(t),N=(t,e,u=!1)=>{if(Array.isArray(t)){const c=t.map(l=>N(l,e,u));return l=>{for(const C of c){const p=C(l);if(p)return p}return!1}}const r=_D(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");const n=e||{},s=Mt.isWindows(e),i=r?N.compileRe(t,e):N.makeRe(t,e,!1,!0),D=i.state;delete i.state;let o=()=>!1;if(n.ignore){const c=De(M({},e),{ignore:null,onMatch:null,onResult:null});o=N(n.ignore,c,u)}const a=(c,f=!1)=>{const{isMatch:l,match:C,output:p}=N.test(c,i,e,{glob:t,posix:s}),F={glob:t,state:D,regex:i,posix:s,input:c,output:p,match:C,isMatch:l};return typeof n.onResult=="function"&&n.onResult(F),l===!1?(F.isMatch=!1,f?F:!1):o(c)?(typeof n.onIgnore=="function"&&n.onIgnore(F),F.isMatch=!1,f?F:!1):(typeof n.onMatch=="function"&&n.onMatch(F),f?F:!0)};return u&&(a.state=D),a};N.test=(t,e,u,{glob:r,posix:n}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};const s=u||{},i=s.format||(n?Mt.toPosixSlashes:null);let D=t===r,o=D&&i?i(t):t;return D===!1&&(o=i?i(t):t,D=o===r),(D===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?D=N.matchBase(t,e,u,n):D=e.exec(o)),{isMatch:Boolean(D),match:D,output:o}},N.matchBase=(t,e,u,r=Mt.isWindows(u))=>(e instanceof RegExp?e:N.makeRe(e,u)).test(FD.basename(t)),N.isMatch=(t,e,u)=>N(e,u)(t),N.parse=(t,e)=>Array.isArray(t)?t.map(u=>N.parse(u,e)):kt(t,De(M({},e),{fastpaths:!1})),N.scan=(t,e)=>gD(t,e),N.compileRe=(t,e,u=!1,r=!1)=>{if(u===!0)return t.output;const n=e||{},s=n.contains?"":"^",i=n.contains?"":"$";let D=`${s}(?:${t.output})${i}`;t&&t.negated===!0&&(D=`^(?!${D}).*$`);const o=N.toRegex(D,e);return r===!0&&(o.state=t),o},N.makeRe=(t,e={},u=!1,r=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(n.output=kt.fastpaths(t,e)),n.output||(n=kt(t,e)),N.compileRe(n,e,u,r)},N.toRegex=(t,e)=>{try{const u=e||{};return new RegExp(t,u.flags||(u.nocase?"i":""))}catch(u){if(e&&e.debug===!0)throw u;return/$^/}},N.constants=mD;var AD=N;(function(t){t.exports=AD})($t);const we=oe,{Readable:yD}=Ln,Re=z,{promisify:ze}=_e,Wt=$t.exports,wD=ze(we.readdir),RD=ze(we.stat),wr=ze(we.lstat),bD=ze(we.realpath),vD="!",Rr="READDIRP_RECURSIVE_ERROR",BD=new Set(["ENOENT","EPERM","EACCES","ELOOP",Rr]),Gt="files",br="directories",Ye="files_directories",qe="all",vr=[Gt,br,Ye,qe],SD=t=>BD.has(t.code),[Br,$D]=process.versions.node.split(".").slice(0,2).map(t=>Number.parseInt(t,10)),TD=process.platform==="win32"&&(Br>10||Br===10&&$D>=5),Sr=t=>{if(t!==void 0){if(typeof t=="function")return t;if(typeof t=="string"){const e=Wt(t.trim());return u=>e(u.basename)}if(Array.isArray(t)){const e=[],u=[];for(const r of t){const n=r.trim();n.charAt(0)===vD?u.push(Wt(n.slice(1))):e.push(Wt(n))}return u.length>0?e.length>0?r=>e.some(n=>n(r.basename))&&!u.some(n=>n(r.basename)):r=>!u.some(n=>n(r.basename)):r=>e.some(n=>n(r.basename))}}};class st extends yD{static get defaultOptions(){return{root:".",fileFilter:e=>!0,directoryFilter:e=>!0,type:Gt,lstat:!1,depth:2147483648,alwaysStat:!1}}constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark||4096});const u=M(M({},st.defaultOptions),e),{root:r,type:n}=u;this._fileFilter=Sr(u.fileFilter),this._directoryFilter=Sr(u.directoryFilter);const s=u.lstat?wr:RD;TD?this._stat=i=>s(i,{bigint:!0}):this._stat=s,this._maxDepth=u.depth,this._wantsDir=[br,Ye,qe].includes(n),this._wantsFile=[Gt,Ye,qe].includes(n),this._wantsEverything=n===qe,this._root=Re.resolve(r),this._isDirent="Dirent"in we&&!u.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(r,1)],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){const{path:u,depth:r,files:n=[]}=this.parent||{};if(n.length>0){const s=n.splice(0,e).map(i=>this._formatEntry(i,u));for(const i of await Promise.all(s)){if(this.destroyed)return;const D=await this._getEntryType(i);D==="directory"&&this._directoryFilter(i)?(r<=this._maxDepth&&this.parents.push(this._exploreDir(i.fullPath,r+1)),this._wantsDir&&(this.push(i),e--)):(D==="file"||this._includeAsFile(i))&&this._fileFilter(i)&&this._wantsFile&&(this.push(i),e--)}}else{const s=this.parents.pop();if(!s){this.push(null);break}if(this.parent=await s,this.destroyed)return}}}catch(u){this.destroy(u)}finally{this.reading=!1}}}async _exploreDir(e,u){let r;try{r=await wD(e,this._rdOptions)}catch(n){this._onError(n)}return{files:r,depth:u,path:e}}async _formatEntry(e,u){let r;try{const n=this._isDirent?e.name:e,s=Re.resolve(Re.join(u,n));r={path:Re.relative(this._root,s),fullPath:s,basename:n},r[this._statsProp]=this._isDirent?e:await this._stat(s)}catch(n){this._onError(n)}return r}_onError(e){SD(e)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}async _getEntryType(e){const u=e&&e[this._statsProp];if(!!u){if(u.isFile())return"file";if(u.isDirectory())return"directory";if(u&&u.isSymbolicLink()){const r=e.fullPath;try{const n=await bD(r),s=await wr(n);if(s.isFile())return"file";if(s.isDirectory()){const i=n.length;if(r.startsWith(n)&&r.substr(i,1)===Re.sep){const D=new Error(`Circular symlink detected: "${r}" points to "${n}"`);return D.code=Rr,this._onError(D)}return"directory"}}catch(n){this._onError(n)}}}}_includeAsFile(e){const u=e&&e[this._statsProp];return u&&this._wantsEverything&&!u.isDirectory()}}const Ce=(t,e={})=>{let u=e.entryType||e.type;if(u==="both"&&(u=Ye),u&&(e.type=u),t){if(typeof t!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(u&&!vr.includes(u))throw new Error(`readdirp: Invalid type passed. Use one of ${vr.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=t,new st(e)},xD=(t,e={})=>new Promise((u,r)=>{const n=[];Ce(t,e).on("data",s=>n.push(s)).on("end",()=>u(n)).on("error",s=>r(s))});Ce.promise=xD,Ce.ReaddirpStream=st,Ce.default=Ce;var OD=Ce,jt={exports:{}};/*!
23
+ * normalize-path <https://github.com/jonschlinkert/normalize-path>
24
+ *
25
+ * Copyright (c) 2014-2018, Jon Schlinkert.
26
+ * Released under the MIT License.
27
+ */var $r=function(t,e){if(typeof t!="string")throw new TypeError("expected path to be a string");if(t==="\\"||t==="/")return"/";var u=t.length;if(u<=1)return t;var r="";if(u>4&&t[3]==="\\"){var n=t[2];(n==="?"||n===".")&&t.slice(0,2)==="\\\\"&&(t=t.slice(2),r="//")}var s=t.split(/[/\\]+/);return e!==!1&&s[s.length-1]===""&&s.pop(),r+s.join("/")};Object.defineProperty(jt.exports,"__esModule",{value:!0});const Tr=$t.exports,ND=$r,xr="!",PD={returnIndex:!1},HD=t=>Array.isArray(t)?t:[t],ID=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){const u=Tr(t,e);return r=>t===r||u(r)}return t instanceof RegExp?u=>t.test(u):u=>!1},Or=(t,e,u,r)=>{const n=Array.isArray(u),s=n?u[0]:u;if(!n&&typeof s!="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(s));const i=ND(s);for(let o=0;o<e.length;o++)if(e[o](i))return r?-1:!1;const D=n&&[i].concat(u.slice(1));for(let o=0;o<t.length;o++){const a=t[o];if(n?a(...D):a(i))return r?o:!0}return r?-1:!1},Ut=(t,e,u=PD)=>{if(t==null)throw new TypeError("anymatch: specify first argument");const r=typeof u=="boolean"?{returnIndex:u}:u,n=r.returnIndex||!1,s=HD(t),i=s.filter(o=>typeof o=="string"&&o.charAt(0)===xr).map(o=>o.slice(1)).map(o=>Tr(o,r)),D=s.filter(o=>typeof o!="string"||typeof o=="string"&&o.charAt(0)!==xr).map(o=>ID(o,r));return e==null?(o,a=!1)=>Or(D,i,o,typeof a=="boolean"?a:!1):Or(D,i,e,n)};Ut.default=Ut,jt.exports=Ut;/*!
28
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
29
+ *
30
+ * Copyright (c) 2014-2016, Jon Schlinkert.
31
+ * Licensed under the MIT License.
32
+ */var LD=function(e){if(typeof e!="string"||e==="")return!1;for(var u;u=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(u[2])return!0;e=e.slice(u.index+u[0].length)}return!1};/*!
33
+ * is-glob <https://github.com/jonschlinkert/is-glob>
34
+ *
35
+ * Copyright (c) 2014-2017, Jon Schlinkert.
36
+ * Released under the MIT License.
37
+ */var kD=LD,Nr={"{":"}","(":")","[":"]"},MD=function(t){if(t[0]==="!")return!0;for(var e=0,u=-2,r=-2,n=-2,s=-2,i=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||r!==-1&&t[e]==="["&&t[e+1]!=="]"&&(r<e&&(r=t.indexOf("]",e)),r>e&&(i===-1||i>r||(i=t.indexOf("\\",e),i===-1||i>r)))||n!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(n=t.indexOf("}",e),n>e&&(i=t.indexOf("\\",e),i===-1||i>n))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(i=t.indexOf("\\",e),i===-1||i>s))||u!==-1&&t[e]==="("&&t[e+1]!=="|"&&(u<e&&(u=t.indexOf("|",e)),u!==-1&&t[u+1]!==")"&&(s=t.indexOf(")",u),s>u&&(i=t.indexOf("\\",u),i===-1||i>s))))return!0;if(t[e]==="\\"){var D=t[e+1];e+=2;var o=Nr[D];if(o){var a=t.indexOf(o,e);a!==-1&&(e=a+1)}if(t[e]==="!")return!0}else e++}return!1},WD=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var u=t[e+1];e+=2;var r=Nr[u];if(r){var n=t.indexOf(r,e);n!==-1&&(e=n+1)}if(t[e]==="!")return!0}else e++}return!1},Pr=function(e,u){if(typeof e!="string"||e==="")return!1;if(kD(e))return!0;var r=MD;return u&&u.strict===!1&&(r=WD),r(e)},GD=Pr,jD=z.posix.dirname,UD=Au.platform()==="win32",Kt="/",KD=/\\/g,VD=/[\{\[].*[\}\]]$/,zD=/(^|[^\\])([\{\[]|\([^\)]+$)/,YD=/\\([\!\*\?\|\[\]\(\)\{\}])/g,qD=function(e,u){var r=Object.assign({flipBackslashes:!0},u);r.flipBackslashes&&UD&&e.indexOf(Kt)<0&&(e=e.replace(KD,Kt)),VD.test(e)&&(e+=Kt),e+="a";do e=jD(e);while(GD(e)||zD.test(e));return e.replace(YD,"$1")},Xe={};(function(t){t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,u)=>e.nodes.find(r=>r.type===u),t.exceedsLimit=(e,u,r=1,n)=>n===!1||!t.isInteger(e)||!t.isInteger(u)?!1:(Number(u)-Number(e))/Number(r)>=n,t.escapeNode=(e,u=0,r)=>{let n=e.nodes[u];!n||(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1,t.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,t.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,t.reduce=e=>e.reduce((u,r)=>(r.type==="text"&&u.push(r.value),r.type==="range"&&(r.type="text"),u),[]),t.flatten=(...e)=>{const u=[],r=n=>{for(let s=0;s<n.length;s++){let i=n[s];Array.isArray(i)?r(i):i!==void 0&&u.push(i)}return u};return r(e),u}})(Xe);const Hr=Xe;var Vt=(t,e={})=>{let u=(r,n={})=>{let s=e.escapeInvalid&&Hr.isInvalidBrace(n),i=r.invalid===!0&&e.escapeInvalid===!0,D="";if(r.value)return(s||i)&&Hr.isOpenOrClose(r)?"\\"+r.value:r.value;if(r.value)return r.value;if(r.nodes)for(let o of r.nodes)D+=u(o);return D};return u(t)};/*!
38
+ * is-number <https://github.com/jonschlinkert/is-number>
39
+ *
40
+ * Copyright (c) 2014-present, Jon Schlinkert.
41
+ * Released under the MIT License.
42
+ */var XD=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1};/*!
43
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
44
+ *
45
+ * Copyright (c) 2015-present, Jon Schlinkert.
46
+ * Released under the MIT License.
47
+ */const Ir=XD,le=(t,e,u)=>{if(Ir(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(Ir(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let r=M({relaxZeros:!0},u);typeof r.strictZeros=="boolean"&&(r.relaxZeros=r.strictZeros===!1);let n=String(r.relaxZeros),s=String(r.shorthand),i=String(r.capture),D=String(r.wrap),o=t+":"+e+"="+n+s+i+D;if(le.cache.hasOwnProperty(o))return le.cache[o].result;let a=Math.min(t,e),c=Math.max(t,e);if(Math.abs(a-c)===1){let F=t+"|"+e;return r.capture?`(${F})`:r.wrap===!1?F:`(?:${F})`}let f=jr(t)||jr(e),l={min:t,max:e,a,b:c},C=[],p=[];if(f&&(l.isPadded=f,l.maxLen=String(l.max).length),a<0){let F=c<0?Math.abs(c):1;p=Lr(F,Math.abs(a),l,r),a=l.a=0}return c>=0&&(C=Lr(a,c,l,r)),l.negatives=p,l.positives=C,l.result=QD(p,C),r.capture===!0?l.result=`(${l.result})`:r.wrap!==!1&&C.length+p.length>1&&(l.result=`(?:${l.result})`),le.cache[o]=l,l.result};function QD(t,e,u){let r=zt(t,e,"-",!1)||[],n=zt(e,t,"",!1)||[],s=zt(t,e,"-?",!0)||[];return r.concat(s).concat(n).join("|")}function ZD(t,e){let u=1,r=1,n=Mr(t,u),s=new Set([e]);for(;t<=n&&n<=e;)s.add(n),u+=1,n=Mr(t,u);for(n=Wr(e+1,r)-1;t<n&&n<=e;)s.add(n),r+=1,n=Wr(e+1,r)-1;return s=[...s],s.sort(to),s}function JD(t,e,u){if(t===e)return{pattern:t,count:[],digits:0};let r=eo(t,e),n=r.length,s="",i=0;for(let D=0;D<n;D++){let[o,a]=r[D];o===a?s+=o:o!=="0"||a!=="9"?s+=uo(o,a):i++}return i&&(s+=u.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[i],digits:n}}function Lr(t,e,u,r){let n=ZD(t,e),s=[],i=t,D;for(let o=0;o<n.length;o++){let a=n[o],c=JD(String(i),String(a),r),f="";if(!u.isPadded&&D&&D.pattern===c.pattern){D.count.length>1&&D.count.pop(),D.count.push(c.count[0]),D.string=D.pattern+Gr(D.count),i=a+1;continue}u.isPadded&&(f=ro(a,u,r)),c.string=f+c.pattern+Gr(c.count),s.push(c),i=a+1,D=c}return s}function zt(t,e,u,r,n){let s=[];for(let i of t){let{string:D}=i;!r&&!kr(e,"string",D)&&s.push(u+D),r&&kr(e,"string",D)&&s.push(u+D)}return s}function eo(t,e){let u=[];for(let r=0;r<t.length;r++)u.push([t[r],e[r]]);return u}function to(t,e){return t>e?1:e>t?-1:0}function kr(t,e,u){return t.some(r=>r[e]===u)}function Mr(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function Wr(t,e){return t-t%Math.pow(10,e)}function Gr(t){let[e=0,u=""]=t;return u||e>1?`{${e+(u?","+u:"")}}`:""}function uo(t,e,u){return`[${t}${e-t===1?"":"-"}${e}]`}function jr(t){return/^-?(0+)\d/.test(t)}function ro(t,e,u){if(!e.isPadded)return t;let r=Math.abs(e.maxLen-String(t).length),n=u.relaxZeros!==!1;switch(r){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${r}}`:`0{${r}}`}}le.cache={},le.clearCache=()=>le.cache={};var no=le;/*!
48
+ * fill-range <https://github.com/jonschlinkert/fill-range>
49
+ *
50
+ * Copyright (c) 2014-present, Jon Schlinkert.
51
+ * Licensed under the MIT License.
52
+ */const so=_e,Ur=no,Kr=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),io=t=>e=>t===!0?Number(e):String(e),Yt=t=>typeof t=="number"||typeof t=="string"&&t!=="",be=t=>Number.isInteger(+t),qt=t=>{let e=`${t}`,u=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++u]==="0";);return u>0},Do=(t,e,u)=>typeof t=="string"||typeof e=="string"?!0:u.stringify===!0,oo=(t,e,u)=>{if(e>0){let r=t[0]==="-"?"-":"";r&&(t=t.slice(1)),t=r+t.padStart(r?e-1:e,"0")}return u===!1?String(t):t},Vr=(t,e)=>{let u=t[0]==="-"?"-":"";for(u&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return u?"-"+t:t},ao=(t,e)=>{t.negatives.sort((i,D)=>i<D?-1:i>D?1:0),t.positives.sort((i,D)=>i<D?-1:i>D?1:0);let u=e.capture?"":"?:",r="",n="",s;return t.positives.length&&(r=t.positives.join("|")),t.negatives.length&&(n=`-(${u}${t.negatives.join("|")})`),r&&n?s=`${r}|${n}`:s=r||n,e.wrap?`(${u}${s})`:s},zr=(t,e,u,r)=>{if(u)return Ur(t,e,M({wrap:!1},r));let n=String.fromCharCode(t);if(t===e)return n;let s=String.fromCharCode(e);return`[${n}-${s}]`},Yr=(t,e,u)=>{if(Array.isArray(t)){let r=u.wrap===!0,n=u.capture?"":"?:";return r?`(${n}${t.join("|")})`:t.join("|")}return Ur(t,e,u)},qr=(...t)=>new RangeError("Invalid range arguments: "+so.inspect(...t)),Xr=(t,e,u)=>{if(u.strictRanges===!0)throw qr([t,e]);return[]},lo=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},co=(t,e,u=1,r={})=>{let n=Number(t),s=Number(e);if(!Number.isInteger(n)||!Number.isInteger(s)){if(r.strictRanges===!0)throw qr([t,e]);return[]}n===0&&(n=0),s===0&&(s=0);let i=n>s,D=String(t),o=String(e),a=String(u);u=Math.max(Math.abs(u),1);let c=qt(D)||qt(o)||qt(a),f=c?Math.max(D.length,o.length,a.length):0,l=c===!1&&Do(t,e,r)===!1,C=r.transform||io(l);if(r.toRegex&&u===1)return zr(Vr(t,f),Vr(e,f),!0,r);let p={negatives:[],positives:[]},F=P=>p[P<0?"negatives":"positives"].push(Math.abs(P)),A=[],B=0;for(;i?n>=s:n<=s;)r.toRegex===!0&&u>1?F(n):A.push(oo(C(n,B),f,l)),n=i?n-u:n+u,B++;return r.toRegex===!0?u>1?ao(p,r):Yr(A,null,M({wrap:!1},r)):A},fo=(t,e,u=1,r={})=>{if(!be(t)&&t.length>1||!be(e)&&e.length>1)return Xr(t,e,r);let n=r.transform||(l=>String.fromCharCode(l)),s=`${t}`.charCodeAt(0),i=`${e}`.charCodeAt(0),D=s>i,o=Math.min(s,i),a=Math.max(s,i);if(r.toRegex&&u===1)return zr(o,a,!1,r);let c=[],f=0;for(;D?s>=i:s<=i;)c.push(n(s,f)),s=D?s-u:s+u,f++;return r.toRegex===!0?Yr(c,null,{wrap:!1,options:r}):c},Qe=(t,e,u,r={})=>{if(e==null&&Yt(t))return[t];if(!Yt(t)||!Yt(e))return Xr(t,e,r);if(typeof u=="function")return Qe(t,e,1,{transform:u});if(Kr(u))return Qe(t,e,0,u);let n=M({},r);return n.capture===!0&&(n.wrap=!0),u=u||n.step||1,be(u)?be(t)&&be(e)?co(t,e,u,n):fo(t,e,Math.max(Math.abs(u),1),n):u!=null&&!Kr(u)?lo(u,n):Qe(t,e,1,u)};var Qr=Qe;const ho=Qr,Zr=Xe,Eo=(t,e={})=>{let u=(r,n={})=>{let s=Zr.isInvalidBrace(n),i=r.invalid===!0&&e.escapeInvalid===!0,D=s===!0||i===!0,o=e.escapeInvalid===!0?"\\":"",a="";if(r.isOpen===!0||r.isClose===!0)return o+r.value;if(r.type==="open")return D?o+r.value:"(";if(r.type==="close")return D?o+r.value:")";if(r.type==="comma")return r.prev.type==="comma"?"":D?r.value:"|";if(r.value)return r.value;if(r.nodes&&r.ranges>0){let c=Zr.reduce(r.nodes),f=ho(...c,De(M({},e),{wrap:!1,toRegex:!0}));if(f.length!==0)return c.length>1&&f.length>1?`(${f})`:f}if(r.nodes)for(let c of r.nodes)a+=u(c,r);return a};return u(t)};var po=Eo;const Co=Qr,Jr=Vt,Fe=Xe,ce=(t="",e="",u=!1)=>{let r=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return u?Fe.flatten(e).map(n=>`{${n}}`):e;for(let n of t)if(Array.isArray(n))for(let s of n)r.push(ce(s,e,u));else for(let s of e)u===!0&&typeof s=="string"&&(s=`{${s}}`),r.push(Array.isArray(s)?ce(n,s,u):n+s);return Fe.flatten(r)},Fo=(t,e={})=>{let u=e.rangeLimit===void 0?1e3:e.rangeLimit,r=(n,s={})=>{n.queue=[];let i=s,D=s.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,D=i.queue;if(n.invalid||n.dollar){D.push(ce(D.pop(),Jr(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){D.push(ce(D.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let f=Fe.reduce(n.nodes);if(Fe.exceedsLimit(...f,e.step,u))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let l=Co(...f,e);l.length===0&&(l=Jr(n,e)),D.push(ce(D.pop(),l)),n.nodes=[];return}let o=Fe.encloseBrace(n),a=n.queue,c=n;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,a=c.queue;for(let f=0;f<n.nodes.length;f++){let l=n.nodes[f];if(l.type==="comma"&&n.type==="brace"){f===1&&a.push(""),a.push("");continue}if(l.type==="close"){D.push(ce(D.pop(),a,o));continue}if(l.value&&l.type!=="open"){a.push(ce(a.pop(),l.value));continue}l.nodes&&r(l,n)}return a};return Fe.flatten(r(t))};var go=Fo,mo={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
53
+ `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const _o=Vt,{MAX_LENGTH:en,CHAR_BACKSLASH:Xt,CHAR_BACKTICK:Ao,CHAR_COMMA:yo,CHAR_DOT:wo,CHAR_LEFT_PARENTHESES:Ro,CHAR_RIGHT_PARENTHESES:bo,CHAR_LEFT_CURLY_BRACE:vo,CHAR_RIGHT_CURLY_BRACE:Bo,CHAR_LEFT_SQUARE_BRACKET:tn,CHAR_RIGHT_SQUARE_BRACKET:un,CHAR_DOUBLE_QUOTE:So,CHAR_SINGLE_QUOTE:$o,CHAR_NO_BREAK_SPACE:To,CHAR_ZERO_WIDTH_NOBREAK_SPACE:xo}=mo,Oo=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let u=e||{},r=typeof u.maxLength=="number"?Math.min(en,u.maxLength):en;if(t.length>r)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${r})`);let n={type:"root",input:t,nodes:[]},s=[n],i=n,D=n,o=0,a=t.length,c=0,f=0,l;const C=()=>t[c++],p=F=>{if(F.type==="text"&&D.type==="dot"&&(D.type="text"),D&&D.type==="text"&&F.type==="text"){D.value+=F.value;return}return i.nodes.push(F),F.parent=i,F.prev=D,D=F,F};for(p({type:"bos"});c<a;)if(i=s[s.length-1],l=C(),!(l===xo||l===To)){if(l===Xt){p({type:"text",value:(e.keepEscaping?l:"")+C()});continue}if(l===un){p({type:"text",value:"\\"+l});continue}if(l===tn){o++;let F;for(;c<a&&(F=C());){if(l+=F,F===tn){o++;continue}if(F===Xt){l+=C();continue}if(F===un&&(o--,o===0))break}p({type:"text",value:l});continue}if(l===Ro){i=p({type:"paren",nodes:[]}),s.push(i),p({type:"text",value:l});continue}if(l===bo){if(i.type!=="paren"){p({type:"text",value:l});continue}i=s.pop(),p({type:"text",value:l}),i=s[s.length-1];continue}if(l===So||l===$o||l===Ao){let F=l,A;for(e.keepQuotes!==!0&&(l="");c<a&&(A=C());){if(A===Xt){l+=A+C();continue}if(A===F){e.keepQuotes===!0&&(l+=A);break}l+=A}p({type:"text",value:l});continue}if(l===vo){f++;let F=D.value&&D.value.slice(-1)==="$"||i.dollar===!0;i=p({type:"brace",open:!0,close:!1,dollar:F,depth:f,commas:0,ranges:0,nodes:[]}),s.push(i),p({type:"open",value:l});continue}if(l===Bo){if(i.type!=="brace"){p({type:"text",value:l});continue}let F="close";i=s.pop(),i.close=!0,p({type:F,value:l}),f--,i=s[s.length-1];continue}if(l===yo&&f>0){if(i.ranges>0){i.ranges=0;let F=i.nodes.shift();i.nodes=[F,{type:"text",value:_o(i)}]}p({type:"comma",value:l}),i.commas++;continue}if(l===wo&&f>0&&i.commas===0){let F=i.nodes;if(f===0||F.length===0){p({type:"text",value:l});continue}if(D.type==="dot"){if(i.range=[],D.value+=l,D.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,D.type="text";continue}i.ranges++,i.args=[];continue}if(D.type==="range"){F.pop();let A=F[F.length-1];A.value+=D.value+l,D=A,i.ranges--;continue}p({type:"dot",value:l});continue}p({type:"text",value:l})}do if(i=s.pop(),i.type!=="root"){i.nodes.forEach(B=>{B.nodes||(B.type==="open"&&(B.isOpen=!0),B.type==="close"&&(B.isClose=!0),B.nodes||(B.type="text"),B.invalid=!0)});let F=s[s.length-1],A=F.nodes.indexOf(i);F.nodes.splice(A,1,...i.nodes)}while(s.length>0);return p({type:"eos"}),n};var No=Oo;const rn=Vt,Po=po,Ho=go,Io=No,q=(t,e={})=>{let u=[];if(Array.isArray(t))for(let r of t){let n=q.create(r,e);Array.isArray(n)?u.push(...n):u.push(n)}else u=[].concat(q.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(u=[...new Set(u)]),u};q.parse=(t,e={})=>Io(t,e),q.stringify=(t,e={})=>rn(typeof t=="string"?q.parse(t,e):t,e),q.compile=(t,e={})=>(typeof t=="string"&&(t=q.parse(t,e)),Po(t,e)),q.expand=(t,e={})=>{typeof t=="string"&&(t=q.parse(t,e));let u=Ho(t,e);return e.noempty===!0&&(u=u.filter(Boolean)),e.nodupes===!0&&(u=[...new Set(u)]),u},q.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?q.compile(t,e):q.expand(t,e);var Lo=q,nn={exports:{}},ko=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];(function(t){t.exports=ko})(nn);const Mo=z,Wo=nn.exports,Go=new Set(Wo);var jo=t=>Go.has(Mo.extname(t).slice(1).toLowerCase()),Ze={};(function(t){const{sep:e}=z,{platform:u}=process,r=Au;t.EV_ALL="all",t.EV_READY="ready",t.EV_ADD="add",t.EV_CHANGE="change",t.EV_ADD_DIR="addDir",t.EV_UNLINK="unlink",t.EV_UNLINK_DIR="unlinkDir",t.EV_RAW="raw",t.EV_ERROR="error",t.STR_DATA="data",t.STR_END="end",t.STR_CLOSE="close",t.FSEVENT_CREATED="created",t.FSEVENT_MODIFIED="modified",t.FSEVENT_DELETED="deleted",t.FSEVENT_MOVED="moved",t.FSEVENT_CLONED="cloned",t.FSEVENT_UNKNOWN="unknown",t.FSEVENT_TYPE_FILE="file",t.FSEVENT_TYPE_DIRECTORY="directory",t.FSEVENT_TYPE_SYMLINK="symlink",t.KEY_LISTENERS="listeners",t.KEY_ERR="errHandlers",t.KEY_RAW="rawEmitters",t.HANDLER_KEYS=[t.KEY_LISTENERS,t.KEY_ERR,t.KEY_RAW],t.DOT_SLASH=`.${e}`,t.BACK_SLASH_RE=/\\/g,t.DOUBLE_SLASH_RE=/\/\//,t.SLASH_OR_BACK_SLASH_RE=/[/\\]/,t.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,t.REPLACER_RE=/^\.[/\\]/,t.SLASH="/",t.SLASH_SLASH="//",t.BRACE_START="{",t.BANG="!",t.ONE_DOT=".",t.TWO_DOTS="..",t.STAR="*",t.GLOBSTAR="**",t.ROOT_GLOBSTAR="/**/*",t.SLASH_GLOBSTAR="/**",t.DIR_SUFFIX="Dir",t.ANYMATCH_OPTS={dot:!0},t.STRING_TYPE="string",t.FUNCTION_TYPE="function",t.EMPTY_STR="",t.EMPTY_FN=()=>{},t.IDENTITY_FN=n=>n,t.isWindows=u==="win32",t.isMacos=u==="darwin",t.isLinux=u==="linux",t.isIBMi=r.type()==="OS400"})(Ze);const re=oe,I=z,{promisify:ve}=_e,Uo=jo,{isWindows:Ko,isLinux:Vo,EMPTY_FN:zo,EMPTY_STR:Yo,KEY_LISTENERS:ge,KEY_ERR:Qt,KEY_RAW:Be,HANDLER_KEYS:qo,EV_CHANGE:Je,EV_ADD:et,EV_ADD_DIR:Xo,EV_ERROR:sn,STR_DATA:Qo,STR_END:Zo,BRACE_START:Jo,STAR:ea}=Ze,ta="watch",ua=ve(re.open),Dn=ve(re.stat),ra=ve(re.lstat),na=ve(re.close),Zt=ve(re.realpath),sa={lstat:ra,stat:Dn},Jt=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},Se=(t,e,u)=>{let r=t[e];r instanceof Set||(t[e]=r=new Set([r])),r.add(u)},ia=t=>e=>{const u=t[e];u instanceof Set?u.clear():delete t[e]},$e=(t,e,u)=>{const r=t[e];r instanceof Set?r.delete(u):r===u&&delete t[e]},on=t=>t instanceof Set?t.size===0:!t,tt=new Map;function an(t,e,u,r,n){const s=(i,D)=>{u(t),n(i,D,{watchedPath:t}),D&&t!==D&&ut(I.resolve(t,D),ge,I.join(t,D))};try{return re.watch(t,e,s)}catch(i){r(i)}}const ut=(t,e,u,r,n)=>{const s=tt.get(t);!s||Jt(s[e],i=>{i(u,r,n)})},Da=(t,e,u,r)=>{const{listener:n,errHandler:s,rawEmitter:i}=r;let D=tt.get(e),o;if(!u.persistent)return o=an(t,u,n,s,i),o.close.bind(o);if(D)Se(D,ge,n),Se(D,Qt,s),Se(D,Be,i);else{if(o=an(t,u,ut.bind(null,e,ge),s,ut.bind(null,e,Be)),!o)return;o.on(sn,async a=>{const c=ut.bind(null,e,Qt);if(D.watcherUnusable=!0,Ko&&a.code==="EPERM")try{const f=await ua(t,"r");await na(f),c(a)}catch{}else c(a)}),D={listeners:n,errHandlers:s,rawEmitters:i,watcher:o},tt.set(e,D)}return()=>{$e(D,ge,n),$e(D,Qt,s),$e(D,Be,i),on(D.listeners)&&(D.watcher.close(),tt.delete(e),qo.forEach(ia(D)),D.watcher=void 0,Object.freeze(D))}},eu=new Map,oa=(t,e,u,r)=>{const{listener:n,rawEmitter:s}=r;let i=eu.get(e);const D=i&&i.options;return D&&(D.persistent<u.persistent||D.interval>u.interval)&&(re.unwatchFile(e),i=void 0),i?(Se(i,ge,n),Se(i,Be,s)):(i={listeners:n,rawEmitters:s,options:u,watcher:re.watchFile(e,u,(o,a)=>{Jt(i.rawEmitters,f=>{f(Je,e,{curr:o,prev:a})});const c=o.mtimeMs;(o.size!==a.size||c>a.mtimeMs||c===0)&&Jt(i.listeners,f=>f(t,o))})},eu.set(e,i)),()=>{$e(i,ge,n),$e(i,Be,s),on(i.listeners)&&(eu.delete(e),re.unwatchFile(e),i.options=i.watcher=void 0,Object.freeze(i))}};class aa{constructor(e){this.fsw=e,this._boundHandleError=u=>e._handleError(u)}_watchWithNodeFs(e,u){const r=this.fsw.options,n=I.dirname(e),s=I.basename(e);this.fsw._getWatchedDir(n).add(s);const D=I.resolve(e),o={persistent:r.persistent};u||(u=zo);let a;return r.usePolling?(o.interval=r.enableBinaryInterval&&Uo(s)?r.binaryInterval:r.interval,a=oa(e,D,o,{listener:u,rawEmitter:this.fsw._emitRaw})):a=Da(e,D,o,{listener:u,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),a}_handleFile(e,u,r){if(this.fsw.closed)return;const n=I.dirname(e),s=I.basename(e),i=this.fsw._getWatchedDir(n);let D=u;if(i.has(s))return;const o=async(c,f)=>{if(!!this.fsw._throttle(ta,e,5)){if(!f||f.mtimeMs===0)try{const l=await Dn(e);if(this.fsw.closed)return;const C=l.atimeMs,p=l.mtimeMs;(!C||C<=p||p!==D.mtimeMs)&&this.fsw._emit(Je,e,l),Vo&&D.ino!==l.ino?(this.fsw._closeFile(c),D=l,this.fsw._addPathCloser(c,this._watchWithNodeFs(e,o))):D=l}catch{this.fsw._remove(n,s)}else if(i.has(s)){const l=f.atimeMs,C=f.mtimeMs;(!l||l<=C||C!==D.mtimeMs)&&this.fsw._emit(Je,e,f),D=f}}},a=this._watchWithNodeFs(e,o);if(!(r&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(et,e,0))return;this.fsw._emit(et,e,u)}return a}async _handleSymlink(e,u,r,n){if(this.fsw.closed)return;const s=e.fullPath,i=this.fsw._getWatchedDir(u);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let D;try{D=await Zt(r)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(i.has(n)?this.fsw._symlinkPaths.get(s)!==D&&(this.fsw._symlinkPaths.set(s,D),this.fsw._emit(Je,r,e.stats)):(i.add(n),this.fsw._symlinkPaths.set(s,D),this.fsw._emit(et,r,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(s))return!0;this.fsw._symlinkPaths.set(s,!0)}_handleRead(e,u,r,n,s,i,D){if(e=I.join(e,Yo),!r.hasGlob&&(D=this.fsw._throttle("readdir",e,1e3),!D))return;const o=this.fsw._getWatchedDir(r.path),a=new Set;let c=this.fsw._readdirp(e,{fileFilter:f=>r.filterPath(f),directoryFilter:f=>r.filterDir(f),depth:0}).on(Qo,async f=>{if(this.fsw.closed){c=void 0;return}const l=f.path;let C=I.join(e,l);if(a.add(l),!(f.stats.isSymbolicLink()&&await this._handleSymlink(f,e,C,l))){if(this.fsw.closed){c=void 0;return}(l===n||!n&&!o.has(l))&&(this.fsw._incrReadyCount(),C=I.join(s,I.relative(s,C)),this._addToNodeFs(C,u,r,i+1))}}).on(sn,this._boundHandleError);return new Promise(f=>c.once(Zo,()=>{if(this.fsw.closed){c=void 0;return}const l=D?D.clear():!1;f(),o.getChildren().filter(C=>C!==e&&!a.has(C)&&(!r.hasGlob||r.filterPath({fullPath:I.resolve(e,C)}))).forEach(C=>{this.fsw._remove(e,C)}),c=void 0,l&&this._handleRead(e,!1,r,n,s,i,D)}))}async _handleDir(e,u,r,n,s,i,D){const o=this.fsw._getWatchedDir(I.dirname(e)),a=o.has(I.basename(e));!(r&&this.fsw.options.ignoreInitial)&&!s&&!a&&(!i.hasGlob||i.globFilter(e))&&this.fsw._emit(Xo,e,u),o.add(I.basename(e)),this.fsw._getWatchedDir(e);let c,f;const l=this.fsw.options.depth;if((l==null||n<=l)&&!this.fsw._symlinkPaths.has(D)){if(!s&&(await this._handleRead(e,r,i,s,e,n,c),this.fsw.closed))return;f=this._watchWithNodeFs(e,(C,p)=>{p&&p.mtimeMs===0||this._handleRead(C,!1,i,s,e,n,c)})}return f}async _addToNodeFs(e,u,r,n,s){const i=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return i(),!1;const D=this.fsw._getWatchHelpers(e,n);!D.hasGlob&&r&&(D.hasGlob=r.hasGlob,D.globFilter=r.globFilter,D.filterPath=o=>r.filterPath(o),D.filterDir=o=>r.filterDir(o));try{const o=await sa[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))return i(),!1;const a=this.fsw.options.followSymlinks&&!e.includes(ea)&&!e.includes(Jo);let c;if(o.isDirectory()){const f=I.resolve(e),l=a?await Zt(e):e;if(this.fsw.closed||(c=await this._handleDir(D.watchPath,o,u,n,s,D,l),this.fsw.closed))return;f!==l&&l!==void 0&&this.fsw._symlinkPaths.set(f,l)}else if(o.isSymbolicLink()){const f=a?await Zt(e):e;if(this.fsw.closed)return;const l=I.dirname(D.watchPath);if(this.fsw._getWatchedDir(l).add(D.watchPath),this.fsw._emit(et,D.watchPath,o),c=await this._handleDir(l,o,u,n,e,D,f),this.fsw.closed)return;f!==void 0&&this.fsw._symlinkPaths.set(I.resolve(e),f)}else c=this._handleFile(D.watchPath,o,u);return i(),this.fsw._addPathCloser(e,c),!1}catch(o){if(this.fsw._handleError(o))return i(),e}}}var la=aa,tu={exports:{}};const uu=oe,L=z,{promisify:ru}=_e;let me;try{me=Ft("fsevents")}catch(t){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(t)}if(me){const t=process.version.match(/v(\d+)\.(\d+)/);if(t&&t[1]&&t[2]){const e=Number.parseInt(t[1],10),u=Number.parseInt(t[2],10);e===8&&u<16&&(me=void 0)}}const{EV_ADD:nu,EV_CHANGE:ca,EV_ADD_DIR:ln,EV_UNLINK:rt,EV_ERROR:fa,STR_DATA:ha,STR_END:da,FSEVENT_CREATED:Ea,FSEVENT_MODIFIED:pa,FSEVENT_DELETED:Ca,FSEVENT_MOVED:Fa,FSEVENT_UNKNOWN:ga,FSEVENT_TYPE_FILE:ma,FSEVENT_TYPE_DIRECTORY:Te,FSEVENT_TYPE_SYMLINK:cn,ROOT_GLOBSTAR:fn,DIR_SUFFIX:_a,DOT_SLASH:hn,FUNCTION_TYPE:su,EMPTY_FN:Aa,IDENTITY_FN:ya}=Ze,wa=t=>isNaN(t)?{}:{depth:t},iu=ru(uu.stat),Ra=ru(uu.lstat),dn=ru(uu.realpath),ba={stat:iu,lstat:Ra},fe=new Map,va=10,Ba=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),Sa=(t,e)=>({stop:me.watch(t,e)});function $a(t,e,u,r){let n=L.extname(e)?L.dirname(e):e;const s=L.dirname(n);let i=fe.get(n);Ta(s)&&(n=s);const D=L.resolve(t),o=D!==e,a=(f,l,C)=>{o&&(f=f.replace(e,D)),(f===D||!f.indexOf(D+L.sep))&&u(f,l,C)};let c=!1;for(const f of fe.keys())if(e.indexOf(L.resolve(f)+L.sep)===0){n=f,i=fe.get(n),c=!0;break}return i||c?i.listeners.add(a):(i={listeners:new Set([a]),rawEmitter:r,watcher:Sa(n,(f,l)=>{if(!i.listeners.size)return;const C=me.getInfo(f,l);i.listeners.forEach(p=>{p(f,l,C)}),i.rawEmitter(C.event,f,C)})},fe.set(n,i)),()=>{const f=i.listeners;if(f.delete(a),!f.size&&(fe.delete(n),i.watcher))return i.watcher.stop().then(()=>{i.rawEmitter=i.watcher=void 0,Object.freeze(i)})}}const Ta=t=>{let e=0;for(const u of fe.keys())if(u.indexOf(t)===0&&(e++,e>=va))return!0;return!1},xa=()=>me&&fe.size<128,Du=(t,e)=>{let u=0;for(;!t.indexOf(e)&&(t=L.dirname(t))!==e;)u++;return u},En=(t,e)=>t.type===Te&&e.isDirectory()||t.type===cn&&e.isSymbolicLink()||t.type===ma&&e.isFile();class Oa{constructor(e){this.fsw=e}checkIgnored(e,u){const r=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,u))return r.add(e),u&&u.isDirectory()&&r.add(e+fn),!0;r.delete(e),r.delete(e+fn)}addOrChange(e,u,r,n,s,i,D,o){const a=s.has(i)?ca:nu;this.handleEvent(a,e,u,r,n,s,i,D,o)}async checkExists(e,u,r,n,s,i,D,o){try{const a=await iu(e);if(this.fsw.closed)return;En(D,a)?this.addOrChange(e,u,r,n,s,i,D,o):this.handleEvent(rt,e,u,r,n,s,i,D,o)}catch(a){a.code==="EACCES"?this.addOrChange(e,u,r,n,s,i,D,o):this.handleEvent(rt,e,u,r,n,s,i,D,o)}}handleEvent(e,u,r,n,s,i,D,o,a){if(!(this.fsw.closed||this.checkIgnored(u)))if(e===rt){const c=o.type===Te;(c||i.has(D))&&this.fsw._remove(s,D,c)}else{if(e===nu){if(o.type===Te&&this.fsw._getWatchedDir(u),o.type===cn&&a.followSymlinks){const f=a.depth===void 0?void 0:Du(r,n)+1;return this._addToFsEvents(u,!1,!0,f)}this.fsw._getWatchedDir(s).add(D)}const c=o.type===Te?e+_a:e;this.fsw._emit(c,u),c===ln&&this._addToFsEvents(u,!1,!0)}}_watchWithFsEvents(e,u,r,n){if(this.fsw.closed||this.fsw._isIgnored(e))return;const s=this.fsw.options,D=$a(e,u,async(o,a,c)=>{if(this.fsw.closed||s.depth!==void 0&&Du(o,u)>s.depth)return;const f=r(L.join(e,L.relative(e,o)));if(n&&!n(f))return;const l=L.dirname(f),C=L.basename(f),p=this.fsw._getWatchedDir(c.type===Te?f:l);if(Ba.has(a)||c.event===ga)if(typeof s.ignored===su){let F;try{F=await iu(f)}catch{}if(this.fsw.closed||this.checkIgnored(f,F))return;En(c,F)?this.addOrChange(f,o,u,l,p,C,c,s):this.handleEvent(rt,f,o,u,l,p,C,c,s)}else this.checkExists(f,o,u,l,p,C,c,s);else switch(c.event){case Ea:case pa:return this.addOrChange(f,o,u,l,p,C,c,s);case Ca:case Fa:return this.checkExists(f,o,u,l,p,C,c,s)}},this.fsw._emitRaw);return this.fsw._emitReady(),D}async _handleFsEventsSymlink(e,u,r,n){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(u))){this.fsw._symlinkPaths.set(u,!0),this.fsw._incrReadyCount();try{const s=await dn(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(s))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(s||e,i=>{let D=e;return s&&s!==hn?D=i.replace(s,e):i!==hn&&(D=L.join(e,i)),r(D)},!1,n)}catch(s){if(this.fsw._handleError(s))return this.fsw._emitReady()}}}emitAdd(e,u,r,n,s){const i=r(e),D=u.isDirectory(),o=this.fsw._getWatchedDir(L.dirname(i)),a=L.basename(i);D&&this.fsw._getWatchedDir(i),!o.has(a)&&(o.add(a),(!n.ignoreInitial||s===!0)&&this.fsw._emit(D?ln:nu,i,u))}initWatch(e,u,r,n){if(this.fsw.closed)return;const s=this._watchWithFsEvents(r.watchPath,L.resolve(e||r.watchPath),n,r.globFilter);this.fsw._addPathCloser(u,s)}async _addToFsEvents(e,u,r,n){if(this.fsw.closed)return;const s=this.fsw.options,i=typeof u===su?u:ya,D=this.fsw._getWatchHelpers(e);try{const o=await ba[D.statMethod](D.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(D.watchPath,o))throw null;if(o.isDirectory()){if(D.globFilter||this.emitAdd(i(e),o,i,s,r),n&&n>s.depth)return;this.fsw._readdirp(D.watchPath,M({fileFilter:a=>D.filterPath(a),directoryFilter:a=>D.filterDir(a)},wa(s.depth-(n||0)))).on(ha,a=>{if(this.fsw.closed||a.stats.isDirectory()&&!D.filterPath(a))return;const c=L.join(D.watchPath,a.path),{fullPath:f}=a;if(D.followSymlinks&&a.stats.isSymbolicLink()){const l=s.depth===void 0?void 0:Du(c,L.resolve(D.watchPath))+1;this._handleFsEventsSymlink(c,f,i,l)}else this.emitAdd(c,a.stats,i,s,r)}).on(fa,Aa).on(da,()=>{this.fsw._emitReady()})}else this.emitAdd(D.watchPath,o,i,s,r),this.fsw._emitReady()}catch(o){(!o||this.fsw._handleError(o))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(s.persistent&&r!==!0)if(typeof u===su)this.initWatch(void 0,e,D,i);else{let o;try{o=await dn(D.watchPath)}catch{}this.initWatch(o,e,D,i)}}}tu.exports=Oa,tu.exports.canUse=xa;const{EventEmitter:Na}=Mn,ou=oe,v=z,{promisify:pn}=_e,Pa=OD,au=jt.exports.default,Ha=qD,lu=Pr,Ia=Lo,La=$r,ka=la,Cn=tu.exports,{EV_ALL:cu,EV_READY:Ma,EV_ADD:nt,EV_CHANGE:xe,EV_UNLINK:Fn,EV_ADD_DIR:Wa,EV_UNLINK_DIR:Ga,EV_RAW:ja,EV_ERROR:fu,STR_CLOSE:Ua,STR_END:Ka,BACK_SLASH_RE:Va,DOUBLE_SLASH_RE:gn,SLASH_OR_BACK_SLASH_RE:za,DOT_RE:Ya,REPLACER_RE:qa,SLASH:hu,SLASH_SLASH:Xa,BRACE_START:Qa,BANG:du,ONE_DOT:mn,TWO_DOTS:Za,GLOBSTAR:Ja,SLASH_GLOBSTAR:Eu,ANYMATCH_OPTS:pu,STRING_TYPE:Cu,FUNCTION_TYPE:el,EMPTY_STR:Fu,EMPTY_FN:tl,isWindows:ul,isMacos:rl,isIBMi:nl}=Ze,sl=pn(ou.stat),il=pn(ou.readdir),gu=(t=[])=>Array.isArray(t)?t:[t],_n=(t,e=[])=>(t.forEach(u=>{Array.isArray(u)?_n(u,e):e.push(u)}),e),An=t=>{const e=_n(gu(t));if(!e.every(u=>typeof u===Cu))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(wn)},yn=t=>{let e=t.replace(Va,hu),u=!1;for(e.startsWith(Xa)&&(u=!0);e.match(gn);)e=e.replace(gn,hu);return u&&(e=hu+e),e},wn=t=>yn(v.normalize(yn(t))),Rn=(t=Fu)=>e=>typeof e!==Cu?e:wn(v.isAbsolute(e)?e:v.join(t,e)),Dl=(t,e)=>v.isAbsolute(t)?t:t.startsWith(du)?du+v.join(e,t.slice(1)):v.join(e,t),X=(t,e)=>t[e]===void 0;class ol{constructor(e,u){this.path=e,this._removeWatcher=u,this.items=new Set}add(e){const{items:u}=this;!u||e!==mn&&e!==Za&&u.add(e)}async remove(e){const{items:u}=this;if(!u||(u.delete(e),u.size>0))return;const r=this.path;try{await il(r)}catch{this._removeWatcher&&this._removeWatcher(v.dirname(r),v.basename(r))}}has(e){const{items:u}=this;if(!!u)return u.has(e)}getChildren(){const{items:e}=this;if(!!e)return[...e.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}}const al="stat",ll="lstat";class cl{constructor(e,u,r,n){this.fsw=n,this.path=e=e.replace(qa,Fu),this.watchPath=u,this.fullWatchPath=v.resolve(u),this.hasGlob=u!==e,e===Fu&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&r?void 0:!1,this.globFilter=this.hasGlob?au(e,void 0,pu):!1,this.dirParts=this.getDirParts(e),this.dirParts.forEach(s=>{s.length>1&&s.pop()}),this.followSymlinks=r,this.statMethod=r?al:ll}checkGlobSymlink(e){return this.globSymlink===void 0&&(this.globSymlink=e.fullParentDir===this.fullWatchPath?!1:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):e.fullPath}entryPath(e){return v.join(this.watchPath,v.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){const{stats:u}=e;if(u&&u.isSymbolicLink())return this.filterDir(e);const r=this.entryPath(e);return(this.hasGlob&&typeof this.globFilter===el?this.globFilter(r):!0)&&this.fsw._isntIgnored(r,u)&&this.fsw._hasReadPermissions(u)}getDirParts(e){if(!this.hasGlob)return[];const u=[];return(e.includes(Qa)?Ia.expand(e):[e]).forEach(n=>{u.push(v.relative(this.watchPath,n).split(za))}),u}filterDir(e){if(this.hasGlob){const u=this.getDirParts(this.checkGlobSymlink(e));let r=!1;this.unmatchedGlob=!this.dirParts.some(n=>n.every((s,i)=>(s===Ja&&(r=!0),r||!u[0][i]||au(s,u[0][i],pu))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class fl extends Na{constructor(e){super();const u={};e&&Object.assign(u,e),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,X(u,"persistent")&&(u.persistent=!0),X(u,"ignoreInitial")&&(u.ignoreInitial=!1),X(u,"ignorePermissionErrors")&&(u.ignorePermissionErrors=!1),X(u,"interval")&&(u.interval=100),X(u,"binaryInterval")&&(u.binaryInterval=300),X(u,"disableGlobbing")&&(u.disableGlobbing=!1),u.enableBinaryInterval=u.binaryInterval!==u.interval,X(u,"useFsEvents")&&(u.useFsEvents=!u.usePolling),Cn.canUse()||(u.useFsEvents=!1),X(u,"usePolling")&&!u.useFsEvents&&(u.usePolling=rl),nl&&(u.usePolling=!0);const n=process.env.CHOKIDAR_USEPOLLING;if(n!==void 0){const o=n.toLowerCase();o==="false"||o==="0"?u.usePolling=!1:o==="true"||o==="1"?u.usePolling=!0:u.usePolling=!!o}const s=process.env.CHOKIDAR_INTERVAL;s&&(u.interval=Number.parseInt(s,10)),X(u,"atomic")&&(u.atomic=!u.usePolling&&!u.useFsEvents),u.atomic&&(this._pendingUnlinks=new Map),X(u,"followSymlinks")&&(u.followSymlinks=!0),X(u,"awaitWriteFinish")&&(u.awaitWriteFinish=!1),u.awaitWriteFinish===!0&&(u.awaitWriteFinish={});const i=u.awaitWriteFinish;i&&(i.stabilityThreshold||(i.stabilityThreshold=2e3),i.pollInterval||(i.pollInterval=100),this._pendingWrites=new Map),u.ignored&&(u.ignored=gu(u.ignored));let D=0;this._emitReady=()=>{D++,D>=this._readyCount&&(this._emitReady=tl,this._readyEmitted=!0,process.nextTick(()=>this.emit(Ma)))},this._emitRaw=(...o)=>this.emit(ja,...o),this._readyEmitted=!1,this.options=u,u.useFsEvents?this._fsEventsHandler=new Cn(this):this._nodeFsHandler=new ka(this),Object.freeze(u)}add(e,u,r){const{cwd:n,disableGlobbing:s}=this.options;this.closed=!1;let i=An(e);return n&&(i=i.map(D=>{const o=Dl(D,n);return s||!lu(D)?o:La(o)})),i=i.filter(D=>D.startsWith(du)?(this._ignoredPaths.add(D.slice(1)),!1):(this._ignoredPaths.delete(D),this._ignoredPaths.delete(D+Eu),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=i.length),this.options.persistent&&(this._readyCount*=2),i.forEach(D=>this._fsEventsHandler._addToFsEvents(D))):(this._readyCount||(this._readyCount=0),this._readyCount+=i.length,Promise.all(i.map(async D=>{const o=await this._nodeFsHandler._addToNodeFs(D,!r,0,0,u);return o&&this._emitReady(),o})).then(D=>{this.closed||D.filter(o=>o).forEach(o=>{this.add(v.dirname(o),v.basename(u||o))})})),this}unwatch(e){if(this.closed)return this;const u=An(e),{cwd:r}=this.options;return u.forEach(n=>{!v.isAbsolute(n)&&!this._closers.has(n)&&(r&&(n=v.join(r,n)),n=v.resolve(n)),this._closePath(n),this._ignoredPaths.add(n),this._watched.has(n)&&this._ignoredPaths.add(n+Eu),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();const e=[];return this._closers.forEach(u=>u.forEach(r=>{const n=r();n instanceof Promise&&e.push(n)})),this._streams.forEach(u=>u.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(u=>u.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(u=>{this[`_${u}`].clear()}),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){const e={};return this._watched.forEach((u,r)=>{const n=this.options.cwd?v.relative(this.options.cwd,r):r;e[n||mn]=u.getChildren().sort()}),e}emitWithAll(e,u){this.emit(...u),e!==fu&&this.emit(cu,...u)}async _emit(e,u,r,n,s){if(this.closed)return;const i=this.options;ul&&(u=v.normalize(u)),i.cwd&&(u=v.relative(i.cwd,u));const D=[e,u];s!==void 0?D.push(r,n,s):n!==void 0?D.push(r,n):r!==void 0&&D.push(r);const o=i.awaitWriteFinish;let a;if(o&&(a=this._pendingWrites.get(u)))return a.lastChange=new Date,this;if(i.atomic){if(e===Fn)return this._pendingUnlinks.set(u,D),setTimeout(()=>{this._pendingUnlinks.forEach((c,f)=>{this.emit(...c),this.emit(cu,...c),this._pendingUnlinks.delete(f)})},typeof i.atomic=="number"?i.atomic:100),this;e===nt&&this._pendingUnlinks.has(u)&&(e=D[0]=xe,this._pendingUnlinks.delete(u))}if(o&&(e===nt||e===xe)&&this._readyEmitted){const c=(f,l)=>{f?(e=D[0]=fu,D[1]=f,this.emitWithAll(e,D)):l&&(D.length>2?D[2]=l:D.push(l),this.emitWithAll(e,D))};return this._awaitWriteFinish(u,o.stabilityThreshold,e,c),this}if(e===xe&&!this._throttle(xe,u,50))return this;if(i.alwaysStat&&r===void 0&&(e===nt||e===Wa||e===xe)){const c=i.cwd?v.join(i.cwd,u):u;let f;try{f=await sl(c)}catch{}if(!f||this.closed)return;D.push(f)}return this.emitWithAll(e,D),this}_handleError(e){const u=e&&e.code;return e&&u!=="ENOENT"&&u!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||u!=="EPERM"&&u!=="EACCES")&&this.emit(fu,e),e||this.closed}_throttle(e,u,r){this._throttled.has(e)||this._throttled.set(e,new Map);const n=this._throttled.get(e),s=n.get(u);if(s)return s.count++,!1;let i;const D=()=>{const a=n.get(u),c=a?a.count:0;return n.delete(u),clearTimeout(i),a&&clearTimeout(a.timeoutObject),c};i=setTimeout(D,r);const o={timeoutObject:i,clear:D,count:0};return n.set(u,o),o}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,u,r,n){let s,i=e;this.options.cwd&&!v.isAbsolute(e)&&(i=v.join(this.options.cwd,e));const D=new Date,o=a=>{ou.stat(i,(c,f)=>{if(c||!this._pendingWrites.has(e)){c&&c.code!=="ENOENT"&&n(c);return}const l=Number(new Date);a&&f.size!==a.size&&(this._pendingWrites.get(e).lastChange=l);const C=this._pendingWrites.get(e);l-C.lastChange>=u?(this._pendingWrites.delete(e),n(void 0,f)):s=setTimeout(o,this.options.awaitWriteFinish.pollInterval,f)})};this._pendingWrites.has(e)||(this._pendingWrites.set(e,{lastChange:D,cancelWait:()=>(this._pendingWrites.delete(e),clearTimeout(s),r)}),s=setTimeout(o,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,u){if(this.options.atomic&&Ya.test(e))return!0;if(!this._userIgnored){const{cwd:r}=this.options,n=this.options.ignored,s=n&&n.map(Rn(r)),i=gu(s).filter(o=>typeof o===Cu&&!lu(o)).map(o=>o+Eu),D=this._getGlobIgnored().map(Rn(r)).concat(s,i);this._userIgnored=au(D,void 0,pu)}return this._userIgnored([e,u])}_isntIgnored(e,u){return!this._isIgnored(e,u)}_getWatchHelpers(e,u){const r=u||this.options.disableGlobbing||!lu(e)?e:Ha(e),n=this.options.followSymlinks;return new cl(e,r,n,this)}_getWatchedDir(e){this._boundRemove||(this._boundRemove=this._remove.bind(this));const u=v.resolve(e);return this._watched.has(u)||this._watched.set(u,new ol(u,this._boundRemove)),this._watched.get(u)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return!0;const r=(e&&Number.parseInt(e.mode,10))&511,n=Number.parseInt(r.toString(8)[0],10);return Boolean(4&n)}_remove(e,u,r){const n=v.join(e,u),s=v.resolve(n);if(r=r!=null?r:this._watched.has(n)||this._watched.has(s),!this._throttle("remove",n,100))return;!r&&!this.options.useFsEvents&&this._watched.size===1&&this.add(e,u,!0),this._getWatchedDir(n).getChildren().forEach(l=>this._remove(n,l));const o=this._getWatchedDir(e),a=o.has(u);o.remove(u),this._symlinkPaths.has(s)&&this._symlinkPaths.delete(s);let c=n;if(this.options.cwd&&(c=v.relative(this.options.cwd,n)),this.options.awaitWriteFinish&&this._pendingWrites.has(c)&&this._pendingWrites.get(c).cancelWait()===nt)return;this._watched.delete(n),this._watched.delete(s);const f=r?Ga:Fn;a&&!this._isIgnored(n)&&this._emit(f,n),this.options.useFsEvents||this._closePath(n)}_closePath(e){this._closeFile(e);const u=v.dirname(e);this._getWatchedDir(u).remove(v.basename(e))}_closeFile(e){const u=this._closers.get(e);!u||(u.forEach(r=>r()),this._closers.delete(e))}_addPathCloser(e,u){if(!u)return;let r=this._closers.get(e);r||(r=[],this._closers.set(e,r)),r.push(u)}_readdirp(e,u){if(this.closed)return;const r=M({type:cu,alwaysStat:!0,lstat:!0},u);let n=Pa(e,r);return this._streams.add(n),n.once(Ua,()=>{n=void 0}),n.once(Ka,()=>{n&&(this._streams.delete(n),n=void 0)}),n}}const hl=(t,e)=>{const u=new fl(e);return u.add(t),u};var dl=hl;const El="\x1Bc";function pl(t){return t&&"type"in t&&t.type==="dependency"}const Cl=ii({name:"watch",parameters:["<script path>"],flags:{noCache:{type:Boolean,description:"Disable caching"}},help:{description:"Run the script and watch for changes"}},t=>{const e={noCache:Boolean(t.flags.noCache),ipc:!0};let u;function r(){u&&!u.killed&&u.exitCode===null&&u.kill(),process.stdout.write(El),u=fr(t._,e),u.on("message",i=>{if(pl(i)){const D=i.path.startsWith("file:")?Hn(i.path):i.path;D.startsWith("/")&&s.add(D)}})}r();function n(i){u&&u.kill(),process.exit(i)}process.once("SIGINT",()=>n(130)),process.once("SIGTERM",()=>n(143));const s=dl(t._,{ignoreInitial:!0,ignored:["**/.*/**","**/{node_modules,bower_components,vendor}/**","**/dist/**"],ignorePermissionErrors:!0}).on("all",r);process.stdin.on("data",r)});si({name:"tsx",parameters:["[script path]"],commands:[Cl],flags:{noCache:{type:Boolean,description:"Disable caching"},version:{type:Boolean,description:"Show version"},help:{type:Boolean,alias:"h",description:"Show help"}},help:!1},t=>{if(t._.length===0){if(t.flags.version){console.log(Di);return}if(t.flags.help){t.showHelp({description:"Node.js runtime enhanced with esbuild for loading TypeScript & ESM"});return}}const e=process.argv.slice(2).filter(u=>u!=="--no-cache"&&u!=="--noCache");fr(e,{noCache:Boolean(t.flags.noCache)}).on("close",u=>process.exit(u))});
package/package.json CHANGED
@@ -1,23 +1,72 @@
1
1
  {
2
- "name": "tsx",
3
- "version": "1.0.0",
4
- "description": "TypeScript Experience",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/basarat/tsx.git"
12
- },
13
- "keywords": [
14
- "TypeScript",
15
- "IDE"
16
- ],
17
- "author": "basaratali@gmail.com",
18
- "license": "MIT",
19
- "bugs": {
20
- "url": "https://github.com/basarat/tsx/issues"
21
- },
22
- "homepage": "https://github.com/basarat/tsx#readme"
2
+ "name": "tsx",
3
+ "version": "2.1.0",
4
+ "description": "Node.js runtime enhanced with esbuild for loading TypeScript & ESM",
5
+ "keywords": [
6
+ "esbuild",
7
+ "runtime",
8
+ "node",
9
+ "cjs",
10
+ "commonjs",
11
+ "esm",
12
+ "typescript"
13
+ ],
14
+ "license": "MIT",
15
+ "repository": "esbuild-kit/tsx",
16
+ "author": {
17
+ "name": "Hiroki Osame",
18
+ "email": "hiroki.osame@gmail.com"
19
+ },
20
+ "type": "module",
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "bin": "./dist/cli.js",
25
+ "scripts": {
26
+ "build": "pkgroll --target=node12.19 --minify",
27
+ "lint": "eslint --cache .",
28
+ "pretest": "npm run build",
29
+ "test": "node ./dist/cli.js tests/index.ts",
30
+ "prepublishOnly": "npm test"
31
+ },
32
+ "dependencies": {
33
+ "@esbuild-kit/cjs-loader": "^1.0.0",
34
+ "@esbuild-kit/esm-loader": "^1.1.0"
35
+ },
36
+ "optionalDependencies": {
37
+ "fsevents": "~2.3.2"
38
+ },
39
+ "devDependencies": {
40
+ "@pvtnbr/eslint-config": "^0.22.0",
41
+ "@types/cross-spawn": "^6.0.2",
42
+ "@types/node": "^17.0.31",
43
+ "@types/semver": "^7.3.9",
44
+ "chokidar": "^3.5.3",
45
+ "cleye": "^1.2.0",
46
+ "cross-spawn": "^7.0.3",
47
+ "eslint": "^8.15.0",
48
+ "execa": "^6.1.0",
49
+ "get-node": "^13.0.1",
50
+ "manten": "^0.1.0",
51
+ "pkgroll": "^1.2.2",
52
+ "semver": "^7.3.7",
53
+ "typescript": "^4.6.4"
54
+ },
55
+ "eslintConfig": {
56
+ "extends": "@pvtnbr",
57
+ "ignorePatterns": [
58
+ "tests/fixtures"
59
+ ],
60
+ "rules": {
61
+ "@typescript-eslint/no-shadow": [
62
+ "error",
63
+ {
64
+ "allow": [
65
+ "describe",
66
+ "runTestSuite"
67
+ ]
68
+ }
69
+ ]
70
+ }
71
+ }
23
72
  }