From e78948d8c9f082920e4b83aff8c595c7ee1f4f1e Mon Sep 17 00:00:00 2001 From: Leandro Melo <72796924+Tpleme@users.noreply.github.com> Date: Thu, 25 Jan 2024 22:09:38 +0000 Subject: [PATCH] fix: updated node version to 20 (#269) * updated node version from 16 to 20 * chore: update deps to Node v20 * chore: set engines * ci: build with node v20 * docs: update versions in docs --------- Co-authored-by: Federico Grandi --- .github/workflows/build.yml | 10 +-- action.yml | 2 +- doc/auto-publish-example.yml | 18 +++--- doc/auto-publish-walkthrough.md | 109 +++++++++++++++----------------- lib/index.js | 2 +- package-lock.json | 42 ++++++++---- package.json | 37 ++++++----- 7 files changed, 117 insertions(+), 103 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 600d2f16..0f66d1a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,9 +4,9 @@ on: branches: - main paths: - - "src/**" - - "package.json" - - ".github/workflows/build.yml" + - 'src/**' + - 'package.json' + - '.github/workflows/build.yml' jobs: build: @@ -19,7 +19,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: 16.x + node-version: 20.x cache: npm - name: Install dependencies @@ -32,5 +32,5 @@ jobs: uses: EndBug/add-and-commit@v9 with: add: lib - message: "[auto] build: update compiled version" + message: '[auto] build: update compiled version' push: --force diff --git a/action.yml b/action.yml index f1adcdf4..af7ca14d 100644 --- a/action.yml +++ b/action.yml @@ -40,7 +40,7 @@ outputs: description: The SHA of the commit where the version change has been detected runs: - using: node16 + using: node20 main: 'lib/index.js' branding: diff --git a/doc/auto-publish-example.yml b/doc/auto-publish-example.yml index 36876bf8..ffa01578 100644 --- a/doc/auto-publish-example.yml +++ b/doc/auto-publish-example.yml @@ -7,17 +7,17 @@ jobs: publish: name: Publish to NPM & GitHub Package Registry runs-on: ubuntu-latest - if: contains(github.ref, 'master') # Publish it only if the push comes from the master branch + if: contains(github.ref, 'main') # Publish it only if the push comes from the main branch needs: build # We need to wait for the build to be committed before publishing steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: - ref: master + ref: main - name: Check version changes - uses: EndBug/version-check@v1 + uses: EndBug/version-check@v2 id: check - name: Version update detected @@ -26,9 +26,9 @@ jobs: - name: Set up Node.js for NPM if: steps.check.outputs.changed == 'true' - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - registry-url: "https://registry.npmjs.org" + registry-url: 'https://registry.npmjs.org' - name: Install dependencies if: steps.check.outputs.changed == 'true' @@ -42,10 +42,10 @@ jobs: - name: Set up Node.js for GPR if: steps.check.outputs.changed == 'true' - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - registry-url: "https://npm.pkg.github.com/" - scope: "@endbug" + registry-url: 'https://npm.pkg.github.com/' + scope: '@endbug' - name: Set up package for GPR # You need to make sure you package name has the scope needed for GPR if: steps.check.outputs.changed == 'true' diff --git a/doc/auto-publish-walkthrough.md b/doc/auto-publish-walkthrough.md index fed99af6..a1092103 100644 --- a/doc/auto-publish-walkthrough.md +++ b/doc/auto-publish-walkthrough.md @@ -1,10 +1,10 @@ -*Note: the result of all these steps can be found [here][1], in the workflow file I actually used for my package.* +_Note: the result of all these steps can be found [here][1], in the workflow file I actually used for my package._ ## 1. Making sure that the "publish" job gets executed on the version that has been just built -The easiest way I found was just to put the two jobs in the same workflow, and having them both fire on every `push` event: the publish job was then limited to execute only if on the `master` branch and after the first one. +The easiest way I found was just to put the two jobs in the same workflow, and having them both fire on every `push` event: the publish job was then limited to execute only if on the `main` branch and after the first one. - - **Build job:** +- **Build job:** It needs to build the new version of the package, then **commit** it to the repository: committing is crucial because that allows the other job to pick the built version. To commit the changes made inside a workflow run, you can use one of my actions, [`add-and-commit`][2]: it will push the changes to the GitHub repository using a "fake" git user. You workflow job should look something like this: @@ -15,61 +15,57 @@ jobs: name: Build runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v1 - with: - node-version: '10.x' - - - name: Install dependencies - run: npm install --only=prod - - - name: Compile build - run: npm run build # This can be whatever command you use to build your package - - - name: Commit changes - uses: EndBug/add-and-commit@v2 - with: # More info about the arguments on the action page - author_name: Displayed name - author_email: Displayed email - message: "Message for the commit" - path: local/path/to/built/version - pattern: "*.js" # Pattern that matches the files to commit - force: true # Whether to use the --force flag - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This gets generated automatically -``` + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + + - name: Install dependencies + run: npm install --only=prod + - name: Compile build + run: npm run build # This can be whatever command you use to build your package + + - name: Commit changes + uses: EndBug/add-and-commit@v9 + with: # More info about the arguments on the action page + author_name: Displayed name + author_email: Displayed email + message: 'Message for the commit' + add: local/path/to/built/version/"*.js --force +``` - - **Publish job:** +- **Publish job:** -We want it to run only in the `master` branch after `build` is completed, so we can set it like this: +We want it to run only in the `main` branch after `build` is completed, so we can set it like this: ```yml publish: name: Publish to NPM & GitHub Package Registry runs-on: ubuntu-latest - if: contains(github.ref, 'master') # This sets the branch + if: contains(github.ref, 'main') # This sets the branch needs: build # This makes it wait for the build job ``` -## 2. Detecting a version change +## 2. Detecting a version change + I didn't find a good way to do that so I made another action, [`version-check`][3]: this action scans the commits of every push and tries to figure out whether they include a version change. Remeber to set eventual needed arguments/inputs! You need to set up these two steps: ```yml steps: -- name: Checkout repository - uses: actions/checkout@v2 - with: - ref: master - -- name: Check version changes - uses: EndBug/version-check@v1 # More info about the arguments on the action page - id: check # This will be the reference for later + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: main + + - name: Check version changes + uses: EndBug/version-check@v2 # More info about the arguments on the action page + id: check # This will be the reference for later ``` You could also use the `static-check` and `file-url` option to detect teh version change, but if more checks run at the same time this can make it try to publish it multiple times. @@ -114,9 +110,9 @@ In this example, I'll assume your secret is called `NPM_TOKEN`: As for now, GitHub Package Registry is not very pleasant to work with if you want to keep publishing your existing package to npm: that's why it requires packages to be scoped, and that can mess thing up (your package may not be scoped or be scoped under a different name). I found that the easiest way to deal with that is doing this workaround: - - In your workflow, re-setup Node.js but adding GPR's registry URL and your name-scope - - Create an npm script that edits your package.json so that it changes the original name of the package to the one you need to publish to GPR (scope included) - - After calling that script in your workflow, use `npm publish` as before, but this time using the built-in `GITHUB_TOKEN` as `NODE_AUTH_TOKEN`. +- In your workflow, re-setup Node.js but adding GPR's registry URL and your name-scope +- Create an npm script that edits your package.json so that it changes the original name of the package to the one you need to publish to GPR (scope included) +- After calling that script in your workflow, use `npm publish` as before, but this time using the built-in `GITHUB_TOKEN` as `NODE_AUTH_TOKEN`. ```json { @@ -166,15 +162,14 @@ fs.writeFileSync(join(__dirname, '../package.json'), JSON.stringify(pkg)) Your package is now published both to NPM and GPR (a description needs to be manually added to GPR though). You can find all of the stuff I'm referring to in the 4.0.3 version of uptime-monitor: - - [Build/publish workflow][1] - - [GPR script][8] - - - [1]: https://github.com/EndBug/uptime-monitor/blob/v4.0.3/.github/workflows/build-and-publish.yml - [2]: https://github.com/marketplace/actions/add-commit - [3]: https://github.com/marketplace/actions/version-check - [4]: https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions#steps-context - [5]: https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idif - [6]: https://npmjs.com - [7]: https://help.github.com/en/articles/virtual-environments-for-github-actions#creating-and-using-secrets-encrypted-variables - [8]: https://github.com/EndBug/uptime-monitor/blob/v4.0.3/scripts/gpr.js +- [Build/publish workflow][1] +- [GPR script][8] + +[1]: https://github.com/EndBug/uptime-monitor/blob/v4.0.3/.github/workflows/build-and-publish.yml +[2]: https://github.com/marketplace/actions/add-commit +[3]: https://github.com/marketplace/actions/version-check +[4]: https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions#steps-context +[5]: https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idif +[6]: https://npmjs.com +[7]: https://help.github.com/en/articles/virtual-environments-for-github-actions#creating-and-using-secrets-encrypted-variables +[8]: https://github.com/EndBug/uptime-monitor/blob/v4.0.3/scripts/gpr.js diff --git a/lib/index.js b/lib/index.js index 2ba7863f..05498ceb 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1 +1 @@ -(()=>{var __webpack_modules__={7351:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const i=o(r(2037));const a=r(5278);function issueCommand(e,t,r){const s=new Command(e,t,r);process.stdout.write(s.toString()+i.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const c="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=c+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const s=this.properties[r];if(s){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(s)}`}}}}e+=`${c}${escapeData(this.message)}`;return e}}function escapeData(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};var i=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const a=r(7351);const c=r(717);const u=r(5278);const l=o(r(2037));const h=o(r(1017));const d=r(8041);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=u.toCommandValue(t);process.env[e]=r;const s=process.env["GITHUB_ENV"]||"";if(s){return c.issueFileCommand("ENV",c.prepareKeyValueMessage(e,t))}a.issueCommand("set-env",{name:e},r)}t.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){c.issueFileCommand("PATH",e)}else{a.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${h.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return r}return r.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const s=["false","False","FALSE"];const n=getInput(e,t);if(r.includes(n))return true;if(s.includes(n))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const r=process.env["GITHUB_OUTPUT"]||"";if(r){return c.issueFileCommand("OUTPUT",c.prepareKeyValueMessage(e,t))}process.stdout.write(l.EOL);a.issueCommand("set-output",{name:e},u.toCommandValue(t))}t.setOutput=setOutput;function setCommandEcho(e){a.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=p.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){a.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){a.issueCommand("error",u.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){a.issueCommand("warning",u.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){a.issueCommand("notice",u.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+l.EOL)}t.info=info;function startGroup(e){a.issue("group",e)}t.startGroup=startGroup;function endGroup(){a.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return i(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r}))}t.group=group;function saveState(e,t){const r=process.env["GITHUB_STATE"]||"";if(r){return c.issueFileCommand("STATE",c.prepareKeyValueMessage(e,t))}a.issueCommand("save-state",{name:e},u.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return i(this,void 0,void 0,(function*(){return yield d.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var m=r(1327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return m.summary}});var y=r(1327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return y.markdownSummary}});var g=r(2981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return g.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return g.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return g.toPlatformPath}})},717:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const i=o(r(7147));const a=o(r(2037));const c=r(5840);const u=r(5278);function issueFileCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!i.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}i.appendFileSync(r,`${u.toCommandValue(t)}${a.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const r=`ghadelimiter_${c.v4()}`;const s=u.toCommandValue(t);if(e.includes(r)){throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`)}if(s.includes(r)){throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`)}return`${e}<<${r}${a.EOL}${s}${a.EOL}${r}`}t.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const n=r(6255);const o=r(5526);const i=r(2186);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new n.HttpClient("actions/oidc-client",[new o.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return s(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const s=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)}));const n=(t=s.result)===null||t===void 0?void 0:t.value;if(!n){throw new Error("Response json body do not have ID Token field")}return n}))}static getIDToken(e){return s(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}i.debug(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);i.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},2981:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const i=o(r(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,i.sep)}t.toPlatformPath=toPlatformPath},1327:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const n=r(2037);const o=r(7147);const{access:i,appendFile:a,writeFile:c}=o.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return s(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield i(e,o.constants.R_OK|o.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,r={}){const s=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${s}>`}return`<${e}${s}>${t}`}write(e){return s(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const r=yield this.filePath();const s=t?c:a;yield s(r,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return s(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(n.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t});const s=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(s).addEOL()}addList(e,t=false){const r=t?"ol":"ul";const s=e.map((e=>this.wrap("li",e))).join("");const n=this.wrap(r,s);return this.addRaw(n).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:r,colspan:s,rowspan:n}=e;const o=t?"th":"td";const i=Object.assign(Object.assign({},s&&{colspan:s}),n&&{rowspan:n});return this.wrap(o,r,i)})).join("");return this.wrap("tr",t)})).join("");const r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){const r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){const{width:s,height:n}=r||{};const o=Object.assign(Object.assign({},s&&{width:s}),n&&{height:n});const i=this.wrap("img",null,Object.assign({src:e,alt:t},o));return this.addRaw(i).addEOL()}addHeading(e,t){const r=`h${t}`;const s=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1";const n=this.wrap(s,e);return this.addRaw(n).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const r=Object.assign({},t&&{cite:t});const s=this.wrap("blockquote",e,r);return this.addRaw(s).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}}const u=new Summary;t.markdownSummary=u;t.summary=u},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},5526:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};var i=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const a=o(r(3685));const c=o(r(5687));const u=o(r(9835));const l=o(r(4294));var h;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(h=t.HttpCodes||(t.HttpCodes={}));var d;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(d=t.Headers||(t.Headers={}));var p;(function(e){e["ApplicationJson"]="application/json"})(p=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=u.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const m=[h.MovedPermanently,h.ResourceMoved,h.SeeOther,h.TemporaryRedirect,h.PermanentRedirect];const y=[h.BadGateway,h.ServiceUnavailable,h.GatewayTimeout];const g=["OPTIONS","GET","DELETE","HEAD"];const v=10;const _=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return i(this,void 0,void 0,(function*(){return new Promise((e=>i(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return i(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return i(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return i(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,r){return i(this,void 0,void 0,(function*(){return this.request("POST",e,t,r||{})}))}patch(e,t,r){return i(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,r||{})}))}put(e,t,r){return i(this,void 0,void 0,(function*(){return this.request("PUT",e,t,r||{})}))}head(e,t){return i(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,r,s){return i(this,void 0,void 0,(function*(){return this.request(e,t,r,s)}))}getJson(e,t={}){return i(this,void 0,void 0,(function*(){t[d.Accept]=this._getExistingOrDefaultHeader(t,d.Accept,p.ApplicationJson);const r=yield this.get(e,t);return this._processResponse(r,this.requestOptions)}))}postJson(e,t,r={}){return i(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);r[d.Accept]=this._getExistingOrDefaultHeader(r,d.Accept,p.ApplicationJson);r[d.ContentType]=this._getExistingOrDefaultHeader(r,d.ContentType,p.ApplicationJson);const n=yield this.post(e,s,r);return this._processResponse(n,this.requestOptions)}))}putJson(e,t,r={}){return i(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);r[d.Accept]=this._getExistingOrDefaultHeader(r,d.Accept,p.ApplicationJson);r[d.ContentType]=this._getExistingOrDefaultHeader(r,d.ContentType,p.ApplicationJson);const n=yield this.put(e,s,r);return this._processResponse(n,this.requestOptions)}))}patchJson(e,t,r={}){return i(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);r[d.Accept]=this._getExistingOrDefaultHeader(r,d.Accept,p.ApplicationJson);r[d.ContentType]=this._getExistingOrDefaultHeader(r,d.ContentType,p.ApplicationJson);const n=yield this.patch(e,s,r);return this._processResponse(n,this.requestOptions)}))}request(e,t,r,s){return i(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const n=new URL(t);let o=this._prepareRequest(e,n,s);const i=this._allowRetries&&g.includes(e)?this._maxRetries+1:1;let a=0;let c;do{c=yield this.requestRaw(o,r);if(c&&c.message&&c.message.statusCode===h.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(c)){e=t;break}}if(e){return e.handleAuthentication(this,o,r)}else{return c}}let t=this._maxRedirects;while(c.message.statusCode&&m.includes(c.message.statusCode)&&this._allowRedirects&&t>0){const i=c.message.headers["location"];if(!i){break}const a=new URL(i);if(n.protocol==="https:"&&n.protocol!==a.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield c.readBody();if(a.hostname!==n.hostname){for(const e in s){if(e.toLowerCase()==="authorization"){delete s[e]}}}o=this._prepareRequest(e,a,s);c=yield this.requestRaw(o,r);t--}if(!c.message.statusCode||!y.includes(c.message.statusCode)){return c}a+=1;if(a{function callbackForResult(e,t){if(e){s(e)}else if(!t){s(new Error("Unknown error"))}else{r(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,r){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let s=false;function handleResult(e,t){if(!s){s=true;r(e,t)}}const n=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let o;n.on("socket",(e=>{o=e}));n.setTimeout(this._socketTimeout||3*6e4,(()=>{if(o){o.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));n.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){n.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){n.end()}));t.pipe(n)}else{n.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,r){const s={};s.parsedUrl=t;const n=s.parsedUrl.protocol==="https:";s.httpModule=n?c:a;const o=n?443:80;s.options={};s.options.host=s.parsedUrl.hostname;s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):o;s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||"");s.options.method=e;s.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){s.options.headers["user-agent"]=this.userAgent}s.options.agent=this._getAgent(s.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(s.options)}}return s}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){let s;if(this.requestOptions&&this.requestOptions.headers){s=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||s||r}_getAgent(e){let t;const r=u.getProxyUrl(e);const s=r&&r.hostname;if(this._keepAlive&&s){t=this._proxyAgent}if(this._keepAlive&&!s){t=this._agent}if(t){return t}const n=e.protocol==="https:";let o=100;if(this.requestOptions){o=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(r&&r.hostname){const e={maxSockets:o,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`}),{host:r.hostname,port:r.port})};let s;const i=r.protocol==="https:";if(n){s=i?l.httpsOverHttps:l.httpsOverHttp}else{s=i?l.httpOverHttps:l.httpOverHttp}t=s(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:o};t=n?new c.Agent(e):new a.Agent(e);this._agent=t}if(!t){t=n?c.globalAgent:a.globalAgent}if(n&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return i(this,void 0,void 0,(function*(){e=Math.min(v,e);const t=_*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return i(this,void 0,void 0,(function*(){return new Promise(((r,s)=>i(this,void 0,void 0,(function*(){const n=e.message.statusCode||0;const o={statusCode:n,result:null,headers:{}};if(n===h.NotFound){r(o)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let i;let a;try{a=yield e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){i=JSON.parse(a,dateTimeDeserializer)}else{i=JSON.parse(a)}o.result=i}o.headers=e.message.headers}catch(e){}if(n>299){let e;if(i&&i.message){e=i.message}else if(a&&a.length>0){e=a}else{e=`Failed request: (${n})`}const t=new HttpClientError(e,n);t.result=o.result;s(t)}else{r(o)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})},9835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const r=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(r){return new URL(r)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let r;if(e.port){r=Number(e.port)}else if(e.protocol==="http:"){r=80}else if(e.protocol==="https:"){r=443}const s=[e.hostname.toUpperCase()];if(typeof r==="number"){s.push(`${s[0]}:${r}`)}for(const e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(s.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},7678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function isTypedArrayName(e){return r.includes(e)}const s=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...r];function isObjectTypeName(e){return s.includes(e)}const n=["null","undefined","string","number","bigint","boolean","symbol"];function isPrimitiveTypeName(e){return n.includes(e)}function isOfType(e){return t=>typeof t===e}const{toString:o}=Object.prototype;const getObjectType=e=>{const t=o.call(e).slice(8,-1);if(/HTML\w+Element/.test(t)&&is.domElement(e)){return"HTMLElement"}if(isObjectTypeName(t)){return t}return undefined};const isObjectOfType=e=>t=>getObjectType(t)===e;function is(e){if(e===null){return"null"}switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(is.observable(e)){return"Observable"}if(is.array(e)){return"Array"}if(is.buffer(e)){return"Buffer"}const t=getObjectType(e);if(t){return t}if(e instanceof String||e instanceof Boolean||e instanceof Number){throw new TypeError("Please don't use object wrappers for primitive types")}return"Object"}is.undefined=isOfType("undefined");is.string=isOfType("string");const i=isOfType("number");is.number=e=>i(e)&&!is.nan(e);is.bigint=isOfType("bigint");is.function_=isOfType("function");is.null_=e=>e===null;is.class_=e=>is.function_(e)&&e.toString().startsWith("class ");is.boolean=e=>e===true||e===false;is.symbol=isOfType("symbol");is.numericString=e=>is.string(e)&&!is.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e));is.array=(e,t)=>{if(!Array.isArray(e)){return false}if(!is.function_(t)){return true}return e.every(t)};is.buffer=e=>{var t,r,s,n;return(n=(s=(r=(t=e)===null||t===void 0?void 0:t.constructor)===null||r===void 0?void 0:r.isBuffer)===null||s===void 0?void 0:s.call(r,e))!==null&&n!==void 0?n:false};is.nullOrUndefined=e=>is.null_(e)||is.undefined(e);is.object=e=>!is.null_(e)&&(typeof e==="object"||is.function_(e));is.iterable=e=>{var t;return is.function_((t=e)===null||t===void 0?void 0:t[Symbol.iterator])};is.asyncIterable=e=>{var t;return is.function_((t=e)===null||t===void 0?void 0:t[Symbol.asyncIterator])};is.generator=e=>is.iterable(e)&&is.function_(e.next)&&is.function_(e.throw);is.asyncGenerator=e=>is.asyncIterable(e)&&is.function_(e.next)&&is.function_(e.throw);is.nativePromise=e=>isObjectOfType("Promise")(e);const hasPromiseAPI=e=>{var t,r;return is.function_((t=e)===null||t===void 0?void 0:t.then)&&is.function_((r=e)===null||r===void 0?void 0:r.catch)};is.promise=e=>is.nativePromise(e)||hasPromiseAPI(e);is.generatorFunction=isObjectOfType("GeneratorFunction");is.asyncGeneratorFunction=e=>getObjectType(e)==="AsyncGeneratorFunction";is.asyncFunction=e=>getObjectType(e)==="AsyncFunction";is.boundFunction=e=>is.function_(e)&&!e.hasOwnProperty("prototype");is.regExp=isObjectOfType("RegExp");is.date=isObjectOfType("Date");is.error=isObjectOfType("Error");is.map=e=>isObjectOfType("Map")(e);is.set=e=>isObjectOfType("Set")(e);is.weakMap=e=>isObjectOfType("WeakMap")(e);is.weakSet=e=>isObjectOfType("WeakSet")(e);is.int8Array=isObjectOfType("Int8Array");is.uint8Array=isObjectOfType("Uint8Array");is.uint8ClampedArray=isObjectOfType("Uint8ClampedArray");is.int16Array=isObjectOfType("Int16Array");is.uint16Array=isObjectOfType("Uint16Array");is.int32Array=isObjectOfType("Int32Array");is.uint32Array=isObjectOfType("Uint32Array");is.float32Array=isObjectOfType("Float32Array");is.float64Array=isObjectOfType("Float64Array");is.bigInt64Array=isObjectOfType("BigInt64Array");is.bigUint64Array=isObjectOfType("BigUint64Array");is.arrayBuffer=isObjectOfType("ArrayBuffer");is.sharedArrayBuffer=isObjectOfType("SharedArrayBuffer");is.dataView=isObjectOfType("DataView");is.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype;is.urlInstance=e=>isObjectOfType("URL")(e);is.urlString=e=>{if(!is.string(e)){return false}try{new URL(e);return true}catch(e){return false}};is.truthy=e=>Boolean(e);is.falsy=e=>!e;is.nan=e=>Number.isNaN(e);is.primitive=e=>is.null_(e)||isPrimitiveTypeName(typeof e);is.integer=e=>Number.isInteger(e);is.safeInteger=e=>Number.isSafeInteger(e);is.plainObject=e=>{if(o.call(e)!=="[object Object]"){return false}const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};is.typedArray=e=>isTypedArrayName(getObjectType(e));const isValidLength=e=>is.safeInteger(e)&&e>=0;is.arrayLike=e=>!is.nullOrUndefined(e)&&!is.function_(e)&&isValidLength(e.length);is.inRange=(e,t)=>{if(is.number(t)){return e>=Math.min(0,t)&&e<=Math.max(t,0)}if(is.array(t)&&t.length===2){return e>=Math.min(...t)&&e<=Math.max(...t)}throw new TypeError(`Invalid range: ${JSON.stringify(t)}`)};const a=1;const c=["innerHTML","ownerDocument","style","attributes","nodeValue"];is.domElement=e=>is.object(e)&&e.nodeType===a&&is.string(e.nodeName)&&!is.plainObject(e)&&c.every((t=>t in e));is.observable=e=>{var t,r,s,n;if(!e){return false}if(e===((r=(t=e)[Symbol.observable])===null||r===void 0?void 0:r.call(t))){return true}if(e===((n=(s=e)["@@observable"])===null||n===void 0?void 0:n.call(s))){return true}return false};is.nodeStream=e=>is.object(e)&&is.function_(e.pipe)&&!is.observable(e);is.infinite=e=>e===Infinity||e===-Infinity;const isAbsoluteMod2=e=>t=>is.integer(t)&&Math.abs(t%2)===e;is.evenInteger=isAbsoluteMod2(0);is.oddInteger=isAbsoluteMod2(1);is.emptyArray=e=>is.array(e)&&e.length===0;is.nonEmptyArray=e=>is.array(e)&&e.length>0;is.emptyString=e=>is.string(e)&&e.length===0;is.nonEmptyString=e=>is.string(e)&&e.length>0;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.emptyObject=e=>is.object(e)&&!is.map(e)&&!is.set(e)&&Object.keys(e).length===0;is.nonEmptyObject=e=>is.object(e)&&!is.map(e)&&!is.set(e)&&Object.keys(e).length>0;is.emptySet=e=>is.set(e)&&e.size===0;is.nonEmptySet=e=>is.set(e)&&e.size>0;is.emptyMap=e=>is.map(e)&&e.size===0;is.nonEmptyMap=e=>is.map(e)&&e.size>0;is.propertyKey=e=>is.any([is.string,is.number,is.symbol],e);is.formData=e=>isObjectOfType("FormData")(e);is.urlSearchParams=e=>isObjectOfType("URLSearchParams")(e);const predicateOnArray=(e,t,r)=>{if(!is.function_(t)){throw new TypeError(`Invalid predicate: ${JSON.stringify(t)}`)}if(r.length===0){throw new TypeError("Invalid number of values")}return e.call(r,t)};is.any=(e,...t)=>{const r=is.array(e)?e:[e];return r.some((e=>predicateOnArray(Array.prototype.some,e,t)))};is.all=(e,...t)=>predicateOnArray(Array.prototype.every,e,t);const assertType=(e,t,r,s={})=>{if(!e){const{multipleValues:e}=s;const n=e?`received values of types ${[...new Set(r.map((e=>`\`${is(e)}\``)))].join(", ")}`:`received value of type \`${is(r)}\``;throw new TypeError(`Expected value which is \`${t}\`, ${n}.`)}};t.assert={undefined:e=>assertType(is.undefined(e),"undefined",e),string:e=>assertType(is.string(e),"string",e),number:e=>assertType(is.number(e),"number",e),bigint:e=>assertType(is.bigint(e),"bigint",e),function_:e=>assertType(is.function_(e),"Function",e),null_:e=>assertType(is.null_(e),"null",e),class_:e=>assertType(is.class_(e),"Class",e),boolean:e=>assertType(is.boolean(e),"boolean",e),symbol:e=>assertType(is.symbol(e),"symbol",e),numericString:e=>assertType(is.numericString(e),"string with a number",e),array:(e,t)=>{const r=assertType;r(is.array(e),"Array",e);if(t){e.forEach(t)}},buffer:e=>assertType(is.buffer(e),"Buffer",e),nullOrUndefined:e=>assertType(is.nullOrUndefined(e),"null or undefined",e),object:e=>assertType(is.object(e),"Object",e),iterable:e=>assertType(is.iterable(e),"Iterable",e),asyncIterable:e=>assertType(is.asyncIterable(e),"AsyncIterable",e),generator:e=>assertType(is.generator(e),"Generator",e),asyncGenerator:e=>assertType(is.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>assertType(is.nativePromise(e),"native Promise",e),promise:e=>assertType(is.promise(e),"Promise",e),generatorFunction:e=>assertType(is.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>assertType(is.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>assertType(is.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>assertType(is.boundFunction(e),"Function",e),regExp:e=>assertType(is.regExp(e),"RegExp",e),date:e=>assertType(is.date(e),"Date",e),error:e=>assertType(is.error(e),"Error",e),map:e=>assertType(is.map(e),"Map",e),set:e=>assertType(is.set(e),"Set",e),weakMap:e=>assertType(is.weakMap(e),"WeakMap",e),weakSet:e=>assertType(is.weakSet(e),"WeakSet",e),int8Array:e=>assertType(is.int8Array(e),"Int8Array",e),uint8Array:e=>assertType(is.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>assertType(is.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>assertType(is.int16Array(e),"Int16Array",e),uint16Array:e=>assertType(is.uint16Array(e),"Uint16Array",e),int32Array:e=>assertType(is.int32Array(e),"Int32Array",e),uint32Array:e=>assertType(is.uint32Array(e),"Uint32Array",e),float32Array:e=>assertType(is.float32Array(e),"Float32Array",e),float64Array:e=>assertType(is.float64Array(e),"Float64Array",e),bigInt64Array:e=>assertType(is.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>assertType(is.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>assertType(is.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>assertType(is.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>assertType(is.dataView(e),"DataView",e),urlInstance:e=>assertType(is.urlInstance(e),"URL",e),urlString:e=>assertType(is.urlString(e),"string with a URL",e),truthy:e=>assertType(is.truthy(e),"truthy",e),falsy:e=>assertType(is.falsy(e),"falsy",e),nan:e=>assertType(is.nan(e),"NaN",e),primitive:e=>assertType(is.primitive(e),"primitive",e),integer:e=>assertType(is.integer(e),"integer",e),safeInteger:e=>assertType(is.safeInteger(e),"integer",e),plainObject:e=>assertType(is.plainObject(e),"plain object",e),typedArray:e=>assertType(is.typedArray(e),"TypedArray",e),arrayLike:e=>assertType(is.arrayLike(e),"array-like",e),domElement:e=>assertType(is.domElement(e),"HTMLElement",e),observable:e=>assertType(is.observable(e),"Observable",e),nodeStream:e=>assertType(is.nodeStream(e),"Node.js Stream",e),infinite:e=>assertType(is.infinite(e),"infinite number",e),emptyArray:e=>assertType(is.emptyArray(e),"empty array",e),nonEmptyArray:e=>assertType(is.nonEmptyArray(e),"non-empty array",e),emptyString:e=>assertType(is.emptyString(e),"empty string",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),emptyObject:e=>assertType(is.emptyObject(e),"empty object",e),nonEmptyObject:e=>assertType(is.nonEmptyObject(e),"non-empty object",e),emptySet:e=>assertType(is.emptySet(e),"empty set",e),nonEmptySet:e=>assertType(is.nonEmptySet(e),"non-empty set",e),emptyMap:e=>assertType(is.emptyMap(e),"empty map",e),nonEmptyMap:e=>assertType(is.nonEmptyMap(e),"non-empty map",e),propertyKey:e=>assertType(is.propertyKey(e),"PropertyKey",e),formData:e=>assertType(is.formData(e),"FormData",e),urlSearchParams:e=>assertType(is.urlSearchParams(e),"URLSearchParams",e),evenInteger:e=>assertType(is.evenInteger(e),"even integer",e),oddInteger:e=>assertType(is.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>assertType(is.directInstanceOf(e,t),"T",e),inRange:(e,t)=>assertType(is.inRange(e,t),"in range",e),any:(e,...t)=>assertType(is.any(e,...t),"predicate returns truthy for any value",t,{multipleValues:true}),all:(e,...t)=>assertType(is.all(e,...t),"predicate returns truthy for all values",t,{multipleValues:true})};Object.defineProperties(is,{class:{value:is.class_},function:{value:is.function_},null:{value:is.null_}});Object.defineProperties(t.assert,{class:{value:t.assert.class_},function:{value:t.assert.function_},null:{value:t.assert.null_}});t["default"]=is;e.exports=is;e.exports["default"]=is;e.exports.assert=t.assert},8097:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(6214);const n=r(3837);const o=Number(process.versions.node.split(".")[0]);const timer=e=>{if(e.timings){return e.timings}const t={start:Date.now(),socket:undefined,lookup:undefined,connect:undefined,secureConnect:undefined,upload:undefined,response:undefined,end:undefined,error:undefined,abort:undefined,phases:{wait:undefined,dns:undefined,tcp:undefined,tls:undefined,request:undefined,firstByte:undefined,download:undefined,total:undefined}};e.timings=t;const handleError=e=>{const r=e.emit.bind(e);e.emit=(s,...n)=>{if(s==="error"){t.error=Date.now();t.phases.total=t.error-t.start;e.emit=r}return r(s,...n)}};handleError(e);const onAbort=()=>{t.abort=Date.now();if(!t.response||o>=13){t.phases.total=Date.now()-t.start}};e.prependOnceListener("abort",onAbort);const onSocket=e=>{t.socket=Date.now();t.phases.wait=t.socket-t.start;if(n.types.isProxy(e)){return}const lookupListener=()=>{t.lookup=Date.now();t.phases.dns=t.lookup-t.socket};e.prependOnceListener("lookup",lookupListener);s.default(e,{connect:()=>{t.connect=Date.now();if(t.lookup===undefined){e.removeListener("lookup",lookupListener);t.lookup=t.connect;t.phases.dns=t.lookup-t.socket}t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now();t.phases.tls=t.secureConnect-t.connect}})};if(e.socket){onSocket(e.socket)}else{e.prependOnceListener("socket",onSocket)}const onUpload=()=>{var e;t.upload=Date.now();t.phases.request=t.upload-((e=t.secureConnect)!==null&&e!==void 0?e:t.connect)};const writableFinished=()=>{if(typeof e.writableFinished==="boolean"){return e.writableFinished}return e.finished&&e.outputSize===0&&(!e.socket||e.socket.writableLength===0)};if(writableFinished()){onUpload()}else{e.prependOnceListener("finish",onUpload)}e.prependOnceListener("response",(e=>{t.response=Date.now();t.phases.firstByte=t.response-t.upload;e.timings=t;handleError(e);e.prependOnceListener("end",(()=>{t.end=Date.now();t.phases.download=t.end-t.response;t.phases.total=t.end-t.start}));e.prependOnceListener("aborted",onAbort)}));return t};t["default"]=timer;e.exports=timer;e.exports["default"]=timer},2286:(e,t,r)=>{"use strict";const{V4MAPPED:s,ADDRCONFIG:n,ALL:o,promises:{Resolver:i},lookup:a}=r(9523);const{promisify:c}=r(3837);const u=r(2037);const l=Symbol("cacheableLookupCreateConnection");const h=Symbol("cacheableLookupInstance");const d=Symbol("expires");const p=typeof o==="number";const verifyAgent=e=>{if(!(e&&typeof e.createConnection==="function")){throw new Error("Expected an Agent instance as the first argument")}};const map4to6=e=>{for(const t of e){if(t.family===6){continue}t.address=`::ffff:${t.address}`;t.family=6}};const getIfaceInfo=()=>{let e=false;let t=false;for(const r of Object.values(u.networkInterfaces())){for(const s of r){if(s.internal){continue}if(s.family==="IPv6"){t=true}else{e=true}if(e&&t){return{has4:e,has6:t}}}}return{has4:e,has6:t}};const isIterable=e=>Symbol.iterator in e;const m={ttl:true};const y={all:true};class CacheableLookup{constructor({cache:e=new Map,maxTtl:t=Infinity,fallbackDuration:r=3600,errorTtl:s=.15,resolver:n=new i,lookup:o=a}={}){this.maxTtl=t;this.errorTtl=s;this._cache=e;this._resolver=n;this._dnsLookup=c(o);if(this._resolver instanceof i){this._resolve4=this._resolver.resolve4.bind(this._resolver);this._resolve6=this._resolver.resolve6.bind(this._resolver)}else{this._resolve4=c(this._resolver.resolve4.bind(this._resolver));this._resolve6=c(this._resolver.resolve6.bind(this._resolver))}this._iface=getIfaceInfo();this._pending={};this._nextRemovalTime=false;this._hostnamesToFallback=new Set;if(r<1){this._fallback=false}else{this._fallback=true;const e=setInterval((()=>{this._hostnamesToFallback.clear()}),r*1e3);if(e.unref){e.unref()}}this.lookup=this.lookup.bind(this);this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear();this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,r){if(typeof t==="function"){r=t;t={}}else if(typeof t==="number"){t={family:t}}if(!r){throw new Error("Callback must be a function.")}this.lookupAsync(e,t).then((e=>{if(t.all){r(null,e)}else{r(null,e.address,e.family,e.expires,e.ttl)}}),r)}async lookupAsync(e,t={}){if(typeof t==="number"){t={family:t}}let r=await this.query(e);if(t.family===6){const e=r.filter((e=>e.family===6));if(t.hints&s){if(p&&t.hints&o||e.length===0){map4to6(r)}else{r=e}}else{r=e}}else if(t.family===4){r=r.filter((e=>e.family===4))}if(t.hints&n){const{_iface:e}=this;r=r.filter((t=>t.family===6?e.has6:e.has4))}if(r.length===0){const t=new Error(`cacheableLookup ENOTFOUND ${e}`);t.code="ENOTFOUND";t.hostname=e;throw t}if(t.all){return r}return r[0]}async query(e){let t=await this._cache.get(e);if(!t){const r=this._pending[e];if(r){t=await r}else{const r=this.queryAndCache(e);this._pending[e]=r;try{t=await r}finally{delete this._pending[e]}}}t=t.map((e=>({...e})));return t}async _resolve(e){const wrap=async e=>{try{return await e}catch(e){if(e.code==="ENODATA"||e.code==="ENOTFOUND"){return[]}throw e}};const[t,r]=await Promise.all([this._resolve4(e,m),this._resolve6(e,m)].map((e=>wrap(e))));let s=0;let n=0;let o=0;const i=Date.now();for(const e of t){e.family=4;e.expires=i+e.ttl*1e3;s=Math.max(s,e.ttl)}for(const e of r){e.family=6;e.expires=i+e.ttl*1e3;n=Math.max(n,e.ttl)}if(t.length>0){if(r.length>0){o=Math.min(s,n)}else{o=s}}else{o=n}return{entries:[...t,...r],cacheTtl:o}}async _lookup(e){try{const t=await this._dnsLookup(e,{all:true});return{entries:t,cacheTtl:0}}catch(e){return{entries:[],cacheTtl:0}}}async _set(e,t,r){if(this.maxTtl>0&&r>0){r=Math.min(r,this.maxTtl)*1e3;t[d]=Date.now()+r;try{await this._cache.set(e,t,r)}catch(e){this.lookupAsync=async()=>{const t=new Error("Cache Error. Please recreate the CacheableLookup instance.");t.cause=e;throw t}}if(isIterable(this._cache)){this._tick(r)}}}async queryAndCache(e){if(this._hostnamesToFallback.has(e)){return this._dnsLookup(e,y)}let t=await this._resolve(e);if(t.entries.length===0&&this._fallback){t=await this._lookup(e);if(t.entries.length!==0){this._hostnamesToFallback.add(e)}}const r=t.entries.length===0?this.errorTtl:t.cacheTtl;await this._set(e,t.entries,r);return t.entries}_tick(e){const t=this._nextRemovalTime;if(!t||e{this._nextRemovalTime=false;let e=Infinity;const t=Date.now();for(const[r,s]of this._cache){const n=s[d];if(t>=n){this._cache.delete(r)}else if(n{if(!("lookup"in t)){t.lookup=this.lookup}return e[l](t,r)}}uninstall(e){verifyAgent(e);if(e[l]){if(e[h]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[h]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=getIfaceInfo();if(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6){this._cache.clear()}}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}}e.exports=CacheableLookup;e.exports["default"]=CacheableLookup},8116:(e,t,r)=>{"use strict";const s=r(2361);const n=r(7310);const o=r(7952);const i=r(1766);const a=r(1002);const c=r(9004);const u=r(9662);const l=r(1312);const h=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new h({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let h;if(typeof t==="string"){h=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){h=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";h=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(h)};t.headers=u(t.headers);const d=new s;const p=o(n.format(h),{stripWWW:false,removeTrailingSlash:false,stripAuthentication:false});const m=`${t.method}:${p}`;let y=false;let g=false;const makeRequest=t=>{g=true;let s=false;let n;const o=new Promise((e=>{n=()=>{if(!s){s=true;e()}}}));const handler=e=>{if(y&&!t.forceRefresh){e.status=e.statusCode;const r=a.fromObject(y.cachePolicy).revalidatedPolicy(t,e);if(!r.modified){const t=r.policy.responseHeaders();e=new c(y.statusCode,t,y.body,y.url);e.cachePolicy=r.policy;e.fromCache=true}}if(!e.fromCache){e.cachePolicy=new a(t,e,t);e.fromCache=false}let n;if(t.cache&&e.cachePolicy.storable()){n=l(e);(async()=>{try{const r=i.buffer(e);await Promise.race([o,new Promise((t=>e.once("end",t)))]);if(s){return}const n=await r;const a={cachePolicy:e.cachePolicy.toObject(),url:e.url,statusCode:e.fromCache?y.statusCode:e.statusCode,body:n};let c=t.strictTtl?e.cachePolicy.timeToLive():undefined;if(t.maxTtl){c=c?Math.min(c,t.maxTtl):t.maxTtl}await this.cache.set(m,a,c)}catch(e){d.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){d.emit("error",new CacheableRequest.CacheError(e))}})()}d.emit("response",n||e);if(typeof r==="function"){r(n||e)}};try{const r=e(t,handler);r.once("error",n);r.once("abort",n);d.emit("request",r)}catch(e){d.emit("error",new CacheableRequest.RequestError(e))}};(async()=>{const get=async e=>{await Promise.resolve();const t=e.cache?await this.cache.get(m):undefined;if(typeof t==="undefined"){return makeRequest(e)}const s=a.fromObject(t.cachePolicy);if(s.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=s.responseHeaders();const n=new c(t.statusCode,e,t.body,t.url);n.cachePolicy=s;n.fromCache=true;d.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>d.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);d.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}d.emit("error",new CacheableRequest.CacheError(e))}})();return d}}}function urlObjectToRequestOptions(e){const t={...e};t.path=`${e.pathname||"/"}${e.search||""}`;delete t.pathname;delete t.search;return t}function normalizeUrlObject(e){return{protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}}CacheableRequest.RequestError=class extends Error{constructor(e){super(e.message);this.name="RequestError";Object.assign(this,e)}};CacheableRequest.CacheError=class extends Error{constructor(e){super(e.message);this.name="CacheError";Object.assign(this,e)}};e.exports=CacheableRequest},1312:(e,t,r)=>{"use strict";const s=r(2781).PassThrough;const n=r(2610);const cloneResponse=e=>{if(!(e&&e.pipe)){throw new TypeError("Parameter `response` must be a response stream.")}const t=new s;n(e,t);return e.pipe(t)};e.exports=cloneResponse},2391:(e,t,r)=>{"use strict";const{Transform:s,PassThrough:n}=r(2781);const o=r(9796);const i=r(3877);e.exports=e=>{const t=(e.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(t)){return e}const r=t==="br";if(r&&typeof o.createBrotliDecompress!=="function"){e.destroy(new Error("Brotli is not supported on Node.js < 12"));return e}let a=true;const c=new s({transform(e,t,r){a=false;r(null,e)},flush(e){e()}});const u=new n({autoDestroy:false,destroy(t,r){e.destroy();r(t)}});const l=r?o.createBrotliDecompress():o.createUnzip();l.once("error",(t=>{if(a&&!e.readable){u.end();return}u.destroy(t)}));i(e,u);e.pipe(c).pipe(l).pipe(u);return u}},3877:e=>{"use strict";const t=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];e.exports=(e,r)=>{if(r._readableState.autoDestroy){throw new Error("The second stream must have the `autoDestroy` option set to `false`")}const s=new Set(Object.keys(e).concat(t));const n={};for(const t of s){if(t in r){continue}n[t]={get(){const r=e[t];const s=typeof r==="function";return s?r.bind(e):r},set(r){e[t]=r},enumerable:true,configurable:false}}Object.defineProperties(r,n);e.once("aborted",(()=>{r.destroy();r.emit("aborted")}));e.once("close",(()=>{if(e.complete){if(r.readable){r.once("end",(()=>{r.emit("close")}))}else{r.emit("close")}}else{r.emit("close")}}));return r}},6214:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function isTLSSocket(e){return e.encrypted}const deferToConnect=(e,t)=>{let r;if(typeof t==="function"){const e=t;r={connect:e}}else{r=t}const s=typeof r.connect==="function";const n=typeof r.secureConnect==="function";const o=typeof r.close==="function";const onConnect=()=>{if(s){r.connect()}if(isTLSSocket(e)&&n){if(e.authorized){r.secureConnect()}else if(!e.authorizationError){e.once("secureConnect",r.secureConnect)}}if(o){e.once("close",r.close)}};if(e.writable&&!e.connecting){onConnect()}else if(e.connecting){e.once("connect",onConnect)}else if(e.destroyed&&o){r.close(e._hadError)}};t["default"]=deferToConnect;e.exports=deferToConnect;e.exports["default"]=deferToConnect},1205:(e,t,r)=>{var s=r(1223);var noop=function(){};var isRequest=function(e){return e.setHeader&&typeof e.abort==="function"};var isChildProcess=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3};var eos=function(e,t,r){if(typeof t==="function")return eos(e,null,t);if(!t)t={};r=s(r||noop);var n=e._writableState;var o=e._readableState;var i=t.readable||t.readable!==false&&e.readable;var a=t.writable||t.writable!==false&&e.writable;var c=false;var onlegacyfinish=function(){if(!e.writable)onfinish()};var onfinish=function(){a=false;if(!i)r.call(e)};var onend=function(){i=false;if(!a)r.call(e)};var onexit=function(t){r.call(e,t?new Error("exited with error code: "+t):null)};var onerror=function(t){r.call(e,t)};var onclose=function(){process.nextTick(onclosenexttick)};var onclosenexttick=function(){if(c)return;if(i&&!(o&&(o.ended&&!o.destroyed)))return r.call(e,new Error("premature close"));if(a&&!(n&&(n.ended&&!n.destroyed)))return r.call(e,new Error("premature close"))};var onrequest=function(){e.req.on("finish",onfinish)};if(isRequest(e)){e.on("complete",onfinish);e.on("abort",onclose);if(e.req)onrequest();else e.on("request",onrequest)}else if(a&&!n){e.on("end",onlegacyfinish);e.on("close",onlegacyfinish)}if(isChildProcess(e))e.on("exit",onexit);e.on("end",onend);e.on("finish",onfinish);if(t.error!==false)e.on("error",onerror);e.on("close",onclose);return function(){c=true;e.removeListener("complete",onfinish);e.removeListener("abort",onclose);e.removeListener("request",onrequest);if(e.req)e.req.removeListener("finish",onfinish);e.removeListener("end",onlegacyfinish);e.removeListener("close",onlegacyfinish);e.removeListener("finish",onfinish);e.removeListener("exit",onexit);e.removeListener("end",onend);e.removeListener("error",onerror);e.removeListener("close",onclose)}};e.exports=eos},1585:(e,t,r)=>{"use strict";const{PassThrough:s}=r(2781);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const n=r==="buffer";let o=false;if(t){o=!(r||n)}else{r=r||"utf8"}if(n){r=null}const i=new s({objectMode:o});if(r){i.setEncoding(r)}let a=0;const c=[];i.on("data",(e=>{c.push(e);if(o){a=c.length}else{a+=e.length}}));i.getBufferedValue=()=>{if(t){return c}return n?Buffer.concat(c,a):c.join("")};i.getBufferedLength=()=>a;return i}},1766:(e,t,r)=>{"use strict";const{constants:s}=r(4300);const n=r(8341);const o=r(1585);class MaxBufferError extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}async function getStream(e,t){if(!e){return Promise.reject(new Error("Expected a stream"))}t={maxBuffer:Infinity,...t};const{maxBuffer:r}=t;let i;await new Promise(((a,c)=>{const rejectPromise=e=>{if(e&&i.getBufferedLength()<=s.MAX_LENGTH){e.bufferedData=i.getBufferedValue()}c(e)};i=n(e,o(t),(e=>{if(e){rejectPromise(e);return}a()}));i.on("data",(()=>{if(i.getBufferedLength()>r){rejectPromise(new MaxBufferError)}}))}));return i.getBufferedValue()}e.exports=getStream;e.exports["default"]=getStream;e.exports.buffer=(e,t)=>getStream(e,{...t,encoding:"buffer"});e.exports.array=(e,t)=>getStream(e,{...t,array:true});e.exports.MaxBufferError=MaxBufferError},6457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4597);function createRejection(e,...t){const r=(async()=>{if(e instanceof s.RequestError){try{for(const r of t){if(r){for(const t of r){e=await t(e)}}}}catch(t){e=t}}throw e})();const returnPromise=()=>r;r.json=returnPromise;r.text=returnPromise;r.buffer=returnPromise;r.on=returnPromise;return r}t["default"]=createRejection},6056:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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});const o=r(2361);const i=r(7678);const a=r(9072);const c=r(4597);const u=r(8220);const l=r(94);const h=r(3021);const d=r(4500);const p=r(9298);const m=["request","response","redirect","uploadProgress","downloadProgress"];function asPromise(e){let t;let r;const s=new o.EventEmitter;const n=new a(((o,a,y)=>{const makeRequest=g=>{const v=new l.default(undefined,e);v.retryCount=g;v._noPipe=true;y((()=>v.destroy()));y.shouldReject=false;y((()=>a(new c.CancelError(v))));t=v;v.once("response",(async e=>{var t;e.retryCount=g;if(e.request.aborted){return}let s;try{s=await d.default(v);e.rawBody=s}catch(e){return}if(v._isAboutToError){return}const n=((t=e.headers["content-encoding"])!==null&&t!==void 0?t:"").toLowerCase();const i=["gzip","deflate","br"].includes(n);const{options:a}=v;if(i&&!a.decompress){e.body=s}else{try{e.body=u.default(e,a.responseType,a.parseJson,a.encoding)}catch(t){e.body=s.toString();if(p.isResponseOk(e)){v._beforeError(t);return}}}try{for(const[t,r]of a.hooks.afterResponse.entries()){e=await r(e,(async e=>{const r=l.default.normalizeArguments(undefined,{...e,retry:{calculateDelay:()=>0},throwHttpErrors:false,resolveBodyOnly:false},a);r.hooks.afterResponse=r.hooks.afterResponse.slice(0,t);for(const e of r.hooks.beforeRetry){await e(r)}const s=asPromise(r);y((()=>{s.catch((()=>{}));s.cancel()}));return s}))}}catch(e){v._beforeError(new c.RequestError(e.message,e,v));return}if(!p.isResponseOk(e)){v._beforeError(new c.HTTPError(e));return}r=e;o(v.options.resolveBodyOnly?e.body:e)}));const onError=e=>{if(n.isCanceled){return}const{options:t}=v;if(e instanceof c.HTTPError&&!t.throwHttpErrors){const{response:t}=e;o(v.options.resolveBodyOnly?t.body:t);return}a(e)};v.once("error",onError);const _=v.options.body;v.once("retry",((e,t)=>{var r,s;if(_===((r=t.request)===null||r===void 0?void 0:r.options.body)&&i.default.nodeStream((s=t.request)===null||s===void 0?void 0:s.options.body)){onError(t);return}makeRequest(e)}));h.default(v,s,m)};makeRequest(0)}));n.on=(e,t)=>{s.on(e,t);return n};const shortcut=e=>{const t=(async()=>{await n;const{options:t}=r.request;return u.default(r,e,t.parseJson,t.encoding)})();Object.defineProperties(t,Object.getOwnPropertyDescriptors(n));return t};n.json=()=>{const{headers:e}=t.options;if(!t.writableFinished&&e.accept===undefined){e.accept="application/json"}return shortcut("json")};n.buffer=()=>shortcut("buffer");n.text=()=>shortcut("text");return n}t["default"]=asPromise;n(r(4597),t)},1048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7678);const normalizeArguments=(e,t)=>{if(s.default.null_(e.encoding)){throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead")}s.assert.any([s.default.string,s.default.undefined],e.encoding);s.assert.any([s.default.boolean,s.default.undefined],e.resolveBodyOnly);s.assert.any([s.default.boolean,s.default.undefined],e.methodRewriting);s.assert.any([s.default.boolean,s.default.undefined],e.isStream);s.assert.any([s.default.string,s.default.undefined],e.responseType);if(e.responseType===undefined){e.responseType="text"}const{retry:r}=e;if(t){e.retry={...t.retry}}else{e.retry={calculateDelay:e=>e.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:undefined}}if(s.default.object(r)){e.retry={...e.retry,...r};e.retry.methods=[...new Set(e.retry.methods.map((e=>e.toUpperCase())))];e.retry.statusCodes=[...new Set(e.retry.statusCodes)];e.retry.errorCodes=[...new Set(e.retry.errorCodes)]}else if(s.default.number(r)){e.retry.limit=r}if(s.default.undefined(e.retry.maxRetryAfter)){e.retry.maxRetryAfter=Math.min(...[e.timeout.request,e.timeout.connect].filter(s.default.number))}if(s.default.object(e.pagination)){if(t){e.pagination={...t.pagination,...e.pagination}}const{pagination:r}=e;if(!s.default.function_(r.transform)){throw new Error("`options.pagination.transform` must be implemented")}if(!s.default.function_(r.shouldContinue)){throw new Error("`options.pagination.shouldContinue` must be implemented")}if(!s.default.function_(r.filter)){throw new TypeError("`options.pagination.filter` must be implemented")}if(!s.default.function_(r.paginate)){throw new Error("`options.pagination.paginate` must be implemented")}}if(e.responseType==="json"&&e.headers.accept===undefined){e.headers.accept="application/json"}return e};t["default"]=normalizeArguments},8220:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4597);const parseBody=(e,t,r,n)=>{const{rawBody:o}=e;try{if(t==="text"){return o.toString(n)}if(t==="json"){return o.length===0?"":r(o.toString())}if(t==="buffer"){return o}throw new s.ParseError({message:`Unknown body type '${t}'`,name:"Error"},e)}catch(t){throw new s.ParseError(t,e)}};t["default"]=parseBody},4597:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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.CancelError=t.ParseError=void 0;const o=r(94);class ParseError extends o.RequestError{constructor(e,t){const{options:r}=t.request;super(`${e.message} in "${r.url.toString()}"`,e,t.request);this.name="ParseError";this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_BODY_PARSE_FAILURE":this.code}}t.ParseError=ParseError;class CancelError extends o.RequestError{constructor(e){super("Promise was canceled",{},e);this.name="CancelError";this.code="ERR_CANCELED"}get isCanceled(){return true}}t.CancelError=CancelError;n(r(94),t)},3462:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.retryAfterStatusCodes=void 0;t.retryAfterStatusCodes=new Set([413,429,503]);const calculateRetryDelay=({attemptCount:e,retryOptions:t,error:r,retryAfter:s})=>{if(e>t.limit){return 0}const n=t.methods.includes(r.options.method);const o=t.errorCodes.includes(r.code);const i=r.response&&t.statusCodes.includes(r.response.statusCode);if(!n||!o&&!i){return 0}if(r.response){if(s){if(t.maxRetryAfter===undefined||s>t.maxRetryAfter){return 0}return s}if(r.response.statusCode===413){return 0}}const a=Math.random()*100;return 2**(e-1)*1e3+a};t["default"]=calculateRetryDelay},94:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UnsupportedProtocolError=t.ReadError=t.TimeoutError=t.UploadError=t.CacheError=t.HTTPError=t.MaxRedirectsError=t.RequestError=t.setNonEnumerableProperties=t.knownHookEvents=t.withoutBody=t.kIsNormalizedAlready=void 0;const s=r(3837);const n=r(2781);const o=r(7147);const i=r(7310);const a=r(3685);const c=r(3685);const u=r(5687);const l=r(8097);const h=r(2286);const d=r(8116);const p=r(2391);const m=r(4645);const y=r(9662);const g=r(7678);const v=r(4564);const _=r(40);const E=r(3021);const w=r(2454);const b=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const T=r(4993);const A=r(9298);const C=r(397);const P=r(1048);const k=r(3462);let x;const I=Symbol("request");const $=Symbol("response");const j=Symbol("responseSize");const L=Symbol("downloadedSize");const N=Symbol("bodySize");const q=Symbol("uploadedSize");const U=Symbol("serverResponsesPiped");const D=Symbol("unproxyEvents");const H=Symbol("isFromCache");const M=Symbol("cancelTimeouts");const F=Symbol("startedReading");const B=Symbol("stopReading");const G=Symbol("triggerRead");const z=Symbol("body");const V=Symbol("jobs");const W=Symbol("originalResponse");const Y=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const J=g.default.string(process.versions.brotli);t.withoutBody=new Set(["GET","HEAD"]);t.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function validateSearchParameters(e){for(const t in e){const r=e[t];if(!g.default.string(r)&&!g.default.number(r)&&!g.default.boolean(r)&&!g.default.null_(r)&&!g.default.undefined(r)){throw new TypeError(`The \`searchParams\` value '${String(r)}' must be a string, number, boolean or null`)}}}function isClientRequest(e){return g.default.object(e)&&!("statusCode"in e)}const X=new O.default;const waitForOpenFile=async e=>new Promise(((t,r)=>{const onError=e=>{r(e)};if(!e.pending){t()}e.once("error",onError);e.once("ready",(()=>{e.off("error",onError);t()}))}));const K=new Set([300,301,302,303,304,307,308]);const Z=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of Z){if(!(e in t)){continue}r[e]={writable:true,configurable:true,enumerable:false,value:t[e]}}}Object.defineProperties(t,r)};class RequestError extends Error{constructor(e,t,r){var s,n;super(e);Error.captureStackTrace(this,this.constructor);this.name="RequestError";this.code=(s=t.code)!==null&&s!==void 0?s:"ERR_GOT_REQUEST_ERROR";if(r instanceof Request){Object.defineProperty(this,"request",{enumerable:false,value:r});Object.defineProperty(this,"response",{enumerable:false,value:r[$]});Object.defineProperty(this,"options",{enumerable:false,value:r.options})}else{Object.defineProperty(this,"options",{enumerable:false,value:r})}this.timings=(n=this.request)===null||n===void 0?void 0:n.timings;if(g.default.string(t.stack)&&g.default.string(this.stack)){const e=this.stack.indexOf(this.message)+this.message.length;const r=this.stack.slice(e).split("\n").reverse();const s=t.stack.slice(t.stack.indexOf(t.message)+t.message.length).split("\n").reverse();while(s.length!==0&&s[0]===r[0]){r.shift()}this.stack=`${this.stack.slice(0,e)}${r.reverse().join("\n")}${s.reverse().join("\n")}`}}}t.RequestError=RequestError;class MaxRedirectsError extends RequestError{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e);this.name="MaxRedirectsError";this.code="ERR_TOO_MANY_REDIRECTS"}}t.MaxRedirectsError=MaxRedirectsError;class HTTPError extends RequestError{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request);this.name="HTTPError";this.code="ERR_NON_2XX_3XX_RESPONSE"}}t.HTTPError=HTTPError;class CacheError extends RequestError{constructor(e,t){super(e.message,e,t);this.name="CacheError";this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}}t.CacheError=CacheError;class UploadError extends RequestError{constructor(e,t){super(e.message,e,t);this.name="UploadError";this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}}t.UploadError=UploadError;class TimeoutError extends RequestError{constructor(e,t,r){super(e.message,e,r);this.name="TimeoutError";this.event=e.event;this.timings=t}}t.TimeoutError=TimeoutError;class ReadError extends RequestError{constructor(e,t){super(e.message,e,t);this.name="ReadError";this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code}}t.ReadError=ReadError;class UnsupportedProtocolError extends RequestError{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e);this.name="UnsupportedProtocolError";this.code="ERR_UNSUPPORTED_PROTOCOL"}}t.UnsupportedProtocolError=UnsupportedProtocolError;const Q=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[L]=0;this[q]=0;this.requestInitialized=false;this[U]=new Set;this.redirects=[];this[B]=false;this[G]=false;this[V]=[];this.retryCount=0;this._progressCallbacks=[];const unlockWrite=()=>this._unlockWrite();const lockWrite=()=>this._lockWrite();this.on("pipe",(e=>{e.prependListener("data",unlockWrite);e.on("data",lockWrite);e.prependListener("end",unlockWrite);e.on("end",lockWrite)}));this.on("unpipe",(e=>{e.off("data",unlockWrite);e.off("data",lockWrite);e.off("end",unlockWrite);e.off("end",lockWrite)}));this.on("pipe",(e=>{if(e instanceof c.IncomingMessage){this.options.headers={...e.headers,...this.options.headers}}}));const{json:n,body:i,form:a}=r;if(n||i||a){this._lockWrite()}if(t.kIsNormalizedAlready in r){this.options=r}else{try{this.options=this.constructor.normalizeArguments(e,r,s)}catch(e){if(g.default.nodeStream(r.body)){r.body.destroy()}this.destroy(e);return}}(async()=>{var e;try{if(this.options.body instanceof o.ReadStream){await waitForOpenFile(this.options.body)}const{url:t}=this.options;if(!t){throw new TypeError("Missing `url` property")}this.requestUrl=t.toString();decodeURI(this.requestUrl);await this._finalizeBody();await this._makeRequest();if(this.destroyed){(e=this[I])===null||e===void 0?void 0:e.destroy();return}for(const e of this[V]){e()}this[V].length=0;this.requestInitialized=true}catch(e){if(e instanceof RequestError){this._beforeError(e);return}if(!this.destroyed){this.destroy(e)}}})()}static normalizeArguments(e,r,n){var o,a,c,u,l;const p=r;if(g.default.object(e)&&!g.default.urlInstance(e)){r={...n,...e,...r}}else{if(e&&r&&r.url!==undefined){throw new TypeError("The `url` option is mutually exclusive with the `input` argument")}r={...n,...r};if(e!==undefined){r.url=e}if(g.default.urlInstance(r.url)){r.url=new i.URL(r.url.toString())}}if(r.cache===false){r.cache=undefined}if(r.dnsCache===false){r.dnsCache=undefined}g.assert.any([g.default.string,g.default.undefined],r.method);g.assert.any([g.default.object,g.default.undefined],r.headers);g.assert.any([g.default.string,g.default.urlInstance,g.default.undefined],r.prefixUrl);g.assert.any([g.default.object,g.default.undefined],r.cookieJar);g.assert.any([g.default.object,g.default.string,g.default.undefined],r.searchParams);g.assert.any([g.default.object,g.default.string,g.default.undefined],r.cache);g.assert.any([g.default.object,g.default.number,g.default.undefined],r.timeout);g.assert.any([g.default.object,g.default.undefined],r.context);g.assert.any([g.default.object,g.default.undefined],r.hooks);g.assert.any([g.default.boolean,g.default.undefined],r.decompress);g.assert.any([g.default.boolean,g.default.undefined],r.ignoreInvalidCookies);g.assert.any([g.default.boolean,g.default.undefined],r.followRedirect);g.assert.any([g.default.number,g.default.undefined],r.maxRedirects);g.assert.any([g.default.boolean,g.default.undefined],r.throwHttpErrors);g.assert.any([g.default.boolean,g.default.undefined],r.http2);g.assert.any([g.default.boolean,g.default.undefined],r.allowGetBody);g.assert.any([g.default.string,g.default.undefined],r.localAddress);g.assert.any([T.isDnsLookupIpVersion,g.default.undefined],r.dnsLookupIpVersion);g.assert.any([g.default.object,g.default.undefined],r.https);g.assert.any([g.default.boolean,g.default.undefined],r.rejectUnauthorized);if(r.https){g.assert.any([g.default.boolean,g.default.undefined],r.https.rejectUnauthorized);g.assert.any([g.default.function_,g.default.undefined],r.https.checkServerIdentity);g.assert.any([g.default.string,g.default.object,g.default.array,g.default.undefined],r.https.certificateAuthority);g.assert.any([g.default.string,g.default.object,g.default.array,g.default.undefined],r.https.key);g.assert.any([g.default.string,g.default.object,g.default.array,g.default.undefined],r.https.certificate);g.assert.any([g.default.string,g.default.undefined],r.https.passphrase);g.assert.any([g.default.string,g.default.buffer,g.default.array,g.default.undefined],r.https.pfx)}g.assert.any([g.default.object,g.default.undefined],r.cacheOptions);if(g.default.string(r.method)){r.method=r.method.toUpperCase()}else{r.method="GET"}if(r.headers===(n===null||n===void 0?void 0:n.headers)){r.headers={...r.headers}}else{r.headers=y({...n===null||n===void 0?void 0:n.headers,...r.headers})}if("slashes"in r){throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.")}if("auth"in r){throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.")}if("searchParams"in r){if(r.searchParams&&r.searchParams!==(n===null||n===void 0?void 0:n.searchParams)){let e;if(g.default.string(r.searchParams)||r.searchParams instanceof i.URLSearchParams){e=new i.URLSearchParams(r.searchParams)}else{validateSearchParameters(r.searchParams);e=new i.URLSearchParams;for(const t in r.searchParams){const s=r.searchParams[t];if(s===null){e.append(t,"")}else if(s!==undefined){e.append(t,s)}}}(o=n===null||n===void 0?void 0:n.searchParams)===null||o===void 0?void 0:o.forEach(((t,r)=>{if(!e.has(r)){e.append(r,t)}}));r.searchParams=e}}r.username=(a=r.username)!==null&&a!==void 0?a:"";r.password=(c=r.password)!==null&&c!==void 0?c:"";if(g.default.undefined(r.prefixUrl)){r.prefixUrl=(u=n===null||n===void 0?void 0:n.prefixUrl)!==null&&u!==void 0?u:""}else{r.prefixUrl=r.prefixUrl.toString();if(r.prefixUrl!==""&&!r.prefixUrl.endsWith("/")){r.prefixUrl+="/"}}if(g.default.string(r.url)){if(r.url.startsWith("/")){throw new Error("`input` must not start with a slash when using `prefixUrl`")}r.url=R.default(r.prefixUrl+r.url,r)}else if(g.default.undefined(r.url)&&r.prefixUrl!==""||r.protocol){r.url=R.default(r.prefixUrl,r)}if(r.url){if("port"in r){delete r.port}let{prefixUrl:e}=r;Object.defineProperty(r,"prefixUrl",{set:t=>{const s=r.url;if(!s.href.startsWith(t)){throw new Error(`Cannot change \`prefixUrl\` from ${e} to ${t}: ${s.href}`)}r.url=new i.URL(t+s.href.slice(e.length));e=t},get:()=>e});let{protocol:t}=r.url;if(t==="unix:"){t="http:";r.url=new i.URL(`http://unix${r.url.pathname}${r.url.search}`)}if(r.searchParams){r.url.search=r.searchParams.toString()}if(t!=="http:"&&t!=="https:"){throw new UnsupportedProtocolError(r)}if(r.username===""){r.username=r.url.username}else{r.url.username=r.username}if(r.password===""){r.password=r.url.password}else{r.url.password=r.password}}const{cookieJar:m}=r;if(m){let{setCookie:e,getCookieString:t}=m;g.assert.function_(e);g.assert.function_(t);if(e.length===4&&t.length===0){e=s.promisify(e.bind(r.cookieJar));t=s.promisify(t.bind(r.cookieJar));r.cookieJar={setCookie:e,getCookieString:t}}}const{cache:v}=r;if(v){if(!X.has(v)){X.set(v,new d(((e,t)=>{const r=e[I](e,t);if(g.default.promise(r)){r.once=(e,t)=>{if(e==="error"){r.catch(t)}else if(e==="abort"){(async()=>{try{const e=await r;e.once("abort",t)}catch(e){}})()}else{throw new Error(`Unknown HTTP2 promise event: ${e}`)}return r}}return r}),v))}}r.cacheOptions={...r.cacheOptions};if(r.dnsCache===true){if(!x){x=new h.default}r.dnsCache=x}else if(!g.default.undefined(r.dnsCache)&&!r.dnsCache.lookup){throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${g.default(r.dnsCache)}`)}if(g.default.number(r.timeout)){r.timeout={request:r.timeout}}else if(n&&r.timeout!==n.timeout){r.timeout={...n.timeout,...r.timeout}}else{r.timeout={...r.timeout}}if(!r.context){r.context={}}const _=r.hooks===(n===null||n===void 0?void 0:n.hooks);r.hooks={...r.hooks};for(const e of t.knownHookEvents){if(e in r.hooks){if(g.default.array(r.hooks[e])){r.hooks[e]=[...r.hooks[e]]}else{throw new TypeError(`Parameter \`${e}\` must be an Array, got ${g.default(r.hooks[e])}`)}}else{r.hooks[e]=[]}}if(n&&!_){for(const e of t.knownHookEvents){const t=n.hooks[e];if(t.length>0){r.hooks[e]=[...n.hooks[e],...r.hooks[e]]}}}if("family"in r){C.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"')}if(n===null||n===void 0?void 0:n.https){r.https={...n.https,...r.https}}if("rejectUnauthorized"in r){C.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){C.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){C.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){C.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){C.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){C.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){C.default('"options.pfx" was never documented, please use "options.https.pfx"')}if("followRedirects"in r){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}if(r.agent){for(const e in r.agent){if(e!=="http"&&e!=="https"&&e!=="http2"){throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${e}\``)}}}r.maxRedirects=(l=r.maxRedirects)!==null&&l!==void 0?l:0;t.setNonEnumerableProperties([n,p],r);return P.default(r,n)}_lockWrite(){const onLockedWrite=()=>{throw new TypeError("The payload has been already provided")};this.write=onLockedWrite;this.end=onLockedWrite}_unlockWrite(){this.write=super.write;this.end=super.end}async _finalizeBody(){const{options:e}=this;const{headers:r}=e;const s=!g.default.undefined(e.form);const o=!g.default.undefined(e.json);const a=!g.default.undefined(e.body);const c=s||o||a;const u=t.withoutBody.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);this._cannotHaveBody=u;if(c){if(u){throw new TypeError(`The \`${e.method}\` method cannot be used with a body`)}if([a,s,o].filter((e=>e)).length>1){throw new TypeError("The `body`, `json` and `form` options are mutually exclusive")}if(a&&!(e.body instanceof n.Readable)&&!g.default.string(e.body)&&!g.default.buffer(e.body)&&!_.default(e.body)){throw new TypeError("The `body` option must be a stream.Readable, string or Buffer")}if(s&&!g.default.object(e.form)){throw new TypeError("The `form` option must be an Object")}{const t=!g.default.string(r["content-type"]);if(a){if(_.default(e.body)&&t){r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`}this[z]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[z]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[z]=e.stringifyJson(e.json)}const n=await v.default(this[z],e.headers);if(g.default.undefined(r["content-length"])&&g.default.undefined(r["transfer-encoding"])){if(!u&&!g.default.undefined(n)){r["content-length"]=String(n)}}}}else if(u){this._lockWrite()}else{this._unlockWrite()}this[N]=Number(r["content-length"])||undefined}async _onResponseBase(e){const{options:t}=this;const{url:r}=t;this[W]=e;if(t.decompress){e=p(e)}const s=e.statusCode;const n=e;n.statusMessage=n.statusMessage?n.statusMessage:a.STATUS_CODES[s];n.url=t.url.toString();n.requestUrl=this.requestUrl;n.redirectUrls=this.redirects;n.request=this;n.isFromCache=e.fromCache||false;n.ip=this.ip;n.retryCount=this.retryCount;this[H]=n.isFromCache;this[j]=Number(e.headers["content-length"])||undefined;this[$]=e;e.once("end",(()=>{this[j]=this[L];this.emit("downloadProgress",this.downloadProgress)}));e.once("error",(t=>{e.destroy();this._beforeError(new ReadError(t,this))}));e.once("aborted",(()=>{this._beforeError(new ReadError({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}));this.emit("downloadProgress",this.downloadProgress);const o=e.headers["set-cookie"];if(g.default.object(t.cookieJar)&&o){let e=o.map((async e=>t.cookieJar.setCookie(e,r.toString())));if(t.ignoreInvalidCookies){e=e.map((async e=>e.catch((()=>{}))))}try{await Promise.all(e)}catch(e){this._beforeError(e);return}}if(t.followRedirect&&e.headers.location&&K.has(s)){e.resume();if(this[I]){this[M]();delete this[I];this[D]()}const o=s===303&&t.method!=="GET"&&t.method!=="HEAD";if(o||!t.methodRewriting){t.method="GET";if("body"in t){delete t.body}if("json"in t){delete t.json}if("form"in t){delete t.form}this[z]=undefined;delete t.headers["content-length"]}if(this.redirects.length>=t.maxRedirects){this._beforeError(new MaxRedirectsError(this));return}try{const s=Buffer.from(e.headers.location,"binary").toString();const o=new i.URL(s,r);const a=o.toString();decodeURI(a);if(o.hostname!==r.hostname||o.port!==r.port){if("host"in t.headers){delete t.headers.host}if("cookie"in t.headers){delete t.headers.cookie}if("authorization"in t.headers){delete t.headers.authorization}if(t.username||t.password){t.username="";t.password=""}}else{o.username=t.username;o.password=t.password}this.redirects.push(a);t.url=o;for(const e of t.hooks.beforeRedirect){await e(t,n)}this.emit("redirect",n,t);await this._makeRequest()}catch(e){this._beforeError(e);return}return}if(t.isStream&&t.throwHttpErrors&&!A.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[G]){this._read()}}));this.on("resume",(()=>{e.resume()}));this.on("pause",(()=>{e.pause()}));e.once("end",(()=>{this.push(null)}));this.emit("response",e);for(const r of this[U]){if(r.headersSent){continue}for(const s in e.headers){const n=t.decompress?s!=="content-encoding":true;const o=e.headers[s];if(n){r.setHeader(s,o)}}r.statusCode=s}}async _onResponse(e){try{await this._onResponseBase(e)}catch(e){this._beforeError(e)}}_onRequest(e){const{options:t}=this;const{timeout:r,url:s}=t;l.default(e);this[M]=w.default(e,r,s);const n=t.cache?"cacheableResponse":"response";e.once(n,(e=>{void this._onResponse(e)}));e.once("error",(t=>{var r;e.destroy();(r=e.res)===null||r===void 0?void 0:r.removeAllListeners("end");t=t instanceof w.TimeoutError?new TimeoutError(t,this.timings,this):new RequestError(t.message,t,this);this._beforeError(t)}));this[D]=E.default(e,this,Q);this[I]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[z];const i=this.redirects.length===0?this:e;if(g.default.nodeStream(o)){o.pipe(i);o.once("error",(e=>{this._beforeError(new UploadError(e,this))}))}else{this._unlockWrite();if(!g.default.undefined(o)){this._writeRequest(o,undefined,(()=>{}));i.end();this._lockWrite()}else if(this._cannotHaveBody||this._noPipe){i.end();this._lockWrite()}}this.emit("request",e)}async _createCacheableRequest(e,t){return new Promise(((r,s)=>{Object.assign(t,b.default(e));delete t.url;let n;const o=X.get(t.cache)(t,(async e=>{e._readableState.autoDestroy=false;if(n){(await n).emit("cacheableResponse",e)}r(e)}));t.url=e;o.once("error",s);o.once("request",(async e=>{n=e;r(n)}))}))}async _makeRequest(){var e,t,r,s,n;const{options:o}=this;const{headers:i}=o;for(const e in i){if(g.default.undefined(i[e])){delete i[e]}else if(g.default.null_(i[e])){throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${e}\` header`)}}if(o.decompress&&g.default.undefined(i["accept-encoding"])){i["accept-encoding"]=J?"gzip, deflate, br":"gzip, deflate"}if(o.cookieJar){const e=await o.cookieJar.getCookieString(o.url.toString());if(g.default.nonEmptyString(e)){o.headers.cookie=e}}for(const e of o.hooks.beforeRequest){const t=await e(o);if(!g.default.undefined(t)){o.request=()=>t;break}}if(o.body&&this[z]!==o.body){this[z]=o.body}const{agent:c,request:l,timeout:h,url:p}=o;if(o.dnsCache&&!("lookup"in o)){o.lookup=o.dnsCache.lookup}if(p.hostname==="unix"){const e=/(?.+?):(?.+)/.exec(`${p.pathname}${p.search}`);if(e===null||e===void 0?void 0:e.groups){const{socketPath:t,path:r}=e.groups;Object.assign(o,{socketPath:t,path:r,host:""})}}const y=p.protocol==="https:";let v;if(o.http2){v=m.auto}else{v=y?u.request:a.request}const _=(e=o.request)!==null&&e!==void 0?e:v;const E=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[I]=_;delete o.request;delete o.timeout;const w=o;w.shared=(t=o.cacheOptions)===null||t===void 0?void 0:t.shared;w.cacheHeuristic=(r=o.cacheOptions)===null||r===void 0?void 0:r.cacheHeuristic;w.immutableMinTimeToLive=(s=o.cacheOptions)===null||s===void 0?void 0:s.immutableMinTimeToLive;w.ignoreCargoCult=(n=o.cacheOptions)===null||n===void 0?void 0:n.ignoreCargoCult;if(o.dnsLookupIpVersion!==undefined){try{w.family=T.dnsLookupIpVersionToFamily(o.dnsLookupIpVersion)}catch(e){throw new Error("Invalid `dnsLookupIpVersion` option value")}}if(o.https){if("rejectUnauthorized"in o.https){w.rejectUnauthorized=o.https.rejectUnauthorized}if(o.https.checkServerIdentity){w.checkServerIdentity=o.https.checkServerIdentity}if(o.https.certificateAuthority){w.ca=o.https.certificateAuthority}if(o.https.certificate){w.cert=o.https.certificate}if(o.https.key){w.key=o.https.key}if(o.https.passphrase){w.passphrase=o.https.passphrase}if(o.https.pfx){w.pfx=o.https.pfx}}try{let e=await E(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=h;o.agent=c;if(o.https){if("rejectUnauthorized"in o.https){delete w.rejectUnauthorized}if(o.https.checkServerIdentity){delete w.checkServerIdentity}if(o.https.certificateAuthority){delete w.ca}if(o.https.certificate){delete w.cert}if(o.https.key){delete w.key}if(o.https.passphrase){delete w.passphrase}if(o.https.pfx){delete w.pfx}}if(isClientRequest(e)){this._onRequest(e)}else if(this.writable){this.once("finish",(()=>{void this._onResponse(e)}));this._unlockWrite();this.end();this._lockWrite()}else{void this._onResponse(e)}}catch(e){if(e instanceof d.CacheError){throw new CacheError(e,this)}throw new RequestError(e.message,e,this)}}async _error(e){try{for(const t of this.options.hooks.beforeError){e=await t(e)}}catch(t){e=new RequestError(t.message,t,this)}this.destroy(e)}_beforeError(e){if(this[B]){return}const{options:t}=this;const r=this.retryCount+1;this[B]=true;if(!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}const s=e;const{response:n}=s;void(async()=>{if(n&&!n.body){n.setEncoding(this._readableState.encoding);try{n.rawBody=await S.default(n);n.body=n.rawBody.toString()}catch(e){}}if(this.listenerCount("retry")!==0){let o;try{let e;if(n&&"retry-after"in n.headers){e=Number(n.headers["retry-after"]);if(Number.isNaN(e)){e=Date.parse(n.headers["retry-after"])-Date.now();if(e<=0){e=1}}else{e*=1e3}}o=await t.retry.calculateDelay({attemptCount:r,retryOptions:t.retry,error:s,retryAfter:e,computedValue:k.default({attemptCount:r,retryOptions:t.retry,error:s,retryAfter:e,computedValue:0})})}catch(e){void this._error(new RequestError(e.message,e,this));return}if(o){const retry=async()=>{try{for(const e of this.options.hooks.beforeRetry){await e(this.options,s,r)}}catch(t){void this._error(new RequestError(t.message,e,this));return}if(this.destroyed){return}this.destroy();this.emit("retry",r,e)};this[Y]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[G]=true;const e=this[$];if(e&&!this[B]){if(e.readableLength){this[G]=false}let t;while((t=e.read())!==null){this[L]+=t.length;this[F]=true;const e=this.downloadProgress;if(e.percent<1){this.emit("downloadProgress",e)}this.push(t)}}}_write(e,t,r){const write=()=>{this._writeRequest(e,t,r)};if(this.requestInitialized){write()}else{this[V].push(write)}}_writeRequest(e,t,r){if(this[I].destroyed){return}this._progressCallbacks.push((()=>{this[q]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[I].write(e,t,(e=>{if(!e&&this._progressCallbacks.length>0){this._progressCallbacks.shift()()}r(e)}))}_final(e){const endRequest=()=>{while(this._progressCallbacks.length!==0){this._progressCallbacks.shift()()}if(!(I in this)){e();return}if(this[I].destroyed){e();return}this[I].end((t=>{if(!t){this[N]=this[q];this.emit("uploadProgress",this.uploadProgress);this[I].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[V].push(endRequest)}}_destroy(e,t){var r;this[B]=true;clearTimeout(this[Y]);if(I in this){this[M]();if(!((r=this[$])===null||r===void 0?void 0:r.complete)){this[I].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[B]}get ip(){var e;return(e=this.socket)===null||e===void 0?void 0:e.remoteAddress}get aborted(){var e,t,r;return((t=(e=this[I])===null||e===void 0?void 0:e.destroyed)!==null&&t!==void 0?t:this.destroyed)&&!((r=this[W])===null||r===void 0?void 0:r.complete)}get socket(){var e,t;return(t=(e=this[I])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[j]){e=this[L]/this[j]}else if(this[j]===this[L]){e=1}else{e=0}return{percent:e,transferred:this[L],total:this[j]}}get uploadProgress(){let e;if(this[N]){e=this[q]/this[N]}else if(this[N]===this[q]){e=1}else{e=0}return{percent:e,transferred:this[q],total:this[N]}}get timings(){var e;return(e=this[I])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[H]}pipe(e,t){if(this[F]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[U].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[U].delete(e)}super.unpipe(e);return this}}t["default"]=Request},4993:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.dnsLookupIpVersionToFamily=t.isDnsLookupIpVersion=void 0;const r={auto:0,ipv4:4,ipv6:6};t.isDnsLookupIpVersion=e=>e in r;t.dnsLookupIpVersionToFamily=e=>{if(t.isDnsLookupIpVersion(e)){return r[e]}throw new Error("Invalid DNS lookup IP version")}},4564:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7147);const n=r(3837);const o=r(7678);const i=r(40);const a=n.promisify(s.stat);t["default"]=async(e,t)=>{if(t&&"content-length"in t){return Number(t["content-length"])}if(!e){return 0}if(o.default.string(e)){return Buffer.byteLength(e)}if(o.default.buffer(e)){return e.length}if(i.default(e)){return n.promisify(e.getLength.bind(e))()}if(e instanceof s.ReadStream){const{size:t}=await a(e.path);if(t===0){return undefined}return t}return undefined}},4500:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const getBuffer=async e=>{const t=[];let r=0;for await(const s of e){t.push(s);r+=Buffer.byteLength(s)}if(Buffer.isBuffer(t[0])){return Buffer.concat(t,r)}return Buffer.from(t.join(""))};t["default"]=getBuffer},40:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7678);t["default"]=e=>s.default.nodeStream(e)&&s.default.function_(e.getBoundary)},9298:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isResponseOk=void 0;t.isResponseOk=e=>{const{statusCode:t}=e;const r=e.request.options.followRedirect?299:399;return t>=200&&t<=r||t===304}},9219:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7310);const n=["protocol","host","hostname","port","pathname","search"];t["default"]=(e,t)=>{var r,o;if(t.path){if(t.pathname){throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.")}if(t.search){throw new TypeError("Parameters `path` and `search` are mutually exclusive.")}if(t.searchParams){throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}}if(t.search&&t.searchParams){throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.")}if(!e){if(!t.protocol){throw new TypeError("No URL protocol specified")}e=`${t.protocol}//${(o=(r=t.hostname)!==null&&r!==void 0?r:t.host)!==null&&o!==void 0?o:""}`}const i=new s.URL(e);if(t.path){const e=t.path.indexOf("?");if(e===-1){t.pathname=t.path}else{t.pathname=t.path.slice(0,e);t.search=t.path.slice(e+1)}delete t.path}for(const e of n){if(t[e]){i[e]=t[e].toString()}}return i}},3021:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function default_1(e,t,r){const s={};for(const n of r){s[n]=(...e)=>{t.emit(n,...e)};e.on(n,s[n])}return()=>{for(const t of r){e.off(t,s[t])}}}t["default"]=default_1},2454:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TimeoutError=void 0;const s=r(1808);const n=r(1593);const o=Symbol("reentry");const noop=()=>{};class TimeoutError extends Error{constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`);this.event=t;this.name="TimeoutError";this.code="ETIMEDOUT"}}t.TimeoutError=TimeoutError;t["default"]=(e,t,r)=>{if(o in e){return noop}e[o]=true;const i=[];const{once:a,unhandleAll:c}=n.default();const addTimeout=(e,t,r)=>{var s;const n=setTimeout(t,e,e,r);(s=n.unref)===null||s===void 0?void 0:s.call(n);const cancel=()=>{clearTimeout(n)};i.push(cancel);return cancel};const{host:u,hostname:l}=r;const timeoutHandler=(t,r)=>{e.destroy(new TimeoutError(t,r))};const cancelTimeouts=()=>{for(const e of i){e()}c()};e.once("error",(t=>{cancelTimeouts();if(e.listenerCount("error")===0){throw t}}));e.once("close",cancelTimeouts);a(e,"response",(e=>{a(e,"end",cancelTimeouts)}));if(typeof t.request!=="undefined"){addTimeout(t.request,timeoutHandler,"request")}if(typeof t.socket!=="undefined"){const socketTimeoutHandler=()=>{timeoutHandler(t.socket,"socket")};e.setTimeout(t.socket,socketTimeoutHandler);i.push((()=>{e.removeListener("timeout",socketTimeoutHandler)}))}a(e,"socket",(n=>{var o;const{socketPath:i}=e;if(n.connecting){const e=Boolean(i!==null&&i!==void 0?i:s.isIP((o=l!==null&&l!==void 0?l:u)!==null&&o!==void 0?o:"")!==0);if(typeof t.lookup!=="undefined"&&!e&&typeof n.address().address==="undefined"){const e=addTimeout(t.lookup,timeoutHandler,"lookup");a(n,"lookup",e)}if(typeof t.connect!=="undefined"){const timeConnect=()=>addTimeout(t.connect,timeoutHandler,"connect");if(e){a(n,"connect",timeConnect())}else{a(n,"lookup",(e=>{if(e===null){a(n,"connect",timeConnect())}}))}}if(typeof t.secureConnect!=="undefined"&&r.protocol==="https:"){a(n,"connect",(()=>{const e=addTimeout(t.secureConnect,timeoutHandler,"secureConnect");a(n,"secureConnect",e)}))}}if(typeof t.send!=="undefined"){const timeRequest=()=>addTimeout(t.send,timeoutHandler,"send");if(n.connecting){a(n,"connect",(()=>{a(e,"upload-complete",timeRequest())}))}else{a(e,"upload-complete",timeRequest())}}}));if(typeof t.response!=="undefined"){a(e,"upload-complete",(()=>{const r=addTimeout(t.response,timeoutHandler,"response");a(e,"response",r)}))}return cancelTimeouts}},1593:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=()=>{const e=[];return{once(t,r,s){t.once(r,s);e.push({origin:t,event:r,fn:s})},unhandleAll(){for(const t of e){const{origin:e,event:r,fn:s}=t;e.removeListener(r,s)}e.length=0}}}},8026:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7678);t["default"]=e=>{e=e;const t={protocol:e.protocol,hostname:s.default.string(e.hostname)&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};if(s.default.string(e.port)&&e.port.length>0){t.port=Number(e.port)}if(e.username||e.password){t.auth=`${e.username||""}:${e.password||""}`}return t}},7288:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class WeakableMap{constructor(){this.weakMap=new WeakMap;this.map=new Map}set(e,t){if(typeof e==="object"){this.weakMap.set(e,t)}else{this.map.set(e,t)}}get(e){if(typeof e==="object"){return this.weakMap.get(e)}return this.map.get(e)}has(e){if(typeof e==="object"){return this.weakMap.has(e)}return this.map.has(e)}}t["default"]=WeakableMap},4337:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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.defaultHandler=void 0;const o=r(7678);const i=r(6056);const a=r(6457);const c=r(94);const u=r(285);const l={RequestError:i.RequestError,CacheError:i.CacheError,ReadError:i.ReadError,HTTPError:i.HTTPError,MaxRedirectsError:i.MaxRedirectsError,TimeoutError:i.TimeoutError,ParseError:i.ParseError,CancelError:i.CancelError,UnsupportedProtocolError:i.UnsupportedProtocolError,UploadError:i.UploadError};const delay=async e=>new Promise((t=>{setTimeout(t,e)}));const{normalizeArguments:h}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=h(undefined,r,t)}return t};const getPromiseOrStream=e=>e.isStream?new c.default(undefined,e):i.default(e);const isGotInstance=e=>"defaults"in e&&"options"in e.defaults;const d=["get","post","put","patch","head","delete"];t.defaultHandler=(e,t)=>t(e);const callInitHooks=(e,t)=>{if(e){for(const r of e){r(t)}}};const create=e=>{e._rawHandlers=e.handlers;e.handlers=e.handlers.map((e=>(t,r)=>{let s;const n=e(t,(e=>{s=r(e);return s}));if(n!==s&&!t.isStream&&s){const e=n;const{then:t,catch:r,finally:o}=e;Object.setPrototypeOf(e,Object.getPrototypeOf(s));Object.defineProperties(e,Object.getOwnPropertyDescriptors(s));e.then=t;e.catch=r;e.finally=o}return n}));const got=(t,r={},s)=>{var n,u;let l=0;const iterateHandlers=t=>e.handlers[l++](t,l===e.handlers.length?getPromiseOrStream:iterateHandlers);if(o.default.plainObject(t)){const e={...t,...r};c.setNonEnumerableProperties([t,r],e);r=e;t=undefined}try{let o;try{callInitHooks(e.options.hooks.init,r);callInitHooks((n=r.hooks)===null||n===void 0?void 0:n.init,r)}catch(e){o=e}const a=h(t,r,s!==null&&s!==void 0?s:e.options);a[c.kIsNormalizedAlready]=true;if(o){throw new i.RequestError(o.message,o,a)}return iterateHandlers(a)}catch(t){if(r.isStream){throw t}else{return a.default(t,e.options.hooks.beforeError,(u=r.hooks)===null||u===void 0?void 0:u.beforeError)}}};got.extend=(...r)=>{const s=[e.options];let n=[...e._rawHandlers];let o;for(const e of r){if(isGotInstance(e)){s.push(e.defaults.options);n.push(...e.defaults._rawHandlers);o=e.defaults.mutableDefaults}else{s.push(e);if("handlers"in e){n.push(...e.handlers)}o=e.mutableDefaults}}n=n.filter((e=>e!==t.defaultHandler));if(n.length===0){n.push(t.defaultHandler)}return create({options:mergeOptions(...s),handlers:n,mutableDefaults:Boolean(o)})};const paginateEach=async function*(t,r){let s=h(t,r,e.options);s.resolveBodyOnly=false;const n=s.pagination;if(!o.default.object(n)){throw new TypeError("`options.pagination` must be implemented")}const i=[];let{countLimit:a}=n;let c=0;while(c{const r=[];for await(const s of paginateEach(e,t)){r.push(s)}return r};got.paginate.each=paginateEach;got.stream=(e,t)=>got(e,{...t,isStream:true});for(const e of d){got[e]=(t,r)=>got(t,{...r,method:e});got.stream[e]=(t,r)=>got(t,{...r,method:e,isStream:true})}Object.assign(got,l);Object.defineProperty(got,"defaults",{value:e.mutableDefaults?e:u.default(e),writable:e.mutableDefaults,configurable:e.mutableDefaults,enumerable:true});got.mergeOptions=mergeOptions;return got};t["default"]=create;n(r(2613),t)},3061:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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});const o=r(7310);const i=r(4337);const a={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:undefined,calculateDelay:({computedValue:e})=>e},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:undefined,dnsCache:undefined,decompress:true,throwHttpErrors:true,followRedirect:true,isStream:false,responseType:"text",resolveBodyOnly:false,maxRedirects:10,prefixUrl:"",methodRewriting:true,ignoreInvalidCookies:false,context:{},http2:false,allowGetBody:false,https:undefined,pagination:{transform:e=>{if(e.request.options.responseType==="json"){return e.body}return JSON.parse(e.body)},paginate:e=>{if(!Reflect.has(e.headers,"link")){return false}const t=e.headers.link.split(",");let r;for(const e of t){const t=e.split(";");if(t[1].includes("next")){r=t[0].trimStart().trim();r=r.slice(1,-1);break}}if(r){const e={url:new o.URL(r)};return e}return false},filter:()=>true,shouldContinue:()=>true,countLimit:Infinity,backoff:0,requestLimit:1e4,stackAllItems:true},parseJson:e=>JSON.parse(e),stringifyJson:e=>JSON.stringify(e),cacheOptions:{}},handlers:[i.defaultHandler],mutableDefaults:false};const c=i.default(a);t["default"]=c;e.exports=c;e.exports["default"]=c;e.exports.__esModule=true;n(r(4337),t);n(r(6056),t)},2613:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true})},285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7678);function deepFreeze(e){for(const t of Object.values(e)){if(s.default.plainObject(t)||s.default.array(t)){deepFreeze(t)}}return Object.freeze(e)}t["default"]=deepFreeze},397:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=new Set;t["default"]=e=>{if(r.has(e)){return}r.add(e);process.emitWarning(`Got: ${e}`,{type:"DeprecationWarning"})}},1002:e=>{"use strict";const t=new Set([200,203,204,206,300,301,308,404,405,410,414,501]);const r=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]);const s=new Set([500,502,503,504]);const n={date:true,connection:true,"keep-alive":true,"proxy-authenticate":true,"proxy-authorization":true,te:true,trailer:true,"transfer-encoding":true,upgrade:true};const o={"content-length":true,"content-encoding":true,"transfer-encoding":true,"content-range":true};function toNumberOrZero(e){const t=parseInt(e,10);return isFinite(t)?t:0}function isErrorResponse(e){if(!e){return true}return s.has(e.status)}function parseCacheControl(e){const t={};if(!e)return t;const r=e.trim().split(/,/);for(const e of r){const[r,s]=e.split(/=/,2);t[r.trim()]=s===undefined?true:s.trim().replace(/^"|"$/g,"")}return t}function formatCacheControl(e){let t=[];for(const r in e){const s=e[r];t.push(s===true?r:r+"="+s)}if(!t.length){return undefined}return t.join(", ")}e.exports=class CachePolicy{constructor(e,t,{shared:r,cacheHeuristic:s,immutableMinTimeToLive:n,ignoreCargoCult:o,_fromObject:i}={}){if(i){this._fromObject(i);return}if(!t||!t.headers){throw Error("Response headers missing")}this._assertRequestHasHeaders(e);this._responseTime=this.now();this._isShared=r!==false;this._cacheHeuristic=undefined!==s?s:.1;this._immutableMinTtl=undefined!==n?n:24*3600*1e3;this._status="status"in t?t.status:200;this._resHeaders=t.headers;this._rescc=parseCacheControl(t.headers["cache-control"]);this._method="method"in e?e.method:"GET";this._url=e.url;this._host=e.headers.host;this._noAuthorization=!e.headers.authorization;this._reqHeaders=t.headers.vary?e.headers:null;this._reqcc=parseCacheControl(e.headers["cache-control"]);if(o&&"pre-check"in this._rescc&&"post-check"in this._rescc){delete this._rescc["pre-check"];delete this._rescc["post-check"];delete this._rescc["no-cache"];delete this._rescc["no-store"];delete this._rescc["must-revalidate"];this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":formatCacheControl(this._rescc)});delete this._resHeaders.expires;delete this._resHeaders.pragma}if(t.headers["cache-control"]==null&&/no-cache/.test(t.headers.pragma)){this._rescc["no-cache"]=true}}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&("GET"===this._method||"HEAD"===this._method||"POST"===this._method&&this._hasExplicitExpiration())&&r.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||t.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers){throw Error("Request headers missing")}}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);const t=parseCacheControl(e.headers["cache-control"]);if(t["no-cache"]||/no-cache/.test(e.headers.pragma)){return false}if(t["max-age"]&&this.age()>t["max-age"]){return false}if(t["min-fresh"]&&this.timeToLive()<1e3*t["min-fresh"]){return false}if(this.stale()){const e=t["max-stale"]&&!this._rescc["must-revalidate"]&&(true===t["max-stale"]||t["max-stale"]>this.age()-this.maxAge());if(!e){return false}}return this._requestMatches(e,false)}_requestMatches(e,t){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&"HEAD"===e.method)&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary){return true}if(this._resHeaders.vary==="*"){return false}const t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const r of t){if(e.headers[r]!==this._reqHeaders[r])return false}return true}_copyWithoutHopByHopHeaders(e){const t={};for(const r in e){if(n[r])continue;t[r]=e[r]}if(e.connection){const r=e.connection.trim().split(/\s*,\s*/);for(const e of r){delete t[e]}}if(t.warning){const e=t.warning.split(/,/).filter((e=>!/^\s*1[0-9][0-9]/.test(e)));if(!e.length){delete t.warning}else{t.warning=e.join(",").trim()}}return t}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders);const t=this.age();if(t>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24){e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'}e.age=`${Math.round(t)}`;e.date=new Date(this.now()).toUTCString();return e}date(){const e=Date.parse(this._resHeaders.date);if(isFinite(e)){return e}return this._responseTime}age(){let e=this._ageValue();const t=(this.now()-this._responseTime)/1e3;return e+t}_ageValue(){return toNumberOrZero(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]){return 0}if(this._isShared&&(this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable)){return 0}if(this._resHeaders.vary==="*"){return 0}if(this._isShared){if(this._rescc["proxy-revalidate"]){return 0}if(this._rescc["s-maxage"]){return toNumberOrZero(this._rescc["s-maxage"])}}if(this._rescc["max-age"]){return toNumberOrZero(this._rescc["max-age"])}const e=this._rescc.immutable?this._immutableMinTtl:0;const t=this.date();if(this._resHeaders.expires){const r=Date.parse(this._resHeaders.expires);if(Number.isNaN(r)||rr){return Math.max(e,(t-r)/1e3*this._cacheHeuristic)}}return e}timeToLive(){const e=this.maxAge()-this.age();const t=e+toNumberOrZero(this._rescc["stale-if-error"]);const r=e+toNumberOrZero(this._rescc["stale-while-revalidate"]);return Math.max(0,e,t,r)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+toNumberOrZero(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+toNumberOrZero(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(undefined,undefined,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t;this._isShared=e.sh;this._cacheHeuristic=e.ch;this._immutableMinTtl=e.imm!==undefined?e.imm:24*3600*1e3;this._status=e.st;this._resHeaders=e.resh;this._rescc=e.rescc;this._method=e.m;this._url=e.u;this._host=e.h;this._noAuthorization=e.a;this._reqHeaders=e.reqh;this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);const t=this._copyWithoutHopByHopHeaders(e.headers);delete t["if-range"];if(!this._requestMatches(e,true)||!this.storable()){delete t["if-none-match"];delete t["if-modified-since"];return t}if(this._resHeaders.etag){t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag}const r=t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&this._method!="GET";if(r){delete t["if-modified-since"];if(t["if-none-match"]){const e=t["if-none-match"].split(/,/).filter((e=>!/^\s*W\//.test(e)));if(!e.length){delete t["if-none-match"]}else{t["if-none-match"]=e.join(",").trim()}}}else if(this._resHeaders["last-modified"]&&!t["if-modified-since"]){t["if-modified-since"]=this._resHeaders["last-modified"]}return t}revalidatedPolicy(e,t){this._assertRequestHasHeaders(e);if(this._useStaleIfError()&&isErrorResponse(t)){return{modified:false,matches:false,policy:this}}if(!t||!t.headers){throw Error("Response headers missing")}let r=false;if(t.status!==undefined&&t.status!=304){r=false}else if(t.headers.etag&&!/^\s*W\//.test(t.headers.etag)){r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag}else if(this._resHeaders.etag&&t.headers.etag){r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,"")}else if(this._resHeaders["last-modified"]){r=this._resHeaders["last-modified"]===t.headers["last-modified"]}else{if(!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!t.headers.etag&&!t.headers["last-modified"]){r=true}}if(!r){return{policy:new this.constructor(e,t),modified:t.status!=304,matches:false}}const s={};for(const e in this._resHeaders){s[e]=e in t.headers&&!o[e]?t.headers[e]:this._resHeaders[e]}const n=Object.assign({},t,{status:this._status,method:this._method,headers:s});return{policy:new this.constructor(e,n,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:false,matches:true}}}},9898:(e,t,r)=>{"use strict";const s=r(2361);const n=r(4404);const o=r(5158);const i=r(9273);const a=Symbol("currentStreamsCount");const c=Symbol("request");const u=Symbol("cachedOriginSet");const l=Symbol("gracefullyClosing");const h=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"];const getSortedIndex=(e,t,r)=>{let s=0;let n=e.length;while(s>>1;if(r(e[o],t)){s=o+1}else{n=o}}return s};const compareSessions=(e,t)=>e.remoteSettings.maxConcurrentStreams>t.remoteSettings.maxConcurrentStreams;const closeCoveredSessions=(e,t)=>{for(const r of e){if(r[u].lengtht[u].includes(e)))&&r[a]+t[a]<=t.remoteSettings.maxConcurrentStreams){gracefullyClose(r)}}};const closeSessionIfCovered=(e,t)=>{for(const r of e){if(t[u].lengthr[u].includes(e)))&&t[a]+r[a]<=r.remoteSettings.maxConcurrentStreams){gracefullyClose(t)}}};const getSessions=({agent:e,isFree:t})=>{const r={};for(const s in e.sessions){const n=e.sessions[s];const o=n.filter((e=>{const r=e[Agent.kCurrentStreamsCount]{e[l]=true;if(e[a]===0){e.close()}};class Agent extends s{constructor({timeout:e=6e4,maxSessions:t=Infinity,maxFreeSessions:r=10,maxCachedTlsSessions:s=100}={}){super();this.sessions={};this.queue={};this.timeout=e;this.maxSessions=t;this.maxFreeSessions=r;this._freeSessionsCount=0;this._sessionsCount=0;this.settings={enablePush:false};this.tlsSessionCache=new i({maxSize:s})}static normalizeOrigin(e,t){if(typeof e==="string"){e=new URL(e)}if(t&&e.hostname!==t){e.hostname=t}return e.origin}normalizeOptions(e){let t="";if(e){for(const r of h){if(e[r]){t+=`:${e[r]}`}}}return t}_tryToCreateNewSession(e,t){if(!(e in this.queue)||!(t in this.queue[e])){return}const r=this.queue[e][t];if(this._sessionsCount{if(Array.isArray(r)){r=[...r];s()}else{r=[{resolve:s,reject:n}]}const i=this.normalizeOptions(t);const h=Agent.normalizeOrigin(e,t&&t.servername);if(h===undefined){for(const{reject:e}of r){e(new TypeError("The `origin` argument needs to be a string or an URL object"))}return}if(i in this.sessions){const e=this.sessions[i];let t=-1;let s=-1;let n;for(const r of e){const e=r.remoteSettings.maxConcurrentStreams;if(e=e||r[l]||r.destroyed){continue}if(!n){t=e}if(o>s){n=r;s=o}}}if(n){if(r.length!==1){for(const{reject:e}of r){const t=new Error(`Expected the length of listeners to be 1, got ${r.length}.\n`+"Please report this to https://github.com/szmarczak/http2-wrapper/");e(t)}return}r[0].resolve(n);return}}if(i in this.queue){if(h in this.queue[i]){this.queue[i][h].listeners.push(...r);this._tryToCreateNewSession(i,h);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][h]===entry){delete this.queue[i][h];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${h}:${i}`;let n=false;try{const d=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});d[a]=0;d[l]=false;const isFree=()=>d[a]{this.tlsSessionCache.set(s,e)}));d.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));d.setTimeout(this.timeout,(()=>{d.destroy()}));d.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(d),1);if(e.length===0){delete this.sessions[i]}}else{const e=new Error("Session closed without receiving a SETTINGS frame");e.code="HTTP2WRAPPER_NOSETTINGS";for(const{reject:t}of r){t(e)}removeFromQueue()}this._tryToCreateNewSession(i,h)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of d[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(d)}const r=this.queue[i];if(r[e].listeners.length===0){delete r[e];if(Object.keys(r).length===0){delete this.queue[i];break}}if(!isFree()){break}}}};d.on("origin",(()=>{d[u]=d.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],d)}));d.once("remoteSettings",(()=>{d.ref();d.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}d.destroy();return}d[u]=d.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,d,compareSessions),0,d)}else{e[i]=[d]}}this._freeSessionsCount+=1;n=true;this.emit("session",d);processListeners();removeFromQueue();if(d[a]===0&&this._freeSessionsCount>this.maxFreeSessions){d.close()}if(r.length!==0){this.getSession(h,t,r);r.length=0}d.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],d)}))}));d[c]=d.request;d.request=(e,t)=>{if(d[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=d[c](e,t);d.ref();++d[a];if(d[a]===d.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--d[a];if(!d.destroyed&&!d.closed){closeSessionIfCovered(this.sessions[i],d);if(isFree()&&!d.closed){if(!p){this._freeSessionsCount++;p=true}const e=d[a]===0;if(e){d.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||d[l])){d.close()}else{closeCoveredSessions(this.sessions[i],d);processListeners()}}}}));return r}}catch(e){for(const t of r){t.reject(e)}removeFromQueue()}};entry.listeners=r;entry.completed=false;entry.destroyed=false;this.queue[i][h]=entry;this._tryToCreateNewSession(i,h)}))}request(e,t,r,s){return new Promise(((n,o)=>{this.getSession(e,t,[{reject:o,resolve:e=>{try{n(e.request(r,s))}catch(e){o(e)}}}])}))}createConnection(e,t){return Agent.connect(e,t)}static connect(e,t){t.ALPNProtocols=["h2"];const r=e.port||443;const s=e.hostname||e.host;if(typeof t.servername==="undefined"){t.servername=s}return n.connect(r,s,t)}closeFreeSessions(){for(const e of Object.values(this.sessions)){for(const t of e){if(t[a]===0){t.close()}}}}destroy(e){for(const t of Object.values(this.sessions)){for(const r of t){r.destroy(e)}}for(const e of Object.values(this.queue)){for(const t of Object.values(e)){t.destroyed=true}}this.queue={}}get freeSessions(){return getSessions({agent:this,isFree:true})}get busySessions(){return getSessions({agent:this,isFree:false})}}Agent.kCurrentStreamsCount=a;Agent.kGracefullyClosing=l;e.exports={Agent:Agent,globalAgent:new Agent}},7167:(e,t,r)=>{"use strict";const s=r(3685);const n=r(5687);const o=r(6624);const i=r(9273);const a=r(9632);const c=r(1982);const u=r(2686);const l=new i({maxSize:100});const h=new Map;const installSocket=(e,t,r)=>{t._httpMessage={shouldKeepAlive:true};const onFree=()=>{e.emit("free",t,r)};t.on("free",onFree);const onClose=()=>{e.removeSocket(t,r)};t.on("close",onClose);const onRemove=()=>{e.removeSocket(t,r);t.off("close",onClose);t.off("free",onFree);t.off("agentRemove",onRemove)};t.on("agentRemove",onRemove);e.emit("free",t,r)};const resolveProtocol=async e=>{const t=`${e.host}:${e.port}:${e.ALPNProtocols.sort()}`;if(!l.has(t)){if(h.has(t)){const e=await h.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);h.set(t,i);try{const{socket:o,alpnProtocol:a}=await i;l.set(t,a);e.path=r;if(a==="h2"){o.destroy()}else{const{globalAgent:t}=n;const r=n.Agent.prototype.createConnection;if(s){if(s.createConnection===r){installSocket(s,o,e)}else{o.destroy()}}else if(t.createConnection===r){installSocket(t,o,e)}else{o.destroy()}}h.delete(t);return a}catch(e){h.delete(t);throw e}}return l.get(t)};e.exports=async(e,t,r)=>{if(typeof e==="string"||e instanceof URL){e=u(new URL(e))}if(typeof t==="function"){r=t;t=undefined}t={ALPNProtocols:["h2","http/1.1"],...e,...t,resolveSocket:true};if(!Array.isArray(t.ALPNProtocols)||t.ALPNProtocols.length===0){throw new Error("The `ALPNProtocols` option must be an Array with at least one entry")}t.protocol=t.protocol||"https:";const o=t.protocol==="https:";t.host=t.hostname||t.host||"localhost";t.session=t.tlsSession;t.servername=t.servername||c(t);t.port=t.port||(o?443:80);t._defaultAgent=o?n.globalAgent:s.globalAgent;const i=t.agent;if(i){if(i.addRequest){throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties")}t.agent=i[o?"https":"http"]}if(o){const e=await resolveProtocol(t);if(e==="h2"){if(i){t.agent=i.http2}return new a(t,r)}}return s.request(t,r)};e.exports.protocolCache=l},9632:(e,t,r)=>{"use strict";const s=r(5158);const{Writable:n}=r(2781);const{Agent:o,globalAgent:i}=r(9898);const a=r(2575);const c=r(2686);const u=r(1818);const l=r(1199);const{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_PROTOCOL:d,ERR_HTTP_HEADERS_SENT:p,ERR_INVALID_HTTP_TOKEN:m,ERR_HTTP_INVALID_HEADER_VALUE:y,ERR_INVALID_CHAR:g}=r(7087);const{HTTP2_HEADER_STATUS:v,HTTP2_HEADER_METHOD:_,HTTP2_HEADER_PATH:E,HTTP2_METHOD_CONNECT:w}=s.constants;const b=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const T=Symbol("flushedHeaders");const A=Symbol("jobs");const C=/^[\^`\-\w!#$%&*+.|~]+$/;const P=/[^\t\u0020-\u007E\u0080-\u00FF]/;class ClientRequest extends n{constructor(e,t,r){super({autoDestroy:false});const s=typeof e==="string"||e instanceof URL;if(s){e=c(e instanceof URL?e:new URL(e))}if(typeof t==="function"||t===undefined){r=t;t=s?e:{...e}}else{t={...e,...t}}if(t.h2session){this[O]=t.h2session}else if(t.agent===false){this.agent=new o({maxFreeSessions:0})}else if(typeof t.agent==="undefined"||t.agent===null){if(typeof t.createConnection==="function"){this.agent=new o({maxFreeSessions:0});this.agent.createConnection=t.createConnection}else{this.agent=i}}else if(typeof t.agent.request==="function"){this.agent=t.agent}else{throw new h("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new d(t.protocol,"https:")}const n=t.port||t.defaultPort||this.agent&&this.agent.defaultPort||443;const a=t.hostname||t.host||"localhost";delete t.hostname;delete t.host;delete t.port;const{timeout:u}=t;t.timeout=undefined;this[b]=Object.create(null);this[A]=[];this.socket=null;this.connection=null;this.method=t.method||"GET";this.path=t.path;this.res=null;this.aborted=false;this.reusedSocket=false;if(t.headers){for(const[e,r]of Object.entries(t.headers)){this.setHeader(e,r)}}if(t.auth&&!("authorization"in this[b])){this[b].authorization="Basic "+Buffer.from(t.auth).toString("base64")}t.session=t.tlsSession;t.path=t.socketPath;this[S]=t;if(n===443){this[R]=`https://${a}`;if(!(":authority"in this[b])){this[b][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[b])){this[b][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[T]=false}get method(){return this[b][_]}set method(e){if(e){this[b][_]=e.toUpperCase()}}get path(){return this[b][E]}set path(e){if(e){this[b][E]=e}}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,t,r){if(this._mustNotHaveABody){r(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();const callWrite=()=>this._request.write(e,t,r);if(this._request){callWrite()}else{this[A].push(callWrite)}}_final(e){if(this.destroyed){return}this.flushHeaders();const callEnd=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};if(this._request){callEnd()}else{this[A].push(callEnd)}}abort(){if(this.res&&this.res.complete){return}if(!this.aborted){process.nextTick((()=>this.emit("abort")))}this.aborted=true;this.destroy()}_destroy(e,t){if(this.res){this.res._dump()}if(this._request){this._request.destroy()}t(e)}async flushHeaders(){if(this[T]||this.destroyed){return}this[T]=true;const e=this.method===w;const onStream=t=>{this._request=t;if(this.destroyed){t.destroy();return}if(!e){u(t,this,["timeout","continue","close","error"])}const waitForEnd=e=>(...t)=>{if(!this.writable&&!this.destroyed){e(...t)}else{this.once("finish",(()=>{e(...t)}))}};t.once("response",waitForEnd(((r,s,n)=>{const o=new a(this.socket,t.readableHighWaterMark);this.res=o;o.req=this;o.statusCode=r[v];o.headers=r;o.rawHeaders=n;o.once("end",(()=>{if(this.aborted){o.aborted=true;o.emit("aborted")}else{o.complete=true;o.socket=null;o.connection=null}}));if(e){o.upgrade=true;if(this.emit("connect",o,t,Buffer.alloc(0))){this.emit("close")}else{t.destroy()}}else{t.on("data",(e=>{if(!o._dumped&&!o.push(e)){t.pause()}}));t.once("end",(()=>{o.push(null)}));if(!this.emit("response",o)){o._dump()}}})));t.once("headers",waitForEnd((e=>this.emit("information",{statusCode:e[v]}))));t.once("trailers",waitForEnd(((e,t,r)=>{const{res:s}=this;s.trailers=e;s.rawTrailers=r})));const{socket:r}=t.session;this.socket=r;this.connection=r;for(const e of this[A]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[b]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[b]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new h("name","string",e)}return this[b][e.toLowerCase()]}get headersSent(){return this[T]}removeHeader(e){if(typeof e!=="string"){throw new h("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[b][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!C.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(P.test(t)){throw new g("header content",e)}this[b][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[A].push(applyTimeout)}return this}get maxHeadersCount(){if(!this.destroyed&&this._request){return this._request.session.localSettings.maxHeaderListSize}return undefined}set maxHeadersCount(e){}}e.exports=ClientRequest},2575:(e,t,r)=>{"use strict";const{Readable:s}=r(2781);class IncomingMessage extends s{constructor(e,t){super({highWaterMark:t,autoDestroy:false});this.statusCode=null;this.statusMessage="";this.httpVersion="2.0";this.httpVersionMajor=2;this.httpVersionMinor=0;this.headers={};this.trailers={};this.req=null;this.aborted=false;this.complete=false;this.upgrade=null;this.rawHeaders=[];this.rawTrailers=[];this.socket=e;this.connection=e;this._dumped=false}_destroy(e){this.req._request.destroy(e)}setTimeout(e,t){this.req.setTimeout(e,t);return this}_dump(){if(!this._dumped){this._dumped=true;this.removeAllListeners("data");this.resume()}}_read(){if(this.req){this.req._request.resume()}}}e.exports=IncomingMessage},4645:(e,t,r)=>{"use strict";const s=r(5158);const n=r(9898);const o=r(9632);const i=r(2575);const a=r(7167);const request=(e,t,r)=>new o(e,t,r);const get=(e,t,r)=>{const s=new o(e,t,r);s.end();return s};e.exports={...s,ClientRequest:o,IncomingMessage:i,...n,request:request,get:get,auto:a}},1982:(e,t,r)=>{"use strict";const s=r(1808);e.exports=e=>{let t=e.host;const r=e.headers&&e.headers.host;if(r){if(r.startsWith("[")){const e=r.indexOf("]");if(e===-1){t=r}else{t=r.slice(1,-1)}}else{t=r.split(":",1)[0]}}if(s.isIP(t)){return""}return t}},7087:e=>{"use strict";const makeError=(t,r,s)=>{e.exports[r]=class NodeError extends t{constructor(...e){super(typeof s==="string"?s:s(e));this.name=`${super.name} [${r}]`;this.code=r}}};makeError(TypeError,"ERR_INVALID_ARG_TYPE",(e=>{const t=e[0].includes(".")?"property":"argument";let r=e[1];const s=Array.isArray(r);if(s){r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`}return`The "${e[0]}" ${t} must be ${s?"one of":"of"} type ${r}. Received ${typeof e[2]}`}));makeError(TypeError,"ERR_INVALID_PROTOCOL",(e=>`Protocol "${e[0]}" not supported. Expected "${e[1]}"`));makeError(Error,"ERR_HTTP_HEADERS_SENT",(e=>`Cannot ${e[0]} headers after they are sent to the client`));makeError(TypeError,"ERR_INVALID_HTTP_TOKEN",(e=>`${e[0]} must be a valid HTTP token [${e[1]}]`));makeError(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",(e=>`Invalid value "${e[0]} for header "${e[1]}"`));makeError(TypeError,"ERR_INVALID_CHAR",(e=>`Invalid character in ${e[0]} [${e[1]}]`))},1199:e=>{"use strict";e.exports=e=>{switch(e){case":method":case":scheme":case":authority":case":path":return true;default:return false}}},1818:e=>{"use strict";e.exports=(e,t,r)=>{for(const s of r){e.on(s,((...e)=>t.emit(s,...e)))}}},2686:e=>{"use strict";e.exports=e=>{const t={protocol:e.protocol,hostname:typeof e.hostname==="string"&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};if(typeof e.port==="string"&&e.port.length!==0){t.port=Number(e.port)}if(e.username||e.password){t.auth=`${e.username||""}:${e.password||""}`}return t}},2820:(e,t)=>{t.stringify=function stringify(e){if("undefined"==typeof e)return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON)e=e.toJSON();if(e&&"object"===typeof e){var t="";var r=Array.isArray(e);t=r?"[":"{";var s=true;for(var n in e){var o="function"==typeof e[n]||!r&&"undefined"===typeof e[n];if(Object.hasOwnProperty.call(e,n)&&!o){if(!s)t+=",";s=false;if(r){if(e[n]==undefined)t+="null";else t+=stringify(e[n])}else if(e[n]!==void 0){t+=stringify(n)+":"+stringify(e[n])}}}t+=r?"]":"}";return t}else if("string"===typeof e){return JSON.stringify(/^:/.test(e)?":"+e:e)}else if("undefined"===typeof e){return"null"}else return JSON.stringify(e)};t.parse=function(e){return JSON.parse(e,(function(e,t){if("string"===typeof t){if(/^:base64:/.test(t))return Buffer.from(t.substring(8),"base64");else return/^:/.test(t)?t.substring(1):t}return t}))}},1531:(e,t,r)=>{"use strict";const s=r(2361);const n=r(2820);const loadStore=e=>{const t={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql"};if(e.adapter||e.uri){const r=e.adapter||/^[^:]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};class Keyv extends s{constructor(e,t){super();this.opts=Object.assign({namespace:"keyv",serialize:n.stringify,deserialize:n.parse},typeof e==="string"?{uri:e}:e,t);if(!this.opts.store){const e=Object.assign({},this.opts);this.opts.store=loadStore(e)}if(typeof this.opts.store.on==="function"){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}get(e,t){const r=this._getKeyPrefix(e);const{store:s}=this.opts;return Promise.resolve().then((()=>s.get(r))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined){return undefined}if(typeof r.expires==="number"&&Date.now()>r.expires){this.delete(e);return undefined}return t&&t.raw?r:r.value}))}set(e,t,r){const s=this._getKeyPrefix(e);if(typeof r==="undefined"){r=this.opts.ttl}if(r===0){r=undefined}const{store:n}=this.opts;return Promise.resolve().then((()=>{const e=typeof r==="number"?Date.now()+r:null;t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((()=>r.delete(t)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}}e.exports=Keyv},9662:e=>{"use strict";e.exports=e=>{const t={};for(const[r,s]of Object.entries(e)){t[r.toLowerCase()]=s}return t}},7129:(e,t,r)=>{"use strict";const s=r(665);const n=Symbol("max");const o=Symbol("length");const i=Symbol("lengthCalculator");const a=Symbol("allowStale");const c=Symbol("maxAge");const u=Symbol("dispose");const l=Symbol("noDisposeOnSet");const h=Symbol("lruList");const d=Symbol("cache");const p=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[n]=e.max||Infinity;const r=e.length||naiveLength;this[i]=typeof r!=="function"?naiveLength:r;this[a]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0;this[u]=e.dispose;this[l]=e.noDisposeOnSet||false;this[p]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[n]=e||Infinity;trim(this)}get max(){return this[n]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[c]=e;trim(this)}get maxAge(){return this[c]}set lengthCalculator(e){if(typeof e!=="function")e=naiveLength;if(e!==this[i]){this[i]=e;this[o]=0;this[h].forEach((e=>{e.length=this[i](e.value,e.key);this[o]+=e.length}))}trim(this)}get lengthCalculator(){return this[i]}get length(){return this[o]}get itemCount(){return this[h].length}rforEach(e,t){t=t||this;for(let r=this[h].tail;r!==null;){const s=r.prev;forEachStep(this,e,r,t);r=s}}forEach(e,t){t=t||this;for(let r=this[h].head;r!==null;){const s=r.next;forEachStep(this,e,r,t);r=s}}keys(){return this[h].toArray().map((e=>e.key))}values(){return this[h].toArray().map((e=>e.value))}reset(){if(this[u]&&this[h]&&this[h].length){this[h].forEach((e=>this[u](e.key,e.value)))}this[d]=new Map;this[h]=new s;this[o]=0}dump(){return this[h].map((e=>isStale(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[h]}set(e,t,r){r=r||this[c];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const s=r?Date.now():0;const a=this[i](t,e);if(this[d].has(e)){if(a>this[n]){del(this,this[d].get(e));return false}const i=this[d].get(e);const c=i.value;if(this[u]){if(!this[l])this[u](e,c.value)}c.now=s;c.maxAge=r;c.value=t;this[o]+=a-c.length;c.length=a;this.get(e);trim(this);return true}const p=new Entry(e,t,a,s,r);if(p.length>this[n]){if(this[u])this[u](e,t);return false}this[o]+=p.length;this[h].unshift(p);this[d].set(e,this[h].head);trim(this);return true}has(e){if(!this[d].has(e))return false;const t=this[d].get(e).value;return!isStale(this,t)}get(e){return get(this,e,true)}peek(e){return get(this,e,false)}pop(){const e=this[h].tail;if(!e)return null;del(this,e);return e.value}del(e){del(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r];const n=s.e||0;if(n===0)this.set(s.k,s.v);else{const e=n-t;if(e>0){this.set(s.k,s.v,e)}}}}prune(){this[d].forEach(((e,t)=>get(this,t,false)))}}const get=(e,t,r)=>{const s=e[d].get(t);if(s){const t=s.value;if(isStale(e,t)){del(e,s);if(!e[a])return undefined}else{if(r){if(e[p])s.value.now=Date.now();e[h].unshiftNode(s)}}return t.value}};const isStale=(e,t)=>{if(!t||!t.maxAge&&!e[c])return false;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]};const trim=e=>{if(e[o]>e[n]){for(let t=e[h].tail;e[o]>e[n]&&t!==null;){const r=t.prev;del(e,t);t=r}}};const del=(e,t)=>{if(t){const r=t.value;if(e[u])e[u](r.key,r.value);e[o]-=r.length;e[d].delete(r.key);e[h].removeNode(t)}};class Entry{constructor(e,t,r,s,n){this.key=e;this.value=t;this.length=r;this.now=s;this.maxAge=n||0}}const forEachStep=(e,t,r,s)=>{let n=r.value;if(isStale(e,n)){del(e,r);if(!e[a])n=undefined}if(n)t.call(s,n.value,n.key,e)};e.exports=LRUCache},2610:e=>{"use strict";const t=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];e.exports=(e,r)=>{const s=new Set(Object.keys(e).concat(t));for(const t of s){if(t in r){continue}r[t]=typeof e[t]==="function"?e[t].bind(e):e[t]}}},7952:e=>{"use strict";const t="text/plain";const r="us-ascii";const testParameter=(e,t)=>t.some((t=>t instanceof RegExp?t.test(e):t===e));const normalizeDataURL=(e,{stripHash:s})=>{const n=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(e);if(!n){throw new Error(`Invalid URL: ${e}`)}let{type:o,data:i,hash:a}=n.groups;const c=o.split(";");a=s?"":a;let u=false;if(c[c.length-1]==="base64"){c.pop();u=true}const l=(c.shift()||"").toLowerCase();const h=c.map((e=>{let[t,s=""]=e.split("=").map((e=>e.trim()));if(t==="charset"){s=s.toLowerCase();if(s===r){return""}}return`${t}${s?`=${s}`:""}`})).filter(Boolean);const d=[...h];if(u){d.push("base64")}if(d.length!==0||l&&l!==t){d.unshift(l)}return`data:${d.join(";")},${u?i.trim():i}${a?`#${a}`:""}`};const normalizeUrl=(e,t)=>{t={defaultProtocol:"http:",normalizeProtocol:true,forceHttp:false,forceHttps:false,stripAuthentication:true,stripHash:false,stripTextFragment:true,stripWWW:true,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:true,removeSingleSlash:true,removeDirectoryIndex:false,sortQueryParameters:true,...t};e=e.trim();if(/^data:/i.test(e)){return normalizeDataURL(e,t)}if(/^view-source:/i.test(e)){throw new Error("`view-source:` is not supported as it is a non-standard protocol")}const r=e.startsWith("//");const s=!r&&/^\.*\//.test(e);if(!s){e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol)}const n=new URL(e);if(t.forceHttp&&t.forceHttps){throw new Error("The `forceHttp` and `forceHttps` options cannot be used together")}if(t.forceHttp&&n.protocol==="https:"){n.protocol="http:"}if(t.forceHttps&&n.protocol==="http:"){n.protocol="https:"}if(t.stripAuthentication){n.username="";n.password=""}if(t.stripHash){n.hash=""}else if(t.stripTextFragment){n.hash=n.hash.replace(/#?:~:text.*?$/i,"")}if(n.pathname){n.pathname=n.pathname.replace(/(?0){let e=n.pathname.split("/");const r=e[e.length-1];if(testParameter(r,t.removeDirectoryIndex)){e=e.slice(0,e.length-1);n.pathname=e.slice(1).join("/")+"/"}}if(n.hostname){n.hostname=n.hostname.replace(/\.$/,"");if(t.stripWWW&&/^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(n.hostname)){n.hostname=n.hostname.replace(/^www\./,"")}}if(Array.isArray(t.removeQueryParameters)){for(const e of[...n.searchParams.keys()]){if(testParameter(e,t.removeQueryParameters)){n.searchParams.delete(e)}}}if(t.removeQueryParameters===true){n.search=""}if(t.sortQueryParameters){n.searchParams.sort()}if(t.removeTrailingSlash){n.pathname=n.pathname.replace(/\/$/,"")}const o=e;e=n.toString();if(!t.removeSingleSlash&&n.pathname==="/"&&!o.endsWith("/")&&n.hash===""){e=e.replace(/\/$/,"")}if((t.removeTrailingSlash||n.pathname==="/")&&n.hash===""&&t.removeSingleSlash){e=e.replace(/\/$/,"")}if(r&&!t.normalizeProtocol){e=e.replace(/^http:\/\//,"//")}if(t.stripProtocol){e=e.replace(/^(?:https?:)?\/\//,"")}return e};e.exports=normalizeUrl},1223:(e,t,r)=>{var s=r(2940);e.exports=s(once);e.exports.strict=s(onceStrict);once.proto=once((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})}));function once(e){var f=function(){if(f.called)return f.value;f.called=true;return f.value=e.apply(this,arguments)};f.called=false;return f}function onceStrict(e){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=e.apply(this,arguments)};var t=e.name||"Function wrapped with `once`";f.onceError=t+" shouldn't be called more than once";f.called=false;return f}},9072:e=>{"use strict";class CancelError extends Error{constructor(e){super(e||"Promise was canceled");this.name="CancelError"}get isCanceled(){return true}}class PCancelable{static fn(e){return(...t)=>new PCancelable(((r,s,n)=>{t.push(n);e(...t).then(r,s)}))}constructor(e){this._cancelHandlers=[];this._isPending=true;this._isCanceled=false;this._rejectOnCancel=true;this._promise=new Promise(((t,r)=>{this._reject=r;const onResolve=e=>{if(!this._isCanceled||!onCancel.shouldReject){this._isPending=false;t(e)}};const onReject=e=>{this._isPending=false;r(e)};const onCancel=e=>{if(!this._isPending){throw new Error("The `onCancel` handler was attached after the promise settled.")}this._cancelHandlers.push(e)};Object.defineProperties(onCancel,{shouldReject:{get:()=>this._rejectOnCancel,set:e=>{this._rejectOnCancel=e}}});return e(onResolve,onReject,onCancel)}))}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!this._isPending||this._isCanceled){return}this._isCanceled=true;if(this._cancelHandlers.length>0){try{for(const e of this._cancelHandlers){e()}}catch(e){this._reject(e);return}}if(this._rejectOnCancel){this._reject(new CancelError(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(PCancelable.prototype,Promise.prototype);e.exports=PCancelable;e.exports.CancelError=CancelError},8341:(e,t,r)=>{var s=r(1223);var n=r(1205);var o=r(7147);var noop=function(){};var i=/^v?\.0/.test(process.version);var isFn=function(e){return typeof e==="function"};var isFS=function(e){if(!i)return false;if(!o)return false;return(e instanceof(o.ReadStream||noop)||e instanceof(o.WriteStream||noop))&&isFn(e.close)};var isRequest=function(e){return e.setHeader&&isFn(e.abort)};var destroyer=function(e,t,r,o){o=s(o);var i=false;e.on("close",(function(){i=true}));n(e,{readable:t,writable:r},(function(e){if(e)return o(e);i=true;o()}));var a=false;return function(t){if(i)return;if(a)return;a=true;if(isFS(e))return e.close(noop);if(isRequest(e))return e.abort();if(isFn(e.destroy))return e.destroy();o(t||new Error("stream was destroyed"))}};var call=function(e){e()};var pipe=function(e,t){return e.pipe(t)};var pump=function(){var e=Array.prototype.slice.call(arguments);var t=isFn(e[e.length-1]||noop)&&e.pop()||noop;if(Array.isArray(e[0]))e=e[0];if(e.length<2)throw new Error("pump requires two streams per minimum");var r;var s=e.map((function(n,o){var i=o0;return destroyer(n,i,a,(function(e){if(!r)r=e;if(e)s.forEach(call);if(i)return;s.forEach(call);t(r)}))}));return e.reduce(pipe)};e.exports=pump},9273:e=>{"use strict";class QuickLRU{constructor(e={}){if(!(e.maxSize&&e.maxSize>0)){throw new TypeError("`maxSize` must be a number greater than 0")}this.maxSize=e.maxSize;this.onEviction=e.onEviction;this.cache=new Map;this.oldCache=new Map;this._size=0}_set(e,t){this.cache.set(e,t);this._size++;if(this._size>=this.maxSize){this._size=0;if(typeof this.onEviction==="function"){for(const[e,t]of this.oldCache.entries()){this.onEviction(e,t)}}this.oldCache=this.cache;this.cache=new Map}}get(e){if(this.cache.has(e)){return this.cache.get(e)}if(this.oldCache.has(e)){const t=this.oldCache.get(e);this.oldCache.delete(e);this._set(e,t);return t}}set(e,t){if(this.cache.has(e)){this.cache.set(e,t)}else{this._set(e,t)}return this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e)){return this.cache.get(e)}if(this.oldCache.has(e)){return this.oldCache.get(e)}}delete(e){const t=this.cache.delete(e);if(t){this._size--}return this.oldCache.delete(e)||t}clear(){this.cache.clear();this.oldCache.clear();this._size=0}*keys(){for(const[e]of this){yield e}}*values(){for(const[,e]of this){yield e}}*[Symbol.iterator](){for(const e of this.cache){yield e}for(const e of this.oldCache){const[t]=e;if(!this.cache.has(t)){yield e}}}get size(){let e=0;for(const t of this.oldCache.keys()){if(!this.cache.has(t)){e++}}return Math.min(this._size+e,this.maxSize)}}e.exports=QuickLRU},6624:(e,t,r)=>{"use strict";const s=r(4404);e.exports=(e={},t=s.connect)=>new Promise(((r,s)=>{let n=false;let o;const callback=async()=>{await i;o.off("timeout",onTimeout);o.off("error",s);if(e.resolveSocket){r({alpnProtocol:o.alpnProtocol,socket:o,timeout:n});if(n){await Promise.resolve();o.emit("timeout")}}else{o.destroy();r({alpnProtocol:o.alpnProtocol,timeout:n})}};const onTimeout=async()=>{n=true;callback()};const i=(async()=>{try{o=await t(e,callback);o.on("error",s);o.once("timeout",onTimeout)}catch(e){s(e)}})()}))},9004:(e,t,r)=>{"use strict";const s=r(2781).Readable;const n=r(9662);class Response extends s{constructor(e,t,r,s){if(typeof e!=="number"){throw new TypeError("Argument `statusCode` should be a number")}if(typeof t!=="object"){throw new TypeError("Argument `headers` should be an object")}if(!(r instanceof Buffer)){throw new TypeError("Argument `body` should be a buffer")}if(typeof s!=="string"){throw new TypeError("Argument `url` should be a string")}super();this.statusCode=e;this.headers=n(t);this.body=r;this.url=s}_read(){this.push(this.body);this.push(null)}}e.exports=Response},1532:(e,t,r)=>{const s=Symbol("SemVer ANY");class Comparator{static get ANY(){return s}constructor(e,t){t=n(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}e=e.trim().split(/\s+/).join(" ");c("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===s){this.value=""}else{this.value=this.operator+this.semver.version}c("comp",this)}parse(e){const t=this.options.loose?o[i.COMPARATORLOOSE]:o[i.COMPARATOR];const r=e.match(t);if(!r){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=s}else{this.semver=new u(r[2],this.options.loose)}}toString(){return this.value}test(e){c("Comparator.test",e,this.options.loose);if(this.semver===s||e===s){return true}if(typeof e==="string"){try{e=new u(e,this.options)}catch(e){return false}}return a(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new l(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new l(this.value,t).test(e.semver)}t=n(t);if(t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")){return false}if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&e.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&e.operator.startsWith("<")){return true}if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")){return true}if(a(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")){return true}if(a(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")){return true}return false}}e.exports=Comparator;const n=r(785);const{safeRe:o,t:i}=r(2566);const a=r(5098);const c=r(427);const u=r(8088);const l=r(9828)},9828:(e,t,r)=>{class Range{constructor(e,t){t=o(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof i){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e.trim().split(/\s+/).join(" ");this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter((e=>!isNullSet(e[0])));if(this.set.length===0){this.set=[e]}else if(this.set.length>1){for(const e of this.set){if(e.length===1&&isAny(e[0])){this.set=[e];break}}}}this.format()}format(){this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(e){const t=(this.options.includePrerelease&&m)|(this.options.loose&&y);const r=t+":"+e;const s=n.get(r);if(s){return s}const o=this.options.loose;const c=o?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(c,hyphenReplace(this.options.includePrerelease));a("hyphen replace",e);e=e.replace(u[l.COMPARATORTRIM],h);a("comparator trim",e);e=e.replace(u[l.TILDETRIM],d);a("tilde trim",e);e=e.replace(u[l.CARETTRIM],p);a("caret trim",e);let g=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));if(o){g=g.filter((e=>{a("loose invalid filter",e,this.options);return!!e.match(u[l.COMPARATORLOOSE])}))}a("range list",g);const v=new Map;const _=g.map((e=>new i(e,this.options)));for(const e of _){if(isNullSet(e)){return[e]}v.set(e.value,e)}if(v.size>1&&v.has("")){v.delete("")}const E=[...v.values()];n.set(r,E);return E}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e){return false}if(typeof e==="string"){try{e=new c(e,this.options)}catch(e){return false}}for(let t=0;te.value==="<0.0.0-0";const isAny=e=>e.value==="";const isSatisfiable=(e,t)=>{let r=true;const s=e.slice();let n=s.pop();while(r&&s.length){r=s.every((e=>n.intersects(e,t)));n=s.pop()}return r};const parseComparator=(e,t)=>{a("comp",e,t);e=replaceCarets(e,t);a("caret",e);e=replaceTildes(e,t);a("tildes",e);e=replaceXRanges(e,t);a("xrange",e);e=replaceStars(e,t);a("stars",e);return e};const isX=e=>!e||e.toLowerCase()==="x"||e==="*";const replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" ");const replaceTilde=(e,t)=>{const r=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(r,((t,r,s,n,o)=>{a("tilde",e,t,r,s,n,o);let i;if(isX(r)){i=""}else if(isX(s)){i=`>=${r}.0.0 <${+r+1}.0.0-0`}else if(isX(n)){i=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`}else if(o){a("replaceTilde pr",o);i=`>=${r}.${s}.${n}-${o} <${r}.${+s+1}.0-0`}else{i=`>=${r}.${s}.${n} <${r}.${+s+1}.0-0`}a("tilde return",i);return i}))};const replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" ");const replaceCaret=(e,t)=>{a("caret",e,t);const r=t.loose?u[l.CARETLOOSE]:u[l.CARET];const s=t.includePrerelease?"-0":"";return e.replace(r,((t,r,n,o,i)=>{a("caret",e,t,r,n,o,i);let c;if(isX(r)){c=""}else if(isX(n)){c=`>=${r}.0.0${s} <${+r+1}.0.0-0`}else if(isX(o)){if(r==="0"){c=`>=${r}.${n}.0${s} <${r}.${+n+1}.0-0`}else{c=`>=${r}.${n}.0${s} <${+r+1}.0.0-0`}}else if(i){a("replaceCaret pr",i);if(r==="0"){if(n==="0"){c=`>=${r}.${n}.${o}-${i} <${r}.${n}.${+o+1}-0`}else{c=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`}}else{c=`>=${r}.${n}.${o}-${i} <${+r+1}.0.0-0`}}else{a("no pr");if(r==="0"){if(n==="0"){c=`>=${r}.${n}.${o}${s} <${r}.${n}.${+o+1}-0`}else{c=`>=${r}.${n}.${o}${s} <${r}.${+n+1}.0-0`}}else{c=`>=${r}.${n}.${o} <${+r+1}.0.0-0`}}a("caret return",c);return c}))};const replaceXRanges=(e,t)=>{a("replaceXRanges",e,t);return e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")};const replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(r,((r,s,n,o,i,c)=>{a("xRange",e,r,s,n,o,i,c);const u=isX(n);const l=u||isX(o);const h=l||isX(i);const d=h;if(s==="="&&d){s=""}c=t.includePrerelease?"-0":"";if(u){if(s===">"||s==="<"){r="<0.0.0-0"}else{r="*"}}else if(s&&d){if(l){o=0}i=0;if(s===">"){s=">=";if(l){n=+n+1;o=0;i=0}else{o=+o+1;i=0}}else if(s==="<="){s="<";if(l){n=+n+1}else{o=+o+1}}if(s==="<"){c="-0"}r=`${s+n}.${o}.${i}${c}`}else if(l){r=`>=${n}.0.0${c} <${+n+1}.0.0-0`}else if(h){r=`>=${n}.${o}.0${c} <${n}.${+o+1}.0-0`}a("xRange return",r);return r}))};const replaceStars=(e,t)=>{a("replaceStars",e,t);return e.trim().replace(u[l.STAR],"")};const replaceGTE0=(e,t)=>{a("replaceGTE0",e,t);return e.trim().replace(u[t.includePrerelease?l.GTE0PRE:l.GTE0],"")};const hyphenReplace=e=>(t,r,s,n,o,i,a,c,u,l,h,d,p)=>{if(isX(s)){r=""}else if(isX(n)){r=`>=${s}.0.0${e?"-0":""}`}else if(isX(o)){r=`>=${s}.${n}.0${e?"-0":""}`}else if(i){r=`>=${r}`}else{r=`>=${r}${e?"-0":""}`}if(isX(u)){c=""}else if(isX(l)){c=`<${+u+1}.0.0-0`}else if(isX(h)){c=`<${u}.${+l+1}.0-0`}else if(d){c=`<=${u}.${l}.${h}-${d}`}else if(e){c=`<${u}.${l}.${+h+1}-0`}else{c=`<=${c}`}return`${r} ${c}`.trim()};const testSet=(e,t,r)=>{for(let r=0;r0){const s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch){return true}}}return false}return true}},8088:(e,t,r)=>{const s=r(427);const{MAX_LENGTH:n,MAX_SAFE_INTEGER:o}=r(2293);const{safeRe:i,t:a}=r(2566);const c=r(785);const{compareIdentifiers:u}=r(2463);class SemVer{constructor(e,t){t=c(t);if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`)}if(e.length>n){throw new TypeError(`version is longer than ${n} characters`)}s("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[a.LOOSE]:i[a.FULL]);if(!r){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+r[1];this.minor=+r[2];this.patch=+r[3];if(this.major>o||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>o||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>o||this.patch<0){throw new TypeError("Invalid patch version")}if(!r[4]){this.prerelease=[]}else{this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0){if(typeof this.prerelease[s]==="number"){this.prerelease[s]++;s=-2}}if(s===-1){if(t===this.prerelease.join(".")&&r===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(e)}}if(t){let s=[t,e];if(r===false){s=[t]}if(u(this.prerelease[0],t)===0){if(isNaN(this.prerelease[1])){this.prerelease=s}}else{this.prerelease=s}}break}default:throw new Error(`invalid increment argument: ${e}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}e.exports=SemVer},8848:(e,t,r)=>{const s=r(5925);const clean=(e,t)=>{const r=s(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};e.exports=clean},5098:(e,t,r)=>{const s=r(1898);const n=r(6017);const o=r(4123);const i=r(5522);const a=r(194);const c=r(7520);const cmp=(e,t,r,u)=>{switch(t){case"===":if(typeof e==="object"){e=e.version}if(typeof r==="object"){r=r.version}return e===r;case"!==":if(typeof e==="object"){e=e.version}if(typeof r==="object"){r=r.version}return e!==r;case"":case"=":case"==":return s(e,r,u);case"!=":return n(e,r,u);case">":return o(e,r,u);case">=":return i(e,r,u);case"<":return a(e,r,u);case"<=":return c(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=cmp},3466:(e,t,r)=>{const s=r(8088);const n=r(5925);const{safeRe:o,t:i}=r(2566);const coerce=(e,t)=>{if(e instanceof s){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let r=null;if(!t.rtl){r=e.match(o[i.COERCE])}else{let t;while((t=o[i.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||t.index+t[0].length!==r.index+r[0].length){r=t}o[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length}o[i.COERCERTL].lastIndex=-1}if(r===null){return null}return n(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};e.exports=coerce},2156:(e,t,r)=>{const s=r(8088);const compareBuild=(e,t,r)=>{const n=new s(e,r);const o=new s(t,r);return n.compare(o)||n.compareBuild(o)};e.exports=compareBuild},2804:(e,t,r)=>{const s=r(4309);const compareLoose=(e,t)=>s(e,t,true);e.exports=compareLoose},4309:(e,t,r)=>{const s=r(8088);const compare=(e,t,r)=>new s(e,r).compare(new s(t,r));e.exports=compare},4297:(e,t,r)=>{const s=r(5925);const diff=(e,t)=>{const r=s(e,null,true);const n=s(t,null,true);const o=r.compare(n);if(o===0){return null}const i=o>0;const a=i?r:n;const c=i?n:r;const u=!!a.prerelease.length;const l=!!c.prerelease.length;if(l&&!u){if(!c.patch&&!c.minor){return"major"}if(a.patch){return"patch"}if(a.minor){return"minor"}return"major"}const h=u?"pre":"";if(r.major!==n.major){return h+"major"}if(r.minor!==n.minor){return h+"minor"}if(r.patch!==n.patch){return h+"patch"}return"prerelease"};e.exports=diff},1898:(e,t,r)=>{const s=r(4309);const eq=(e,t,r)=>s(e,t,r)===0;e.exports=eq},4123:(e,t,r)=>{const s=r(4309);const gt=(e,t,r)=>s(e,t,r)>0;e.exports=gt},5522:(e,t,r)=>{const s=r(4309);const gte=(e,t,r)=>s(e,t,r)>=0;e.exports=gte},900:(e,t,r)=>{const s=r(8088);const inc=(e,t,r,n,o)=>{if(typeof r==="string"){o=n;n=r;r=undefined}try{return new s(e instanceof s?e.version:e,r).inc(t,n,o).version}catch(e){return null}};e.exports=inc},194:(e,t,r)=>{const s=r(4309);const lt=(e,t,r)=>s(e,t,r)<0;e.exports=lt},7520:(e,t,r)=>{const s=r(4309);const lte=(e,t,r)=>s(e,t,r)<=0;e.exports=lte},6688:(e,t,r)=>{const s=r(8088);const major=(e,t)=>new s(e,t).major;e.exports=major},8447:(e,t,r)=>{const s=r(8088);const minor=(e,t)=>new s(e,t).minor;e.exports=minor},6017:(e,t,r)=>{const s=r(4309);const neq=(e,t,r)=>s(e,t,r)!==0;e.exports=neq},5925:(e,t,r)=>{const s=r(8088);const parse=(e,t,r=false)=>{if(e instanceof s){return e}try{return new s(e,t)}catch(e){if(!r){return null}throw e}};e.exports=parse},2866:(e,t,r)=>{const s=r(8088);const patch=(e,t)=>new s(e,t).patch;e.exports=patch},4016:(e,t,r)=>{const s=r(5925);const prerelease=(e,t)=>{const r=s(e,t);return r&&r.prerelease.length?r.prerelease:null};e.exports=prerelease},6417:(e,t,r)=>{const s=r(4309);const rcompare=(e,t,r)=>s(t,e,r);e.exports=rcompare},8701:(e,t,r)=>{const s=r(2156);const rsort=(e,t)=>e.sort(((e,r)=>s(r,e,t)));e.exports=rsort},6055:(e,t,r)=>{const s=r(9828);const satisfies=(e,t,r)=>{try{t=new s(t,r)}catch(e){return false}return t.test(e)};e.exports=satisfies},1426:(e,t,r)=>{const s=r(2156);const sort=(e,t)=>e.sort(((e,r)=>s(e,r,t)));e.exports=sort},9601:(e,t,r)=>{const s=r(5925);const valid=(e,t)=>{const r=s(e,t);return r?r.version:null};e.exports=valid},1383:(e,t,r)=>{const s=r(2566);const n=r(2293);const o=r(8088);const i=r(2463);const a=r(5925);const c=r(9601);const u=r(8848);const l=r(900);const h=r(4297);const d=r(6688);const p=r(8447);const m=r(2866);const y=r(4016);const g=r(4309);const v=r(6417);const _=r(2804);const E=r(2156);const w=r(1426);const b=r(8701);const R=r(4123);const O=r(194);const S=r(1898);const T=r(6017);const A=r(5522);const C=r(7520);const P=r(5098);const k=r(3466);const x=r(1532);const I=r(9828);const $=r(6055);const j=r(2706);const L=r(579);const N=r(832);const q=r(4179);const U=r(2098);const D=r(420);const H=r(9380);const M=r(3323);const F=r(7008);const B=r(5297);const G=r(7863);e.exports={parse:a,valid:c,clean:u,inc:l,diff:h,major:d,minor:p,patch:m,prerelease:y,compare:g,rcompare:v,compareLoose:_,compareBuild:E,sort:w,rsort:b,gt:R,lt:O,eq:S,neq:T,gte:A,lte:C,cmp:P,coerce:k,Comparator:x,Range:I,satisfies:$,toComparators:j,maxSatisfying:L,minSatisfying:N,minVersion:q,validRange:U,outside:D,gtr:H,ltr:M,intersects:F,simplifyRange:B,subset:G,SemVer:o,re:s.re,src:s.src,tokens:s.t,SEMVER_SPEC_VERSION:n.SEMVER_SPEC_VERSION,RELEASE_TYPES:n.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}},2293:e=>{const t="2.0.0";const r=256;const s=Number.MAX_SAFE_INTEGER||9007199254740991;const n=16;const o=r-6;const i=["major","premajor","minor","preminor","patch","prepatch","prerelease"];e.exports={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_SAFE_INTEGER:s,RELEASE_TYPES:i,SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},427:e=>{const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},2463:e=>{const t=/^[0-9]+$/;const compareIdentifiers=(e,r)=>{const s=t.test(e);const n=t.test(r);if(s&&n){e=+e;r=+r}return e===r?0:s&&!n?-1:n&&!s?1:ecompareIdentifiers(t,e);e.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},785:e=>{const t=Object.freeze({loose:true});const r=Object.freeze({});const parseOptions=e=>{if(!e){return r}if(typeof e!=="object"){return t}return e};e.exports=parseOptions},2566:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:o}=r(2293);const i=r(427);t=e.exports={};const a=t.re=[];const c=t.safeRe=[];const u=t.src=[];const l=t.t={};let h=0;const d="[a-zA-Z0-9-]";const p=[["\\s",1],["\\d",o],[d,n]];const makeSafeRegex=e=>{for(const[t,r]of p){e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`)}return e};const createToken=(e,t,r)=>{const s=makeSafeRegex(t);const n=h++;i(e,n,t);l[e]=n;u[n]=t;a[n]=new RegExp(t,r?"g":undefined);c[n]=new RegExp(s,r?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`);createToken("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.`+`(${u[l.NUMERICIDENTIFIER]})\\.`+`(${u[l.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.`+`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.`+`(${u[l.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${u[l.NUMERICIDENTIFIER]}|${u[l.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NUMERICIDENTIFIERLOOSE]}|${u[l.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${d}+`);createToken("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`);createToken("FULL",`^${u[l.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`);createToken("LOOSE",`^${u[l.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})`+`(?:\\.(${u[l.XRANGEIDENTIFIER]})`+`(?:\\.(${u[l.XRANGEIDENTIFIER]})`+`(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})`+`(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`);createToken("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${s}})`+`(?:\\.(\\d{1,${s}}))?`+`(?:\\.(\\d{1,${s}}))?`+`(?:$|[^\\d])`);createToken("COERCERTL",u[l.COERCE],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";createToken("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${u[l.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";createToken("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${u[l.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${u[l.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},9380:(e,t,r)=>{const s=r(420);const gtr=(e,t,r)=>s(e,t,">",r);e.exports=gtr},7008:(e,t,r)=>{const s=r(9828);const intersects=(e,t,r)=>{e=new s(e,r);t=new s(t,r);return e.intersects(t,r)};e.exports=intersects},3323:(e,t,r)=>{const s=r(420);const ltr=(e,t,r)=>s(e,t,"<",r);e.exports=ltr},579:(e,t,r)=>{const s=r(8088);const n=r(9828);const maxSatisfying=(e,t,r)=>{let o=null;let i=null;let a=null;try{a=new n(t,r)}catch(e){return null}e.forEach((e=>{if(a.test(e)){if(!o||i.compare(e)===-1){o=e;i=new s(o,r)}}}));return o};e.exports=maxSatisfying},832:(e,t,r)=>{const s=r(8088);const n=r(9828);const minSatisfying=(e,t,r)=>{let o=null;let i=null;let a=null;try{a=new n(t,r)}catch(e){return null}e.forEach((e=>{if(a.test(e)){if(!o||i.compare(e)===1){o=e;i=new s(o,r)}}}));return o};e.exports=minSatisfying},4179:(e,t,r)=>{const s=r(8088);const n=r(9828);const o=r(4123);const minVersion=(e,t)=>{e=new n(e,t);let r=new s("0.0.0");if(e.test(r)){return r}r=new s("0.0.0-0");if(e.test(r)){return r}r=null;for(let t=0;t{const t=new s(e.semver.version);switch(e.operator){case">":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!i||o(t,i)){i=t}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}));if(i&&(!r||o(r,i))){r=i}}if(r&&e.test(r)){return r}return null};e.exports=minVersion},420:(e,t,r)=>{const s=r(8088);const n=r(1532);const{ANY:o}=n;const i=r(9828);const a=r(6055);const c=r(4123);const u=r(194);const l=r(7520);const h=r(5522);const outside=(e,t,r,d)=>{e=new s(e,d);t=new i(t,d);let p,m,y,g,v;switch(r){case">":p=c;m=l;y=u;g=">";v=">=";break;case"<":p=u;m=h;y=c;g="<";v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,d)){return false}for(let r=0;r{if(e.semver===o){e=new n(">=0.0.0")}i=i||e;a=a||e;if(p(e.semver,i.semver,d)){i=e}else if(y(e.semver,a.semver,d)){a=e}}));if(i.operator===g||i.operator===v){return false}if((!a.operator||a.operator===g)&&m(e,a.semver)){return false}else if(a.operator===v&&y(e,a.semver)){return false}}return true};e.exports=outside},5297:(e,t,r)=>{const s=r(6055);const n=r(4309);e.exports=(e,t,r)=>{const o=[];let i=null;let a=null;const c=e.sort(((e,t)=>n(e,t,r)));for(const e of c){const n=s(e,t,r);if(n){a=e;if(!i){i=e}}else{if(a){o.push([i,a])}a=null;i=null}}if(i){o.push([i,null])}const u=[];for(const[e,t]of o){if(e===t){u.push(e)}else if(!t&&e===c[0]){u.push("*")}else if(!t){u.push(`>=${e}`)}else if(e===c[0]){u.push(`<=${t}`)}else{u.push(`${e} - ${t}`)}}const l=u.join(" || ");const h=typeof t.raw==="string"?t.raw:String(t);return l.length{const s=r(9828);const n=r(1532);const{ANY:o}=n;const i=r(6055);const a=r(4309);const subset=(e,t,r={})=>{if(e===t){return true}e=new s(e,r);t=new s(t,r);let n=false;e:for(const s of e.set){for(const e of t.set){const t=simpleSubset(s,e,r);n=n||t!==null;if(t){continue e}}if(n){return false}}return true};const c=[new n(">=0.0.0-0")];const u=[new n(">=0.0.0")];const simpleSubset=(e,t,r)=>{if(e===t){return true}if(e.length===1&&e[0].semver===o){if(t.length===1&&t[0].semver===o){return true}else if(r.includePrerelease){e=c}else{e=u}}if(t.length===1&&t[0].semver===o){if(r.includePrerelease){return true}else{t=u}}const s=new Set;let n,l;for(const t of e){if(t.operator===">"||t.operator===">="){n=higherGT(n,t,r)}else if(t.operator==="<"||t.operator==="<="){l=lowerLT(l,t,r)}else{s.add(t.semver)}}if(s.size>1){return null}let h;if(n&&l){h=a(n.semver,l.semver,r);if(h>0){return null}else if(h===0&&(n.operator!==">="||l.operator!=="<=")){return null}}for(const e of s){if(n&&!i(e,String(n),r)){return null}if(l&&!i(e,String(l),r)){return null}for(const s of t){if(!i(e,String(s),r)){return false}}return true}let d,p;let m,y;let g=l&&!r.includePrerelease&&l.semver.prerelease.length?l.semver:false;let v=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:false;if(g&&g.prerelease.length===1&&l.operator==="<"&&g.prerelease[0]===0){g=false}for(const e of t){y=y||e.operator===">"||e.operator===">=";m=m||e.operator==="<"||e.operator==="<=";if(n){if(v){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch){v=false}}if(e.operator===">"||e.operator===">="){d=higherGT(n,e,r);if(d===e&&d!==n){return false}}else if(n.operator===">="&&!i(n.semver,String(e),r)){return false}}if(l){if(g){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===g.major&&e.semver.minor===g.minor&&e.semver.patch===g.patch){g=false}}if(e.operator==="<"||e.operator==="<="){p=lowerLT(l,e,r);if(p===e&&p!==l){return false}}else if(l.operator==="<="&&!i(l.semver,String(e),r)){return false}}if(!e.operator&&(l||n)&&h!==0){return false}}if(n&&m&&!l&&h!==0){return false}if(l&&y&&!n&&h!==0){return false}if(v||g){return false}return true};const higherGT=(e,t,r)=>{if(!e){return t}const s=a(e.semver,t.semver,r);return s>0?e:s<0?t:t.operator===">"&&e.operator===">="?t:e};const lowerLT=(e,t,r)=>{if(!e){return t}const s=a(e.semver,t.semver,r);return s<0?e:s>0?t:t.operator==="<"&&e.operator==="<="?t:e};e.exports=subset},2706:(e,t,r)=>{const s=r(9828);const toComparators=(e,t)=>new s(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));e.exports=toComparators},2098:(e,t,r)=>{const s=r(9828);const validRange=(e,t)=>{try{return new s(e,t).range||"*"}catch(e){return null}};e.exports=validRange},4294:(e,t,r)=>{e.exports=r(4219)},4219:(e,t,r)=>{"use strict";var s=r(1808);var n=r(4404);var o=r(3685);var i=r(5687);var a=r(2361);var c=r(9491);var u=r(3837);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,s,n){var o=toOptions(r,s,n);for(var i=0,a=t.requests.length;i=this.maxSockets){n.requests.push(o);return}n.createSocket(o,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){n.emit("free",t,o)}function onCloseOrRemove(e){n.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var s={};r.sockets.push(s);var n=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){n.localAddress=e.localAddress}if(n.proxyAuth){n.headers=n.headers||{};n.headers["Proxy-Authorization"]="Basic "+new Buffer(n.proxyAuth).toString("base64")}l("making CONNECT request");var o=r.request(n);o.useChunkedEncodingByDefault=false;o.once("response",onResponse);o.once("upgrade",onUpgrade);o.once("connect",onConnect);o.once("error",onError);o.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(n,i,a){o.removeAllListeners();i.removeAllListeners();if(n.statusCode!==200){l("tunneling socket could not be established, statusCode=%d",n.statusCode);i.destroy();var c=new Error("tunneling socket could not be established, "+"statusCode="+n.statusCode);c.code="ECONNRESET";e.request.emit("error",c);r.removeSocket(s);return}if(a.length>0){l("got illegal response body from proxy");i.destroy();var c=new Error("got illegal response body from proxy");c.code="ECONNRESET";e.request.emit("error",c);r.removeSocket(s);return}l("tunneling connection has established");r.sockets[r.sockets.indexOf(s)]=i;return t(i)}function onError(t){o.removeAllListeners();l("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var n=new Error("tunneling socket could not be established, "+"cause="+t.message);n.code="ECONNRESET";e.request.emit("error",n);r.removeSocket(s)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,(function(e){r.request.onSocket(e)}))}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,(function(s){var o=e.request.getHeader("host");var i=mergeOptions({},r.options,{socket:s,servername:o?o.replace(/:.*$/,""):e.host});var a=n.connect(0,i);r.sockets[r.sockets.indexOf(s)]=a;t(a)}))}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return n.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return a.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return h.default}});var s=_interopRequireDefault(r(8628));var n=_interopRequireDefault(r(6409));var o=_interopRequireDefault(r(5122));var i=_interopRequireDefault(r(9120));var a=_interopRequireDefault(r(5332));var c=_interopRequireDefault(r(1595));var u=_interopRequireDefault(r(6900));var l=_interopRequireDefault(r(8950));var h=_interopRequireDefault(r(2746));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},4569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("md5").update(e).digest()}var n=md5;t["default"]=n},5332:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r="00000000-0000-0000-0000-000000000000";t["default"]=r},2746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}let t;const r=new Uint8Array(16);r[0]=(t=parseInt(e.slice(0,8),16))>>>24;r[1]=t>>>16&255;r[2]=t>>>8&255;r[3]=t&255;r[4]=(t=parseInt(e.slice(9,13),16))>>>8;r[5]=t&255;r[6]=(t=parseInt(e.slice(14,18),16))>>>8;r[7]=t&255;r[8]=(t=parseInt(e.slice(19,23),16))>>>8;r[9]=t&255;r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;r[11]=t/4294967296&255;r[12]=t>>>24&255;r[13]=t>>>16&255;r[14]=t>>>8&255;r[15]=t&255;return r}var n=parse;t["default"]=n},814:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t["default"]=r},807:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var s=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=new Uint8Array(256);let o=n.length;function rng(){if(o>n.length-16){s.default.randomFillSync(n);o=0}return n.slice(o,o+=16)}},5274:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("sha1").update(e).digest()}var n=sha1;t["default"]=n},8950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=[];for(let e=0;e<256;++e){n.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const r=(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase();if(!(0,s.default)(r)){throw TypeError("Stringified UUID is invalid")}return r}var o=stringify;t["default"]=o},8628:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(807));var n=_interopRequireDefault(r(8950));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let o;let i;let a=0;let c=0;function v1(e,t,r){let u=t&&r||0;const l=t||new Array(16);e=e||{};let h=e.node||o;let d=e.clockseq!==undefined?e.clockseq:i;if(h==null||d==null){const t=e.random||(e.rng||s.default)();if(h==null){h=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(d==null){d=i=(t[6]<<8|t[7])&16383}}let p=e.msecs!==undefined?e.msecs:Date.now();let m=e.nsecs!==undefined?e.nsecs:c+1;const y=p-a+(m-c)/1e4;if(y<0&&e.clockseq===undefined){d=d+1&16383}if((y<0||p>a)&&e.nsecs===undefined){m=0}if(m>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}a=p;c=m;i=d;p+=122192928e5;const g=((p&268435455)*1e4+m)%4294967296;l[u++]=g>>>24&255;l[u++]=g>>>16&255;l[u++]=g>>>8&255;l[u++]=g&255;const v=p/4294967296*1e4&268435455;l[u++]=v>>>8&255;l[u++]=v&255;l[u++]=v>>>24&15|16;l[u++]=v>>>16&255;l[u++]=d>>>8|128;l[u++]=d&255;for(let e=0;e<6;++e){l[u+e]=h[e]}return t||(0,n.default)(l)}var u=v1;t["default"]=u},6409:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(5998));var n=_interopRequireDefault(r(4569));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,s.default)("v3",48,n.default);var i=o;t["default"]=i},5998:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var s=_interopRequireDefault(r(8950));var n=_interopRequireDefault(r(2746));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(807));var n=_interopRequireDefault(r(8950));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,r){e=e||{};const o=e.random||(e.rng||s.default)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){r=r||0;for(let e=0;e<16;++e){t[r+e]=o[e]}return t}return(0,n.default)(o)}var o=v4;t["default"]=o},9120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(5998));var n=_interopRequireDefault(r(5274));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,s.default)("v5",80,n.default);var i=o;t["default"]=i},6900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(814));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&s.default.test(e)}var n=validate;t["default"]=n},1595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var n=version;t["default"]=n},2940:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach((function(t){wrapper[t]=e[t]}));return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},665:(e,t,r)=>{"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach((function(e){t.push(e)}))}else if(arguments.length>0){for(var r=0,s=arguments.length;r1){r=t}else if(this.head){s=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=0;s!==null;n++){r=e(r,s.value,n);s=s.next}return r};Yallist.prototype.reduceReverse=function(e,t){var r;var s=this.tail;if(arguments.length>1){r=t}else if(this.tail){s=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=this.length-1;s!==null;n--){r=e(r,s.value,n);s=s.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,r=this.head;r!==null;t++){e[t]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,r=this.tail;r!==null;t++){e[t]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(tthis.length){t=this.length}for(var s=0,n=this.head;n!==null&&sthis.length){t=this.length}for(var s=this.length,n=this.tail;n!==null&&s>t;s--){n=n.prev}for(;n!==null&&s>e;s--,n=n.prev){r.push(n.value)}return r};Yallist.prototype.splice=function(e,t,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var s=0,n=this.head;n!==null&&s0|[1-9]\d*)\.(?0|[1-9]\d*)\.(?0|[1-9]\d*)(?:-(?(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;const semverReGlobal=/(?0|[1-9]\d*)\.(?0|[1-9]\d*)\.(?0|[1-9]\d*)(?:-(?(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/gm;const packageFileName=(0,path_1.normalize)((0,core_1.getInput)("file-name")||"package.json"),dir=process.env.GITHUB_WORKSPACE||"/github/workspace",eventFile=process.env.GITHUB_EVENT_PATH||"/github/workflow/event.json",assumeSameVersion=(0,core_1.getInput)("assume-same-version"),staticChecking=(0,core_1.getInput)("static-checking"),token=(0,core_1.getInput)("token");let packageFileURL=((0,core_1.getInput)("file-url")||"").trim();const allowedTags=["::before"];const outputs={};function main(){var e,t;return __awaiter(this,void 0,void 0,(function*(){if(packageFileURL&&!isURL(packageFileURL)&&!allowedTags.includes(packageFileURL))return(0,core_1.setFailed)(`The provided package file URL is not valid (received: ${packageFileURL})`);if(assumeSameVersion&&!["old","new"].includes(assumeSameVersion))return(0,core_1.setFailed)(`The provided assume-same-version parameter is not valid (received ${assumeSameVersion})`);if(staticChecking&&!["localIsNew","remoteIsNew"].includes(staticChecking))return(0,core_1.setFailed)(`The provided static-checking parameter is not valid (received ${staticChecking})`);const r=packageFileURL==="::before";if(r){const e=yield readJson(eventFile);if(!e)throw new Error(`Can't find event file (${eventFile})`);const{before:t,repository:r}=e;if(t&&r){packageFileURL=`https://raw.githubusercontent.com/${r===null||r===void 0?void 0:r.full_name}/${t}/${packageFileName}`;(0,core_1.startGroup)("URL tag resolution...");(0,core_1.info)(`::before tag resolved to ${r===null||r===void 0?void 0:r.full_name}/${String(t).substr(0,7)}/${packageFileName}`);(0,core_1.info)(`Current package file URL: ${packageFileURL}`);(0,core_1.info)(`Using token for remote url: ${!!token}`);(0,core_1.endGroup)()}else throw new Error(`Can't correctly read event file (before: ${t}, repository: ${r})`)}if(staticChecking){if(!packageFileURL)return(0,core_1.setFailed)("Static checking cannot be performed without a `file-url` argument.");(0,core_1.startGroup)("Static-checking files...");(0,core_1.info)(`Package file name: "${packageFileName}"`);(0,core_1.info)(`Package file URL: "${packageFileURL}"`);const s=(e=yield readJson((0,path_1.join)(dir,packageFileName)))===null||e===void 0?void 0:e.version,n=(t=yield readJson(packageFileURL,r&&token?token:undefined))===null||t===void 0?void 0:t.version;if(!s||!n){(0,core_1.endGroup)();return(0,core_1.setFailed)(`Couldn't find ${s?"local":"remote"} version.`)}if(!semverRE.test(s)){return(0,core_1.setFailed)(`Local version does not match semver pattern`)}if(!semverRE.test(n)){return(0,core_1.setFailed)(`Remote version does not match semver pattern`)}const o=staticChecking==="localIsNew"?(0,semver_diff_1.default)(n,s):(0,semver_diff_1.default)(s,n);if(o){output("changed",true);output("version",staticChecking=="localIsNew"?s:n);output("type",o);(0,core_1.endGroup)();(0,core_1.info)(`Found match for version ${staticChecking=="localIsNew"?s:n}`)}}else{const e=yield readJson(eventFile);const t=e.commits||(yield request(e.pull_request._links.commits.href));yield processDirectory(dir,t)}}))}function isURL(e){try{new URL(e);return true}catch(e){return false}}function readJson(e,t){return __awaiter(this,void 0,void 0,(function*(){if(isURL(e)){const r=t?{Authorization:`token ${t}`}:{};return(yield(0,got_1.default)({url:e,method:"GET",headers:r,responseType:"json"})).body}else{const t=(0,fs_1.readFileSync)(e,{encoding:"utf8"});if(typeof t=="string")try{return JSON.parse(t)}catch(e){(0,core_1.error)(e instanceof Error?e.stack||e.message:e+"")}}}))}function request(e){return __awaiter(this,void 0,void 0,(function*(){const t=token?{Authorization:`Bearer ${token}`}:{};return(yield(0,got_1.default)({url:e,method:"GET",headers:t,responseType:"json"})).body}))}function processDirectory(e,t){return __awaiter(this,void 0,void 0,(function*(){try{const r=yield(packageFileURL?readJson(packageFileURL):readJson((0,path_1.join)(e,packageFileName))).catch((()=>{Promise.reject(new NeutralExitError(`Package file not found: ${packageFileName}`))}));if(!isPackageObj(r))throw new Error("Can't find version field");if(t.length>=20)(0,core_1.warning)("This workflow run topped the commit limit set by GitHub webhooks: that means that commits could not appear and that the run could not find the version change.");if(t.length<=0){(0,core_1.info)("There are no commits to look at.");return}yield checkCommits(t,r.version)}catch(e){(0,core_1.setFailed)(`${e}`)}}))}function checkCommits(e,t){return __awaiter(this,void 0,void 0,(function*(){try{(0,core_1.startGroup)(`Searching in ${e.length} commit${e.length==1?"":"s"}...`);(0,core_1.info)(`Package file name: "${packageFileName}"`);(0,core_1.info)(`Package file URL: ${packageFileURL?`"${packageFileURL}"`:"undefined"}`);(0,core_1.info)(`Version assumptions: ${assumeSameVersion?`"${assumeSameVersion}"`:"undefined"}`);for(const r of e){const{message:e,sha:s}=getBasicInfo(r);const n=e.match(semverReGlobal)||[];if(n.includes(t)){if(yield checkDiff(s,t)){(0,core_1.endGroup)();(0,core_1.info)(`Found match for version ${t}: ${s.substring(0,7)} ${e}`);return true}}}(0,core_1.endGroup)();if((0,core_1.getInput)("diff-search")){(0,core_1.info)("No standard npm version commit found, switching to diff search (this could take more time...)");if(!isLocalCommitArray(e)){e=e.sort(((e,t)=>new Date(t.commit.committer.date).getTime()-new Date(e.commit.committer.date).getTime()))}(0,core_1.startGroup)(`Checking the diffs of ${e.length} commit${e.length==1?"":"s"}...`);for(const r of e){const{message:e,sha:s}=getBasicInfo(r);if(yield checkDiff(s,t)){(0,core_1.endGroup)();(0,core_1.info)(`Found match for version ${t}: ${s.substring(0,7)} - ${e}`);return true}}}(0,core_1.endGroup)();(0,core_1.info)("No matching commit found.");output("changed",false);return false}catch(e){(0,core_1.setFailed)(`${e}`)}}))}function getBasicInfo(e){let t,r;if(isLocalCommit(e)){t=e.message;r=e.id}else{t=e.commit.message;r=e.sha}return{message:t,sha:r}}function checkDiff(e,t){return __awaiter(this,void 0,void 0,(function*(){try{const r=yield getCommit(e);const s=r.files.find((e=>e.filename==packageFileName));if(!s){(0,core_1.info)(`- ${e.substr(0,7)}: no changes to the package file`);return false}const n={};const o=s.patch.split("\n").filter((e=>e.includes('"version":')&&["+","-"].includes(e[0])));if(o.length>2){(0,core_1.info)(`- ${e.substr(0,7)}: too many version lines`);return false}for(const e of o)n[e.startsWith("+")?"added":"deleted"]=e;if(!n.added){(0,core_1.info)(`- ${e.substr(0,7)}: no "+ version" line`);return false}const i={added:assumeSameVersion=="new"?t:parseVersionLine(n.added),deleted:assumeSameVersion=="old"?t:!!n.deleted&&parseVersionLine(n.deleted)};if(i.added!=t&&!assumeSameVersion){(0,core_1.info)(`- ${e.substr(0,7)}: added version doesn't match current one (added: "${i.added}"; current: "${t}")`);return false}output("changed",true);output("version",t);if(i.deleted)output("type",(0,semver_diff_1.default)(i.deleted,i.added));output("commit",r.sha);(0,core_1.info)(`- ${e.substr(0,7)}: match found, more info below`);return true}catch(e){(0,core_1.error)(`An error occurred in checkDiff:\n${e}`);throw new ExitError(1)}}))}function trimTrailingSlashFromUrl(e){const t=e.trim();return t.endsWith("/")?t.slice(0,-1):t}function getCommit(e){return __awaiter(this,void 0,void 0,(function*(){const t=trimTrailingSlashFromUrl((0,core_1.getInput)("github-api-url"));const r=`${t}/repos/${process.env.GITHUB_REPOSITORY}/commits/${e}`;const s=yield request(r);if(typeof s!="object"||!s)throw new Error("Response data must be an object.");return s}))}function parseVersionLine(e){return(e.split('"')||[]).map((e=>matchVersion(e))).find((e=>!!e))}function matchVersion(e){return(e.match(semverReGlobal)||[])[0]}function output(e,t){outputs[e]=t;return(0,core_1.setOutput)(e,`${t}`)}function logOutputs(){(0,core_1.startGroup)("Outputs:");for(const e in outputs){(0,core_1.info)(`${e}: ${outputs[e]}`)}(0,core_1.endGroup)()}class ExitError extends Error{constructor(e){super(`Command failed with code ${e}`);if(typeof e=="number")this.code=e}}class NeutralExitError extends Error{}if(require.main==require.cache[eval("__filename")]){(0,core_1.info)("Searching for version update...");main().then((()=>{if(typeof outputs.changed=="undefined"){output("changed",false)}logOutputs()})).catch((e=>{if(e instanceof NeutralExitError)process.exitCode=78;else{process.exitCode=1;(0,core_1.error)(e.message||e)}}))}function isLocalCommit(e){return typeof e.id=="string"}function isLocalCommitArray(e){return isLocalCommit(e[0])}function isPackageObj(e){return!!e&&!!e.version}},9491:e=>{"use strict";e.exports=require("assert")},4300:e=>{"use strict";e.exports=require("buffer")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5158:e=>{"use strict";e.exports=require("http2")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},2781:e=>{"use strict";e.exports=require("stream")},4404:e=>{"use strict";e.exports=require("tls")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},5945:(e,t,r)=>{"use strict";r.r(t);r.d(t,{default:()=>semverDiff});var s=r(1383);function semverDiff(e,t){e=s.parse(e);t=s.parse(t);if(s.compareBuild(e,t)>=0){return}return s.diff(e,t)||"build"}}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var s=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);s=false}finally{if(s)delete __webpack_module_cache__[e]}return r.exports}(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__=__nccwpck_require__(399);module.exports=__webpack_exports__})(); \ No newline at end of file +(()=>{var __webpack_modules__={7351:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const i=o(r(2037));const a=r(5278);function issueCommand(e,t,r){const s=new Command(e,t,r);process.stdout.write(s.toString()+i.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const c="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=c+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const s=this.properties[r];if(s){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(s)}`}}}}e+=`${c}${escapeData(this.message)}`;return e}}function escapeData(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};var i=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const a=r(7351);const c=r(717);const u=r(5278);const l=o(r(2037));const h=o(r(1017));const d=r(8041);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=u.toCommandValue(t);process.env[e]=r;const s=process.env["GITHUB_ENV"]||"";if(s){return c.issueFileCommand("ENV",c.prepareKeyValueMessage(e,t))}a.issueCommand("set-env",{name:e},r)}t.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){c.issueFileCommand("PATH",e)}else{a.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${h.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return r}return r.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const s=["false","False","FALSE"];const n=getInput(e,t);if(r.includes(n))return true;if(s.includes(n))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const r=process.env["GITHUB_OUTPUT"]||"";if(r){return c.issueFileCommand("OUTPUT",c.prepareKeyValueMessage(e,t))}process.stdout.write(l.EOL);a.issueCommand("set-output",{name:e},u.toCommandValue(t))}t.setOutput=setOutput;function setCommandEcho(e){a.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=p.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){a.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){a.issueCommand("error",u.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){a.issueCommand("warning",u.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){a.issueCommand("notice",u.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+l.EOL)}t.info=info;function startGroup(e){a.issue("group",e)}t.startGroup=startGroup;function endGroup(){a.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return i(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r}))}t.group=group;function saveState(e,t){const r=process.env["GITHUB_STATE"]||"";if(r){return c.issueFileCommand("STATE",c.prepareKeyValueMessage(e,t))}a.issueCommand("save-state",{name:e},u.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return i(this,void 0,void 0,(function*(){return yield d.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var m=r(1327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return m.summary}});var y=r(1327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return y.markdownSummary}});var g=r(2981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return g.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return g.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return g.toPlatformPath}})},717:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const i=o(r(7147));const a=o(r(2037));const c=r(5840);const u=r(5278);function issueFileCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!i.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}i.appendFileSync(r,`${u.toCommandValue(t)}${a.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const r=`ghadelimiter_${c.v4()}`;const s=u.toCommandValue(t);if(e.includes(r)){throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`)}if(s.includes(r)){throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`)}return`${e}<<${r}${a.EOL}${s}${a.EOL}${r}`}t.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const n=r(6255);const o=r(5526);const i=r(2186);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new n.HttpClient("actions/oidc-client",[new o.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return s(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const s=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)}));const n=(t=s.result)===null||t===void 0?void 0:t.value;if(!n){throw new Error("Response json body do not have ID Token field")}return n}))}static getIDToken(e){return s(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}i.debug(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);i.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},2981:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const i=o(r(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,i.sep)}t.toPlatformPath=toPlatformPath},1327:function(e,t,r){"use strict";var s=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const n=r(2037);const o=r(7147);const{access:i,appendFile:a,writeFile:c}=o.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return s(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield i(e,o.constants.R_OK|o.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,r={}){const s=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${s}>`}return`<${e}${s}>${t}`}write(e){return s(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const r=yield this.filePath();const s=t?c:a;yield s(r,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return s(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(n.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t});const s=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(s).addEOL()}addList(e,t=false){const r=t?"ol":"ul";const s=e.map((e=>this.wrap("li",e))).join("");const n=this.wrap(r,s);return this.addRaw(n).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:r,colspan:s,rowspan:n}=e;const o=t?"th":"td";const i=Object.assign(Object.assign({},s&&{colspan:s}),n&&{rowspan:n});return this.wrap(o,r,i)})).join("");return this.wrap("tr",t)})).join("");const r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){const r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){const{width:s,height:n}=r||{};const o=Object.assign(Object.assign({},s&&{width:s}),n&&{height:n});const i=this.wrap("img",null,Object.assign({src:e,alt:t},o));return this.addRaw(i).addEOL()}addHeading(e,t){const r=`h${t}`;const s=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1";const n=this.wrap(s,e);return this.addRaw(n).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const r=Object.assign({},t&&{cite:t});const s=this.wrap("blockquote",e,r);return this.addRaw(s).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}}const u=new Summary;t.markdownSummary=u;t.summary=u},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},5526:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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.hasOwnProperty.call(e,r))s(t,e,r);n(t,e);return t};var i=this&&this.__awaiter||function(e,t,r,s){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(s.next(e))}catch(e){n(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const a=o(r(3685));const c=o(r(5687));const u=o(r(9835));const l=o(r(4294));var h;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(h=t.HttpCodes||(t.HttpCodes={}));var d;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(d=t.Headers||(t.Headers={}));var p;(function(e){e["ApplicationJson"]="application/json"})(p=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=u.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const m=[h.MovedPermanently,h.ResourceMoved,h.SeeOther,h.TemporaryRedirect,h.PermanentRedirect];const y=[h.BadGateway,h.ServiceUnavailable,h.GatewayTimeout];const g=["OPTIONS","GET","DELETE","HEAD"];const v=10;const _=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return i(this,void 0,void 0,(function*(){return new Promise((e=>i(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return i(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return i(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return i(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,r){return i(this,void 0,void 0,(function*(){return this.request("POST",e,t,r||{})}))}patch(e,t,r){return i(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,r||{})}))}put(e,t,r){return i(this,void 0,void 0,(function*(){return this.request("PUT",e,t,r||{})}))}head(e,t){return i(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,r,s){return i(this,void 0,void 0,(function*(){return this.request(e,t,r,s)}))}getJson(e,t={}){return i(this,void 0,void 0,(function*(){t[d.Accept]=this._getExistingOrDefaultHeader(t,d.Accept,p.ApplicationJson);const r=yield this.get(e,t);return this._processResponse(r,this.requestOptions)}))}postJson(e,t,r={}){return i(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);r[d.Accept]=this._getExistingOrDefaultHeader(r,d.Accept,p.ApplicationJson);r[d.ContentType]=this._getExistingOrDefaultHeader(r,d.ContentType,p.ApplicationJson);const n=yield this.post(e,s,r);return this._processResponse(n,this.requestOptions)}))}putJson(e,t,r={}){return i(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);r[d.Accept]=this._getExistingOrDefaultHeader(r,d.Accept,p.ApplicationJson);r[d.ContentType]=this._getExistingOrDefaultHeader(r,d.ContentType,p.ApplicationJson);const n=yield this.put(e,s,r);return this._processResponse(n,this.requestOptions)}))}patchJson(e,t,r={}){return i(this,void 0,void 0,(function*(){const s=JSON.stringify(t,null,2);r[d.Accept]=this._getExistingOrDefaultHeader(r,d.Accept,p.ApplicationJson);r[d.ContentType]=this._getExistingOrDefaultHeader(r,d.ContentType,p.ApplicationJson);const n=yield this.patch(e,s,r);return this._processResponse(n,this.requestOptions)}))}request(e,t,r,s){return i(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const n=new URL(t);let o=this._prepareRequest(e,n,s);const i=this._allowRetries&&g.includes(e)?this._maxRetries+1:1;let a=0;let c;do{c=yield this.requestRaw(o,r);if(c&&c.message&&c.message.statusCode===h.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(c)){e=t;break}}if(e){return e.handleAuthentication(this,o,r)}else{return c}}let t=this._maxRedirects;while(c.message.statusCode&&m.includes(c.message.statusCode)&&this._allowRedirects&&t>0){const i=c.message.headers["location"];if(!i){break}const a=new URL(i);if(n.protocol==="https:"&&n.protocol!==a.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield c.readBody();if(a.hostname!==n.hostname){for(const e in s){if(e.toLowerCase()==="authorization"){delete s[e]}}}o=this._prepareRequest(e,a,s);c=yield this.requestRaw(o,r);t--}if(!c.message.statusCode||!y.includes(c.message.statusCode)){return c}a+=1;if(a{function callbackForResult(e,t){if(e){s(e)}else if(!t){s(new Error("Unknown error"))}else{r(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,r){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let s=false;function handleResult(e,t){if(!s){s=true;r(e,t)}}const n=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let o;n.on("socket",(e=>{o=e}));n.setTimeout(this._socketTimeout||3*6e4,(()=>{if(o){o.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));n.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){n.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){n.end()}));t.pipe(n)}else{n.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,r){const s={};s.parsedUrl=t;const n=s.parsedUrl.protocol==="https:";s.httpModule=n?c:a;const o=n?443:80;s.options={};s.options.host=s.parsedUrl.hostname;s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):o;s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||"");s.options.method=e;s.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){s.options.headers["user-agent"]=this.userAgent}s.options.agent=this._getAgent(s.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(s.options)}}return s}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){let s;if(this.requestOptions&&this.requestOptions.headers){s=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||s||r}_getAgent(e){let t;const r=u.getProxyUrl(e);const s=r&&r.hostname;if(this._keepAlive&&s){t=this._proxyAgent}if(this._keepAlive&&!s){t=this._agent}if(t){return t}const n=e.protocol==="https:";let o=100;if(this.requestOptions){o=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(r&&r.hostname){const e={maxSockets:o,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`}),{host:r.hostname,port:r.port})};let s;const i=r.protocol==="https:";if(n){s=i?l.httpsOverHttps:l.httpsOverHttp}else{s=i?l.httpOverHttps:l.httpOverHttp}t=s(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:o};t=n?new c.Agent(e):new a.Agent(e);this._agent=t}if(!t){t=n?c.globalAgent:a.globalAgent}if(n&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return i(this,void 0,void 0,(function*(){e=Math.min(v,e);const t=_*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return i(this,void 0,void 0,(function*(){return new Promise(((r,s)=>i(this,void 0,void 0,(function*(){const n=e.message.statusCode||0;const o={statusCode:n,result:null,headers:{}};if(n===h.NotFound){r(o)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let i;let a;try{a=yield e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){i=JSON.parse(a,dateTimeDeserializer)}else{i=JSON.parse(a)}o.result=i}o.headers=e.message.headers}catch(e){}if(n>299){let e;if(i&&i.message){e=i.message}else if(a&&a.length>0){e=a}else{e=`Failed request: (${n})`}const t=new HttpClientError(e,n);t.result=o.result;s(t)}else{r(o)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})},9835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const r=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(r){return new URL(r)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let r;if(e.port){r=Number(e.port)}else if(e.protocol==="http:"){r=80}else if(e.protocol==="https:"){r=443}const s=[e.hostname.toUpperCase()];if(typeof r==="number"){s.push(`${s[0]}:${r}`)}for(const e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(s.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},7678:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function isTypedArrayName(e){return r.includes(e)}const s=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...r];function isObjectTypeName(e){return s.includes(e)}const n=["null","undefined","string","number","bigint","boolean","symbol"];function isPrimitiveTypeName(e){return n.includes(e)}function isOfType(e){return t=>typeof t===e}const{toString:o}=Object.prototype;const getObjectType=e=>{const t=o.call(e).slice(8,-1);if(/HTML\w+Element/.test(t)&&is.domElement(e)){return"HTMLElement"}if(isObjectTypeName(t)){return t}return undefined};const isObjectOfType=e=>t=>getObjectType(t)===e;function is(e){if(e===null){return"null"}switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(is.observable(e)){return"Observable"}if(is.array(e)){return"Array"}if(is.buffer(e)){return"Buffer"}const t=getObjectType(e);if(t){return t}if(e instanceof String||e instanceof Boolean||e instanceof Number){throw new TypeError("Please don't use object wrappers for primitive types")}return"Object"}is.undefined=isOfType("undefined");is.string=isOfType("string");const i=isOfType("number");is.number=e=>i(e)&&!is.nan(e);is.bigint=isOfType("bigint");is.function_=isOfType("function");is.null_=e=>e===null;is.class_=e=>is.function_(e)&&e.toString().startsWith("class ");is.boolean=e=>e===true||e===false;is.symbol=isOfType("symbol");is.numericString=e=>is.string(e)&&!is.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e));is.array=(e,t)=>{if(!Array.isArray(e)){return false}if(!is.function_(t)){return true}return e.every(t)};is.buffer=e=>{var t,r,s,n;return(n=(s=(r=(t=e)===null||t===void 0?void 0:t.constructor)===null||r===void 0?void 0:r.isBuffer)===null||s===void 0?void 0:s.call(r,e))!==null&&n!==void 0?n:false};is.nullOrUndefined=e=>is.null_(e)||is.undefined(e);is.object=e=>!is.null_(e)&&(typeof e==="object"||is.function_(e));is.iterable=e=>{var t;return is.function_((t=e)===null||t===void 0?void 0:t[Symbol.iterator])};is.asyncIterable=e=>{var t;return is.function_((t=e)===null||t===void 0?void 0:t[Symbol.asyncIterator])};is.generator=e=>is.iterable(e)&&is.function_(e.next)&&is.function_(e.throw);is.asyncGenerator=e=>is.asyncIterable(e)&&is.function_(e.next)&&is.function_(e.throw);is.nativePromise=e=>isObjectOfType("Promise")(e);const hasPromiseAPI=e=>{var t,r;return is.function_((t=e)===null||t===void 0?void 0:t.then)&&is.function_((r=e)===null||r===void 0?void 0:r.catch)};is.promise=e=>is.nativePromise(e)||hasPromiseAPI(e);is.generatorFunction=isObjectOfType("GeneratorFunction");is.asyncGeneratorFunction=e=>getObjectType(e)==="AsyncGeneratorFunction";is.asyncFunction=e=>getObjectType(e)==="AsyncFunction";is.boundFunction=e=>is.function_(e)&&!e.hasOwnProperty("prototype");is.regExp=isObjectOfType("RegExp");is.date=isObjectOfType("Date");is.error=isObjectOfType("Error");is.map=e=>isObjectOfType("Map")(e);is.set=e=>isObjectOfType("Set")(e);is.weakMap=e=>isObjectOfType("WeakMap")(e);is.weakSet=e=>isObjectOfType("WeakSet")(e);is.int8Array=isObjectOfType("Int8Array");is.uint8Array=isObjectOfType("Uint8Array");is.uint8ClampedArray=isObjectOfType("Uint8ClampedArray");is.int16Array=isObjectOfType("Int16Array");is.uint16Array=isObjectOfType("Uint16Array");is.int32Array=isObjectOfType("Int32Array");is.uint32Array=isObjectOfType("Uint32Array");is.float32Array=isObjectOfType("Float32Array");is.float64Array=isObjectOfType("Float64Array");is.bigInt64Array=isObjectOfType("BigInt64Array");is.bigUint64Array=isObjectOfType("BigUint64Array");is.arrayBuffer=isObjectOfType("ArrayBuffer");is.sharedArrayBuffer=isObjectOfType("SharedArrayBuffer");is.dataView=isObjectOfType("DataView");is.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype;is.urlInstance=e=>isObjectOfType("URL")(e);is.urlString=e=>{if(!is.string(e)){return false}try{new URL(e);return true}catch(e){return false}};is.truthy=e=>Boolean(e);is.falsy=e=>!e;is.nan=e=>Number.isNaN(e);is.primitive=e=>is.null_(e)||isPrimitiveTypeName(typeof e);is.integer=e=>Number.isInteger(e);is.safeInteger=e=>Number.isSafeInteger(e);is.plainObject=e=>{if(o.call(e)!=="[object Object]"){return false}const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};is.typedArray=e=>isTypedArrayName(getObjectType(e));const isValidLength=e=>is.safeInteger(e)&&e>=0;is.arrayLike=e=>!is.nullOrUndefined(e)&&!is.function_(e)&&isValidLength(e.length);is.inRange=(e,t)=>{if(is.number(t)){return e>=Math.min(0,t)&&e<=Math.max(t,0)}if(is.array(t)&&t.length===2){return e>=Math.min(...t)&&e<=Math.max(...t)}throw new TypeError(`Invalid range: ${JSON.stringify(t)}`)};const a=1;const c=["innerHTML","ownerDocument","style","attributes","nodeValue"];is.domElement=e=>is.object(e)&&e.nodeType===a&&is.string(e.nodeName)&&!is.plainObject(e)&&c.every((t=>t in e));is.observable=e=>{var t,r,s,n;if(!e){return false}if(e===((r=(t=e)[Symbol.observable])===null||r===void 0?void 0:r.call(t))){return true}if(e===((n=(s=e)["@@observable"])===null||n===void 0?void 0:n.call(s))){return true}return false};is.nodeStream=e=>is.object(e)&&is.function_(e.pipe)&&!is.observable(e);is.infinite=e=>e===Infinity||e===-Infinity;const isAbsoluteMod2=e=>t=>is.integer(t)&&Math.abs(t%2)===e;is.evenInteger=isAbsoluteMod2(0);is.oddInteger=isAbsoluteMod2(1);is.emptyArray=e=>is.array(e)&&e.length===0;is.nonEmptyArray=e=>is.array(e)&&e.length>0;is.emptyString=e=>is.string(e)&&e.length===0;is.nonEmptyString=e=>is.string(e)&&e.length>0;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.emptyObject=e=>is.object(e)&&!is.map(e)&&!is.set(e)&&Object.keys(e).length===0;is.nonEmptyObject=e=>is.object(e)&&!is.map(e)&&!is.set(e)&&Object.keys(e).length>0;is.emptySet=e=>is.set(e)&&e.size===0;is.nonEmptySet=e=>is.set(e)&&e.size>0;is.emptyMap=e=>is.map(e)&&e.size===0;is.nonEmptyMap=e=>is.map(e)&&e.size>0;is.propertyKey=e=>is.any([is.string,is.number,is.symbol],e);is.formData=e=>isObjectOfType("FormData")(e);is.urlSearchParams=e=>isObjectOfType("URLSearchParams")(e);const predicateOnArray=(e,t,r)=>{if(!is.function_(t)){throw new TypeError(`Invalid predicate: ${JSON.stringify(t)}`)}if(r.length===0){throw new TypeError("Invalid number of values")}return e.call(r,t)};is.any=(e,...t)=>{const r=is.array(e)?e:[e];return r.some((e=>predicateOnArray(Array.prototype.some,e,t)))};is.all=(e,...t)=>predicateOnArray(Array.prototype.every,e,t);const assertType=(e,t,r,s={})=>{if(!e){const{multipleValues:e}=s;const n=e?`received values of types ${[...new Set(r.map((e=>`\`${is(e)}\``)))].join(", ")}`:`received value of type \`${is(r)}\``;throw new TypeError(`Expected value which is \`${t}\`, ${n}.`)}};t.assert={undefined:e=>assertType(is.undefined(e),"undefined",e),string:e=>assertType(is.string(e),"string",e),number:e=>assertType(is.number(e),"number",e),bigint:e=>assertType(is.bigint(e),"bigint",e),function_:e=>assertType(is.function_(e),"Function",e),null_:e=>assertType(is.null_(e),"null",e),class_:e=>assertType(is.class_(e),"Class",e),boolean:e=>assertType(is.boolean(e),"boolean",e),symbol:e=>assertType(is.symbol(e),"symbol",e),numericString:e=>assertType(is.numericString(e),"string with a number",e),array:(e,t)=>{const r=assertType;r(is.array(e),"Array",e);if(t){e.forEach(t)}},buffer:e=>assertType(is.buffer(e),"Buffer",e),nullOrUndefined:e=>assertType(is.nullOrUndefined(e),"null or undefined",e),object:e=>assertType(is.object(e),"Object",e),iterable:e=>assertType(is.iterable(e),"Iterable",e),asyncIterable:e=>assertType(is.asyncIterable(e),"AsyncIterable",e),generator:e=>assertType(is.generator(e),"Generator",e),asyncGenerator:e=>assertType(is.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>assertType(is.nativePromise(e),"native Promise",e),promise:e=>assertType(is.promise(e),"Promise",e),generatorFunction:e=>assertType(is.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>assertType(is.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>assertType(is.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>assertType(is.boundFunction(e),"Function",e),regExp:e=>assertType(is.regExp(e),"RegExp",e),date:e=>assertType(is.date(e),"Date",e),error:e=>assertType(is.error(e),"Error",e),map:e=>assertType(is.map(e),"Map",e),set:e=>assertType(is.set(e),"Set",e),weakMap:e=>assertType(is.weakMap(e),"WeakMap",e),weakSet:e=>assertType(is.weakSet(e),"WeakSet",e),int8Array:e=>assertType(is.int8Array(e),"Int8Array",e),uint8Array:e=>assertType(is.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>assertType(is.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>assertType(is.int16Array(e),"Int16Array",e),uint16Array:e=>assertType(is.uint16Array(e),"Uint16Array",e),int32Array:e=>assertType(is.int32Array(e),"Int32Array",e),uint32Array:e=>assertType(is.uint32Array(e),"Uint32Array",e),float32Array:e=>assertType(is.float32Array(e),"Float32Array",e),float64Array:e=>assertType(is.float64Array(e),"Float64Array",e),bigInt64Array:e=>assertType(is.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>assertType(is.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>assertType(is.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>assertType(is.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>assertType(is.dataView(e),"DataView",e),urlInstance:e=>assertType(is.urlInstance(e),"URL",e),urlString:e=>assertType(is.urlString(e),"string with a URL",e),truthy:e=>assertType(is.truthy(e),"truthy",e),falsy:e=>assertType(is.falsy(e),"falsy",e),nan:e=>assertType(is.nan(e),"NaN",e),primitive:e=>assertType(is.primitive(e),"primitive",e),integer:e=>assertType(is.integer(e),"integer",e),safeInteger:e=>assertType(is.safeInteger(e),"integer",e),plainObject:e=>assertType(is.plainObject(e),"plain object",e),typedArray:e=>assertType(is.typedArray(e),"TypedArray",e),arrayLike:e=>assertType(is.arrayLike(e),"array-like",e),domElement:e=>assertType(is.domElement(e),"HTMLElement",e),observable:e=>assertType(is.observable(e),"Observable",e),nodeStream:e=>assertType(is.nodeStream(e),"Node.js Stream",e),infinite:e=>assertType(is.infinite(e),"infinite number",e),emptyArray:e=>assertType(is.emptyArray(e),"empty array",e),nonEmptyArray:e=>assertType(is.nonEmptyArray(e),"non-empty array",e),emptyString:e=>assertType(is.emptyString(e),"empty string",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),emptyObject:e=>assertType(is.emptyObject(e),"empty object",e),nonEmptyObject:e=>assertType(is.nonEmptyObject(e),"non-empty object",e),emptySet:e=>assertType(is.emptySet(e),"empty set",e),nonEmptySet:e=>assertType(is.nonEmptySet(e),"non-empty set",e),emptyMap:e=>assertType(is.emptyMap(e),"empty map",e),nonEmptyMap:e=>assertType(is.nonEmptyMap(e),"non-empty map",e),propertyKey:e=>assertType(is.propertyKey(e),"PropertyKey",e),formData:e=>assertType(is.formData(e),"FormData",e),urlSearchParams:e=>assertType(is.urlSearchParams(e),"URLSearchParams",e),evenInteger:e=>assertType(is.evenInteger(e),"even integer",e),oddInteger:e=>assertType(is.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>assertType(is.directInstanceOf(e,t),"T",e),inRange:(e,t)=>assertType(is.inRange(e,t),"in range",e),any:(e,...t)=>assertType(is.any(e,...t),"predicate returns truthy for any value",t,{multipleValues:true}),all:(e,...t)=>assertType(is.all(e,...t),"predicate returns truthy for all values",t,{multipleValues:true})};Object.defineProperties(is,{class:{value:is.class_},function:{value:is.function_},null:{value:is.null_}});Object.defineProperties(t.assert,{class:{value:t.assert.class_},function:{value:t.assert.function_},null:{value:t.assert.null_}});t["default"]=is;e.exports=is;e.exports["default"]=is;e.exports.assert=t.assert},8097:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(6214);const n=r(3837);const o=Number(process.versions.node.split(".")[0]);const timer=e=>{if(e.timings){return e.timings}const t={start:Date.now(),socket:undefined,lookup:undefined,connect:undefined,secureConnect:undefined,upload:undefined,response:undefined,end:undefined,error:undefined,abort:undefined,phases:{wait:undefined,dns:undefined,tcp:undefined,tls:undefined,request:undefined,firstByte:undefined,download:undefined,total:undefined}};e.timings=t;const handleError=e=>{const r=e.emit.bind(e);e.emit=(s,...n)=>{if(s==="error"){t.error=Date.now();t.phases.total=t.error-t.start;e.emit=r}return r(s,...n)}};handleError(e);const onAbort=()=>{t.abort=Date.now();if(!t.response||o>=13){t.phases.total=Date.now()-t.start}};e.prependOnceListener("abort",onAbort);const onSocket=e=>{t.socket=Date.now();t.phases.wait=t.socket-t.start;if(n.types.isProxy(e)){return}const lookupListener=()=>{t.lookup=Date.now();t.phases.dns=t.lookup-t.socket};e.prependOnceListener("lookup",lookupListener);s.default(e,{connect:()=>{t.connect=Date.now();if(t.lookup===undefined){e.removeListener("lookup",lookupListener);t.lookup=t.connect;t.phases.dns=t.lookup-t.socket}t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now();t.phases.tls=t.secureConnect-t.connect}})};if(e.socket){onSocket(e.socket)}else{e.prependOnceListener("socket",onSocket)}const onUpload=()=>{var e;t.upload=Date.now();t.phases.request=t.upload-((e=t.secureConnect)!==null&&e!==void 0?e:t.connect)};const writableFinished=()=>{if(typeof e.writableFinished==="boolean"){return e.writableFinished}return e.finished&&e.outputSize===0&&(!e.socket||e.socket.writableLength===0)};if(writableFinished()){onUpload()}else{e.prependOnceListener("finish",onUpload)}e.prependOnceListener("response",(e=>{t.response=Date.now();t.phases.firstByte=t.response-t.upload;e.timings=t;handleError(e);e.prependOnceListener("end",(()=>{t.end=Date.now();t.phases.download=t.end-t.response;t.phases.total=t.end-t.start}));e.prependOnceListener("aborted",onAbort)}));return t};t["default"]=timer;e.exports=timer;e.exports["default"]=timer},2286:(e,t,r)=>{"use strict";const{V4MAPPED:s,ADDRCONFIG:n,ALL:o,promises:{Resolver:i},lookup:a}=r(9523);const{promisify:c}=r(3837);const u=r(2037);const l=Symbol("cacheableLookupCreateConnection");const h=Symbol("cacheableLookupInstance");const d=Symbol("expires");const p=typeof o==="number";const verifyAgent=e=>{if(!(e&&typeof e.createConnection==="function")){throw new Error("Expected an Agent instance as the first argument")}};const map4to6=e=>{for(const t of e){if(t.family===6){continue}t.address=`::ffff:${t.address}`;t.family=6}};const getIfaceInfo=()=>{let e=false;let t=false;for(const r of Object.values(u.networkInterfaces())){for(const s of r){if(s.internal){continue}if(s.family==="IPv6"){t=true}else{e=true}if(e&&t){return{has4:e,has6:t}}}}return{has4:e,has6:t}};const isIterable=e=>Symbol.iterator in e;const m={ttl:true};const y={all:true};class CacheableLookup{constructor({cache:e=new Map,maxTtl:t=Infinity,fallbackDuration:r=3600,errorTtl:s=.15,resolver:n=new i,lookup:o=a}={}){this.maxTtl=t;this.errorTtl=s;this._cache=e;this._resolver=n;this._dnsLookup=c(o);if(this._resolver instanceof i){this._resolve4=this._resolver.resolve4.bind(this._resolver);this._resolve6=this._resolver.resolve6.bind(this._resolver)}else{this._resolve4=c(this._resolver.resolve4.bind(this._resolver));this._resolve6=c(this._resolver.resolve6.bind(this._resolver))}this._iface=getIfaceInfo();this._pending={};this._nextRemovalTime=false;this._hostnamesToFallback=new Set;if(r<1){this._fallback=false}else{this._fallback=true;const e=setInterval((()=>{this._hostnamesToFallback.clear()}),r*1e3);if(e.unref){e.unref()}}this.lookup=this.lookup.bind(this);this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear();this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,r){if(typeof t==="function"){r=t;t={}}else if(typeof t==="number"){t={family:t}}if(!r){throw new Error("Callback must be a function.")}this.lookupAsync(e,t).then((e=>{if(t.all){r(null,e)}else{r(null,e.address,e.family,e.expires,e.ttl)}}),r)}async lookupAsync(e,t={}){if(typeof t==="number"){t={family:t}}let r=await this.query(e);if(t.family===6){const e=r.filter((e=>e.family===6));if(t.hints&s){if(p&&t.hints&o||e.length===0){map4to6(r)}else{r=e}}else{r=e}}else if(t.family===4){r=r.filter((e=>e.family===4))}if(t.hints&n){const{_iface:e}=this;r=r.filter((t=>t.family===6?e.has6:e.has4))}if(r.length===0){const t=new Error(`cacheableLookup ENOTFOUND ${e}`);t.code="ENOTFOUND";t.hostname=e;throw t}if(t.all){return r}return r[0]}async query(e){let t=await this._cache.get(e);if(!t){const r=this._pending[e];if(r){t=await r}else{const r=this.queryAndCache(e);this._pending[e]=r;try{t=await r}finally{delete this._pending[e]}}}t=t.map((e=>({...e})));return t}async _resolve(e){const wrap=async e=>{try{return await e}catch(e){if(e.code==="ENODATA"||e.code==="ENOTFOUND"){return[]}throw e}};const[t,r]=await Promise.all([this._resolve4(e,m),this._resolve6(e,m)].map((e=>wrap(e))));let s=0;let n=0;let o=0;const i=Date.now();for(const e of t){e.family=4;e.expires=i+e.ttl*1e3;s=Math.max(s,e.ttl)}for(const e of r){e.family=6;e.expires=i+e.ttl*1e3;n=Math.max(n,e.ttl)}if(t.length>0){if(r.length>0){o=Math.min(s,n)}else{o=s}}else{o=n}return{entries:[...t,...r],cacheTtl:o}}async _lookup(e){try{const t=await this._dnsLookup(e,{all:true});return{entries:t,cacheTtl:0}}catch(e){return{entries:[],cacheTtl:0}}}async _set(e,t,r){if(this.maxTtl>0&&r>0){r=Math.min(r,this.maxTtl)*1e3;t[d]=Date.now()+r;try{await this._cache.set(e,t,r)}catch(e){this.lookupAsync=async()=>{const t=new Error("Cache Error. Please recreate the CacheableLookup instance.");t.cause=e;throw t}}if(isIterable(this._cache)){this._tick(r)}}}async queryAndCache(e){if(this._hostnamesToFallback.has(e)){return this._dnsLookup(e,y)}let t=await this._resolve(e);if(t.entries.length===0&&this._fallback){t=await this._lookup(e);if(t.entries.length!==0){this._hostnamesToFallback.add(e)}}const r=t.entries.length===0?this.errorTtl:t.cacheTtl;await this._set(e,t.entries,r);return t.entries}_tick(e){const t=this._nextRemovalTime;if(!t||e{this._nextRemovalTime=false;let e=Infinity;const t=Date.now();for(const[r,s]of this._cache){const n=s[d];if(t>=n){this._cache.delete(r)}else if(n{if(!("lookup"in t)){t.lookup=this.lookup}return e[l](t,r)}}uninstall(e){verifyAgent(e);if(e[l]){if(e[h]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[h]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=getIfaceInfo();if(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6){this._cache.clear()}}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}}e.exports=CacheableLookup;e.exports["default"]=CacheableLookup},8116:(e,t,r)=>{"use strict";const s=r(2361);const n=r(7310);const o=r(7952);const i=r(1766);const a=r(1002);const c=r(9004);const u=r(9662);const l=r(1312);const h=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new h({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let h;if(typeof t==="string"){h=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){h=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";h=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(h)};t.headers=u(t.headers);const d=new s;const p=o(n.format(h),{stripWWW:false,removeTrailingSlash:false,stripAuthentication:false});const m=`${t.method}:${p}`;let y=false;let g=false;const makeRequest=t=>{g=true;let s=false;let n;const o=new Promise((e=>{n=()=>{if(!s){s=true;e()}}}));const handler=e=>{if(y&&!t.forceRefresh){e.status=e.statusCode;const r=a.fromObject(y.cachePolicy).revalidatedPolicy(t,e);if(!r.modified){const t=r.policy.responseHeaders();e=new c(y.statusCode,t,y.body,y.url);e.cachePolicy=r.policy;e.fromCache=true}}if(!e.fromCache){e.cachePolicy=new a(t,e,t);e.fromCache=false}let n;if(t.cache&&e.cachePolicy.storable()){n=l(e);(async()=>{try{const r=i.buffer(e);await Promise.race([o,new Promise((t=>e.once("end",t)))]);if(s){return}const n=await r;const a={cachePolicy:e.cachePolicy.toObject(),url:e.url,statusCode:e.fromCache?y.statusCode:e.statusCode,body:n};let c=t.strictTtl?e.cachePolicy.timeToLive():undefined;if(t.maxTtl){c=c?Math.min(c,t.maxTtl):t.maxTtl}await this.cache.set(m,a,c)}catch(e){d.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){d.emit("error",new CacheableRequest.CacheError(e))}})()}d.emit("response",n||e);if(typeof r==="function"){r(n||e)}};try{const r=e(t,handler);r.once("error",n);r.once("abort",n);d.emit("request",r)}catch(e){d.emit("error",new CacheableRequest.RequestError(e))}};(async()=>{const get=async e=>{await Promise.resolve();const t=e.cache?await this.cache.get(m):undefined;if(typeof t==="undefined"){return makeRequest(e)}const s=a.fromObject(t.cachePolicy);if(s.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=s.responseHeaders();const n=new c(t.statusCode,e,t.body,t.url);n.cachePolicy=s;n.fromCache=true;d.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>d.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);d.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}d.emit("error",new CacheableRequest.CacheError(e))}})();return d}}}function urlObjectToRequestOptions(e){const t={...e};t.path=`${e.pathname||"/"}${e.search||""}`;delete t.pathname;delete t.search;return t}function normalizeUrlObject(e){return{protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}}CacheableRequest.RequestError=class extends Error{constructor(e){super(e.message);this.name="RequestError";Object.assign(this,e)}};CacheableRequest.CacheError=class extends Error{constructor(e){super(e.message);this.name="CacheError";Object.assign(this,e)}};e.exports=CacheableRequest},1312:(e,t,r)=>{"use strict";const s=r(2781).PassThrough;const n=r(2610);const cloneResponse=e=>{if(!(e&&e.pipe)){throw new TypeError("Parameter `response` must be a response stream.")}const t=new s;n(e,t);return e.pipe(t)};e.exports=cloneResponse},2391:(e,t,r)=>{"use strict";const{Transform:s,PassThrough:n}=r(2781);const o=r(9796);const i=r(3877);e.exports=e=>{const t=(e.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(t)){return e}const r=t==="br";if(r&&typeof o.createBrotliDecompress!=="function"){e.destroy(new Error("Brotli is not supported on Node.js < 12"));return e}let a=true;const c=new s({transform(e,t,r){a=false;r(null,e)},flush(e){e()}});const u=new n({autoDestroy:false,destroy(t,r){e.destroy();r(t)}});const l=r?o.createBrotliDecompress():o.createUnzip();l.once("error",(t=>{if(a&&!e.readable){u.end();return}u.destroy(t)}));i(e,u);e.pipe(c).pipe(l).pipe(u);return u}},3877:e=>{"use strict";const t=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];e.exports=(e,r)=>{if(r._readableState.autoDestroy){throw new Error("The second stream must have the `autoDestroy` option set to `false`")}const s=new Set(Object.keys(e).concat(t));const n={};for(const t of s){if(t in r){continue}n[t]={get(){const r=e[t];const s=typeof r==="function";return s?r.bind(e):r},set(r){e[t]=r},enumerable:true,configurable:false}}Object.defineProperties(r,n);e.once("aborted",(()=>{r.destroy();r.emit("aborted")}));e.once("close",(()=>{if(e.complete){if(r.readable){r.once("end",(()=>{r.emit("close")}))}else{r.emit("close")}}else{r.emit("close")}}));return r}},6214:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function isTLSSocket(e){return e.encrypted}const deferToConnect=(e,t)=>{let r;if(typeof t==="function"){const e=t;r={connect:e}}else{r=t}const s=typeof r.connect==="function";const n=typeof r.secureConnect==="function";const o=typeof r.close==="function";const onConnect=()=>{if(s){r.connect()}if(isTLSSocket(e)&&n){if(e.authorized){r.secureConnect()}else if(!e.authorizationError){e.once("secureConnect",r.secureConnect)}}if(o){e.once("close",r.close)}};if(e.writable&&!e.connecting){onConnect()}else if(e.connecting){e.once("connect",onConnect)}else if(e.destroyed&&o){r.close(e._hadError)}};t["default"]=deferToConnect;e.exports=deferToConnect;e.exports["default"]=deferToConnect},1205:(e,t,r)=>{var s=r(1223);var noop=function(){};var isRequest=function(e){return e.setHeader&&typeof e.abort==="function"};var isChildProcess=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3};var eos=function(e,t,r){if(typeof t==="function")return eos(e,null,t);if(!t)t={};r=s(r||noop);var n=e._writableState;var o=e._readableState;var i=t.readable||t.readable!==false&&e.readable;var a=t.writable||t.writable!==false&&e.writable;var c=false;var onlegacyfinish=function(){if(!e.writable)onfinish()};var onfinish=function(){a=false;if(!i)r.call(e)};var onend=function(){i=false;if(!a)r.call(e)};var onexit=function(t){r.call(e,t?new Error("exited with error code: "+t):null)};var onerror=function(t){r.call(e,t)};var onclose=function(){process.nextTick(onclosenexttick)};var onclosenexttick=function(){if(c)return;if(i&&!(o&&(o.ended&&!o.destroyed)))return r.call(e,new Error("premature close"));if(a&&!(n&&(n.ended&&!n.destroyed)))return r.call(e,new Error("premature close"))};var onrequest=function(){e.req.on("finish",onfinish)};if(isRequest(e)){e.on("complete",onfinish);e.on("abort",onclose);if(e.req)onrequest();else e.on("request",onrequest)}else if(a&&!n){e.on("end",onlegacyfinish);e.on("close",onlegacyfinish)}if(isChildProcess(e))e.on("exit",onexit);e.on("end",onend);e.on("finish",onfinish);if(t.error!==false)e.on("error",onerror);e.on("close",onclose);return function(){c=true;e.removeListener("complete",onfinish);e.removeListener("abort",onclose);e.removeListener("request",onrequest);if(e.req)e.req.removeListener("finish",onfinish);e.removeListener("end",onlegacyfinish);e.removeListener("close",onlegacyfinish);e.removeListener("finish",onfinish);e.removeListener("exit",onexit);e.removeListener("end",onend);e.removeListener("error",onerror);e.removeListener("close",onclose)}};e.exports=eos},1585:(e,t,r)=>{"use strict";const{PassThrough:s}=r(2781);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const n=r==="buffer";let o=false;if(t){o=!(r||n)}else{r=r||"utf8"}if(n){r=null}const i=new s({objectMode:o});if(r){i.setEncoding(r)}let a=0;const c=[];i.on("data",(e=>{c.push(e);if(o){a=c.length}else{a+=e.length}}));i.getBufferedValue=()=>{if(t){return c}return n?Buffer.concat(c,a):c.join("")};i.getBufferedLength=()=>a;return i}},1766:(e,t,r)=>{"use strict";const{constants:s}=r(4300);const n=r(8341);const o=r(1585);class MaxBufferError extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}async function getStream(e,t){if(!e){return Promise.reject(new Error("Expected a stream"))}t={maxBuffer:Infinity,...t};const{maxBuffer:r}=t;let i;await new Promise(((a,c)=>{const rejectPromise=e=>{if(e&&i.getBufferedLength()<=s.MAX_LENGTH){e.bufferedData=i.getBufferedValue()}c(e)};i=n(e,o(t),(e=>{if(e){rejectPromise(e);return}a()}));i.on("data",(()=>{if(i.getBufferedLength()>r){rejectPromise(new MaxBufferError)}}))}));return i.getBufferedValue()}e.exports=getStream;e.exports["default"]=getStream;e.exports.buffer=(e,t)=>getStream(e,{...t,encoding:"buffer"});e.exports.array=(e,t)=>getStream(e,{...t,array:true});e.exports.MaxBufferError=MaxBufferError},6457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4597);function createRejection(e,...t){const r=(async()=>{if(e instanceof s.RequestError){try{for(const r of t){if(r){for(const t of r){e=await t(e)}}}}catch(t){e=t}}throw e})();const returnPromise=()=>r;r.json=returnPromise;r.text=returnPromise;r.buffer=returnPromise;r.on=returnPromise;return r}t["default"]=createRejection},6056:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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});const o=r(2361);const i=r(7678);const a=r(9072);const c=r(4597);const u=r(8220);const l=r(94);const h=r(3021);const d=r(4500);const p=r(9298);const m=["request","response","redirect","uploadProgress","downloadProgress"];function asPromise(e){let t;let r;const s=new o.EventEmitter;const n=new a(((o,a,y)=>{const makeRequest=g=>{const v=new l.default(undefined,e);v.retryCount=g;v._noPipe=true;y((()=>v.destroy()));y.shouldReject=false;y((()=>a(new c.CancelError(v))));t=v;v.once("response",(async e=>{var t;e.retryCount=g;if(e.request.aborted){return}let s;try{s=await d.default(v);e.rawBody=s}catch(e){return}if(v._isAboutToError){return}const n=((t=e.headers["content-encoding"])!==null&&t!==void 0?t:"").toLowerCase();const i=["gzip","deflate","br"].includes(n);const{options:a}=v;if(i&&!a.decompress){e.body=s}else{try{e.body=u.default(e,a.responseType,a.parseJson,a.encoding)}catch(t){e.body=s.toString();if(p.isResponseOk(e)){v._beforeError(t);return}}}try{for(const[t,r]of a.hooks.afterResponse.entries()){e=await r(e,(async e=>{const r=l.default.normalizeArguments(undefined,{...e,retry:{calculateDelay:()=>0},throwHttpErrors:false,resolveBodyOnly:false},a);r.hooks.afterResponse=r.hooks.afterResponse.slice(0,t);for(const e of r.hooks.beforeRetry){await e(r)}const s=asPromise(r);y((()=>{s.catch((()=>{}));s.cancel()}));return s}))}}catch(e){v._beforeError(new c.RequestError(e.message,e,v));return}r=e;if(!p.isResponseOk(e)){v._beforeError(new c.HTTPError(e));return}v.destroy();o(v.options.resolveBodyOnly?e.body:e)}));const onError=e=>{if(n.isCanceled){return}const{options:t}=v;if(e instanceof c.HTTPError&&!t.throwHttpErrors){const{response:t}=e;o(v.options.resolveBodyOnly?t.body:t);return}a(e)};v.once("error",onError);const _=v.options.body;v.once("retry",((e,t)=>{var r,s;if(_===((r=t.request)===null||r===void 0?void 0:r.options.body)&&i.default.nodeStream((s=t.request)===null||s===void 0?void 0:s.options.body)){onError(t);return}makeRequest(e)}));h.default(v,s,m)};makeRequest(0)}));n.on=(e,t)=>{s.on(e,t);return n};const shortcut=e=>{const t=(async()=>{await n;const{options:t}=r.request;return u.default(r,e,t.parseJson,t.encoding)})();Object.defineProperties(t,Object.getOwnPropertyDescriptors(n));return t};n.json=()=>{const{headers:e}=t.options;if(!t.writableFinished&&e.accept===undefined){e.accept="application/json"}return shortcut("json")};n.buffer=()=>shortcut("buffer");n.text=()=>shortcut("text");return n}t["default"]=asPromise;n(r(4597),t)},1048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7678);const normalizeArguments=(e,t)=>{if(s.default.null_(e.encoding)){throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead")}s.assert.any([s.default.string,s.default.undefined],e.encoding);s.assert.any([s.default.boolean,s.default.undefined],e.resolveBodyOnly);s.assert.any([s.default.boolean,s.default.undefined],e.methodRewriting);s.assert.any([s.default.boolean,s.default.undefined],e.isStream);s.assert.any([s.default.string,s.default.undefined],e.responseType);if(e.responseType===undefined){e.responseType="text"}const{retry:r}=e;if(t){e.retry={...t.retry}}else{e.retry={calculateDelay:e=>e.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:undefined}}if(s.default.object(r)){e.retry={...e.retry,...r};e.retry.methods=[...new Set(e.retry.methods.map((e=>e.toUpperCase())))];e.retry.statusCodes=[...new Set(e.retry.statusCodes)];e.retry.errorCodes=[...new Set(e.retry.errorCodes)]}else if(s.default.number(r)){e.retry.limit=r}if(s.default.undefined(e.retry.maxRetryAfter)){e.retry.maxRetryAfter=Math.min(...[e.timeout.request,e.timeout.connect].filter(s.default.number))}if(s.default.object(e.pagination)){if(t){e.pagination={...t.pagination,...e.pagination}}const{pagination:r}=e;if(!s.default.function_(r.transform)){throw new Error("`options.pagination.transform` must be implemented")}if(!s.default.function_(r.shouldContinue)){throw new Error("`options.pagination.shouldContinue` must be implemented")}if(!s.default.function_(r.filter)){throw new TypeError("`options.pagination.filter` must be implemented")}if(!s.default.function_(r.paginate)){throw new Error("`options.pagination.paginate` must be implemented")}}if(e.responseType==="json"&&e.headers.accept===undefined){e.headers.accept="application/json"}return e};t["default"]=normalizeArguments},8220:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(4597);const parseBody=(e,t,r,n)=>{const{rawBody:o}=e;try{if(t==="text"){return o.toString(n)}if(t==="json"){return o.length===0?"":r(o.toString())}if(t==="buffer"){return o}throw new s.ParseError({message:`Unknown body type '${t}'`,name:"Error"},e)}catch(t){throw new s.ParseError(t,e)}};t["default"]=parseBody},4597:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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.CancelError=t.ParseError=void 0;const o=r(94);class ParseError extends o.RequestError{constructor(e,t){const{options:r}=t.request;super(`${e.message} in "${r.url.toString()}"`,e,t.request);this.name="ParseError";this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_BODY_PARSE_FAILURE":this.code}}t.ParseError=ParseError;class CancelError extends o.RequestError{constructor(e){super("Promise was canceled",{},e);this.name="CancelError";this.code="ERR_CANCELED"}get isCanceled(){return true}}t.CancelError=CancelError;n(r(94),t)},3462:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.retryAfterStatusCodes=void 0;t.retryAfterStatusCodes=new Set([413,429,503]);const calculateRetryDelay=({attemptCount:e,retryOptions:t,error:r,retryAfter:s})=>{if(e>t.limit){return 0}const n=t.methods.includes(r.options.method);const o=t.errorCodes.includes(r.code);const i=r.response&&t.statusCodes.includes(r.response.statusCode);if(!n||!o&&!i){return 0}if(r.response){if(s){if(t.maxRetryAfter===undefined||s>t.maxRetryAfter){return 0}return s}if(r.response.statusCode===413){return 0}}const a=Math.random()*100;return 2**(e-1)*1e3+a};t["default"]=calculateRetryDelay},94:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UnsupportedProtocolError=t.ReadError=t.TimeoutError=t.UploadError=t.CacheError=t.HTTPError=t.MaxRedirectsError=t.RequestError=t.setNonEnumerableProperties=t.knownHookEvents=t.withoutBody=t.kIsNormalizedAlready=void 0;const s=r(3837);const n=r(2781);const o=r(7147);const i=r(7310);const a=r(3685);const c=r(3685);const u=r(5687);const l=r(8097);const h=r(2286);const d=r(8116);const p=r(2391);const m=r(4645);const y=r(9662);const g=r(7678);const v=r(4564);const _=r(40);const E=r(3021);const w=r(2454);const b=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const T=r(4993);const A=r(9298);const C=r(397);const P=r(1048);const k=r(3462);let x;const I=Symbol("request");const $=Symbol("response");const j=Symbol("responseSize");const L=Symbol("downloadedSize");const N=Symbol("bodySize");const q=Symbol("uploadedSize");const U=Symbol("serverResponsesPiped");const D=Symbol("unproxyEvents");const H=Symbol("isFromCache");const M=Symbol("cancelTimeouts");const F=Symbol("startedReading");const B=Symbol("stopReading");const G=Symbol("triggerRead");const z=Symbol("body");const V=Symbol("jobs");const W=Symbol("originalResponse");const Y=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const J=g.default.string(process.versions.brotli);t.withoutBody=new Set(["GET","HEAD"]);t.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function validateSearchParameters(e){for(const t in e){const r=e[t];if(!g.default.string(r)&&!g.default.number(r)&&!g.default.boolean(r)&&!g.default.null_(r)&&!g.default.undefined(r)){throw new TypeError(`The \`searchParams\` value '${String(r)}' must be a string, number, boolean or null`)}}}function isClientRequest(e){return g.default.object(e)&&!("statusCode"in e)}const X=new O.default;const waitForOpenFile=async e=>new Promise(((t,r)=>{const onError=e=>{r(e)};if(!e.pending){t()}e.once("error",onError);e.once("ready",(()=>{e.off("error",onError);t()}))}));const K=new Set([300,301,302,303,304,307,308]);const Z=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of Z){if(!(e in t)){continue}r[e]={writable:true,configurable:true,enumerable:false,value:t[e]}}}Object.defineProperties(t,r)};class RequestError extends Error{constructor(e,t,r){var s,n;super(e);Error.captureStackTrace(this,this.constructor);this.name="RequestError";this.code=(s=t.code)!==null&&s!==void 0?s:"ERR_GOT_REQUEST_ERROR";if(r instanceof Request){Object.defineProperty(this,"request",{enumerable:false,value:r});Object.defineProperty(this,"response",{enumerable:false,value:r[$]});Object.defineProperty(this,"options",{enumerable:false,value:r.options})}else{Object.defineProperty(this,"options",{enumerable:false,value:r})}this.timings=(n=this.request)===null||n===void 0?void 0:n.timings;if(g.default.string(t.stack)&&g.default.string(this.stack)){const e=this.stack.indexOf(this.message)+this.message.length;const r=this.stack.slice(e).split("\n").reverse();const s=t.stack.slice(t.stack.indexOf(t.message)+t.message.length).split("\n").reverse();while(s.length!==0&&s[0]===r[0]){r.shift()}this.stack=`${this.stack.slice(0,e)}${r.reverse().join("\n")}${s.reverse().join("\n")}`}}}t.RequestError=RequestError;class MaxRedirectsError extends RequestError{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e);this.name="MaxRedirectsError";this.code="ERR_TOO_MANY_REDIRECTS"}}t.MaxRedirectsError=MaxRedirectsError;class HTTPError extends RequestError{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request);this.name="HTTPError";this.code="ERR_NON_2XX_3XX_RESPONSE"}}t.HTTPError=HTTPError;class CacheError extends RequestError{constructor(e,t){super(e.message,e,t);this.name="CacheError";this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}}t.CacheError=CacheError;class UploadError extends RequestError{constructor(e,t){super(e.message,e,t);this.name="UploadError";this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}}t.UploadError=UploadError;class TimeoutError extends RequestError{constructor(e,t,r){super(e.message,e,r);this.name="TimeoutError";this.event=e.event;this.timings=t}}t.TimeoutError=TimeoutError;class ReadError extends RequestError{constructor(e,t){super(e.message,e,t);this.name="ReadError";this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code}}t.ReadError=ReadError;class UnsupportedProtocolError extends RequestError{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e);this.name="UnsupportedProtocolError";this.code="ERR_UNSUPPORTED_PROTOCOL"}}t.UnsupportedProtocolError=UnsupportedProtocolError;const Q=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[L]=0;this[q]=0;this.requestInitialized=false;this[U]=new Set;this.redirects=[];this[B]=false;this[G]=false;this[V]=[];this.retryCount=0;this._progressCallbacks=[];const unlockWrite=()=>this._unlockWrite();const lockWrite=()=>this._lockWrite();this.on("pipe",(e=>{e.prependListener("data",unlockWrite);e.on("data",lockWrite);e.prependListener("end",unlockWrite);e.on("end",lockWrite)}));this.on("unpipe",(e=>{e.off("data",unlockWrite);e.off("data",lockWrite);e.off("end",unlockWrite);e.off("end",lockWrite)}));this.on("pipe",(e=>{if(e instanceof c.IncomingMessage){this.options.headers={...e.headers,...this.options.headers}}}));const{json:n,body:i,form:a}=r;if(n||i||a){this._lockWrite()}if(t.kIsNormalizedAlready in r){this.options=r}else{try{this.options=this.constructor.normalizeArguments(e,r,s)}catch(e){if(g.default.nodeStream(r.body)){r.body.destroy()}this.destroy(e);return}}(async()=>{var e;try{if(this.options.body instanceof o.ReadStream){await waitForOpenFile(this.options.body)}const{url:t}=this.options;if(!t){throw new TypeError("Missing `url` property")}this.requestUrl=t.toString();decodeURI(this.requestUrl);await this._finalizeBody();await this._makeRequest();if(this.destroyed){(e=this[I])===null||e===void 0?void 0:e.destroy();return}for(const e of this[V]){e()}this[V].length=0;this.requestInitialized=true}catch(e){if(e instanceof RequestError){this._beforeError(e);return}if(!this.destroyed){this.destroy(e)}}})()}static normalizeArguments(e,r,n){var o,a,c,u,l;const p=r;if(g.default.object(e)&&!g.default.urlInstance(e)){r={...n,...e,...r}}else{if(e&&r&&r.url!==undefined){throw new TypeError("The `url` option is mutually exclusive with the `input` argument")}r={...n,...r};if(e!==undefined){r.url=e}if(g.default.urlInstance(r.url)){r.url=new i.URL(r.url.toString())}}if(r.cache===false){r.cache=undefined}if(r.dnsCache===false){r.dnsCache=undefined}g.assert.any([g.default.string,g.default.undefined],r.method);g.assert.any([g.default.object,g.default.undefined],r.headers);g.assert.any([g.default.string,g.default.urlInstance,g.default.undefined],r.prefixUrl);g.assert.any([g.default.object,g.default.undefined],r.cookieJar);g.assert.any([g.default.object,g.default.string,g.default.undefined],r.searchParams);g.assert.any([g.default.object,g.default.string,g.default.undefined],r.cache);g.assert.any([g.default.object,g.default.number,g.default.undefined],r.timeout);g.assert.any([g.default.object,g.default.undefined],r.context);g.assert.any([g.default.object,g.default.undefined],r.hooks);g.assert.any([g.default.boolean,g.default.undefined],r.decompress);g.assert.any([g.default.boolean,g.default.undefined],r.ignoreInvalidCookies);g.assert.any([g.default.boolean,g.default.undefined],r.followRedirect);g.assert.any([g.default.number,g.default.undefined],r.maxRedirects);g.assert.any([g.default.boolean,g.default.undefined],r.throwHttpErrors);g.assert.any([g.default.boolean,g.default.undefined],r.http2);g.assert.any([g.default.boolean,g.default.undefined],r.allowGetBody);g.assert.any([g.default.string,g.default.undefined],r.localAddress);g.assert.any([T.isDnsLookupIpVersion,g.default.undefined],r.dnsLookupIpVersion);g.assert.any([g.default.object,g.default.undefined],r.https);g.assert.any([g.default.boolean,g.default.undefined],r.rejectUnauthorized);if(r.https){g.assert.any([g.default.boolean,g.default.undefined],r.https.rejectUnauthorized);g.assert.any([g.default.function_,g.default.undefined],r.https.checkServerIdentity);g.assert.any([g.default.string,g.default.object,g.default.array,g.default.undefined],r.https.certificateAuthority);g.assert.any([g.default.string,g.default.object,g.default.array,g.default.undefined],r.https.key);g.assert.any([g.default.string,g.default.object,g.default.array,g.default.undefined],r.https.certificate);g.assert.any([g.default.string,g.default.undefined],r.https.passphrase);g.assert.any([g.default.string,g.default.buffer,g.default.array,g.default.undefined],r.https.pfx)}g.assert.any([g.default.object,g.default.undefined],r.cacheOptions);if(g.default.string(r.method)){r.method=r.method.toUpperCase()}else{r.method="GET"}if(r.headers===(n===null||n===void 0?void 0:n.headers)){r.headers={...r.headers}}else{r.headers=y({...n===null||n===void 0?void 0:n.headers,...r.headers})}if("slashes"in r){throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.")}if("auth"in r){throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.")}if("searchParams"in r){if(r.searchParams&&r.searchParams!==(n===null||n===void 0?void 0:n.searchParams)){let e;if(g.default.string(r.searchParams)||r.searchParams instanceof i.URLSearchParams){e=new i.URLSearchParams(r.searchParams)}else{validateSearchParameters(r.searchParams);e=new i.URLSearchParams;for(const t in r.searchParams){const s=r.searchParams[t];if(s===null){e.append(t,"")}else if(s!==undefined){e.append(t,s)}}}(o=n===null||n===void 0?void 0:n.searchParams)===null||o===void 0?void 0:o.forEach(((t,r)=>{if(!e.has(r)){e.append(r,t)}}));r.searchParams=e}}r.username=(a=r.username)!==null&&a!==void 0?a:"";r.password=(c=r.password)!==null&&c!==void 0?c:"";if(g.default.undefined(r.prefixUrl)){r.prefixUrl=(u=n===null||n===void 0?void 0:n.prefixUrl)!==null&&u!==void 0?u:""}else{r.prefixUrl=r.prefixUrl.toString();if(r.prefixUrl!==""&&!r.prefixUrl.endsWith("/")){r.prefixUrl+="/"}}if(g.default.string(r.url)){if(r.url.startsWith("/")){throw new Error("`input` must not start with a slash when using `prefixUrl`")}r.url=R.default(r.prefixUrl+r.url,r)}else if(g.default.undefined(r.url)&&r.prefixUrl!==""||r.protocol){r.url=R.default(r.prefixUrl,r)}if(r.url){if("port"in r){delete r.port}let{prefixUrl:e}=r;Object.defineProperty(r,"prefixUrl",{set:t=>{const s=r.url;if(!s.href.startsWith(t)){throw new Error(`Cannot change \`prefixUrl\` from ${e} to ${t}: ${s.href}`)}r.url=new i.URL(t+s.href.slice(e.length));e=t},get:()=>e});let{protocol:t}=r.url;if(t==="unix:"){t="http:";r.url=new i.URL(`http://unix${r.url.pathname}${r.url.search}`)}if(r.searchParams){r.url.search=r.searchParams.toString()}if(t!=="http:"&&t!=="https:"){throw new UnsupportedProtocolError(r)}if(r.username===""){r.username=r.url.username}else{r.url.username=r.username}if(r.password===""){r.password=r.url.password}else{r.url.password=r.password}}const{cookieJar:m}=r;if(m){let{setCookie:e,getCookieString:t}=m;g.assert.function_(e);g.assert.function_(t);if(e.length===4&&t.length===0){e=s.promisify(e.bind(r.cookieJar));t=s.promisify(t.bind(r.cookieJar));r.cookieJar={setCookie:e,getCookieString:t}}}const{cache:v}=r;if(v){if(!X.has(v)){X.set(v,new d(((e,t)=>{const r=e[I](e,t);if(g.default.promise(r)){r.once=(e,t)=>{if(e==="error"){r.catch(t)}else if(e==="abort"){(async()=>{try{const e=await r;e.once("abort",t)}catch(e){}})()}else{throw new Error(`Unknown HTTP2 promise event: ${e}`)}return r}}return r}),v))}}r.cacheOptions={...r.cacheOptions};if(r.dnsCache===true){if(!x){x=new h.default}r.dnsCache=x}else if(!g.default.undefined(r.dnsCache)&&!r.dnsCache.lookup){throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${g.default(r.dnsCache)}`)}if(g.default.number(r.timeout)){r.timeout={request:r.timeout}}else if(n&&r.timeout!==n.timeout){r.timeout={...n.timeout,...r.timeout}}else{r.timeout={...r.timeout}}if(!r.context){r.context={}}const _=r.hooks===(n===null||n===void 0?void 0:n.hooks);r.hooks={...r.hooks};for(const e of t.knownHookEvents){if(e in r.hooks){if(g.default.array(r.hooks[e])){r.hooks[e]=[...r.hooks[e]]}else{throw new TypeError(`Parameter \`${e}\` must be an Array, got ${g.default(r.hooks[e])}`)}}else{r.hooks[e]=[]}}if(n&&!_){for(const e of t.knownHookEvents){const t=n.hooks[e];if(t.length>0){r.hooks[e]=[...n.hooks[e],...r.hooks[e]]}}}if("family"in r){C.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"')}if(n===null||n===void 0?void 0:n.https){r.https={...n.https,...r.https}}if("rejectUnauthorized"in r){C.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){C.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){C.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){C.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){C.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){C.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){C.default('"options.pfx" was never documented, please use "options.https.pfx"')}if("followRedirects"in r){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}if(r.agent){for(const e in r.agent){if(e!=="http"&&e!=="https"&&e!=="http2"){throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${e}\``)}}}r.maxRedirects=(l=r.maxRedirects)!==null&&l!==void 0?l:0;t.setNonEnumerableProperties([n,p],r);return P.default(r,n)}_lockWrite(){const onLockedWrite=()=>{throw new TypeError("The payload has been already provided")};this.write=onLockedWrite;this.end=onLockedWrite}_unlockWrite(){this.write=super.write;this.end=super.end}async _finalizeBody(){const{options:e}=this;const{headers:r}=e;const s=!g.default.undefined(e.form);const o=!g.default.undefined(e.json);const a=!g.default.undefined(e.body);const c=s||o||a;const u=t.withoutBody.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);this._cannotHaveBody=u;if(c){if(u){throw new TypeError(`The \`${e.method}\` method cannot be used with a body`)}if([a,s,o].filter((e=>e)).length>1){throw new TypeError("The `body`, `json` and `form` options are mutually exclusive")}if(a&&!(e.body instanceof n.Readable)&&!g.default.string(e.body)&&!g.default.buffer(e.body)&&!_.default(e.body)){throw new TypeError("The `body` option must be a stream.Readable, string or Buffer")}if(s&&!g.default.object(e.form)){throw new TypeError("The `form` option must be an Object")}{const t=!g.default.string(r["content-type"]);if(a){if(_.default(e.body)&&t){r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`}this[z]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[z]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[z]=e.stringifyJson(e.json)}const n=await v.default(this[z],e.headers);if(g.default.undefined(r["content-length"])&&g.default.undefined(r["transfer-encoding"])){if(!u&&!g.default.undefined(n)){r["content-length"]=String(n)}}}}else if(u){this._lockWrite()}else{this._unlockWrite()}this[N]=Number(r["content-length"])||undefined}async _onResponseBase(e){const{options:t}=this;const{url:r}=t;this[W]=e;if(t.decompress){e=p(e)}const s=e.statusCode;const n=e;n.statusMessage=n.statusMessage?n.statusMessage:a.STATUS_CODES[s];n.url=t.url.toString();n.requestUrl=this.requestUrl;n.redirectUrls=this.redirects;n.request=this;n.isFromCache=e.fromCache||false;n.ip=this.ip;n.retryCount=this.retryCount;this[H]=n.isFromCache;this[j]=Number(e.headers["content-length"])||undefined;this[$]=e;e.once("end",(()=>{this[j]=this[L];this.emit("downloadProgress",this.downloadProgress)}));e.once("error",(t=>{e.destroy();this._beforeError(new ReadError(t,this))}));e.once("aborted",(()=>{this._beforeError(new ReadError({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}));this.emit("downloadProgress",this.downloadProgress);const o=e.headers["set-cookie"];if(g.default.object(t.cookieJar)&&o){let c=o.map((async e=>t.cookieJar.setCookie(e,r.toString())));if(t.ignoreInvalidCookies){c=c.map((async e=>e.catch((()=>{}))))}try{await Promise.all(c)}catch(u){this._beforeError(u);return}}if(t.followRedirect&&e.headers.location&&K.has(s)){e.resume();if(this[I]){this[M]();delete this[I];this[D]()}const l=s===303&&t.method!=="GET"&&t.method!=="HEAD";if(l||!t.methodRewriting){t.method="GET";if("body"in t){delete t.body}if("json"in t){delete t.json}if("form"in t){delete t.form}this[z]=undefined;delete t.headers["content-length"]}if(this.redirects.length>=t.maxRedirects){this._beforeError(new MaxRedirectsError(this));return}try{const h=Buffer.from(e.headers.location,"binary").toString();const d=new i.URL(h,r);const m=d.toString();decodeURI(m);function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}if(!isUnixSocketURL(r)&&isUnixSocketURL(d)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}if(d.hostname!==r.hostname||d.port!==r.port){if("host"in t.headers){delete t.headers.host}if("cookie"in t.headers){delete t.headers.cookie}if("authorization"in t.headers){delete t.headers.authorization}if(t.username||t.password){t.username="";t.password=""}}else{d.username=t.username;d.password=t.password}this.redirects.push(m);t.url=d;for(const y of t.hooks.beforeRedirect){await y(t,n)}this.emit("redirect",n,t);await this._makeRequest()}catch(v){this._beforeError(v);return}return}if(t.isStream&&t.throwHttpErrors&&!A.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[G]){this._read()}}));this.on("resume",(()=>{e.resume()}));this.on("pause",(()=>{e.pause()}));e.once("end",(()=>{this.push(null)}));this.emit("response",e);for(const _ of this[U]){if(_.headersSent){continue}for(const E in e.headers){const w=t.decompress?E!=="content-encoding":true;const b=e.headers[E];if(w){_.setHeader(E,b)}}_.statusCode=s}}async _onResponse(e){try{await this._onResponseBase(e)}catch(e){this._beforeError(e)}}_onRequest(e){const{options:t}=this;const{timeout:r,url:s}=t;l.default(e);this[M]=w.default(e,r,s);const n=t.cache?"cacheableResponse":"response";e.once(n,(e=>{void this._onResponse(e)}));e.once("error",(t=>{var r;e.destroy();(r=e.res)===null||r===void 0?void 0:r.removeAllListeners("end");t=t instanceof w.TimeoutError?new TimeoutError(t,this.timings,this):new RequestError(t.message,t,this);this._beforeError(t)}));this[D]=E.default(e,this,Q);this[I]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[z];const i=this.redirects.length===0?this:e;if(g.default.nodeStream(o)){o.pipe(i);o.once("error",(e=>{this._beforeError(new UploadError(e,this))}))}else{this._unlockWrite();if(!g.default.undefined(o)){this._writeRequest(o,undefined,(()=>{}));i.end();this._lockWrite()}else if(this._cannotHaveBody||this._noPipe){i.end();this._lockWrite()}}this.emit("request",e)}async _createCacheableRequest(e,t){return new Promise(((r,s)=>{Object.assign(t,b.default(e));delete t.url;let n;const o=X.get(t.cache)(t,(async e=>{e._readableState.autoDestroy=false;if(n){(await n).emit("cacheableResponse",e)}r(e)}));t.url=e;o.once("error",s);o.once("request",(async e=>{n=e;r(n)}))}))}async _makeRequest(){var e,t,r,s,n;const{options:o}=this;const{headers:i}=o;for(const e in i){if(g.default.undefined(i[e])){delete i[e]}else if(g.default.null_(i[e])){throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${e}\` header`)}}if(o.decompress&&g.default.undefined(i["accept-encoding"])){i["accept-encoding"]=J?"gzip, deflate, br":"gzip, deflate"}if(o.cookieJar){const e=await o.cookieJar.getCookieString(o.url.toString());if(g.default.nonEmptyString(e)){o.headers.cookie=e}}for(const e of o.hooks.beforeRequest){const t=await e(o);if(!g.default.undefined(t)){o.request=()=>t;break}}if(o.body&&this[z]!==o.body){this[z]=o.body}const{agent:c,request:l,timeout:h,url:p}=o;if(o.dnsCache&&!("lookup"in o)){o.lookup=o.dnsCache.lookup}if(p.hostname==="unix"){const e=/(?.+?):(?.+)/.exec(`${p.pathname}${p.search}`);if(e===null||e===void 0?void 0:e.groups){const{socketPath:t,path:r}=e.groups;Object.assign(o,{socketPath:t,path:r,host:""})}}const y=p.protocol==="https:";let v;if(o.http2){v=m.auto}else{v=y?u.request:a.request}const _=(e=o.request)!==null&&e!==void 0?e:v;const E=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[I]=_;delete o.request;delete o.timeout;const w=o;w.shared=(t=o.cacheOptions)===null||t===void 0?void 0:t.shared;w.cacheHeuristic=(r=o.cacheOptions)===null||r===void 0?void 0:r.cacheHeuristic;w.immutableMinTimeToLive=(s=o.cacheOptions)===null||s===void 0?void 0:s.immutableMinTimeToLive;w.ignoreCargoCult=(n=o.cacheOptions)===null||n===void 0?void 0:n.ignoreCargoCult;if(o.dnsLookupIpVersion!==undefined){try{w.family=T.dnsLookupIpVersionToFamily(o.dnsLookupIpVersion)}catch(e){throw new Error("Invalid `dnsLookupIpVersion` option value")}}if(o.https){if("rejectUnauthorized"in o.https){w.rejectUnauthorized=o.https.rejectUnauthorized}if(o.https.checkServerIdentity){w.checkServerIdentity=o.https.checkServerIdentity}if(o.https.certificateAuthority){w.ca=o.https.certificateAuthority}if(o.https.certificate){w.cert=o.https.certificate}if(o.https.key){w.key=o.https.key}if(o.https.passphrase){w.passphrase=o.https.passphrase}if(o.https.pfx){w.pfx=o.https.pfx}}try{let e=await E(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=h;o.agent=c;if(o.https){if("rejectUnauthorized"in o.https){delete w.rejectUnauthorized}if(o.https.checkServerIdentity){delete w.checkServerIdentity}if(o.https.certificateAuthority){delete w.ca}if(o.https.certificate){delete w.cert}if(o.https.key){delete w.key}if(o.https.passphrase){delete w.passphrase}if(o.https.pfx){delete w.pfx}}if(isClientRequest(e)){this._onRequest(e)}else if(this.writable){this.once("finish",(()=>{void this._onResponse(e)}));this._unlockWrite();this.end();this._lockWrite()}else{void this._onResponse(e)}}catch(e){if(e instanceof d.CacheError){throw new CacheError(e,this)}throw new RequestError(e.message,e,this)}}async _error(e){try{for(const t of this.options.hooks.beforeError){e=await t(e)}}catch(t){e=new RequestError(t.message,t,this)}this.destroy(e)}_beforeError(e){if(this[B]){return}const{options:t}=this;const r=this.retryCount+1;this[B]=true;if(!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}const s=e;const{response:n}=s;void(async()=>{if(n&&!n.body){n.setEncoding(this._readableState.encoding);try{n.rawBody=await S.default(n);n.body=n.rawBody.toString()}catch(e){}}if(this.listenerCount("retry")!==0){let o;try{let e;if(n&&"retry-after"in n.headers){e=Number(n.headers["retry-after"]);if(Number.isNaN(e)){e=Date.parse(n.headers["retry-after"])-Date.now();if(e<=0){e=1}}else{e*=1e3}}o=await t.retry.calculateDelay({attemptCount:r,retryOptions:t.retry,error:s,retryAfter:e,computedValue:k.default({attemptCount:r,retryOptions:t.retry,error:s,retryAfter:e,computedValue:0})})}catch(e){void this._error(new RequestError(e.message,e,this));return}if(o){const retry=async()=>{try{for(const e of this.options.hooks.beforeRetry){await e(this.options,s,r)}}catch(t){void this._error(new RequestError(t.message,e,this));return}if(this.destroyed){return}this.destroy();this.emit("retry",r,e)};this[Y]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[G]=true;const e=this[$];if(e&&!this[B]){if(e.readableLength){this[G]=false}let t;while((t=e.read())!==null){this[L]+=t.length;this[F]=true;const e=this.downloadProgress;if(e.percent<1){this.emit("downloadProgress",e)}this.push(t)}}}_write(e,t,r){const write=()=>{this._writeRequest(e,t,r)};if(this.requestInitialized){write()}else{this[V].push(write)}}_writeRequest(e,t,r){if(this[I].destroyed){return}this._progressCallbacks.push((()=>{this[q]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[I].write(e,t,(e=>{if(!e&&this._progressCallbacks.length>0){this._progressCallbacks.shift()()}r(e)}))}_final(e){const endRequest=()=>{while(this._progressCallbacks.length!==0){this._progressCallbacks.shift()()}if(!(I in this)){e();return}if(this[I].destroyed){e();return}this[I].end((t=>{if(!t){this[N]=this[q];this.emit("uploadProgress",this.uploadProgress);this[I].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[V].push(endRequest)}}_destroy(e,t){var r;this[B]=true;clearTimeout(this[Y]);if(I in this){this[M]();if(!((r=this[$])===null||r===void 0?void 0:r.complete)){this[I].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[B]}get ip(){var e;return(e=this.socket)===null||e===void 0?void 0:e.remoteAddress}get aborted(){var e,t,r;return((t=(e=this[I])===null||e===void 0?void 0:e.destroyed)!==null&&t!==void 0?t:this.destroyed)&&!((r=this[W])===null||r===void 0?void 0:r.complete)}get socket(){var e,t;return(t=(e=this[I])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[j]){e=this[L]/this[j]}else if(this[j]===this[L]){e=1}else{e=0}return{percent:e,transferred:this[L],total:this[j]}}get uploadProgress(){let e;if(this[N]){e=this[q]/this[N]}else if(this[N]===this[q]){e=1}else{e=0}return{percent:e,transferred:this[q],total:this[N]}}get timings(){var e;return(e=this[I])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[H]}pipe(e,t){if(this[F]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[U].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[U].delete(e)}super.unpipe(e);return this}}t["default"]=Request},4993:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.dnsLookupIpVersionToFamily=t.isDnsLookupIpVersion=void 0;const r={auto:0,ipv4:4,ipv6:6};t.isDnsLookupIpVersion=e=>e in r;t.dnsLookupIpVersionToFamily=e=>{if(t.isDnsLookupIpVersion(e)){return r[e]}throw new Error("Invalid DNS lookup IP version")}},4564:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7147);const n=r(3837);const o=r(7678);const i=r(40);const a=n.promisify(s.stat);t["default"]=async(e,t)=>{if(t&&"content-length"in t){return Number(t["content-length"])}if(!e){return 0}if(o.default.string(e)){return Buffer.byteLength(e)}if(o.default.buffer(e)){return e.length}if(i.default(e)){return n.promisify(e.getLength.bind(e))()}if(e instanceof s.ReadStream){const{size:t}=await a(e.path);if(t===0){return undefined}return t}return undefined}},4500:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const getBuffer=async e=>{const t=[];let r=0;for await(const s of e){t.push(s);r+=Buffer.byteLength(s)}if(Buffer.isBuffer(t[0])){return Buffer.concat(t,r)}return Buffer.from(t.join(""))};t["default"]=getBuffer},40:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7678);t["default"]=e=>s.default.nodeStream(e)&&s.default.function_(e.getBoundary)},9298:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isResponseOk=void 0;t.isResponseOk=e=>{const{statusCode:t}=e;const r=e.request.options.followRedirect?299:399;return t>=200&&t<=r||t===304}},9219:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7310);const n=["protocol","host","hostname","port","pathname","search"];t["default"]=(e,t)=>{var r,o;if(t.path){if(t.pathname){throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.")}if(t.search){throw new TypeError("Parameters `path` and `search` are mutually exclusive.")}if(t.searchParams){throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}}if(t.search&&t.searchParams){throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.")}if(!e){if(!t.protocol){throw new TypeError("No URL protocol specified")}e=`${t.protocol}//${(o=(r=t.hostname)!==null&&r!==void 0?r:t.host)!==null&&o!==void 0?o:""}`}const i=new s.URL(e);if(t.path){const e=t.path.indexOf("?");if(e===-1){t.pathname=t.path}else{t.pathname=t.path.slice(0,e);t.search=t.path.slice(e+1)}delete t.path}for(const e of n){if(t[e]){i[e]=t[e].toString()}}return i}},3021:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function default_1(e,t,r){const s={};for(const n of r){s[n]=(...e)=>{t.emit(n,...e)};e.on(n,s[n])}return()=>{for(const t of r){e.off(t,s[t])}}}t["default"]=default_1},2454:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TimeoutError=void 0;const s=r(1808);const n=r(1593);const o=Symbol("reentry");const noop=()=>{};class TimeoutError extends Error{constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`);this.event=t;this.name="TimeoutError";this.code="ETIMEDOUT"}}t.TimeoutError=TimeoutError;t["default"]=(e,t,r)=>{if(o in e){return noop}e[o]=true;const i=[];const{once:a,unhandleAll:c}=n.default();const addTimeout=(e,t,r)=>{var s;const n=setTimeout(t,e,e,r);(s=n.unref)===null||s===void 0?void 0:s.call(n);const cancel=()=>{clearTimeout(n)};i.push(cancel);return cancel};const{host:u,hostname:l}=r;const timeoutHandler=(t,r)=>{e.destroy(new TimeoutError(t,r))};const cancelTimeouts=()=>{for(const e of i){e()}c()};e.once("error",(t=>{cancelTimeouts();if(e.listenerCount("error")===0){throw t}}));e.once("close",cancelTimeouts);a(e,"response",(e=>{a(e,"end",cancelTimeouts)}));if(typeof t.request!=="undefined"){addTimeout(t.request,timeoutHandler,"request")}if(typeof t.socket!=="undefined"){const socketTimeoutHandler=()=>{timeoutHandler(t.socket,"socket")};e.setTimeout(t.socket,socketTimeoutHandler);i.push((()=>{e.removeListener("timeout",socketTimeoutHandler)}))}a(e,"socket",(n=>{var o;const{socketPath:i}=e;if(n.connecting){const e=Boolean(i!==null&&i!==void 0?i:s.isIP((o=l!==null&&l!==void 0?l:u)!==null&&o!==void 0?o:"")!==0);if(typeof t.lookup!=="undefined"&&!e&&typeof n.address().address==="undefined"){const e=addTimeout(t.lookup,timeoutHandler,"lookup");a(n,"lookup",e)}if(typeof t.connect!=="undefined"){const timeConnect=()=>addTimeout(t.connect,timeoutHandler,"connect");if(e){a(n,"connect",timeConnect())}else{a(n,"lookup",(e=>{if(e===null){a(n,"connect",timeConnect())}}))}}if(typeof t.secureConnect!=="undefined"&&r.protocol==="https:"){a(n,"connect",(()=>{const e=addTimeout(t.secureConnect,timeoutHandler,"secureConnect");a(n,"secureConnect",e)}))}}if(typeof t.send!=="undefined"){const timeRequest=()=>addTimeout(t.send,timeoutHandler,"send");if(n.connecting){a(n,"connect",(()=>{a(e,"upload-complete",timeRequest())}))}else{a(e,"upload-complete",timeRequest())}}}));if(typeof t.response!=="undefined"){a(e,"upload-complete",(()=>{const r=addTimeout(t.response,timeoutHandler,"response");a(e,"response",r)}))}return cancelTimeouts}},1593:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=()=>{const e=[];return{once(t,r,s){t.once(r,s);e.push({origin:t,event:r,fn:s})},unhandleAll(){for(const t of e){const{origin:e,event:r,fn:s}=t;e.removeListener(r,s)}e.length=0}}}},8026:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7678);t["default"]=e=>{e=e;const t={protocol:e.protocol,hostname:s.default.string(e.hostname)&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};if(s.default.string(e.port)&&e.port.length>0){t.port=Number(e.port)}if(e.username||e.password){t.auth=`${e.username||""}:${e.password||""}`}return t}},7288:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class WeakableMap{constructor(){this.weakMap=new WeakMap;this.map=new Map}set(e,t){if(typeof e==="object"){this.weakMap.set(e,t)}else{this.map.set(e,t)}}get(e){if(typeof e==="object"){return this.weakMap.get(e)}return this.map.get(e)}has(e){if(typeof e==="object"){return this.weakMap.has(e)}return this.map.has(e)}}t["default"]=WeakableMap},4337:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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.defaultHandler=void 0;const o=r(7678);const i=r(6056);const a=r(6457);const c=r(94);const u=r(285);const l={RequestError:i.RequestError,CacheError:i.CacheError,ReadError:i.ReadError,HTTPError:i.HTTPError,MaxRedirectsError:i.MaxRedirectsError,TimeoutError:i.TimeoutError,ParseError:i.ParseError,CancelError:i.CancelError,UnsupportedProtocolError:i.UnsupportedProtocolError,UploadError:i.UploadError};const delay=async e=>new Promise((t=>{setTimeout(t,e)}));const{normalizeArguments:h}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=h(undefined,r,t)}return t};const getPromiseOrStream=e=>e.isStream?new c.default(undefined,e):i.default(e);const isGotInstance=e=>"defaults"in e&&"options"in e.defaults;const d=["get","post","put","patch","head","delete"];t.defaultHandler=(e,t)=>t(e);const callInitHooks=(e,t)=>{if(e){for(const r of e){r(t)}}};const create=e=>{e._rawHandlers=e.handlers;e.handlers=e.handlers.map((e=>(t,r)=>{let s;const n=e(t,(e=>{s=r(e);return s}));if(n!==s&&!t.isStream&&s){const e=n;const{then:t,catch:r,finally:o}=e;Object.setPrototypeOf(e,Object.getPrototypeOf(s));Object.defineProperties(e,Object.getOwnPropertyDescriptors(s));e.then=t;e.catch=r;e.finally=o}return n}));const got=(t,r={},s)=>{var n,u;let l=0;const iterateHandlers=t=>e.handlers[l++](t,l===e.handlers.length?getPromiseOrStream:iterateHandlers);if(o.default.plainObject(t)){const e={...t,...r};c.setNonEnumerableProperties([t,r],e);r=e;t=undefined}try{let o;try{callInitHooks(e.options.hooks.init,r);callInitHooks((n=r.hooks)===null||n===void 0?void 0:n.init,r)}catch(e){o=e}const a=h(t,r,s!==null&&s!==void 0?s:e.options);a[c.kIsNormalizedAlready]=true;if(o){throw new i.RequestError(o.message,o,a)}return iterateHandlers(a)}catch(t){if(r.isStream){throw t}else{return a.default(t,e.options.hooks.beforeError,(u=r.hooks)===null||u===void 0?void 0:u.beforeError)}}};got.extend=(...r)=>{const s=[e.options];let n=[...e._rawHandlers];let o;for(const e of r){if(isGotInstance(e)){s.push(e.defaults.options);n.push(...e.defaults._rawHandlers);o=e.defaults.mutableDefaults}else{s.push(e);if("handlers"in e){n.push(...e.handlers)}o=e.mutableDefaults}}n=n.filter((e=>e!==t.defaultHandler));if(n.length===0){n.push(t.defaultHandler)}return create({options:mergeOptions(...s),handlers:n,mutableDefaults:Boolean(o)})};const paginateEach=async function*(t,r){let s=h(t,r,e.options);s.resolveBodyOnly=false;const n=s.pagination;if(!o.default.object(n)){throw new TypeError("`options.pagination` must be implemented")}const i=[];let{countLimit:a}=n;let c=0;while(c{const r=[];for await(const s of paginateEach(e,t)){r.push(s)}return r};got.paginate.each=paginateEach;got.stream=(e,t)=>got(e,{...t,isStream:true});for(const e of d){got[e]=(t,r)=>got(t,{...r,method:e});got.stream[e]=(t,r)=>got(t,{...r,method:e,isStream:true})}Object.assign(got,l);Object.defineProperty(got,"defaults",{value:e.mutableDefaults?e:u.default(e),writable:e.mutableDefaults,configurable:e.mutableDefaults,enumerable:true});got.mergeOptions=mergeOptions;return got};t["default"]=create;n(r(2613),t)},3061:function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){if(s===undefined)s=r;Object.defineProperty(e,s,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,s){if(s===undefined)s=r;e[s]=t[r]});var n=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});const o=r(7310);const i=r(4337);const a={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:undefined,calculateDelay:({computedValue:e})=>e},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:undefined,dnsCache:undefined,decompress:true,throwHttpErrors:true,followRedirect:true,isStream:false,responseType:"text",resolveBodyOnly:false,maxRedirects:10,prefixUrl:"",methodRewriting:true,ignoreInvalidCookies:false,context:{},http2:false,allowGetBody:false,https:undefined,pagination:{transform:e=>{if(e.request.options.responseType==="json"){return e.body}return JSON.parse(e.body)},paginate:e=>{if(!Reflect.has(e.headers,"link")){return false}const t=e.headers.link.split(",");let r;for(const e of t){const t=e.split(";");if(t[1].includes("next")){r=t[0].trimStart().trim();r=r.slice(1,-1);break}}if(r){const e={url:new o.URL(r)};return e}return false},filter:()=>true,shouldContinue:()=>true,countLimit:Infinity,backoff:0,requestLimit:1e4,stackAllItems:true},parseJson:e=>JSON.parse(e),stringifyJson:e=>JSON.stringify(e),cacheOptions:{}},handlers:[i.defaultHandler],mutableDefaults:false};const c=i.default(a);t["default"]=c;e.exports=c;e.exports["default"]=c;e.exports.__esModule=true;n(r(4337),t);n(r(6056),t)},2613:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true})},285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const s=r(7678);function deepFreeze(e){for(const t of Object.values(e)){if(s.default.plainObject(t)||s.default.array(t)){deepFreeze(t)}}return Object.freeze(e)}t["default"]=deepFreeze},397:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r=new Set;t["default"]=e=>{if(r.has(e)){return}r.add(e);process.emitWarning(`Got: ${e}`,{type:"DeprecationWarning"})}},1002:e=>{"use strict";const t=new Set([200,203,204,206,300,301,308,404,405,410,414,501]);const r=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]);const s=new Set([500,502,503,504]);const n={date:true,connection:true,"keep-alive":true,"proxy-authenticate":true,"proxy-authorization":true,te:true,trailer:true,"transfer-encoding":true,upgrade:true};const o={"content-length":true,"content-encoding":true,"transfer-encoding":true,"content-range":true};function toNumberOrZero(e){const t=parseInt(e,10);return isFinite(t)?t:0}function isErrorResponse(e){if(!e){return true}return s.has(e.status)}function parseCacheControl(e){const t={};if(!e)return t;const r=e.trim().split(/,/);for(const e of r){const[r,s]=e.split(/=/,2);t[r.trim()]=s===undefined?true:s.trim().replace(/^"|"$/g,"")}return t}function formatCacheControl(e){let t=[];for(const r in e){const s=e[r];t.push(s===true?r:r+"="+s)}if(!t.length){return undefined}return t.join(", ")}e.exports=class CachePolicy{constructor(e,t,{shared:r,cacheHeuristic:s,immutableMinTimeToLive:n,ignoreCargoCult:o,_fromObject:i}={}){if(i){this._fromObject(i);return}if(!t||!t.headers){throw Error("Response headers missing")}this._assertRequestHasHeaders(e);this._responseTime=this.now();this._isShared=r!==false;this._cacheHeuristic=undefined!==s?s:.1;this._immutableMinTtl=undefined!==n?n:24*3600*1e3;this._status="status"in t?t.status:200;this._resHeaders=t.headers;this._rescc=parseCacheControl(t.headers["cache-control"]);this._method="method"in e?e.method:"GET";this._url=e.url;this._host=e.headers.host;this._noAuthorization=!e.headers.authorization;this._reqHeaders=t.headers.vary?e.headers:null;this._reqcc=parseCacheControl(e.headers["cache-control"]);if(o&&"pre-check"in this._rescc&&"post-check"in this._rescc){delete this._rescc["pre-check"];delete this._rescc["post-check"];delete this._rescc["no-cache"];delete this._rescc["no-store"];delete this._rescc["must-revalidate"];this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":formatCacheControl(this._rescc)});delete this._resHeaders.expires;delete this._resHeaders.pragma}if(t.headers["cache-control"]==null&&/no-cache/.test(t.headers.pragma)){this._rescc["no-cache"]=true}}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&("GET"===this._method||"HEAD"===this._method||"POST"===this._method&&this._hasExplicitExpiration())&&r.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||t.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers){throw Error("Request headers missing")}}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);const t=parseCacheControl(e.headers["cache-control"]);if(t["no-cache"]||/no-cache/.test(e.headers.pragma)){return false}if(t["max-age"]&&this.age()>t["max-age"]){return false}if(t["min-fresh"]&&this.timeToLive()<1e3*t["min-fresh"]){return false}if(this.stale()){const e=t["max-stale"]&&!this._rescc["must-revalidate"]&&(true===t["max-stale"]||t["max-stale"]>this.age()-this.maxAge());if(!e){return false}}return this._requestMatches(e,false)}_requestMatches(e,t){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&"HEAD"===e.method)&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary){return true}if(this._resHeaders.vary==="*"){return false}const t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const r of t){if(e.headers[r]!==this._reqHeaders[r])return false}return true}_copyWithoutHopByHopHeaders(e){const t={};for(const r in e){if(n[r])continue;t[r]=e[r]}if(e.connection){const r=e.connection.trim().split(/\s*,\s*/);for(const e of r){delete t[e]}}if(t.warning){const e=t.warning.split(/,/).filter((e=>!/^\s*1[0-9][0-9]/.test(e)));if(!e.length){delete t.warning}else{t.warning=e.join(",").trim()}}return t}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders);const t=this.age();if(t>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24){e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'}e.age=`${Math.round(t)}`;e.date=new Date(this.now()).toUTCString();return e}date(){const e=Date.parse(this._resHeaders.date);if(isFinite(e)){return e}return this._responseTime}age(){let e=this._ageValue();const t=(this.now()-this._responseTime)/1e3;return e+t}_ageValue(){return toNumberOrZero(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]){return 0}if(this._isShared&&(this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable)){return 0}if(this._resHeaders.vary==="*"){return 0}if(this._isShared){if(this._rescc["proxy-revalidate"]){return 0}if(this._rescc["s-maxage"]){return toNumberOrZero(this._rescc["s-maxage"])}}if(this._rescc["max-age"]){return toNumberOrZero(this._rescc["max-age"])}const e=this._rescc.immutable?this._immutableMinTtl:0;const t=this.date();if(this._resHeaders.expires){const r=Date.parse(this._resHeaders.expires);if(Number.isNaN(r)||rr){return Math.max(e,(t-r)/1e3*this._cacheHeuristic)}}return e}timeToLive(){const e=this.maxAge()-this.age();const t=e+toNumberOrZero(this._rescc["stale-if-error"]);const r=e+toNumberOrZero(this._rescc["stale-while-revalidate"]);return Math.max(0,e,t,r)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+toNumberOrZero(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+toNumberOrZero(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(undefined,undefined,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t;this._isShared=e.sh;this._cacheHeuristic=e.ch;this._immutableMinTtl=e.imm!==undefined?e.imm:24*3600*1e3;this._status=e.st;this._resHeaders=e.resh;this._rescc=e.rescc;this._method=e.m;this._url=e.u;this._host=e.h;this._noAuthorization=e.a;this._reqHeaders=e.reqh;this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);const t=this._copyWithoutHopByHopHeaders(e.headers);delete t["if-range"];if(!this._requestMatches(e,true)||!this.storable()){delete t["if-none-match"];delete t["if-modified-since"];return t}if(this._resHeaders.etag){t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag}const r=t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&this._method!="GET";if(r){delete t["if-modified-since"];if(t["if-none-match"]){const e=t["if-none-match"].split(/,/).filter((e=>!/^\s*W\//.test(e)));if(!e.length){delete t["if-none-match"]}else{t["if-none-match"]=e.join(",").trim()}}}else if(this._resHeaders["last-modified"]&&!t["if-modified-since"]){t["if-modified-since"]=this._resHeaders["last-modified"]}return t}revalidatedPolicy(e,t){this._assertRequestHasHeaders(e);if(this._useStaleIfError()&&isErrorResponse(t)){return{modified:false,matches:false,policy:this}}if(!t||!t.headers){throw Error("Response headers missing")}let r=false;if(t.status!==undefined&&t.status!=304){r=false}else if(t.headers.etag&&!/^\s*W\//.test(t.headers.etag)){r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag}else if(this._resHeaders.etag&&t.headers.etag){r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,"")}else if(this._resHeaders["last-modified"]){r=this._resHeaders["last-modified"]===t.headers["last-modified"]}else{if(!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!t.headers.etag&&!t.headers["last-modified"]){r=true}}if(!r){return{policy:new this.constructor(e,t),modified:t.status!=304,matches:false}}const s={};for(const e in this._resHeaders){s[e]=e in t.headers&&!o[e]?t.headers[e]:this._resHeaders[e]}const n=Object.assign({},t,{status:this._status,method:this._method,headers:s});return{policy:new this.constructor(e,n,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:false,matches:true}}}},9898:(e,t,r)=>{"use strict";const s=r(2361);const n=r(4404);const o=r(5158);const i=r(9273);const a=Symbol("currentStreamsCount");const c=Symbol("request");const u=Symbol("cachedOriginSet");const l=Symbol("gracefullyClosing");const h=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"];const getSortedIndex=(e,t,r)=>{let s=0;let n=e.length;while(s>>1;if(r(e[o],t)){s=o+1}else{n=o}}return s};const compareSessions=(e,t)=>e.remoteSettings.maxConcurrentStreams>t.remoteSettings.maxConcurrentStreams;const closeCoveredSessions=(e,t)=>{for(const r of e){if(r[u].lengtht[u].includes(e)))&&r[a]+t[a]<=t.remoteSettings.maxConcurrentStreams){gracefullyClose(r)}}};const closeSessionIfCovered=(e,t)=>{for(const r of e){if(t[u].lengthr[u].includes(e)))&&t[a]+r[a]<=r.remoteSettings.maxConcurrentStreams){gracefullyClose(t)}}};const getSessions=({agent:e,isFree:t})=>{const r={};for(const s in e.sessions){const n=e.sessions[s];const o=n.filter((e=>{const r=e[Agent.kCurrentStreamsCount]{e[l]=true;if(e[a]===0){e.close()}};class Agent extends s{constructor({timeout:e=6e4,maxSessions:t=Infinity,maxFreeSessions:r=10,maxCachedTlsSessions:s=100}={}){super();this.sessions={};this.queue={};this.timeout=e;this.maxSessions=t;this.maxFreeSessions=r;this._freeSessionsCount=0;this._sessionsCount=0;this.settings={enablePush:false};this.tlsSessionCache=new i({maxSize:s})}static normalizeOrigin(e,t){if(typeof e==="string"){e=new URL(e)}if(t&&e.hostname!==t){e.hostname=t}return e.origin}normalizeOptions(e){let t="";if(e){for(const r of h){if(e[r]){t+=`:${e[r]}`}}}return t}_tryToCreateNewSession(e,t){if(!(e in this.queue)||!(t in this.queue[e])){return}const r=this.queue[e][t];if(this._sessionsCount{if(Array.isArray(r)){r=[...r];s()}else{r=[{resolve:s,reject:n}]}const i=this.normalizeOptions(t);const h=Agent.normalizeOrigin(e,t&&t.servername);if(h===undefined){for(const{reject:e}of r){e(new TypeError("The `origin` argument needs to be a string or an URL object"))}return}if(i in this.sessions){const e=this.sessions[i];let t=-1;let s=-1;let n;for(const r of e){const e=r.remoteSettings.maxConcurrentStreams;if(e=e||r[l]||r.destroyed){continue}if(!n){t=e}if(o>s){n=r;s=o}}}if(n){if(r.length!==1){for(const{reject:e}of r){const t=new Error(`Expected the length of listeners to be 1, got ${r.length}.\n`+"Please report this to https://github.com/szmarczak/http2-wrapper/");e(t)}return}r[0].resolve(n);return}}if(i in this.queue){if(h in this.queue[i]){this.queue[i][h].listeners.push(...r);this._tryToCreateNewSession(i,h);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][h]===entry){delete this.queue[i][h];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${h}:${i}`;let n=false;try{const d=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});d[a]=0;d[l]=false;const isFree=()=>d[a]{this.tlsSessionCache.set(s,e)}));d.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));d.setTimeout(this.timeout,(()=>{d.destroy()}));d.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(d),1);if(e.length===0){delete this.sessions[i]}}else{const e=new Error("Session closed without receiving a SETTINGS frame");e.code="HTTP2WRAPPER_NOSETTINGS";for(const{reject:t}of r){t(e)}removeFromQueue()}this._tryToCreateNewSession(i,h)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of d[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(d)}const r=this.queue[i];if(r[e].listeners.length===0){delete r[e];if(Object.keys(r).length===0){delete this.queue[i];break}}if(!isFree()){break}}}};d.on("origin",(()=>{d[u]=d.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],d)}));d.once("remoteSettings",(()=>{d.ref();d.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}d.destroy();return}d[u]=d.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,d,compareSessions),0,d)}else{e[i]=[d]}}this._freeSessionsCount+=1;n=true;this.emit("session",d);processListeners();removeFromQueue();if(d[a]===0&&this._freeSessionsCount>this.maxFreeSessions){d.close()}if(r.length!==0){this.getSession(h,t,r);r.length=0}d.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],d)}))}));d[c]=d.request;d.request=(e,t)=>{if(d[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=d[c](e,t);d.ref();++d[a];if(d[a]===d.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--d[a];if(!d.destroyed&&!d.closed){closeSessionIfCovered(this.sessions[i],d);if(isFree()&&!d.closed){if(!p){this._freeSessionsCount++;p=true}const e=d[a]===0;if(e){d.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||d[l])){d.close()}else{closeCoveredSessions(this.sessions[i],d);processListeners()}}}}));return r}}catch(e){for(const t of r){t.reject(e)}removeFromQueue()}};entry.listeners=r;entry.completed=false;entry.destroyed=false;this.queue[i][h]=entry;this._tryToCreateNewSession(i,h)}))}request(e,t,r,s){return new Promise(((n,o)=>{this.getSession(e,t,[{reject:o,resolve:e=>{try{n(e.request(r,s))}catch(e){o(e)}}}])}))}createConnection(e,t){return Agent.connect(e,t)}static connect(e,t){t.ALPNProtocols=["h2"];const r=e.port||443;const s=e.hostname||e.host;if(typeof t.servername==="undefined"){t.servername=s}return n.connect(r,s,t)}closeFreeSessions(){for(const e of Object.values(this.sessions)){for(const t of e){if(t[a]===0){t.close()}}}}destroy(e){for(const t of Object.values(this.sessions)){for(const r of t){r.destroy(e)}}for(const e of Object.values(this.queue)){for(const t of Object.values(e)){t.destroyed=true}}this.queue={}}get freeSessions(){return getSessions({agent:this,isFree:true})}get busySessions(){return getSessions({agent:this,isFree:false})}}Agent.kCurrentStreamsCount=a;Agent.kGracefullyClosing=l;e.exports={Agent:Agent,globalAgent:new Agent}},7167:(e,t,r)=>{"use strict";const s=r(3685);const n=r(5687);const o=r(6624);const i=r(9273);const a=r(9632);const c=r(1982);const u=r(2686);const l=new i({maxSize:100});const h=new Map;const installSocket=(e,t,r)=>{t._httpMessage={shouldKeepAlive:true};const onFree=()=>{e.emit("free",t,r)};t.on("free",onFree);const onClose=()=>{e.removeSocket(t,r)};t.on("close",onClose);const onRemove=()=>{e.removeSocket(t,r);t.off("close",onClose);t.off("free",onFree);t.off("agentRemove",onRemove)};t.on("agentRemove",onRemove);e.emit("free",t,r)};const resolveProtocol=async e=>{const t=`${e.host}:${e.port}:${e.ALPNProtocols.sort()}`;if(!l.has(t)){if(h.has(t)){const e=await h.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);h.set(t,i);try{const{socket:o,alpnProtocol:a}=await i;l.set(t,a);e.path=r;if(a==="h2"){o.destroy()}else{const{globalAgent:t}=n;const r=n.Agent.prototype.createConnection;if(s){if(s.createConnection===r){installSocket(s,o,e)}else{o.destroy()}}else if(t.createConnection===r){installSocket(t,o,e)}else{o.destroy()}}h.delete(t);return a}catch(e){h.delete(t);throw e}}return l.get(t)};e.exports=async(e,t,r)=>{if(typeof e==="string"||e instanceof URL){e=u(new URL(e))}if(typeof t==="function"){r=t;t=undefined}t={ALPNProtocols:["h2","http/1.1"],...e,...t,resolveSocket:true};if(!Array.isArray(t.ALPNProtocols)||t.ALPNProtocols.length===0){throw new Error("The `ALPNProtocols` option must be an Array with at least one entry")}t.protocol=t.protocol||"https:";const o=t.protocol==="https:";t.host=t.hostname||t.host||"localhost";t.session=t.tlsSession;t.servername=t.servername||c(t);t.port=t.port||(o?443:80);t._defaultAgent=o?n.globalAgent:s.globalAgent;const i=t.agent;if(i){if(i.addRequest){throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties")}t.agent=i[o?"https":"http"]}if(o){const e=await resolveProtocol(t);if(e==="h2"){if(i){t.agent=i.http2}return new a(t,r)}}return s.request(t,r)};e.exports.protocolCache=l},9632:(e,t,r)=>{"use strict";const s=r(5158);const{Writable:n}=r(2781);const{Agent:o,globalAgent:i}=r(9898);const a=r(2575);const c=r(2686);const u=r(1818);const l=r(1199);const{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_PROTOCOL:d,ERR_HTTP_HEADERS_SENT:p,ERR_INVALID_HTTP_TOKEN:m,ERR_HTTP_INVALID_HEADER_VALUE:y,ERR_INVALID_CHAR:g}=r(7087);const{HTTP2_HEADER_STATUS:v,HTTP2_HEADER_METHOD:_,HTTP2_HEADER_PATH:E,HTTP2_METHOD_CONNECT:w}=s.constants;const b=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const T=Symbol("flushedHeaders");const A=Symbol("jobs");const C=/^[\^`\-\w!#$%&*+.|~]+$/;const P=/[^\t\u0020-\u007E\u0080-\u00FF]/;class ClientRequest extends n{constructor(e,t,r){super({autoDestroy:false});const s=typeof e==="string"||e instanceof URL;if(s){e=c(e instanceof URL?e:new URL(e))}if(typeof t==="function"||t===undefined){r=t;t=s?e:{...e}}else{t={...e,...t}}if(t.h2session){this[O]=t.h2session}else if(t.agent===false){this.agent=new o({maxFreeSessions:0})}else if(typeof t.agent==="undefined"||t.agent===null){if(typeof t.createConnection==="function"){this.agent=new o({maxFreeSessions:0});this.agent.createConnection=t.createConnection}else{this.agent=i}}else if(typeof t.agent.request==="function"){this.agent=t.agent}else{throw new h("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new d(t.protocol,"https:")}const n=t.port||t.defaultPort||this.agent&&this.agent.defaultPort||443;const a=t.hostname||t.host||"localhost";delete t.hostname;delete t.host;delete t.port;const{timeout:u}=t;t.timeout=undefined;this[b]=Object.create(null);this[A]=[];this.socket=null;this.connection=null;this.method=t.method||"GET";this.path=t.path;this.res=null;this.aborted=false;this.reusedSocket=false;if(t.headers){for(const[e,r]of Object.entries(t.headers)){this.setHeader(e,r)}}if(t.auth&&!("authorization"in this[b])){this[b].authorization="Basic "+Buffer.from(t.auth).toString("base64")}t.session=t.tlsSession;t.path=t.socketPath;this[S]=t;if(n===443){this[R]=`https://${a}`;if(!(":authority"in this[b])){this[b][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[b])){this[b][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[T]=false}get method(){return this[b][_]}set method(e){if(e){this[b][_]=e.toUpperCase()}}get path(){return this[b][E]}set path(e){if(e){this[b][E]=e}}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,t,r){if(this._mustNotHaveABody){r(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();const callWrite=()=>this._request.write(e,t,r);if(this._request){callWrite()}else{this[A].push(callWrite)}}_final(e){if(this.destroyed){return}this.flushHeaders();const callEnd=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};if(this._request){callEnd()}else{this[A].push(callEnd)}}abort(){if(this.res&&this.res.complete){return}if(!this.aborted){process.nextTick((()=>this.emit("abort")))}this.aborted=true;this.destroy()}_destroy(e,t){if(this.res){this.res._dump()}if(this._request){this._request.destroy()}t(e)}async flushHeaders(){if(this[T]||this.destroyed){return}this[T]=true;const e=this.method===w;const onStream=t=>{this._request=t;if(this.destroyed){t.destroy();return}if(!e){u(t,this,["timeout","continue","close","error"])}const waitForEnd=e=>(...t)=>{if(!this.writable&&!this.destroyed){e(...t)}else{this.once("finish",(()=>{e(...t)}))}};t.once("response",waitForEnd(((r,s,n)=>{const o=new a(this.socket,t.readableHighWaterMark);this.res=o;o.req=this;o.statusCode=r[v];o.headers=r;o.rawHeaders=n;o.once("end",(()=>{if(this.aborted){o.aborted=true;o.emit("aborted")}else{o.complete=true;o.socket=null;o.connection=null}}));if(e){o.upgrade=true;if(this.emit("connect",o,t,Buffer.alloc(0))){this.emit("close")}else{t.destroy()}}else{t.on("data",(e=>{if(!o._dumped&&!o.push(e)){t.pause()}}));t.once("end",(()=>{o.push(null)}));if(!this.emit("response",o)){o._dump()}}})));t.once("headers",waitForEnd((e=>this.emit("information",{statusCode:e[v]}))));t.once("trailers",waitForEnd(((e,t,r)=>{const{res:s}=this;s.trailers=e;s.rawTrailers=r})));const{socket:r}=t.session;this.socket=r;this.connection=r;for(const e of this[A]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[b]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[b]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new h("name","string",e)}return this[b][e.toLowerCase()]}get headersSent(){return this[T]}removeHeader(e){if(typeof e!=="string"){throw new h("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[b][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!C.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(P.test(t)){throw new g("header content",e)}this[b][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[A].push(applyTimeout)}return this}get maxHeadersCount(){if(!this.destroyed&&this._request){return this._request.session.localSettings.maxHeaderListSize}return undefined}set maxHeadersCount(e){}}e.exports=ClientRequest},2575:(e,t,r)=>{"use strict";const{Readable:s}=r(2781);class IncomingMessage extends s{constructor(e,t){super({highWaterMark:t,autoDestroy:false});this.statusCode=null;this.statusMessage="";this.httpVersion="2.0";this.httpVersionMajor=2;this.httpVersionMinor=0;this.headers={};this.trailers={};this.req=null;this.aborted=false;this.complete=false;this.upgrade=null;this.rawHeaders=[];this.rawTrailers=[];this.socket=e;this.connection=e;this._dumped=false}_destroy(e){this.req._request.destroy(e)}setTimeout(e,t){this.req.setTimeout(e,t);return this}_dump(){if(!this._dumped){this._dumped=true;this.removeAllListeners("data");this.resume()}}_read(){if(this.req){this.req._request.resume()}}}e.exports=IncomingMessage},4645:(e,t,r)=>{"use strict";const s=r(5158);const n=r(9898);const o=r(9632);const i=r(2575);const a=r(7167);const request=(e,t,r)=>new o(e,t,r);const get=(e,t,r)=>{const s=new o(e,t,r);s.end();return s};e.exports={...s,ClientRequest:o,IncomingMessage:i,...n,request:request,get:get,auto:a}},1982:(e,t,r)=>{"use strict";const s=r(1808);e.exports=e=>{let t=e.host;const r=e.headers&&e.headers.host;if(r){if(r.startsWith("[")){const e=r.indexOf("]");if(e===-1){t=r}else{t=r.slice(1,-1)}}else{t=r.split(":",1)[0]}}if(s.isIP(t)){return""}return t}},7087:e=>{"use strict";const makeError=(t,r,s)=>{e.exports[r]=class NodeError extends t{constructor(...e){super(typeof s==="string"?s:s(e));this.name=`${super.name} [${r}]`;this.code=r}}};makeError(TypeError,"ERR_INVALID_ARG_TYPE",(e=>{const t=e[0].includes(".")?"property":"argument";let r=e[1];const s=Array.isArray(r);if(s){r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`}return`The "${e[0]}" ${t} must be ${s?"one of":"of"} type ${r}. Received ${typeof e[2]}`}));makeError(TypeError,"ERR_INVALID_PROTOCOL",(e=>`Protocol "${e[0]}" not supported. Expected "${e[1]}"`));makeError(Error,"ERR_HTTP_HEADERS_SENT",(e=>`Cannot ${e[0]} headers after they are sent to the client`));makeError(TypeError,"ERR_INVALID_HTTP_TOKEN",(e=>`${e[0]} must be a valid HTTP token [${e[1]}]`));makeError(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",(e=>`Invalid value "${e[0]} for header "${e[1]}"`));makeError(TypeError,"ERR_INVALID_CHAR",(e=>`Invalid character in ${e[0]} [${e[1]}]`))},1199:e=>{"use strict";e.exports=e=>{switch(e){case":method":case":scheme":case":authority":case":path":return true;default:return false}}},1818:e=>{"use strict";e.exports=(e,t,r)=>{for(const s of r){e.on(s,((...e)=>t.emit(s,...e)))}}},2686:e=>{"use strict";e.exports=e=>{const t={protocol:e.protocol,hostname:typeof e.hostname==="string"&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};if(typeof e.port==="string"&&e.port.length!==0){t.port=Number(e.port)}if(e.username||e.password){t.auth=`${e.username||""}:${e.password||""}`}return t}},2820:(e,t)=>{t.stringify=function stringify(e){if("undefined"==typeof e)return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON)e=e.toJSON();if(e&&"object"===typeof e){var t="";var r=Array.isArray(e);t=r?"[":"{";var s=true;for(var n in e){var o="function"==typeof e[n]||!r&&"undefined"===typeof e[n];if(Object.hasOwnProperty.call(e,n)&&!o){if(!s)t+=",";s=false;if(r){if(e[n]==undefined)t+="null";else t+=stringify(e[n])}else if(e[n]!==void 0){t+=stringify(n)+":"+stringify(e[n])}}}t+=r?"]":"}";return t}else if("string"===typeof e){return JSON.stringify(/^:/.test(e)?":"+e:e)}else if("undefined"===typeof e){return"null"}else return JSON.stringify(e)};t.parse=function(e){return JSON.parse(e,(function(e,t){if("string"===typeof t){if(/^:base64:/.test(t))return Buffer.from(t.substring(8),"base64");else return/^:/.test(t)?t.substring(1):t}return t}))}},1531:(e,t,r)=>{"use strict";const s=r(2361);const n=r(2820);const loadStore=e=>{const t={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql"};if(e.adapter||e.uri){const r=e.adapter||/^[^:]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};class Keyv extends s{constructor(e,t){super();this.opts=Object.assign({namespace:"keyv",serialize:n.stringify,deserialize:n.parse},typeof e==="string"?{uri:e}:e,t);if(!this.opts.store){const e=Object.assign({},this.opts);this.opts.store=loadStore(e)}if(typeof this.opts.store.on==="function"){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}get(e,t){const r=this._getKeyPrefix(e);const{store:s}=this.opts;return Promise.resolve().then((()=>s.get(r))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined){return undefined}if(typeof r.expires==="number"&&Date.now()>r.expires){this.delete(e);return undefined}return t&&t.raw?r:r.value}))}set(e,t,r){const s=this._getKeyPrefix(e);if(typeof r==="undefined"){r=this.opts.ttl}if(r===0){r=undefined}const{store:n}=this.opts;return Promise.resolve().then((()=>{const e=typeof r==="number"?Date.now()+r:null;t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((()=>r.delete(t)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}}e.exports=Keyv},9662:e=>{"use strict";e.exports=e=>{const t={};for(const[r,s]of Object.entries(e)){t[r.toLowerCase()]=s}return t}},7129:(e,t,r)=>{"use strict";const s=r(665);const n=Symbol("max");const o=Symbol("length");const i=Symbol("lengthCalculator");const a=Symbol("allowStale");const c=Symbol("maxAge");const u=Symbol("dispose");const l=Symbol("noDisposeOnSet");const h=Symbol("lruList");const d=Symbol("cache");const p=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[n]=e.max||Infinity;const r=e.length||naiveLength;this[i]=typeof r!=="function"?naiveLength:r;this[a]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0;this[u]=e.dispose;this[l]=e.noDisposeOnSet||false;this[p]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[n]=e||Infinity;trim(this)}get max(){return this[n]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[c]=e;trim(this)}get maxAge(){return this[c]}set lengthCalculator(e){if(typeof e!=="function")e=naiveLength;if(e!==this[i]){this[i]=e;this[o]=0;this[h].forEach((e=>{e.length=this[i](e.value,e.key);this[o]+=e.length}))}trim(this)}get lengthCalculator(){return this[i]}get length(){return this[o]}get itemCount(){return this[h].length}rforEach(e,t){t=t||this;for(let r=this[h].tail;r!==null;){const s=r.prev;forEachStep(this,e,r,t);r=s}}forEach(e,t){t=t||this;for(let r=this[h].head;r!==null;){const s=r.next;forEachStep(this,e,r,t);r=s}}keys(){return this[h].toArray().map((e=>e.key))}values(){return this[h].toArray().map((e=>e.value))}reset(){if(this[u]&&this[h]&&this[h].length){this[h].forEach((e=>this[u](e.key,e.value)))}this[d]=new Map;this[h]=new s;this[o]=0}dump(){return this[h].map((e=>isStale(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[h]}set(e,t,r){r=r||this[c];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const s=r?Date.now():0;const a=this[i](t,e);if(this[d].has(e)){if(a>this[n]){del(this,this[d].get(e));return false}const i=this[d].get(e);const c=i.value;if(this[u]){if(!this[l])this[u](e,c.value)}c.now=s;c.maxAge=r;c.value=t;this[o]+=a-c.length;c.length=a;this.get(e);trim(this);return true}const p=new Entry(e,t,a,s,r);if(p.length>this[n]){if(this[u])this[u](e,t);return false}this[o]+=p.length;this[h].unshift(p);this[d].set(e,this[h].head);trim(this);return true}has(e){if(!this[d].has(e))return false;const t=this[d].get(e).value;return!isStale(this,t)}get(e){return get(this,e,true)}peek(e){return get(this,e,false)}pop(){const e=this[h].tail;if(!e)return null;del(this,e);return e.value}del(e){del(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r];const n=s.e||0;if(n===0)this.set(s.k,s.v);else{const e=n-t;if(e>0){this.set(s.k,s.v,e)}}}}prune(){this[d].forEach(((e,t)=>get(this,t,false)))}}const get=(e,t,r)=>{const s=e[d].get(t);if(s){const t=s.value;if(isStale(e,t)){del(e,s);if(!e[a])return undefined}else{if(r){if(e[p])s.value.now=Date.now();e[h].unshiftNode(s)}}return t.value}};const isStale=(e,t)=>{if(!t||!t.maxAge&&!e[c])return false;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]};const trim=e=>{if(e[o]>e[n]){for(let t=e[h].tail;e[o]>e[n]&&t!==null;){const r=t.prev;del(e,t);t=r}}};const del=(e,t)=>{if(t){const r=t.value;if(e[u])e[u](r.key,r.value);e[o]-=r.length;e[d].delete(r.key);e[h].removeNode(t)}};class Entry{constructor(e,t,r,s,n){this.key=e;this.value=t;this.length=r;this.now=s;this.maxAge=n||0}}const forEachStep=(e,t,r,s)=>{let n=r.value;if(isStale(e,n)){del(e,r);if(!e[a])n=undefined}if(n)t.call(s,n.value,n.key,e)};e.exports=LRUCache},2610:e=>{"use strict";const t=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];e.exports=(e,r)=>{const s=new Set(Object.keys(e).concat(t));for(const t of s){if(t in r){continue}r[t]=typeof e[t]==="function"?e[t].bind(e):e[t]}}},7952:e=>{"use strict";const t="text/plain";const r="us-ascii";const testParameter=(e,t)=>t.some((t=>t instanceof RegExp?t.test(e):t===e));const normalizeDataURL=(e,{stripHash:s})=>{const n=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(e);if(!n){throw new Error(`Invalid URL: ${e}`)}let{type:o,data:i,hash:a}=n.groups;const c=o.split(";");a=s?"":a;let u=false;if(c[c.length-1]==="base64"){c.pop();u=true}const l=(c.shift()||"").toLowerCase();const h=c.map((e=>{let[t,s=""]=e.split("=").map((e=>e.trim()));if(t==="charset"){s=s.toLowerCase();if(s===r){return""}}return`${t}${s?`=${s}`:""}`})).filter(Boolean);const d=[...h];if(u){d.push("base64")}if(d.length!==0||l&&l!==t){d.unshift(l)}return`data:${d.join(";")},${u?i.trim():i}${a?`#${a}`:""}`};const normalizeUrl=(e,t)=>{t={defaultProtocol:"http:",normalizeProtocol:true,forceHttp:false,forceHttps:false,stripAuthentication:true,stripHash:false,stripTextFragment:true,stripWWW:true,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:true,removeSingleSlash:true,removeDirectoryIndex:false,sortQueryParameters:true,...t};e=e.trim();if(/^data:/i.test(e)){return normalizeDataURL(e,t)}if(/^view-source:/i.test(e)){throw new Error("`view-source:` is not supported as it is a non-standard protocol")}const r=e.startsWith("//");const s=!r&&/^\.*\//.test(e);if(!s){e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol)}const n=new URL(e);if(t.forceHttp&&t.forceHttps){throw new Error("The `forceHttp` and `forceHttps` options cannot be used together")}if(t.forceHttp&&n.protocol==="https:"){n.protocol="http:"}if(t.forceHttps&&n.protocol==="http:"){n.protocol="https:"}if(t.stripAuthentication){n.username="";n.password=""}if(t.stripHash){n.hash=""}else if(t.stripTextFragment){n.hash=n.hash.replace(/#?:~:text.*?$/i,"")}if(n.pathname){n.pathname=n.pathname.replace(/(?0){let e=n.pathname.split("/");const r=e[e.length-1];if(testParameter(r,t.removeDirectoryIndex)){e=e.slice(0,e.length-1);n.pathname=e.slice(1).join("/")+"/"}}if(n.hostname){n.hostname=n.hostname.replace(/\.$/,"");if(t.stripWWW&&/^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(n.hostname)){n.hostname=n.hostname.replace(/^www\./,"")}}if(Array.isArray(t.removeQueryParameters)){for(const e of[...n.searchParams.keys()]){if(testParameter(e,t.removeQueryParameters)){n.searchParams.delete(e)}}}if(t.removeQueryParameters===true){n.search=""}if(t.sortQueryParameters){n.searchParams.sort()}if(t.removeTrailingSlash){n.pathname=n.pathname.replace(/\/$/,"")}const o=e;e=n.toString();if(!t.removeSingleSlash&&n.pathname==="/"&&!o.endsWith("/")&&n.hash===""){e=e.replace(/\/$/,"")}if((t.removeTrailingSlash||n.pathname==="/")&&n.hash===""&&t.removeSingleSlash){e=e.replace(/\/$/,"")}if(r&&!t.normalizeProtocol){e=e.replace(/^http:\/\//,"//")}if(t.stripProtocol){e=e.replace(/^(?:https?:)?\/\//,"")}return e};e.exports=normalizeUrl},1223:(e,t,r)=>{var s=r(2940);e.exports=s(once);e.exports.strict=s(onceStrict);once.proto=once((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})}));function once(e){var f=function(){if(f.called)return f.value;f.called=true;return f.value=e.apply(this,arguments)};f.called=false;return f}function onceStrict(e){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=e.apply(this,arguments)};var t=e.name||"Function wrapped with `once`";f.onceError=t+" shouldn't be called more than once";f.called=false;return f}},9072:e=>{"use strict";class CancelError extends Error{constructor(e){super(e||"Promise was canceled");this.name="CancelError"}get isCanceled(){return true}}class PCancelable{static fn(e){return(...t)=>new PCancelable(((r,s,n)=>{t.push(n);e(...t).then(r,s)}))}constructor(e){this._cancelHandlers=[];this._isPending=true;this._isCanceled=false;this._rejectOnCancel=true;this._promise=new Promise(((t,r)=>{this._reject=r;const onResolve=e=>{if(!this._isCanceled||!onCancel.shouldReject){this._isPending=false;t(e)}};const onReject=e=>{this._isPending=false;r(e)};const onCancel=e=>{if(!this._isPending){throw new Error("The `onCancel` handler was attached after the promise settled.")}this._cancelHandlers.push(e)};Object.defineProperties(onCancel,{shouldReject:{get:()=>this._rejectOnCancel,set:e=>{this._rejectOnCancel=e}}});return e(onResolve,onReject,onCancel)}))}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!this._isPending||this._isCanceled){return}this._isCanceled=true;if(this._cancelHandlers.length>0){try{for(const e of this._cancelHandlers){e()}}catch(e){this._reject(e);return}}if(this._rejectOnCancel){this._reject(new CancelError(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(PCancelable.prototype,Promise.prototype);e.exports=PCancelable;e.exports.CancelError=CancelError},8341:(e,t,r)=>{var s=r(1223);var n=r(1205);var o=r(7147);var noop=function(){};var i=/^v?\.0/.test(process.version);var isFn=function(e){return typeof e==="function"};var isFS=function(e){if(!i)return false;if(!o)return false;return(e instanceof(o.ReadStream||noop)||e instanceof(o.WriteStream||noop))&&isFn(e.close)};var isRequest=function(e){return e.setHeader&&isFn(e.abort)};var destroyer=function(e,t,r,o){o=s(o);var i=false;e.on("close",(function(){i=true}));n(e,{readable:t,writable:r},(function(e){if(e)return o(e);i=true;o()}));var a=false;return function(t){if(i)return;if(a)return;a=true;if(isFS(e))return e.close(noop);if(isRequest(e))return e.abort();if(isFn(e.destroy))return e.destroy();o(t||new Error("stream was destroyed"))}};var call=function(e){e()};var pipe=function(e,t){return e.pipe(t)};var pump=function(){var e=Array.prototype.slice.call(arguments);var t=isFn(e[e.length-1]||noop)&&e.pop()||noop;if(Array.isArray(e[0]))e=e[0];if(e.length<2)throw new Error("pump requires two streams per minimum");var r;var s=e.map((function(n,o){var i=o0;return destroyer(n,i,a,(function(e){if(!r)r=e;if(e)s.forEach(call);if(i)return;s.forEach(call);t(r)}))}));return e.reduce(pipe)};e.exports=pump},9273:e=>{"use strict";class QuickLRU{constructor(e={}){if(!(e.maxSize&&e.maxSize>0)){throw new TypeError("`maxSize` must be a number greater than 0")}this.maxSize=e.maxSize;this.onEviction=e.onEviction;this.cache=new Map;this.oldCache=new Map;this._size=0}_set(e,t){this.cache.set(e,t);this._size++;if(this._size>=this.maxSize){this._size=0;if(typeof this.onEviction==="function"){for(const[e,t]of this.oldCache.entries()){this.onEviction(e,t)}}this.oldCache=this.cache;this.cache=new Map}}get(e){if(this.cache.has(e)){return this.cache.get(e)}if(this.oldCache.has(e)){const t=this.oldCache.get(e);this.oldCache.delete(e);this._set(e,t);return t}}set(e,t){if(this.cache.has(e)){this.cache.set(e,t)}else{this._set(e,t)}return this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e)){return this.cache.get(e)}if(this.oldCache.has(e)){return this.oldCache.get(e)}}delete(e){const t=this.cache.delete(e);if(t){this._size--}return this.oldCache.delete(e)||t}clear(){this.cache.clear();this.oldCache.clear();this._size=0}*keys(){for(const[e]of this){yield e}}*values(){for(const[,e]of this){yield e}}*[Symbol.iterator](){for(const e of this.cache){yield e}for(const e of this.oldCache){const[t]=e;if(!this.cache.has(t)){yield e}}}get size(){let e=0;for(const t of this.oldCache.keys()){if(!this.cache.has(t)){e++}}return Math.min(this._size+e,this.maxSize)}}e.exports=QuickLRU},6624:(e,t,r)=>{"use strict";const s=r(4404);e.exports=(e={},t=s.connect)=>new Promise(((r,s)=>{let n=false;let o;const callback=async()=>{await i;o.off("timeout",onTimeout);o.off("error",s);if(e.resolveSocket){r({alpnProtocol:o.alpnProtocol,socket:o,timeout:n});if(n){await Promise.resolve();o.emit("timeout")}}else{o.destroy();r({alpnProtocol:o.alpnProtocol,timeout:n})}};const onTimeout=async()=>{n=true;callback()};const i=(async()=>{try{o=await t(e,callback);o.on("error",s);o.once("timeout",onTimeout)}catch(e){s(e)}})()}))},9004:(e,t,r)=>{"use strict";const s=r(2781).Readable;const n=r(9662);class Response extends s{constructor(e,t,r,s){if(typeof e!=="number"){throw new TypeError("Argument `statusCode` should be a number")}if(typeof t!=="object"){throw new TypeError("Argument `headers` should be an object")}if(!(r instanceof Buffer)){throw new TypeError("Argument `body` should be a buffer")}if(typeof s!=="string"){throw new TypeError("Argument `url` should be a string")}super();this.statusCode=e;this.headers=n(t);this.body=r;this.url=s}_read(){this.push(this.body);this.push(null)}}e.exports=Response},1532:(e,t,r)=>{const s=Symbol("SemVer ANY");class Comparator{static get ANY(){return s}constructor(e,t){t=n(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}e=e.trim().split(/\s+/).join(" ");c("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===s){this.value=""}else{this.value=this.operator+this.semver.version}c("comp",this)}parse(e){const t=this.options.loose?o[i.COMPARATORLOOSE]:o[i.COMPARATOR];const r=e.match(t);if(!r){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=s}else{this.semver=new u(r[2],this.options.loose)}}toString(){return this.value}test(e){c("Comparator.test",e,this.options.loose);if(this.semver===s||e===s){return true}if(typeof e==="string"){try{e=new u(e,this.options)}catch(e){return false}}return a(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new l(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new l(this.value,t).test(e.semver)}t=n(t);if(t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")){return false}if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&e.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&e.operator.startsWith("<")){return true}if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")){return true}if(a(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")){return true}if(a(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")){return true}return false}}e.exports=Comparator;const n=r(785);const{safeRe:o,t:i}=r(2566);const a=r(5098);const c=r(427);const u=r(8088);const l=r(9828)},9828:(e,t,r)=>{class Range{constructor(e,t){t=o(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof i){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e.trim().split(/\s+/).join(" ");this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter((e=>!isNullSet(e[0])));if(this.set.length===0){this.set=[e]}else if(this.set.length>1){for(const e of this.set){if(e.length===1&&isAny(e[0])){this.set=[e];break}}}}this.format()}format(){this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(e){const t=(this.options.includePrerelease&&m)|(this.options.loose&&y);const r=t+":"+e;const s=n.get(r);if(s){return s}const o=this.options.loose;const c=o?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(c,hyphenReplace(this.options.includePrerelease));a("hyphen replace",e);e=e.replace(u[l.COMPARATORTRIM],h);a("comparator trim",e);e=e.replace(u[l.TILDETRIM],d);a("tilde trim",e);e=e.replace(u[l.CARETTRIM],p);a("caret trim",e);let g=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));if(o){g=g.filter((e=>{a("loose invalid filter",e,this.options);return!!e.match(u[l.COMPARATORLOOSE])}))}a("range list",g);const v=new Map;const _=g.map((e=>new i(e,this.options)));for(const e of _){if(isNullSet(e)){return[e]}v.set(e.value,e)}if(v.size>1&&v.has("")){v.delete("")}const E=[...v.values()];n.set(r,E);return E}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e){return false}if(typeof e==="string"){try{e=new c(e,this.options)}catch(e){return false}}for(let t=0;te.value==="<0.0.0-0";const isAny=e=>e.value==="";const isSatisfiable=(e,t)=>{let r=true;const s=e.slice();let n=s.pop();while(r&&s.length){r=s.every((e=>n.intersects(e,t)));n=s.pop()}return r};const parseComparator=(e,t)=>{a("comp",e,t);e=replaceCarets(e,t);a("caret",e);e=replaceTildes(e,t);a("tildes",e);e=replaceXRanges(e,t);a("xrange",e);e=replaceStars(e,t);a("stars",e);return e};const isX=e=>!e||e.toLowerCase()==="x"||e==="*";const replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" ");const replaceTilde=(e,t)=>{const r=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(r,((t,r,s,n,o)=>{a("tilde",e,t,r,s,n,o);let i;if(isX(r)){i=""}else if(isX(s)){i=`>=${r}.0.0 <${+r+1}.0.0-0`}else if(isX(n)){i=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`}else if(o){a("replaceTilde pr",o);i=`>=${r}.${s}.${n}-${o} <${r}.${+s+1}.0-0`}else{i=`>=${r}.${s}.${n} <${r}.${+s+1}.0-0`}a("tilde return",i);return i}))};const replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" ");const replaceCaret=(e,t)=>{a("caret",e,t);const r=t.loose?u[l.CARETLOOSE]:u[l.CARET];const s=t.includePrerelease?"-0":"";return e.replace(r,((t,r,n,o,i)=>{a("caret",e,t,r,n,o,i);let c;if(isX(r)){c=""}else if(isX(n)){c=`>=${r}.0.0${s} <${+r+1}.0.0-0`}else if(isX(o)){if(r==="0"){c=`>=${r}.${n}.0${s} <${r}.${+n+1}.0-0`}else{c=`>=${r}.${n}.0${s} <${+r+1}.0.0-0`}}else if(i){a("replaceCaret pr",i);if(r==="0"){if(n==="0"){c=`>=${r}.${n}.${o}-${i} <${r}.${n}.${+o+1}-0`}else{c=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`}}else{c=`>=${r}.${n}.${o}-${i} <${+r+1}.0.0-0`}}else{a("no pr");if(r==="0"){if(n==="0"){c=`>=${r}.${n}.${o}${s} <${r}.${n}.${+o+1}-0`}else{c=`>=${r}.${n}.${o}${s} <${r}.${+n+1}.0-0`}}else{c=`>=${r}.${n}.${o} <${+r+1}.0.0-0`}}a("caret return",c);return c}))};const replaceXRanges=(e,t)=>{a("replaceXRanges",e,t);return e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")};const replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(r,((r,s,n,o,i,c)=>{a("xRange",e,r,s,n,o,i,c);const u=isX(n);const l=u||isX(o);const h=l||isX(i);const d=h;if(s==="="&&d){s=""}c=t.includePrerelease?"-0":"";if(u){if(s===">"||s==="<"){r="<0.0.0-0"}else{r="*"}}else if(s&&d){if(l){o=0}i=0;if(s===">"){s=">=";if(l){n=+n+1;o=0;i=0}else{o=+o+1;i=0}}else if(s==="<="){s="<";if(l){n=+n+1}else{o=+o+1}}if(s==="<"){c="-0"}r=`${s+n}.${o}.${i}${c}`}else if(l){r=`>=${n}.0.0${c} <${+n+1}.0.0-0`}else if(h){r=`>=${n}.${o}.0${c} <${n}.${+o+1}.0-0`}a("xRange return",r);return r}))};const replaceStars=(e,t)=>{a("replaceStars",e,t);return e.trim().replace(u[l.STAR],"")};const replaceGTE0=(e,t)=>{a("replaceGTE0",e,t);return e.trim().replace(u[t.includePrerelease?l.GTE0PRE:l.GTE0],"")};const hyphenReplace=e=>(t,r,s,n,o,i,a,c,u,l,h,d,p)=>{if(isX(s)){r=""}else if(isX(n)){r=`>=${s}.0.0${e?"-0":""}`}else if(isX(o)){r=`>=${s}.${n}.0${e?"-0":""}`}else if(i){r=`>=${r}`}else{r=`>=${r}${e?"-0":""}`}if(isX(u)){c=""}else if(isX(l)){c=`<${+u+1}.0.0-0`}else if(isX(h)){c=`<${u}.${+l+1}.0-0`}else if(d){c=`<=${u}.${l}.${h}-${d}`}else if(e){c=`<${u}.${l}.${+h+1}-0`}else{c=`<=${c}`}return`${r} ${c}`.trim()};const testSet=(e,t,r)=>{for(let r=0;r0){const s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch){return true}}}return false}return true}},8088:(e,t,r)=>{const s=r(427);const{MAX_LENGTH:n,MAX_SAFE_INTEGER:o}=r(2293);const{safeRe:i,t:a}=r(2566);const c=r(785);const{compareIdentifiers:u}=r(2463);class SemVer{constructor(e,t){t=c(t);if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`)}if(e.length>n){throw new TypeError(`version is longer than ${n} characters`)}s("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?i[a.LOOSE]:i[a.FULL]);if(!r){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+r[1];this.minor=+r[2];this.patch=+r[3];if(this.major>o||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>o||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>o||this.patch<0){throw new TypeError("Invalid patch version")}if(!r[4]){this.prerelease=[]}else{this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0){if(typeof this.prerelease[s]==="number"){this.prerelease[s]++;s=-2}}if(s===-1){if(t===this.prerelease.join(".")&&r===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(e)}}if(t){let s=[t,e];if(r===false){s=[t]}if(u(this.prerelease[0],t)===0){if(isNaN(this.prerelease[1])){this.prerelease=s}}else{this.prerelease=s}}break}default:throw new Error(`invalid increment argument: ${e}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}e.exports=SemVer},8848:(e,t,r)=>{const s=r(5925);const clean=(e,t)=>{const r=s(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};e.exports=clean},5098:(e,t,r)=>{const s=r(1898);const n=r(6017);const o=r(4123);const i=r(5522);const a=r(194);const c=r(7520);const cmp=(e,t,r,u)=>{switch(t){case"===":if(typeof e==="object"){e=e.version}if(typeof r==="object"){r=r.version}return e===r;case"!==":if(typeof e==="object"){e=e.version}if(typeof r==="object"){r=r.version}return e!==r;case"":case"=":case"==":return s(e,r,u);case"!=":return n(e,r,u);case">":return o(e,r,u);case">=":return i(e,r,u);case"<":return a(e,r,u);case"<=":return c(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=cmp},3466:(e,t,r)=>{const s=r(8088);const n=r(5925);const{safeRe:o,t:i}=r(2566);const coerce=(e,t)=>{if(e instanceof s){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let r=null;if(!t.rtl){r=e.match(o[i.COERCE])}else{let t;while((t=o[i.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||t.index+t[0].length!==r.index+r[0].length){r=t}o[i.COERCERTL].lastIndex=t.index+t[1].length+t[2].length}o[i.COERCERTL].lastIndex=-1}if(r===null){return null}return n(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};e.exports=coerce},2156:(e,t,r)=>{const s=r(8088);const compareBuild=(e,t,r)=>{const n=new s(e,r);const o=new s(t,r);return n.compare(o)||n.compareBuild(o)};e.exports=compareBuild},2804:(e,t,r)=>{const s=r(4309);const compareLoose=(e,t)=>s(e,t,true);e.exports=compareLoose},4309:(e,t,r)=>{const s=r(8088);const compare=(e,t,r)=>new s(e,r).compare(new s(t,r));e.exports=compare},4297:(e,t,r)=>{const s=r(5925);const diff=(e,t)=>{const r=s(e,null,true);const n=s(t,null,true);const o=r.compare(n);if(o===0){return null}const i=o>0;const a=i?r:n;const c=i?n:r;const u=!!a.prerelease.length;const l=!!c.prerelease.length;if(l&&!u){if(!c.patch&&!c.minor){return"major"}if(a.patch){return"patch"}if(a.minor){return"minor"}return"major"}const h=u?"pre":"";if(r.major!==n.major){return h+"major"}if(r.minor!==n.minor){return h+"minor"}if(r.patch!==n.patch){return h+"patch"}return"prerelease"};e.exports=diff},1898:(e,t,r)=>{const s=r(4309);const eq=(e,t,r)=>s(e,t,r)===0;e.exports=eq},4123:(e,t,r)=>{const s=r(4309);const gt=(e,t,r)=>s(e,t,r)>0;e.exports=gt},5522:(e,t,r)=>{const s=r(4309);const gte=(e,t,r)=>s(e,t,r)>=0;e.exports=gte},900:(e,t,r)=>{const s=r(8088);const inc=(e,t,r,n,o)=>{if(typeof r==="string"){o=n;n=r;r=undefined}try{return new s(e instanceof s?e.version:e,r).inc(t,n,o).version}catch(e){return null}};e.exports=inc},194:(e,t,r)=>{const s=r(4309);const lt=(e,t,r)=>s(e,t,r)<0;e.exports=lt},7520:(e,t,r)=>{const s=r(4309);const lte=(e,t,r)=>s(e,t,r)<=0;e.exports=lte},6688:(e,t,r)=>{const s=r(8088);const major=(e,t)=>new s(e,t).major;e.exports=major},8447:(e,t,r)=>{const s=r(8088);const minor=(e,t)=>new s(e,t).minor;e.exports=minor},6017:(e,t,r)=>{const s=r(4309);const neq=(e,t,r)=>s(e,t,r)!==0;e.exports=neq},5925:(e,t,r)=>{const s=r(8088);const parse=(e,t,r=false)=>{if(e instanceof s){return e}try{return new s(e,t)}catch(e){if(!r){return null}throw e}};e.exports=parse},2866:(e,t,r)=>{const s=r(8088);const patch=(e,t)=>new s(e,t).patch;e.exports=patch},4016:(e,t,r)=>{const s=r(5925);const prerelease=(e,t)=>{const r=s(e,t);return r&&r.prerelease.length?r.prerelease:null};e.exports=prerelease},6417:(e,t,r)=>{const s=r(4309);const rcompare=(e,t,r)=>s(t,e,r);e.exports=rcompare},8701:(e,t,r)=>{const s=r(2156);const rsort=(e,t)=>e.sort(((e,r)=>s(r,e,t)));e.exports=rsort},6055:(e,t,r)=>{const s=r(9828);const satisfies=(e,t,r)=>{try{t=new s(t,r)}catch(e){return false}return t.test(e)};e.exports=satisfies},1426:(e,t,r)=>{const s=r(2156);const sort=(e,t)=>e.sort(((e,r)=>s(e,r,t)));e.exports=sort},9601:(e,t,r)=>{const s=r(5925);const valid=(e,t)=>{const r=s(e,t);return r?r.version:null};e.exports=valid},1383:(e,t,r)=>{const s=r(2566);const n=r(2293);const o=r(8088);const i=r(2463);const a=r(5925);const c=r(9601);const u=r(8848);const l=r(900);const h=r(4297);const d=r(6688);const p=r(8447);const m=r(2866);const y=r(4016);const g=r(4309);const v=r(6417);const _=r(2804);const E=r(2156);const w=r(1426);const b=r(8701);const R=r(4123);const O=r(194);const S=r(1898);const T=r(6017);const A=r(5522);const C=r(7520);const P=r(5098);const k=r(3466);const x=r(1532);const I=r(9828);const $=r(6055);const j=r(2706);const L=r(579);const N=r(832);const q=r(4179);const U=r(2098);const D=r(420);const H=r(9380);const M=r(3323);const F=r(7008);const B=r(5297);const G=r(7863);e.exports={parse:a,valid:c,clean:u,inc:l,diff:h,major:d,minor:p,patch:m,prerelease:y,compare:g,rcompare:v,compareLoose:_,compareBuild:E,sort:w,rsort:b,gt:R,lt:O,eq:S,neq:T,gte:A,lte:C,cmp:P,coerce:k,Comparator:x,Range:I,satisfies:$,toComparators:j,maxSatisfying:L,minSatisfying:N,minVersion:q,validRange:U,outside:D,gtr:H,ltr:M,intersects:F,simplifyRange:B,subset:G,SemVer:o,re:s.re,src:s.src,tokens:s.t,SEMVER_SPEC_VERSION:n.SEMVER_SPEC_VERSION,RELEASE_TYPES:n.RELEASE_TYPES,compareIdentifiers:i.compareIdentifiers,rcompareIdentifiers:i.rcompareIdentifiers}},2293:e=>{const t="2.0.0";const r=256;const s=Number.MAX_SAFE_INTEGER||9007199254740991;const n=16;const o=r-6;const i=["major","premajor","minor","preminor","patch","prepatch","prerelease"];e.exports={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_SAFE_INTEGER:s,RELEASE_TYPES:i,SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},427:e=>{const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},2463:e=>{const t=/^[0-9]+$/;const compareIdentifiers=(e,r)=>{const s=t.test(e);const n=t.test(r);if(s&&n){e=+e;r=+r}return e===r?0:s&&!n?-1:n&&!s?1:ecompareIdentifiers(t,e);e.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},785:e=>{const t=Object.freeze({loose:true});const r=Object.freeze({});const parseOptions=e=>{if(!e){return r}if(typeof e!=="object"){return t}return e};e.exports=parseOptions},2566:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:o}=r(2293);const i=r(427);t=e.exports={};const a=t.re=[];const c=t.safeRe=[];const u=t.src=[];const l=t.t={};let h=0;const d="[a-zA-Z0-9-]";const p=[["\\s",1],["\\d",o],[d,n]];const makeSafeRegex=e=>{for(const[t,r]of p){e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`)}return e};const createToken=(e,t,r)=>{const s=makeSafeRegex(t);const n=h++;i(e,n,t);l[e]=n;u[n]=t;a[n]=new RegExp(t,r?"g":undefined);c[n]=new RegExp(s,r?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`);createToken("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.`+`(${u[l.NUMERICIDENTIFIER]})\\.`+`(${u[l.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.`+`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.`+`(${u[l.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${u[l.NUMERICIDENTIFIER]}|${u[l.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NUMERICIDENTIFIERLOOSE]}|${u[l.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${d}+`);createToken("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`);createToken("FULL",`^${u[l.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`);createToken("LOOSE",`^${u[l.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})`+`(?:\\.(${u[l.XRANGEIDENTIFIER]})`+`(?:\\.(${u[l.XRANGEIDENTIFIER]})`+`(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})`+`(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`);createToken("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${s}})`+`(?:\\.(\\d{1,${s}}))?`+`(?:\\.(\\d{1,${s}}))?`+`(?:$|[^\\d])`);createToken("COERCERTL",u[l.COERCE],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";createToken("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${u[l.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";createToken("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${u[l.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${u[l.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},9380:(e,t,r)=>{const s=r(420);const gtr=(e,t,r)=>s(e,t,">",r);e.exports=gtr},7008:(e,t,r)=>{const s=r(9828);const intersects=(e,t,r)=>{e=new s(e,r);t=new s(t,r);return e.intersects(t,r)};e.exports=intersects},3323:(e,t,r)=>{const s=r(420);const ltr=(e,t,r)=>s(e,t,"<",r);e.exports=ltr},579:(e,t,r)=>{const s=r(8088);const n=r(9828);const maxSatisfying=(e,t,r)=>{let o=null;let i=null;let a=null;try{a=new n(t,r)}catch(e){return null}e.forEach((e=>{if(a.test(e)){if(!o||i.compare(e)===-1){o=e;i=new s(o,r)}}}));return o};e.exports=maxSatisfying},832:(e,t,r)=>{const s=r(8088);const n=r(9828);const minSatisfying=(e,t,r)=>{let o=null;let i=null;let a=null;try{a=new n(t,r)}catch(e){return null}e.forEach((e=>{if(a.test(e)){if(!o||i.compare(e)===1){o=e;i=new s(o,r)}}}));return o};e.exports=minSatisfying},4179:(e,t,r)=>{const s=r(8088);const n=r(9828);const o=r(4123);const minVersion=(e,t)=>{e=new n(e,t);let r=new s("0.0.0");if(e.test(r)){return r}r=new s("0.0.0-0");if(e.test(r)){return r}r=null;for(let t=0;t{const t=new s(e.semver.version);switch(e.operator){case">":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!i||o(t,i)){i=t}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}));if(i&&(!r||o(r,i))){r=i}}if(r&&e.test(r)){return r}return null};e.exports=minVersion},420:(e,t,r)=>{const s=r(8088);const n=r(1532);const{ANY:o}=n;const i=r(9828);const a=r(6055);const c=r(4123);const u=r(194);const l=r(7520);const h=r(5522);const outside=(e,t,r,d)=>{e=new s(e,d);t=new i(t,d);let p,m,y,g,v;switch(r){case">":p=c;m=l;y=u;g=">";v=">=";break;case"<":p=u;m=h;y=c;g="<";v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,d)){return false}for(let r=0;r{if(e.semver===o){e=new n(">=0.0.0")}i=i||e;a=a||e;if(p(e.semver,i.semver,d)){i=e}else if(y(e.semver,a.semver,d)){a=e}}));if(i.operator===g||i.operator===v){return false}if((!a.operator||a.operator===g)&&m(e,a.semver)){return false}else if(a.operator===v&&y(e,a.semver)){return false}}return true};e.exports=outside},5297:(e,t,r)=>{const s=r(6055);const n=r(4309);e.exports=(e,t,r)=>{const o=[];let i=null;let a=null;const c=e.sort(((e,t)=>n(e,t,r)));for(const e of c){const n=s(e,t,r);if(n){a=e;if(!i){i=e}}else{if(a){o.push([i,a])}a=null;i=null}}if(i){o.push([i,null])}const u=[];for(const[e,t]of o){if(e===t){u.push(e)}else if(!t&&e===c[0]){u.push("*")}else if(!t){u.push(`>=${e}`)}else if(e===c[0]){u.push(`<=${t}`)}else{u.push(`${e} - ${t}`)}}const l=u.join(" || ");const h=typeof t.raw==="string"?t.raw:String(t);return l.length{const s=r(9828);const n=r(1532);const{ANY:o}=n;const i=r(6055);const a=r(4309);const subset=(e,t,r={})=>{if(e===t){return true}e=new s(e,r);t=new s(t,r);let n=false;e:for(const s of e.set){for(const e of t.set){const t=simpleSubset(s,e,r);n=n||t!==null;if(t){continue e}}if(n){return false}}return true};const c=[new n(">=0.0.0-0")];const u=[new n(">=0.0.0")];const simpleSubset=(e,t,r)=>{if(e===t){return true}if(e.length===1&&e[0].semver===o){if(t.length===1&&t[0].semver===o){return true}else if(r.includePrerelease){e=c}else{e=u}}if(t.length===1&&t[0].semver===o){if(r.includePrerelease){return true}else{t=u}}const s=new Set;let n,l;for(const t of e){if(t.operator===">"||t.operator===">="){n=higherGT(n,t,r)}else if(t.operator==="<"||t.operator==="<="){l=lowerLT(l,t,r)}else{s.add(t.semver)}}if(s.size>1){return null}let h;if(n&&l){h=a(n.semver,l.semver,r);if(h>0){return null}else if(h===0&&(n.operator!==">="||l.operator!=="<=")){return null}}for(const e of s){if(n&&!i(e,String(n),r)){return null}if(l&&!i(e,String(l),r)){return null}for(const s of t){if(!i(e,String(s),r)){return false}}return true}let d,p;let m,y;let g=l&&!r.includePrerelease&&l.semver.prerelease.length?l.semver:false;let v=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:false;if(g&&g.prerelease.length===1&&l.operator==="<"&&g.prerelease[0]===0){g=false}for(const e of t){y=y||e.operator===">"||e.operator===">=";m=m||e.operator==="<"||e.operator==="<=";if(n){if(v){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch){v=false}}if(e.operator===">"||e.operator===">="){d=higherGT(n,e,r);if(d===e&&d!==n){return false}}else if(n.operator===">="&&!i(n.semver,String(e),r)){return false}}if(l){if(g){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===g.major&&e.semver.minor===g.minor&&e.semver.patch===g.patch){g=false}}if(e.operator==="<"||e.operator==="<="){p=lowerLT(l,e,r);if(p===e&&p!==l){return false}}else if(l.operator==="<="&&!i(l.semver,String(e),r)){return false}}if(!e.operator&&(l||n)&&h!==0){return false}}if(n&&m&&!l&&h!==0){return false}if(l&&y&&!n&&h!==0){return false}if(v||g){return false}return true};const higherGT=(e,t,r)=>{if(!e){return t}const s=a(e.semver,t.semver,r);return s>0?e:s<0?t:t.operator===">"&&e.operator===">="?t:e};const lowerLT=(e,t,r)=>{if(!e){return t}const s=a(e.semver,t.semver,r);return s<0?e:s>0?t:t.operator==="<"&&e.operator==="<="?t:e};e.exports=subset},2706:(e,t,r)=>{const s=r(9828);const toComparators=(e,t)=>new s(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));e.exports=toComparators},2098:(e,t,r)=>{const s=r(9828);const validRange=(e,t)=>{try{return new s(e,t).range||"*"}catch(e){return null}};e.exports=validRange},4294:(e,t,r)=>{e.exports=r(4219)},4219:(e,t,r)=>{"use strict";var s=r(1808);var n=r(4404);var o=r(3685);var i=r(5687);var a=r(2361);var c=r(9491);var u=r(3837);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,s,n){var o=toOptions(r,s,n);for(var i=0,a=t.requests.length;i=this.maxSockets){n.requests.push(o);return}n.createSocket(o,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){n.emit("free",t,o)}function onCloseOrRemove(e){n.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var s={};r.sockets.push(s);var n=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){n.localAddress=e.localAddress}if(n.proxyAuth){n.headers=n.headers||{};n.headers["Proxy-Authorization"]="Basic "+new Buffer(n.proxyAuth).toString("base64")}l("making CONNECT request");var o=r.request(n);o.useChunkedEncodingByDefault=false;o.once("response",onResponse);o.once("upgrade",onUpgrade);o.once("connect",onConnect);o.once("error",onError);o.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(n,i,a){o.removeAllListeners();i.removeAllListeners();if(n.statusCode!==200){l("tunneling socket could not be established, statusCode=%d",n.statusCode);i.destroy();var c=new Error("tunneling socket could not be established, "+"statusCode="+n.statusCode);c.code="ECONNRESET";e.request.emit("error",c);r.removeSocket(s);return}if(a.length>0){l("got illegal response body from proxy");i.destroy();var c=new Error("got illegal response body from proxy");c.code="ECONNRESET";e.request.emit("error",c);r.removeSocket(s);return}l("tunneling connection has established");r.sockets[r.sockets.indexOf(s)]=i;return t(i)}function onError(t){o.removeAllListeners();l("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var n=new Error("tunneling socket could not be established, "+"cause="+t.message);n.code="ECONNRESET";e.request.emit("error",n);r.removeSocket(s)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,(function(e){r.request.onSocket(e)}))}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,(function(s){var o=e.request.getHeader("host");var i=mergeOptions({},r.options,{socket:s,servername:o?o.replace(/:.*$/,""):e.host});var a=n.connect(0,i);r.sockets[r.sockets.indexOf(s)]=a;t(a)}))}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return n.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return a.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return h.default}});var s=_interopRequireDefault(r(8628));var n=_interopRequireDefault(r(6409));var o=_interopRequireDefault(r(5122));var i=_interopRequireDefault(r(9120));var a=_interopRequireDefault(r(5332));var c=_interopRequireDefault(r(1595));var u=_interopRequireDefault(r(6900));var l=_interopRequireDefault(r(8950));var h=_interopRequireDefault(r(2746));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},4569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("md5").update(e).digest()}var n=md5;t["default"]=n},5332:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r="00000000-0000-0000-0000-000000000000";t["default"]=r},2746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}let t;const r=new Uint8Array(16);r[0]=(t=parseInt(e.slice(0,8),16))>>>24;r[1]=t>>>16&255;r[2]=t>>>8&255;r[3]=t&255;r[4]=(t=parseInt(e.slice(9,13),16))>>>8;r[5]=t&255;r[6]=(t=parseInt(e.slice(14,18),16))>>>8;r[7]=t&255;r[8]=(t=parseInt(e.slice(19,23),16))>>>8;r[9]=t&255;r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;r[11]=t/4294967296&255;r[12]=t>>>24&255;r[13]=t>>>16&255;r[14]=t>>>8&255;r[15]=t&255;return r}var n=parse;t["default"]=n},814:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;t["default"]=r},807:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var s=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=new Uint8Array(256);let o=n.length;function rng(){if(o>n.length-16){s.default.randomFillSync(n);o=0}return n.slice(o,o+=16)}},5274:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return s.default.createHash("sha1").update(e).digest()}var n=sha1;t["default"]=n},8950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const n=[];for(let e=0;e<256;++e){n.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const r=(n[e[t+0]]+n[e[t+1]]+n[e[t+2]]+n[e[t+3]]+"-"+n[e[t+4]]+n[e[t+5]]+"-"+n[e[t+6]]+n[e[t+7]]+"-"+n[e[t+8]]+n[e[t+9]]+"-"+n[e[t+10]]+n[e[t+11]]+n[e[t+12]]+n[e[t+13]]+n[e[t+14]]+n[e[t+15]]).toLowerCase();if(!(0,s.default)(r)){throw TypeError("Stringified UUID is invalid")}return r}var o=stringify;t["default"]=o},8628:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(807));var n=_interopRequireDefault(r(8950));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let o;let i;let a=0;let c=0;function v1(e,t,r){let u=t&&r||0;const l=t||new Array(16);e=e||{};let h=e.node||o;let d=e.clockseq!==undefined?e.clockseq:i;if(h==null||d==null){const t=e.random||(e.rng||s.default)();if(h==null){h=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(d==null){d=i=(t[6]<<8|t[7])&16383}}let p=e.msecs!==undefined?e.msecs:Date.now();let m=e.nsecs!==undefined?e.nsecs:c+1;const y=p-a+(m-c)/1e4;if(y<0&&e.clockseq===undefined){d=d+1&16383}if((y<0||p>a)&&e.nsecs===undefined){m=0}if(m>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}a=p;c=m;i=d;p+=122192928e5;const g=((p&268435455)*1e4+m)%4294967296;l[u++]=g>>>24&255;l[u++]=g>>>16&255;l[u++]=g>>>8&255;l[u++]=g&255;const v=p/4294967296*1e4&268435455;l[u++]=v>>>8&255;l[u++]=v&255;l[u++]=v>>>24&15|16;l[u++]=v>>>16&255;l[u++]=d>>>8|128;l[u++]=d&255;for(let e=0;e<6;++e){l[u+e]=h[e]}return t||(0,n.default)(l)}var u=v1;t["default"]=u},6409:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(5998));var n=_interopRequireDefault(r(4569));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,s.default)("v3",48,n.default);var i=o;t["default"]=i},5998:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var s=_interopRequireDefault(r(8950));var n=_interopRequireDefault(r(2746));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(807));var n=_interopRequireDefault(r(8950));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,r){e=e||{};const o=e.random||(e.rng||s.default)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){r=r||0;for(let e=0;e<16;++e){t[r+e]=o[e]}return t}return(0,n.default)(o)}var o=v4;t["default"]=o},9120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(5998));var n=_interopRequireDefault(r(5274));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,s.default)("v5",80,n.default);var i=o;t["default"]=i},6900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(814));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&s.default.test(e)}var n=validate;t["default"]=n},1595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=_interopRequireDefault(r(6900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,s.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var n=version;t["default"]=n},2940:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach((function(t){wrapper[t]=e[t]}));return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},665:(e,t,r)=>{"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach((function(e){t.push(e)}))}else if(arguments.length>0){for(var r=0,s=arguments.length;r1){r=t}else if(this.head){s=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=0;s!==null;n++){r=e(r,s.value,n);s=s.next}return r};Yallist.prototype.reduceReverse=function(e,t){var r;var s=this.tail;if(arguments.length>1){r=t}else if(this.tail){s=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var n=this.length-1;s!==null;n--){r=e(r,s.value,n);s=s.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,r=this.head;r!==null;t++){e[t]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,r=this.tail;r!==null;t++){e[t]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(tthis.length){t=this.length}for(var s=0,n=this.head;n!==null&&sthis.length){t=this.length}for(var s=this.length,n=this.tail;n!==null&&s>t;s--){n=n.prev}for(;n!==null&&s>e;s--,n=n.prev){r.push(n.value)}return r};Yallist.prototype.splice=function(e,t,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var s=0,n=this.head;n!==null&&s0|[1-9]\d*)\.(?0|[1-9]\d*)\.(?0|[1-9]\d*)(?:-(?(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;const semverReGlobal=/(?0|[1-9]\d*)\.(?0|[1-9]\d*)\.(?0|[1-9]\d*)(?:-(?(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/gm;const packageFileName=(0,path_1.normalize)((0,core_1.getInput)("file-name")||"package.json"),dir=process.env.GITHUB_WORKSPACE||"/github/workspace",eventFile=process.env.GITHUB_EVENT_PATH||"/github/workflow/event.json",assumeSameVersion=(0,core_1.getInput)("assume-same-version"),staticChecking=(0,core_1.getInput)("static-checking"),token=(0,core_1.getInput)("token");let packageFileURL=((0,core_1.getInput)("file-url")||"").trim();const allowedTags=["::before"];const outputs={};function main(){var e,t;return __awaiter(this,void 0,void 0,(function*(){if(packageFileURL&&!isURL(packageFileURL)&&!allowedTags.includes(packageFileURL))return(0,core_1.setFailed)(`The provided package file URL is not valid (received: ${packageFileURL})`);if(assumeSameVersion&&!["old","new"].includes(assumeSameVersion))return(0,core_1.setFailed)(`The provided assume-same-version parameter is not valid (received ${assumeSameVersion})`);if(staticChecking&&!["localIsNew","remoteIsNew"].includes(staticChecking))return(0,core_1.setFailed)(`The provided static-checking parameter is not valid (received ${staticChecking})`);const r=packageFileURL==="::before";if(r){const e=yield readJson(eventFile);if(!e)throw new Error(`Can't find event file (${eventFile})`);const{before:t,repository:r}=e;if(t&&r){packageFileURL=`https://raw.githubusercontent.com/${r===null||r===void 0?void 0:r.full_name}/${t}/${packageFileName}`;(0,core_1.startGroup)("URL tag resolution...");(0,core_1.info)(`::before tag resolved to ${r===null||r===void 0?void 0:r.full_name}/${String(t).substr(0,7)}/${packageFileName}`);(0,core_1.info)(`Current package file URL: ${packageFileURL}`);(0,core_1.info)(`Using token for remote url: ${!!token}`);(0,core_1.endGroup)()}else throw new Error(`Can't correctly read event file (before: ${t}, repository: ${r})`)}if(staticChecking){if(!packageFileURL)return(0,core_1.setFailed)("Static checking cannot be performed without a `file-url` argument.");(0,core_1.startGroup)("Static-checking files...");(0,core_1.info)(`Package file name: "${packageFileName}"`);(0,core_1.info)(`Package file URL: "${packageFileURL}"`);const s=(e=yield readJson((0,path_1.join)(dir,packageFileName)))===null||e===void 0?void 0:e.version,n=(t=yield readJson(packageFileURL,r&&token?token:undefined))===null||t===void 0?void 0:t.version;if(!s||!n){(0,core_1.endGroup)();return(0,core_1.setFailed)(`Couldn't find ${s?"local":"remote"} version.`)}if(!semverRE.test(s)){return(0,core_1.setFailed)(`Local version does not match semver pattern`)}if(!semverRE.test(n)){return(0,core_1.setFailed)(`Remote version does not match semver pattern`)}const o=staticChecking==="localIsNew"?(0,semver_diff_1.default)(n,s):(0,semver_diff_1.default)(s,n);if(o){output("changed",true);output("version",staticChecking=="localIsNew"?s:n);output("type",o);(0,core_1.endGroup)();(0,core_1.info)(`Found match for version ${staticChecking=="localIsNew"?s:n}`)}}else{const e=yield readJson(eventFile);const t=e.commits||(yield request(e.pull_request._links.commits.href));yield processDirectory(dir,t)}}))}function isURL(e){try{new URL(e);return true}catch(e){return false}}function readJson(e,t){return __awaiter(this,void 0,void 0,(function*(){if(isURL(e)){const r=t?{Authorization:`token ${t}`}:{};return(yield(0,got_1.default)({url:e,method:"GET",headers:r,responseType:"json"})).body}else{const t=(0,fs_1.readFileSync)(e,{encoding:"utf8"});if(typeof t=="string")try{return JSON.parse(t)}catch(e){(0,core_1.error)(e instanceof Error?e.stack||e.message:e+"")}}}))}function request(e){return __awaiter(this,void 0,void 0,(function*(){const t=token?{Authorization:`Bearer ${token}`}:{};return(yield(0,got_1.default)({url:e,method:"GET",headers:t,responseType:"json"})).body}))}function processDirectory(e,t){return __awaiter(this,void 0,void 0,(function*(){try{const r=yield(packageFileURL?readJson(packageFileURL):readJson((0,path_1.join)(e,packageFileName))).catch((()=>{Promise.reject(new NeutralExitError(`Package file not found: ${packageFileName}`))}));if(!isPackageObj(r))throw new Error("Can't find version field");if(t.length>=20)(0,core_1.warning)("This workflow run topped the commit limit set by GitHub webhooks: that means that commits could not appear and that the run could not find the version change.");if(t.length<=0){(0,core_1.info)("There are no commits to look at.");return}yield checkCommits(t,r.version)}catch(e){(0,core_1.setFailed)(`${e}`)}}))}function checkCommits(e,t){return __awaiter(this,void 0,void 0,(function*(){try{(0,core_1.startGroup)(`Searching in ${e.length} commit${e.length==1?"":"s"}...`);(0,core_1.info)(`Package file name: "${packageFileName}"`);(0,core_1.info)(`Package file URL: ${packageFileURL?`"${packageFileURL}"`:"undefined"}`);(0,core_1.info)(`Version assumptions: ${assumeSameVersion?`"${assumeSameVersion}"`:"undefined"}`);for(const r of e){const{message:e,sha:s}=getBasicInfo(r);const n=e.match(semverReGlobal)||[];if(n.includes(t)){if(yield checkDiff(s,t)){(0,core_1.endGroup)();(0,core_1.info)(`Found match for version ${t}: ${s.substring(0,7)} ${e}`);return true}}}(0,core_1.endGroup)();if((0,core_1.getInput)("diff-search")){(0,core_1.info)("No standard npm version commit found, switching to diff search (this could take more time...)");if(!isLocalCommitArray(e)){e=e.sort(((e,t)=>new Date(t.commit.committer.date).getTime()-new Date(e.commit.committer.date).getTime()))}(0,core_1.startGroup)(`Checking the diffs of ${e.length} commit${e.length==1?"":"s"}...`);for(const r of e){const{message:e,sha:s}=getBasicInfo(r);if(yield checkDiff(s,t)){(0,core_1.endGroup)();(0,core_1.info)(`Found match for version ${t}: ${s.substring(0,7)} - ${e}`);return true}}}(0,core_1.endGroup)();(0,core_1.info)("No matching commit found.");output("changed",false);return false}catch(e){(0,core_1.setFailed)(`${e}`)}}))}function getBasicInfo(e){let t,r;if(isLocalCommit(e)){t=e.message;r=e.id}else{t=e.commit.message;r=e.sha}return{message:t,sha:r}}function checkDiff(e,t){return __awaiter(this,void 0,void 0,(function*(){try{const r=yield getCommit(e);const s=r.files.find((e=>e.filename==packageFileName));if(!s){(0,core_1.info)(`- ${e.substr(0,7)}: no changes to the package file`);return false}const n={};const o=s.patch.split("\n").filter((e=>e.includes('"version":')&&["+","-"].includes(e[0])));if(o.length>2){(0,core_1.info)(`- ${e.substr(0,7)}: too many version lines`);return false}for(const e of o)n[e.startsWith("+")?"added":"deleted"]=e;if(!n.added){(0,core_1.info)(`- ${e.substr(0,7)}: no "+ version" line`);return false}const i={added:assumeSameVersion=="new"?t:parseVersionLine(n.added),deleted:assumeSameVersion=="old"?t:!!n.deleted&&parseVersionLine(n.deleted)};if(i.added!=t&&!assumeSameVersion){(0,core_1.info)(`- ${e.substr(0,7)}: added version doesn't match current one (added: "${i.added}"; current: "${t}")`);return false}output("changed",true);output("version",t);if(i.deleted)output("type",(0,semver_diff_1.default)(i.deleted,i.added));output("commit",r.sha);(0,core_1.info)(`- ${e.substr(0,7)}: match found, more info below`);return true}catch(e){(0,core_1.error)(`An error occurred in checkDiff:\n${e}`);throw new ExitError(1)}}))}function trimTrailingSlashFromUrl(e){const t=e.trim();return t.endsWith("/")?t.slice(0,-1):t}function getCommit(e){return __awaiter(this,void 0,void 0,(function*(){const t=trimTrailingSlashFromUrl((0,core_1.getInput)("github-api-url"));const r=`${t}/repos/${process.env.GITHUB_REPOSITORY}/commits/${e}`;const s=yield request(r);if(typeof s!="object"||!s)throw new Error("Response data must be an object.");return s}))}function parseVersionLine(e){return(e.split('"')||[]).map((e=>matchVersion(e))).find((e=>!!e))}function matchVersion(e){return(e.match(semverReGlobal)||[])[0]}function output(e,t){outputs[e]=t;return(0,core_1.setOutput)(e,`${t}`)}function logOutputs(){(0,core_1.startGroup)("Outputs:");for(const e in outputs){(0,core_1.info)(`${e}: ${outputs[e]}`)}(0,core_1.endGroup)()}class ExitError extends Error{constructor(e){super(`Command failed with code ${e}`);if(typeof e=="number")this.code=e}}class NeutralExitError extends Error{}if(require.main==require.cache[eval("__filename")]){(0,core_1.info)("Searching for version update...");main().then((()=>{if(typeof outputs.changed=="undefined"){output("changed",false)}logOutputs()})).catch((e=>{if(e instanceof NeutralExitError)process.exitCode=78;else{process.exitCode=1;(0,core_1.error)(e.message||e)}}))}function isLocalCommit(e){return typeof e.id=="string"}function isLocalCommitArray(e){return isLocalCommit(e[0])}function isPackageObj(e){return!!e&&!!e.version}},9491:e=>{"use strict";e.exports=require("assert")},4300:e=>{"use strict";e.exports=require("buffer")},6113:e=>{"use strict";e.exports=require("crypto")},9523:e=>{"use strict";e.exports=require("dns")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5158:e=>{"use strict";e.exports=require("http2")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},2781:e=>{"use strict";e.exports=require("stream")},4404:e=>{"use strict";e.exports=require("tls")},7310:e=>{"use strict";e.exports=require("url")},3837:e=>{"use strict";e.exports=require("util")},9796:e=>{"use strict";e.exports=require("zlib")},5945:(e,t,r)=>{"use strict";r.r(t);r.d(t,{default:()=>semverDiff});var s=r(1383);function semverDiff(e,t){e=s.parse(e);t=s.parse(t);if(s.compareBuild(e,t)>=0){return}return s.diff(e,t)||"build"}}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var s=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);s=false}finally{if(s)delete __webpack_module_cache__[e]}return r.exports}(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__=__nccwpck_require__(399);module.exports=__webpack_exports__})(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7af9342f..211697f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "semver-diff": "^4.0.0" }, "devDependencies": { - "@types/node": "^12.20.6", + "@types/node": "^20.11.6", "@typescript-eslint/eslint-plugin": "^6.13.1", "@typescript-eslint/parser": "^6.16.0", "@vercel/ncc": "^0.38.1", @@ -251,9 +251,12 @@ } }, "node_modules/@types/node": { - "version": "12.20.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.6.tgz", - "integrity": "sha512-sRVq8d+ApGslmkE9e3i+D3gFGk7aZHAT+G4cIpIEdLJYPsWiSPwcAnJEjddLQQDqV3Ra2jOclX/Sv6YrvGYiWA==" + "version": "20.11.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.6.tgz", + "integrity": "sha512-+EOokTnksGVgip2PbYbr3xnR7kZigh4LbybAfBAw5BpnQ+FqBYUsvCEjYd70IXKlbohQ64mzEYmMtlWUY8q//Q==", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/responselike": { "version": "1.0.0", @@ -1524,9 +1527,9 @@ } }, "node_modules/got": { - "version": "11.8.3", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.3.tgz", - "integrity": "sha512-7gtQ5KiPh1RtGS9/Jbv1ofDpBFuq42gyfEib+ejaRBJuj/3tQFeR5+gw57e4ipaU8c/rCjvX6fkQz2lyDlGAOg==", + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", "dependencies": { "@sindresorhus/is": "^4.0.0", "@szmarczak/http-timer": "^4.0.5", @@ -2581,6 +2584,11 @@ "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -2883,9 +2891,12 @@ } }, "@types/node": { - "version": "12.20.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.6.tgz", - "integrity": "sha512-sRVq8d+ApGslmkE9e3i+D3gFGk7aZHAT+G4cIpIEdLJYPsWiSPwcAnJEjddLQQDqV3Ra2jOclX/Sv6YrvGYiWA==" + "version": "20.11.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.6.tgz", + "integrity": "sha512-+EOokTnksGVgip2PbYbr3xnR7kZigh4LbybAfBAw5BpnQ+FqBYUsvCEjYd70IXKlbohQ64mzEYmMtlWUY8q//Q==", + "requires": { + "undici-types": "~5.26.4" + } }, "@types/responselike": { "version": "1.0.0", @@ -3763,9 +3774,9 @@ } }, "got": { - "version": "11.8.3", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.3.tgz", - "integrity": "sha512-7gtQ5KiPh1RtGS9/Jbv1ofDpBFuq42gyfEib+ejaRBJuj/3tQFeR5+gw57e4ipaU8c/rCjvX6fkQz2lyDlGAOg==", + "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", "requires": { "@sindresorhus/is": "^4.0.0", "@szmarczak/http-timer": "^4.0.5", @@ -4509,6 +4520,11 @@ "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", diff --git a/package.json b/package.json index d105e583..2454d15b 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,24 @@ "prepare": "husky install", "test": "echo \"Error: no test specified\" && exit 1" }, + "dependencies": { + "@actions/core": "^1.10.1", + "got": "^11.8.3", + "semver-diff": "^4.0.0" + }, + "devDependencies": { + "@types/node": "^20.11.6", + "@typescript-eslint/eslint-plugin": "^6.13.1", + "@typescript-eslint/parser": "^6.16.0", + "@vercel/ncc": "^0.38.1", + "all-contributors-cli": "^6.26.1", + "eslint": "^8.45.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", + "husky": "^8.0.3", + "prettier": "^3.1.1", + "typescript": "^5.3.3" + }, "repository": { "type": "git", "url": "git+https://github.com/EndBug/version-check.git" @@ -28,22 +46,7 @@ "url": "https://github.com/EndBug/version-check/issues" }, "homepage": "https://github.com/EndBug/version-check#readme", - "dependencies": { - "@actions/core": "^1.10.1", - "got": "^11.8.3", - "semver-diff": "^4.0.0" - }, - "devDependencies": { - "@types/node": "^12.20.6", - "@typescript-eslint/eslint-plugin": "^6.13.1", - "@typescript-eslint/parser": "^6.16.0", - "@vercel/ncc": "^0.38.1", - "all-contributors-cli": "^6.26.1", - "eslint": "^8.45.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.1.3", - "husky": "^8.0.3", - "prettier": "^3.1.1", - "typescript": "^5.3.3" + "engines": { + "node": ">=20" } }