Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(package): specify pnpm version in individual pkg.json #57012

Closed
wants to merge 1 commit into from

Conversation

kwonoj
Copy link
Contributor

@kwonoj kwonoj commented Oct 18, 2023

What?

With latest rebase I started to see run-tests fails with errors like

npm ERR! `resolution-mode` is not a valid npm option

npm ERR! A complete log of this run can be found in: /Users/ojkwon/.npm/_logs/2023-10-18T17_46_18_105Z-debug-0.log
Failed to create next instance Error: Command failed with exit code 1 (EPERM): pnpm config set --location=project resolution-mode highest
    at makeError (/Users/ojkwon/github/next.js-upstream/node_modules/.pnpm/execa@2.0.3/node_modules/execa/lib/error.js:58:11)
    at handlePromise (/Users/ojkwon/github/next.js-upstream/node_modules/.pnpm/execa@2.0.3/node_modules/execa/index.js:112:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

that pnpm fails to set an option with setPnpmResolutionMode.

Turned out, this is specific to the isolation test in a condition

  • User have pnpm available, with corepack enabled
  • Node.js have default pnpm version for those (node v18 -> pnpm 7)
  • next.js repo itself, top-level pkg.json have https://github.com/vercel/next.js/blob/canary/package.json#L253 so it'll use latest instead, then sets option correctly
  • when running isolated test, test fixture copies individual pkg (next/pkg.json) which doesn't have corresponding field, so corepack falls back to default -> doesn't have an option then fails.

This could be resolved in 2 ways

  • user manually ensures installed pnpm version is the latest regardless of corepack enabled
  • or set individual pkg's version to let corepack knows which version to use (this PR does)

first approach would work, but probably a confusing experiences as locally it'll return valid pnpm version but only fails to create test. PR attempts to make things work by setting pkg.json's field.

Closes WEB-1797

@ijjk ijjk added create-next-app Related to our CLI tool for quickly starting a new Next.js application. created-by: Turbopack team PRs by the Turbopack team. type: next labels Oct 18, 2023
@ijjk
Copy link
Member

ijjk commented Oct 18, 2023

Stats from current PR

Default Build
General
vercel/next.js canary vercel/next.js pkg-pnpm-version Change
buildDuration 10.5s 10.5s N/A
buildDurationCached 6.2s 6.2s N/A
nodeModulesSize 174 MB 174 MB N/A
nextStartRea..uration (ms) 515ms 536ms N/A
Client Bundles (main, webpack)
vercel/next.js canary vercel/next.js pkg-pnpm-version Change
199-HASH.js gzip 27.5 kB 27.5 kB N/A
3f784ff6-HASH.js gzip 53.3 kB 53.3 kB
99.HASH.js gzip 182 B 182 B
framework-HASH.js gzip 45.3 kB 45.3 kB
main-app-HASH.js gzip 254 B 252 B N/A
main-HASH.js gzip 32.9 kB 32.9 kB N/A
webpack-HASH.js gzip 1.75 kB 1.75 kB N/A
Overall change 98.8 kB 98.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary vercel/next.js pkg-pnpm-version Change
polyfills-HASH.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary vercel/next.js pkg-pnpm-version Change
_app-HASH.js gzip 206 B 205 B N/A
_error-HASH.js gzip 182 B 180 B N/A
amp-HASH.js gzip 506 B 505 B N/A
css-HASH.js gzip 322 B 323 B N/A
dynamic-HASH.js gzip 2.57 kB 2.57 kB N/A
edge-ssr-HASH.js gzip 260 B 259 B N/A
head-HASH.js gzip 350 B 350 B
hooks-HASH.js gzip 369 B 369 B
image-HASH.js gzip 4.35 kB 4.35 kB N/A
index-HASH.js gzip 256 B 256 B
link-HASH.js gzip 2.64 kB 2.63 kB N/A
routerDirect..HASH.js gzip 312 B 311 B N/A
script-HASH.js gzip 385 B 384 B N/A
withRouter-HASH.js gzip 307 B 308 B N/A
1afbb74e6ecf..834.css gzip 106 B 106 B
Overall change 1.08 kB 1.08 kB
Client Build Manifests
vercel/next.js canary vercel/next.js pkg-pnpm-version Change
_buildManifest.js gzip 485 B 482 B N/A
Overall change 0 B 0 B
Rendered Page Sizes
vercel/next.js canary vercel/next.js pkg-pnpm-version Change
index.html gzip 527 B 529 B N/A
link.html gzip 541 B 542 B N/A
withRouter.html gzip 523 B 524 B N/A
Overall change 0 B 0 B
Edge SSR bundle Size
vercel/next.js canary vercel/next.js pkg-pnpm-version Change
edge-ssr.js gzip 93.6 kB 93.6 kB N/A
page.js gzip 154 kB 154 kB N/A
Overall change 0 B 0 B
Middleware size
vercel/next.js canary vercel/next.js pkg-pnpm-version Change
middleware-b..fest.js gzip 624 B 622 B N/A
middleware-r..fest.js gzip 150 B 151 B N/A
middleware.js gzip 22.5 kB 22.5 kB N/A
edge-runtime..pack.js gzip 1.92 kB 1.92 kB
Overall change 1.92 kB 1.92 kB
Commit: bba3c07

@ijjk
Copy link
Member

ijjk commented Oct 18, 2023

Failing test suites

Commit: bba3c07

pnpm test test/integration/font-optimization/test/index.test.js

  • Font Optimization > Spread operator regression on
Expand output

● Font Optimization › Spread operator regression on

command failed with code 1 signal null
   Linting and checking validity of types ...

 ⚠ The Next.js plugin was not detected in your ESLint configuration. See https://nextjs.org/docs/basic-features/eslint#migrating-existing-config
   Creating an optimized production build ...
 ✓ Compiled successfully
   Collecting page data ...
   Generating static pages (0/3) ...

 ✓ Generating static pages (3/3) 
Error: File /root/actions-runner/_work/next.js/next.js/test/integration/font-optimization/fixtures/spread-operator-regression/.next/server/pages/index.js does not exist.

> 1 | (()=>{var __webpack_modules__={5841:(e,t,r)=>{"use strict";e.exports=t;t.mockS3Http=r(9361).get_mockS3Http();t.mockS3Http("on");const s=t.mockS3Http("get");const a=r(7147);const o=r(1017);const u=r(1758);const c=r(9544);c.disableProgress();const f=r(5977);const d=r(2361).EventEmitter;const p=r(3837).inherits;const h=["clean","install","reinstall","build","rebuild","package","testpackage","publish","unpublish","info","testbinary","reveal","configure"];const v={};c.heading="node-pre-gyp";if(s){c.warn(`mocking s3 to ${process.env.node_pre_gyp_mock_s3}`)}Object.defineProperty(t,"find",{get:function(){return r(5921).find},enumerable:true});function Run({package_json_path:e="./package.json",argv:t}){this.package_json_path=e;this.commands={};const r=this;h.forEach((e=>{r.commands[e]=function(t,s){c.verbose("command",e,t);return require("./"+e)(r,t,s)}}));this.parseArgv(t);this.binaryHostSet=false}p(Run,d);t.Run=Run;const D=Run.prototype;D.package=r(7399);D.configDefs={help:Boolean,arch:String,debug:Boolean,directory:String,proxy:String,loglevel:String};D.shorthands={release:"--no-debug",C:"--directory",debug:"--debug",j:"--jobs",silent:"--loglevel=silent",silly:"--loglevel=silly",verbose:"--loglevel=verbose"};D.aliases=v;D.parseArgv=function parseOpts(e){this.opts=u(this.configDefs,this.shorthands,e);this.argv=this.opts.argv.remain.slice();const t=this.todo=[];e=this.argv.map((e=>{if(e in this.aliases){e=this.aliases[e]}return e}));e.slice().forEach((r=>{if(r in this.commands){const s=e.splice(0,e.indexOf(r));e.shift();if(t.length>0){t[t.length-1].args=s}t.push({name:r,args:[]})}}));if(t.length>0){t[t.length-1].args=e.splice(0)}let r=this.package_json_path;if(this.opts.directory){r=o.join(this.opts.directory,r)}this.package_json=JSON.parse(a.readFileSync(r));this.todo=f.expand_commands(this.package_json,this.opts,t);const s="npm_config_";Object.keys(process.env).forEach((e=>{if(e.indexOf(s)!==0)return;const t=process.env[e];if(e===s+"loglevel"){c.level=t}else{e=e.substring(s.length);if(e==="argv"){if(this.opts.argv&&this.opts.argv.remain&&this.opts.argv.remain.length){}else{this.opts[e]=t}}else{this.opts[e]=t}}}));if(this.opts.loglevel){c.level=this.opts.loglevel}c.resume()};D.setBinaryHostProperty=function(e){if(this.binaryHostSet){return this.package_json.binary.host}const t=this.package_json;if(!t||!t.binary||t.binary.host){return""}if(!t.binary.staging_host||!t.binary.production_host){return""}let r="production_host";if(e==="publish"){r="staging_host"}const s=process.env.node_pre_gyp_s3_host;if(s==="staging"||s==="production"){r=`${s}_host`}else if(this.opts["s3_host"]==="staging"||this.opts["s3_host"]==="production"){r=`${this.opts["s3_host"]}_host`}else if(this.opts["s3_host"]||s){throw new Error(`invalid s3_host ${this.opts["s3_host"]||s}`)}t.binary.host=t.binary[r];this.binaryHostSet=true;return t.binary.host};D.usage=function usage(){const e=["","  Usage: node-pre-gyp <command> [options]","","  where <command> is one of:",h.map((e=>"    - "+e+" - "+require("./"+e).usage)).join("\n"),"","node-pre-gyp@"+this.version+"  "+o.resolve(__dirname,".."),"node@"+process.versions.node].join("\n");return e};Object.defineProperty(D,"version",{get:function(){return this.package.version},enumerable:true})},5921:(e,t,r)=>{"use strict";const s=r(5841);const a=r(2821);const o=r(5977);const u=r(7147).existsSync||r(1017).existsSync;const c=r(1017);e.exports=t;t.usage="Finds the require path for the node-pre-gyp installed module";t.validate=function(e,t){a.validate_config(e,t)};t.find=function(e,t){if(!u(e)){throw new Error(e+"does not exist")}const r=new s.Run({package_json_path:e,argv:process.argv});r.setBinaryHostProperty();const f=r.package_json;a.validate_config(f,t);let d;if(o.get_napi_build_versions(f,t)){d=o.get_best_napi_build_version(f,t)}t=t||{};if(!t.module_root)t.module_root=c.dirname(e);const p=a.evaluate(f,t,d);return p.module}},5977:(e,t,r)=>{"use strict";const s=r(7147);e.exports=t;const a=process.version.substr(1).replace(/-.*$/,"").split(".").map((e=>+e));const o=["build","clean","configure","package","publish","reveal","testbinary","testpackage","unpublish"];const u="napi_build_version=";e.exports.get_napi_version=function(){let e=process.versions.napi;if(!e){if(a[0]===9&&a[1]>=3)e=2;else if(a[0]===8)e=1}return e};e.exports.get_napi_version_as_string=function(t){const r=e.exports.get_napi_version(t);return r?""+r:""};e.exports.validate_package_json=function(t,r){const s=t.binary;const a=pathOK(s.module_path);const o=pathOK(s.remote_path);const u=pathOK(s.package_name);const c=e.exports.get_napi_build_versions(t,r,true);const f=e.exports.get_napi_build_versions_raw(t);if(c){c.forEach((e=>{if(!(parseInt(e,10)===e&&e>0)){throw new Error("All values specified in napi_versions must be positive integers.")}}))}if(c&&(!a||!o&&!u)){throw new Error("When napi_versions is specified; module_path and either remote_path or "+"package_name must contain the substitution string '{napi_build_version}`.")}if((a||o||u)&&!f){throw new Error("When the substitution string '{napi_build_version}` is specified in "+"module_path, remote_path, or package_name; napi_versions must also be specified.")}if(c&&!e.exports.get_best_napi_build_version(t,r)&&e.exports.build_napi_only(t)){throw new Error("The Node-API version of this Node instance is "+e.exports.get_napi_version(r?r.target:undefined)+". "+"This module supports Node-API version(s) "+e.exports.get_napi_build_versions_raw(t)+". "+"This Node instance cannot run this module.")}if(f&&!c&&e.exports.build_napi_only(t)){throw new Error("The Node-API version of this Node instance is "+e.exports.get_napi_version(r?r.target:undefined)+". "+"This module supports Node-API version(s) "+e.exports.get_napi_build_versions_raw(t)+". "+"This Node instance cannot run this module.")}};function pathOK(e){return e&&(e.indexOf("{napi_build_version}")!==-1||e.indexOf("{node_napi_label}")!==-1)}e.exports.expand_commands=function(t,r,s){const a=[];const c=e.exports.get_napi_build_versions(t,r);s.forEach((s=>{if(c&&s.name==="install"){const o=e.exports.get_best_napi_build_version(t,r);const c=o?[u+o]:[];a.push({name:s.name,args:c})}else if(c&&o.indexOf(s.name)!==-1){c.forEach((e=>{const t=s.args.slice();t.push(u+e);a.push({name:s.name,args:t})}))}else{a.push(s)}}));return a};e.exports.get_napi_build_versions=function(t,s,a){const o=r(9544);let u=[];const c=e.exports.get_napi_version(s?s.target:undefined);if(t.binary&&t.binary.napi_versions){t.binary.napi_versions.forEach((e=>{const t=u.indexOf(e)!==-1;if(!t&&c&&e<=c){u.push(e)}else if(a&&!t&&c){o.info("This Node instance does not support builds for Node-API version",e)}}))}if(s&&s["build-latest-napi-version-only"]){let e=0;u.forEach((t=>{if(t>e)e=t}));u=e?[e]:[]}return u.length?u:undefined};e.exports.get_napi_build_versions_raw=function(e){const t=[];if(e.binary&&e.binary.napi_versions){e.binary.napi_versions.forEach((e=>{if(t.indexOf(e)===-1){t.push(e)}}))}return t.length?t:undefined};e.exports.get_command_arg=function(e){return u+e};e.exports.get_napi_build_version_from_command_args=function(e){for(let t=0;t<e.length;t++){const r=e[t];if(r.indexOf(u)===0){return parseInt(r.substr(u.length),10)}}return undefined};e.exports.swap_build_dir_out=function(t){if(t){const a=r(4700);a.sync(e.exports.get_build_dir(t));s.renameSync("build",e.exports.get_build_dir(t))}};e.exports.swap_build_dir_in=function(t){if(t){const a=r(4700);a.sync("build");s.renameSync(e.exports.get_build_dir(t),"build")}};e.exports.get_build_dir=function(e){return"build-tmp-napi-v"+e};e.exports.get_best_napi_build_version=function(t,r){let s=0;const a=e.exports.get_napi_build_versions(t,r);if(a){const t=e.exports.get_napi_version(r?r.target:undefined);a.forEach((e=>{if(e>s&&e<=t){s=e}}))}return s===0?undefined:s};e.exports.build_napi_only=function(e){return e.binary&&e.binary.package_name&&e.binary.package_name.indexOf("{node_napi_label}")===-1}},9361:(e,t,r)=>{"use strict";e.exports=t;const s=r(7310);const a=r(7147);const o=r(1017);e.exports.detect=function(e,t){const r=e.hosted_path;const a=s.parse(r);t.prefix=!a.pathname||a.pathname==="/"?"":a.pathname.replace("/","");if(e.bucket&&e.region){t.bucket=e.bucket;t.region=e.region;t.endpoint=e.host;t.s3ForcePathStyle=e.s3ForcePathStyle}else{const e=a.hostname.split(".s3");const r=e[0];if(!r){return}if(!t.bucket){t.bucket=r}if(!t.region){const r=e[1].slice(1).split(".")[0];if(r==="amazonaws"){t.region="us-east-1"}else{t.region=r}}}};e.exports.get_s3=function(e){if(process.env.node_pre_gyp_mock_s3){const e=r(3930);const t=r(2037);e.config.basePath=`${t.tmpdir()}/mock`;const s=e.S3();const wcb=e=>(t,...r)=>{if(t&&t.code==="ENOENT"){t.code="NotFound"}return e(t,...r)};return{listObjects(e,t){return s.listObjects(e,wcb(t))},headObject(e,t){return s.headObject(e,wcb(t))},deleteObject(e,t){return s.deleteObject(e,wcb(t))},putObject(e,t){return s.putObject(e,wcb(t))}}}const t=r(2355);t.config.update(e);const s=new t.S3;return{listObjects(e,t){return s.listObjects(e,t)},headObject(e,t){return s.headObject(e,t)},deleteObject(e,t){return s.deleteObject(e,t)},putObject(e,t){return s.putObject(e,t)}}};e.exports.get_mockS3Http=function(){let e=false;if(!process.env.node_pre_gyp_mock_s3){return()=>e}const t=r(4997);const s="https://mapbox-node-pre-gyp-public-testing-bucket.s3.us-east-1.amazonaws.com";const u=process.env.node_pre_gyp_mock_s3+"/mapbox-node-pre-gyp-public-testing-bucket";const mock_http=()=>{function get(e,t){const r=o.join(u,e.replace("%2B","+"));try{a.accessSync(r,a.constants.R_OK)}catch(e){return[404,"not found\n"]}return[200,a.createReadStream(r)]}return t(s).persist().get((()=>e)).reply(get)};mock_http(t,s,u);const mockS3Http=t=>{const r=e;if(t==="off"){e=false}else if(t==="on"){e=true}else if(t!=="get"){throw new Error(`illegal action for setMockHttp ${t}`)}return r};return mockS3Http}},2821:(e,t,r)=>{"use strict";e.exports=t;const s=r(1017);const a=r(7849);const o=r(7310);const u=r(5104);const c=r(5977);let f;if(process.env.NODE_PRE_GYP_ABI_CROSSWALK){f=require(process.env.NODE_PRE_GYP_ABI_CROSSWALK)}else{f=r(9448)}const d={};Object.keys(f).forEach((e=>{const t=e.split(".")[0];if(!d[t]){d[t]=e}}));function get_electron_abi(e,t){if(!e){throw new Error("get_electron_abi requires valid runtime arg")}if(typeof t==="undefined"){throw new Error("Empty target version is not supported if electron is the target.")}const r=a.parse(t);return e+"-v"+r.major+"."+r.minor}e.exports.get_electron_abi=get_electron_abi;function get_node_webkit_abi(e,t){if(!e){throw new Error("get_node_webkit_abi requires valid runtime arg")}if(typeof t==="undefined"){throw new Error("Empty target version is not supported if node-webkit is the target.")}return e+"-v"+t}e.exports.get_node_webkit_abi=get_node_webkit_abi;function get_node_abi(e,t){if(!e){throw new Error("get_node_abi requires valid runtime arg")}if(!t){throw new Error("get_node_abi requires valid process.versions object")}const r=a.parse(t.node);if(r.major===0&&r.minor%2){return e+"-v"+t.node}else{return t.modules?e+"-v"+ +t.modules:"v8-"+t.v8.split(".").slice(0,2).join(".")}}e.exports.get_node_abi=get_node_abi;function get_runtime_abi(e,t){if(!e){throw new Error("get_runtime_abi requires valid runtime arg")}if(e==="node-webkit"){return get_node_webkit_abi(e,t||process.versions["node-webkit"])}else if(e==="electron"){return get_electron_abi(e,t||process.versions.electron)}else{if(e!=="node"){throw new Error("Unknown Runtime: '"+e+"'")}if(!t){return get_node_abi(e,process.versions)}else{let r;if(f[t]){r=f[t]}else{const e=t.split(".").map((e=>+e));if(e.length!==3){throw new Error("Unknown target version: "+t)}const s=e[0];let a=e[1];let o=e[2];if(s===1){while(true){if(a>0)--a;if(o>0)--o;const e=""+s+"."+a+"."+o;if(f[e]){r=f[e];console.log("Warning: node-pre-gyp could not find exact match for "+t);console.log("Warning: but node-pre-gyp successfully choose "+e+" as ABI compatible target");break}if(a===0&&o===0){break}}}else if(s>=2){if(d[s]){r=f[d[s]];console.log("Warning: node-pre-gyp could not find exact match for "+t);console.log("Warning: but node-pre-gyp successfully choose "+d[s]+" as ABI compatible target")}}else if(s===0){if(e[1]%2===0){while(--o>0){const e=""+s+"."+a+"."+o;if(f[e]){r=f[e];console.log("Warning: node-pre-gyp could not find exact match for "+t);console.log("Warning: but node-pre-gyp successfully choose "+e+" as ABI compatible target");break}}}}}if(!r){throw new Error("Unsupported target version: "+t)}const s={node:t,v8:r.v8+".0",modules:r.node_abi>1?r.node_abi:undefined};return get_node_abi(e,s)}}}e.exports.get_runtime_abi=get_runtime_abi;const p=["module_name","module_path","host"];function validate_config(e,t){const r=e.name+" package.json is not node-pre-gyp ready:\n";const s=[];if(!e.main){s.push("main")}if(!e.version){s.push("version")}if(!e.name){s.push("name")}if(!e.binary){s.push("binary")}const a=e.binary;if(a){p.forEach((e=>{if(!a[e]||typeof a[e]!=="string"){s.push("binary."+e)}}))}if(s.length>=1){throw new Error(r+"package.json must declare these properties: \n"+s.join("\n"))}if(a){const e=o.parse(a.host).protocol;if(e==="http:"){throw new Error("'host' protocol ("+e+") is invalid - only 'https:' is accepted")}}c.validate_package_json(e,t)}e.exports.validate_config=validate_config;function eval_template(e,t){Object.keys(t).forEach((r=>{const s="{"+r+"}";while(e.indexOf(s)>-1){e=e.replace(s,t[r])}}));return e}function fix_slashes(e){if(e.slice(-1)!=="/"){return e+"/"}return e}function drop_double_slashes(e){return e.replace(/\/\//g,"/")}function get_process_runtime(e){let t="node";if(e["node-webkit"]){t="node-webkit"}else if(e.electron){t="electron"}return t}e.exports.get_process_runtime=get_process_runtime;const h="{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz";const v="";e.exports.evaluate=function(e,t,r){t=t||{};validate_config(e,t);const f=e.version;const d=a.parse(f);const p=t.runtime||get_process_runtime(process.versions);const D={name:e.name,configuration:t.debug?"Debug":"Release",debug:t.debug,module_name:e.binary.module_name,version:d.version,prerelease:d.prerelease.length?d.prerelease.join("."):"",build:d.build.length?d.build.join("."):"",major:d.major,minor:d.minor,patch:d.patch,runtime:p,node_abi:get_runtime_abi(p,t.target),node_abi_napi:c.get_napi_version(t.target)?"napi":get_runtime_abi(p,t.target),napi_version:c.get_napi_version(t.target),napi_build_version:r||"",node_napi_label:r?"napi-v"+r:get_runtime_abi(p,t.target),target:t.target||"",platform:t.target_platform||process.platform,target_platform:t.target_platform||process.platform,arch:t.target_arch||process.arch,target_arch:t.target_arch||process.arch,libc:t.target_libc||u.family||"unknown",module_main:e.main,toolset:t.toolset||"",bucket:e.binary.bucket,region:e.binary.region,s3ForcePathStyle:e.binary.s3ForcePathStyle||false};const g=D.module_name.replace("-","_");const y=process.env["npm_config_"+g+"_binary_host_mirror"]||e.binary.host;D.host=fix_slashes(eval_template(y,D));D.module_path=eval_template(e.binary.module_path,D);if(t.module_root){D.module_path=s.join(t.module_root,D.module_path)}else{D.module_path=s.resolve(D.module_path)}D.module=s.join(D.module_path,D.module_name+".node");D.remote_path=e.binary.remote_path?drop_double_slashes(fix_slashes(eval_template(e.binary.remote_path,D))):v;const m=e.binary.package_name?e.binary.package_name:h;D.package_name=eval_template(m,D);D.staged_tarball=s.join("build/stage",D.remote_path,D.package_name);D.hosted_path=o.resolve(D.host,D.remote_path);D.hosted_tarball=o.resolve(D.hosted_path,D.package_name);return D}},7498:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=s(r(1017));const o=r(3982);const u=r(9663);const c=r(4370);const f=r(1988);const d=s(r(3331));const p=r(9336);const h=s(r(3535));const v=r(1226);const D=r(2100);const g=r(7393);const y=s(r(1415));const m=s(r(1));const _=s(r(7663));const E=s(r(5841));const w=r(7310);const x=f.Parser.extend();const F=s(r(2037));const C=r(3791);const S=s(r(2382));const k={cwd:()=>K,env:{NODE_ENV:c.UNKNOWN,[c.UNKNOWN]:true},[c.UNKNOWN]:true};const A=Symbol();const R=Symbol();const O=Symbol();const T=Symbol();const j=Symbol();const B=Symbol();const L=Symbol();const N=Symbol();const I=Symbol();const P={access:B,accessSync:B,createReadStream:B,exists:B,existsSync:B,fstat:B,fstatSync:B,lstat:B,lstatSync:B,open:B,readdir:L,readdirSync:L,readFile:B,readFileSync:B,stat:B,statSync:B};const W={...P,pathExists:B,pathExistsSync:B,readJson:B,readJSON:B,readJsonSync:B,readJSONSync:B};const M=Object.assign(Object.create(null),{bindings:{default:N},express:{default:function(){return{[c.UNKNOWN]:true,set:A,engine:R}}},fs:{default:P,...P},"fs-extra":{default:W,...W},"graceful-fs":{default:P,...P},process:{default:k,...k},path:{default:{}},os:{default:F.default,...F.default},"@mapbox/node-pre-gyp":{default:E.default,...E.default},"node-pre-gyp":D.pregyp,"node-pre-gyp/lib/pre-binding":D.pregyp,"node-pre-gyp/lib/pre-binding.js":D.pregyp,"node-gyp-build":{default:I},nbind:{init:O,default:{init:O}},"resolve-from":{default:S.default},"strong-globalize":{default:{SetRootDir:T},SetRootDir:T},pkginfo:{default:j}});const $={_interopRequireDefault:g.normalizeDefaultRequire,_interopRequireWildcard:g.normalizeWildcardRequire,__importDefault:g.normalizeDefaultRequire,__importStar:g.normalizeWildcardRequire,MONGOOSE_DRIVER_PATH:undefined,URL:w.URL,Object:{assign:Object.assign}};$.global=$.GLOBAL=$.globalThis=$;const q=Symbol();D.pregyp.find[q]=true;const U=M.path;Object.keys(a.default).forEach((e=>{const t=a.default[e];if(typeof t==="function"){const r=function mockPath(){return t.apply(mockPath,arguments)};r[q]=true;U[e]=U.default[e]=r}else{U[e]=U.default[e]=t}}));U.resolve=U.default.resolve=function(...e){return a.default.resolve.apply(this,[K,...e])};U.resolve[q]=true;const G=new Set([".h",".cmake",".c",".cpp"]);const H=new Set(["CHANGELOG.md","README.md","readme.md","changelog.md"]);let K;const z=/^\/[^\/]+|^[a-z]:[\\/][^\\/]+/i;function isAbsolutePathOrUrl(e){if(e instanceof w.URL)return e.protocol==="file:";if(typeof e==="string"){if(e.startsWith("file:")){try{new w.URL(e);return true}catch{return false}}return z.test(e)}return false}const V=Symbol();const Y=/([\/\\]\*\*[\/\\]\*)+/g;async function analyze(e,t,r){const s=new Set;const f=new Set;const g=new Set;const E=a.default.dirname(e);K=r.cwd;const F=(0,v.getPackageBase)(e);const emitAssetDirectory=e=>{if(!r.analysis.emitGlobs)return;const t=e.indexOf(c.WILDCARD);const o=t===-1?e.length:e.lastIndexOf(a.default.sep,t);const u=e.substring(0,o);const f=e.slice(o);const d=f.replace(c.wildcardRegEx,((e,t)=>f[t-1]===a.default.sep?"**/*":"*")).replace(Y,"/**/*")||"/**/*";if(r.ignoreFn(a.default.relative(r.base,u+d)))return;P=P.then((async()=>{if(r.log)console.log("Globbing "+u+d);const e=await new Promise(((e,t)=>(0,h.default)(u+d,{mark:true,ignore:u+"/**/node_modules/**/*"},((r,s)=>r?t(r):e(s)))));e.filter((e=>!G.has(a.default.extname(e))&&!H.has(a.default.basename(e))&&!e.endsWith("/"))).forEach((e=>s.add(e)))}))};let P=Promise.resolve();t=t.replace(/^#![^\n\r]*[\r\n]/,"");let W;let U=false;try{W=x.parse(t,{ecmaVersion:"latest",allowReturnOutsideFunction:true});U=false}catch(t){const s=t&&t.message&&t.message.includes("sourceType: module");if(!s){r.warnings.add(new Error(`Failed to parse ${e} as script:\n${t&&t.message}`))}}if(!W){try{W=x.parse(t,{ecmaVersion:"latest",sourceType:"module",allowAwaitOutsideFunction:true});U=true}catch(t){r.warnings.add(new Error(`Failed to parse ${e} as module:\n${t&&t.message}`));return{assets:s,deps:f,imports:g,isESM:false}}}const Q=(0,w.pathToFileURL)(e).href;const J=Object.assign(Object.create(null),{__dirname:{shadowDepth:0,value:{value:a.default.resolve(e,"..")}},__filename:{shadowDepth:0,value:{value:e}},process:{shadowDepth:0,value:{value:k}}});if(!U||r.mixedModules){J.require={shadowDepth:0,value:{value:{[c.FUNCTION](e){f.add(e);const t=M[e.startsWith("node:")?e.slice(5):e];return t.default},resolve(t){return(0,m.default)(t,e,r)}}}};J.require.value.value.resolve[q]=true}function setKnownBinding(e,t){if(e==="require")return;J[e]={shadowDepth:0,value:t}}function getKnownBinding(e){const t=J[e];if(t){if(t.shadowDepth===0){return t.value}}return undefined}function hasKnownBindingValue(e){const t=J[e];return t&&t.shadowDepth===0}if((U||r.mixedModules)&&isAst(W)){for(const e of W.body){if(e.type==="ImportDeclaration"){const t=String(e.source.value);f.add(t);const r=M[t.startsWith("node:")?t.slice(5):t];if(r){for(const t of e.specifiers){if(t.type==="ImportNamespaceSpecifier")setKnownBinding(t.local.name,{value:r});else if(t.type==="ImportDefaultSpecifier"&&"default"in r)setKnownBinding(t.local.name,{value:r.default});else if(t.type==="ImportSpecifier"&&t.imported.name in r)setKnownBinding(t.local.name,{value:r[t.imported.name]})}}}else if(e.type==="ExportNamedDeclaration"||e.type==="ExportAllDeclaration"){if(e.source)f.add(String(e.source.value))}}}async function computePureStaticValue(e,t=true){const r=Object.create(null);Object.keys($).forEach((e=>{r[e]={value:$[e]}}));Object.keys(J).forEach((e=>{r[e]=getKnownBinding(e)}));r["import.meta"]={url:Q};const s=await(0,c.evaluate)(e,r,t);return s}let X;let Z;let ee=false;function emitWildcardRequire(e){if(!r.analysis.emitGlobs||!e.startsWith("./")&&!e.startsWith("../"))return;e=a.default.resolve(E,e);const t=e.indexOf(c.WILDCARD);const s=t===-1?e.length:e.lastIndexOf(a.default.sep,t);const o=e.substring(0,s);const u=e.slice(s);let d=u.replace(c.wildcardRegEx,((e,t)=>u[t-1]===a.default.sep?"**/*":"*"))||"/**/*";if(!d.endsWith("*"))d+="?("+(r.ts?".ts|.tsx|":"")+".js|.json|.node)";if(r.ignoreFn(a.default.relative(r.base,o+d)))return;P=P.then((async()=>{if(r.log)console.log("Globbing "+o+d);const e=await new Promise(((e,t)=>(0,h.default)(o+d,{mark:true,ignore:o+"/**/node_modules/**/*"},((r,s)=>r?t(r):e(s)))));e.filter((e=>!G.has(a.default.extname(e))&&!H.has(a.default.basename(e))&&!e.endsWith("/"))).forEach((e=>f.add(e)))}))}async function processRequireArg(e,t=false){if(e.type==="ConditionalExpression"){await processRequireArg(e.consequent,t);await processRequireArg(e.alternate,t);return}if(e.type==="LogicalExpression"){await processRequireArg(e.left,t);await processRequireArg(e.right,t);return}let r=await computePureStaticValue(e,true);if(!r)return;if("value"in r&&typeof r.value==="string"){if(!r.wildcards)(t?g:f).add(r.value);else if(r.wildcards.length>=1)emitWildcardRequire(r.value)}else{if("then"in r&&typeof r.then==="string")(t?g:f).add(r.then);if("else"in r&&typeof r.else==="string")(t?g:f).add(r.else)}}let te=(0,u.attachScopes)(W,"scope");if(isAst(W)){(0,C.handleWrappers)(W);await(0,y.default)({id:e,ast:W,emitDependency:e=>f.add(e),emitAsset:e=>s.add(e),emitAssetDirectory:emitAssetDirectory,job:r})}async function backtrack(e,t){if(!X)throw new Error("Internal error: No staticChildNode for backtrack.");const r=await computePureStaticValue(e,true);if(r){if("value"in r&&typeof r.value!=="symbol"||"then"in r&&typeof r.then!=="symbol"&&typeof r.else!=="symbol"){Z=r;X=e;if(t)t.skip();return}}await emitStaticChildAsset()}await(0,o.asyncWalk)(W,{async enter(t,o){const u=t;const c=o;if(u.scope){te=u.scope;for(const e in u.scope.declarations){if(e in J)J[e].shadowDepth++}}if(X)return;if(!c)return;if(u.type==="Identifier"){if((0,p.isIdentifierRead)(u,c)&&r.analysis.computeFileReferences){let e;if(typeof(e=getKnownBinding(u.name)?.value)==="string"&&e.match(z)||e&&(typeof e==="function"||typeof e==="object")&&e[q]){Z={value:typeof e==="string"?e:undefined};X=u;await backtrack(c,this)}}}else if(r.analysis.computeFileReferences&&u.type==="MemberExpression"&&u.object.type==="MetaProperty"&&u.object.meta.name==="import"&&u.object.property.name==="meta"&&(u.property.computed?u.property.value:u.property.name)==="url"){Z={value:Q};X=u;await backtrack(c,this)}else if(u.type==="ImportExpression"){await processRequireArg(u.source,true);return}else if(u.type==="CallExpression"){if((!U||r.mixedModules)&&u.callee.type==="Identifier"&&u.arguments.length){if(u.callee.name==="require"&&J.require.shadowDepth===0){await processRequireArg(u.arguments[0]);return}}else if((!U||r.mixedModules)&&u.callee.type==="MemberExpression"&&u.callee.object.type==="Identifier"&&u.callee.object.name==="module"&&"module"in J===false&&u.callee.property.type==="Identifier"&&!u.callee.computed&&u.callee.property.name==="require"&&u.arguments.length){await processRequireArg(u.arguments[0]);return}else if((!U||r.mixedModules)&&u.callee.type==="MemberExpression"&&u.callee.object.type==="Identifier"&&u.callee.object.name==="require"&&J.require.shadowDepth===0&&u.callee.property.type==="Identifier"&&!u.callee.computed&&u.callee.property.name==="resolve"&&u.arguments.length){await processRequireArg(u.arguments[0]);return}const t=r.analysis.evaluatePureExpressions&&await computePureStaticValue(u.callee,false);if(t&&"value"in t&&typeof t.value==="function"&&t.value[q]&&r.analysis.computeFileReferences){Z=await computePureStaticValue(u,true);if(Z&&c){X=u;await backtrack(c,this)}}else if(t&&"value"in t&&typeof t.value==="symbol"){switch(t.value){case V:if(u.arguments.length===1&&u.arguments[0].type==="Literal"&&u.callee.type==="Identifier"&&J.require.shadowDepth===0){await processRequireArg(u.arguments[0])}break;case N:if(u.arguments.length){const e=await computePureStaticValue(u.arguments[0],false);if(e&&"value"in e&&e.value){let t;if(typeof e.value==="object")t=e.value;else if(typeof e.value==="string")t={bindings:e.value};if(!t.path){t.path=true}t.module_root=F;let r;try{r=(0,d.default)(t)}catch(e){}if(r){Z={value:r};X=u;await emitStaticChildAsset()}}}break;case I:if(u.arguments.length===1&&u.arguments[0].type==="Identifier"&&u.arguments[0].name==="__dirname"&&J.__dirname.shadowDepth===0){let e;try{const t=(0,S.default)(E,"node-gyp-build");e=require(t).path(E)}catch(t){try{e=_.default.path(E)}catch(e){}}if(e){Z={value:e};X=u;await emitStaticChildAsset()}}break;case O:if(u.arguments.length){const e=await computePureStaticValue(u.arguments[0],false);if(e&&"value"in e&&(typeof e.value==="string"||typeof e.value==="undefined")){const t=(0,D.nbind)(e.value);if(t&&t.path){f.add(a.default.relative(E,t.path).replace(/\\/g,"/"));return this.skip()}}}break;case A:if(u.arguments.length===2&&u.arguments[0].type==="Literal"&&u.arguments[0].value==="view engine"&&!ee){await processRequireArg(u.arguments[1]);return this.skip()}break;case R:ee=true;break;case B:case L:if(u.arguments[0]&&r.analysis.computeFileReferences){Z=await computePureStaticValue(u.arguments[0],true);if(Z){X=u.arguments[0];if(t.value===L&&u.arguments[0].type==="Identifier"&&u.arguments[0].name==="__dirname"){emitAssetDirectory(E)}else{await backtrack(c,this)}return this.skip()}}break;case T:if(u.arguments[0]){const e=await computePureStaticValue(u.arguments[0],false);if(e&&"value"in e&&e.value)emitAssetDirectory(e.value+"/intl");return this.skip()}break;case j:let o=a.default.resolve(e,"../package.json");const p=a.default.resolve("/package.json");while(o!==p&&await r.stat(o)===null)o=a.default.resolve(o,"../../package.json");if(o!==p)s.add(o);break}}}else if(u.type==="VariableDeclaration"&&c&&!(0,p.isVarLoop)(c)&&r.analysis.evaluatePureExpressions){for(const e of u.declarations){if(!e.init)continue;const t=await computePureStaticValue(e.init,true);if(t){if(e.id.type==="Identifier"){setKnownBinding(e.id.name,t)}else if(e.id.type==="ObjectPattern"&&"value"in t){for(const r of e.id.properties){if(r.type!=="Property"||r.key.type!=="Identifier"||r.value.type!=="Identifier"||typeof t.value!=="object"||t.value===null||!(r.key.name in t.value))continue;setKnownBinding(r.value.name,{value:t.value[r.key.name]})}}if(!("value"in t)&&isAbsolutePathOrUrl(t.then)&&isAbsolutePathOrUrl(t.else)){Z=t;X=e.init;await emitStaticChildAsset()}}}}else if(u.type==="AssignmentExpression"&&c&&!(0,p.isLoop)(c)&&r.analysis.evaluatePureExpressions){if(!hasKnownBindingValue(u.left.name)){const e=await computePureStaticValue(u.right,false);if(e&&"value"in e){if(u.left.type==="Identifier"){setKnownBinding(u.left.name,e)}else if(u.left.type==="ObjectPattern"){for(const t of u.left.properties){if(t.type!=="Property"||t.key.type!=="Identifier"||t.value.type!=="Identifier"||typeof e.value!=="object"||e.value===null||!(t.key.name in e.value))continue;setKnownBinding(t.value.name,{value:e.value[t.key.name]})}}if(isAbsolutePathOrUrl(e.value)){Z=e;X=u.right;await emitStaticChildAsset()}}}}else if((!U||r.mixedModules)&&(u.type==="FunctionDeclaration"||u.type==="FunctionExpression"||u.type==="ArrowFunctionExpression")&&(u.arguments||u.params)[0]&&(u.arguments||u.params)[0].type==="Identifier"){let e;let t;if((u.type==="ArrowFunctionExpression"||u.type==="FunctionExpression")&&c&&c.type==="VariableDeclarator"&&c.id.type==="Identifier"){e=c.id;t=u.arguments||u.params}else if(u.id){e=u.id;t=u.arguments||u.params}if(e&&u.body.body){let r,s=false;for(let e=0;e<u.body.body.length;e++){if(u.body.body[e].type==="VariableDeclaration"&&!r){r=u.body.body[e].declarations.find((e=>e&&e.id&&e.id.type==="Identifier"&&e.init&&e.init.type==="CallExpression"&&e.init.callee.type==="Identifier"&&e.init.callee.name==="require"&&J.require.shadowDepth===0&&e.init.arguments[0]&&e.init.arguments[0].type==="Identifier"&&e.init.arguments[0].name===t[0].name))}if(r&&u.body.body[e].type==="ReturnStatement"&&u.body.body[e].argument&&u.body.body[e].argument.type==="Identifier"&&u.body.body[e].argument.name===r.id.name){s=true;break}}if(s)setKnownBinding(e.name,{value:V})}}},async leave(e,t){const r=e;const s=t;if(r.scope){if(te.parent){te=te.parent}for(const e in r.scope.declarations){if(e in J){if(J[e].shadowDepth>0)J[e].shadowDepth--;else delete J[e]}}}if(X&&s)await backtrack(s,this)}});await P;return{assets:s,deps:f,imports:g,isESM:U};async function emitAssetPath(e){const t=e.indexOf(c.WILDCARD);const o=t===-1?e.length:e.lastIndexOf(a.default.sep,t);const u=e.substring(0,o);try{var f=await r.stat(u);if(f===null){throw new Error("file not found")}}catch(e){return}if(t!==-1&&f.isFile())return;if(f.isFile()){s.add(e)}else if(f.isDirectory()){if(validWildcard(e))emitAssetDirectory(e)}}function validWildcard(t){let s="";if(t.endsWith(a.default.sep))s=a.default.sep;else if(t.endsWith(a.default.sep+c.WILDCARD))s=a.default.sep+c.WILDCARD;else if(t.endsWith(c.WILDCARD))s=c.WILDCARD;if(t===E+s)return false;if(t===K+s)return false;if(t.endsWith(a.default.sep+"node_modules"+s))return false;if(E.startsWith(t.slice(0,t.length-s.length)+a.default.sep))return false;if(F){const s=e.substring(0,e.indexOf(a.default.sep+"node_modules"))+a.default.sep+"node_modules"+a.default.sep;if(!t.startsWith(s)){if(r.log)console.log("Skipping asset emission of "+t.replace(c.wildcardRegEx,"*")+" for "+e+" as it is outside the package base "+F);return false}}return true}function resolveAbsolutePathOrUrl(e){return e instanceof w.URL?(0,w.fileURLToPath)(e):e.startsWith("file:")?(0,w.fileURLToPath)(new w.URL(e)):a.default.resolve(e)}async function emitStaticChildAsset(){if(!Z){return}if("value"in Z&&isAbsolutePathOrUrl(Z.value)){try{const e=resolveAbsolutePathOrUrl(Z.value);await emitAssetPath(e)}catch(e){}}else if("then"in Z&&"else"in Z&&isAbsolutePathOrUrl(Z.then)&&isAbsolutePathOrUrl(Z.else)){let e;try{e=resolveAbsolutePathOrUrl(Z.then)}catch(e){}let t;try{t=resolveAbsolutePathOrUrl(Z.else)}catch(e){}if(e)await emitAssetPath(e);if(t)await emitAssetPath(t)}else if(X&&X.type==="ArrayExpression"&&"value"in Z&&Z.value instanceof Array){for(const e of Z.value){try{const t=resolveAbsolutePathOrUrl(e);await emitAssetPath(t)}catch(e){}}}X=Z=undefined}}t["default"]=analyze;function isAst(e){return"body"in e}},529:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.CachedFileSystem=void 0;const a=r(1017);const o=s(r(9165));const u=r(5749);const c=o.default.promises.readFile;const f=o.default.promises.readlink;const d=o.default.promises.stat;class CachedFileSystem{constructor({cache:e,fileIOConcurrency:t}){this.fileIOQueue=new u.Sema(t);this.fileCache=e?.fileCache??new Map;this.statCache=e?.statCache??new Map;this.symlinkCache=e?.symlinkCache??new Map;if(e){e.fileCache=this.fileCache;e.statCache=this.statCache;e.symlinkCache=this.symlinkCache}}async readlink(e){const t=this.symlinkCache.get(e);if(t!==undefined)return t;const r=this.executeFileIO(e,this._internalReadlink);this.symlinkCache.set(e,r);return r}async readFile(e){const t=this.fileCache.get(e);if(t!==undefined)return t;const r=this.executeFileIO(e,this._internalReadFile);this.fileCache.set(e,r);return r}async stat(e){const t=this.statCache.get(e);if(t!==undefined)return t;const r=this.executeFileIO(e,this._internalStat);this.statCache.set(e,r);return r}async _internalReadlink(e){try{const t=await f(e);const r=this.statCache.get(e);if(r)this.statCache.set((0,a.resolve)(e,t),r);return t}catch(e){if(e.code!=="EINVAL"&&e.code!=="ENOENT"&&e.code!=="UNKNOWN")throw e;return null}}async _internalReadFile(e){try{return(await c(e)).toString()}catch(e){if(e.code==="ENOENT"||e.code==="EISDIR"){return null}throw e}}async _internalStat(e){try{return await d(e)}catch(e){if(e.code==="ENOENT"){return null}throw e}}async executeFileIO(e,t){await this.fileIOQueue.acquire();try{return t.call(this,e)}finally{this.fileIOQueue.release()}}}t.CachedFileSystem=CachedFileSystem},6223:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;var a=Object.getOwnPropertyDescriptor(t,r);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,s,a)}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var a=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))s(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});t.nodeFileTrace=void 0;a(r(8470),t);var o=r(2411);Object.defineProperty(t,"nodeFileTrace",{enumerable:true,get:function(){return o.nodeFileTrace}})},2411:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;var a=Object.getOwnPropertyDescriptor(t,r);if(!a||("get"in a?!t.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,s,a)}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))s(t,e,r);a(t,e);return t};var u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Job=t.nodeFileTrace=void 0;const c=r(1017);const f=u(r(7498));const d=o(r(1));const p=r(2540);const h=r(8908);const v=r(1017);const D=r(529);function inPath(e,t){const r=(0,v.join)(t,c.sep);return e.startsWith(r)&&e!==r}async function nodeFileTrace(e,t={}){const r=new Job(t);if(t.readFile)r.readFile=t.readFile;if(t.stat)r.stat=t.stat;if(t.readlink)r.readlink=t.readlink;if(t.resolve)r.resolve=t.resolve;r.ts=true;await Promise.all(e.map((async e=>{const t=(0,c.resolve)(e);await r.emitFile(t,"initial");return r.emitDependency(t)})));const s={fileList:r.fileList,esmFileList:r.esmFileList,reasons:r.reasons,warnings:r.warnings};return s}t.nodeFileTrace=nodeFileTrace;class Job{constructor({base:e=process.cwd(),processCwd:t,exports:r,conditions:s=r||["node"],exportsOnly:a=false,paths:o={},ignore:u,log:f=false,mixedModules:h=false,ts:v=true,analysis:g={},cache:y,fileIOConcurrency:m=1024}){this.reasons=new Map;this.maybeEmitDep=async(e,t,r)=>{let s="";let a;try{s=await this.resolve(e,t,this,r)}catch(o){a=o;try{if(this.ts&&e.endsWith(".js")&&o instanceof d.NotFoundError){const o=e.slice(0,-3)+".ts";s=await this.resolve(o,t,this,r);a=undefined}}catch(e){a=e}}if(a){this.warnings.add(new Error(`Failed to resolve dependency "${e}":\n${a?.message}`));return}if(Array.isArray(s)){for(const e of s){if(e.startsWith("node:"))return;await this.emitDependency(e,t)}}else{if(s.startsWith("node:"))return;await this.emitDependency(s,t)}};this.ts=v;e=(0,c.resolve)(e);this.ignoreFn=e=>{if(e.startsWith(".."+c.sep))return true;return false};if(typeof u==="string")u=[u];if(typeof u==="function"){const e=u;this.ignoreFn=t=>{if(t.startsWith(".."+c.sep))return true;if(e(t))return true;return false}}else if(Array.isArray(u)){const t=u.map((t=>(0,c.relative)(e,(0,c.resolve)(e||process.cwd(),t))));this.ignoreFn=e=>{if(e.startsWith(".."+c.sep))return true;if((0,p.isMatch)(e,t))return true;return false}}this.base=e;this.cwd=(0,c.resolve)(t||e);this.conditions=s;this.exportsOnly=a;const _={};for(const t of Object.keys(o)){const r=o[t].endsWith("/");const s=(0,c.resolve)(e,o[t]);_[t]=s+(r?"/":"")}this.paths=_;this.log=f;this.mixedModules=h;this.cachedFileSystem=new D.CachedFileSystem({cache:y,fileIOConcurrency:m});this.analysis={};if(g!==false){Object.assign(this.analysis,{emitGlobs:true,computeFileReferences:true,evaluatePureExpressions:true},g===true?{}:g)}this.analysisCache=y&&y.analysisCache||new Map;if(y){y.analysisCache=this.analysisCache}this.fileList=new Set;this.esmFileList=new Set;this.processed=new Set;this.warnings=new Set}async readlink(e){return this.cachedFileSystem.readlink(e)}async isFile(e){const t=await this.stat(e);if(t)return t.isFile();return false}async isDir(e){const t=await this.stat(e);if(t)return t.isDirectory();return false}async stat(e){return this.cachedFileSystem.stat(e)}async resolve(e,t,r,s){return(0,d.default)(e,t,r,s)}async readFile(e){return this.cachedFileSystem.readFile(e)}async realpath(e,t,r=new Set){if(r.has(e))throw new Error("Recursive symlink detected resolving "+e);r.add(e);const s=await this.readlink(e);if(s){const a=(0,c.dirname)(e);const o=(0,c.resolve)(a,s);const u=await this.realpath(a,t);if(inPath(e,u))await this.emitFile(e,"resolve",t,true);return this.realpath(o,t,r)}if(!inPath(e,this.base))return e;return(0,v.join)(await this.realpath((0,c.dirname)(e),t,r),(0,c.basename)(e))}async emitFile(e,t,r,s=false){if(!s){e=await this.realpath(e,r)}e=(0,c.relative)(this.base,e);if(r){r=(0,c.relative)(this.base,r)}let a=this.reasons.get(e);if(!a){a={type:[t],ignored:false,parents:new Set};this.reasons.set(e,a)}else if(!a.type.includes(t)){a.type.push(t)}if(r&&this.ignoreFn(e,r)){if(!this.fileList.has(e)&&a){a.ignored=true}return false}if(r){a.parents.add(r)}this.fileList.add(e);return true}async getPjsonBoundary(e){const t=e.indexOf(c.sep);let r;while((r=e.lastIndexOf(c.sep))>t){e=e.slice(0,r);if(await this.isFile(e+c.sep+"package.json"))return e}return undefined}async emitDependency(e,t){if(this.processed.has(e)){if(t){await this.emitFile(e,"dependency",t)}return}this.processed.add(e);const r=await this.emitFile(e,"dependency",t);if(!r)return;if(e.endsWith(".json"))return;if(e.endsWith(".node"))return await(0,h.sharedLibEmit)(e,this);if(e.endsWith(".js")||e.endsWith(".ts")){const t=await this.getPjsonBoundary(e);if(t)await this.emitFile(t+c.sep+"package.json","resolve",e)}let s;const a=this.analysisCache.get(e);if(a){s=a}else{const t=await this.readFile(e);if(t===null)throw new Error("File "+e+" does not exist.");s=await(0,f.default)(e,t.toString(),this);this.analysisCache.set(e,s)}const{deps:o,imports:u,assets:d,isESM:p}=s;if(p){this.esmFileList.add((0,c.relative)(this.base,e))}await Promise.all([...[...d].map((async t=>{const r=(0,c.extname)(t);if(r===".js"||r===".mjs"||r===".node"||r===""||this.ts&&(r===".ts"||r===".tsx")&&t.startsWith(this.base)&&t.slice(this.base.length).indexOf(c.sep+"node_modules"+c.sep)===-1)await this.emitDependency(t,e);else await this.emitFile(t,"asset",e)})),...[...o].map((async t=>this.maybeEmitDep(t,e,!p))),...[...u].map((async t=>this.maybeEmitDep(t,e,false)))])}}t.Job=Job},1:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.NotFoundError=void 0;const s=r(1017);async function resolveDependency(e,t,r,a=true){let o;if((0,s.isAbsolute)(e)||e==="."||e===".."||e.startsWith("./")||e.startsWith("../")){const a=e.endsWith("/");o=await resolvePath((0,s.resolve)(t,"..",e)+(a?"/":""),t,r)}else if(e[0]==="#"){o=await packageImportsResolve(e,t,r,a)}else{o=await resolvePackage(e,t,r,a)}if(Array.isArray(o)){return Promise.all(o.map((e=>r.realpath(e,t))))}else if(o.startsWith("node:")){return o}else{return r.realpath(o,t)}}t["default"]=resolveDependency;async function resolvePath(e,t,r){const s=await resolveFile(e,t,r)||await resolveDir(e,t,r);if(!s){throw new NotFoundError(e,t)}return s}async function resolveFile(e,t,r){if(e.endsWith("/"))return undefined;e=await r.realpath(e,t);if(await r.isFile(e))return e;if(r.ts&&e.startsWith(r.base)&&e.slice(r.base.length).indexOf(s.sep+"node_modules"+s.sep)===-1&&await r.isFile(e+".ts"))return e+".ts";if(r.ts&&e.startsWith(r.base)&&e.slice(r.base.length).indexOf(s.sep+"node_modules"+s.sep)===-1&&await r.isFile(e+".tsx"))return e+".tsx";if(await r.isFile(e+".js"))return e+".js";if(await r.isFile(e+".json"))return e+".json";if(await r.isFile(e+".node"))return e+".node";return undefined}async function resolveDir(e,t,r){if(e.endsWith("/"))e=e.slice(0,-1);if(!await r.isDir(e))return;const a=await getPkgCfg(e,r);if(a&&typeof a.main==="string"){const o=await resolveFile((0,s.resolve)(e,a.main),t,r)||await resolveFile((0,s.resolve)(e,a.main,"index"),t,r);if(o){await r.emitFile(e+s.sep+"package.json","resolve",t);return o}}return resolveFile((0,s.resolve)(e,"index"),t,r)}class NotFoundError extends Error{constructor(e,t){super("Cannot find module '"+e+"' loaded from "+t);this.code="MODULE_NOT_FOUND"}}t.NotFoundError=NotFoundError;const a=new Set([...r(8102)._builtinLibs,"constants","module","timers","console","_stream_writable","_stream_readable","_stream_duplex","process","sys"]);function getPkgName(e){const t=e.split("/");if(e[0]==="@"&&t.length>1)return t.length>1?t.slice(0,2).join("/"):null;return t.length?t[0]:null}async function getPkgCfg(e,t){const r=await t.readFile(e+s.sep+"package.json");if(r){try{return JSON.parse(r.toString())}catch(e){}}return undefined}function getExportsTarget(e,t,r){if(typeof e==="string"){return e}else if(e===null){return e}else if(Array.isArray(e)){for(const s of e){const e=getExportsTarget(s,t,r);if(e===null||typeof e==="string"&&e.startsWith("./"))return e}}else if(typeof e==="object"){for(const s of Object.keys(e)){if(s==="default"||s==="require"&&r||s==="import"&&!r||t.includes(s)){const a=getExportsTarget(e[s],t,r);if(a!==undefined)return a}}}return undefined}function resolveExportsImports(e,t,r,s,a,o){let u;if(a){if(!(typeof t==="object"&&!Array.isArray(t)&&t!==null))return undefined;u=t}else if(typeof t==="string"||Array.isArray(t)||t===null||typeof t==="object"&&Object.keys(t).length&&Object.keys(t)[0][0]!=="."){u={".":t}}else{u=t}if(r in u){const t=getExportsTarget(u[r],s.conditions,o);if(typeof t==="string"&&t.startsWith("./"))return e+t.slice(1)}for(const t of Object.keys(u).sort(((e,t)=>t.length-e.length))){if(t.endsWith("*")&&r.startsWith(t.slice(0,-1))){const a=getExportsTarget(u[t],s.conditions,o);if(typeof a==="string"&&a.startsWith("./"))return e+a.slice(1).replace(/\*/g,r.slice(t.length-1))}if(!t.endsWith("/"))continue;if(r.startsWith(t)){const a=getExportsTarget(u[t],s.conditions,o);if(typeof a==="string"&&a.endsWith("/")&&a.startsWith("./"))return e+a.slice(1)+r.slice(t.length)}}return undefined}async function packageImportsResolve(e,t,r,a){if(e!=="#"&&!e.startsWith("#/")&&r.conditions){const o=await r.getPjsonBoundary(t);if(o){const u=await getPkgCfg(o,r);const{imports:c}=u||{};if(u&&c!==null&&c!==undefined){let u=resolveExportsImports(o,c,e,r,true,a);if(u){if(a)u=await resolveFile(u,t,r)||await resolveDir(u,t,r);else if(!await r.isFile(u))throw new NotFoundError(u,t);if(u){await r.emitFile(o+s.sep+"package.json","resolve",t);return u}}}}}throw new NotFoundError(e,t)}async function resolvePackage(e,t,r,o){let u=t;if(a.has(e))return"node:"+e;if(e.startsWith("node:"))return e;const c=getPkgName(e)||"";let f;if(r.conditions){const a=await r.getPjsonBoundary(t);if(a){const u=await getPkgCfg(a,r);const{exports:d}=u||{};if(u&&u.name&&u.name===c&&d!==null&&d!==undefined){f=resolveExportsImports(a,d,"."+e.slice(c.length),r,false,o);if(f){if(o)f=await resolveFile(f,t,r)||await resolveDir(f,t,r);else if(!await r.isFile(f))throw new NotFoundError(f,t)}if(f)await r.emitFile(a+s.sep+"package.json","resolve",t)}}}let d;const p=u.indexOf(s.sep);while((d=u.lastIndexOf(s.sep))>p){u=u.slice(0,d);const a=u+s.sep+"node_modules";const p=await r.stat(a);if(!p||!p.isDirectory())continue;const h=await getPkgCfg(a+s.sep+c,r);const{exports:v}=h||{};if(r.conditions&&v!==undefined&&v!==null&&!f){let u;if(!r.exportsOnly)u=await resolveFile(a+s.sep+e,t,r)||await resolveDir(a+s.sep+e,t,r);let f=resolveExportsImports(a+s.sep+c,v,"."+e.slice(c.length),r,false,o);if(f){if(o)f=await resolveFile(f,t,r)||await resolveDir(f,t,r);else if(!await r.isFile(f))throw new NotFoundError(f,t)}if(f){await r.emitFile(a+s.sep+c+s.sep+"package.json","resolve",t);if(u&&u!==f)return[f,u];return f}if(u)return u}else{const o=await resolveFile(a+s.sep+e,t,r)||await resolveDir(a+s.sep+e,t,r);if(o){if(f&&f!==o)return[o,f];return o}}}if(f)return f;if(Object.hasOwnProperty.call(r.paths,e)){return r.paths[e]}for(const s of Object.keys(r.paths)){if(s.endsWith("/")&&e.startsWith(s)){const a=r.paths[s]+e.slice(s.length);const o=await resolveFile(a,t,r)||await resolveDir(a,t,r);if(!o){throw new NotFoundError(e,t)}return o}}throw new NotFoundError(e,t)}},8470:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true})},9336:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isLoop=t.isVarLoop=t.isIdentifierRead=void 0;function isIdentifierRead(e,t){switch(t.type){case"ObjectPattern":case"ArrayPattern":return false;case"AssignmentExpression":return t.right===e;case"MemberExpression":return t.computed||e===t.object;case"Property":return e===t.value;case"MethodDefinition":return false;case"VariableDeclarator":return t.id!==e;case"ExportSpecifier":return false;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":return false;default:return true}}t.isIdentifierRead=isIdentifierRead;function isVarLoop(e){return e.type==="ForStatement"||e.type==="ForInStatement"||e.type==="ForOfStatement"}t.isVarLoop=isVarLoop;function isLoop(e){return e.type==="ForStatement"||e.type==="ForInStatement"||e.type==="ForOfStatement"||e.type==="WhileStatement"||e.type==="DoWhileStatement"}t.isLoop=isLoop},2100:function(__unused_webpack_module,exports,__nccwpck_require__){"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:true});exports.nbind=exports.pregyp=void 0;const path_1=__importDefault(__nccwpck_require__(1017));const graceful_fs_1=__importDefault(__nccwpck_require__(9165));const versioning=__nccwpck_require__(2821);const napi=__nccwpck_require__(5977);const pregypFind=(e,t)=>{const r=JSON.parse(graceful_fs_1.default.readFileSync(e).toString());versioning.validate_config(r,t);var s;if(napi.get_napi_build_versions(r,t)){s=napi.get_best_napi_build_version(r,t)}t=t||{};if(!t.module_root)t.module_root=path_1.default.dirname(e);var a=versioning.evaluate(r,t,s);return a.module};exports.pregyp={default:{find:pregypFind},find:pregypFind};function makeModulePathList(e,t){return[[e,t],[e,"build",t],[e,"build","Debug",t],[e,"build","Release",t],[e,"out","Debug",t],[e,"Debug",t],[e,"out","Release",t],[e,"Release",t],[e,"build","default",t],[e,process.env["NODE_BINDINGS_COMPILED_DIR"]||"compiled",process.versions.node,process.platform,process.arch,t]]}function findCompiledModule(basePath,specList){var resolvedList=[];var ext=path_1.default.extname(basePath);for(var _i=0,specList_1=specList;_i<specList_1.length;_i++){var spec=specList_1[_i];if(ext==spec.ext){try{spec.path=eval("require.resolve(basePath)");return spec}catch(e){resolvedList.push(basePath)}}}for(var _a=0,specList_2=specList;_a<specList_2.length;_a++){var spec=specList_2[_a];for(var _b=0,_c=makeModulePathList(basePath,spec.name);_b<_c.length;_b++){var pathParts=_c[_b];var resolvedPath=path_1.default.resolve.apply(path_1.default,pathParts);try{spec.path=eval("require.resolve(resolvedPath)")}catch(e){resolvedList.push(resolvedPath);continue}return spec}}return null}function nbind(e=process.cwd()){const t=findCompiledModule(e,[{ext:".node",name:"nbind.node",type:"node"},{ext:".js",name:"nbind.js",type:"emcc"}]);return t}exports.nbind=nbind},1226:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getPackageName=t.getPackageBase=void 0;const r=/^(@[^\\\/]+[\\\/])?[^\\\/]+/;function getPackageBase(e){const t=e.lastIndexOf("node_modules");if(t!==-1&&(e[t-1]==="/"||e[t-1]==="\\")&&(e[t+12]==="/"||e[t+12]==="\\")){const s=e.slice(t+13).match(r);if(s)return e.slice(0,t+13+s[0].length)}return undefined}t.getPackageBase=getPackageBase;function getPackageName(e){const t=e.lastIndexOf("node_modules");if(t!==-1&&(e[t-1]==="/"||e[t-1]==="\\")&&(e[t+12]==="/"||e[t+12]==="\\")){const s=e.slice(t+13).match(r);if(s&&s.length>0){return s[0].replace(/\\/g,"/")}}return undefined}t.getPackageName=getPackageName},7393:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.normalizeWildcardRequire=t.normalizeDefaultRequire=void 0;function normalizeDefaultRequire(e){if(e&&e.__esModule)return e;return{default:e}}t.normalizeDefaultRequire=normalizeDefaultRequire;const r=Object.prototype.hasOwnProperty;function normalizeWildcardRequire(e){if(e&&e.__esModule)return e;const t={};for(const s in e){if(!r.call(e,s))continue;t[s]=e[s]}t["default"]=e;return t}t.normalizeWildcardRequire=normalizeWildcardRequire},8908:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.sharedLibEmit=void 0;const a=s(r(2037));const o=s(r(3535));const u=r(1226);let c="";switch(a.default.platform()){case"darwin":c="/**/*.@(dylib|so?(.*))";break;case"win32":c="/**/*.dll";break;default:c="/**/*.so?(.*)"}async function sharedLibEmit(e,t){const r=(0,u.getPackageBase)(e);if(!r)return;const s=await new Promise(((e,t)=>(0,o.default)(r+c,{ignore:r+"/**/node_modules/**/*"},((r,s)=>r?t(r):e(s)))));await Promise.all(s.map((r=>t.emitFile(r,"sharedlib",e))))}t.sharedLibEmit=sharedLibEmit},1415:function(e,t,r){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const a=r(1017);const o=s(r(1));const u=r(1226);const c=r(9165);const f={"@generated/photon"({id:e,emitAssetDirectory:t}){if(e.endsWith("@generated/photon/index.js")){t((0,a.resolve)((0,a.dirname)(e),"runtime/"))}},argon2({id:e,emitAssetDirectory:t}){if(e.endsWith("argon2/argon2.js")){t((0,a.resolve)((0,a.dirname)(e),"build","Release"));t((0,a.resolve)((0,a.dirname)(e),"prebuilds"));t((0,a.resolve)((0,a.dirname)(e),"lib","binding"))}},bull({id:e,emitAssetDirectory:t}){if(e.endsWith("bull/lib/commands/index.js")){t((0,a.resolve)((0,a.dirname)(e)))}},camaro({id:e,emitAsset:t}){if(e.endsWith("camaro/dist/camaro.js")){t((0,a.resolve)((0,a.dirname)(e),"camaro.wasm"))}},esbuild({id:e,emitAssetDirectory:t}){if(e.endsWith("esbuild/lib/main.js")){const r=(0,a.resolve)(e,"..","..","package.json");const s=JSON.parse((0,c.readFileSync)(r,"utf8"));for(const r of Object.keys(s.optionalDependencies||{})){const s=(0,a.resolve)(e,"..","..","..",r);t(s)}}},"google-gax"({id:e,ast:t,emitAssetDirectory:r}){if(e.endsWith("google-gax/build/src/grpc.js")){for(const s of t.body){if(s.type==="VariableDeclaration"&&s.declarations[0].id.type==="Identifier"&&s.declarations[0].id.name==="googleProtoFilesDir"){r((0,a.resolve)((0,a.dirname)(e),"../../../google-proto-files"))}}}},oracledb({id:e,ast:t,emitAsset:r}){if(e.endsWith("oracledb/lib/oracledb.js")){for(const s of t.body){if(s.type==="ForStatement"&&"body"in s.body&&s.body.body&&Array.isArray(s.body.body)&&s.body.body[0]&&s.body.body[0].type==="TryStatement"&&s.body.body[0].block.body[0]&&s.body.body[0].block.body[0].type==="ExpressionStatement"&&s.body.body[0].block.body[0].expression.type==="AssignmentExpression"&&s.body.body[0].block.body[0].expression.operator==="="&&s.body.body[0].block.body[0].expression.left.type==="Identifier"&&s.body.body[0].block.body[0].expression.left.name==="oracledbCLib"&&s.body.body[0].block.body[0].expression.right.type==="CallExpression"&&s.body.body[0].block.body[0].expression.right.callee.type==="Identifier"&&s.body.body[0].block.body[0].expression.right.callee.name==="require"&&s.body.body[0].block.body[0].expression.right.arguments.length===1&&s.body.body[0].block.body[0].expression.right.arguments[0].type==="MemberExpression"&&s.body.body[0].block.body[0].expression.right.arguments[0].computed===true&&s.body.body[0].block.body[0].expression.right.arguments[0].object.type==="Identifier"&&s.body.body[0].block.body[0].expression.right.arguments[0].object.name==="binaryLocations"&&s.body.body[0].block.body[0].expression.right.arguments[0].property.type==="Identifier"&&s.body.body[0].block.body[0].expression.right.arguments[0].property.name==="i"){s.body.body[0].block.body[0].expression.right.arguments=[{type:"Literal",value:"_"}];const t=global._unit?"3.0.0":JSON.parse((0,c.readFileSync)(e.slice(0,-15)+"package.json","utf8")).version;const o=Number(t.slice(0,t.indexOf(".")))>=4;const u="oracledb-"+(o?t:"abi"+process.versions.modules)+"-"+process.platform+"-"+process.arch+".node";r((0,a.resolve)(e,"../../build/Release/"+u))}}}},"phantomjs-prebuilt"({id:e,emitAssetDirectory:t}){if(e.endsWith("phantomjs-prebuilt/lib/phantomjs.js")){t((0,a.resolve)((0,a.dirname)(e),"..","bin"))}},"remark-prism"({id:e,emitAssetDirectory:t}){const r="remark-prism/src/highlight.js";if(e.endsWith(r)){try{const s=e.slice(0,-r.length);t((0,a.resolve)(s,"prismjs","components"))}catch(e){}}},semver({id:e,emitAsset:t}){if(e.endsWith("semver/index.js")){t((0,a.resolve)(e.replace("index.js","preload.js")))}},"socket.io":async function({id:e,ast:t,job:r}){if(e.endsWith("socket.io/lib/index.js")){async function replaceResolvePathStatement(t){if(t.type==="ExpressionStatement"&&t.expression.type==="AssignmentExpression"&&t.expression.operator==="="&&t.expression.right.type==="CallExpression"&&t.expression.right.callee.type==="Identifier"&&t.expression.right.callee.name==="read"&&t.expression.right.arguments.length>=1&&t.expression.right.arguments[0].type==="CallExpression"&&t.expression.right.arguments[0].callee.type==="Identifier"&&t.expression.right.arguments[0].callee.name==="resolvePath"&&t.expression.right.arguments[0].arguments.length===1&&t.expression.right.arguments[0].arguments[0].type==="Literal"){const s=t.expression.right.arguments[0].arguments[0].value;let u;try{const t=await(0,o.default)(String(s),e,r);if(typeof t==="string"){u=t}else{return undefined}}catch(e){return undefined}const c="/"+(0,a.relative)((0,a.dirname)(e),u);t.expression.right.arguments[0]={type:"BinaryExpression",start:t.expression.right.arguments[0].start,end:t.expression.right.arguments[0].end,operator:"+",left:{type:"Identifier",name:"__dirname"},right:{type:"Literal",value:c,raw:JSON.stringify(c)}}}return undefined}for(const e of t.body){if(e.type==="ExpressionStatement"&&e.expression.type==="AssignmentExpression"&&e.expression.operator==="="&&e.expression.left.type==="MemberExpression"&&e.expression.left.object.type==="MemberExpression"&&e.expression.left.object.object.type==="Identifier"&&e.expression.left.object.object.name==="Server"&&e.expression.left.object.property.type==="Identifier"&&e.expression.left.object.property.name==="prototype"&&e.expression.left.property.type==="Identifier"&&e.expression.left.property.name==="serveClient"&&e.expression.right.type==="FunctionExpression"){for(const t of e.expression.right.body.body){if(t.type==="IfStatement"&&t.consequent&&"body"in t.consequent&&t.consequent.body){const e=t.consequent.body;let r=false;if(Array.isArray(e)&&e[0]&&e[0].type==="ExpressionStatement"){r=await replaceResolvePathStatement(e[0])}if(Array.isArray(e)&&e[1]&&e[1].type==="TryStatement"&&e[1].block.body&&e[1].block.body[0]){r=await replaceResolvePathStatement(e[1].block.body[0])||r}return}}}}}},typescript({id:e,emitAssetDirectory:t}){if(e.endsWith("typescript/lib/tsc.js")){t((0,a.resolve)(e,"../"))}},"uglify-es"({id:e,emitAsset:t}){if(e.endsWith("uglify-es/tools/node.js")){t((0,a.resolve)(e,"../../lib/utils.js"));t((0,a.resolve)(e,"../../lib/ast.js"));t((0,a.resolve)(e,"../../lib/parse.js"));t((0,a.resolve)(e,"../../lib/transform.js"));t((0,a.resolve)(e,"../../lib/scope.js"));t((0,a.resolve)(e,"../../lib/output.js"));t((0,a.resolve)(e,"../../lib/compress.js"));t((0,a.resolve)(e,"../../lib/sourcemap.js"));t((0,a.resolve)(e,"../../lib/mozilla-ast.js"));t((0,a.resolve)(e,"../../lib/propmangle.js"));t((0,a.resolve)(e,"../../lib/minify.js"));t((0,a.resolve)(e,"../exports.js"))}},"uglify-js"({id:e,emitAsset:t,emitAssetDirectory:r}){if(e.endsWith("uglify-js/tools/node.js")){r((0,a.resolve)(e,"../../lib"));t((0,a.resolve)(e,"../exports.js"))}},"playwright-core"({id:e,emitAsset:t}){if(e.endsWith("playwright-core/index.js")){t((0,a.resolve)((0,a.dirname)(e),"browsers.json"))}},"geo-tz"({id:e,emitAsset:t}){if(e.endsWith("geo-tz/dist/geo-tz.js")){t((0,a.resolve)((0,a.dirname)(e),"../data/geo.dat"))}},pixelmatch({id:e,emitDependency:t}){if(e.endsWith("pixelmatch/index.js")){t((0,a.resolve)((0,a.dirname)(e),"bin/pixelmatch"))}}};async function handleSpecialCases({id:e,ast:t,emitDependency:r,emitAsset:s,emitAssetDirectory:a,job:o}){const c=(0,u.getPackageName)(e);const d=f[c||""];e=e.replace(/\\/g,"/");if(d)await d({id:e,ast:t,emitDependency:r,emitAsset:s,emitAssetDirectory:a,job:o})}t["default"]=handleSpecialCases},4370:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.wildcardRegEx=t.WILDCARD=t.FUNCTION=t.UNKNOWN=t.evaluate=void 0;const s=r(7310);async function evaluate(e,t={},r=true){const s={computeBranches:r,vars:t};return walk(e);function walk(e){const t=a[e.type];if(t){return t.call(s,e,walk)}return undefined}}t.evaluate=evaluate;t.UNKNOWN=Symbol();t.FUNCTION=Symbol();t.WILDCARD="�";t.wildcardRegEx=/\x1a/g;function countWildcards(e){t.wildcardRegEx.lastIndex=0;let r=0;while(t.wildcardRegEx.exec(e))r++;return r}const a={ArrayExpression:async function ArrayExpression(e,t){const r=[];for(let s=0,a=e.elements.length;s<a;s++){if(e.elements[s]===null){r.push(null);continue}const a=await t(e.elements[s]);if(!a)return;if("value"in a===false)return;r.push(a.value)}return{value:r}},ArrowFunctionExpression:async function(e,r){if(e.params.length===0&&!e.generator&&!e.async&&e.expression){const s=await r(e.body);if(!s||!("value"in s))return;return{value:{[t.FUNCTION]:()=>s.value}}}return undefined},BinaryExpression:async function BinaryExpression(e,r){const s=e.operator;let a=await r(e.left);if(!a&&s!=="+")return;let o=await r(e.right);if(!a&&!o)return;if(!a){if(this.computeBranches&&o&&"value"in o&&typeof o.value==="string")return{value:t.WILDCARD+o.value,wildcards:[e.left,...o.wildcards||[]]};return}if(!o){if(this.computeBranches&&s==="+"){if(a&&"value"in a&&typeof a.value==="string")return{value:a.value+t.WILDCARD,wildcards:[...a.wildcards||[],e.right]}}if(!("test"in a)&&s==="||"&&a.value)return a;return}if("test"in a&&"value"in o){const e=o.value;if(s==="==")return{test:a.test,then:a.then==e,else:a.else==e};if(s==="===")return{test:a.test,then:a.then===e,else:a.else===e};if(s==="!=")return{test:a.test,then:a.then!=e,else:a.else!=e};if(s==="!==")return{test:a.test,then:a.then!==e,else:a.else!==e};if(s==="+")return{test:a.test,then:a.then+e,else:a.else+e};if(s==="-")return{test:a.test,then:a.then-e,else:a.else-e};if(s==="*")return{test:a.test,then:a.then*e,else:a.else*e};if(s==="/")return{test:a.test,then:a.then/e,else:a.else/e};if(s==="%")return{test:a.test,then:a.then%e,else:a.else%e};if(s==="<")return{test:a.test,then:a.then<e,else:a.else<e};if(s==="<=")return{test:a.test,then:a.then<=e,else:a.else<=e};if(s===">")return{test:a.test,then:a.then>e,else:a.else>e};if(s===">=")return{test:a.test,then:a.then>=e,else:a.else>=e};if(s==="|")return{test:a.test,then:a.then|e,else:a.else|e};if(s==="&")return{test:a.test,then:a.then&e,else:a.else&e};if(s==="^")return{test:a.test,then:a.then^e,else:a.else^e};if(s==="&&")return{test:a.test,then:a.then&&e,else:a.else&&e};if(s==="||")return{test:a.test,then:a.then||e,else:a.else||e}}else if("test"in o&&"value"in a){const e=a.value;if(s==="==")return{test:o.test,then:e==o.then,else:e==o.else};if(s==="===")return{test:o.test,then:e===o.then,else:e===o.else};if(s==="!=")return{test:o.test,then:e!=o.then,else:e!=o.else};if(s==="!==")return{test:o.test,then:e!==o.then,else:e!==o.else};if(s==="+")return{test:o.test,then:e+o.then,else:e+o.else};if(s==="-")return{test:o.test,then:e-o.then,else:e-o.else};if(s==="*")return{test:o.test,then:e*o.then,else:e*o.else};if(s==="/")return{test:o.test,then:e/o.then,else:e/o.else};if(s==="%")return{test:o.test,then:e%o.then,else:e%o.else};if(s==="<")return{test:o.test,then:e<o.then,else:e<o.else};if(s==="<=")return{test:o.test,then:e<=o.then,else:e<=o.else};if(s===">")return{test:o.test,then:e>o.then,else:e>o.else};if(s===">=")return{test:o.test,then:e>=o.then,else:e>=o.else};if(s==="|")return{test:o.test,then:e|o.then,else:e|o.else};if(s==="&")return{test:o.test,then:e&o.then,else:e&o.else};if(s==="^")return{test:o.test,then:e^o.then,else:e^o.else};if(s==="&&")return{test:o.test,then:e&&o.then,else:a&&o.else};if(s==="||")return{test:o.test,then:e||o.then,else:a||o.else}}else if("value"in a&&"value"in o){if(s==="==")return{value:a.value==o.value};if(s==="===")return{value:a.value===o.value};if(s==="!=")return{value:a.value!=o.value};if(s==="!==")return{value:a.value!==o.value};if(s==="+"){const e={value:a.value+o.value};let t=[];if("wildcards"in a&&a.wildcards){t=t.concat(a.wildcards)}if("wildcards"in o&&o.wildcards){t=t.concat(o.wildcards)}if(t.length>0){e.wildcards=t}return e}if(s==="-")return{value:a.value-o.value};if(s==="*")return{value:a.value*o.value};if(s==="/")return{value:a.value/o.value};if(s==="%")return{value:a.value%o.value};if(s==="<")return{value:a.value<o.value};if(s==="<=")return{value:a.value<=o.value};if(s===">")return{value:a.value>o.value};if(s===">=")return{value:a.value>=o.value};if(s==="|")return{value:a.value|o.value};if(s==="&")return{value:a.value&o.value};if(s==="^")return{value:a.value^o.value};if(s==="&&")return{value:a.value&&o.value};if(s==="||")return{value:a.value||o.value}}return},CallExpression:async function CallExpression(e,r){const s=await r(e.callee);if(!s||"test"in s)return;let a=s.value;if(typeof a==="object"&&a!==null)a=a[t.FUNCTION];if(typeof a!=="function")return;let o=null;if(e.callee.object){o=await r(e.callee.object);o=o&&"value"in o&&o.value?o.value:null}let u;let c=[];let f;let d=e.arguments.length>0&&e.callee.property?.name!=="concat";const p=[];for(let s=0,a=e.arguments.length;s<a;s++){let a=await r(e.arguments[s]);if(a){d=false;if("value"in a&&typeof a.value==="string"&&a.wildcards)a.wildcards.forEach((e=>p.push(e)))}else{if(!this.computeBranches)return;a={value:t.WILDCARD};p.push(e.arguments[s])}if("test"in a){if(p.length)return;if(u)return;u=a.test;f=c.concat([]);c.push(a.then);f.push(a.else)}else{c.push(a.value);if(f)f.push(a.value)}}if(d)return;try{const e=await a.apply(o,c);if(e===t.UNKNOWN)return;if(!u){if(p.length){if(typeof e!=="string"||countWildcards(e)!==p.length)return;return{value:e,wildcards:p}}return{value:e}}const r=await a.apply(o,f);if(e===t.UNKNOWN)return;return{test:u,then:e,else:r}}catch(e){return}},ConditionalExpression:async function ConditionalExpression(e,t){const r=await t(e.test);if(r&&"value"in r)return r.value?t(e.consequent):t(e.alternate);if(!this.computeBranches)return;const s=await t(e.consequent);if(!s||"wildcards"in s||"test"in s)return;const a=await t(e.alternate);if(!a||"wildcards"in a||"test"in a)return;return{test:e.test,then:s.value,else:a.value}},ExpressionStatement:async function ExpressionStatement(e,t){return t(e.expression)},Identifier:async function Identifier(e,t){if(Object.hasOwnProperty.call(this.vars,e.name))return this.vars[e.name];return undefined},Literal:async function Literal(e,t){return{value:e.value}},MemberExpression:async function MemberExpression(e,r){const s=await r(e.object);if(!s||"test"in s||typeof s.value==="function"){return undefined}if(e.property.type==="Identifier"){if(typeof s.value==="string"&&e.property.name==="concat"){return{value:{[t.FUNCTION]:(...e)=>s.value.concat(e)}}}if(typeof s.value==="object"&&s.value!==null){const a=s.value;if(e.computed){const o=await r(e.property);if(o&&"value"in o&&o.value){const e=a[o.value];if(e===t.UNKNOWN)return undefined;return{value:e}}if(!a[t.UNKNOWN]&&Object.keys(s).length===0){return{value:undefined}}}else if(e.property.name in a){const r=a[e.property.name];if(r===t.UNKNOWN)return undefined;return{value:r}}else if(a[t.UNKNOWN])return undefined}else{return{value:undefined}}}const a=await r(e.property);if(!a||"test"in a)return undefined;if(typeof s.value==="object"&&s.value!==null){if(a.value in s.value){const e=s.value[a.value];if(e===t.UNKNOWN)return undefined;return{value:e}}else if(s.value[t.UNKNOWN]){return undefined}}else{return{value:undefined}}return undefined},MetaProperty:async function MetaProperty(e){if(e.meta.name==="import"&&e.property.name==="meta")return{value:this.vars["import.meta"]};return undefined},NewExpression:async function NewExpression(e,t){const r=await t(e.callee);if(r&&"value"in r&&r.value===s.URL&&e.arguments.length){const r=await t(e.arguments[0]);if(!r)return undefined;let a=null;if(e.arguments[1]){a=await t(e.arguments[1]);if(!a||!("value"in a))return undefined}if("value"in r){if(a){try{return{value:new s.URL(r.value,a.value)}}catch{return undefined}}try{return{value:new s.URL(r.value)}}catch{return undefined}}else{const e=r.test;if(a){try{return{test:e,then:new s.URL(r.then,a.value),else:new s.URL(r.else,a.value)}}catch{return undefined}}try{return{test:e,then:new s.URL(r.then),else:new s.URL(r.else)}}catch{return undefined}}}return undefined},ObjectExpression:async function ObjectExpression(e,r){const s={};for(let a=0;a<e.properties.length;a++){const o=e.properties[a];const u=o.computed?r(o.key):o.key&&{value:o.key.name||o.key.value};if(!u||"test"in u)return;const c=await r(o.value);if(!c||"test"in c)return;if(c.value===t.UNKNOWN)return;s[u.value]=c.value}return{value:s}},SequenceExpression:async function SequenceExpression(e,t){if("expressions"in e&&e.expressions.length===2&&e.expressions[0].type==="Literal"&&e.expressions[0].value===0&&e.expressions[1].type==="MemberExpression"){const r=await t(e.expressions[1]);return r}return undefined},TemplateLiteral:async function TemplateLiteral(e,r){let s={value:""};for(var a=0;a<e.expressions.length;a++){if("value"in s){s.value+=e.quasis[a].value.cooked}else{s.then+=e.quasis[a].value.cooked;s.else+=e.quasis[a].value.cooked}let o=await r(e.expressions[a]);if(!o){if(!this.computeBranches)return undefined;o={value:t.WILDCARD,wildcards:[e.expressions[a]]}}if("value"in o){if("value"in s){s.value+=o.value;if(o.wildcards)s.wildcards=[...s.wildcards||[],...o.wildcards]}else{if(o.wildcards)return;s.then+=o.value;s.else+=o.value}}else if("value"in s){if("wildcards"in s){return}s={test:o.test,then:s.value+o.then,else:s.value+o.else}}else{return}}if("value"in s){s.value+=e.quasis[a].value.cooked}else{s.then+=e.quasis[a].value.cooked;s.else+=e.quasis[a].value.cooked}return s},ThisExpression:async function ThisExpression(e,t){if(Object.hasOwnProperty.call(this.vars,"this"))return this.vars["this"];return undefined},UnaryExpression:async function UnaryExpression(e,t){const r=await t(e.argument);if(!r)return undefined;if("value"in r&&"wildcards"in r===false){if(e.operator==="+")return{value:+r.value};if(e.operator==="-")return{value:-r.value};if(e.operator==="~")return{value:~r.value};if(e.operator==="!")return{value:!r.value}}else if("test"in r&&"wildcards"in r===false){if(e.operator==="+")return{test:r.test,then:+r.then,else:+r.else};if(e.operator==="-")return{test:r.test,then:-r.then,else:-r.else};if(e.operator==="~")return{test:r.test,then:~r.then,else:~r.else};if(e.operator==="!")return{test:r.test,then:!r.then,else:!r.else}}return undefined}};a.LogicalExpression=a.BinaryExpression},3791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.handleWrappers=void 0;const s=r(3982);function isUndefinedOrVoid(e){return e.type==="Identifier"&&e.name==="undefined"||e.type==="UnaryExpression"&&e.operator==="void"&&e.argument.type==="Literal"&&e.argument.value===0}function handleWrappers(e){let t;if(e.body.length===1&&e.body[0].type==="ExpressionStatement"&&e.body[0].expression.type==="UnaryExpression"&&e.body[0].expression.operator==="!"&&e.body[0].expression.argument.type==="CallExpression"&&e.body[0].expression.argument.callee.type==="FunctionExpression"&&e.body[0].expression.argument.arguments.length===1)t=e.body[0].expression.argument;else if(e.body.length===1&&e.body[0].type==="ExpressionStatement"&&e.body[0].expression.type==="CallExpression"&&e.body[0].expression.callee.type==="FunctionExpression"&&(e.body[0].expression.arguments.length===1||e.body[0].expression.arguments.length===0))t=e.body[0].expression;else if(e.body.length===1&&e.body[0].type==="ExpressionStatement"&&e.body[0].expression.type==="AssignmentExpression"&&e.body[0].expression.left.type==="MemberExpression"&&e.body[0].expression.left.object.type==="Identifier"&&e.body[0].expression.left.object.name==="module"&&e.body[0].expression.left.property.type==="Identifier"&&e.body[0].expression.left.property.name==="exports"&&e.body[0].expression.right.type==="CallExpression"&&e.body[0].expression.right.callee.type==="FunctionExpression"&&e.body[0].expression.right.arguments.length===1)t=e.body[0].expression.right;if(t){let e;let r;if(t.arguments[0]&&t.arguments[0].type==="ConditionalExpression"&&t.arguments[0].test.type==="LogicalExpression"&&t.arguments[0].test.operator==="&&"&&t.arguments[0].test.left.type==="BinaryExpression"&&t.arguments[0].test.left.operator==="==="&&t.arguments[0].test.left.left.type==="UnaryExpression"&&t.arguments[0].test.left.left.operator==="typeof"&&"name"in t.arguments[0].test.left.left.argument&&t.arguments[0].test.left.left.argument.name==="define"&&t.arguments[0].test.left.right.type==="Literal"&&t.arguments[0].test.left.right.value==="function"&&t.arguments[0].test.right.type==="MemberExpression"&&t.arguments[0].test.right.object.type==="Identifier"&&t.arguments[0].test.right.property.type==="Identifier"&&t.arguments[0].test.right.property.name==="amd"&&t.arguments[0].test.right.computed===false&&t.arguments[0].alternate.type==="FunctionExpression"&&t.arguments[0].alternate.params.length===1&&t.arguments[0].alternate.params[0].type==="Identifier"&&t.arguments[0].alternate.body.body.length===1&&t.arguments[0].alternate.body.body[0].type==="ExpressionStatement"&&t.arguments[0].alternate.body.body[0].expression.type==="AssignmentExpression"&&t.arguments[0].alternate.body.body[0].expression.left.type==="MemberExpression"&&t.arguments[0].alternate.body.body[0].expression.left.object.type==="Identifier"&&t.arguments[0].alternate.body.body[0].expression.left.object.name==="module"&&t.arguments[0].alternate.body.body[0].expression.left.property.type==="Identifier"&&t.arguments[0].alternate.body.body[0].expression.left.property.name==="exports"&&t.arguments[0].alternate.body.body[0].expression.left.computed===false&&t.arguments[0].alternate.body.body[0].expression.right.type==="CallExpression"&&t.arguments[0].alternate.body.body[0].expression.right.callee.type==="Identifier"&&t.arguments[0].alternate.body.body[0].expression.right.callee.name===t.arguments[0].alternate.params[0].name&&"body"in t.callee&&"body"in t.callee.body&&Array.isArray(t.callee.body.body)&&t.arguments[0].alternate.body.body[0].expression.right.arguments.length===1&&t.arguments[0].alternate.body.body[0].expression.right.arguments[0].type==="Identifier"&&t.arguments[0].alternate.body.body[0].expression.right.arguments[0].name==="require"){let e=t.callee.body.body;if(e[0].type==="ExpressionStatement"&&e[0].expression.type==="Literal"&&e[0].expression.value==="use strict"){e=e.slice(1)}if(e.length===1&&e[0].type==="ExpressionStatement"&&e[0].expression.type==="CallExpression"&&e[0].expression.callee.type==="Identifier"&&e[0].expression.callee.name===t.arguments[0].test.right.object.name&&e[0].expression.arguments.length===1&&e[0].expression.arguments[0].type==="FunctionExpression"&&e[0].expression.arguments[0].params.length===1&&e[0].expression.arguments[0].params[0].type==="Identifier"&&e[0].expression.arguments[0].params[0].name==="require"){const t=e[0].expression.arguments[0];t.params=[];try{delete t.scope.declarations.require}catch(e){}}}else if(t.arguments[0]&&t.arguments[0].type==="FunctionExpression"&&t.arguments[0].params.length===0&&(t.arguments[0].body.body.length===1||t.arguments[0].body.body.length===2&&t.arguments[0].body.body[0].type==="VariableDeclaration"&&t.arguments[0].body.body[0].declarations.length===3&&t.arguments[0].body.body[0].declarations.every((e=>e.init===null&&e.id.type==="Identifier")))&&t.arguments[0].body.body[t.arguments[0].body.body.length-1].type==="ReturnStatement"&&(e=t.arguments[0].body.body[t.arguments[0].body.body.length-1])&&e.argument?.type==="CallExpression"&&e.argument.arguments.length&&e.argument.arguments.every((e=>e&&e.type==="Literal"&&typeof e.value==="number"))&&e.argument.callee.type==="CallExpression"&&(e.argument.callee.callee.type==="FunctionExpression"||e.argument.callee.callee.type==="CallExpression"&&e.argument.callee.callee.callee.type==="FunctionExpression"&&e.argument.callee.callee.arguments.length===0)&&e.argument.callee.arguments.length===3&&e.argument.callee.arguments[0].type==="ObjectExpression"&&e.argument.callee.arguments[1].type==="ObjectExpression"&&e.argument.callee.arguments[2].type==="ArrayExpression"){const t=e.argument.callee.arguments[0].properties;const r={};if(t.every((e=>{if(e.type!=="Property"||e.computed!==false||e.key.type!=="Literal"||typeof e.key.value!=="number"||e.value.type!=="ArrayExpression"||e.value.elements.length!==2||!e.value.elements[0]||!e.value.elements[1]||e.value.elements[0].type!=="FunctionExpression"||e.value.elements[1].type!=="ObjectExpression"){return false}const t=e.value.elements[1].properties;for(const e of t){if(e.type!=="Property"||e.value.type!=="Identifier"&&e.value.type!=="Literal"&&!isUndefinedOrVoid(e.value)||!(e.key.type==="Literal"&&typeof e.key.value==="string"||e.key.type==="Identifier")||e.computed){return false}if(isUndefinedOrVoid(e.value)){if(e.key.type==="Identifier"){r[e.key.name]={type:"Literal",start:e.key.start,end:e.key.end,value:e.key.name,raw:JSON.stringify(e.key.name)}}else if(e.key.type==="Literal"){r[String(e.key.value)]=e.key}}}return true}))){const t=Object.keys(r);const s=e.argument.callee.arguments[1];s.properties=t.map((e=>({type:"Property",method:false,shorthand:false,computed:false,kind:"init",key:r[e],value:{type:"ObjectExpression",properties:[{type:"Property",kind:"init",method:false,shorthand:false,computed:false,key:{type:"Identifier",name:"exports"},value:{type:"CallExpression",optional:false,callee:{type:"Identifier",name:"require"},arguments:[r[e]]}}]}})))}}else if(t.arguments[0]&&t.arguments[0].type==="FunctionExpression"&&t.arguments[0].params.length===2&&t.arguments[0].params[0].type==="Identifier"&&t.arguments[0].params[1].type==="Identifier"&&"body"in t.callee&&"body"in t.callee.body&&Array.isArray(t.callee.body.body)&&t.callee.body.body.length===1){const e=t.callee.body.body[0];if(e.type==="IfStatement"&&e.test.type==="LogicalExpression"&&e.test.operator==="&&"&&e.test.left.type==="BinaryExpression"&&e.test.left.left.type==="UnaryExpression"&&e.test.left.left.operator==="typeof"&&e.test.left.left.argument.type==="Identifier"&&e.test.left.left.argument.name==="module"&&e.test.left.right.type==="Literal"&&e.test.left.right.value==="object"&&e.test.right.type==="BinaryExpression"&&e.test.right.left.type==="UnaryExpression"&&e.test.right.left.operator==="typeof"&&e.test.right.left.argument.type==="MemberExpression"&&e.test.right.left.argument.object.type==="Identifier"&&e.test.right.left.argument.object.name==="module"&&e.test.right.left.argument.property.type==="Identifier"&&e.test.right.left.argument.property.name==="exports"&&e.test.right.right.type==="Literal"&&e.test.right.right.value==="object"&&e.consequent.type==="BlockStatement"&&e.consequent.body.length>0){let r;if(e.consequent.body[0].type==="VariableDeclaration"&&e.consequent.body[0].declarations[0].init&&e.consequent.body[0].declarations[0].init.type==="CallExpression")r=e.consequent.body[0].declarations[0].init;else if(e.consequent.body[0].type==="ExpressionStatement"&&e.consequent.body[0].expression.type==="CallExpression")r=e.consequent.body[0].expression;else if(e.consequent.body[0].type==="ExpressionStatement"&&e.consequent.body[0].expression.type==="AssignmentExpression"&&e.consequent.body[0].expression.operator==="="&&e.consequent.body[0].expression.right.type==="CallExpression")r=e.consequent.body[0].expression.right;if(r&&r.callee.type==="Identifier"&&"params"in t.callee&&t.callee.params.length>0&&"name"in t.callee.params[0]&&r.callee.name===t.callee.params[0].name&&r.arguments.length===2&&r.arguments[0].type==="Identifier"&&r.arguments[0].name==="require"&&r.arguments[1].type==="Identifier"&&r.arguments[1].name==="exports"){const e=t.arguments[0];e.params=[];try{const t=e.scope;delete t.declarations.require;delete t.declarations.exports}catch(e){}}}}else if(t.callee.type==="FunctionExpression"&&t.callee.body.body.length>2&&t.callee.body.body[0].type==="VariableDeclaration"&&t.callee.body.body[0].declarations.length===1&&t.callee.body.body[0].declarations[0].type==="VariableDeclarator"&&t.callee.body.body[0].declarations[0].id.type==="Identifier"&&t.callee.body.body[0].declarations[0].init&&(t.callee.body.body[0].declarations[0].init.type==="ObjectExpression"&&t.callee.body.body[0].declarations[0].init.properties.length===0||t.callee.body.body[0].declarations[0].init.type==="CallExpression"&&t.callee.body.body[0].declarations[0].init.arguments.length===1)&&(t.callee.body.body[1]&&t.callee.body.body[1].type==="FunctionDeclaration"&&t.callee.body.body[1].params.length===1&&t.callee.body.body[1].body.body.length>=3||t.callee.body.body[2]&&t.callee.body.body[2].type==="FunctionDeclaration"&&t.callee.body.body[2].params.length===1&&t.callee.body.body[2].body.body.length>=3)&&(t.arguments[0]&&(t.arguments[0].type==="ArrayExpression"&&(r=t.arguments[0])&&t.arguments[0].elements.length>0&&t.arguments[0].elements.every((e=>e&&e.type==="FunctionExpression"))||t.arguments[0].type==="ObjectExpression"&&(r=t.arguments[0])&&t.arguments[0].properties&&t.arguments[0].properties.length>0&&t.arguments[0].properties.every((e=>e&&e.type==="Property"&&!e.computed&&e.key&&e.key.type==="Literal"&&(typeof e.key.value==="string"||typeof e.key.value==="number")&&e.value&&e.value.type==="FunctionExpression"))))||t.arguments.length===0&&t.callee.type==="FunctionExpression"&&t.callee.params.length===0&&t.callee.body.type==="BlockStatement"&&t.callee.body.body.length>5&&t.callee.body.body[0].type==="VariableDeclaration"&&t.callee.body.body[0].declarations.length===1&&t.callee.body.body[0].declarations[0].id.type==="Identifier"&&t.callee.body.body[1].type==="ExpressionStatement"&&t.callee.body.body[1].expression.type==="AssignmentExpression"&&t.callee.body.body[2].type==="ExpressionStatement"&&t.callee.body.body[2].expression.type==="AssignmentExpression"&&t.callee.body.body[3].type==="ExpressionStatement"&&t.callee.body.body[3].expression.type==="AssignmentExpression"&&t.callee.body.body[3].expression.left.type==="MemberExpression"&&t.callee.body.body[3].expression.left.object.type==="Identifier"&&t.callee.body.body[3].expression.left.object.name===t.callee.body.body[0].declarations[0].id.name&&t.callee.body.body[3].expression.left.property.type==="Identifier"&&t.callee.body.body[3].expression.left.property.name==="modules"&&t.callee.body.body[3].expression.right.type==="ObjectExpression"&&t.callee.body.body[3].expression.right.properties.every((e=>e&&e.type==="Property"&&!e.computed&&e.key&&e.key.type==="Literal"&&(typeof e.key.value==="string"||typeof e.key.value==="number")&&e.value&&e.value.type==="FunctionExpression"))&&(r=t.callee.body.body[3].expression.right)&&(t.callee.body.body[4].type==="VariableDeclaration"&&t.callee.body.body[4].declarations.length===1&&t.callee.body.body[4].declarations[0].init&&t.callee.body.body[4].declarations[0].init.type==="CallExpression"&&t.callee.body.body[4].declarations[0].init.callee.type==="Identifier"&&t.callee.body.body[4].declarations[0].init.callee.name==="require"||t.callee.body.body[5].type==="VariableDeclaration"&&t.callee.body.body[5].declarations.length===1&&t.callee.body.body[5].declarations[0].init&&t.callee.body.body[5].declarations[0].init.type==="CallExpression"&&t.callee.body.body[5].declarations[0].init.callee.type==="Identifier"&&t.callee.body.body[5].declarations[0].init.callee.name==="require")){const e=new Map;let t;if(r.type==="ArrayExpression")t=r.elements.filter((e=>e?.type==="FunctionExpression")).map(((e,t)=>[String(t),e]));else t=r.properties.map((e=>[String(e.key.value),e.value]));for(const[r,s]of t){const t=s.body.body.length===1?s.body.body[0]:(s.body.body.length===2||s.body.body.length===3&&s.body.body[2].type==="EmptyStatement")&&s.body.body[0].type==="ExpressionStatement"&&s.body.body[0].expression.type==="Literal"&&s.body.body[0].expression.value==="use strict"?s.body.body[1]:null;if(t&&t.type==="ExpressionStatement"&&t.expression.type==="AssignmentExpression"&&t.expression.operator==="="&&t.expression.left.type==="MemberExpression"&&t.expression.left.object.type==="Identifier"&&"params"in s&&s.params.length>0&&"name"in s.params[0]&&t.expression.left.object.name===s.params[0].name&&t.expression.left.property.type==="Identifier"&&t.expression.left.property.name==="exports"&&t.expression.right.type==="CallExpression"&&t.expression.right.callee.type==="Identifier"&&t.expression.right.callee.name==="require"&&t.expression.right.arguments.length===1&&t.expression.right.arguments[0].type==="Literal"){e.set(r,t.expression.right.arguments[0].value)}}for(const[,r]of t){if("params"in r&&r.params.length===3&&r.params[2].type==="Identifier"){const t=new Map;(0,s.walk)(r.body,{enter(s,a){const o=s;const u=a;if(o.type==="CallExpression"&&o.callee.type==="Identifier"&&"name"in r.params[2]&&o.callee.name===r.params[2].name&&o.arguments.length===1&&o.arguments[0].type==="Literal"){const r=e.get(String(o.arguments[0].value));if(r){const e={type:"CallExpression",optional:false,callee:{type:"Identifier",name:"require"},arguments:[{type:"Literal",value:r}]};const s=u;if("right"in s&&s.right===o){s.right=e}else if("left"in s&&s.left===o){s.left=e}else if("object"in s&&s.object===o){s.object=e}else if("callee"in s&&s.callee===o){s.callee=e}else if("arguments"in s&&s.arguments.some((e=>e===o))){s.arguments=s.arguments.map((t=>t===o?e:t))}else if("init"in s&&s.init===o){if(s.type==="VariableDeclarator"&&s.id.type==="Identifier")t.set(s.id.name,r);s.init=e}}}else if(o.type==="CallExpression"&&o.callee.type==="MemberExpression"&&o.callee.object.type==="Identifier"&&"name"in r.params[2]&&o.callee.object.name===r.params[2].name&&o.callee.property.type==="Identifier"&&o.callee.property.name==="n"&&o.arguments.length===1&&o.arguments[0].type==="Identifier"){if(u&&"init"in u&&u.init===o){const e=o.arguments[0];const t={type:"CallExpression",optional:false,callee:{type:"MemberExpression",computed:false,optional:false,object:{type:"Identifier",name:"Object"},property:{type:"Identifier",name:"assign"}},arguments:[{type:"ArrowFunctionExpression",expression:true,params:[],body:e},{type:"ObjectExpression",properties:[{type:"Property",kind:"init",method:false,computed:false,shorthand:false,key:{type:"Identifier",name:"a"},value:e}]}]};u.init=t}}}})}}}}}t.handleWrappers=handleWrappers},351:(e,t)=>{e.exports=t=abbrev.abbrev=abbrev;abbrev.monkeyPatch=monkeyPatch;function monkeyPatch(){Object.defineProperty(Array.prototype,"abbrev",{value:function(){return abbrev(this)},enumerable:false,configurable:true,writable:true});Object.defineProperty(Object.prototype,"abbrev",{value:function(){return abbrev(Object.keys(this))},enumerable:false,configurable:true,writable:true})}function abbrev(e){if(arguments.length!==1||!Array.isArray(e)){e=Array.prototype.slice.call(arguments,0)}for(var t=0,r=e.length,s=[];t<r;t++){s[t]=typeof e[t]==="string"?e[t]:String(e[t])}s=s.sort(lexSort);var a={},o="";for(var t=0,r=s.length;t<r;t++){var u=s[t],c=s[t+1]||"",f=true,d=true;if(u===c)continue;for(var p=0,h=u.length;p<h;p++){var v=u.charAt(p);f=f&&v===c.charAt(p);d=d&&v===o.charAt(p);if(!f&&!d){p++;break}}o=u;if(p===h){a[u]=u;continue}for(var D=u.substr(0,p);p<=h;p++){a[D]=u;D+=u.charAt(p)}}return a}function lexSort(e,t){return e===t?0:e>t?1:-1}},878:e=>{"use strict";function isArguments(e){return e!=null&&typeof e==="object"&&e.hasOwnProperty("callee")}var t={"*":{label:"any",check:function(){return true}},A:{label:"array",check:function(e){return Array.isArray(e)||isArguments(e)}},S:{label:"string",check:function(e){return typeof e==="string"}},N:{label:"number",check:function(e){return typeof e==="number"}},F:{label:"function",check:function(e){return typeof e==="function"}},O:{label:"object",check:function(e){return typeof e==="object"&&e!=null&&!t.A.check(e)&&!t.E.check(e)}},B:{label:"boolean",check:function(e){return typeof e==="boolean"}},E:{label:"error",check:function(e){return e instanceof Error}},Z:{label:"null",check:function(e){return e==null}}};function addSchema(e,t){var r=t[e.length]=t[e.length]||[];if(r.indexOf(e)===-1)r.push(e)}var r=e.exports=function(e,r){if(arguments.length!==2)throw wrongNumberOfArgs(["SA"],arguments.length);if(!e)throw missingRequiredArg(0,"rawSchemas");if(!r)throw missingRequiredArg(1,"args");if(!t.S.check(e))throw invalidType(0,["string"],e);if(!t.A.check(r))throw invalidType(1,["array"],r);var s=e.split("|");var a={};s.forEach((function(e){for(var r=0;r<e.length;++r){var s=e[r];if(!t[s])throw unknownType(r,s)}if(/E.*E/.test(e))throw moreThanOneError(e);addSchema(e,a);if(/E/.test(e)){addSchema(e.replace(/E.*$/,"E"),a);addSchema(e.replace(/E/,"Z"),a);if(e.length===1)addSchema("",a)}}));var o=a[r.length];if(!o){throw wrongNumberOfArgs(Object.keys(a),r.length)}for(var u=0;u<r.length;++u){var c=o.filter((function(e){var s=e[u];var a=t[s].check;return a(r[u])}));if(!c.length){var f=o.map((function(e){return t[e[u]].label})).filter((function(e){return e!=null}));throw invalidType(u,f,r[u])}o=c}};function missingRequiredArg(e){return newException("EMISSINGARG","Missing required argument #"+(e+1))}function unknownType(e,t){return newException("EUNKNOWNTYPE","Unknown type "+t+" in argument #"+(e+1))}function invalidType(e,r,s){var a;Object.keys(t).forEach((function(e){if(t[e].check(s))a=t[e].label}));return newException("EINVALIDTYPE","Argument #"+(e+1)+": Expected "+englishList(r)+" but got "+a)}function englishList(e){return e.join(", ").replace(/, ([^,]+)$/," or $1")}function wrongNumberOfArgs(e,t){var r=englishList(e);var s=e.every((function(e){return e.length===1}))?"argument":"arguments";return newException("EWRONGARGCOUNT","Expected "+r+" "+s+" but got "+t)}function moreThanOneError(e){return newException("ETOOMANYERRORTYPES",'Only one error type per argument signature is allowed, more than one found in "'+e+'"')}function newException(e,t){var s=new Error(t);s.code=e;if(Error.captureStackTrace)Error.captureStackTrace(s,r);return s}},4906:(e,t,r)=>{"use strict";t.TrackerGroup=r(308);t.Tracker=r(7605);t.TrackerStream=r(374)},5299:(e,t,r)=>{"use strict";var s=r(2361).EventEmitter;var a=r(3837);var o=0;var u=e.exports=function(e){s.call(this);this.id=++o;this.name=e};a.inherits(u,s)},308:(e,t,r)=>{"use strict";var s=r(3837);var a=r(5299);var o=r(7605);var u=r(374);var c=e.exports=function(e){a.call(this,e);this.parentGroup=null;this.trackers=[];this.completion={};this.weight={};this.totalWeight=0;this.finished=false;this.bubbleChange=bubbleChange(this)};s.inherits(c,a);function bubbleChange(e){return function(t,r,s){e.completion[s.id]=r;if(e.finished)return;e.emit("change",t||e.name,e.completed(),e)}}c.prototype.nameInTree=function(){var e=[];var t=this;while(t){e.unshift(t.name);t=t.parentGroup}return e.join("/")};c.prototype.addUnit=function(e,t){if(e.addUnit){var r=this;while(r){if(e===r){throw new Error("Attempted to add tracker group "+e.name+" to tree that already includes it "+this.nameInTree(this))}r=r.parentGroup}e.parentGroup=this}this.weight[e.id]=t||1;this.totalWeight+=this.weight[e.id];this.trackers.push(e);this.completion[e.id]=e.completed();e.on("change",this.bubbleChange);if(!this.finished)this.emit("change",e.name,this.completion[e.id],e);return e};c.prototype.completed=function(){if(this.trackers.length===0)return 0;var e=1/this.totalWeight;var t=0;for(var r=0;r<this.trackers.length;r++){var s=this.trackers[r].id;t+=e*this.weight[s]*this.completion[s]}return t};c.prototype.newGroup=function(e,t){return this.addUnit(new c(e),t)};c.prototype.newItem=function(e,t,r){return this.addUnit(new o(e,t),r)};c.prototype.newStream=function(e,t,r){return this.addUnit(new u(e,t),r)};c.prototype.finish=function(){this.finished=true;if(!this.trackers.length)this.addUnit(new o,1,true);for(var e=0;e<this.trackers.length;e++){var t=this.trackers[e];t.finish();t.removeListener("change",this.bubbleChange)}this.emit("change",this.name,1,this)};var f="                                  ";c.prototype.debug=function(e){e=e||0;var t=e?f.substr(0,e):"";var r=t+(this.name||"top")+": "+this.completed()+"\n";this.trackers.forEach((function(s){if(s instanceof c){r+=s.debug(e+1)}else{r+=t+" "+s.name+": "+s.completed()+"\n"}}));return r}},374:(e,t,r)=>{"use strict";var s=r(3837);var a=r(8511);var o=r(857);var u=r(7605);var c=e.exports=function(e,t,r){a.Transform.call(this,r);this.tracker=new u(e,t);this.name=e;this.id=this.tracker.id;this.tracker.on("change",delegateChange(this))};s.inherits(c,a.Transform);function delegateChange(e){return function(t,r,s){e.emit("change",t,r,e)}}c.prototype._transform=function(e,t,r){this.tracker.completeWork(e.length?e.length:1);this.push(e);r()};c.prototype._flush=function(e){this.tracker.finish();e()};o(c.prototype,"tracker").method("completed").method("addWork").method("finish")},7605:(e,t,r)=>{"use strict";var s=r(3837);var a=r(5299);var o=e.exports=function(e,t){a.call(this,e);this.workDone=0;this.workTodo=t||0};s.inherits(o,a);o.prototype.completed=function(){return this.workTodo===0?0:this.workDone/this.workTodo};o.prototype.addWork=function(e){this.workTodo+=e;this.emit("change",this.name,this.completed(),this)};o.prototype.completeWork=function(e){this.workDone+=e;if(this.workDone>this.workTodo)this.workDone=this.workTodo;this.emit("change",this.name,this.completed(),this)};o.prototype.finish=function(){this.workTodo=this.workDone=1;this.emit("change",this.name,1,this)}},3331:(module,exports,__nccwpck_require__)=>{var fs=__nccwpck_require__(7147),path=__nccwpck_require__(1017),fileURLToPath=__nccwpck_require__(7121),join=path.join,dirname=path.dirname,exists=fs.accessSync&&function(e){try{fs.accessSync(e)}catch(e){return false}return true}||fs.existsSync||path.existsSync,defaults={arrow:process.env.NODE_BINDINGS_ARROW||" → ",compiled:process.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:process.platform,arch:process.arch,nodePreGyp:"node-v"+process.versions.modules+"-"+process.platform+"-"+process.arch,version:process.versions.node,bindings:"bindings.node",try:[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build","default","bindings"],["module_root","compiled","version","platform","arch","bindings"],["module_root","addon-build","release","install-root","bindings"],["module_root","addon-build","debug","install-root","bindings"],["module_root","addon-build","default","install-root","bindings"],["module_root","lib","binding","nodePreGyp","bindings"]]};function bindings(opts){if(typeof opts=="string"){opts={bindings:opts}}else if(!opts){opts={}}Object.keys(defaults).map((function(e){if(!(e in opts))opts[e]=defaults[e]}));if(!opts.module_root){opts.module_root=exports.getRoot(exports.getFileName())}if(path.extname(opts.bindings)!=".node"){opts.bindings+=".node"}var requireFunc=true?eval("require"):0;var tries=[],i=0,l=opts.try.length,n,b,err;for(;i<l;i++){n=join.apply(null,opts.try[i].map((function(e){return opts[e]||e})));tries.push(n);try{b=opts.path?requireFunc.resolve(n):requireFunc(n);if(!opts.path){b.path=n}return b}catch(e){if(e.code!=="MODULE_NOT_FOUND"&&e.code!=="QUALIFIED_PATH_RESOLUTION_FAILED"&&!/not find/i.test(e.message)){throw e}}}err=new Error("Could not locate the bindings file. Tried:\n"+tries.map((function(e){return opts.arrow+e})).join("\n"));err.tries=tries;throw err}module.exports=exports=bindings;exports.getFileName=function getFileName(e){var t=Error.prepareStackTrace,r=Error.stackTraceLimit,s={},a;Error.stackTraceLimit=10;Error.prepareStackTrace=function(t,r){for(var s=0,o=r.length;s<o;s++){a=r[s].getFileName();if(a!==__filename){if(e){if(a!==e){return}}else{return}}}};Error.captureStackTrace(s);s.stack;Error.prepareStackTrace=t;Error.stackTraceLimit=r;var o="file://";if(a.indexOf(o)===0){a=fileURLToPath(a)}return a};exports.getRoot=function getRoot(e){var t=dirname(e),r;while(true){if(t==="."){t=process.cwd()}if(exists(join(t,"package.json"))||exists(join(t,"node_modules"))){return t}if(r===t){throw new Error('Could not find module root given file: "'+e+'". Do you have a `package.json` file? ')}r=t;t=join(t,"..")}}},8589:e=>{"use strict";e.exports=function(e,t){if(e===null||e===undefined){throw TypeError()}e=String(e);var r=e.length;var s=t?Number(t):0;if(Number.isNaN(s)){s=0}if(s<0||s>=r){return undefined}var a=e.charCodeAt(s);if(a>=55296&&a<=56319&&r>s+1){var o=e.charCodeAt(s+1);if(o>=56320&&o<=57343){return(a-55296)*1024+o-56320+65536}}return a}},3844:(e,t)=>{"use strict";var r="�[";t.up=function up(e){return r+(e||"")+"A"};t.down=function down(e){return r+(e||"")+"B"};t.forward=function forward(e){return r+(e||"")+"C"};t.back=function back(e){return r+(e||"")+"D"};t.nextLine=function nextLine(e){return r+(e||"")+"E"};t.previousLine=function previousLine(e){return r+(e||"")+"F"};t.horizontalAbsolute=function horizontalAbsolute(e){if(e==null)throw new Error("horizontalAboslute requires a column to position to");return r+e+"G"};t.eraseData=function eraseData(){return r+"J"};t.eraseLine=function eraseLine(){return r+"K"};t.goto=function(e,t){return r+t+";"+e+"H"};t.gotoSOL=function(){return"\r"};t.beep=function(){return"�"};t.hideCursor=function hideCursor(){return r+"?25l"};t.showCursor=function showCursor(){return r+"?25h"};var s={reset:0,bold:1,italic:3,underline:4,inverse:7,stopBold:22,stopItalic:23,stopUnderline:24,stopInverse:27,white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,bgWhite:47,bgBlack:40,bgBlue:44,bgCyan:46,bgGreen:42,bgMagenta:45,bgRed:41,bgYellow:43,grey:90,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97,bgGrey:100,bgBrightBlack:100,bgBrightRed:101,bgBrightGreen:102,bgBrightYellow:103,bgBrightBlue:104,bgBrightMagenta:105,bgBrightCyan:106,bgBrightWhite:107};t.color=function color(e){if(arguments.length!==1||!Array.isArray(e)){e=Array.prototype.slice.call(arguments)}return r+e.map(colorNameToCode).join(";")+"m"};function colorNameToCode(e){if(s[e]!=null)return s[e];throw new Error("Unknown color or style name: "+e)}},1504:(e,t)=>{function isArray(e){if(Array.isArray){return Array.isArray(e)}return objectToString(e)==="[object Array]"}t.isArray=isArray;function isBoolean(e){return typeof e==="boolean"}t.isBoolean=isBoolean;function isNull(e){return e===null}t.isNull=isNull;function isNullOrUndefined(e){return e==null}t.isNullOrUndefined=isNullOrUndefined;function isNumber(e){return typeof e==="number"}t.isNumber=isNumber;function isString(e){return typeof e==="string"}t.isString=isString;function isSymbol(e){return typeof e==="symbol"}t.isSymbol=isSymbol;function isUndefined(e){return e===void 0}t.isUndefined=isUndefined;function isRegExp(e){return objectToString(e)==="[object RegExp]"}t.isRegExp=isRegExp;function isObject(e){return typeof e==="object"&&e!==null}t.isObject=isObject;function isDate(e){return objectToString(e)==="[object Date]"}t.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}t.isError=isError;function isFunction(e){return typeof e==="function"}t.isFunction=isFunction;function isPrimitive(e){return e===null||typeof e==="boolean"||typeof e==="number"||typeof e==="string"||typeof e==="symbol"||typeof e==="undefined"}t.isPrimitive=isPrimitive;t.isBuffer=Buffer.isBuffer;function objectToString(e){return Object.prototype.toString.call(e)}},857:e=>{e.exports=Delegator;function Delegator(e,t){if(!(this instanceof Delegator))return new Delegator(e,t);this.proto=e;this.target=t;this.methods=[];this.getters=[];this.setters=[];this.fluents=[]}Delegator.prototype.method=function(e){var t=this.proto;var r=this.target;this.methods.push(e);t[e]=function(){return this[r][e].apply(this[r],arguments)};return this};Delegator.prototype.access=function(e){return this.getter(e).setter(e)};Delegator.prototype.getter=function(e){var t=this.proto;var r=this.target;this.getters.push(e);t.__defineGetter__(e,(function(){return this[r][e]}));return this};Delegator.prototype.setter=function(e){var t=this.proto;var r=this.target;this.setters.push(e);t.__defineSetter__(e,(function(t){return this[r][e]=t}));return this};Delegator.prototype.fluent=function(e){var t=this.proto;var r=this.target;this.fluents.push(e);t[e]=function(t){if("undefined"!=typeof t){this[r][e]=t;return this}else{return this[r][e]}};return this}},5104:(e,t,r)=>{"use strict";var s=r(2037).platform();var a=r(2081).spawnSync;var o=r(7147).readdirSync;var u="glibc";var c="musl";var f={encoding:"utf8",env:process.env};if(!a){a=function(){return{status:126,stdout:"",stderr:""}}}function contains(e){return function(t){return t.indexOf(e)!==-1}}function versionFromMuslLdd(e){return e.split(/[\r\n]+/)[1].trim().split(/\s/)[1]}function safeReaddirSync(e){try{return o(e)}catch(e){}return[]}var d="";var p="";var h="";if(s==="linux"){var v=a("getconf",["GNU_LIBC_VERSION"],f);if(v.status===0){d=u;p=v.stdout.trim().split(" ")[1];h="getconf"}else{var D=a("ldd",["--version"],f);if(D.status===0&&D.stdout.indexOf(c)!==-1){d=c;p=versionFromMuslLdd(D.stdout);h="ldd"}else if(D.status===1&&D.stderr.indexOf(c)!==-1){d=c;p=versionFromMuslLdd(D.stderr);h="ldd"}else{var g=safeReaddirSync("/lib");if(g.some(contains("-linux-gnu"))){d=u;h="filesystem"}else if(g.some(contains("libc.musl-"))){d=c;h="filesystem"}else if(g.some(contains("ld-musl-"))){d=c;h="filesystem"}else{var y=safeReaddirSync("/usr/sbin");if(y.some(contains("glibc"))){d=u;h="filesystem"}}}}}var m=d!==""&&d!==u;e.exports={GLIBC:u,MUSL:c,family:d,version:p,method:h,isNonGlibcLinux:m}},3876:e=>{"use strict";e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\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\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])|\uD83C[\uDF3E\uDF73\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])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\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])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\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\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\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\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*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\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\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\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[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}},7121:(e,t,r)=>{var s=r(1017).sep||"/";e.exports=fileUriToPath;function fileUriToPath(e){if("string"!=typeof e||e.length<=7||"file://"!=e.substring(0,7)){throw new TypeError("must pass in a file:// URI to convert to a file path")}var t=decodeURI(e.substring(7));var r=t.indexOf("/");var a=t.substring(0,r);var o=t.substring(r+1);if("localhost"==a)a="";if(a){a=s+s+a}o=o.replace(/^(.+)\|/,"$1:");if(s=="\\"){o=o.replace(/\//g,"\\")}if(/^.+\:/.test(o)){}else{o=s+o}return a+o}},8862:(e,t,r)=>{"use strict";var s=r(5154);var a=r(4044);e.exports={activityIndicator:function(e,t,r){if(e.spun==null)return;return s(t,e.spun)},progressbar:function(e,t,r){if(e.completed==null)return;return a(t,r,e.completed)}}},2905:(e,t,r)=>{"use strict";var s=r(3837);var a=t.User=function User(e){var t=new Error(e);Error.captureStackTrace(t,User);t.code="EGAUGE";return t};t.MissingTemplateValue=function MissingTemplateValue(e,t){var r=new a(s.format('Missing template value "%s"',e.type));Error.captureStackTrace(r,MissingTemplateValue);r.template=e;r.values=t;return r};t.Internal=function Internal(e){var t=new Error(e);Error.captureStackTrace(t,Internal);t.code="EGAUGEINTERNAL";return t}},1191:e=>{"use strict";e.exports=isWin32()||isColorTerm();function isWin32(){return process.platform==="win32"}function isColorTerm(){var e=/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i;return!!process.env.COLORTERM||e.test(process.env.TERM)}},287:(e,t,r)=>{"use strict";var s=r(4052);var a=r(5214);var o=r(1191);var u=r(7234);var c=r(9986);var f=r(7131);var d=r(5751);var p=r(5498);e.exports=Gauge;function callWith(e,t){return function(){return t.call(e)}}function Gauge(e,t){var r,a;if(e&&e.write){a=e;r=t||{}}else if(t&&t.write){a=t;r=e||{}}else{a=d.stderr;r=e||t||{}}this._status={spun:0,section:"",subsection:""};this._paused=false;this._disabled=true;this._showing=false;this._onScreen=false;this._needsRedraw=false;this._hideCursor=r.hideCursor==null?true:r.hideCursor;this._fixedFramerate=r.fixedFramerate==null?!/^v0\.8\./.test(d.version):r.fixedFramerate;this._lastUpdateAt=null;this._updateInterval=r.updateInterval==null?50:r.updateInterval;this._themes=r.themes||c;this._theme=r.theme;var o=this._computeTheme(r.theme);var u=r.template||[{type:"progressbar",length:20},{type:"activityIndicator",kerning:1,length:1},{type:"section",kerning:1,default:""},{type:"subsection",kerning:1,default:""}];this.setWriteTo(a,r.tty);var f=r.Plumbing||s;this._gauge=new f(o,u,this.getWidth());this._$$doRedraw=callWith(this,this._doRedraw);this._$$handleSizeChange=callWith(this,this._handleSizeChange);this._cleanupOnExit=r.cleanupOnExit==null||r.cleanupOnExit;this._removeOnExit=null;if(r.enabled||r.enabled==null&&this._tty&&this._tty.isTTY){this.enable()}else{this.disable()}}Gauge.prototype={};Gauge.prototype.isEnabled=function(){return!this._disabled};Gauge.prototype.setTemplate=function(e){this._gauge.setTemplate(e);if(this._showing)this._requestRedraw()};Gauge.prototype._computeTheme=function(e){if(!e)e={};if(typeof e==="string"){e=this._themes.getTheme(e)}else if(e&&(Object.keys(e).length===0||e.hasUnicode!=null||e.hasColor!=null)){var t=e.hasUnicode==null?a():e.hasUnicode;var r=e.hasColor==null?o:e.hasColor;e=this._themes.getDefault({hasUnicode:t,hasColor:r,platform:e.platform})}return e};Gauge.prototype.setThemeset=function(e){this._themes=e;this.setTheme(this._theme)};Gauge.prototype.setTheme=function(e){this._gauge.setTheme(this._computeTheme(e));if(this._showing)this._requestRedraw();this._theme=e};Gauge.prototype._requestRedraw=function(){this._needsRedraw=true;if(!this._fixedFramerate)this._doRedraw()};Gauge.prototype.getWidth=function(){return(this._tty&&this._tty.columns||80)-1};Gauge.prototype.setWriteTo=function(e,t){var r=!this._disabled;if(r)this.disable();this._writeTo=e;this._tty=t||e===d.stderr&&d.stdout.isTTY&&d.stdout||e.isTTY&&e||this._tty;if(this._gauge)this._gauge.setWidth(this.getWidth());if(r)this.enable()};Gauge.prototype.enable=function(){if(!this._disabled)return;this._disabled=false;if(this._tty)this._enableEvents();if(this._showing)this.show()};Gauge.prototype.disable=function(){if(this._disabled)return;if(this._showing){this._lastUpdateAt=null;this._showing=false;this._doRedraw();this._showing=true}this._disabled=true;if(this._tty)this._disableEvents()};Gauge.prototype._enableEvents=function(){if(this._cleanupOnExit){this._removeOnExit=u(callWith(this,this.disable))}this._tty.on("resize",this._$$handleSizeChange);if(this._fixedFramerate){this.redrawTracker=f(this._$$doRedraw,this._updateInterval);if(this.redrawTracker.unref)this.redrawTracker.unref()}};Gauge.prototype._disableEvents=function(){this._tty.removeListener("resize",this._$$handleSizeChange);if(this._fixedFramerate)clearInterval(this.redrawTracker);if(this._removeOnExit)this._removeOnExit()};Gauge.prototype.hide=function(e){if(this._disabled)return e&&d.nextTick(e);if(!this._showing)return e&&d.nextTick(e);this._showing=false;this._doRedraw();e&&p(e)};Gauge.prototype.show=function(e,t){this._showing=true;if(typeof e==="string"){this._status.section=e}else if(typeof e==="object"){var r=Object.keys(e);for(var s=0;s<r.length;++s){var a=r[s];this._status[a]=e[a]}}if(t!=null)this._status.completed=t;if(this._disabled)return;this._requestRedraw()};Gauge.prototype.pulse=function(e){this._status.subsection=e||"";this._status.spun++;if(this._disabled)return;if(!this._showing)return;this._requestRedraw()};Gauge.prototype._handleSizeChange=function(){this._gauge.setWidth(this._tty.columns-1);this._requestRedraw()};Gauge.prototype._doRedraw=function(){if(this._disabled||this._paused)return;if(!this._fixedFramerate){var e=Date.now();if(this._lastUpdateAt&&e-this._lastUpdateAt<this._updateInterval)return;this._lastUpdateAt=e}if(!this._showing&&this._onScreen){this._onScreen=false;var t=this._gauge.hide();if(this._hideCursor){t+=this._gauge.showCursor()}return this._writeTo.write(t)}if(!this._showing&&!this._onScreen)return;if(this._showing&&!this._onScreen){this._onScreen=true;this._needsRedraw=true;if(this._hideCursor){this._writeTo.write(this._gauge.hideCursor())}}if(!this._needsRedraw)return;if(!this._writeTo.write(this._gauge.show(this._status))){this._paused=true;this._writeTo.on("drain",callWith(this,(function(){this._paused=false;this._doRedraw()})))}}},4052:(e,t,r)=>{"use strict";var s=r(3844);var a=r(7238);var o=r(878);var u=e.exports=function(e,t,r){if(!r)r=80;o("OAN",[e,t,r]);this.showing=false;this.theme=e;this.width=r;this.template=t};u.prototype={};u.prototype.setTheme=function(e){o("O",[e]);this.theme=e};u.prototype.setTemplate=function(e){o("A",[e]);this.template=e};u.prototype.setWidth=function(e){o("N",[e]);this.width=e};u.prototype.hide=function(){return s.gotoSOL()+s.eraseLine()};u.prototype.hideCursor=s.hideCursor;u.prototype.showCursor=s.showCursor;u.prototype.show=function(e){var t=Object.create(this.theme);for(var r in e){t[r]=e[r]}return a(this.width,this.template,t).trim()+s.color("reset")+s.eraseLine()+s.gotoSOL()}},5751:e=>{"use strict";e.exports=process},4044:(e,t,r)=>{"use strict";var s=r(878);var a=r(7238);var o=r(5791);var u=r(8321);e.exports=function(e,t,r){s("ONN",[e,t,r]);if(r<0)r=0;if(r>1)r=1;if(t<=0)return"";var o=Math.round(t*r);var u=t-o;var c=[{type:"complete",value:repeat(e.complete,o),length:o},{type:"remaining",value:repeat(e.remaining,u),length:u}];return a(t,c,e)};function repeat(e,t){var r="";var s=t;do{if(s%2){r+=e}s=Math.floor(s/2);e+=e}while(s&&u(r)<t);return o(r,t)}},7238:(e,t,r)=>{"use strict";var s=r(1365);var a=r(878);var o=r(3540);var u=r(5791);var c=r(2905);var f=r(8855);function renderValueWithValues(e){return function(t){return renderValue(t,e)}}var d=e.exports=function(e,t,r){var a=prepareItems(e,t,r);var o=a.map(renderValueWithValues(r)).join("");return s.left(u(o,e),e)};function preType(e){var t=e.type[0].toUpperCase()+e.type.slice(1);return"pre"+t}function postType(e){var t=e.type[0].toUpperCase()+e.type.slice(1);return"post"+t}function hasPreOrPost(e,t){if(!e.type)return;return t[preType(e)]||t[postType(e)]}function generatePreAndPost(e,t){var r=o({},e);var s=Object.create(t);var a=[];var u=preType(r);var c=postType(r);if(s[u]){a.push({value:s[u]});s[u]=null}r.minLength=null;r.length=null;r.maxLength=null;a.push(r);s[r.type]=s[r.type];if(s[c]){a.push({value:s[c]});s[c]=null}return function(e,t,r){return d(r,a,s)}}function prepareItems(e,t,r){function cloneAndObjectify(t,s,a){var o=new f(t,e);var u=o.type;if(o.value==null){if(!(u in r)){if(o.default==null){throw new c.MissingTemplateValue(o,r)}else{o.value=o.default}}else{o.value=r[u]}}if(o.value==null||o.value==="")return null;o.index=s;o.first=s===0;o.last=s===a.length-1;if(hasPreOrPost(o,r))o.value=generatePreAndPost(o,r);return o}var s=t.map(cloneAndObjectify).filter((function(e){return e!=null}));var a=0;var o=e;var u=s.length;function consumeSpace(e){if(e>o)e=o;a+=e;o-=e}function finishSizing(e,t){if(e.finished)throw new c.Internal("Tried to finish template item that was already finished");if(t===Infinity)throw new c.Internal("Length of template item cannot be infinity");if(t!=null)e.length=t;e.minLength=null;e.maxLength=null;--u;e.finished=true;if(e.length==null)e.length=e.getBaseLength();if(e.length==null)throw new c.Internal("Finished template items must have a length");consumeSpace(e.getLength())}s.forEach((function(e){if(!e.kerning)return;var t=e.first?0:s[e.index-1].padRight;if(!e.first&&t<e.kerning)e.padLeft=e.kerning-t;if(!e.last)e.padRight=e.kerning}));s.forEach((function(e){if(e.getBaseLength()==null)return;finishSizing(e)}));var d=0;var p;var h;do{p=false;h=Math.round(o/u);s.forEach((function(e){if(e.finished)return;if(!e.maxLength)return;if(e.getMaxLength()<h){finishSizing(e,e.maxLength);p=true}}))}while(p&&d++<s.length);if(p)throw new c.Internal("Resize loop iterated too many times while determining maxLength");d=0;do{p=false;h=Math.round(o/u);s.forEach((function(e){if(e.finished)return;if(!e.minLength)return;if(e.getMinLength()>=h){finishSizing(e,e.minLength);p=true}}))}while(p&&d++<s.length);if(p)throw new c.Internal("Resize loop iterated too many times while determining minLength");h=Math.round(o/u);s.forEach((function(e){if(e.finished)return;finishSizing(e,h)}));return s}function renderFunction(e,t,r){a("OON",arguments);if(e.type){return e.value(t,t[e.type+"Theme"]||{},r)}else{return e.value(t,{},r)}}function renderValue(e,t){var r=e.getBaseLength();var a=typeof e.value==="function"?renderFunction(e,t,r):e.value;if(a==null||a==="")return"";var o=s[e.align]||s.left;var c=e.padLeft?s.left("",e.padLeft):"";var f=e.padRight?s.right("",e.padRight):"";var d=u(String(a),r);var p=o(d,r);return c+p+f}},5498:(e,t,r)=>{"use strict";var s=r(5751);try{e.exports=setImmediate}catch(t){e.exports=s.nextTick}},7131:e=>{"use strict";e.exports=setInterval},5154:e=>{"use strict";e.exports=function spin(e,t){return e[t%e.length]}},8855:(e,t,r)=>{"use strict";var s=r(8321);e.exports=TemplateItem;function isPercent(e){if(typeof e!=="string")return false;return e.slice(-1)==="%"}function percent(e){return Number(e.slice(0,-1))/100}function TemplateItem(e,t){this.overallOutputLength=t;this.finished=false;this.type=null;this.value=null;this.length=null;this.maxLength=null;this.minLength=null;this.kerning=null;this.align="left";this.padLeft=0;this.padRight=0;this.index=null;this.first=null;this.last=null;if(typeof e==="string"){this.value=e}else{for(var r in e)this[r]=e[r]}if(isPercent(this.length)){this.length=Math.round(this.overallOutputLength*percent(this.length))}if(isPercent(this.minLength)){this.minLength=Math.round(this.overallOutputLength*percent(this.minLength))}if(isPercent(this.maxLength)){this.maxLength=Math.round(this.overallOutputLength*percent(this.maxLength))}return this}TemplateItem.prototype={};TemplateItem.prototype.getBaseLength=function(){var e=this.length;if(e==null&&typeof this.value==="string"&&this.maxLength==null&&this.minLength==null){e=s(this.value)}return e};TemplateItem.prototype.getLength=function(){var e=this.getBaseLength();if(e==null)return null;return e+this.padLeft+this.padRight};TemplateItem.prototype.getMaxLength=function(){if(this.maxLength==null)return null;return this.maxLength+this.padLeft+this.padRight};TemplateItem.prototype.getMinLength=function(){if(this.minLength==null)return null;return this.minLength+this.padLeft+this.padRight}},8469:(e,t,r)=>{"use strict";var s=r(3540);e.exports=function(){return a.newThemeSet()};var a={};a.baseTheme=r(8862);a.newTheme=function(e,t){if(!t){t=e;e=this.baseTheme}return s({},e,t)};a.getThemeNames=function(){return Object.keys(this.themes)};a.addTheme=function(e,t,r){this.themes[e]=this.newTheme(t,r)};a.addToAllThemes=function(e){var t=this.themes;Object.keys(t).forEach((function(r){s(t[r],e)}));s(this.baseTheme,e)};a.getTheme=function(e){if(!this.themes[e])throw this.newMissingThemeError(e);return this.themes[e]};a.setDefault=function(e,t){if(t==null){t=e;e={}}var r=e.platform==null?"fallback":e.platform;var s=!!e.hasUnicode;var a=!!e.hasColor;if(!this.defaults[r])this.defaults[r]={true:{},false:{}};this.defaults[r][s][a]=t};a.getDefault=function(e){if(!e)e={};var t=e.platform||process.platform;var r=this.defaults[t]||this.defaults.fallback;var a=!!e.hasUnicode;var o=!!e.hasColor;if(!r)throw this.newMissingDefaultThemeError(t,a,o);if(!r[a][o]){if(a&&o&&r[!a][o]){a=false}else if(a&&o&&r[a][!o]){o=false}else if(a&&o&&r[!a][!o]){a=false;o=false}else if(a&&!o&&r[!a][o]){a=false}else if(!a&&o&&r[a][!o]){o=false}else if(r===this.defaults.fallback){throw this.newMissingDefaultThemeError(t,a,o)}}if(r[a][o]){return this.getTheme(r[a][o])}else{return this.getDefault(s({},e,{platform:"fallback"}))}};a.newMissingThemeError=function newMissingThemeError(e){var t=new Error('Could not find a gauge theme named "'+e+'"');Error.captureStackTrace.call(t,newMissingThemeError);t.theme=e;t.code="EMISSINGTHEME";return t};a.newMissingDefaultThemeError=function newMissingDefaultThemeError(e,t,r){var s=new Error("Could not find a gauge theme for your platform/unicode/color use combo:\n"+"    platform = "+e+"\n"+"    hasUnicode = "+t+"\n"+"    hasColor = "+r);Error.captureStackTrace.call(s,newMissingDefaultThemeError);s.platform=e;s.hasUnicode=t;s.hasColor=r;s.code="EMISSINGTHEME";return s};a.newThemeSet=function(){var themeset=function(e){return themeset.getDefault(e)};return s(themeset,a,{themes:s({},this.themes),baseTheme:s({},this.baseTheme),defaults:JSON.parse(JSON.stringify(this.defaults||{}))})}},9986:(e,t,r)=>{"use strict";var s=r(3844);var a=r(8469);var o=e.exports=new a;o.addTheme("ASCII",{preProgressbar:"[",postProgressbar:"]",progressbarTheme:{complete:"#",remaining:"."},activityIndicatorTheme:"-\\|/",preSubsection:">"});o.addTheme("colorASCII",o.getTheme("ASCII"),{progressbarTheme:{preComplete:s.color("inverse"),complete:" ",postComplete:s.color("stopInverse"),preRemaining:s.color("brightBlack"),remaining:".",postRemaining:s.color("reset")}});o.addTheme("brailleSpinner",{preProgressbar:"⸨",postProgressbar:"⸩",progressbarTheme:{complete:"░",remaining:"⠂"},activityIndicatorTheme:"⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏",preSubsection:">"});o.addTheme("colorBrailleSpinner",o.getTheme("brailleSpinner"),{progressbarTheme:{preComplete:s.color("inverse"),complete:" ",postComplete:s.color("stopInverse"),preRemaining:s.color("brightBlack"),remaining:"░",postRemaining:s.color("reset")}});o.setDefault({},"ASCII");o.setDefault({hasColor:true},"colorASCII");o.setDefault({platform:"darwin",hasUnicode:true},"brailleSpinner");o.setDefault({platform:"darwin",hasUnicode:true,hasColor:true},"colorBrailleSpinner")},5791:(e,t,r)=>{"use strict";var s=r(8321);var a=r(7518);e.exports=wideTruncate;function wideTruncate(e,t){if(s(e)===0)return e;if(t<=0)return"";if(s(e)<=t)return e;var r=a(e);var o=e.length+r.length;var u=e.slice(0,t+o);while(s(u)>t){u=u.slice(0,-1)}return u}},4444:e=>{"use strict";e.exports=clone;var t=Object.getPrototypeOf||function(e){return e.__proto__};function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var r={__proto__:t(e)};else var r=Object.create(null);Object.getOwnPropertyNames(e).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}));return r}},9165:(e,t,r)=>{var s=r(7147);var a=r(8986);var o=r(7078);var u=r(4444);var c=r(3837);var f;var d;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){f=Symbol.for("graceful-fs.queue");d=Symbol.for("graceful-fs.previous")}else{f="___graceful-fs.queue";d="___graceful-fs.previous"}function noop(){}function publishQueue(e,t){Object.defineProperty(e,f,{get:function(){return t}})}var p=noop;if(c.debuglog)p=c.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))p=function(){var e=c.format.apply(c,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!s[f]){var h=global[f]||[];publishQueue(s,h);s.close=function(e){function close(t,r){return e.call(s,t,(function(e){if(!e){resetQueue()}if(typeof r==="function")r.apply(this,arguments)}))}Object.defineProperty(close,d,{value:e});return close}(s.close);s.closeSync=function(e){function closeSync(t){e.apply(s,arguments);resetQueue()}Object.defineProperty(closeSync,d,{value:e});return closeSync}(s.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",(function(){p(s[f]);r(9491).equal(s[f].length,0)}))}}if(!global[f]){publishQueue(global,s[f])}e.exports=patch(u(s));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!s.__patched){e.exports=patch(s);s.__patched=true}function patch(e){a(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var t=e.readFile;e.readFile=readFile;function readFile(e,r,s){if(typeof r==="function")s=r,r=null;return go$readFile(e,r,s);function go$readFile(e,r,s,a){return t(e,r,(function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$readFile,[e,r,s],t,a||Date.now(),Date.now()]);else{if(typeof s==="function")s.apply(this,arguments)}}))}}var r=e.writeFile;e.writeFile=writeFile;function writeFile(e,t,s,a){if(typeof s==="function")a=s,s=null;return go$writeFile(e,t,s,a);function go$writeFile(e,t,s,a,o){return r(e,t,s,(function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$writeFile,[e,t,s,a],r,o||Date.now(),Date.now()]);else{if(typeof a==="function")a.apply(this,arguments)}}))}}var s=e.appendFile;if(s)e.appendFile=appendFile;function appendFile(e,t,r,a){if(typeof r==="function")a=r,r=null;return go$appendFile(e,t,r,a);function go$appendFile(e,t,r,a,o){return s(e,t,r,(function(s){if(s&&(s.code==="EMFILE"||s.code==="ENFILE"))enqueue([go$appendFile,[e,t,r,a],s,o||Date.now(),Date.now()]);else{if(typeof a==="function")a.apply(this,arguments)}}))}}var u=e.copyFile;if(u)e.copyFile=copyFile;function copyFile(e,t,r,s){if(typeof r==="function"){s=r;r=0}return go$copyFile(e,t,r,s);function go$copyFile(e,t,r,s,a){return u(e,t,r,(function(o){if(o&&(o.code==="EMFILE"||o.code==="ENFILE"))enqueue([go$copyFile,[e,t,r,s],o,a||Date.now(),Date.now()]);else{if(typeof s==="function")s.apply(this,arguments)}}))}}var c=e.readdir;e.readdir=readdir;var f=/^v[0-5]\./;function readdir(e,t,r){if(typeof t==="function")r=t,t=null;var s=f.test(process.version)?function go$readdir(e,t,r,s){return c(e,fs$readdirCallback(e,t,r,s))}:function go$readdir(e,t,r,s){return c(e,t,fs$readdirCallback(e,t,r,s))};return s(e,t,r);function fs$readdirCallback(e,t,r,a){return function(o,u){if(o&&(o.code==="EMFILE"||o.code==="ENFILE"))enqueue([s,[e,t,r],o,a||Date.now(),Date.now()]);else{if(u&&u.sort)u.sort();if(typeof r==="function")r.call(this,o,u)}}}}if(process.version.substr(0,4)==="v0.8"){var d=o(e);ReadStream=d.ReadStream;WriteStream=d.WriteStream}var p=e.ReadStream;if(p){ReadStream.prototype=Object.create(p.prototype);ReadStream.prototype.open=ReadStream$open}var h=e.WriteStream;if(h){WriteStream.prototype=Object.create(h.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var v=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return v},set:function(e){v=e},enumerable:true,configurable:true});var D=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return D},set:function(e){D=e},enumerable:true,configurable:true});function ReadStream(e,t){if(this instanceof ReadStream)return p.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){if(e.autoClose)e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r);e.read()}}))}function WriteStream(e,t){if(this instanceof WriteStream)return h.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,(function(t,r){if(t){e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r)}}))}function createReadStream(t,r){return new e.ReadStream(t,r)}function createWriteStream(t,r){return new e.WriteStream(t,r)}var g=e.open;e.open=open;function open(e,t,r,s){if(typeof r==="function")s=r,r=null;return go$open(e,t,r,s);function go$open(e,t,r,s,a){return g(e,t,r,(function(o,u){if(o&&(o.code==="EMFILE"||o.code==="ENFILE"))enqueue([go$open,[e,t,r,s],o,a||Date.now(),Date.now()]);else{if(typeof s==="function")s.apply(this,arguments)}}))}}return e}function enqueue(e){p("ENQUEUE",e[0].name,e[1]);s[f].push(e);retry()}var v;function resetQueue(){var e=Date.now();for(var t=0;t<s[f].length;++t){if(s[f][t].length>2){s[f][t][3]=e;s[f][t][4]=e}}retry()}function retry(){clearTimeout(v);v=undefined;if(s[f].length===0)return;var e=s[f].shift();var t=e[0];var r=e[1];var a=e[2];var o=e[3];var u=e[4];if(o===undefined){p("RETRY",t.name,r);t.apply(null,r)}else if(Date.now()-o>=6e4){p("TIMEOUT",t.name,r);var c=r.pop();if(typeof c==="function")c.call(null,a)}else{var d=Date.now()-u;var h=Math.max(u-o,1);var D=Math.min(h*1.2,100);if(d>=D){p("RETRY",t.name,r);t.apply(null,r.concat([o]))}else{s[f].push(e)}}if(v===undefined){v=setTimeout(retry,0)}}},7078:(e,t,r)=>{var s=r(2781).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,r){if(!(this instanceof ReadStream))return new ReadStream(t,r);s.call(this);var a=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;r=r||{};var o=Object.keys(r);for(var u=0,c=o.length;u<c;u++){var f=o[u];this[f]=r[f]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.end===undefined){this.end=Infinity}else if("number"!==typeof this.end){throw TypeError("end must be a Number")}if(this.start>this.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick((function(){a._read()}));return}e.open(this.path,this.flags,this.mode,(function(e,t){if(e){a.emit("error",e);a.readable=false;return}a.fd=t;a.emit("open",t);a._read()}))}function WriteStream(t,r){if(!(this instanceof WriteStream))return new WriteStream(t,r);s.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;r=r||{};var a=Object.keys(r);for(var o=0,u=a.length;o<u;o++){var c=a[o];this[c]=r[c]}if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.start<0){throw new Error("start must be >= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},8986:(e,t,r)=>{var s=r(2057);var a=process.cwd;var o=null;var u=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!o)o=a.call(process);return o};try{process.cwd()}catch(e){}if(typeof process.chdir==="function"){var c=process.chdir;process.chdir=function(e){o=null;c.call(process,e)};if(Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,c)}e.exports=patch;function patch(e){if(s.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(e.chmod&&!e.lchmod){e.lchmod=function(e,t,r){if(r)process.nextTick(r)};e.lchmodSync=function(){}}if(e.chown&&!e.lchown){e.lchown=function(e,t,r,s){if(s)process.nextTick(s)};e.lchownSync=function(){}}if(u==="win32"){e.rename=typeof e.rename!=="function"?e.rename:function(t){function rename(r,s,a){var o=Date.now();var u=0;t(r,s,(function CB(c){if(c&&(c.code==="EACCES"||c.code==="EPERM")&&Date.now()-o<6e4){setTimeout((function(){e.stat(s,(function(e,o){if(e&&e.code==="ENOENT")t(r,s,CB);else a(c)}))}),u);if(u<100)u+=10;return}if(a)a(c)}))}if(Object.setPrototypeOf)Object.setPrototypeOf(rename,t);return rename}(e.rename)}e.read=typeof e.read!=="function"?e.read:function(t){function read(r,s,a,o,u,c){var f;if(c&&typeof c==="function"){var d=0;f=function(p,h,v){if(p&&p.code==="EAGAIN"&&d<10){d++;return t.call(e,r,s,a,o,u,f)}c.apply(this,arguments)}}return t.call(e,r,s,a,o,u,f)}if(Object.setPrototypeOf)Object.setPrototypeOf(read,t);return read}(e.read);e.readSync=typeof e.readSync!=="function"?e.readSync:function(t){return function(r,s,a,o,u){var c=0;while(true){try{return t.call(e,r,s,a,o,u)}catch(e){if(e.code==="EAGAIN"&&c<10){c++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,r,a){e.open(t,s.O_WRONLY|s.O_SYMLINK,r,(function(t,s){if(t){if(a)a(t);return}e.fchmod(s,r,(function(t){e.close(s,(function(e){if(a)a(t||e)}))}))}))};e.lchmodSync=function(t,r){var a=e.openSync(t,s.O_WRONLY|s.O_SYMLINK,r);var o=true;var u;try{u=e.fchmodSync(a,r);o=false}finally{if(o){try{e.closeSync(a)}catch(e){}}else{e.closeSync(a)}}return u}}function patchLutimes(e){if(s.hasOwnProperty("O_SYMLINK")&&e.futimes){e.lutimes=function(t,r,a,o){e.open(t,s.O_SYMLINK,(function(t,s){if(t){if(o)o(t);return}e.futimes(s,r,a,(function(t){e.close(s,(function(e){if(o)o(t||e)}))}))}))};e.lutimesSync=function(t,r,a){var o=e.openSync(t,s.O_SYMLINK);var u;var c=true;try{u=e.futimesSync(o,r,a);c=false}finally{if(c){try{e.closeSync(o)}catch(e){}}else{e.closeSync(o)}}return u}}else if(e.futimes){e.lutimes=function(e,t,r,s){if(s)process.nextTick(s)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(r,s,a){return t.call(e,r,s,(function(e){if(chownErOk(e))e=null;if(a)a.apply(this,arguments)}))}}function chmodFixSync(t){if(!t)return t;return function(r,s){try{return t.call(e,r,s)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(r,s,a,o){return t.call(e,r,s,a,(function(e){if(chownErOk(e))e=null;if(o)o.apply(this,arguments)}))}}function chownFixSync(t){if(!t)return t;return function(r,s,a){try{return t.call(e,r,s,a)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(r,s,a){if(typeof s==="function"){a=s;s=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(a)a.apply(this,arguments)}return s?t.call(e,r,s,callback):t.call(e,r,callback)}}function statFixSync(t){if(!t)return t;return function(r,s){var a=s?t.call(e,r,s):t.call(e,r);if(a){if(a.uid<0)a.uid+=4294967296;if(a.gid<0)a.gid+=4294967296}return a}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},5214:(e,t,r)=>{"use strict";var s=r(2037);var a=e.exports=function(){if(s.type()=="Windows_NT"){return false}var e=/UTF-?8$/i;var t=process.env.LC_ALL||process.env.LC_CTYPE||process.env.LANG;return e.test(t)}},2842:(e,t,r)=>{try{var s=r(3837);if(typeof s.inherits!=="function")throw"";e.exports=s.inherits}catch(t){e.exports=r(3782)}},3782:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}}}},3279:(e,t,r)=>{"use strict";var s=r(3979);e.exports=function(e){if(s(e)){return false}if(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return true}return false}},8502:e=>{"use strict";const isFullwidthCodePoint=e=>{if(Number.isNaN(e)){return false}if(e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141)){return true}return false};e.exports=isFullwidthCodePoint;e.exports["default"]=isFullwidthCodePoint},1551:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return t.call(e)=="[object Array]"}},7663:(module,__unused_webpack_exports,__nccwpck_require__)=>{var fs=__nccwpck_require__(7147);var path=__nccwpck_require__(1017);var os=__nccwpck_require__(2037);var runtimeRequire=true?eval("require"):0;var vars=process.config&&process.config.variables||{};var prebuildsOnly=!!process.env.PREBUILDS_ONLY;var abi=process.versions.modules;var runtime=isElectron()?"electron":"node";var arch=os.arch();var platform=os.platform();var libc=process.env.LIBC||(isAlpine(platform)?"musl":"glibc");var armv=process.env.ARM_VERSION||(arch==="arm64"?"8":vars.arm_version)||"";var uv=(process.versions.uv||"").split(".")[0];module.exports=load;function load(e){return runtimeRequire(load.path(e))}load.path=function(e){e=path.resolve(e||".");try{var t=runtimeRequire(path.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");if(process.env[t+"_PREBUILD"])e=process.env[t+"_PREBUILD"]}catch(e){}if(!prebuildsOnly){var r=getFirst(path.join(e,"build/Release"),matchBuild);if(r)return r;var s=getFirst(path.join(e,"build/Debug"),matchBuild);if(s)return s}var a=resolve(e);if(a)return a;var o=resolve(path.dirname(process.execPath));if(o)return o;var u=["platform="+platform,"arch="+arch,"runtime="+runtime,"abi="+abi,"uv="+uv,armv?"armv="+armv:"","libc="+libc,"node="+process.versions.node,process.versions&&process.versions.electron?"electron="+process.versions.electron:"",true?"webpack=true":0].filter(Boolean).join(" ");throw new Error("No native build was found for "+u+"\n    loaded from: "+e+"\n");function resolve(e){var t=path.join(e,"prebuilds",platform+"-"+arch);var r=readdirSync(t).map(parseTags);var s=r.filter(matchTags(runtime,abi));var a=s.sort(compareTags(runtime))[0];if(a)return path.join(t,a.file)}};function readdirSync(e){try{return fs.readdirSync(e)}catch(e){return[]}}function getFirst(e,t){var r=readdirSync(e).filter(t);return r[0]&&path.join(e,r[0])}function matchBuild(e){return/\.node$/.test(e)}function parseTags(e){var t=e.split(".");var r=t.pop();var s={file:e,specificity:0};if(r!=="node")return;for(var a=0;a<t.length;a++){var o=t[a];if(o==="node"||o==="electron"||o==="node-webkit"){s.runtime=o}else if(o==="napi"){s.napi=true}else if(o.slice(0,3)==="abi"){s.abi=o.slice(3)}else if(o.slice(0,2)==="uv"){s.uv=o.slice(2)}else if(o.slice(0,4)==="armv"){s.armv=o.slice(4)}else if(o==="glibc"||o==="musl"){s.libc=o}else{continue}s.specificity++}return s}function matchTags(e,t){return function(r){if(r==null)return false;if(r.runtime!==e&&!runtimeAgnostic(r))return false;if(r.abi!==t&&!r.napi)return false;if(r.uv&&r.uv!==uv)return false;if(r.armv&&r.armv!==armv)return false;if(r.libc&&r.libc!==libc)return false;return true}}function runtimeAgnostic(e){return e.runtime==="node"&&e.napi}function compareTags(e){return function(t,r){if(t.runtime!==r.runtime){return t.runtime===e?-1:1}else if(t.abi!==r.abi){return t.abi?-1:1}else if(t.specificity!==r.specificity){return t.specificity>r.specificity?-1:1}else{return 0}}}function isElectron(){if(process.versions&&process.versions.electron)return true;if(process.env.ELECTRON_RUN_AS_NODE)return true;return typeof window!=="undefined"&&window.process&&window.process.type==="renderer"}function isAlpine(e){return e==="linux"&&fs.existsSync("/etc/alpine-release")}load.parseTags=parseTags;load.matchTags=matchTags;load.compareTags=compareTags},1758:(e,t,r)=>{var s=process.env.DEBUG_NOPT||process.env.NOPT_DEBUG?function(){console.error.apply(console,arguments)}:function(){};var a=r(7310),o=r(1017),u=r(2781).Stream,c=r(351),f=r(2037);e.exports=t=nopt;t.clean=clean;t.typeDefs={String:{type:String,validate:validateString},Boolean:{type:Boolean,validate:validateBoolean},url:{type:a,validate:validateUrl},Number:{type:Number,validate:validateNumber},path:{type:o,validate:validatePath},Stream:{type:u,validate:validateStream},Date:{type:Date,validate:validateDate}};function nopt(e,r,a,o){a=a||process.argv;e=e||{};r=r||{};if(typeof o!=="number")o=2;s(e,r,a,o);a=a.slice(o);var u={},c,f={remain:[],cooked:a,original:a.slice(0)};parse(a,u,f.remain,e,r);clean(u,e,t.typeDefs);u.argv=f;Object.defineProperty(u.argv,"toString",{value:function(){return this.original.map(JSON.stringify).join(" ")},enumerable:false});return u}function clean(e,r,a){a=a||t.typeDefs;var o={},u=[false,true,null,String,Array];Object.keys(e).forEach((function(c){if(c==="argv")return;var f=e[c],d=Array.isArray(f),p=r[c];if(!d)f=[f];if(!p)p=u;if(p===Array)p=u.concat(Array);if(!Array.isArray(p))p=[p];s("val=%j",f);s("types=",p);f=f.map((function(u){if(typeof u==="string"){s("string %j",u);u=u.trim();if(u==="null"&&~p.indexOf(null)||u==="true"&&(~p.indexOf(true)||~p.indexOf(Boolean))||u==="false"&&(~p.indexOf(false)||~p.indexOf(Boolean))){u=JSON.parse(u);s("jsonable %j",u)}else if(~p.indexOf(Number)&&!isNaN(u)){s("convert to number",u);u=+u}else if(~p.indexOf(Date)&&!isNaN(Date.parse(u))){s("convert to date",u);u=new Date(u)}}if(!r.hasOwnProperty(c)){return u}if(u===false&&~p.indexOf(null)&&!(~p.indexOf(false)||~p.indexOf(Boolean))){u=null}var f={};f[c]=u;s("prevalidated val",f,u,r[c]);if(!validate(f,c,u,r[c],a)){if(t.invalidHandler){t.invalidHandler(c,u,r[c],e)}else if(t.invalidHandler!==false){s("invalid: "+c+"="+u,r[c])}return o}s("validated val",f,u,r[c]);return f[c]})).filter((function(e){return e!==o}));if(!f.length&&p.indexOf(Array)===-1){s("VAL HAS NO LENGTH, DELETE IT",f,c,p.indexOf(Array));delete e[c]}else if(d){s(d,e[c],f);e[c]=f}else e[c]=f[0];s("k=%s val=%j",c,f,e[c])}))}function validateString(e,t,r){e[t]=String(r)}function validatePath(e,t,r){if(r===true)return false;if(r===null)return true;r=String(r);var s=process.platform==="win32",a=s?/^~(\/|\\)/:/^~\//,u=f.homedir();if(u&&r.match(a)){e[t]=o.resolve(u,r.substr(2))}else{e[t]=o.resolve(r)}return true}function validateNumber(e,t,r){s("validate Number %j %j %j",t,r,isNaN(r));if(isNaN(r))return false;e[t]=+r}function validateDate(e,t,r){var a=Date.parse(r);s("validate Date %j %j %j",t,r,a);if(isNaN(a))return false;e[t]=new Date(r)}function validateBoolean(e,t,r){if(r instanceof Boolean)r=r.valueOf();else if(typeof r==="string"){if(!isNaN(r))r=!!+r;else if(r==="null"||r==="false")r=false;else r=true}else r=!!r;e[t]=r}function validateUrl(e,t,r){r=a.parse(String(r));if(!r.host)return false;e[t]=r.href}function validateStream(e,t,r){if(!(r instanceof u))return false;e[t]=r}function validate(e,t,r,a,o){if(Array.isArray(a)){for(var u=0,c=a.length;u<c;u++){if(a[u]===Array)continue;if(validate(e,t,r,a[u],o))return true}delete e[t];return false}if(a===Array)return true;if(a!==a){s("Poison NaN",t,r,a);delete e[t];return false}if(r===a){s("Explicitly allowed %j",r);e[t]=r;return true}var f=false,d=Object.keys(o);for(var u=0,c=d.length;u<c;u++){s("test type %j %j %j",t,r,d[u]);var p=o[d[u]];if(p&&(a&&a.name&&p.type&&p.type.name?a.name===p.type.name:a===p.type)){var h={};f=false!==p.validate(h,t,r);r=h[t];if(f){e[t]=r;break}}}s("OK? %j (%j %j %j)",f,t,r,d[u]);if(!f)delete e[t];return f}function parse(e,t,r,a,o){s("parse",e,t,r);var u=null,f=c(Object.keys(a)),d=c(Object.keys(o));for(var p=0;p<e.length;p++){var h=e[p];s("arg",h);if(h.match(/^-{2,}$/)){r.push.apply(r,e.slice(p+1));e[p]="--";break}var v=false;if(h.charAt(0)==="-"&&h.length>1){var D=h.indexOf("=");if(D>-1){v=true;var g=h.substr(D+1);h=h.substr(0,D);e.splice(p,1,h,g)}var y=resolveShort(h,o,d,f);s("arg=%j shRes=%j",h,y);if(y){s(h,y);e.splice.apply(e,[p,1].concat(y));if(h!==y[0]){p--;continue}}h=h.replace(/^-+/,"");var m=null;while(h.toLowerCase().indexOf("no-")===0){m=!m;h=h.substr(3)}if(f[h])h=f[h];var _=a[h];var E=Array.isArray(_);if(E&&_.length===1){E=false;_=_[0]}var w=_===Array||E&&_.indexOf(Array)!==-1;if(!a.hasOwnProperty(h)&&t.hasOwnProperty(h)){if(!Array.isArray(t[h]))t[h]=[t[h]];w=true}var x,F=e[p+1];var C=typeof m==="boolean"||_===Boolean||E&&_.indexOf(Boolean)!==-1||typeof _==="undefined"&&!v||F==="false"&&(_===null||E&&~_.indexOf(null));if(C){x=!m;if(F==="true"||F==="false"){x=JSON.parse(F);F=null;if(m)x=!x;p++}if(E&&F){if(~_.indexOf(F)){x=F;p++}else if(F==="null"&&~_.indexOf(null)){x=null;p++}else if(!F.match(/^-{2,}[^-]/)&&!isNaN(F)&&~_.indexOf(Number)){x=+F;p++}else if(!F.match(/^-[^-]/)&&~_.indexOf(String)){x=F;p++}}if(w)(t[h]=t[h]||[]).push(x);else t[h]=x;continue}if(_===String){if(F===undefined){F=""}else if(F.match(/^-{1,2}[^-]+/)){F="";p--}}if(F&&F.match(/^-{2,}$/)){F=undefined;p--}x=F===undefined?true:F;if(w)(t[h]=t[h]||[]).push(x);else t[h]=x;p++;continue}r.push(h)}}function resolveShort(e,t,r,a){e=e.replace(/^-+/,"");if(a[e]===e)return null;if(t[e]){if(t[e]&&!Array.isArray(t[e]))t[e]=t[e].split(/\s+/);return t[e]}var o=t.___singles;if(!o){o=Object.keys(t).filter((function(e){return e.length===1})).reduce((function(e,t){e[t]=true;return e}),{});t.___singles=o;s("shorthand singles",o)}var u=e.split("").filter((function(e){return o[e]}));if(u.join("")===e)return u.map((function(e){return t[e]})).reduce((function(e,t){return e.concat(t)}),[]);if(a[e]&&!t[e])return null;if(r[e])e=r[e];if(t[e]&&!Array.isArray(t[e]))t[e]=t[e].split(/\s+/);return t[e]}},9544:(e,t,r)=>{"use strict";var s=r(4906);var a=r(287);var o=r(2361).EventEmitter;var u=t=e.exports=new o;var c=r(3837);var f=r(2656);var d=r(3844);f(true);var p=process.stderr;Object.defineProperty(u,"stream",{set:function(e){p=e;if(this.gauge)this.gauge.setWriteTo(p,p)},get:function(){return p}});var h;u.useColor=function(){return h!=null?h:p.isTTY};u.enableColor=function(){h=true;this.gauge.setTheme({hasColor:h,hasUnicode:v})};u.disableColor=function(){h=false;this.gauge.setTheme({hasColor:h,hasUnicode:v})};u.level="info";u.gauge=new a(p,{enabled:false,theme:{hasColor:u.useColor()},template:[{type:"progressbar",length:20},{type:"activityIndicator",kerning:1,length:1},{type:"section",default:""},":",{type:"logline",kerning:1,default:""}]});u.tracker=new s.TrackerGroup;u.progressEnabled=u.gauge.isEnabled();var v;u.enableUnicode=function(){v=true;this.gauge.setTheme({hasColor:this.useColor(),hasUnicode:v})};u.disableUnicode=function(){v=false;this.gauge.setTheme({hasColor:this.useColor(),hasUnicode:v})};u.setGaugeThemeset=function(e){this.gauge.setThemeset(e)};u.setGaugeTemplate=function(e){this.gauge.setTemplate(e)};u.enableProgress=function(){if(this.progressEnabled)return;this.progressEnabled=true;this.tracker.on("change",this.showProgress);if(this._pause)return;this.gauge.enable()};u.disableProgress=function(){if(!this.progressEnabled)return;this.progressEnabled=false;this.tracker.removeListener("change",this.showProgress);this.gauge.disable()};var D=["newGroup","newItem","newStream"];var mixinLog=function(e){Object.keys(u).forEach((function(t){if(t[0]==="_")return;if(D.filter((function(e){return e===t})).length)return;if(e[t])return;if(typeof u[t]!=="function")return;var r=u[t];e[t]=function(){return r.apply(u,arguments)}}));if(e instanceof s.TrackerGroup){D.forEach((function(t){var r=e[t];e[t]=function(){return mixinLog(r.apply(e,arguments))}}))}return e};D.forEach((function(e){u[e]=function(){return mixinLog(this.tracker[e].apply(this.tracker,arguments))}}));u.clearProgress=function(e){if(!this.progressEnabled)return e&&process.nextTick(e);this.gauge.hide(e)};u.showProgress=function(e,t){if(!this.progressEnabled)return;var r={};if(e)r.section=e;var s=u.record[u.record.length-1];if(s){r.subsection=s.prefix;var a=u.disp[s.level]||s.level;var o=this._format(a,u.style[s.level]);if(s.prefix)o+=" "+this._format(s.prefix,this.prefixStyle);o+=" "+s.message.split(/\r?\n/)[0];r.logline=o}r.completed=t||this.tracker.completed();this.gauge.show(r)}.bind(u);u.pause=function(){this._paused=true;if(this.progressEnabled)this.gauge.disable()};u.resume=function(){if(!this._paused)return;this._paused=false;var e=this._buffer;this._buffer=[];e.forEach((function(e){this.emitLog(e)}),this);if(this.progressEnabled)this.gauge.enable()};u._buffer=[];var g=0;u.record=[];u.maxRecordSize=1e4;u.log=function(e,t,r){var s=this.levels[e];if(s===undefined){return this.emit("error",new Error(c.format("Undefined log level: %j",e)))}var a=new Array(arguments.length-2);var o=null;for(var u=2;u<arguments.length;u++){var f=a[u-2]=arguments[u];if(typeof f==="object"&&f&&f instanceof Error&&f.stack){Object.defineProperty(f,"stack",{value:o=f.stack+"",enumerable:true,writable:true})}}if(o)a.unshift(o+"\n");r=c.format.apply(c,a);var d={id:g++,level:e,prefix:String(t||""),message:r,messageRaw:a};this.emit("log",d);this.emit("log."+e,d);if(d.prefix)this.emit(d.prefix,d);this.record.push(d);var p=this.maxRecordSize;var h=this.record.length-p;if(h>p/10){var v=Math.floor(p*.9);this.record=this.record.slice(-1*v)}this.emitLog(d)}.bind(u);u.emitLog=function(e){if(this._paused){this._buffer.push(e);return}if(this.progressEnabled)this.gauge.pulse(e.prefix);var t=this.levels[e.level];if(t===undefined)return;if(t<this.levels[this.level])return;if(t>0&&!isFinite(t))return;var r=u.disp[e.level]!=null?u.disp[e.level]:e.level;this.clearProgress();e.message.split(/\r?\n/).forEach((function(t){if(this.heading){this.write(this.heading,this.headingStyle);this.write(" ")}this.write(r,u.style[e.level]);var s=e.prefix||"";if(s)this.write(" ");this.write(s,this.prefixStyle);this.write(" "+t+"\n")}),this);this.showProgress()};u._format=function(e,t){if(!p)return;var r="";if(this.useColor()){t=t||{};var s=[];if(t.fg)s.push(t.fg);if(t.bg)s.push("bg"+t.bg[0].toUpperCase()+t.bg.slice(1));if(t.bold)s.push("bold");if(t.underline)s.push("underline");if(t.inverse)s.push("inverse");if(s.length)r+=d.color(s);if(t.beep)r+=d.beep()}r+=e;if(this.useColor()){r+=d.color("reset")}return r};u.write=function(e,t){if(!p)return;p.write(this._format(e,t))};u.addLevel=function(e,t,r,s){if(s==null)s=e;this.levels[e]=t;this.style[e]=r;if(!this[e]){this[e]=function(){var t=new Array(arguments.length+1);t[0]=e;for(var r=0;r<arguments.length;r++){t[r+1]=arguments[r]}return this.log.apply(this,t)}.bind(this)}this.disp[e]=s};u.prefixStyle={fg:"magenta"};u.headingStyle={fg:"white",bg:"black"};u.style={};u.levels={};u.disp={};u.addLevel("silly",-Infinity,{inverse:true},"sill");u.addLevel("verbose",1e3,{fg:"blue",bg:"black"},"verb");u.addLevel("info",2e3,{fg:"green"});u.addLevel("timing",2500,{fg:"green",bg:"black"});u.addLevel("http",3e3,{fg:"green",bg:"black"});u.addLevel("notice",3500,{fg:"blue",bg:"black"});u.addLevel("warn",4e3,{fg:"black",bg:"yellow"},"WARN");u.addLevel("error",5e3,{fg:"red",bg:"black"},"ERR!");u.addLevel("silent",Infinity);u.on("error",(function(){}))},3979:e=>{"use strict";e.exports=Number.isNaN||function(e){return e!==e}},3540:e=>{"use strict";
    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ^
  2 | /*
  3 | object-assign
  4 | (c) Sindre Sorhus

  at Job.emitDependency (../packages/next/dist/compiled/@vercel/nft/index.js:1:39473)
      at async Promise.all (index 9)
  at async nodeFileTrace (../packages/next/dist/compiled/@vercel/nft/index.js:1:35430)
  at ../async /root/actions-runner/_work/next.js/next.js/packages/next/dist/build/collect-build-traces.js:299:28
  at async Span.traceAsyncFn (../packages/next/dist/trace/trace.js:105:20)
  at async collectBuildTraces (../packages/next/dist/build/collect-build-traces.js:153:5)
  at ChildProcess.<anonymous> (lib/next-test-utils.ts:296:11)

Read more about building and testing Next.js in contributing.md.

@styfle
Copy link
Member

styfle commented Oct 18, 2023

Node.js have default pnpm version for those (node v18 -> pnpm 7)

I don't understand this part. Node.js doesn't have a default pnpm. It has to be installed somehow and we should only use corepack to install it.

@kwonoj
Copy link
Contributor Author

kwonoj commented Oct 18, 2023

It was corepack somehow backs to the default, not the node.js. I incorrectly used node.js in there.

Digging bit, to let corepack uses latest version of pkg user could do like corepack prepare pnpm@latest --activate, but without those in my local system corepack does not pick up the latest, i.e node.js 18.17 -> pnpm 7.4 if pkg.json does not have a field to specify its versions.

@styfle
Copy link
Member

styfle commented Oct 18, 2023

It was corepack somehow backs to the default, not the node.js.

Corepack only reads packageManager, not engines.pnpm, so this PR still confuses me.

Wouldn't the solution be to add a packageManager prop instead of engines.pnpm prop if it really was Corepack?

It sounds like you might have some other tool locally that is somehow reading engines.pnpm and changing behavior.

@kwonoj
Copy link
Contributor Author

kwonoj commented Oct 18, 2023

It sounds like you might have some other tool locally that is somehow reading engines.pnpm and changing behavior.

The only config I have is using fnm to install node.js, confident I don't have other tools around.

I admit I'm not entirely understanding the behavior of corepack though; it would definintly possible some local env setup might cause confusion. If you think this is not the correct workaround, fine to close and move forward.

@styfle
Copy link
Member

styfle commented Oct 18, 2023

If you run corepack enable pnpm once on your machine then it should work.

If you install a new version of Node.js (for example, with fnm), then you will need to run that command again.

I believe fnm has an option to always enable corepack Schniz/fnm#960

Also see https://styfle.dev/blog/corepack

@styfle styfle closed this Oct 18, 2023
@styfle styfle deleted the pkg-pnpm-version branch October 18, 2023 20:29
@kwonoj
Copy link
Contributor Author

kwonoj commented Oct 18, 2023

If you run corepack enable pnpm once on your machine then it should work.

I'm fine to close this, but for the clarification I already did this (I never install pnpm globally) and still got this. Leaving comment as ref if someone else might hitting this in the future.

@github-actions github-actions bot added the locked label Nov 2, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
create-next-app Related to our CLI tool for quickly starting a new Next.js application. created-by: Turbopack team PRs by the Turbopack team. locked type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants