diff --git a/README.md b/README.md index cc45fa3..6ed0e77 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@ -# LeanKit Github Actions -These Github Actions provide an easy way to interact with your LeanKit account during your build or deployment lifecycle. For more information on using Github Actions in general, see https://docs.github.com/en/actions. +# AgilePlace Github Actions +These Github Actions provide an easy way to interact with your AgilePlace account during your build or deployment lifecycle. For more information on using Github Actions in general, see https://docs.github.com/en/actions. -To consume, reference this repository, and the action. All available LeanKit Actions are in this repository only. For example: `use: leankit/github-actions/blockCard@v1.4`. See specific examples with input parameters below. +To consume, reference this repository, and the action. All available AgilePlace Actions are in this repository only. For example: `use: leankit/github-actions/blockCard@v1.4`. See specific examples with input parameters below. ## Usage Notes ### API Tokens -All LeanKit Actions require an "API Token". This token is created in your LeanKit app. In the app, click on your user avatar, then select "API Tokens" and follow prompts to create and copy your token. **Keep this token secure!** This api token can be used to access anything in LeanKit to which you have access, and perform actions in your name. Do not store the token in a workflow file directly -- create a 'secret' and store it in the protected secret file. See https://docs.github.com/en/actions/security-guides/encrypted-secrets for specific instructions on creating and using secrets. Consider creating a "service account" in LeanKit with access limited to only the boards necessary to perform the required actions. +All AgilePlace Actions require an "API Token". This token is created in your AgilePlace app. In the app, click on your user avatar, then select "API Tokens" and follow prompts to create and copy your token. **Keep this token secure!** This api token can be used to access anything in AgilePlace to which you have access, and perform actions in your name. Do not store the token in a workflow file directly -- create a 'secret' and store it in the protected secret file. See https://docs.github.com/en/actions/security-guides/encrypted-secrets for specific instructions on creating and using secrets. Consider creating a "service account" in AgilePlace with access limited to only the boards necessary to perform the required actions. ### Error Messages When any of these actions fail, an error message will be set on the action's output 'error' property. For example, if a 'validateCustomFields' step whose id was 'validation', you could access the error message in a subsequent step (that included the `if: failed()` qualifier) using `${{ steps.validation.outputs.error }}`. We also set an environment variable when one of these actions fails, so the same error would be available at `${{ env.LK_ERROR_MESSAGE }}`. -### Using with LeanKit Card Automation -LeanKit includes automation tools that can trigger a Github Workflow using a `repository_dispatch`. When triggering a workflow, we provide the following as the `client_payload`: +### Using with AgilePlace Card Automation +AgilePlace includes automation tools that can trigger a Github Workflow using a `repository_dispatch`. When triggering a workflow, we provide the following as the `client_payload`: ```json { "automation": { @@ -64,8 +64,8 @@ Add a comment to a card #### Input Params |name|description|required| |----|-----------|--------| -|host|LeanKit Url (https://mycompany.leankit.com)|yes| -|apiToken|API token with read access to your LeanKit board|yes| +|host|AgilePlace Url (https://mycompany.leankit.com)|yes| +|apiToken|API token with read access to your AgilePlace board|yes| |cardId|Id of the card|yes| |comment|Comment text|yes| @@ -88,8 +88,8 @@ Block or unblock a card #### Input Params |name|description|required| |----|-----------|--------| -|host|LeanKit Url (https://mycompany.leankit.com)|yes| -|apiToken|API token with read access to your LeanKit board|yes| +|host|AgilePlace Url (https://mycompany.leankit.com)|yes| +|apiToken|API token with read access to your AgilePlace board|yes| |cardId|Id of the card|yes| |isBlocked|Whether to block or unblock the card|yes| |blockReason|Block reason|| @@ -114,8 +114,8 @@ Create a new card #### Input Params |name|description|required| |----|-----------|--------| -|host|LeanKit Url (https://mycompany.leankit.com)|yes| -|apiToken|API token with write access to your LeanKit board|yes| +|host|AgilePlace Url (https://mycompany.leankit.com)|yes| +|apiToken|API token with write access to your AgilePlace board|yes| |boardId|Board Id for the new card|yes| |title|Title of the new card|yes| |laneId|Optionally specify lane id for the new card. Default drop lane will be used when not set.|| @@ -144,8 +144,8 @@ Create a new card #### Input Params |name|description|required| |----|-----------|--------| -|host|LeanKit Url (https://mycompany.leankit.com)|yes| -|apiToken|API token for your LeanKit board|yes| +|host|AgilePlace Url (https://mycompany.leankit.com)|yes| +|apiToken|API token for your AgilePlace board|yes| |cardId|Id of the card|yes| |laneId|Lane to move the card to|yes| |wipOverrideComment|WIP Override reason to provide, in case lane is at WIP|| @@ -166,8 +166,8 @@ Create a new card #### Input Params |name|description|required| |----|-----------|--------| -|host|LeanKit Url (https://mycompany.leankit.com)|yes| -|apiToken|API token for your LeanKit board|yes| +|host|AgilePlace Url (https://mycompany.leankit.com)|yes| +|apiToken|API token for your AgilePlace board|yes| |cardIds|Comma-separated list of cardIds to update|yes| |assignUserIds|Comma-separated list of userIds to that will be assigned to the cards|| |unassignUserIds|Comma-separated list of userIds to that will be unassigned from the cards|| @@ -193,13 +193,13 @@ Fail if specified custom fields do not have a value on a particular card #### Input Params |name|description|required| |----|-----------|--------| -|host|LeanKit Url (https://mycompany.leankit.com)|yes| -|apiToken|API token with read access to your LeanKit board|yes| +|host|AgilePlace Url (https://mycompany.leankit.com)|yes| +|apiToken|API token with read access to your AgilePlace board|yes| |cardId|Id of the card|yes| |requiredCustomFields|The labels or ids of the custom fields to validate|yes| |customFields|Custom fields values, if available already|| -Note: the `customFields` input is available to receive custom field information that was either provided in a previous step or received from the event payload. The example below demonstrates how customFields may be set if your workflow was started from a LeanKit 'Trigger Github Action` integration step. +Note: the `customFields` input is available to receive custom field information that was either provided in a previous step or received from the event payload. The example below demonstrates how customFields may be set if your workflow was started from a AgilePlace 'Trigger Github Action` integration step. #### Example workflow step ``` - name: validate required fields @@ -241,6 +241,56 @@ Valid formats that will be identified as a card id: * error; error message if failed * cardId; card id identified in the inputText +----------- +### Initiate Board Event +Initiate external automation event on a board +#### Input Params +| name | description | required | +|-----------|---------------------------------------------|----------| +| host | AgilePlace Url (https://mycompany.leankit.com) | yes | +| apiToken | API token for your AgilePlace account | yes | +| boardId | Board Id to initiate the event on | yes | +| eventName | Name of the event to initiate | yes | + +#### Example workflow step +``` + - name: initiate board event + id: initiateBoardEvent + uses: leankit/github-actions/initiateBoardEvent@v1.4 + with: + host: https://YOUR-ACCOUNT.leankit.com/ + apiToken: ${{ secrets.MY_API_TOKEN }} + boardId: 123456 + eventName: my-event +``` +#### Outputs +* error; error message if failed + +----------- +### Initiate Card Event +Initiate external automation event on a card +#### Input Params +| name | description | required | +|-----------|---------------------------------------------|----------| +| host | AgilePlace Url (https://mycompany.leankit.com) | yes | +| apiToken | API token for your AgilePlace account | yes | +| cardId | Card Id to initiate the event on | yes | +| eventName | Name of the event to initiate | yes | + +#### Example workflow step +``` + - name: initiate card event + id: initiateCardEvent + uses: leankit/github-actions/initiateCardEvent@v1.4 + with: + host: https://YOUR-ACCOUNT.leankit.com/ + apiToken: ${{ secrets.MY_API_TOKEN }} + cardId: 123456 + eventName: my-event +``` +#### Outputs +* error; error message if failed + ## Dev notes ### Running Build on Windows diff --git a/addComment/action.yml b/addComment/action.yml index 89b7df7..268cbc0 100644 --- a/addComment/action.yml +++ b/addComment/action.yml @@ -2,10 +2,10 @@ name: "Add a comment to a card" description: "Add a comment to a card" inputs: host: - description: LeanKit Url (https://mycompany.leankit.com) + description: AgilePlace Url (https://mycompany.leankit.com) required: true apiToken: - description: Api token with read access to your LeanKit board + description: Api token with read access to your AgilePlace board required: true cardId: description: Id of the card diff --git a/addComment/dist/index.js b/addComment/dist/index.js index 748a799..1eaa6de 100644 --- a/addComment/dist/index.js +++ b/addComment/dist/index.js @@ -1 +1 @@ -(()=>{var e={2021:(e,t,r)=>{"use strict";const s=r(3061);e.exports=(e,t)=>{const r=`Bearer ${t}`;const n=e.endsWith("/")?e.substr(0,e.lastIndexOf("/")):e;const o={getCard:e=>s(`${n}/io/card/${e}`,{method:"GET",headers:{Authorization:r}}).json(),blockCard:(e,t,o)=>s(`${n}/io/card/${e}`,{method:"PATCH",json:[{op:"replace",path:"/blockReason",value:o},{op:"replace",path:"/isBlocked",value:t}],headers:{Authorization:r}}).json(),moveCard:(e,t,o)=>s(`${n}/io/card/move`,{method:"POST",json:{cardIds:[e],destination:{laneId:t},wipOverrideComment:o},headers:{Authorization:r}}).json(),assignUsers:(e,t,o,i)=>{const a={cardIds:e};if(t&&t.length){a.userIdsToAssign=t}if(o&&o.length){a.userIdsToUnassign=o}if(i){a.wipOverrideComment=i}return s(`${n}/io/card/assign`,{method:"POST",json:a,headers:{Authorization:r}}).json()},addComment:(e,t)=>s(`${n}/io/card/${e}/comment`,{method:"POST",json:{text:t},headers:{Authorization:r}}).json(),createCard:async e=>{const{id:t}=await s(`${n}/io/card`,{method:"POST",json:e,headers:{Authorization:r}}).json();return t},async verifyCardPosition(e,t){const r=await o.getCard(e);return r.lane.id===t}};return o}},2904:(e,t,r)=>{"use strict";const{getInput:s,getBooleanInput:n,setFailed:o,setOutput:i,exportVariable:a}=r(2186);e.exports={setOutput:i,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const o=[];for(const t of e){const e=r.includes(t)?n:s;o.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?n:s;o.push(t(e))}return o},reportError(e,t){const r=`${e}; ${t.message}`;i("error",r);a("LK_ERROR_MESSAGE",r);o(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},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 d=o(r(1017));const h=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}${d.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 h.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.result.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 d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var h;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(h=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=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const y=[d.BadGateway,d.ServiceUnavailable,d.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[h.Accept]=this._getExistingOrDefaultHeader(t,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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===d.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===d.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","Blob","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.blob=e=>isObjectOfType("Blob")(e);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=>{var t,r;return is.iterable(e)&&is.function_((t=e)===null||t===void 0?void 0:t.next)&&is.function_((r=e)===null||r===void 0?void 0:r.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.enumCase=(e,t)=>Object.values(t).includes(e);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;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.nonEmptyString=e=>is.string(e)&&e.length>0;is.nonEmptyStringAndNotWhitespace=e=>is.string(e)&&!is.emptyStringOrWhitespace(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),blob:e=>assertType(is.blob(e),"Blob",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),enumCase:(e,t)=>assertType(is.enumCase(e,t),"EnumCase",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),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>assertType(is.nonEmptyStringAndNotWhitespace(e),"non-empty string and not 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 d=Symbol("cacheableLookupInstance");const h=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[h]=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[h];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[d]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[d]}}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 d=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new d({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let d;if(typeof t==="string"){d=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){d=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";d=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(d)};t.headers=u(t.headers);const h=new s;const p=o(n.format(d),{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){h.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}h.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);h.emit("request",r)}catch(e){h.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;h.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>h.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);h.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}h.emit("error",new CacheableRequest.CacheError(e))}})();return h}}}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 d=r(3021);const h=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 h.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}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)}));d.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 d=r(2286);const h=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 b=r(3021);const w=r(2454);const E=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const C=r(4993);const P=r(9298);const T=r(397);const k=r(1048);const x=r(3462);let A;const q=Symbol("request");const j=Symbol("response");const H=Symbol("responseSize");const U=Symbol("downloadedSize");const M=Symbol("bodySize");const D=Symbol("uploadedSize");const I=Symbol("serverResponsesPiped");const L=Symbol("unproxyEvents");const N=Symbol("isFromCache");const $=Symbol("cancelTimeouts");const B=Symbol("startedReading");const z=Symbol("stopReading");const F=Symbol("triggerRead");const V=Symbol("body");const G=Symbol("jobs");const W=Symbol("originalResponse");const J=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const K=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 Q=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 Y=new Set([300,301,302,303,304,307,308]);const X=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of X){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[j]});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 Z=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[U]=0;this[D]=0;this.requestInitialized=false;this[I]=new Set;this.redirects=[];this[z]=false;this[F]=false;this[G]=[];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[q])===null||e===void 0?void 0:e.destroy();return}for(const e of this[G]){e()}this[G].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([C.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(!Q.has(v)){Q.set(v,new h(((e,t)=>{const r=e[q](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(!A){A=new d.default}r.dnsCache=A}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){T.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){T.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){T.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){T.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){T.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){T.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){T.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){T.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 k.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[V]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[V]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[V]=e.stringifyJson(e.json)}const n=await v.default(this[V],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[M]=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[N]=n.isFromCache;this[H]=Number(e.headers["content-length"])||undefined;this[j]=e;e.once("end",(()=>{this[H]=this[U];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&&Y.has(s)){e.resume();if(this[q]){this[$]();delete this[q];this[L]()}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[V]=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);function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}if(!isUnixSocketURL(r)&&isUnixSocketURL(o)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}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&&!P.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[F]){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[I]){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[$]=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[L]=b.default(e,this,Z);this[q]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[V];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,E.default(e));delete t.url;let n;const o=Q.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"]=K?"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[V]!==o.body){this[V]=o.body}const{agent:c,request:l,timeout:d,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 b=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[q]=_;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=C.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 b(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=d;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 h.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[z]){return}const{options:t}=this;const r=this.retryCount+1;this[z]=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:x.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[J]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[F]=true;const e=this[j];if(e&&!this[z]){if(e.readableLength){this[F]=false}let t;while((t=e.read())!==null){this[U]+=t.length;this[B]=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[G].push(write)}}_writeRequest(e,t,r){if(this[q].destroyed){return}this._progressCallbacks.push((()=>{this[D]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[q].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(!(q in this)){e();return}if(this[q].destroyed){e();return}this[q].end((t=>{if(!t){this[M]=this[D];this.emit("uploadProgress",this.uploadProgress);this[q].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[G].push(endRequest)}}_destroy(e,t){var r;this[z]=true;clearTimeout(this[J]);if(q in this){this[$]();if(!((r=this[j])===null||r===void 0?void 0:r.complete)){this[q].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[z]}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[q])===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[q])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[H]){e=this[U]/this[H]}else if(this[H]===this[U]){e=1}else{e=0}return{percent:e,transferred:this[U],total:this[H]}}get uploadProgress(){let e;if(this[M]){e=this[D]/this[M]}else if(this[M]===this[D]){e=1}else{e=0}return{percent:e,transferred:this[D],total:this[M]}}get timings(){var e;return(e=this[q])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[N]}pipe(e,t){if(this[B]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[I].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[I].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:d}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=d(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 h=["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=d(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=d(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 h){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,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(/\s*,\s*/);for(const e of r){const[r,s]=e.split(/\s*=\s*/,2);t[r]=s===undefined?true:s.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 d=["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 d){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 d=Agent.normalizeOrigin(e,t&&t.servername);if(d===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(d in this.queue[i]){this.queue[i][d].listeners.push(...r);this._tryToCreateNewSession(i,d);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][d]===entry){delete this.queue[i][d];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${d}:${i}`;let n=false;try{const h=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});h[a]=0;h[l]=false;const isFree=()=>h[a]{this.tlsSessionCache.set(s,e)}));h.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));h.setTimeout(this.timeout,(()=>{h.destroy()}));h.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(h),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,d)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of h[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(h)}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}}}};h.on("origin",(()=>{h[u]=h.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],h)}));h.once("remoteSettings",(()=>{h.ref();h.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}h.destroy();return}h[u]=h.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,h,compareSessions),0,h)}else{e[i]=[h]}}this._freeSessionsCount+=1;n=true;this.emit("session",h);processListeners();removeFromQueue();if(h[a]===0&&this._freeSessionsCount>this.maxFreeSessions){h.close()}if(r.length!==0){this.getSession(d,t,r);r.length=0}h.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],h)}))}));h[c]=h.request;h.request=(e,t)=>{if(h[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=h[c](e,t);h.ref();++h[a];if(h[a]===h.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--h[a];if(!h.destroyed&&!h.closed){closeSessionIfCovered(this.sessions[i],h);if(isFree()&&!h.closed){if(!p){this._freeSessionsCount++;p=true}const e=h[a]===0;if(e){h.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||h[l])){h.close()}else{closeCoveredSessions(this.sessions[i],h);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][d]=entry;this._tryToCreateNewSession(i,d)}))}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 d=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(d.has(t)){const e=await d.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);d.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()}}d.delete(t);return a}catch(e){d.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:d,ERR_INVALID_PROTOCOL:h,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:b,HTTP2_METHOD_CONNECT:w}=s.constants;const E=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const C=Symbol("flushedHeaders");const P=Symbol("jobs");const T=/^[\^`\-\w!#$%&*+.|~]+$/;const k=/[^\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 d("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new h(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[E]=Object.create(null);this[P]=[];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[E])){this[E].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[E])){this[E][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[E])){this[E][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[C]=false}get method(){return this[E][_]}set method(e){if(e){this[E][_]=e.toUpperCase()}}get path(){return this[E][b]}set path(e){if(e){this[E][b]=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[P].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[P].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[C]||this.destroyed){return}this[C]=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[P]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[E]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[E]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}return this[E][e.toLowerCase()]}get headersSent(){return this[C]}removeHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[E][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!T.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(k.test(t)){throw new g("header content",e)}this[E][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[P].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",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){const r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};const o=["sqlite","postgres","mysql","mongo","redis","tiered"];class Keyv extends s{constructor(e,{emitErrors:t=true,...r}={}){super();this.opts={namespace:"keyv",serialize:n.stringify,deserialize:n.parse,...typeof e==="string"?{uri:e}:e,...r};if(!this.opts.store){const e={...this.opts};this.opts.store=loadStore(e)}if(this.opts.compression){const e=this.opts.compression;const{serialize:t,deserialize:r}=e.opts;this.opts.serialize=t;this.opts.deserialize=r}if(typeof this.opts.store.on==="function"&&t){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace;const generateIterator=e=>async function*(){for await(const[t,r]of typeof e==="function"?e(this.opts.store.namespace):e){const e=this.opts.deserialize(r);if(this.opts.store.namespace&&!t.includes(this.opts.store.namespace)){continue}if(typeof e.expires==="number"&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}};if(typeof this.opts.store[Symbol.iterator]==="function"&&this.opts.store instanceof Map){this.iterator=generateIterator(this.opts.store)}else if(typeof this.opts.store.iterator==="function"&&this.opts.store.opts&&this._checkIterableAdaptar()){this.iterator=generateIterator(this.opts.store.iterator.bind(this.opts.store))}}_checkIterableAdaptar(){return o.includes(this.opts.store.opts.dialect)||o.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:r}=this.opts;const s=Array.isArray(e);const n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&r.getMany===undefined){const e=[];for(const s of n){e.push(Promise.resolve().then((()=>r.get(s))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((e=>{if(e===undefined||e===null){return undefined}if(typeof e.expires==="number"&&Date.now()>e.expires){return this.delete(s).then((()=>undefined))}return t&&t.raw?e:e.value})))}return Promise.allSettled(e).then((e=>{const t=[];for(const r of e){t.push(r.value)}return t}))}return Promise.resolve().then((()=>s?r.getMany(n):r.get(n))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined||r===null){return undefined}if(s){const s=[];for(let n of r){if(typeof n==="string"){n=this.opts.deserialize(n)}if(n===undefined||n===null){s.push(undefined);continue}if(typeof n.expires==="number"&&Date.now()>n.expires){this.delete(e).then((()=>undefined));s.push(undefined)}else{s.push(t&&t.raw?n:n.value)}}return s}if(typeof r.expires==="number"&&Date.now()>r.expires){return this.delete(e).then((()=>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;if(typeof t==="symbol"){this.emit("error","symbol cannot be serialized")}t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const r=this._getKeyPrefixArray(e);if(t.deleteMany===undefined){const e=[];for(const s of r){e.push(t.delete(s))}return Promise.allSettled(e).then((e=>e.every((e=>e.value===true))))}return Promise.resolve().then((()=>t.deleteMany(r)))}const r=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(r)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((async()=>{if(typeof r.has==="function"){return r.has(t)}const e=await r.get(t);return e!==undefined}))}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect==="function"){return e.disconnect()}}}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}},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 d=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 h=[...d];if(u){h.push("base64")}if(h.length!==0||l&&l!==t){h.unshift(l)}return`data:${h.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},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 d.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 d=_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 d=e.node||o;let h=e.clockseq!==undefined?e.clockseq:i;if(d==null||h==null){const t=e.random||(e.rng||s.default)();if(d==null){d=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(h==null){h=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){h=h+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=h;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++]=h>>>8|128;l[u++]=h&255;for(let e=0;e<6;++e){l[u+e]=d[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=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")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const e=__nccwpck_require__(2021);const{getInputParams:t,reportError:r,validateLeankitUrl:s}=__nccwpck_require__(2904);(async()=>{const[r,n,o,i]=t({required:["host","apiToken","cardId","comment"]});s("host",r);const{addComment:a}=e(r,n);await a(o,i)})().catch((e=>{r("addComment",e)}))})();module.exports=r})(); \ No newline at end of file +(()=>{var e={2021:(e,t,r)=>{"use strict";const s=r(3061);e.exports=(e,t)=>{const r=`Bearer ${t}`;const n=e.endsWith("/")?e.substr(0,e.lastIndexOf("/")):e;const o={getCard:e=>s(`${n}/io/card/${e}`,{method:"GET",headers:{Authorization:r}}).json(),blockCard:(e,t,o)=>s(`${n}/io/card/${e}`,{method:"PATCH",json:[{op:"replace",path:"/blockReason",value:o},{op:"replace",path:"/isBlocked",value:t}],headers:{Authorization:r}}).json(),moveCard:(e,t,o)=>s(`${n}/io/card/move`,{method:"POST",json:{cardIds:[e],destination:{laneId:t},wipOverrideComment:o},headers:{Authorization:r}}).json(),assignUsers:(e,t,o,i)=>{const a={cardIds:e};if(t&&t.length){a.userIdsToAssign=t}if(o&&o.length){a.userIdsToUnassign=o}if(i){a.wipOverrideComment=i}return s(`${n}/io/card/assign`,{method:"POST",json:a,headers:{Authorization:r}}).json()},addComment:(e,t)=>s(`${n}/io/card/${e}/comment`,{method:"POST",json:{text:t},headers:{Authorization:r}}).json(),createCard:async e=>{const{id:t}=await s(`${n}/io/card`,{method:"POST",json:e,headers:{Authorization:r}}).json();return t},initiateCardEvent:(e,t)=>s(`${n}/io/card/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),initiateBoardEvent:(e,t)=>s(`${n}/io/board/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),async verifyCardPosition(e,t){const r=await o.getCard(e);return r.lane.id===t}};return o}},2904:(e,t,r)=>{"use strict";const{getInput:s,getBooleanInput:n,setFailed:o,setOutput:i,exportVariable:a}=r(2186);e.exports={setOutput:i,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const o=[];for(const t of e){const e=r.includes(t)?n:s;o.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?n:s;o.push(t(e))}return o},reportError(e,t){const r=`${e}; ${t.message}`;i("error",r);a("LK_ERROR_MESSAGE",r);o(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},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 d=o(r(1017));const h=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}${d.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 h.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.result.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 d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var h;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(h=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=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const y=[d.BadGateway,d.ServiceUnavailable,d.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[h.Accept]=this._getExistingOrDefaultHeader(t,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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===d.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===d.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","Blob","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.blob=e=>isObjectOfType("Blob")(e);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=>{var t,r;return is.iterable(e)&&is.function_((t=e)===null||t===void 0?void 0:t.next)&&is.function_((r=e)===null||r===void 0?void 0:r.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.enumCase=(e,t)=>Object.values(t).includes(e);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;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.nonEmptyString=e=>is.string(e)&&e.length>0;is.nonEmptyStringAndNotWhitespace=e=>is.string(e)&&!is.emptyStringOrWhitespace(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),blob:e=>assertType(is.blob(e),"Blob",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),enumCase:(e,t)=>assertType(is.enumCase(e,t),"EnumCase",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),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>assertType(is.nonEmptyStringAndNotWhitespace(e),"non-empty string and not 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 d=Symbol("cacheableLookupInstance");const h=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[h]=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[h];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[d]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[d]}}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 d=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new d({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let d;if(typeof t==="string"){d=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){d=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";d=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(d)};t.headers=u(t.headers);const h=new s;const p=o(n.format(d),{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){h.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}h.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);h.emit("request",r)}catch(e){h.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;h.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>h.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);h.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}h.emit("error",new CacheableRequest.CacheError(e))}})();return h}}}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 d=r(3021);const h=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 h.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}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)}));d.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 d=r(2286);const h=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 b=r(3021);const w=r(2454);const E=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const C=r(4993);const P=r(9298);const T=r(397);const k=r(1048);const x=r(3462);let A;const q=Symbol("request");const j=Symbol("response");const H=Symbol("responseSize");const U=Symbol("downloadedSize");const M=Symbol("bodySize");const D=Symbol("uploadedSize");const I=Symbol("serverResponsesPiped");const L=Symbol("unproxyEvents");const N=Symbol("isFromCache");const $=Symbol("cancelTimeouts");const B=Symbol("startedReading");const z=Symbol("stopReading");const F=Symbol("triggerRead");const V=Symbol("body");const G=Symbol("jobs");const W=Symbol("originalResponse");const J=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const K=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 Q=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 Y=new Set([300,301,302,303,304,307,308]);const X=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of X){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[j]});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 Z=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[U]=0;this[D]=0;this.requestInitialized=false;this[I]=new Set;this.redirects=[];this[z]=false;this[F]=false;this[G]=[];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[q])===null||e===void 0?void 0:e.destroy();return}for(const e of this[G]){e()}this[G].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([C.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(!Q.has(v)){Q.set(v,new h(((e,t)=>{const r=e[q](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(!A){A=new d.default}r.dnsCache=A}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){T.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){T.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){T.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){T.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){T.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){T.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){T.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){T.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 k.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[V]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[V]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[V]=e.stringifyJson(e.json)}const n=await v.default(this[V],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[M]=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[N]=n.isFromCache;this[H]=Number(e.headers["content-length"])||undefined;this[j]=e;e.once("end",(()=>{this[H]=this[U];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&&Y.has(s)){e.resume();if(this[q]){this[$]();delete this[q];this[L]()}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[V]=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);function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}if(!isUnixSocketURL(r)&&isUnixSocketURL(o)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}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&&!P.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[F]){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[I]){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[$]=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[L]=b.default(e,this,Z);this[q]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[V];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,E.default(e));delete t.url;let n;const o=Q.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"]=K?"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[V]!==o.body){this[V]=o.body}const{agent:c,request:l,timeout:d,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 b=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[q]=_;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=C.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 b(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=d;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 h.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[z]){return}const{options:t}=this;const r=this.retryCount+1;this[z]=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:x.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[J]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[F]=true;const e=this[j];if(e&&!this[z]){if(e.readableLength){this[F]=false}let t;while((t=e.read())!==null){this[U]+=t.length;this[B]=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[G].push(write)}}_writeRequest(e,t,r){if(this[q].destroyed){return}this._progressCallbacks.push((()=>{this[D]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[q].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(!(q in this)){e();return}if(this[q].destroyed){e();return}this[q].end((t=>{if(!t){this[M]=this[D];this.emit("uploadProgress",this.uploadProgress);this[q].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[G].push(endRequest)}}_destroy(e,t){var r;this[z]=true;clearTimeout(this[J]);if(q in this){this[$]();if(!((r=this[j])===null||r===void 0?void 0:r.complete)){this[q].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[z]}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[q])===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[q])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[H]){e=this[U]/this[H]}else if(this[H]===this[U]){e=1}else{e=0}return{percent:e,transferred:this[U],total:this[H]}}get uploadProgress(){let e;if(this[M]){e=this[D]/this[M]}else if(this[M]===this[D]){e=1}else{e=0}return{percent:e,transferred:this[D],total:this[M]}}get timings(){var e;return(e=this[q])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[N]}pipe(e,t){if(this[B]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[I].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[I].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:d}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=d(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 h=["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=d(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=d(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 h){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,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(/\s*,\s*/);for(const e of r){const[r,s]=e.split(/\s*=\s*/,2);t[r]=s===undefined?true:s.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 d=["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 d){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 d=Agent.normalizeOrigin(e,t&&t.servername);if(d===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(d in this.queue[i]){this.queue[i][d].listeners.push(...r);this._tryToCreateNewSession(i,d);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][d]===entry){delete this.queue[i][d];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${d}:${i}`;let n=false;try{const h=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});h[a]=0;h[l]=false;const isFree=()=>h[a]{this.tlsSessionCache.set(s,e)}));h.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));h.setTimeout(this.timeout,(()=>{h.destroy()}));h.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(h),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,d)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of h[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(h)}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}}}};h.on("origin",(()=>{h[u]=h.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],h)}));h.once("remoteSettings",(()=>{h.ref();h.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}h.destroy();return}h[u]=h.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,h,compareSessions),0,h)}else{e[i]=[h]}}this._freeSessionsCount+=1;n=true;this.emit("session",h);processListeners();removeFromQueue();if(h[a]===0&&this._freeSessionsCount>this.maxFreeSessions){h.close()}if(r.length!==0){this.getSession(d,t,r);r.length=0}h.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],h)}))}));h[c]=h.request;h.request=(e,t)=>{if(h[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=h[c](e,t);h.ref();++h[a];if(h[a]===h.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--h[a];if(!h.destroyed&&!h.closed){closeSessionIfCovered(this.sessions[i],h);if(isFree()&&!h.closed){if(!p){this._freeSessionsCount++;p=true}const e=h[a]===0;if(e){h.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||h[l])){h.close()}else{closeCoveredSessions(this.sessions[i],h);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][d]=entry;this._tryToCreateNewSession(i,d)}))}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 d=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(d.has(t)){const e=await d.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);d.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()}}d.delete(t);return a}catch(e){d.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:d,ERR_INVALID_PROTOCOL:h,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:b,HTTP2_METHOD_CONNECT:w}=s.constants;const E=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const C=Symbol("flushedHeaders");const P=Symbol("jobs");const T=/^[\^`\-\w!#$%&*+.|~]+$/;const k=/[^\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 d("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new h(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[E]=Object.create(null);this[P]=[];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[E])){this[E].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[E])){this[E][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[E])){this[E][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[C]=false}get method(){return this[E][_]}set method(e){if(e){this[E][_]=e.toUpperCase()}}get path(){return this[E][b]}set path(e){if(e){this[E][b]=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[P].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[P].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[C]||this.destroyed){return}this[C]=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[P]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[E]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[E]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}return this[E][e.toLowerCase()]}get headersSent(){return this[C]}removeHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[E][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!T.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(k.test(t)){throw new g("header content",e)}this[E][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[P].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",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){const r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};const o=["sqlite","postgres","mysql","mongo","redis","tiered"];class Keyv extends s{constructor(e,{emitErrors:t=true,...r}={}){super();this.opts={namespace:"keyv",serialize:n.stringify,deserialize:n.parse,...typeof e==="string"?{uri:e}:e,...r};if(!this.opts.store){const e={...this.opts};this.opts.store=loadStore(e)}if(this.opts.compression){const e=this.opts.compression;const{serialize:t,deserialize:r}=e.opts;this.opts.serialize=t;this.opts.deserialize=r}if(typeof this.opts.store.on==="function"&&t){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace;const generateIterator=e=>async function*(){for await(const[t,r]of typeof e==="function"?e(this.opts.store.namespace):e){const e=this.opts.deserialize(r);if(this.opts.store.namespace&&!t.includes(this.opts.store.namespace)){continue}if(typeof e.expires==="number"&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}};if(typeof this.opts.store[Symbol.iterator]==="function"&&this.opts.store instanceof Map){this.iterator=generateIterator(this.opts.store)}else if(typeof this.opts.store.iterator==="function"&&this.opts.store.opts&&this._checkIterableAdaptar()){this.iterator=generateIterator(this.opts.store.iterator.bind(this.opts.store))}}_checkIterableAdaptar(){return o.includes(this.opts.store.opts.dialect)||o.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:r}=this.opts;const s=Array.isArray(e);const n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&r.getMany===undefined){const e=[];for(const s of n){e.push(Promise.resolve().then((()=>r.get(s))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((e=>{if(e===undefined||e===null){return undefined}if(typeof e.expires==="number"&&Date.now()>e.expires){return this.delete(s).then((()=>undefined))}return t&&t.raw?e:e.value})))}return Promise.allSettled(e).then((e=>{const t=[];for(const r of e){t.push(r.value)}return t}))}return Promise.resolve().then((()=>s?r.getMany(n):r.get(n))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined||r===null){return undefined}if(s){const s=[];for(let n of r){if(typeof n==="string"){n=this.opts.deserialize(n)}if(n===undefined||n===null){s.push(undefined);continue}if(typeof n.expires==="number"&&Date.now()>n.expires){this.delete(e).then((()=>undefined));s.push(undefined)}else{s.push(t&&t.raw?n:n.value)}}return s}if(typeof r.expires==="number"&&Date.now()>r.expires){return this.delete(e).then((()=>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;if(typeof t==="symbol"){this.emit("error","symbol cannot be serialized")}t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const r=this._getKeyPrefixArray(e);if(t.deleteMany===undefined){const e=[];for(const s of r){e.push(t.delete(s))}return Promise.allSettled(e).then((e=>e.every((e=>e.value===true))))}return Promise.resolve().then((()=>t.deleteMany(r)))}const r=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(r)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((async()=>{if(typeof r.has==="function"){return r.has(t)}const e=await r.get(t);return e!==undefined}))}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect==="function"){return e.disconnect()}}}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}},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 d=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 h=[...d];if(u){h.push("base64")}if(h.length!==0||l&&l!==t){h.unshift(l)}return`data:${h.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},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 d.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 d=_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 d=e.node||o;let h=e.clockseq!==undefined?e.clockseq:i;if(d==null||h==null){const t=e.random||(e.rng||s.default)();if(d==null){d=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(h==null){h=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){h=h+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=h;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++]=h>>>8|128;l[u++]=h&255;for(let e=0;e<6;++e){l[u+e]=d[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=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")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const e=__nccwpck_require__(2021);const{getInputParams:t,reportError:r,validateLeankitUrl:s}=__nccwpck_require__(2904);(async()=>{const[r,n,o,i]=t({required:["host","apiToken","cardId","comment"]});s("host",r);const{addComment:a}=e(r,n);await a(o,i)})().catch((e=>{r("addComment",e)}))})();module.exports=r})(); \ No newline at end of file diff --git a/assignUsers/action.yml b/assignUsers/action.yml index 3e5b13b..2106896 100644 --- a/assignUsers/action.yml +++ b/assignUsers/action.yml @@ -1,11 +1,11 @@ -name: "Assign users to LeanKit cards" +name: "Assign users to AgilePlace cards" description: "Assign or unassign users to cards" inputs: host: - description: LeanKit Url (https://mycompany.leankit.com) + description: AgilePlace Url (https://mycompany.leankit.com) required: true apiToken: - description: Api token for your LeanKit board + description: Api token for your AgilePlace board required: true cardIds: description: List of card ids diff --git a/assignUsers/dist/index.js b/assignUsers/dist/index.js index d4e80de..79bc5d6 100644 --- a/assignUsers/dist/index.js +++ b/assignUsers/dist/index.js @@ -1 +1 @@ -(()=>{var e={2021:(e,t,r)=>{"use strict";const s=r(3061);e.exports=(e,t)=>{const r=`Bearer ${t}`;const n=e.endsWith("/")?e.substr(0,e.lastIndexOf("/")):e;const o={getCard:e=>s(`${n}/io/card/${e}`,{method:"GET",headers:{Authorization:r}}).json(),blockCard:(e,t,o)=>s(`${n}/io/card/${e}`,{method:"PATCH",json:[{op:"replace",path:"/blockReason",value:o},{op:"replace",path:"/isBlocked",value:t}],headers:{Authorization:r}}).json(),moveCard:(e,t,o)=>s(`${n}/io/card/move`,{method:"POST",json:{cardIds:[e],destination:{laneId:t},wipOverrideComment:o},headers:{Authorization:r}}).json(),assignUsers:(e,t,o,i)=>{const a={cardIds:e};if(t&&t.length){a.userIdsToAssign=t}if(o&&o.length){a.userIdsToUnassign=o}if(i){a.wipOverrideComment=i}return s(`${n}/io/card/assign`,{method:"POST",json:a,headers:{Authorization:r}}).json()},addComment:(e,t)=>s(`${n}/io/card/${e}/comment`,{method:"POST",json:{text:t},headers:{Authorization:r}}).json(),createCard:async e=>{const{id:t}=await s(`${n}/io/card`,{method:"POST",json:e,headers:{Authorization:r}}).json();return t},async verifyCardPosition(e,t){const r=await o.getCard(e);return r.lane.id===t}};return o}},2904:(e,t,r)=>{"use strict";const{getInput:s,getBooleanInput:n,setFailed:o,setOutput:i,exportVariable:a}=r(2186);e.exports={setOutput:i,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const o=[];for(const t of e){const e=r.includes(t)?n:s;o.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?n:s;o.push(t(e))}return o},reportError(e,t){const r=`${e}; ${t.message}`;i("error",r);a("LK_ERROR_MESSAGE",r);o(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},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 d=o(r(1017));const h=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}${d.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 h.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.result.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 d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var h;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(h=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=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const y=[d.BadGateway,d.ServiceUnavailable,d.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[h.Accept]=this._getExistingOrDefaultHeader(t,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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===d.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===d.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","Blob","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.blob=e=>isObjectOfType("Blob")(e);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=>{var t,r;return is.iterable(e)&&is.function_((t=e)===null||t===void 0?void 0:t.next)&&is.function_((r=e)===null||r===void 0?void 0:r.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.enumCase=(e,t)=>Object.values(t).includes(e);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;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.nonEmptyString=e=>is.string(e)&&e.length>0;is.nonEmptyStringAndNotWhitespace=e=>is.string(e)&&!is.emptyStringOrWhitespace(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),blob:e=>assertType(is.blob(e),"Blob",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),enumCase:(e,t)=>assertType(is.enumCase(e,t),"EnumCase",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),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>assertType(is.nonEmptyStringAndNotWhitespace(e),"non-empty string and not 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 d=Symbol("cacheableLookupInstance");const h=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[h]=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[h];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[d]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[d]}}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 d=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new d({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let d;if(typeof t==="string"){d=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){d=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";d=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(d)};t.headers=u(t.headers);const h=new s;const p=o(n.format(d),{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){h.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}h.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);h.emit("request",r)}catch(e){h.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;h.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>h.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);h.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}h.emit("error",new CacheableRequest.CacheError(e))}})();return h}}}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 d=r(3021);const h=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 h.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}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)}));d.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 d=r(2286);const h=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 b=r(3021);const w=r(2454);const E=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const C=r(4993);const P=r(9298);const T=r(397);const k=r(1048);const x=r(3462);let A;const q=Symbol("request");const j=Symbol("response");const H=Symbol("responseSize");const U=Symbol("downloadedSize");const M=Symbol("bodySize");const I=Symbol("uploadedSize");const D=Symbol("serverResponsesPiped");const L=Symbol("unproxyEvents");const N=Symbol("isFromCache");const $=Symbol("cancelTimeouts");const B=Symbol("startedReading");const z=Symbol("stopReading");const F=Symbol("triggerRead");const V=Symbol("body");const G=Symbol("jobs");const W=Symbol("originalResponse");const J=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const K=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 Q=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 Y=new Set([300,301,302,303,304,307,308]);const X=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of X){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[j]});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 Z=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[U]=0;this[I]=0;this.requestInitialized=false;this[D]=new Set;this.redirects=[];this[z]=false;this[F]=false;this[G]=[];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[q])===null||e===void 0?void 0:e.destroy();return}for(const e of this[G]){e()}this[G].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([C.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(!Q.has(v)){Q.set(v,new h(((e,t)=>{const r=e[q](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(!A){A=new d.default}r.dnsCache=A}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){T.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){T.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){T.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){T.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){T.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){T.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){T.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){T.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 k.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[V]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[V]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[V]=e.stringifyJson(e.json)}const n=await v.default(this[V],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[M]=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[N]=n.isFromCache;this[H]=Number(e.headers["content-length"])||undefined;this[j]=e;e.once("end",(()=>{this[H]=this[U];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&&Y.has(s)){e.resume();if(this[q]){this[$]();delete this[q];this[L]()}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[V]=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);function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}if(!isUnixSocketURL(r)&&isUnixSocketURL(o)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}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&&!P.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[F]){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[D]){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[$]=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[L]=b.default(e,this,Z);this[q]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[V];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,E.default(e));delete t.url;let n;const o=Q.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"]=K?"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[V]!==o.body){this[V]=o.body}const{agent:c,request:l,timeout:d,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 b=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[q]=_;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=C.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 b(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=d;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 h.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[z]){return}const{options:t}=this;const r=this.retryCount+1;this[z]=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:x.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[J]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[F]=true;const e=this[j];if(e&&!this[z]){if(e.readableLength){this[F]=false}let t;while((t=e.read())!==null){this[U]+=t.length;this[B]=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[G].push(write)}}_writeRequest(e,t,r){if(this[q].destroyed){return}this._progressCallbacks.push((()=>{this[I]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[q].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(!(q in this)){e();return}if(this[q].destroyed){e();return}this[q].end((t=>{if(!t){this[M]=this[I];this.emit("uploadProgress",this.uploadProgress);this[q].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[G].push(endRequest)}}_destroy(e,t){var r;this[z]=true;clearTimeout(this[J]);if(q in this){this[$]();if(!((r=this[j])===null||r===void 0?void 0:r.complete)){this[q].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[z]}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[q])===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[q])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[H]){e=this[U]/this[H]}else if(this[H]===this[U]){e=1}else{e=0}return{percent:e,transferred:this[U],total:this[H]}}get uploadProgress(){let e;if(this[M]){e=this[I]/this[M]}else if(this[M]===this[I]){e=1}else{e=0}return{percent:e,transferred:this[I],total:this[M]}}get timings(){var e;return(e=this[q])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[N]}pipe(e,t){if(this[B]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[D].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[D].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:d}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=d(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 h=["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=d(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=d(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 h){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,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(/\s*,\s*/);for(const e of r){const[r,s]=e.split(/\s*=\s*/,2);t[r]=s===undefined?true:s.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 d=["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 d){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 d=Agent.normalizeOrigin(e,t&&t.servername);if(d===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(d in this.queue[i]){this.queue[i][d].listeners.push(...r);this._tryToCreateNewSession(i,d);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][d]===entry){delete this.queue[i][d];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${d}:${i}`;let n=false;try{const h=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});h[a]=0;h[l]=false;const isFree=()=>h[a]{this.tlsSessionCache.set(s,e)}));h.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));h.setTimeout(this.timeout,(()=>{h.destroy()}));h.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(h),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,d)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of h[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(h)}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}}}};h.on("origin",(()=>{h[u]=h.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],h)}));h.once("remoteSettings",(()=>{h.ref();h.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}h.destroy();return}h[u]=h.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,h,compareSessions),0,h)}else{e[i]=[h]}}this._freeSessionsCount+=1;n=true;this.emit("session",h);processListeners();removeFromQueue();if(h[a]===0&&this._freeSessionsCount>this.maxFreeSessions){h.close()}if(r.length!==0){this.getSession(d,t,r);r.length=0}h.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],h)}))}));h[c]=h.request;h.request=(e,t)=>{if(h[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=h[c](e,t);h.ref();++h[a];if(h[a]===h.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--h[a];if(!h.destroyed&&!h.closed){closeSessionIfCovered(this.sessions[i],h);if(isFree()&&!h.closed){if(!p){this._freeSessionsCount++;p=true}const e=h[a]===0;if(e){h.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||h[l])){h.close()}else{closeCoveredSessions(this.sessions[i],h);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][d]=entry;this._tryToCreateNewSession(i,d)}))}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 d=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(d.has(t)){const e=await d.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);d.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()}}d.delete(t);return a}catch(e){d.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:d,ERR_INVALID_PROTOCOL:h,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:b,HTTP2_METHOD_CONNECT:w}=s.constants;const E=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const C=Symbol("flushedHeaders");const P=Symbol("jobs");const T=/^[\^`\-\w!#$%&*+.|~]+$/;const k=/[^\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 d("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new h(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[E]=Object.create(null);this[P]=[];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[E])){this[E].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[E])){this[E][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[E])){this[E][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[C]=false}get method(){return this[E][_]}set method(e){if(e){this[E][_]=e.toUpperCase()}}get path(){return this[E][b]}set path(e){if(e){this[E][b]=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[P].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[P].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[C]||this.destroyed){return}this[C]=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[P]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[E]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[E]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}return this[E][e.toLowerCase()]}get headersSent(){return this[C]}removeHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[E][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!T.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(k.test(t)){throw new g("header content",e)}this[E][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[P].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",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){const r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};const o=["sqlite","postgres","mysql","mongo","redis","tiered"];class Keyv extends s{constructor(e,{emitErrors:t=true,...r}={}){super();this.opts={namespace:"keyv",serialize:n.stringify,deserialize:n.parse,...typeof e==="string"?{uri:e}:e,...r};if(!this.opts.store){const e={...this.opts};this.opts.store=loadStore(e)}if(this.opts.compression){const e=this.opts.compression;const{serialize:t,deserialize:r}=e.opts;this.opts.serialize=t;this.opts.deserialize=r}if(typeof this.opts.store.on==="function"&&t){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace;const generateIterator=e=>async function*(){for await(const[t,r]of typeof e==="function"?e(this.opts.store.namespace):e){const e=this.opts.deserialize(r);if(this.opts.store.namespace&&!t.includes(this.opts.store.namespace)){continue}if(typeof e.expires==="number"&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}};if(typeof this.opts.store[Symbol.iterator]==="function"&&this.opts.store instanceof Map){this.iterator=generateIterator(this.opts.store)}else if(typeof this.opts.store.iterator==="function"&&this.opts.store.opts&&this._checkIterableAdaptar()){this.iterator=generateIterator(this.opts.store.iterator.bind(this.opts.store))}}_checkIterableAdaptar(){return o.includes(this.opts.store.opts.dialect)||o.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:r}=this.opts;const s=Array.isArray(e);const n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&r.getMany===undefined){const e=[];for(const s of n){e.push(Promise.resolve().then((()=>r.get(s))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((e=>{if(e===undefined||e===null){return undefined}if(typeof e.expires==="number"&&Date.now()>e.expires){return this.delete(s).then((()=>undefined))}return t&&t.raw?e:e.value})))}return Promise.allSettled(e).then((e=>{const t=[];for(const r of e){t.push(r.value)}return t}))}return Promise.resolve().then((()=>s?r.getMany(n):r.get(n))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined||r===null){return undefined}if(s){const s=[];for(let n of r){if(typeof n==="string"){n=this.opts.deserialize(n)}if(n===undefined||n===null){s.push(undefined);continue}if(typeof n.expires==="number"&&Date.now()>n.expires){this.delete(e).then((()=>undefined));s.push(undefined)}else{s.push(t&&t.raw?n:n.value)}}return s}if(typeof r.expires==="number"&&Date.now()>r.expires){return this.delete(e).then((()=>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;if(typeof t==="symbol"){this.emit("error","symbol cannot be serialized")}t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const r=this._getKeyPrefixArray(e);if(t.deleteMany===undefined){const e=[];for(const s of r){e.push(t.delete(s))}return Promise.allSettled(e).then((e=>e.every((e=>e.value===true))))}return Promise.resolve().then((()=>t.deleteMany(r)))}const r=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(r)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((async()=>{if(typeof r.has==="function"){return r.has(t)}const e=await r.get(t);return e!==undefined}))}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect==="function"){return e.disconnect()}}}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}},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 d=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 h=[...d];if(u){h.push("base64")}if(h.length!==0||l&&l!==t){h.unshift(l)}return`data:${h.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},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 d.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 d=_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 d=e.node||o;let h=e.clockseq!==undefined?e.clockseq:i;if(d==null||h==null){const t=e.random||(e.rng||s.default)();if(d==null){d=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(h==null){h=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){h=h+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=h;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++]=h>>>8|128;l[u++]=h&255;for(let e=0;e<6;++e){l[u+e]=d[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=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")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const e=__nccwpck_require__(2021);const{getInputParams:t,reportError:r,validateLeankitUrl:s}=__nccwpck_require__(2904);function parseList(e){if(!e){return[]}return e.trim().split(/\s*,\s*/)}(async()=>{const[r,n,o,i,a,c]=t({required:["host","apiToken","cardIds"],optional:["assignUserIds","unassignUserIds","wipOverrideComment"]});s("host",r);if(!i&&!a){throw new Error("Either assignUserIds or unassignUserIds must be specified")}const u=parseList(o);const l=parseList(i);const d=parseList(a);const{assignUsers:h}=e(r,n);await h(u,l,d,c)})().catch((e=>{r("assignUsers",e.message)}))})();module.exports=r})(); \ No newline at end of file +(()=>{var e={2021:(e,t,r)=>{"use strict";const s=r(3061);e.exports=(e,t)=>{const r=`Bearer ${t}`;const n=e.endsWith("/")?e.substr(0,e.lastIndexOf("/")):e;const o={getCard:e=>s(`${n}/io/card/${e}`,{method:"GET",headers:{Authorization:r}}).json(),blockCard:(e,t,o)=>s(`${n}/io/card/${e}`,{method:"PATCH",json:[{op:"replace",path:"/blockReason",value:o},{op:"replace",path:"/isBlocked",value:t}],headers:{Authorization:r}}).json(),moveCard:(e,t,o)=>s(`${n}/io/card/move`,{method:"POST",json:{cardIds:[e],destination:{laneId:t},wipOverrideComment:o},headers:{Authorization:r}}).json(),assignUsers:(e,t,o,i)=>{const a={cardIds:e};if(t&&t.length){a.userIdsToAssign=t}if(o&&o.length){a.userIdsToUnassign=o}if(i){a.wipOverrideComment=i}return s(`${n}/io/card/assign`,{method:"POST",json:a,headers:{Authorization:r}}).json()},addComment:(e,t)=>s(`${n}/io/card/${e}/comment`,{method:"POST",json:{text:t},headers:{Authorization:r}}).json(),createCard:async e=>{const{id:t}=await s(`${n}/io/card`,{method:"POST",json:e,headers:{Authorization:r}}).json();return t},initiateCardEvent:(e,t)=>s(`${n}/io/card/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),initiateBoardEvent:(e,t)=>s(`${n}/io/board/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),async verifyCardPosition(e,t){const r=await o.getCard(e);return r.lane.id===t}};return o}},2904:(e,t,r)=>{"use strict";const{getInput:s,getBooleanInput:n,setFailed:o,setOutput:i,exportVariable:a}=r(2186);e.exports={setOutput:i,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const o=[];for(const t of e){const e=r.includes(t)?n:s;o.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?n:s;o.push(t(e))}return o},reportError(e,t){const r=`${e}; ${t.message}`;i("error",r);a("LK_ERROR_MESSAGE",r);o(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},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 d=o(r(1017));const h=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}${d.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 h.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.result.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 d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var h;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(h=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=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const y=[d.BadGateway,d.ServiceUnavailable,d.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[h.Accept]=this._getExistingOrDefaultHeader(t,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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===d.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===d.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","Blob","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.blob=e=>isObjectOfType("Blob")(e);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=>{var t,r;return is.iterable(e)&&is.function_((t=e)===null||t===void 0?void 0:t.next)&&is.function_((r=e)===null||r===void 0?void 0:r.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.enumCase=(e,t)=>Object.values(t).includes(e);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;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.nonEmptyString=e=>is.string(e)&&e.length>0;is.nonEmptyStringAndNotWhitespace=e=>is.string(e)&&!is.emptyStringOrWhitespace(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),blob:e=>assertType(is.blob(e),"Blob",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),enumCase:(e,t)=>assertType(is.enumCase(e,t),"EnumCase",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),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>assertType(is.nonEmptyStringAndNotWhitespace(e),"non-empty string and not 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 d=Symbol("cacheableLookupInstance");const h=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[h]=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[h];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[d]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[d]}}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 d=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new d({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let d;if(typeof t==="string"){d=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){d=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";d=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(d)};t.headers=u(t.headers);const h=new s;const p=o(n.format(d),{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){h.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}h.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);h.emit("request",r)}catch(e){h.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;h.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>h.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);h.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}h.emit("error",new CacheableRequest.CacheError(e))}})();return h}}}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 d=r(3021);const h=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 h.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}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)}));d.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 d=r(2286);const h=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 b=r(3021);const w=r(2454);const E=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const C=r(4993);const P=r(9298);const T=r(397);const k=r(1048);const x=r(3462);let A;const q=Symbol("request");const j=Symbol("response");const H=Symbol("responseSize");const U=Symbol("downloadedSize");const M=Symbol("bodySize");const I=Symbol("uploadedSize");const D=Symbol("serverResponsesPiped");const L=Symbol("unproxyEvents");const N=Symbol("isFromCache");const $=Symbol("cancelTimeouts");const B=Symbol("startedReading");const z=Symbol("stopReading");const F=Symbol("triggerRead");const V=Symbol("body");const G=Symbol("jobs");const W=Symbol("originalResponse");const J=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const K=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 Q=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 Y=new Set([300,301,302,303,304,307,308]);const X=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of X){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[j]});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 Z=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[U]=0;this[I]=0;this.requestInitialized=false;this[D]=new Set;this.redirects=[];this[z]=false;this[F]=false;this[G]=[];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[q])===null||e===void 0?void 0:e.destroy();return}for(const e of this[G]){e()}this[G].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([C.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(!Q.has(v)){Q.set(v,new h(((e,t)=>{const r=e[q](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(!A){A=new d.default}r.dnsCache=A}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){T.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){T.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){T.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){T.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){T.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){T.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){T.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){T.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 k.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[V]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[V]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[V]=e.stringifyJson(e.json)}const n=await v.default(this[V],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[M]=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[N]=n.isFromCache;this[H]=Number(e.headers["content-length"])||undefined;this[j]=e;e.once("end",(()=>{this[H]=this[U];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&&Y.has(s)){e.resume();if(this[q]){this[$]();delete this[q];this[L]()}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[V]=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);function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}if(!isUnixSocketURL(r)&&isUnixSocketURL(o)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}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&&!P.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[F]){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[D]){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[$]=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[L]=b.default(e,this,Z);this[q]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[V];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,E.default(e));delete t.url;let n;const o=Q.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"]=K?"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[V]!==o.body){this[V]=o.body}const{agent:c,request:l,timeout:d,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 b=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[q]=_;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=C.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 b(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=d;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 h.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[z]){return}const{options:t}=this;const r=this.retryCount+1;this[z]=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:x.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[J]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[F]=true;const e=this[j];if(e&&!this[z]){if(e.readableLength){this[F]=false}let t;while((t=e.read())!==null){this[U]+=t.length;this[B]=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[G].push(write)}}_writeRequest(e,t,r){if(this[q].destroyed){return}this._progressCallbacks.push((()=>{this[I]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[q].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(!(q in this)){e();return}if(this[q].destroyed){e();return}this[q].end((t=>{if(!t){this[M]=this[I];this.emit("uploadProgress",this.uploadProgress);this[q].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[G].push(endRequest)}}_destroy(e,t){var r;this[z]=true;clearTimeout(this[J]);if(q in this){this[$]();if(!((r=this[j])===null||r===void 0?void 0:r.complete)){this[q].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[z]}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[q])===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[q])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[H]){e=this[U]/this[H]}else if(this[H]===this[U]){e=1}else{e=0}return{percent:e,transferred:this[U],total:this[H]}}get uploadProgress(){let e;if(this[M]){e=this[I]/this[M]}else if(this[M]===this[I]){e=1}else{e=0}return{percent:e,transferred:this[I],total:this[M]}}get timings(){var e;return(e=this[q])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[N]}pipe(e,t){if(this[B]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[D].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[D].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:d}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=d(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 h=["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=d(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=d(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 h){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,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(/\s*,\s*/);for(const e of r){const[r,s]=e.split(/\s*=\s*/,2);t[r]=s===undefined?true:s.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 d=["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 d){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 d=Agent.normalizeOrigin(e,t&&t.servername);if(d===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(d in this.queue[i]){this.queue[i][d].listeners.push(...r);this._tryToCreateNewSession(i,d);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][d]===entry){delete this.queue[i][d];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${d}:${i}`;let n=false;try{const h=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});h[a]=0;h[l]=false;const isFree=()=>h[a]{this.tlsSessionCache.set(s,e)}));h.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));h.setTimeout(this.timeout,(()=>{h.destroy()}));h.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(h),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,d)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of h[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(h)}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}}}};h.on("origin",(()=>{h[u]=h.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],h)}));h.once("remoteSettings",(()=>{h.ref();h.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}h.destroy();return}h[u]=h.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,h,compareSessions),0,h)}else{e[i]=[h]}}this._freeSessionsCount+=1;n=true;this.emit("session",h);processListeners();removeFromQueue();if(h[a]===0&&this._freeSessionsCount>this.maxFreeSessions){h.close()}if(r.length!==0){this.getSession(d,t,r);r.length=0}h.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],h)}))}));h[c]=h.request;h.request=(e,t)=>{if(h[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=h[c](e,t);h.ref();++h[a];if(h[a]===h.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--h[a];if(!h.destroyed&&!h.closed){closeSessionIfCovered(this.sessions[i],h);if(isFree()&&!h.closed){if(!p){this._freeSessionsCount++;p=true}const e=h[a]===0;if(e){h.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||h[l])){h.close()}else{closeCoveredSessions(this.sessions[i],h);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][d]=entry;this._tryToCreateNewSession(i,d)}))}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 d=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(d.has(t)){const e=await d.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);d.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()}}d.delete(t);return a}catch(e){d.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:d,ERR_INVALID_PROTOCOL:h,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:b,HTTP2_METHOD_CONNECT:w}=s.constants;const E=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const C=Symbol("flushedHeaders");const P=Symbol("jobs");const T=/^[\^`\-\w!#$%&*+.|~]+$/;const k=/[^\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 d("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new h(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[E]=Object.create(null);this[P]=[];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[E])){this[E].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[E])){this[E][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[E])){this[E][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[C]=false}get method(){return this[E][_]}set method(e){if(e){this[E][_]=e.toUpperCase()}}get path(){return this[E][b]}set path(e){if(e){this[E][b]=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[P].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[P].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[C]||this.destroyed){return}this[C]=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[P]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[E]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[E]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}return this[E][e.toLowerCase()]}get headersSent(){return this[C]}removeHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[E][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!T.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(k.test(t)){throw new g("header content",e)}this[E][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[P].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",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){const r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};const o=["sqlite","postgres","mysql","mongo","redis","tiered"];class Keyv extends s{constructor(e,{emitErrors:t=true,...r}={}){super();this.opts={namespace:"keyv",serialize:n.stringify,deserialize:n.parse,...typeof e==="string"?{uri:e}:e,...r};if(!this.opts.store){const e={...this.opts};this.opts.store=loadStore(e)}if(this.opts.compression){const e=this.opts.compression;const{serialize:t,deserialize:r}=e.opts;this.opts.serialize=t;this.opts.deserialize=r}if(typeof this.opts.store.on==="function"&&t){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace;const generateIterator=e=>async function*(){for await(const[t,r]of typeof e==="function"?e(this.opts.store.namespace):e){const e=this.opts.deserialize(r);if(this.opts.store.namespace&&!t.includes(this.opts.store.namespace)){continue}if(typeof e.expires==="number"&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}};if(typeof this.opts.store[Symbol.iterator]==="function"&&this.opts.store instanceof Map){this.iterator=generateIterator(this.opts.store)}else if(typeof this.opts.store.iterator==="function"&&this.opts.store.opts&&this._checkIterableAdaptar()){this.iterator=generateIterator(this.opts.store.iterator.bind(this.opts.store))}}_checkIterableAdaptar(){return o.includes(this.opts.store.opts.dialect)||o.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:r}=this.opts;const s=Array.isArray(e);const n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&r.getMany===undefined){const e=[];for(const s of n){e.push(Promise.resolve().then((()=>r.get(s))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((e=>{if(e===undefined||e===null){return undefined}if(typeof e.expires==="number"&&Date.now()>e.expires){return this.delete(s).then((()=>undefined))}return t&&t.raw?e:e.value})))}return Promise.allSettled(e).then((e=>{const t=[];for(const r of e){t.push(r.value)}return t}))}return Promise.resolve().then((()=>s?r.getMany(n):r.get(n))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined||r===null){return undefined}if(s){const s=[];for(let n of r){if(typeof n==="string"){n=this.opts.deserialize(n)}if(n===undefined||n===null){s.push(undefined);continue}if(typeof n.expires==="number"&&Date.now()>n.expires){this.delete(e).then((()=>undefined));s.push(undefined)}else{s.push(t&&t.raw?n:n.value)}}return s}if(typeof r.expires==="number"&&Date.now()>r.expires){return this.delete(e).then((()=>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;if(typeof t==="symbol"){this.emit("error","symbol cannot be serialized")}t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const r=this._getKeyPrefixArray(e);if(t.deleteMany===undefined){const e=[];for(const s of r){e.push(t.delete(s))}return Promise.allSettled(e).then((e=>e.every((e=>e.value===true))))}return Promise.resolve().then((()=>t.deleteMany(r)))}const r=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(r)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((async()=>{if(typeof r.has==="function"){return r.has(t)}const e=await r.get(t);return e!==undefined}))}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect==="function"){return e.disconnect()}}}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}},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 d=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 h=[...d];if(u){h.push("base64")}if(h.length!==0||l&&l!==t){h.unshift(l)}return`data:${h.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},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 d.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 d=_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 d=e.node||o;let h=e.clockseq!==undefined?e.clockseq:i;if(d==null||h==null){const t=e.random||(e.rng||s.default)();if(d==null){d=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(h==null){h=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){h=h+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=h;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++]=h>>>8|128;l[u++]=h&255;for(let e=0;e<6;++e){l[u+e]=d[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=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")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const e=__nccwpck_require__(2021);const{getInputParams:t,reportError:r,validateLeankitUrl:s}=__nccwpck_require__(2904);function parseList(e){if(!e){return[]}return e.trim().split(/\s*,\s*/)}(async()=>{const[r,n,o,i,a,c]=t({required:["host","apiToken","cardIds"],optional:["assignUserIds","unassignUserIds","wipOverrideComment"]});s("host",r);if(!i&&!a){throw new Error("Either assignUserIds or unassignUserIds must be specified")}const u=parseList(o);const l=parseList(i);const d=parseList(a);const{assignUsers:h}=e(r,n);await h(u,l,d,c)})().catch((e=>{r("assignUsers",e)}))})();module.exports=r})(); \ No newline at end of file diff --git a/assignUsers/index.js b/assignUsers/index.js index db0a576..5c6ed2d 100644 --- a/assignUsers/index.js +++ b/assignUsers/index.js @@ -34,5 +34,5 @@ function parseList( list ) { const { assignUsers } = leankitApiFactory( host, apiToken ); await assignUsers( cardIdList, userIdsToAssign, userIdsToUnassign, wipOverrideComment ); } )().catch( ex => { - reportError( "assignUsers", ex.message ); + reportError( "assignUsers", ex ); } ); diff --git a/assignUsers/index.spec.js b/assignUsers/index.spec.js index 14df29f..90838e3 100644 --- a/assignUsers/index.spec.js +++ b/assignUsers/index.spec.js @@ -40,9 +40,10 @@ describe( "assignUsers", () => { describe( "validation", () => { describe( "when validation fails", () => { + const error = new Error( "Input required and not supplied: SOME PARAM ERROR" ); beforeEach( async () => { init(); - getInputParams.throws( new Error( "Input required and not supplied: SOME PARAM" ) ); + getInputParams.throws( error); await action(); } ); @@ -62,7 +63,7 @@ describe( "assignUsers", () => { } ); it( "should report error", async () => { - reportError.should.be.calledOnce.and.calledWith( "assignUsers", "Input required and not supplied: SOME PARAM" ); + reportError.should.be.calledOnce.and.calledWith( "assignUsers", error ); } ); } ); @@ -74,15 +75,17 @@ describe( "assignUsers", () => { } ); it( "should report error", async () => { - reportError.should.be.calledOnce.and.calledWith( "assignUsers", "Either assignUserIds or unassignUserIds must be specified" ); + reportError.should.be.calledOnce.and.calledWith( "assignUsers", + sinon.match({ message: "Either assignUserIds or unassignUserIds must be specified" })); } ); }); describe( "with invalid host", () => { + const error = new Error( "Expected a leankit url for 'host' action parameter" ); beforeEach( async () => { init(); getInputParams.returns( [ "INVALID_HOST" ] ); - validateLeankitUrl.throws( new Error( "Expected a leankit url for 'host' action parameter" )) + validateLeankitUrl.throws( error ) await action(); } ); @@ -91,7 +94,7 @@ describe( "assignUsers", () => { } ); it( "should report error", () => { - reportError.should.be.calledOnce.and.calledWith( "assignUsers", "Expected a leankit url for 'host' action parameter" ); + reportError.should.be.calledOnce.and.calledWith( "assignUsers", error); } ); } ); } ); diff --git a/blockCard/action.yml b/blockCard/action.yml index da44651..da639cd 100644 --- a/blockCard/action.yml +++ b/blockCard/action.yml @@ -2,10 +2,10 @@ name: "Block or unblock a card" description: "Block or unblock a card" inputs: host: - description: LeanKit Url (https://mycompany.leankit.com) + description: AgilePlace Url (https://mycompany.leankit.com) required: true apiToken: - description: Api token with read access to your LeanKit board + description: Api token with read access to your AgilePlace board required: true cardId: description: Id of the card diff --git a/blockCard/dist/index.js b/blockCard/dist/index.js index 4ecb429..4e62096 100644 --- a/blockCard/dist/index.js +++ b/blockCard/dist/index.js @@ -1 +1 @@ -(()=>{var e={2021:(e,t,r)=>{"use strict";const s=r(3061);e.exports=(e,t)=>{const r=`Bearer ${t}`;const n=e.endsWith("/")?e.substr(0,e.lastIndexOf("/")):e;const o={getCard:e=>s(`${n}/io/card/${e}`,{method:"GET",headers:{Authorization:r}}).json(),blockCard:(e,t,o)=>s(`${n}/io/card/${e}`,{method:"PATCH",json:[{op:"replace",path:"/blockReason",value:o},{op:"replace",path:"/isBlocked",value:t}],headers:{Authorization:r}}).json(),moveCard:(e,t,o)=>s(`${n}/io/card/move`,{method:"POST",json:{cardIds:[e],destination:{laneId:t},wipOverrideComment:o},headers:{Authorization:r}}).json(),assignUsers:(e,t,o,i)=>{const a={cardIds:e};if(t&&t.length){a.userIdsToAssign=t}if(o&&o.length){a.userIdsToUnassign=o}if(i){a.wipOverrideComment=i}return s(`${n}/io/card/assign`,{method:"POST",json:a,headers:{Authorization:r}}).json()},addComment:(e,t)=>s(`${n}/io/card/${e}/comment`,{method:"POST",json:{text:t},headers:{Authorization:r}}).json(),createCard:async e=>{const{id:t}=await s(`${n}/io/card`,{method:"POST",json:e,headers:{Authorization:r}}).json();return t},async verifyCardPosition(e,t){const r=await o.getCard(e);return r.lane.id===t}};return o}},2904:(e,t,r)=>{"use strict";const{getInput:s,getBooleanInput:n,setFailed:o,setOutput:i,exportVariable:a}=r(2186);e.exports={setOutput:i,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const o=[];for(const t of e){const e=r.includes(t)?n:s;o.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?n:s;o.push(t(e))}return o},reportError(e,t){const r=`${e}; ${t.message}`;i("error",r);a("LK_ERROR_MESSAGE",r);o(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},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 d=o(r(1017));const h=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}${d.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 h.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.result.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 d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var h;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(h=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=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const y=[d.BadGateway,d.ServiceUnavailable,d.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[h.Accept]=this._getExistingOrDefaultHeader(t,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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===d.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===d.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","Blob","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.blob=e=>isObjectOfType("Blob")(e);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=>{var t,r;return is.iterable(e)&&is.function_((t=e)===null||t===void 0?void 0:t.next)&&is.function_((r=e)===null||r===void 0?void 0:r.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.enumCase=(e,t)=>Object.values(t).includes(e);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;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.nonEmptyString=e=>is.string(e)&&e.length>0;is.nonEmptyStringAndNotWhitespace=e=>is.string(e)&&!is.emptyStringOrWhitespace(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),blob:e=>assertType(is.blob(e),"Blob",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),enumCase:(e,t)=>assertType(is.enumCase(e,t),"EnumCase",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),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>assertType(is.nonEmptyStringAndNotWhitespace(e),"non-empty string and not 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 d=Symbol("cacheableLookupInstance");const h=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[h]=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[h];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[d]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[d]}}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 d=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new d({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let d;if(typeof t==="string"){d=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){d=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";d=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(d)};t.headers=u(t.headers);const h=new s;const p=o(n.format(d),{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){h.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}h.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);h.emit("request",r)}catch(e){h.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;h.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>h.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);h.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}h.emit("error",new CacheableRequest.CacheError(e))}})();return h}}}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 d=r(3021);const h=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 h.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}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)}));d.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 d=r(2286);const h=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 b=r(3021);const w=r(2454);const E=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const C=r(4993);const P=r(9298);const T=r(397);const k=r(1048);const x=r(3462);let A;const q=Symbol("request");const j=Symbol("response");const H=Symbol("responseSize");const U=Symbol("downloadedSize");const M=Symbol("bodySize");const D=Symbol("uploadedSize");const I=Symbol("serverResponsesPiped");const L=Symbol("unproxyEvents");const N=Symbol("isFromCache");const $=Symbol("cancelTimeouts");const B=Symbol("startedReading");const z=Symbol("stopReading");const F=Symbol("triggerRead");const V=Symbol("body");const G=Symbol("jobs");const W=Symbol("originalResponse");const J=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const K=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 Q=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 Y=new Set([300,301,302,303,304,307,308]);const X=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of X){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[j]});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 Z=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[U]=0;this[D]=0;this.requestInitialized=false;this[I]=new Set;this.redirects=[];this[z]=false;this[F]=false;this[G]=[];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[q])===null||e===void 0?void 0:e.destroy();return}for(const e of this[G]){e()}this[G].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([C.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(!Q.has(v)){Q.set(v,new h(((e,t)=>{const r=e[q](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(!A){A=new d.default}r.dnsCache=A}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){T.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){T.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){T.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){T.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){T.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){T.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){T.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){T.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 k.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[V]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[V]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[V]=e.stringifyJson(e.json)}const n=await v.default(this[V],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[M]=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[N]=n.isFromCache;this[H]=Number(e.headers["content-length"])||undefined;this[j]=e;e.once("end",(()=>{this[H]=this[U];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&&Y.has(s)){e.resume();if(this[q]){this[$]();delete this[q];this[L]()}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[V]=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);function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}if(!isUnixSocketURL(r)&&isUnixSocketURL(o)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}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&&!P.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[F]){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[I]){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[$]=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[L]=b.default(e,this,Z);this[q]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[V];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,E.default(e));delete t.url;let n;const o=Q.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"]=K?"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[V]!==o.body){this[V]=o.body}const{agent:c,request:l,timeout:d,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 b=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[q]=_;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=C.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 b(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=d;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 h.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[z]){return}const{options:t}=this;const r=this.retryCount+1;this[z]=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:x.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[J]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[F]=true;const e=this[j];if(e&&!this[z]){if(e.readableLength){this[F]=false}let t;while((t=e.read())!==null){this[U]+=t.length;this[B]=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[G].push(write)}}_writeRequest(e,t,r){if(this[q].destroyed){return}this._progressCallbacks.push((()=>{this[D]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[q].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(!(q in this)){e();return}if(this[q].destroyed){e();return}this[q].end((t=>{if(!t){this[M]=this[D];this.emit("uploadProgress",this.uploadProgress);this[q].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[G].push(endRequest)}}_destroy(e,t){var r;this[z]=true;clearTimeout(this[J]);if(q in this){this[$]();if(!((r=this[j])===null||r===void 0?void 0:r.complete)){this[q].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[z]}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[q])===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[q])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[H]){e=this[U]/this[H]}else if(this[H]===this[U]){e=1}else{e=0}return{percent:e,transferred:this[U],total:this[H]}}get uploadProgress(){let e;if(this[M]){e=this[D]/this[M]}else if(this[M]===this[D]){e=1}else{e=0}return{percent:e,transferred:this[D],total:this[M]}}get timings(){var e;return(e=this[q])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[N]}pipe(e,t){if(this[B]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[I].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[I].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:d}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=d(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 h=["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=d(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=d(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 h){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,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(/\s*,\s*/);for(const e of r){const[r,s]=e.split(/\s*=\s*/,2);t[r]=s===undefined?true:s.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 d=["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 d){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 d=Agent.normalizeOrigin(e,t&&t.servername);if(d===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(d in this.queue[i]){this.queue[i][d].listeners.push(...r);this._tryToCreateNewSession(i,d);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][d]===entry){delete this.queue[i][d];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${d}:${i}`;let n=false;try{const h=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});h[a]=0;h[l]=false;const isFree=()=>h[a]{this.tlsSessionCache.set(s,e)}));h.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));h.setTimeout(this.timeout,(()=>{h.destroy()}));h.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(h),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,d)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of h[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(h)}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}}}};h.on("origin",(()=>{h[u]=h.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],h)}));h.once("remoteSettings",(()=>{h.ref();h.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}h.destroy();return}h[u]=h.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,h,compareSessions),0,h)}else{e[i]=[h]}}this._freeSessionsCount+=1;n=true;this.emit("session",h);processListeners();removeFromQueue();if(h[a]===0&&this._freeSessionsCount>this.maxFreeSessions){h.close()}if(r.length!==0){this.getSession(d,t,r);r.length=0}h.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],h)}))}));h[c]=h.request;h.request=(e,t)=>{if(h[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=h[c](e,t);h.ref();++h[a];if(h[a]===h.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--h[a];if(!h.destroyed&&!h.closed){closeSessionIfCovered(this.sessions[i],h);if(isFree()&&!h.closed){if(!p){this._freeSessionsCount++;p=true}const e=h[a]===0;if(e){h.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||h[l])){h.close()}else{closeCoveredSessions(this.sessions[i],h);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][d]=entry;this._tryToCreateNewSession(i,d)}))}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 d=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(d.has(t)){const e=await d.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);d.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()}}d.delete(t);return a}catch(e){d.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:d,ERR_INVALID_PROTOCOL:h,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:b,HTTP2_METHOD_CONNECT:w}=s.constants;const E=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const C=Symbol("flushedHeaders");const P=Symbol("jobs");const T=/^[\^`\-\w!#$%&*+.|~]+$/;const k=/[^\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 d("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new h(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[E]=Object.create(null);this[P]=[];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[E])){this[E].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[E])){this[E][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[E])){this[E][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[C]=false}get method(){return this[E][_]}set method(e){if(e){this[E][_]=e.toUpperCase()}}get path(){return this[E][b]}set path(e){if(e){this[E][b]=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[P].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[P].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[C]||this.destroyed){return}this[C]=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[P]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[E]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[E]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}return this[E][e.toLowerCase()]}get headersSent(){return this[C]}removeHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[E][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!T.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(k.test(t)){throw new g("header content",e)}this[E][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[P].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",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){const r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};const o=["sqlite","postgres","mysql","mongo","redis","tiered"];class Keyv extends s{constructor(e,{emitErrors:t=true,...r}={}){super();this.opts={namespace:"keyv",serialize:n.stringify,deserialize:n.parse,...typeof e==="string"?{uri:e}:e,...r};if(!this.opts.store){const e={...this.opts};this.opts.store=loadStore(e)}if(this.opts.compression){const e=this.opts.compression;const{serialize:t,deserialize:r}=e.opts;this.opts.serialize=t;this.opts.deserialize=r}if(typeof this.opts.store.on==="function"&&t){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace;const generateIterator=e=>async function*(){for await(const[t,r]of typeof e==="function"?e(this.opts.store.namespace):e){const e=this.opts.deserialize(r);if(this.opts.store.namespace&&!t.includes(this.opts.store.namespace)){continue}if(typeof e.expires==="number"&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}};if(typeof this.opts.store[Symbol.iterator]==="function"&&this.opts.store instanceof Map){this.iterator=generateIterator(this.opts.store)}else if(typeof this.opts.store.iterator==="function"&&this.opts.store.opts&&this._checkIterableAdaptar()){this.iterator=generateIterator(this.opts.store.iterator.bind(this.opts.store))}}_checkIterableAdaptar(){return o.includes(this.opts.store.opts.dialect)||o.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:r}=this.opts;const s=Array.isArray(e);const n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&r.getMany===undefined){const e=[];for(const s of n){e.push(Promise.resolve().then((()=>r.get(s))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((e=>{if(e===undefined||e===null){return undefined}if(typeof e.expires==="number"&&Date.now()>e.expires){return this.delete(s).then((()=>undefined))}return t&&t.raw?e:e.value})))}return Promise.allSettled(e).then((e=>{const t=[];for(const r of e){t.push(r.value)}return t}))}return Promise.resolve().then((()=>s?r.getMany(n):r.get(n))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined||r===null){return undefined}if(s){const s=[];for(let n of r){if(typeof n==="string"){n=this.opts.deserialize(n)}if(n===undefined||n===null){s.push(undefined);continue}if(typeof n.expires==="number"&&Date.now()>n.expires){this.delete(e).then((()=>undefined));s.push(undefined)}else{s.push(t&&t.raw?n:n.value)}}return s}if(typeof r.expires==="number"&&Date.now()>r.expires){return this.delete(e).then((()=>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;if(typeof t==="symbol"){this.emit("error","symbol cannot be serialized")}t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const r=this._getKeyPrefixArray(e);if(t.deleteMany===undefined){const e=[];for(const s of r){e.push(t.delete(s))}return Promise.allSettled(e).then((e=>e.every((e=>e.value===true))))}return Promise.resolve().then((()=>t.deleteMany(r)))}const r=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(r)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((async()=>{if(typeof r.has==="function"){return r.has(t)}const e=await r.get(t);return e!==undefined}))}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect==="function"){return e.disconnect()}}}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}},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 d=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 h=[...d];if(u){h.push("base64")}if(h.length!==0||l&&l!==t){h.unshift(l)}return`data:${h.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},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 d.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 d=_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 d=e.node||o;let h=e.clockseq!==undefined?e.clockseq:i;if(d==null||h==null){const t=e.random||(e.rng||s.default)();if(d==null){d=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(h==null){h=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){h=h+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=h;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++]=h>>>8|128;l[u++]=h&255;for(let e=0;e<6;++e){l[u+e]=d[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=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")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const e=__nccwpck_require__(2021);const{getInputParams:t,reportError:r,validateLeankitUrl:s}=__nccwpck_require__(2904);(async()=>{const[r,n,o,i,a]=t({required:["host","apiToken","cardId","isBlocked"],optional:["blockReason"],asBoolean:["isBlocked"]});s("host",r);const{blockCard:c}=e(r,n);await c(o,i,a)})().catch((e=>{r("blockCard",e)}))})();module.exports=r})(); \ No newline at end of file +(()=>{var e={2021:(e,t,r)=>{"use strict";const s=r(3061);e.exports=(e,t)=>{const r=`Bearer ${t}`;const n=e.endsWith("/")?e.substr(0,e.lastIndexOf("/")):e;const o={getCard:e=>s(`${n}/io/card/${e}`,{method:"GET",headers:{Authorization:r}}).json(),blockCard:(e,t,o)=>s(`${n}/io/card/${e}`,{method:"PATCH",json:[{op:"replace",path:"/blockReason",value:o},{op:"replace",path:"/isBlocked",value:t}],headers:{Authorization:r}}).json(),moveCard:(e,t,o)=>s(`${n}/io/card/move`,{method:"POST",json:{cardIds:[e],destination:{laneId:t},wipOverrideComment:o},headers:{Authorization:r}}).json(),assignUsers:(e,t,o,i)=>{const a={cardIds:e};if(t&&t.length){a.userIdsToAssign=t}if(o&&o.length){a.userIdsToUnassign=o}if(i){a.wipOverrideComment=i}return s(`${n}/io/card/assign`,{method:"POST",json:a,headers:{Authorization:r}}).json()},addComment:(e,t)=>s(`${n}/io/card/${e}/comment`,{method:"POST",json:{text:t},headers:{Authorization:r}}).json(),createCard:async e=>{const{id:t}=await s(`${n}/io/card`,{method:"POST",json:e,headers:{Authorization:r}}).json();return t},initiateCardEvent:(e,t)=>s(`${n}/io/card/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),initiateBoardEvent:(e,t)=>s(`${n}/io/board/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),async verifyCardPosition(e,t){const r=await o.getCard(e);return r.lane.id===t}};return o}},2904:(e,t,r)=>{"use strict";const{getInput:s,getBooleanInput:n,setFailed:o,setOutput:i,exportVariable:a}=r(2186);e.exports={setOutput:i,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const o=[];for(const t of e){const e=r.includes(t)?n:s;o.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?n:s;o.push(t(e))}return o},reportError(e,t){const r=`${e}; ${t.message}`;i("error",r);a("LK_ERROR_MESSAGE",r);o(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},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 d=o(r(1017));const h=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}${d.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 h.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.result.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 d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var h;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(h=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=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const y=[d.BadGateway,d.ServiceUnavailable,d.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[h.Accept]=this._getExistingOrDefaultHeader(t,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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===d.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===d.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","Blob","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.blob=e=>isObjectOfType("Blob")(e);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=>{var t,r;return is.iterable(e)&&is.function_((t=e)===null||t===void 0?void 0:t.next)&&is.function_((r=e)===null||r===void 0?void 0:r.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.enumCase=(e,t)=>Object.values(t).includes(e);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;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.nonEmptyString=e=>is.string(e)&&e.length>0;is.nonEmptyStringAndNotWhitespace=e=>is.string(e)&&!is.emptyStringOrWhitespace(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),blob:e=>assertType(is.blob(e),"Blob",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),enumCase:(e,t)=>assertType(is.enumCase(e,t),"EnumCase",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),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>assertType(is.nonEmptyStringAndNotWhitespace(e),"non-empty string and not 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 d=Symbol("cacheableLookupInstance");const h=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[h]=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[h];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[d]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[d]}}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 d=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new d({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let d;if(typeof t==="string"){d=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){d=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";d=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(d)};t.headers=u(t.headers);const h=new s;const p=o(n.format(d),{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){h.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}h.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);h.emit("request",r)}catch(e){h.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;h.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>h.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);h.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}h.emit("error",new CacheableRequest.CacheError(e))}})();return h}}}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 d=r(3021);const h=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 h.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}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)}));d.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 d=r(2286);const h=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 b=r(3021);const w=r(2454);const E=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const C=r(4993);const P=r(9298);const T=r(397);const k=r(1048);const x=r(3462);let A;const q=Symbol("request");const j=Symbol("response");const H=Symbol("responseSize");const U=Symbol("downloadedSize");const M=Symbol("bodySize");const D=Symbol("uploadedSize");const I=Symbol("serverResponsesPiped");const L=Symbol("unproxyEvents");const N=Symbol("isFromCache");const $=Symbol("cancelTimeouts");const B=Symbol("startedReading");const z=Symbol("stopReading");const F=Symbol("triggerRead");const V=Symbol("body");const G=Symbol("jobs");const W=Symbol("originalResponse");const J=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const K=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 Q=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 Y=new Set([300,301,302,303,304,307,308]);const X=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of X){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[j]});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 Z=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[U]=0;this[D]=0;this.requestInitialized=false;this[I]=new Set;this.redirects=[];this[z]=false;this[F]=false;this[G]=[];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[q])===null||e===void 0?void 0:e.destroy();return}for(const e of this[G]){e()}this[G].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([C.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(!Q.has(v)){Q.set(v,new h(((e,t)=>{const r=e[q](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(!A){A=new d.default}r.dnsCache=A}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){T.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){T.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){T.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){T.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){T.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){T.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){T.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){T.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 k.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[V]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[V]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[V]=e.stringifyJson(e.json)}const n=await v.default(this[V],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[M]=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[N]=n.isFromCache;this[H]=Number(e.headers["content-length"])||undefined;this[j]=e;e.once("end",(()=>{this[H]=this[U];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&&Y.has(s)){e.resume();if(this[q]){this[$]();delete this[q];this[L]()}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[V]=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);function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}if(!isUnixSocketURL(r)&&isUnixSocketURL(o)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}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&&!P.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[F]){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[I]){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[$]=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[L]=b.default(e,this,Z);this[q]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[V];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,E.default(e));delete t.url;let n;const o=Q.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"]=K?"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[V]!==o.body){this[V]=o.body}const{agent:c,request:l,timeout:d,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 b=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[q]=_;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=C.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 b(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=d;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 h.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[z]){return}const{options:t}=this;const r=this.retryCount+1;this[z]=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:x.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[J]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[F]=true;const e=this[j];if(e&&!this[z]){if(e.readableLength){this[F]=false}let t;while((t=e.read())!==null){this[U]+=t.length;this[B]=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[G].push(write)}}_writeRequest(e,t,r){if(this[q].destroyed){return}this._progressCallbacks.push((()=>{this[D]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[q].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(!(q in this)){e();return}if(this[q].destroyed){e();return}this[q].end((t=>{if(!t){this[M]=this[D];this.emit("uploadProgress",this.uploadProgress);this[q].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[G].push(endRequest)}}_destroy(e,t){var r;this[z]=true;clearTimeout(this[J]);if(q in this){this[$]();if(!((r=this[j])===null||r===void 0?void 0:r.complete)){this[q].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[z]}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[q])===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[q])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[H]){e=this[U]/this[H]}else if(this[H]===this[U]){e=1}else{e=0}return{percent:e,transferred:this[U],total:this[H]}}get uploadProgress(){let e;if(this[M]){e=this[D]/this[M]}else if(this[M]===this[D]){e=1}else{e=0}return{percent:e,transferred:this[D],total:this[M]}}get timings(){var e;return(e=this[q])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[N]}pipe(e,t){if(this[B]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[I].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[I].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:d}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=d(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 h=["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=d(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=d(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 h){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,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(/\s*,\s*/);for(const e of r){const[r,s]=e.split(/\s*=\s*/,2);t[r]=s===undefined?true:s.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 d=["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 d){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 d=Agent.normalizeOrigin(e,t&&t.servername);if(d===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(d in this.queue[i]){this.queue[i][d].listeners.push(...r);this._tryToCreateNewSession(i,d);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][d]===entry){delete this.queue[i][d];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${d}:${i}`;let n=false;try{const h=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});h[a]=0;h[l]=false;const isFree=()=>h[a]{this.tlsSessionCache.set(s,e)}));h.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));h.setTimeout(this.timeout,(()=>{h.destroy()}));h.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(h),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,d)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of h[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(h)}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}}}};h.on("origin",(()=>{h[u]=h.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],h)}));h.once("remoteSettings",(()=>{h.ref();h.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}h.destroy();return}h[u]=h.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,h,compareSessions),0,h)}else{e[i]=[h]}}this._freeSessionsCount+=1;n=true;this.emit("session",h);processListeners();removeFromQueue();if(h[a]===0&&this._freeSessionsCount>this.maxFreeSessions){h.close()}if(r.length!==0){this.getSession(d,t,r);r.length=0}h.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],h)}))}));h[c]=h.request;h.request=(e,t)=>{if(h[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=h[c](e,t);h.ref();++h[a];if(h[a]===h.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--h[a];if(!h.destroyed&&!h.closed){closeSessionIfCovered(this.sessions[i],h);if(isFree()&&!h.closed){if(!p){this._freeSessionsCount++;p=true}const e=h[a]===0;if(e){h.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||h[l])){h.close()}else{closeCoveredSessions(this.sessions[i],h);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][d]=entry;this._tryToCreateNewSession(i,d)}))}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 d=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(d.has(t)){const e=await d.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);d.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()}}d.delete(t);return a}catch(e){d.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:d,ERR_INVALID_PROTOCOL:h,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:b,HTTP2_METHOD_CONNECT:w}=s.constants;const E=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const C=Symbol("flushedHeaders");const P=Symbol("jobs");const T=/^[\^`\-\w!#$%&*+.|~]+$/;const k=/[^\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 d("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new h(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[E]=Object.create(null);this[P]=[];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[E])){this[E].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[E])){this[E][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[E])){this[E][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[C]=false}get method(){return this[E][_]}set method(e){if(e){this[E][_]=e.toUpperCase()}}get path(){return this[E][b]}set path(e){if(e){this[E][b]=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[P].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[P].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[C]||this.destroyed){return}this[C]=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[P]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[E]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[E]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}return this[E][e.toLowerCase()]}get headersSent(){return this[C]}removeHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[E][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!T.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(k.test(t)){throw new g("header content",e)}this[E][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[P].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",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){const r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};const o=["sqlite","postgres","mysql","mongo","redis","tiered"];class Keyv extends s{constructor(e,{emitErrors:t=true,...r}={}){super();this.opts={namespace:"keyv",serialize:n.stringify,deserialize:n.parse,...typeof e==="string"?{uri:e}:e,...r};if(!this.opts.store){const e={...this.opts};this.opts.store=loadStore(e)}if(this.opts.compression){const e=this.opts.compression;const{serialize:t,deserialize:r}=e.opts;this.opts.serialize=t;this.opts.deserialize=r}if(typeof this.opts.store.on==="function"&&t){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace;const generateIterator=e=>async function*(){for await(const[t,r]of typeof e==="function"?e(this.opts.store.namespace):e){const e=this.opts.deserialize(r);if(this.opts.store.namespace&&!t.includes(this.opts.store.namespace)){continue}if(typeof e.expires==="number"&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}};if(typeof this.opts.store[Symbol.iterator]==="function"&&this.opts.store instanceof Map){this.iterator=generateIterator(this.opts.store)}else if(typeof this.opts.store.iterator==="function"&&this.opts.store.opts&&this._checkIterableAdaptar()){this.iterator=generateIterator(this.opts.store.iterator.bind(this.opts.store))}}_checkIterableAdaptar(){return o.includes(this.opts.store.opts.dialect)||o.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:r}=this.opts;const s=Array.isArray(e);const n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&r.getMany===undefined){const e=[];for(const s of n){e.push(Promise.resolve().then((()=>r.get(s))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((e=>{if(e===undefined||e===null){return undefined}if(typeof e.expires==="number"&&Date.now()>e.expires){return this.delete(s).then((()=>undefined))}return t&&t.raw?e:e.value})))}return Promise.allSettled(e).then((e=>{const t=[];for(const r of e){t.push(r.value)}return t}))}return Promise.resolve().then((()=>s?r.getMany(n):r.get(n))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined||r===null){return undefined}if(s){const s=[];for(let n of r){if(typeof n==="string"){n=this.opts.deserialize(n)}if(n===undefined||n===null){s.push(undefined);continue}if(typeof n.expires==="number"&&Date.now()>n.expires){this.delete(e).then((()=>undefined));s.push(undefined)}else{s.push(t&&t.raw?n:n.value)}}return s}if(typeof r.expires==="number"&&Date.now()>r.expires){return this.delete(e).then((()=>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;if(typeof t==="symbol"){this.emit("error","symbol cannot be serialized")}t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const r=this._getKeyPrefixArray(e);if(t.deleteMany===undefined){const e=[];for(const s of r){e.push(t.delete(s))}return Promise.allSettled(e).then((e=>e.every((e=>e.value===true))))}return Promise.resolve().then((()=>t.deleteMany(r)))}const r=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(r)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((async()=>{if(typeof r.has==="function"){return r.has(t)}const e=await r.get(t);return e!==undefined}))}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect==="function"){return e.disconnect()}}}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}},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 d=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 h=[...d];if(u){h.push("base64")}if(h.length!==0||l&&l!==t){h.unshift(l)}return`data:${h.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},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 d.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 d=_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 d=e.node||o;let h=e.clockseq!==undefined?e.clockseq:i;if(d==null||h==null){const t=e.random||(e.rng||s.default)();if(d==null){d=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(h==null){h=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){h=h+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=h;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++]=h>>>8|128;l[u++]=h&255;for(let e=0;e<6;++e){l[u+e]=d[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=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")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const e=__nccwpck_require__(2021);const{getInputParams:t,reportError:r,validateLeankitUrl:s}=__nccwpck_require__(2904);(async()=>{const[r,n,o,i,a]=t({required:["host","apiToken","cardId","isBlocked"],optional:["blockReason"],asBoolean:["isBlocked"]});s("host",r);const{blockCard:c}=e(r,n);await c(o,i,a)})().catch((e=>{r("blockCard",e)}))})();module.exports=r})(); \ No newline at end of file diff --git a/createCard/action.yml b/createCard/action.yml index fb6ddf9..b4d33d5 100644 --- a/createCard/action.yml +++ b/createCard/action.yml @@ -1,11 +1,11 @@ name: "Create Card" -description: "Create a LeanKit card" +description: "Create an AgilePlace card" inputs: host: - description: LeanKit Url (https://mycompany.leankit.com) + description: AgilePlace Url (https://mycompany.leankit.com) required: true apiToken: - description: Api token with write access to your LeanKit board + description: Api token with write access to your AgilePlace board required: true boardId: description: Board Id for the new card diff --git a/createCard/dist/index.js b/createCard/dist/index.js index d73f596..dc2b45b 100644 --- a/createCard/dist/index.js +++ b/createCard/dist/index.js @@ -1 +1 @@ -(()=>{var e={2021:(e,t,r)=>{"use strict";const s=r(3061);e.exports=(e,t)=>{const r=`Bearer ${t}`;const n=e.endsWith("/")?e.substr(0,e.lastIndexOf("/")):e;const o={getCard:e=>s(`${n}/io/card/${e}`,{method:"GET",headers:{Authorization:r}}).json(),blockCard:(e,t,o)=>s(`${n}/io/card/${e}`,{method:"PATCH",json:[{op:"replace",path:"/blockReason",value:o},{op:"replace",path:"/isBlocked",value:t}],headers:{Authorization:r}}).json(),moveCard:(e,t,o)=>s(`${n}/io/card/move`,{method:"POST",json:{cardIds:[e],destination:{laneId:t},wipOverrideComment:o},headers:{Authorization:r}}).json(),assignUsers:(e,t,o,i)=>{const a={cardIds:e};if(t&&t.length){a.userIdsToAssign=t}if(o&&o.length){a.userIdsToUnassign=o}if(i){a.wipOverrideComment=i}return s(`${n}/io/card/assign`,{method:"POST",json:a,headers:{Authorization:r}}).json()},addComment:(e,t)=>s(`${n}/io/card/${e}/comment`,{method:"POST",json:{text:t},headers:{Authorization:r}}).json(),createCard:async e=>{const{id:t}=await s(`${n}/io/card`,{method:"POST",json:e,headers:{Authorization:r}}).json();return t},async verifyCardPosition(e,t){const r=await o.getCard(e);return r.lane.id===t}};return o}},2904:(e,t,r)=>{"use strict";const{getInput:s,getBooleanInput:n,setFailed:o,setOutput:i,exportVariable:a}=r(2186);e.exports={setOutput:i,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const o=[];for(const t of e){const e=r.includes(t)?n:s;o.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?n:s;o.push(t(e))}return o},reportError(e,t){const r=`${e}; ${t.message}`;i("error",r);a("LK_ERROR_MESSAGE",r);o(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},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 d=o(r(1017));const h=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}${d.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 h.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.result.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 d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var h;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(h=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=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const y=[d.BadGateway,d.ServiceUnavailable,d.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[h.Accept]=this._getExistingOrDefaultHeader(t,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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===d.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===d.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","Blob","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.blob=e=>isObjectOfType("Blob")(e);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=>{var t,r;return is.iterable(e)&&is.function_((t=e)===null||t===void 0?void 0:t.next)&&is.function_((r=e)===null||r===void 0?void 0:r.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.enumCase=(e,t)=>Object.values(t).includes(e);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;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.nonEmptyString=e=>is.string(e)&&e.length>0;is.nonEmptyStringAndNotWhitespace=e=>is.string(e)&&!is.emptyStringOrWhitespace(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),blob:e=>assertType(is.blob(e),"Blob",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),enumCase:(e,t)=>assertType(is.enumCase(e,t),"EnumCase",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),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>assertType(is.nonEmptyStringAndNotWhitespace(e),"non-empty string and not 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 d=Symbol("cacheableLookupInstance");const h=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[h]=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[h];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[d]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[d]}}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 d=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new d({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let d;if(typeof t==="string"){d=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){d=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";d=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(d)};t.headers=u(t.headers);const h=new s;const p=o(n.format(d),{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){h.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}h.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);h.emit("request",r)}catch(e){h.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;h.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>h.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);h.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}h.emit("error",new CacheableRequest.CacheError(e))}})();return h}}}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 d=r(3021);const h=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 h.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}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)}));d.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 d=r(2286);const h=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 b=r(3021);const w=r(2454);const E=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const C=r(4993);const P=r(9298);const T=r(397);const k=r(1048);const x=r(3462);let A;const q=Symbol("request");const j=Symbol("response");const H=Symbol("responseSize");const U=Symbol("downloadedSize");const I=Symbol("bodySize");const M=Symbol("uploadedSize");const D=Symbol("serverResponsesPiped");const L=Symbol("unproxyEvents");const N=Symbol("isFromCache");const $=Symbol("cancelTimeouts");const B=Symbol("startedReading");const z=Symbol("stopReading");const F=Symbol("triggerRead");const V=Symbol("body");const G=Symbol("jobs");const W=Symbol("originalResponse");const J=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const K=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 Q=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 Y=new Set([300,301,302,303,304,307,308]);const X=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of X){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[j]});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 Z=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[U]=0;this[M]=0;this.requestInitialized=false;this[D]=new Set;this.redirects=[];this[z]=false;this[F]=false;this[G]=[];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[q])===null||e===void 0?void 0:e.destroy();return}for(const e of this[G]){e()}this[G].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([C.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(!Q.has(v)){Q.set(v,new h(((e,t)=>{const r=e[q](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(!A){A=new d.default}r.dnsCache=A}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){T.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){T.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){T.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){T.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){T.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){T.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){T.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){T.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 k.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[V]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[V]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[V]=e.stringifyJson(e.json)}const n=await v.default(this[V],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[I]=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[N]=n.isFromCache;this[H]=Number(e.headers["content-length"])||undefined;this[j]=e;e.once("end",(()=>{this[H]=this[U];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&&Y.has(s)){e.resume();if(this[q]){this[$]();delete this[q];this[L]()}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[V]=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);function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}if(!isUnixSocketURL(r)&&isUnixSocketURL(o)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}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&&!P.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[F]){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[D]){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[$]=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[L]=b.default(e,this,Z);this[q]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[V];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,E.default(e));delete t.url;let n;const o=Q.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"]=K?"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[V]!==o.body){this[V]=o.body}const{agent:c,request:l,timeout:d,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 b=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[q]=_;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=C.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 b(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=d;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 h.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[z]){return}const{options:t}=this;const r=this.retryCount+1;this[z]=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:x.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[J]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[F]=true;const e=this[j];if(e&&!this[z]){if(e.readableLength){this[F]=false}let t;while((t=e.read())!==null){this[U]+=t.length;this[B]=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[G].push(write)}}_writeRequest(e,t,r){if(this[q].destroyed){return}this._progressCallbacks.push((()=>{this[M]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[q].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(!(q in this)){e();return}if(this[q].destroyed){e();return}this[q].end((t=>{if(!t){this[I]=this[M];this.emit("uploadProgress",this.uploadProgress);this[q].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[G].push(endRequest)}}_destroy(e,t){var r;this[z]=true;clearTimeout(this[J]);if(q in this){this[$]();if(!((r=this[j])===null||r===void 0?void 0:r.complete)){this[q].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[z]}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[q])===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[q])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[H]){e=this[U]/this[H]}else if(this[H]===this[U]){e=1}else{e=0}return{percent:e,transferred:this[U],total:this[H]}}get uploadProgress(){let e;if(this[I]){e=this[M]/this[I]}else if(this[I]===this[M]){e=1}else{e=0}return{percent:e,transferred:this[M],total:this[I]}}get timings(){var e;return(e=this[q])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[N]}pipe(e,t){if(this[B]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[D].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[D].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:d}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=d(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 h=["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=d(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=d(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 h){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,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(/\s*,\s*/);for(const e of r){const[r,s]=e.split(/\s*=\s*/,2);t[r]=s===undefined?true:s.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 d=["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 d){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 d=Agent.normalizeOrigin(e,t&&t.servername);if(d===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(d in this.queue[i]){this.queue[i][d].listeners.push(...r);this._tryToCreateNewSession(i,d);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][d]===entry){delete this.queue[i][d];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${d}:${i}`;let n=false;try{const h=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});h[a]=0;h[l]=false;const isFree=()=>h[a]{this.tlsSessionCache.set(s,e)}));h.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));h.setTimeout(this.timeout,(()=>{h.destroy()}));h.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(h),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,d)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of h[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(h)}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}}}};h.on("origin",(()=>{h[u]=h.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],h)}));h.once("remoteSettings",(()=>{h.ref();h.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}h.destroy();return}h[u]=h.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,h,compareSessions),0,h)}else{e[i]=[h]}}this._freeSessionsCount+=1;n=true;this.emit("session",h);processListeners();removeFromQueue();if(h[a]===0&&this._freeSessionsCount>this.maxFreeSessions){h.close()}if(r.length!==0){this.getSession(d,t,r);r.length=0}h.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],h)}))}));h[c]=h.request;h.request=(e,t)=>{if(h[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=h[c](e,t);h.ref();++h[a];if(h[a]===h.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--h[a];if(!h.destroyed&&!h.closed){closeSessionIfCovered(this.sessions[i],h);if(isFree()&&!h.closed){if(!p){this._freeSessionsCount++;p=true}const e=h[a]===0;if(e){h.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||h[l])){h.close()}else{closeCoveredSessions(this.sessions[i],h);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][d]=entry;this._tryToCreateNewSession(i,d)}))}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 d=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(d.has(t)){const e=await d.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);d.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()}}d.delete(t);return a}catch(e){d.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:d,ERR_INVALID_PROTOCOL:h,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:b,HTTP2_METHOD_CONNECT:w}=s.constants;const E=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const C=Symbol("flushedHeaders");const P=Symbol("jobs");const T=/^[\^`\-\w!#$%&*+.|~]+$/;const k=/[^\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 d("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new h(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[E]=Object.create(null);this[P]=[];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[E])){this[E].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[E])){this[E][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[E])){this[E][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[C]=false}get method(){return this[E][_]}set method(e){if(e){this[E][_]=e.toUpperCase()}}get path(){return this[E][b]}set path(e){if(e){this[E][b]=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[P].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[P].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[C]||this.destroyed){return}this[C]=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[P]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[E]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[E]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}return this[E][e.toLowerCase()]}get headersSent(){return this[C]}removeHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[E][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!T.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(k.test(t)){throw new g("header content",e)}this[E][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[P].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",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){const r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};const o=["sqlite","postgres","mysql","mongo","redis","tiered"];class Keyv extends s{constructor(e,{emitErrors:t=true,...r}={}){super();this.opts={namespace:"keyv",serialize:n.stringify,deserialize:n.parse,...typeof e==="string"?{uri:e}:e,...r};if(!this.opts.store){const e={...this.opts};this.opts.store=loadStore(e)}if(this.opts.compression){const e=this.opts.compression;const{serialize:t,deserialize:r}=e.opts;this.opts.serialize=t;this.opts.deserialize=r}if(typeof this.opts.store.on==="function"&&t){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace;const generateIterator=e=>async function*(){for await(const[t,r]of typeof e==="function"?e(this.opts.store.namespace):e){const e=this.opts.deserialize(r);if(this.opts.store.namespace&&!t.includes(this.opts.store.namespace)){continue}if(typeof e.expires==="number"&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}};if(typeof this.opts.store[Symbol.iterator]==="function"&&this.opts.store instanceof Map){this.iterator=generateIterator(this.opts.store)}else if(typeof this.opts.store.iterator==="function"&&this.opts.store.opts&&this._checkIterableAdaptar()){this.iterator=generateIterator(this.opts.store.iterator.bind(this.opts.store))}}_checkIterableAdaptar(){return o.includes(this.opts.store.opts.dialect)||o.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:r}=this.opts;const s=Array.isArray(e);const n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&r.getMany===undefined){const e=[];for(const s of n){e.push(Promise.resolve().then((()=>r.get(s))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((e=>{if(e===undefined||e===null){return undefined}if(typeof e.expires==="number"&&Date.now()>e.expires){return this.delete(s).then((()=>undefined))}return t&&t.raw?e:e.value})))}return Promise.allSettled(e).then((e=>{const t=[];for(const r of e){t.push(r.value)}return t}))}return Promise.resolve().then((()=>s?r.getMany(n):r.get(n))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined||r===null){return undefined}if(s){const s=[];for(let n of r){if(typeof n==="string"){n=this.opts.deserialize(n)}if(n===undefined||n===null){s.push(undefined);continue}if(typeof n.expires==="number"&&Date.now()>n.expires){this.delete(e).then((()=>undefined));s.push(undefined)}else{s.push(t&&t.raw?n:n.value)}}return s}if(typeof r.expires==="number"&&Date.now()>r.expires){return this.delete(e).then((()=>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;if(typeof t==="symbol"){this.emit("error","symbol cannot be serialized")}t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const r=this._getKeyPrefixArray(e);if(t.deleteMany===undefined){const e=[];for(const s of r){e.push(t.delete(s))}return Promise.allSettled(e).then((e=>e.every((e=>e.value===true))))}return Promise.resolve().then((()=>t.deleteMany(r)))}const r=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(r)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((async()=>{if(typeof r.has==="function"){return r.has(t)}const e=await r.get(t);return e!==undefined}))}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect==="function"){return e.disconnect()}}}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}},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 d=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 h=[...d];if(u){h.push("base64")}if(h.length!==0||l&&l!==t){h.unshift(l)}return`data:${h.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},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 d.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 d=_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 d=e.node||o;let h=e.clockseq!==undefined?e.clockseq:i;if(d==null||h==null){const t=e.random||(e.rng||s.default)();if(d==null){d=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(h==null){h=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){h=h+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=h;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++]=h>>>8|128;l[u++]=h&255;for(let e=0;e<6;++e){l[u+e]=d[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=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")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const{setOutput:e}=__nccwpck_require__(2186);const t=__nccwpck_require__(2021);const{getInputParams:r,reportError:s,validateLeankitUrl:n}=__nccwpck_require__(2904);(async()=>{const[s,o,i,a,c,u,l,d,h]=r({required:["host","apiToken","boardId","title"],optional:["laneId","typeId","customId","externalLink","linkLabel"]});n("host",s);const{createCard:p}=t(s,o);const m={boardId:i,title:a};if(c){m.laneId=c}if(u){m.typeId=u}if(l){m.customId=l}if(d){m.externalLink={url:d,label:h||"Link to Github"}}const y=await p(m);e("createdCardId",y)})().catch((e=>{s("createCard",e)}))})();module.exports=r})(); \ No newline at end of file +(()=>{var e={2021:(e,t,r)=>{"use strict";const s=r(3061);e.exports=(e,t)=>{const r=`Bearer ${t}`;const n=e.endsWith("/")?e.substr(0,e.lastIndexOf("/")):e;const o={getCard:e=>s(`${n}/io/card/${e}`,{method:"GET",headers:{Authorization:r}}).json(),blockCard:(e,t,o)=>s(`${n}/io/card/${e}`,{method:"PATCH",json:[{op:"replace",path:"/blockReason",value:o},{op:"replace",path:"/isBlocked",value:t}],headers:{Authorization:r}}).json(),moveCard:(e,t,o)=>s(`${n}/io/card/move`,{method:"POST",json:{cardIds:[e],destination:{laneId:t},wipOverrideComment:o},headers:{Authorization:r}}).json(),assignUsers:(e,t,o,i)=>{const a={cardIds:e};if(t&&t.length){a.userIdsToAssign=t}if(o&&o.length){a.userIdsToUnassign=o}if(i){a.wipOverrideComment=i}return s(`${n}/io/card/assign`,{method:"POST",json:a,headers:{Authorization:r}}).json()},addComment:(e,t)=>s(`${n}/io/card/${e}/comment`,{method:"POST",json:{text:t},headers:{Authorization:r}}).json(),createCard:async e=>{const{id:t}=await s(`${n}/io/card`,{method:"POST",json:e,headers:{Authorization:r}}).json();return t},initiateCardEvent:(e,t)=>s(`${n}/io/card/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),initiateBoardEvent:(e,t)=>s(`${n}/io/board/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),async verifyCardPosition(e,t){const r=await o.getCard(e);return r.lane.id===t}};return o}},2904:(e,t,r)=>{"use strict";const{getInput:s,getBooleanInput:n,setFailed:o,setOutput:i,exportVariable:a}=r(2186);e.exports={setOutput:i,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const o=[];for(const t of e){const e=r.includes(t)?n:s;o.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?n:s;o.push(t(e))}return o},reportError(e,t){const r=`${e}; ${t.message}`;i("error",r);a("LK_ERROR_MESSAGE",r);o(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},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 d=o(r(1017));const h=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}${d.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 h.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.result.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 d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var h;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(h=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=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const y=[d.BadGateway,d.ServiceUnavailable,d.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[h.Accept]=this._getExistingOrDefaultHeader(t,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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===d.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===d.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","Blob","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.blob=e=>isObjectOfType("Blob")(e);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=>{var t,r;return is.iterable(e)&&is.function_((t=e)===null||t===void 0?void 0:t.next)&&is.function_((r=e)===null||r===void 0?void 0:r.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.enumCase=(e,t)=>Object.values(t).includes(e);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;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.nonEmptyString=e=>is.string(e)&&e.length>0;is.nonEmptyStringAndNotWhitespace=e=>is.string(e)&&!is.emptyStringOrWhitespace(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),blob:e=>assertType(is.blob(e),"Blob",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),enumCase:(e,t)=>assertType(is.enumCase(e,t),"EnumCase",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),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>assertType(is.nonEmptyStringAndNotWhitespace(e),"non-empty string and not 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 d=Symbol("cacheableLookupInstance");const h=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[h]=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[h];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[d]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[d]}}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 d=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new d({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let d;if(typeof t==="string"){d=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){d=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";d=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(d)};t.headers=u(t.headers);const h=new s;const p=o(n.format(d),{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){h.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}h.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);h.emit("request",r)}catch(e){h.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;h.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>h.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);h.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}h.emit("error",new CacheableRequest.CacheError(e))}})();return h}}}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 d=r(3021);const h=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 h.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}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)}));d.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 d=r(2286);const h=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 b=r(3021);const w=r(2454);const E=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const C=r(4993);const P=r(9298);const T=r(397);const k=r(1048);const x=r(3462);let A;const q=Symbol("request");const j=Symbol("response");const H=Symbol("responseSize");const U=Symbol("downloadedSize");const I=Symbol("bodySize");const M=Symbol("uploadedSize");const D=Symbol("serverResponsesPiped");const L=Symbol("unproxyEvents");const N=Symbol("isFromCache");const $=Symbol("cancelTimeouts");const B=Symbol("startedReading");const z=Symbol("stopReading");const F=Symbol("triggerRead");const V=Symbol("body");const G=Symbol("jobs");const W=Symbol("originalResponse");const J=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const K=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 Q=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 Y=new Set([300,301,302,303,304,307,308]);const X=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of X){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[j]});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 Z=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[U]=0;this[M]=0;this.requestInitialized=false;this[D]=new Set;this.redirects=[];this[z]=false;this[F]=false;this[G]=[];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[q])===null||e===void 0?void 0:e.destroy();return}for(const e of this[G]){e()}this[G].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([C.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(!Q.has(v)){Q.set(v,new h(((e,t)=>{const r=e[q](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(!A){A=new d.default}r.dnsCache=A}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){T.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){T.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){T.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){T.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){T.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){T.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){T.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){T.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 k.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[V]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[V]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[V]=e.stringifyJson(e.json)}const n=await v.default(this[V],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[I]=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[N]=n.isFromCache;this[H]=Number(e.headers["content-length"])||undefined;this[j]=e;e.once("end",(()=>{this[H]=this[U];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&&Y.has(s)){e.resume();if(this[q]){this[$]();delete this[q];this[L]()}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[V]=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);function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}if(!isUnixSocketURL(r)&&isUnixSocketURL(o)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}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&&!P.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[F]){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[D]){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[$]=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[L]=b.default(e,this,Z);this[q]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[V];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,E.default(e));delete t.url;let n;const o=Q.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"]=K?"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[V]!==o.body){this[V]=o.body}const{agent:c,request:l,timeout:d,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 b=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[q]=_;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=C.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 b(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=d;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 h.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[z]){return}const{options:t}=this;const r=this.retryCount+1;this[z]=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:x.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[J]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[F]=true;const e=this[j];if(e&&!this[z]){if(e.readableLength){this[F]=false}let t;while((t=e.read())!==null){this[U]+=t.length;this[B]=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[G].push(write)}}_writeRequest(e,t,r){if(this[q].destroyed){return}this._progressCallbacks.push((()=>{this[M]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[q].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(!(q in this)){e();return}if(this[q].destroyed){e();return}this[q].end((t=>{if(!t){this[I]=this[M];this.emit("uploadProgress",this.uploadProgress);this[q].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[G].push(endRequest)}}_destroy(e,t){var r;this[z]=true;clearTimeout(this[J]);if(q in this){this[$]();if(!((r=this[j])===null||r===void 0?void 0:r.complete)){this[q].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[z]}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[q])===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[q])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[H]){e=this[U]/this[H]}else if(this[H]===this[U]){e=1}else{e=0}return{percent:e,transferred:this[U],total:this[H]}}get uploadProgress(){let e;if(this[I]){e=this[M]/this[I]}else if(this[I]===this[M]){e=1}else{e=0}return{percent:e,transferred:this[M],total:this[I]}}get timings(){var e;return(e=this[q])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[N]}pipe(e,t){if(this[B]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[D].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[D].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:d}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=d(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 h=["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=d(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=d(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 h){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,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(/\s*,\s*/);for(const e of r){const[r,s]=e.split(/\s*=\s*/,2);t[r]=s===undefined?true:s.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 d=["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 d){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 d=Agent.normalizeOrigin(e,t&&t.servername);if(d===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(d in this.queue[i]){this.queue[i][d].listeners.push(...r);this._tryToCreateNewSession(i,d);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][d]===entry){delete this.queue[i][d];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${d}:${i}`;let n=false;try{const h=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});h[a]=0;h[l]=false;const isFree=()=>h[a]{this.tlsSessionCache.set(s,e)}));h.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));h.setTimeout(this.timeout,(()=>{h.destroy()}));h.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(h),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,d)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of h[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(h)}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}}}};h.on("origin",(()=>{h[u]=h.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],h)}));h.once("remoteSettings",(()=>{h.ref();h.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}h.destroy();return}h[u]=h.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,h,compareSessions),0,h)}else{e[i]=[h]}}this._freeSessionsCount+=1;n=true;this.emit("session",h);processListeners();removeFromQueue();if(h[a]===0&&this._freeSessionsCount>this.maxFreeSessions){h.close()}if(r.length!==0){this.getSession(d,t,r);r.length=0}h.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],h)}))}));h[c]=h.request;h.request=(e,t)=>{if(h[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=h[c](e,t);h.ref();++h[a];if(h[a]===h.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--h[a];if(!h.destroyed&&!h.closed){closeSessionIfCovered(this.sessions[i],h);if(isFree()&&!h.closed){if(!p){this._freeSessionsCount++;p=true}const e=h[a]===0;if(e){h.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||h[l])){h.close()}else{closeCoveredSessions(this.sessions[i],h);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][d]=entry;this._tryToCreateNewSession(i,d)}))}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 d=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(d.has(t)){const e=await d.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);d.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()}}d.delete(t);return a}catch(e){d.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:d,ERR_INVALID_PROTOCOL:h,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:b,HTTP2_METHOD_CONNECT:w}=s.constants;const E=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const C=Symbol("flushedHeaders");const P=Symbol("jobs");const T=/^[\^`\-\w!#$%&*+.|~]+$/;const k=/[^\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 d("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new h(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[E]=Object.create(null);this[P]=[];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[E])){this[E].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[E])){this[E][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[E])){this[E][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[C]=false}get method(){return this[E][_]}set method(e){if(e){this[E][_]=e.toUpperCase()}}get path(){return this[E][b]}set path(e){if(e){this[E][b]=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[P].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[P].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[C]||this.destroyed){return}this[C]=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[P]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[E]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[E]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}return this[E][e.toLowerCase()]}get headersSent(){return this[C]}removeHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[E][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!T.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(k.test(t)){throw new g("header content",e)}this[E][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[P].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",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){const r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};const o=["sqlite","postgres","mysql","mongo","redis","tiered"];class Keyv extends s{constructor(e,{emitErrors:t=true,...r}={}){super();this.opts={namespace:"keyv",serialize:n.stringify,deserialize:n.parse,...typeof e==="string"?{uri:e}:e,...r};if(!this.opts.store){const e={...this.opts};this.opts.store=loadStore(e)}if(this.opts.compression){const e=this.opts.compression;const{serialize:t,deserialize:r}=e.opts;this.opts.serialize=t;this.opts.deserialize=r}if(typeof this.opts.store.on==="function"&&t){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace;const generateIterator=e=>async function*(){for await(const[t,r]of typeof e==="function"?e(this.opts.store.namespace):e){const e=this.opts.deserialize(r);if(this.opts.store.namespace&&!t.includes(this.opts.store.namespace)){continue}if(typeof e.expires==="number"&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}};if(typeof this.opts.store[Symbol.iterator]==="function"&&this.opts.store instanceof Map){this.iterator=generateIterator(this.opts.store)}else if(typeof this.opts.store.iterator==="function"&&this.opts.store.opts&&this._checkIterableAdaptar()){this.iterator=generateIterator(this.opts.store.iterator.bind(this.opts.store))}}_checkIterableAdaptar(){return o.includes(this.opts.store.opts.dialect)||o.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:r}=this.opts;const s=Array.isArray(e);const n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&r.getMany===undefined){const e=[];for(const s of n){e.push(Promise.resolve().then((()=>r.get(s))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((e=>{if(e===undefined||e===null){return undefined}if(typeof e.expires==="number"&&Date.now()>e.expires){return this.delete(s).then((()=>undefined))}return t&&t.raw?e:e.value})))}return Promise.allSettled(e).then((e=>{const t=[];for(const r of e){t.push(r.value)}return t}))}return Promise.resolve().then((()=>s?r.getMany(n):r.get(n))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined||r===null){return undefined}if(s){const s=[];for(let n of r){if(typeof n==="string"){n=this.opts.deserialize(n)}if(n===undefined||n===null){s.push(undefined);continue}if(typeof n.expires==="number"&&Date.now()>n.expires){this.delete(e).then((()=>undefined));s.push(undefined)}else{s.push(t&&t.raw?n:n.value)}}return s}if(typeof r.expires==="number"&&Date.now()>r.expires){return this.delete(e).then((()=>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;if(typeof t==="symbol"){this.emit("error","symbol cannot be serialized")}t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const r=this._getKeyPrefixArray(e);if(t.deleteMany===undefined){const e=[];for(const s of r){e.push(t.delete(s))}return Promise.allSettled(e).then((e=>e.every((e=>e.value===true))))}return Promise.resolve().then((()=>t.deleteMany(r)))}const r=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(r)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((async()=>{if(typeof r.has==="function"){return r.has(t)}const e=await r.get(t);return e!==undefined}))}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect==="function"){return e.disconnect()}}}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}},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 d=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 h=[...d];if(u){h.push("base64")}if(h.length!==0||l&&l!==t){h.unshift(l)}return`data:${h.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},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 d.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 d=_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 d=e.node||o;let h=e.clockseq!==undefined?e.clockseq:i;if(d==null||h==null){const t=e.random||(e.rng||s.default)();if(d==null){d=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(h==null){h=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){h=h+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=h;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++]=h>>>8|128;l[u++]=h&255;for(let e=0;e<6;++e){l[u+e]=d[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=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")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const{setOutput:e}=__nccwpck_require__(2186);const t=__nccwpck_require__(2021);const{getInputParams:r,reportError:s,validateLeankitUrl:n}=__nccwpck_require__(2904);(async()=>{const[s,o,i,a,c,u,l,d,h]=r({required:["host","apiToken","boardId","title"],optional:["laneId","typeId","customId","externalLink","linkLabel"]});n("host",s);const{createCard:p}=t(s,o);const m={boardId:i,title:a};if(c){m.laneId=c}if(u){m.typeId=u}if(l){m.customId=l}if(d){m.externalLink={url:d,label:h||"Link to Github"}}const y=await p(m);e("createdCardId",y)})().catch((e=>{s("createCard",e)}))})();module.exports=r})(); \ No newline at end of file diff --git a/extractCardId/action.yml b/extractCardId/action.yml index b067aaa..369dfbc 100644 --- a/extractCardId/action.yml +++ b/extractCardId/action.yml @@ -5,6 +5,8 @@ inputs: description: "Text string containing a numeric value" required: true outputs: + error: + description: Status message for errors cardId: description: Numeric Card Id identified runs: diff --git a/extractCardId/dist/index.js b/extractCardId/dist/index.js index d506783..ec0c3e3 100644 --- a/extractCardId/dist/index.js +++ b/extractCardId/dist/index.js @@ -1 +1 @@ -(()=>{var e={904:(e,t,r)=>{"use strict";const{getInput:n,getBooleanInput:o,setFailed:i,setOutput:s,exportVariable:a}=r(186);e.exports={setOutput:s,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const i=[];for(const t of e){const e=r.includes(t)?o:n;i.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?o:n;i.push(t(e))}return i},reportError(e,t){const r=`${e}; ${t.message}`;s("error",r);a("LK_ERROR_MESSAGE",r);i(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},351:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=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))n(t,e,r);o(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const s=i(r(37));const a=r(278);function issueCommand(e,t,r){const n=new Command(e,t,r);process.stdout.write(n.toString()+s.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const u="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=u+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 n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(n)}`}}}}e+=`${u}${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")}},186:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=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))n(t,e,r);o(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.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(351);const u=r(717);const c=r(278);const l=i(r(37));const d=i(r(17));const f=r(41);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=c.toCommandValue(t);process.env[e]=r;const n=process.env["GITHUB_ENV"]||"";if(n){return u.issueFileCommand("ENV",u.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){u.issueFileCommand("PATH",e)}else{a.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${d.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 n=["false","False","FALSE"];const o=getInput(e,t);if(r.includes(o))return true;if(n.includes(o))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 u.issueFileCommand("OUTPUT",u.prepareKeyValueMessage(e,t))}process.stdout.write(l.EOL);a.issueCommand("set-output",{name:e},c.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",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){a.issueCommand("warning",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){a.issueCommand("notice",c.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 s(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 u.issueFileCommand("STATE",u.prepareKeyValueMessage(e,t))}a.issueCommand("save-state",{name:e},c.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return s(this,void 0,void 0,(function*(){return yield f.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var h=r(327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return h.summary}});var m=r(327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return m.markdownSummary}});var v=r(981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return v.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return v.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return v.toPlatformPath}})},717:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=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))n(t,e,r);o(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const s=i(r(147));const a=i(r(37));const u=r(840);const c=r(278);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(!s.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}s.appendFileSync(r,`${c.toCommandValue(t)}${a.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const r=`ghadelimiter_${u.v4()}`;const n=c.toCommandValue(t);if(e.includes(r)){throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`)}if(n.includes(r)){throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`)}return`${e}<<${r}${a.EOL}${n}${a.EOL}${r}`}t.prepareKeyValueMessage=prepareKeyValueMessage},41:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const o=r(255);const i=r(526);const s=r(186);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new o.HttpClient("actions/oidc-client",[new i.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 n(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const n=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.result.message}`)}));const o=(t=n.result)===null||t===void 0?void 0:t.value;if(!o){throw new Error("Response json body do not have ID Token field")}return o}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}s.debug(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);s.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},981:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=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))n(t,e,r);o(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const s=i(r(17));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,s.sep)}t.toPlatformPath=toPlatformPath},327:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.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 o=r(37);const i=r(147);const{access:s,appendFile:a,writeFile:u}=i.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 n(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 s(e,i.constants.R_OK|i.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 n=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${n}>`}return`<${e}${n}>${t}`}write(e){return n(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const r=yield this.filePath();const n=t?u:a;yield n(r,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return n(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(o.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t});const n=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(n).addEOL()}addList(e,t=false){const r=t?"ol":"ul";const n=e.map((e=>this.wrap("li",e))).join("");const o=this.wrap(r,n);return this.addRaw(o).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:n,rowspan:o}=e;const i=t?"th":"td";const s=Object.assign(Object.assign({},n&&{colspan:n}),o&&{rowspan:o});return this.wrap(i,r,s)})).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:n,height:o}=r||{};const i=Object.assign(Object.assign({},n&&{width:n}),o&&{height:o});const s=this.wrap("img",null,Object.assign({src:e,alt:t},i));return this.addRaw(s).addEOL()}addHeading(e,t){const r=`h${t}`;const n=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1";const o=this.wrap(n,e);return this.addRaw(o).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 n=this.wrap("blockquote",e,r);return this.addRaw(n).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}}const c=new Summary;t.markdownSummary=c;t.summary=c},278:(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},526:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.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},255:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=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))n(t,e,r);o(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.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=i(r(685));const u=i(r(687));const c=i(r(835));const l=i(r(294));var d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var f;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(f=t.Headers||(t.Headers={}));var p;(function(e){e["ApplicationJson"]="application/json"})(p=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=c.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const m=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const v=["OPTIONS","GET","DELETE","HEAD"];const g=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 s(this,void 0,void 0,(function*(){return new Promise((e=>s(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 s(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return s(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return s(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,r){return s(this,void 0,void 0,(function*(){return this.request("POST",e,t,r||{})}))}patch(e,t,r){return s(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,r||{})}))}put(e,t,r){return s(this,void 0,void 0,(function*(){return this.request("PUT",e,t,r||{})}))}head(e,t){return s(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,r,n){return s(this,void 0,void 0,(function*(){return this.request(e,t,r,n)}))}getJson(e,t={}){return s(this,void 0,void 0,(function*(){t[f.Accept]=this._getExistingOrDefaultHeader(t,f.Accept,p.ApplicationJson);const r=yield this.get(e,t);return this._processResponse(r,this.requestOptions)}))}postJson(e,t,r={}){return s(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[f.Accept]=this._getExistingOrDefaultHeader(r,f.Accept,p.ApplicationJson);r[f.ContentType]=this._getExistingOrDefaultHeader(r,f.ContentType,p.ApplicationJson);const o=yield this.post(e,n,r);return this._processResponse(o,this.requestOptions)}))}putJson(e,t,r={}){return s(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[f.Accept]=this._getExistingOrDefaultHeader(r,f.Accept,p.ApplicationJson);r[f.ContentType]=this._getExistingOrDefaultHeader(r,f.ContentType,p.ApplicationJson);const o=yield this.put(e,n,r);return this._processResponse(o,this.requestOptions)}))}patchJson(e,t,r={}){return s(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[f.Accept]=this._getExistingOrDefaultHeader(r,f.Accept,p.ApplicationJson);r[f.ContentType]=this._getExistingOrDefaultHeader(r,f.ContentType,p.ApplicationJson);const o=yield this.patch(e,n,r);return this._processResponse(o,this.requestOptions)}))}request(e,t,r,n){return s(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const o=new URL(t);let i=this._prepareRequest(e,o,n);const s=this._allowRetries&&v.includes(e)?this._maxRetries+1:1;let a=0;let u;do{u=yield this.requestRaw(i,r);if(u&&u.message&&u.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(u)){e=t;break}}if(e){return e.handleAuthentication(this,i,r)}else{return u}}let t=this._maxRedirects;while(u.message.statusCode&&h.includes(u.message.statusCode)&&this._allowRedirects&&t>0){const s=u.message.headers["location"];if(!s){break}const a=new URL(s);if(o.protocol==="https:"&&o.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 u.readBody();if(a.hostname!==o.hostname){for(const e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}i=this._prepareRequest(e,a,n);u=yield this.requestRaw(i,r);t--}if(!u.message.statusCode||!m.includes(u.message.statusCode)){return u}a+=1;if(a{function callbackForResult(e,t){if(e){n(e)}else if(!t){n(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 n=false;function handleResult(e,t){if(!n){n=true;r(e,t)}}const o=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let i;o.on("socket",(e=>{i=e}));o.setTimeout(this._socketTimeout||3*6e4,(()=>{if(i){i.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));o.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){o.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){o.end()}));t.pipe(o)}else{o.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const o=n.parsedUrl.protocol==="https:";n.httpModule=o?u:a;const i=o?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(n.options)}}return n}_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 n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||r}_getAgent(e){let t;const r=c.getProxyUrl(e);const n=r&&r.hostname;if(this._keepAlive&&n){t=this._proxyAgent}if(this._keepAlive&&!n){t=this._agent}if(t){return t}const o=e.protocol==="https:";let i=100;if(this.requestOptions){i=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(r&&r.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`}),{host:r.hostname,port:r.port})};let n;const s=r.protocol==="https:";if(o){n=s?l.httpsOverHttps:l.httpsOverHttp}else{n=s?l.httpOverHttps:l.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=o?new u.Agent(e):new a.Agent(e);this._agent=t}if(!t){t=o?u.globalAgent:a.globalAgent}if(o&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return s(this,void 0,void 0,(function*(){e=Math.min(g,e);const t=_*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return s(this,void 0,void 0,(function*(){return new Promise(((r,n)=>s(this,void 0,void 0,(function*(){const o=e.message.statusCode||0;const i={statusCode:o,result:null,headers:{}};if(o===d.NotFound){r(i)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let s;let a;try{a=yield e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){s=JSON.parse(a,dateTimeDeserializer)}else{s=JSON.parse(a)}i.result=s}i.headers=e.message.headers}catch(e){}if(o>299){let e;if(s&&s.message){e=s.message}else if(a&&a.length>0){e=a}else{e=`Failed request: (${o})`}const t=new HttpClientError(e,o);t.result=i.result;n(t)}else{r(i)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})},835:(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 n=[e.hostname.toUpperCase()];if(typeof r==="number"){n.push(`${n[0]}:${r}`)}for(const e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(n.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},294:(e,t,r)=>{e.exports=r(219)},219:(e,t,r)=>{"use strict";var n=r(808);var o=r(404);var i=r(685);var s=r(687);var a=r(361);var u=r(491);var c=r(837);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=i.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=i.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=s.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=s.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||i.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,n,o){var i=toOptions(r,n,o);for(var s=0,a=t.requests.length;s=this.maxSockets){o.requests.push(i);return}o.createSocket(i,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){o.emit("free",t,i)}function onCloseOrRemove(e){o.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 n={};r.sockets.push(n);var o=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){o.localAddress=e.localAddress}if(o.proxyAuth){o.headers=o.headers||{};o.headers["Proxy-Authorization"]="Basic "+new Buffer(o.proxyAuth).toString("base64")}l("making CONNECT request");var i=r.request(o);i.useChunkedEncodingByDefault=false;i.once("response",onResponse);i.once("upgrade",onUpgrade);i.once("connect",onConnect);i.once("error",onError);i.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(o,s,a){i.removeAllListeners();s.removeAllListeners();if(o.statusCode!==200){l("tunneling socket could not be established, statusCode=%d",o.statusCode);s.destroy();var u=new Error("tunneling socket could not be established, "+"statusCode="+o.statusCode);u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}if(a.length>0){l("got illegal response body from proxy");s.destroy();var u=new Error("got illegal response body from proxy");u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}l("tunneling connection has established");r.sockets[r.sockets.indexOf(n)]=s;return t(s)}function onError(t){i.removeAllListeners();l("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var o=new Error("tunneling socket could not be established, "+"cause="+t.message);o.code="ECONNRESET";e.request.emit("error",o);r.removeSocket(n)}};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(n){var i=e.request.getHeader("host");var s=mergeOptions({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):e.host});var a=o.connect(0,s);r.sockets[r.sockets.indexOf(n)]=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 n.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return a.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return d.default}});var n=_interopRequireDefault(r(628));var o=_interopRequireDefault(r(409));var i=_interopRequireDefault(r(122));var s=_interopRequireDefault(r(120));var a=_interopRequireDefault(r(332));var u=_interopRequireDefault(r(595));var c=_interopRequireDefault(r(900));var l=_interopRequireDefault(r(950));var d=_interopRequireDefault(r(746));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(113));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 n.default.createHash("md5").update(e).digest()}var o=md5;t["default"]=o},332:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r="00000000-0000-0000-0000-000000000000";t["default"]=r},746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,n.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 o=parse;t["default"]=o},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 n=_interopRequireDefault(r(113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=new Uint8Array(256);let i=o.length;function rng(){if(i>o.length-16){n.default.randomFillSync(o);i=0}return o.slice(i,i+=16)}},274:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(113));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 n.default.createHash("sha1").update(e).digest()}var o=sha1;t["default"]=o},950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=[];for(let e=0;e<256;++e){o.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const r=(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase();if(!(0,n.default)(r)){throw TypeError("Stringified UUID is invalid")}return r}var i=stringify;t["default"]=i},628:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(807));var o=_interopRequireDefault(r(950));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let i;let s;let a=0;let u=0;function v1(e,t,r){let c=t&&r||0;const l=t||new Array(16);e=e||{};let d=e.node||i;let f=e.clockseq!==undefined?e.clockseq:s;if(d==null||f==null){const t=e.random||(e.rng||n.default)();if(d==null){d=i=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(f==null){f=s=(t[6]<<8|t[7])&16383}}let p=e.msecs!==undefined?e.msecs:Date.now();let h=e.nsecs!==undefined?e.nsecs:u+1;const m=p-a+(h-u)/1e4;if(m<0&&e.clockseq===undefined){f=f+1&16383}if((m<0||p>a)&&e.nsecs===undefined){h=0}if(h>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}a=p;u=h;s=f;p+=122192928e5;const v=((p&268435455)*1e4+h)%4294967296;l[c++]=v>>>24&255;l[c++]=v>>>16&255;l[c++]=v>>>8&255;l[c++]=v&255;const g=p/4294967296*1e4&268435455;l[c++]=g>>>8&255;l[c++]=g&255;l[c++]=g>>>24&15|16;l[c++]=g>>>16&255;l[c++]=f>>>8|128;l[c++]=f&255;for(let e=0;e<6;++e){l[c+e]=d[e]}return t||(0,o.default)(l)}var c=v1;t["default"]=c},409:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(998));var o=_interopRequireDefault(r(569));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=(0,n.default)("v3",48,o.default);var s=i;t["default"]=s},998:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var n=_interopRequireDefault(r(950));var o=_interopRequireDefault(r(746));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 n=_interopRequireDefault(r(807));var o=_interopRequireDefault(r(950));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,r){e=e||{};const i=e.random||(e.rng||n.default)();i[6]=i[6]&15|64;i[8]=i[8]&63|128;if(t){r=r||0;for(let e=0;e<16;++e){t[r+e]=i[e]}return t}return(0,o.default)(i)}var i=v4;t["default"]=i},120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(998));var o=_interopRequireDefault(r(274));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=(0,n.default)("v5",80,o.default);var s=i;t["default"]=s},900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(814));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&n.default.test(e)}var o=validate;t["default"]=o},595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,n.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var o=version;t["default"]=o},491:e=>{"use strict";e.exports=require("assert")},113:e=>{"use strict";e.exports=require("crypto")},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},685:e=>{"use strict";e.exports=require("http")},687:e=>{"use strict";e.exports=require("https")},808:e=>{"use strict";e.exports=require("net")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},404:e=>{"use strict";e.exports=require("tls")},837:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var o=t[r]={exports:{}};var i=true;try{e[r].call(o.exports,o,o.exports,__nccwpck_require__);i=false}finally{if(i)delete t[r]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const{getInputParams:e,setOutput:t,reportError:r}=__nccwpck_require__(904);(async()=>{const[r]=e({required:["inputText"]});const n=r.match(/\((?:[A-z]+:?)? ?([0-9]*)\)/);if(n){t("cardId",n[1])}})().catch((e=>{r("extractCardId",e.message)}))})();module.exports=r})(); \ No newline at end of file +(()=>{var e={904:(e,t,r)=>{"use strict";const{getInput:n,getBooleanInput:o,setFailed:i,setOutput:s,exportVariable:a}=r(186);e.exports={setOutput:s,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const i=[];for(const t of e){const e=r.includes(t)?o:n;i.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?o:n;i.push(t(e))}return i},reportError(e,t){const r=`${e}; ${t.message}`;s("error",r);a("LK_ERROR_MESSAGE",r);i(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},351:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=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))n(t,e,r);o(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const s=i(r(37));const a=r(278);function issueCommand(e,t,r){const n=new Command(e,t,r);process.stdout.write(n.toString()+s.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const u="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=u+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 n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(n)}`}}}}e+=`${u}${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")}},186:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=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))n(t,e,r);o(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.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(351);const u=r(717);const c=r(278);const l=i(r(37));const d=i(r(17));const f=r(41);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=c.toCommandValue(t);process.env[e]=r;const n=process.env["GITHUB_ENV"]||"";if(n){return u.issueFileCommand("ENV",u.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){u.issueFileCommand("PATH",e)}else{a.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${d.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 n=["false","False","FALSE"];const o=getInput(e,t);if(r.includes(o))return true;if(n.includes(o))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 u.issueFileCommand("OUTPUT",u.prepareKeyValueMessage(e,t))}process.stdout.write(l.EOL);a.issueCommand("set-output",{name:e},c.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",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){a.issueCommand("warning",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){a.issueCommand("notice",c.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 s(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 u.issueFileCommand("STATE",u.prepareKeyValueMessage(e,t))}a.issueCommand("save-state",{name:e},c.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return s(this,void 0,void 0,(function*(){return yield f.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var h=r(327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return h.summary}});var m=r(327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return m.markdownSummary}});var v=r(981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return v.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return v.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return v.toPlatformPath}})},717:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=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))n(t,e,r);o(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const s=i(r(147));const a=i(r(37));const u=r(840);const c=r(278);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(!s.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}s.appendFileSync(r,`${c.toCommandValue(t)}${a.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const r=`ghadelimiter_${u.v4()}`;const n=c.toCommandValue(t);if(e.includes(r)){throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`)}if(n.includes(r)){throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`)}return`${e}<<${r}${a.EOL}${n}${a.EOL}${r}`}t.prepareKeyValueMessage=prepareKeyValueMessage},41:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const o=r(255);const i=r(526);const s=r(186);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new o.HttpClient("actions/oidc-client",[new i.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 n(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const n=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.result.message}`)}));const o=(t=n.result)===null||t===void 0?void 0:t.value;if(!o){throw new Error("Response json body do not have ID Token field")}return o}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}s.debug(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);s.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},981:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=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))n(t,e,r);o(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const s=i(r(17));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,s.sep)}t.toPlatformPath=toPlatformPath},327:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.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 o=r(37);const i=r(147);const{access:s,appendFile:a,writeFile:u}=i.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 n(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 s(e,i.constants.R_OK|i.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 n=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${n}>`}return`<${e}${n}>${t}`}write(e){return n(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const r=yield this.filePath();const n=t?u:a;yield n(r,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return n(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(o.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t});const n=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(n).addEOL()}addList(e,t=false){const r=t?"ol":"ul";const n=e.map((e=>this.wrap("li",e))).join("");const o=this.wrap(r,n);return this.addRaw(o).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:n,rowspan:o}=e;const i=t?"th":"td";const s=Object.assign(Object.assign({},n&&{colspan:n}),o&&{rowspan:o});return this.wrap(i,r,s)})).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:n,height:o}=r||{};const i=Object.assign(Object.assign({},n&&{width:n}),o&&{height:o});const s=this.wrap("img",null,Object.assign({src:e,alt:t},i));return this.addRaw(s).addEOL()}addHeading(e,t){const r=`h${t}`;const n=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1";const o=this.wrap(n,e);return this.addRaw(o).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 n=this.wrap("blockquote",e,r);return this.addRaw(n).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}}const c=new Summary;t.markdownSummary=c;t.summary=c},278:(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},526:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.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},255:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=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))n(t,e,r);o(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){o(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.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=i(r(685));const u=i(r(687));const c=i(r(835));const l=i(r(294));var d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var f;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(f=t.Headers||(t.Headers={}));var p;(function(e){e["ApplicationJson"]="application/json"})(p=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=c.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const m=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const v=["OPTIONS","GET","DELETE","HEAD"];const g=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 s(this,void 0,void 0,(function*(){return new Promise((e=>s(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 s(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return s(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return s(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,r){return s(this,void 0,void 0,(function*(){return this.request("POST",e,t,r||{})}))}patch(e,t,r){return s(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,r||{})}))}put(e,t,r){return s(this,void 0,void 0,(function*(){return this.request("PUT",e,t,r||{})}))}head(e,t){return s(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,r,n){return s(this,void 0,void 0,(function*(){return this.request(e,t,r,n)}))}getJson(e,t={}){return s(this,void 0,void 0,(function*(){t[f.Accept]=this._getExistingOrDefaultHeader(t,f.Accept,p.ApplicationJson);const r=yield this.get(e,t);return this._processResponse(r,this.requestOptions)}))}postJson(e,t,r={}){return s(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[f.Accept]=this._getExistingOrDefaultHeader(r,f.Accept,p.ApplicationJson);r[f.ContentType]=this._getExistingOrDefaultHeader(r,f.ContentType,p.ApplicationJson);const o=yield this.post(e,n,r);return this._processResponse(o,this.requestOptions)}))}putJson(e,t,r={}){return s(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[f.Accept]=this._getExistingOrDefaultHeader(r,f.Accept,p.ApplicationJson);r[f.ContentType]=this._getExistingOrDefaultHeader(r,f.ContentType,p.ApplicationJson);const o=yield this.put(e,n,r);return this._processResponse(o,this.requestOptions)}))}patchJson(e,t,r={}){return s(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[f.Accept]=this._getExistingOrDefaultHeader(r,f.Accept,p.ApplicationJson);r[f.ContentType]=this._getExistingOrDefaultHeader(r,f.ContentType,p.ApplicationJson);const o=yield this.patch(e,n,r);return this._processResponse(o,this.requestOptions)}))}request(e,t,r,n){return s(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const o=new URL(t);let i=this._prepareRequest(e,o,n);const s=this._allowRetries&&v.includes(e)?this._maxRetries+1:1;let a=0;let u;do{u=yield this.requestRaw(i,r);if(u&&u.message&&u.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(u)){e=t;break}}if(e){return e.handleAuthentication(this,i,r)}else{return u}}let t=this._maxRedirects;while(u.message.statusCode&&h.includes(u.message.statusCode)&&this._allowRedirects&&t>0){const s=u.message.headers["location"];if(!s){break}const a=new URL(s);if(o.protocol==="https:"&&o.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 u.readBody();if(a.hostname!==o.hostname){for(const e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}i=this._prepareRequest(e,a,n);u=yield this.requestRaw(i,r);t--}if(!u.message.statusCode||!m.includes(u.message.statusCode)){return u}a+=1;if(a{function callbackForResult(e,t){if(e){n(e)}else if(!t){n(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 n=false;function handleResult(e,t){if(!n){n=true;r(e,t)}}const o=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let i;o.on("socket",(e=>{i=e}));o.setTimeout(this._socketTimeout||3*6e4,(()=>{if(i){i.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));o.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){o.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){o.end()}));t.pipe(o)}else{o.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const o=n.parsedUrl.protocol==="https:";n.httpModule=o?u:a;const i=o?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(n.options)}}return n}_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 n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||r}_getAgent(e){let t;const r=c.getProxyUrl(e);const n=r&&r.hostname;if(this._keepAlive&&n){t=this._proxyAgent}if(this._keepAlive&&!n){t=this._agent}if(t){return t}const o=e.protocol==="https:";let i=100;if(this.requestOptions){i=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(r&&r.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`}),{host:r.hostname,port:r.port})};let n;const s=r.protocol==="https:";if(o){n=s?l.httpsOverHttps:l.httpsOverHttp}else{n=s?l.httpOverHttps:l.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=o?new u.Agent(e):new a.Agent(e);this._agent=t}if(!t){t=o?u.globalAgent:a.globalAgent}if(o&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return s(this,void 0,void 0,(function*(){e=Math.min(g,e);const t=_*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return s(this,void 0,void 0,(function*(){return new Promise(((r,n)=>s(this,void 0,void 0,(function*(){const o=e.message.statusCode||0;const i={statusCode:o,result:null,headers:{}};if(o===d.NotFound){r(i)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let s;let a;try{a=yield e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){s=JSON.parse(a,dateTimeDeserializer)}else{s=JSON.parse(a)}i.result=s}i.headers=e.message.headers}catch(e){}if(o>299){let e;if(s&&s.message){e=s.message}else if(a&&a.length>0){e=a}else{e=`Failed request: (${o})`}const t=new HttpClientError(e,o);t.result=i.result;n(t)}else{r(i)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})},835:(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 n=[e.hostname.toUpperCase()];if(typeof r==="number"){n.push(`${n[0]}:${r}`)}for(const e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(n.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},294:(e,t,r)=>{e.exports=r(219)},219:(e,t,r)=>{"use strict";var n=r(808);var o=r(404);var i=r(685);var s=r(687);var a=r(361);var u=r(491);var c=r(837);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=i.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=i.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=s.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=s.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||i.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,n,o){var i=toOptions(r,n,o);for(var s=0,a=t.requests.length;s=this.maxSockets){o.requests.push(i);return}o.createSocket(i,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){o.emit("free",t,i)}function onCloseOrRemove(e){o.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 n={};r.sockets.push(n);var o=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){o.localAddress=e.localAddress}if(o.proxyAuth){o.headers=o.headers||{};o.headers["Proxy-Authorization"]="Basic "+new Buffer(o.proxyAuth).toString("base64")}l("making CONNECT request");var i=r.request(o);i.useChunkedEncodingByDefault=false;i.once("response",onResponse);i.once("upgrade",onUpgrade);i.once("connect",onConnect);i.once("error",onError);i.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(o,s,a){i.removeAllListeners();s.removeAllListeners();if(o.statusCode!==200){l("tunneling socket could not be established, statusCode=%d",o.statusCode);s.destroy();var u=new Error("tunneling socket could not be established, "+"statusCode="+o.statusCode);u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}if(a.length>0){l("got illegal response body from proxy");s.destroy();var u=new Error("got illegal response body from proxy");u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}l("tunneling connection has established");r.sockets[r.sockets.indexOf(n)]=s;return t(s)}function onError(t){i.removeAllListeners();l("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var o=new Error("tunneling socket could not be established, "+"cause="+t.message);o.code="ECONNRESET";e.request.emit("error",o);r.removeSocket(n)}};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(n){var i=e.request.getHeader("host");var s=mergeOptions({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):e.host});var a=o.connect(0,s);r.sockets[r.sockets.indexOf(n)]=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 n.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return a.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return d.default}});var n=_interopRequireDefault(r(628));var o=_interopRequireDefault(r(409));var i=_interopRequireDefault(r(122));var s=_interopRequireDefault(r(120));var a=_interopRequireDefault(r(332));var u=_interopRequireDefault(r(595));var c=_interopRequireDefault(r(900));var l=_interopRequireDefault(r(950));var d=_interopRequireDefault(r(746));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(113));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 n.default.createHash("md5").update(e).digest()}var o=md5;t["default"]=o},332:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r="00000000-0000-0000-0000-000000000000";t["default"]=r},746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,n.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 o=parse;t["default"]=o},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 n=_interopRequireDefault(r(113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=new Uint8Array(256);let i=o.length;function rng(){if(i>o.length-16){n.default.randomFillSync(o);i=0}return o.slice(i,i+=16)}},274:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(113));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 n.default.createHash("sha1").update(e).digest()}var o=sha1;t["default"]=o},950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=[];for(let e=0;e<256;++e){o.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const r=(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase();if(!(0,n.default)(r)){throw TypeError("Stringified UUID is invalid")}return r}var i=stringify;t["default"]=i},628:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(807));var o=_interopRequireDefault(r(950));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let i;let s;let a=0;let u=0;function v1(e,t,r){let c=t&&r||0;const l=t||new Array(16);e=e||{};let d=e.node||i;let f=e.clockseq!==undefined?e.clockseq:s;if(d==null||f==null){const t=e.random||(e.rng||n.default)();if(d==null){d=i=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(f==null){f=s=(t[6]<<8|t[7])&16383}}let p=e.msecs!==undefined?e.msecs:Date.now();let h=e.nsecs!==undefined?e.nsecs:u+1;const m=p-a+(h-u)/1e4;if(m<0&&e.clockseq===undefined){f=f+1&16383}if((m<0||p>a)&&e.nsecs===undefined){h=0}if(h>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}a=p;u=h;s=f;p+=122192928e5;const v=((p&268435455)*1e4+h)%4294967296;l[c++]=v>>>24&255;l[c++]=v>>>16&255;l[c++]=v>>>8&255;l[c++]=v&255;const g=p/4294967296*1e4&268435455;l[c++]=g>>>8&255;l[c++]=g&255;l[c++]=g>>>24&15|16;l[c++]=g>>>16&255;l[c++]=f>>>8|128;l[c++]=f&255;for(let e=0;e<6;++e){l[c+e]=d[e]}return t||(0,o.default)(l)}var c=v1;t["default"]=c},409:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(998));var o=_interopRequireDefault(r(569));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=(0,n.default)("v3",48,o.default);var s=i;t["default"]=s},998:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var n=_interopRequireDefault(r(950));var o=_interopRequireDefault(r(746));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 n=_interopRequireDefault(r(807));var o=_interopRequireDefault(r(950));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,r){e=e||{};const i=e.random||(e.rng||n.default)();i[6]=i[6]&15|64;i[8]=i[8]&63|128;if(t){r=r||0;for(let e=0;e<16;++e){t[r+e]=i[e]}return t}return(0,o.default)(i)}var i=v4;t["default"]=i},120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(998));var o=_interopRequireDefault(r(274));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=(0,n.default)("v5",80,o.default);var s=i;t["default"]=s},900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(814));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&n.default.test(e)}var o=validate;t["default"]=o},595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,n.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var o=version;t["default"]=o},491:e=>{"use strict";e.exports=require("assert")},113:e=>{"use strict";e.exports=require("crypto")},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},685:e=>{"use strict";e.exports=require("http")},687:e=>{"use strict";e.exports=require("https")},808:e=>{"use strict";e.exports=require("net")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},404:e=>{"use strict";e.exports=require("tls")},837:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var o=t[r]={exports:{}};var i=true;try{e[r].call(o.exports,o,o.exports,__nccwpck_require__);i=false}finally{if(i)delete t[r]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const{getInputParams:e,setOutput:t,reportError:r}=__nccwpck_require__(904);(async()=>{const[r]=e({required:["inputText"]});const n=r.match(/\((?:[A-z]+:?)? ?([0-9]*)\)/);if(n){t("cardId",n[1])}})().catch((e=>{r("extractCardId",e)}))})();module.exports=r})(); \ No newline at end of file diff --git a/extractCardId/index.js b/extractCardId/index.js index 706b9a2..26ead42 100644 --- a/extractCardId/index.js +++ b/extractCardId/index.js @@ -12,5 +12,5 @@ const { getInputParams, setOutput, reportError } = require( "../leankit/helpers" setOutput( "cardId", matches[ 1 ] ); } } )().catch( ex => { - reportError( "extractCardId", ex.message ); + reportError( "extractCardId", ex ); } ); diff --git a/extractCardId/index.spec.js b/extractCardId/index.spec.js index d3eda20..b9cf5b1 100644 --- a/extractCardId/index.spec.js +++ b/extractCardId/index.spec.js @@ -27,8 +27,9 @@ describe( "extractCardId", () => { describe( "validation", () => { describe( "when validation fails", () => { + const error = new Error( "Input required and not supplied: SOME PARAM" ); beforeEach( async () => { - getInputParams.throws( new Error( "Input required and not supplied: SOME PARAM" ) ); + getInputParams.throws( error ); await action(); } ); @@ -41,7 +42,7 @@ describe( "extractCardId", () => { } ); it( "should report error", async () => { - reportError.should.be.calledOnce.and.calledWith( "extractCardId", "Input required and not supplied: SOME PARAM" ); + reportError.should.be.calledOnce.and.calledWith( "extractCardId", error ); } ); } ); } ); diff --git a/initiateBoardEvent/action.yml b/initiateBoardEvent/action.yml new file mode 100644 index 0000000..e5cb4df --- /dev/null +++ b/initiateBoardEvent/action.yml @@ -0,0 +1,21 @@ +name: "Initiate external automation event on Board" +description: "Initiate external automation event on an AgilePlace Board" +inputs: + host: + description: AgilePlace Url (https://mycompany.leankit.com) + required: true + apiToken: + description: Api token with write access to your AgilePlace board + required: true + boardId: + description: Board Id to initiate the event on + required: true + eventName: + description: Name of the event to initiate + required: true +outputs: + error: + description: Status message for errors +runs: + using: "node20" + main: "dist/index.js" diff --git a/initiateBoardEvent/dist/index.js b/initiateBoardEvent/dist/index.js new file mode 100644 index 0000000..347a210 --- /dev/null +++ b/initiateBoardEvent/dist/index.js @@ -0,0 +1 @@ +(()=>{var e={2021:(e,t,r)=>{"use strict";const s=r(3061);e.exports=(e,t)=>{const r=`Bearer ${t}`;const n=e.endsWith("/")?e.substr(0,e.lastIndexOf("/")):e;const o={getCard:e=>s(`${n}/io/card/${e}`,{method:"GET",headers:{Authorization:r}}).json(),blockCard:(e,t,o)=>s(`${n}/io/card/${e}`,{method:"PATCH",json:[{op:"replace",path:"/blockReason",value:o},{op:"replace",path:"/isBlocked",value:t}],headers:{Authorization:r}}).json(),moveCard:(e,t,o)=>s(`${n}/io/card/move`,{method:"POST",json:{cardIds:[e],destination:{laneId:t},wipOverrideComment:o},headers:{Authorization:r}}).json(),assignUsers:(e,t,o,i)=>{const a={cardIds:e};if(t&&t.length){a.userIdsToAssign=t}if(o&&o.length){a.userIdsToUnassign=o}if(i){a.wipOverrideComment=i}return s(`${n}/io/card/assign`,{method:"POST",json:a,headers:{Authorization:r}}).json()},addComment:(e,t)=>s(`${n}/io/card/${e}/comment`,{method:"POST",json:{text:t},headers:{Authorization:r}}).json(),createCard:async e=>{const{id:t}=await s(`${n}/io/card`,{method:"POST",json:e,headers:{Authorization:r}}).json();return t},initiateCardEvent:(e,t)=>s(`${n}/io/card/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),initiateBoardEvent:(e,t)=>s(`${n}/io/board/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),async verifyCardPosition(e,t){const r=await o.getCard(e);return r.lane.id===t}};return o}},2904:(e,t,r)=>{"use strict";const{getInput:s,getBooleanInput:n,setFailed:o,setOutput:i,exportVariable:a}=r(2186);e.exports={setOutput:i,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const o=[];for(const t of e){const e=r.includes(t)?n:s;o.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?n:s;o.push(t(e))}return o},reportError(e,t){const r=`${e}; ${t.message}`;i("error",r);a("LK_ERROR_MESSAGE",r);o(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},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 d=o(r(1017));const h=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}${d.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 h.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.result.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 d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var h;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(h=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=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const y=[d.BadGateway,d.ServiceUnavailable,d.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[h.Accept]=this._getExistingOrDefaultHeader(t,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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===d.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===d.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","Blob","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.blob=e=>isObjectOfType("Blob")(e);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=>{var t,r;return is.iterable(e)&&is.function_((t=e)===null||t===void 0?void 0:t.next)&&is.function_((r=e)===null||r===void 0?void 0:r.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.enumCase=(e,t)=>Object.values(t).includes(e);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;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.nonEmptyString=e=>is.string(e)&&e.length>0;is.nonEmptyStringAndNotWhitespace=e=>is.string(e)&&!is.emptyStringOrWhitespace(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),blob:e=>assertType(is.blob(e),"Blob",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),enumCase:(e,t)=>assertType(is.enumCase(e,t),"EnumCase",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),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>assertType(is.nonEmptyStringAndNotWhitespace(e),"non-empty string and not 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 d=Symbol("cacheableLookupInstance");const h=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[h]=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[h];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[d]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[d]}}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 d=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new d({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let d;if(typeof t==="string"){d=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){d=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";d=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(d)};t.headers=u(t.headers);const h=new s;const p=o(n.format(d),{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){h.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}h.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);h.emit("request",r)}catch(e){h.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;h.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>h.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);h.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}h.emit("error",new CacheableRequest.CacheError(e))}})();return h}}}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 d=r(3021);const h=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 h.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}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)}));d.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 d=r(2286);const h=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 b=r(3021);const w=r(2454);const E=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const P=r(4993);const C=r(9298);const T=r(397);const k=r(1048);const x=r(3462);let A;const q=Symbol("request");const j=Symbol("response");const H=Symbol("responseSize");const U=Symbol("downloadedSize");const M=Symbol("bodySize");const D=Symbol("uploadedSize");const I=Symbol("serverResponsesPiped");const L=Symbol("unproxyEvents");const N=Symbol("isFromCache");const $=Symbol("cancelTimeouts");const B=Symbol("startedReading");const z=Symbol("stopReading");const F=Symbol("triggerRead");const V=Symbol("body");const G=Symbol("jobs");const W=Symbol("originalResponse");const J=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const K=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 Q=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 Y=new Set([300,301,302,303,304,307,308]);const X=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of X){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[j]});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 Z=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[U]=0;this[D]=0;this.requestInitialized=false;this[I]=new Set;this.redirects=[];this[z]=false;this[F]=false;this[G]=[];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[q])===null||e===void 0?void 0:e.destroy();return}for(const e of this[G]){e()}this[G].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([P.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(!Q.has(v)){Q.set(v,new h(((e,t)=>{const r=e[q](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(!A){A=new d.default}r.dnsCache=A}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){T.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){T.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){T.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){T.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){T.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){T.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){T.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){T.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 k.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[V]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[V]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[V]=e.stringifyJson(e.json)}const n=await v.default(this[V],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[M]=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[N]=n.isFromCache;this[H]=Number(e.headers["content-length"])||undefined;this[j]=e;e.once("end",(()=>{this[H]=this[U];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&&Y.has(s)){e.resume();if(this[q]){this[$]();delete this[q];this[L]()}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[V]=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);function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}if(!isUnixSocketURL(r)&&isUnixSocketURL(o)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}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&&!C.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[F]){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[I]){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[$]=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[L]=b.default(e,this,Z);this[q]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[V];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,E.default(e));delete t.url;let n;const o=Q.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"]=K?"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[V]!==o.body){this[V]=o.body}const{agent:c,request:l,timeout:d,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 b=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[q]=_;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=P.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 b(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=d;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 h.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[z]){return}const{options:t}=this;const r=this.retryCount+1;this[z]=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:x.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[J]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[F]=true;const e=this[j];if(e&&!this[z]){if(e.readableLength){this[F]=false}let t;while((t=e.read())!==null){this[U]+=t.length;this[B]=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[G].push(write)}}_writeRequest(e,t,r){if(this[q].destroyed){return}this._progressCallbacks.push((()=>{this[D]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[q].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(!(q in this)){e();return}if(this[q].destroyed){e();return}this[q].end((t=>{if(!t){this[M]=this[D];this.emit("uploadProgress",this.uploadProgress);this[q].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[G].push(endRequest)}}_destroy(e,t){var r;this[z]=true;clearTimeout(this[J]);if(q in this){this[$]();if(!((r=this[j])===null||r===void 0?void 0:r.complete)){this[q].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[z]}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[q])===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[q])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[H]){e=this[U]/this[H]}else if(this[H]===this[U]){e=1}else{e=0}return{percent:e,transferred:this[U],total:this[H]}}get uploadProgress(){let e;if(this[M]){e=this[D]/this[M]}else if(this[M]===this[D]){e=1}else{e=0}return{percent:e,transferred:this[D],total:this[M]}}get timings(){var e;return(e=this[q])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[N]}pipe(e,t){if(this[B]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[I].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[I].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:d}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=d(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 h=["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=d(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=d(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 h){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,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(/\s*,\s*/);for(const e of r){const[r,s]=e.split(/\s*=\s*/,2);t[r]=s===undefined?true:s.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 d=["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 d){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 d=Agent.normalizeOrigin(e,t&&t.servername);if(d===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(d in this.queue[i]){this.queue[i][d].listeners.push(...r);this._tryToCreateNewSession(i,d);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][d]===entry){delete this.queue[i][d];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${d}:${i}`;let n=false;try{const h=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});h[a]=0;h[l]=false;const isFree=()=>h[a]{this.tlsSessionCache.set(s,e)}));h.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));h.setTimeout(this.timeout,(()=>{h.destroy()}));h.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(h),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,d)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of h[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(h)}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}}}};h.on("origin",(()=>{h[u]=h.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],h)}));h.once("remoteSettings",(()=>{h.ref();h.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}h.destroy();return}h[u]=h.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,h,compareSessions),0,h)}else{e[i]=[h]}}this._freeSessionsCount+=1;n=true;this.emit("session",h);processListeners();removeFromQueue();if(h[a]===0&&this._freeSessionsCount>this.maxFreeSessions){h.close()}if(r.length!==0){this.getSession(d,t,r);r.length=0}h.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],h)}))}));h[c]=h.request;h.request=(e,t)=>{if(h[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=h[c](e,t);h.ref();++h[a];if(h[a]===h.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--h[a];if(!h.destroyed&&!h.closed){closeSessionIfCovered(this.sessions[i],h);if(isFree()&&!h.closed){if(!p){this._freeSessionsCount++;p=true}const e=h[a]===0;if(e){h.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||h[l])){h.close()}else{closeCoveredSessions(this.sessions[i],h);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][d]=entry;this._tryToCreateNewSession(i,d)}))}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 d=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(d.has(t)){const e=await d.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);d.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()}}d.delete(t);return a}catch(e){d.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:d,ERR_INVALID_PROTOCOL:h,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:b,HTTP2_METHOD_CONNECT:w}=s.constants;const E=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const P=Symbol("flushedHeaders");const C=Symbol("jobs");const T=/^[\^`\-\w!#$%&*+.|~]+$/;const k=/[^\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 d("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new h(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[E]=Object.create(null);this[C]=[];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[E])){this[E].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[E])){this[E][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[E])){this[E][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[P]=false}get method(){return this[E][_]}set method(e){if(e){this[E][_]=e.toUpperCase()}}get path(){return this[E][b]}set path(e){if(e){this[E][b]=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[C].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[C].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[P]||this.destroyed){return}this[P]=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[C]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[E]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[E]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}return this[E][e.toLowerCase()]}get headersSent(){return this[P]}removeHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[E][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!T.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(k.test(t)){throw new g("header content",e)}this[E][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[C].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",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){const r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};const o=["sqlite","postgres","mysql","mongo","redis","tiered"];class Keyv extends s{constructor(e,{emitErrors:t=true,...r}={}){super();this.opts={namespace:"keyv",serialize:n.stringify,deserialize:n.parse,...typeof e==="string"?{uri:e}:e,...r};if(!this.opts.store){const e={...this.opts};this.opts.store=loadStore(e)}if(this.opts.compression){const e=this.opts.compression;const{serialize:t,deserialize:r}=e.opts;this.opts.serialize=t;this.opts.deserialize=r}if(typeof this.opts.store.on==="function"&&t){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace;const generateIterator=e=>async function*(){for await(const[t,r]of typeof e==="function"?e(this.opts.store.namespace):e){const e=this.opts.deserialize(r);if(this.opts.store.namespace&&!t.includes(this.opts.store.namespace)){continue}if(typeof e.expires==="number"&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}};if(typeof this.opts.store[Symbol.iterator]==="function"&&this.opts.store instanceof Map){this.iterator=generateIterator(this.opts.store)}else if(typeof this.opts.store.iterator==="function"&&this.opts.store.opts&&this._checkIterableAdaptar()){this.iterator=generateIterator(this.opts.store.iterator.bind(this.opts.store))}}_checkIterableAdaptar(){return o.includes(this.opts.store.opts.dialect)||o.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:r}=this.opts;const s=Array.isArray(e);const n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&r.getMany===undefined){const e=[];for(const s of n){e.push(Promise.resolve().then((()=>r.get(s))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((e=>{if(e===undefined||e===null){return undefined}if(typeof e.expires==="number"&&Date.now()>e.expires){return this.delete(s).then((()=>undefined))}return t&&t.raw?e:e.value})))}return Promise.allSettled(e).then((e=>{const t=[];for(const r of e){t.push(r.value)}return t}))}return Promise.resolve().then((()=>s?r.getMany(n):r.get(n))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined||r===null){return undefined}if(s){const s=[];for(let n of r){if(typeof n==="string"){n=this.opts.deserialize(n)}if(n===undefined||n===null){s.push(undefined);continue}if(typeof n.expires==="number"&&Date.now()>n.expires){this.delete(e).then((()=>undefined));s.push(undefined)}else{s.push(t&&t.raw?n:n.value)}}return s}if(typeof r.expires==="number"&&Date.now()>r.expires){return this.delete(e).then((()=>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;if(typeof t==="symbol"){this.emit("error","symbol cannot be serialized")}t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const r=this._getKeyPrefixArray(e);if(t.deleteMany===undefined){const e=[];for(const s of r){e.push(t.delete(s))}return Promise.allSettled(e).then((e=>e.every((e=>e.value===true))))}return Promise.resolve().then((()=>t.deleteMany(r)))}const r=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(r)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((async()=>{if(typeof r.has==="function"){return r.has(t)}const e=await r.get(t);return e!==undefined}))}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect==="function"){return e.disconnect()}}}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}},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 d=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 h=[...d];if(u){h.push("base64")}if(h.length!==0||l&&l!==t){h.unshift(l)}return`data:${h.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},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 d.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 d=_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 d=e.node||o;let h=e.clockseq!==undefined?e.clockseq:i;if(d==null||h==null){const t=e.random||(e.rng||s.default)();if(d==null){d=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(h==null){h=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){h=h+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=h;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++]=h>>>8|128;l[u++]=h&255;for(let e=0;e<6;++e){l[u+e]=d[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=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")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const e=__nccwpck_require__(2021);const{getInputParams:t,reportError:r,validateLeankitUrl:s}=__nccwpck_require__(2904);(async()=>{const[r,n,o,i]=t({required:["host","apiToken","boardId","eventName"]});s("host",r);const{initiateBoardEvent:a}=e(r,n);await a(o,i)})().catch((e=>{r("initiateBoardEvent",e)}))})();module.exports=r})(); \ No newline at end of file diff --git a/initiateBoardEvent/index.js b/initiateBoardEvent/index.js new file mode 100644 index 0000000..e43f941 --- /dev/null +++ b/initiateBoardEvent/index.js @@ -0,0 +1,20 @@ +"use strict"; +const leankitApiFactory = require( "../leankit/api" ); +const { getInputParams, reportError, validateLeankitUrl } = require( "../leankit/helpers" ); + +( async () => { + const [ + host, + apiToken, + boardId, + eventName + ] = getInputParams( { required: [ "host", "apiToken", "boardId", "eventName" ] } ); + + validateLeankitUrl( "host", host ); + + const { initiateBoardEvent } = leankitApiFactory( host, apiToken ); + + await initiateBoardEvent( boardId, eventName ); +} )().catch( ex => { + reportError( "initiateBoardEvent", ex ); +} ); diff --git a/initiateBoardEvent/index.spec.js b/initiateBoardEvent/index.spec.js new file mode 100644 index 0000000..fb81d34 --- /dev/null +++ b/initiateBoardEvent/index.spec.js @@ -0,0 +1,97 @@ +"use strict"; + +const { sinon, proxyquire } = testHelpers; + +describe( "initiateBoardEvent", () => { + let github, apiFactory, initiateBoardEvent, getInputParams, validateLeankitUrl, reportError; + function init() { + github = { + context: { + payload: {} + } + }; + + getInputParams = sinon.stub().returns( [ + "HOST", + "API_TOKEN", + "BOARD_ID", + "EVENT_NAME", + ] ) + reportError = sinon.stub(); + validateLeankitUrl = sinon.stub(); + initiateBoardEvent = sinon.stub(); + apiFactory = sinon.stub().returns( { + initiateBoardEvent + } ); + } + + function action() { + return proxyquire( "~/initiateBoardEvent", { + "../leankit/api": apiFactory, + "../leankit/helpers": { + getInputParams, + reportError, + validateLeankitUrl + } + } ); + } + + describe( "validation", () => { + describe( "when validation fails", () => { + const error = new Error( "Input required and not supplied: SOME PARAM" ); + beforeEach( async () => { + init(); + getInputParams.throws( error ); + await action(); + } ); + + it( "should validate params", () => { + getInputParams.should.be.calledOnce.and.calledWith({ + required: [ + "host", + "apiToken", + "boardId", + "eventName" + ], + } ); + } ); + + it( "should report error", async () => { + reportError.should.be.calledOnce.and.calledWith( "initiateBoardEvent", error ); + } ); + } ); + + describe( "with invalid host", () => { + const error = new Error( "Expected a leankit url for 'host' action parameter" ); + beforeEach( async () => { + init(); + getInputParams.returns( [ "INVALID_HOST" ] ); + validateLeankitUrl.throws( error ) + await action(); + } ); + + it( "should validate host param", () => { + validateLeankitUrl.should.be.calledOnce.and.calledWith( "host", "INVALID_HOST"); + } ); + + it( "should report error", () => { + reportError.should.be.calledOnce.and.calledWith( "initiateBoardEvent", error ); + } ); + } ); + } ); + + describe( "with valid parameters", () => { + beforeEach( async () => { + init(); + await action(); + } ); + + it( "should get leankit api", () => { + apiFactory.should.be.calledOnce.and.calledWith( "HOST", "API_TOKEN" ); + } ); + + it( "should initiate event", () => { + initiateBoardEvent.should.be.calledOnce.and.calledWith( "BOARD_ID", "EVENT_NAME" ); + } ); + } ); +} ); diff --git a/initiateCardEvent/action.yml b/initiateCardEvent/action.yml new file mode 100644 index 0000000..0361573 --- /dev/null +++ b/initiateCardEvent/action.yml @@ -0,0 +1,21 @@ +name: "Initiate external automation event on card" +description: "Initiate external automation event on an AgilePlace card" +inputs: + host: + description: AgilePlace Url (https://mycompany.leankit.com) + required: true + apiToken: + description: Api token with write access to your AgilePlace board + required: true + cardId: + description: Card Id + required: true + eventName: + description: Name of the event to initiate + required: true +outputs: + error: + description: Status message for errors +runs: + using: "node20" + main: "dist/index.js" diff --git a/initiateCardEvent/dist/index.js b/initiateCardEvent/dist/index.js new file mode 100644 index 0000000..9cb5586 --- /dev/null +++ b/initiateCardEvent/dist/index.js @@ -0,0 +1 @@ +(()=>{var e={2021:(e,t,r)=>{"use strict";const s=r(3061);e.exports=(e,t)=>{const r=`Bearer ${t}`;const n=e.endsWith("/")?e.substr(0,e.lastIndexOf("/")):e;const o={getCard:e=>s(`${n}/io/card/${e}`,{method:"GET",headers:{Authorization:r}}).json(),blockCard:(e,t,o)=>s(`${n}/io/card/${e}`,{method:"PATCH",json:[{op:"replace",path:"/blockReason",value:o},{op:"replace",path:"/isBlocked",value:t}],headers:{Authorization:r}}).json(),moveCard:(e,t,o)=>s(`${n}/io/card/move`,{method:"POST",json:{cardIds:[e],destination:{laneId:t},wipOverrideComment:o},headers:{Authorization:r}}).json(),assignUsers:(e,t,o,i)=>{const a={cardIds:e};if(t&&t.length){a.userIdsToAssign=t}if(o&&o.length){a.userIdsToUnassign=o}if(i){a.wipOverrideComment=i}return s(`${n}/io/card/assign`,{method:"POST",json:a,headers:{Authorization:r}}).json()},addComment:(e,t)=>s(`${n}/io/card/${e}/comment`,{method:"POST",json:{text:t},headers:{Authorization:r}}).json(),createCard:async e=>{const{id:t}=await s(`${n}/io/card`,{method:"POST",json:e,headers:{Authorization:r}}).json();return t},initiateCardEvent:(e,t)=>s(`${n}/io/card/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),initiateBoardEvent:(e,t)=>s(`${n}/io/board/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),async verifyCardPosition(e,t){const r=await o.getCard(e);return r.lane.id===t}};return o}},2904:(e,t,r)=>{"use strict";const{getInput:s,getBooleanInput:n,setFailed:o,setOutput:i,exportVariable:a}=r(2186);e.exports={setOutput:i,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const o=[];for(const t of e){const e=r.includes(t)?n:s;o.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?n:s;o.push(t(e))}return o},reportError(e,t){const r=`${e}; ${t.message}`;i("error",r);a("LK_ERROR_MESSAGE",r);o(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},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 d=o(r(1017));const h=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}${d.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 h.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.result.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 d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var h;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(h=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=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const y=[d.BadGateway,d.ServiceUnavailable,d.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[h.Accept]=this._getExistingOrDefaultHeader(t,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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===d.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===d.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","Blob","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.blob=e=>isObjectOfType("Blob")(e);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=>{var t,r;return is.iterable(e)&&is.function_((t=e)===null||t===void 0?void 0:t.next)&&is.function_((r=e)===null||r===void 0?void 0:r.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.enumCase=(e,t)=>Object.values(t).includes(e);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;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.nonEmptyString=e=>is.string(e)&&e.length>0;is.nonEmptyStringAndNotWhitespace=e=>is.string(e)&&!is.emptyStringOrWhitespace(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),blob:e=>assertType(is.blob(e),"Blob",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),enumCase:(e,t)=>assertType(is.enumCase(e,t),"EnumCase",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),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>assertType(is.nonEmptyStringAndNotWhitespace(e),"non-empty string and not 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 d=Symbol("cacheableLookupInstance");const h=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[h]=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[h];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[d]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[d]}}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 d=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new d({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let d;if(typeof t==="string"){d=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){d=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";d=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(d)};t.headers=u(t.headers);const h=new s;const p=o(n.format(d),{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){h.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}h.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);h.emit("request",r)}catch(e){h.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;h.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>h.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);h.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}h.emit("error",new CacheableRequest.CacheError(e))}})();return h}}}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 d=r(3021);const h=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 h.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}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)}));d.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 d=r(2286);const h=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 b=r(3021);const w=r(2454);const E=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const C=r(4993);const P=r(9298);const T=r(397);const k=r(1048);const x=r(3462);let A;const q=Symbol("request");const j=Symbol("response");const H=Symbol("responseSize");const U=Symbol("downloadedSize");const M=Symbol("bodySize");const D=Symbol("uploadedSize");const I=Symbol("serverResponsesPiped");const L=Symbol("unproxyEvents");const N=Symbol("isFromCache");const $=Symbol("cancelTimeouts");const B=Symbol("startedReading");const z=Symbol("stopReading");const F=Symbol("triggerRead");const V=Symbol("body");const G=Symbol("jobs");const W=Symbol("originalResponse");const J=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const K=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 Q=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 Y=new Set([300,301,302,303,304,307,308]);const X=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of X){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[j]});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 Z=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[U]=0;this[D]=0;this.requestInitialized=false;this[I]=new Set;this.redirects=[];this[z]=false;this[F]=false;this[G]=[];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[q])===null||e===void 0?void 0:e.destroy();return}for(const e of this[G]){e()}this[G].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([C.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(!Q.has(v)){Q.set(v,new h(((e,t)=>{const r=e[q](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(!A){A=new d.default}r.dnsCache=A}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){T.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){T.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){T.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){T.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){T.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){T.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){T.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){T.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 k.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[V]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[V]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[V]=e.stringifyJson(e.json)}const n=await v.default(this[V],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[M]=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[N]=n.isFromCache;this[H]=Number(e.headers["content-length"])||undefined;this[j]=e;e.once("end",(()=>{this[H]=this[U];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&&Y.has(s)){e.resume();if(this[q]){this[$]();delete this[q];this[L]()}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[V]=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);function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}if(!isUnixSocketURL(r)&&isUnixSocketURL(o)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}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&&!P.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[F]){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[I]){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[$]=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[L]=b.default(e,this,Z);this[q]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[V];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,E.default(e));delete t.url;let n;const o=Q.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"]=K?"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[V]!==o.body){this[V]=o.body}const{agent:c,request:l,timeout:d,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 b=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[q]=_;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=C.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 b(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=d;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 h.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[z]){return}const{options:t}=this;const r=this.retryCount+1;this[z]=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:x.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[J]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[F]=true;const e=this[j];if(e&&!this[z]){if(e.readableLength){this[F]=false}let t;while((t=e.read())!==null){this[U]+=t.length;this[B]=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[G].push(write)}}_writeRequest(e,t,r){if(this[q].destroyed){return}this._progressCallbacks.push((()=>{this[D]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[q].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(!(q in this)){e();return}if(this[q].destroyed){e();return}this[q].end((t=>{if(!t){this[M]=this[D];this.emit("uploadProgress",this.uploadProgress);this[q].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[G].push(endRequest)}}_destroy(e,t){var r;this[z]=true;clearTimeout(this[J]);if(q in this){this[$]();if(!((r=this[j])===null||r===void 0?void 0:r.complete)){this[q].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[z]}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[q])===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[q])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[H]){e=this[U]/this[H]}else if(this[H]===this[U]){e=1}else{e=0}return{percent:e,transferred:this[U],total:this[H]}}get uploadProgress(){let e;if(this[M]){e=this[D]/this[M]}else if(this[M]===this[D]){e=1}else{e=0}return{percent:e,transferred:this[D],total:this[M]}}get timings(){var e;return(e=this[q])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[N]}pipe(e,t){if(this[B]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[I].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[I].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:d}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=d(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 h=["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=d(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=d(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 h){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,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(/\s*,\s*/);for(const e of r){const[r,s]=e.split(/\s*=\s*/,2);t[r]=s===undefined?true:s.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 d=["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 d){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 d=Agent.normalizeOrigin(e,t&&t.servername);if(d===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(d in this.queue[i]){this.queue[i][d].listeners.push(...r);this._tryToCreateNewSession(i,d);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][d]===entry){delete this.queue[i][d];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${d}:${i}`;let n=false;try{const h=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});h[a]=0;h[l]=false;const isFree=()=>h[a]{this.tlsSessionCache.set(s,e)}));h.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));h.setTimeout(this.timeout,(()=>{h.destroy()}));h.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(h),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,d)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of h[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(h)}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}}}};h.on("origin",(()=>{h[u]=h.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],h)}));h.once("remoteSettings",(()=>{h.ref();h.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}h.destroy();return}h[u]=h.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,h,compareSessions),0,h)}else{e[i]=[h]}}this._freeSessionsCount+=1;n=true;this.emit("session",h);processListeners();removeFromQueue();if(h[a]===0&&this._freeSessionsCount>this.maxFreeSessions){h.close()}if(r.length!==0){this.getSession(d,t,r);r.length=0}h.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],h)}))}));h[c]=h.request;h.request=(e,t)=>{if(h[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=h[c](e,t);h.ref();++h[a];if(h[a]===h.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--h[a];if(!h.destroyed&&!h.closed){closeSessionIfCovered(this.sessions[i],h);if(isFree()&&!h.closed){if(!p){this._freeSessionsCount++;p=true}const e=h[a]===0;if(e){h.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||h[l])){h.close()}else{closeCoveredSessions(this.sessions[i],h);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][d]=entry;this._tryToCreateNewSession(i,d)}))}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 d=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(d.has(t)){const e=await d.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);d.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()}}d.delete(t);return a}catch(e){d.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:d,ERR_INVALID_PROTOCOL:h,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:b,HTTP2_METHOD_CONNECT:w}=s.constants;const E=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const C=Symbol("flushedHeaders");const P=Symbol("jobs");const T=/^[\^`\-\w!#$%&*+.|~]+$/;const k=/[^\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 d("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new h(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[E]=Object.create(null);this[P]=[];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[E])){this[E].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[E])){this[E][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[E])){this[E][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[C]=false}get method(){return this[E][_]}set method(e){if(e){this[E][_]=e.toUpperCase()}}get path(){return this[E][b]}set path(e){if(e){this[E][b]=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[P].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[P].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[C]||this.destroyed){return}this[C]=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[P]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[E]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[E]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}return this[E][e.toLowerCase()]}get headersSent(){return this[C]}removeHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[E][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!T.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(k.test(t)){throw new g("header content",e)}this[E][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[P].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",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){const r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};const o=["sqlite","postgres","mysql","mongo","redis","tiered"];class Keyv extends s{constructor(e,{emitErrors:t=true,...r}={}){super();this.opts={namespace:"keyv",serialize:n.stringify,deserialize:n.parse,...typeof e==="string"?{uri:e}:e,...r};if(!this.opts.store){const e={...this.opts};this.opts.store=loadStore(e)}if(this.opts.compression){const e=this.opts.compression;const{serialize:t,deserialize:r}=e.opts;this.opts.serialize=t;this.opts.deserialize=r}if(typeof this.opts.store.on==="function"&&t){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace;const generateIterator=e=>async function*(){for await(const[t,r]of typeof e==="function"?e(this.opts.store.namespace):e){const e=this.opts.deserialize(r);if(this.opts.store.namespace&&!t.includes(this.opts.store.namespace)){continue}if(typeof e.expires==="number"&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}};if(typeof this.opts.store[Symbol.iterator]==="function"&&this.opts.store instanceof Map){this.iterator=generateIterator(this.opts.store)}else if(typeof this.opts.store.iterator==="function"&&this.opts.store.opts&&this._checkIterableAdaptar()){this.iterator=generateIterator(this.opts.store.iterator.bind(this.opts.store))}}_checkIterableAdaptar(){return o.includes(this.opts.store.opts.dialect)||o.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:r}=this.opts;const s=Array.isArray(e);const n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&r.getMany===undefined){const e=[];for(const s of n){e.push(Promise.resolve().then((()=>r.get(s))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((e=>{if(e===undefined||e===null){return undefined}if(typeof e.expires==="number"&&Date.now()>e.expires){return this.delete(s).then((()=>undefined))}return t&&t.raw?e:e.value})))}return Promise.allSettled(e).then((e=>{const t=[];for(const r of e){t.push(r.value)}return t}))}return Promise.resolve().then((()=>s?r.getMany(n):r.get(n))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined||r===null){return undefined}if(s){const s=[];for(let n of r){if(typeof n==="string"){n=this.opts.deserialize(n)}if(n===undefined||n===null){s.push(undefined);continue}if(typeof n.expires==="number"&&Date.now()>n.expires){this.delete(e).then((()=>undefined));s.push(undefined)}else{s.push(t&&t.raw?n:n.value)}}return s}if(typeof r.expires==="number"&&Date.now()>r.expires){return this.delete(e).then((()=>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;if(typeof t==="symbol"){this.emit("error","symbol cannot be serialized")}t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const r=this._getKeyPrefixArray(e);if(t.deleteMany===undefined){const e=[];for(const s of r){e.push(t.delete(s))}return Promise.allSettled(e).then((e=>e.every((e=>e.value===true))))}return Promise.resolve().then((()=>t.deleteMany(r)))}const r=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(r)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((async()=>{if(typeof r.has==="function"){return r.has(t)}const e=await r.get(t);return e!==undefined}))}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect==="function"){return e.disconnect()}}}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}},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 d=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 h=[...d];if(u){h.push("base64")}if(h.length!==0||l&&l!==t){h.unshift(l)}return`data:${h.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},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 d.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 d=_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 d=e.node||o;let h=e.clockseq!==undefined?e.clockseq:i;if(d==null||h==null){const t=e.random||(e.rng||s.default)();if(d==null){d=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(h==null){h=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){h=h+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=h;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++]=h>>>8|128;l[u++]=h&255;for(let e=0;e<6;++e){l[u+e]=d[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=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")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const e=__nccwpck_require__(2021);const{getInputParams:t,reportError:r,validateLeankitUrl:s}=__nccwpck_require__(2904);(async()=>{const[r,n,o,i]=t({required:["host","apiToken","cardId","eventName"]});s("host",r);const{initiateCardEvent:a}=e(r,n);await a(o,i)})().catch((e=>{r("initiateCardEvent",e)}))})();module.exports=r})(); \ No newline at end of file diff --git a/initiateCardEvent/index.js b/initiateCardEvent/index.js new file mode 100644 index 0000000..86280c6 --- /dev/null +++ b/initiateCardEvent/index.js @@ -0,0 +1,20 @@ +"use strict"; +const leankitApiFactory = require( "../leankit/api" ); +const { getInputParams, reportError, validateLeankitUrl } = require( "../leankit/helpers" ); + +( async () => { + const [ + host, + apiToken, + cardId, + eventName + ] = getInputParams( { required: [ "host", "apiToken", "cardId", "eventName" ] } ); + + validateLeankitUrl( "host", host ); + + const { initiateCardEvent } = leankitApiFactory( host, apiToken ); + + await initiateCardEvent( cardId, eventName ); +} )().catch( ex => { + reportError( "initiateCardEvent", ex ); +} ); diff --git a/initiateCardEvent/index.spec.js b/initiateCardEvent/index.spec.js new file mode 100644 index 0000000..cf9f0cb --- /dev/null +++ b/initiateCardEvent/index.spec.js @@ -0,0 +1,97 @@ +"use strict"; + +const { sinon, proxyquire } = testHelpers; + +describe( "initiateCardEvent", () => { + let github, apiFactory, initiateCardEvent, getInputParams, validateLeankitUrl, reportError; + function init() { + github = { + context: { + payload: {} + } + }; + + getInputParams = sinon.stub().returns( [ + "HOST", + "API_TOKEN", + "CARD_ID", + "EVENT_NAME", + ] ) + reportError = sinon.stub(); + validateLeankitUrl = sinon.stub(); + initiateCardEvent = sinon.stub(); + apiFactory = sinon.stub().returns( { + initiateCardEvent + } ); + } + + function action() { + return proxyquire( "~/initiateCardEvent", { + "../leankit/api": apiFactory, + "../leankit/helpers": { + getInputParams, + reportError, + validateLeankitUrl + } + } ); + } + + describe( "validation", () => { + describe( "when validation fails", () => { + const error = new Error( "Input required and not supplied: SOME PARAM" ); + beforeEach( async () => { + init(); + getInputParams.throws( error ); + await action(); + } ); + + it( "should validate params", () => { + getInputParams.should.be.calledOnce.and.calledWith({ + required: [ + "host", + "apiToken", + "cardId", + "eventName" + ], + } ); + } ); + + it( "should report error", async () => { + reportError.should.be.calledOnce.and.calledWith( "initiateCardEvent", error ); + } ); + } ); + + describe( "with invalid host", () => { + const error = new Error( "Expected a leankit url for 'host' action parameter" ); + beforeEach( async () => { + init(); + getInputParams.returns( [ "INVALID_HOST" ] ); + validateLeankitUrl.throws( error ) + await action(); + } ); + + it( "should validate host param", () => { + validateLeankitUrl.should.be.calledOnce.and.calledWith( "host", "INVALID_HOST"); + } ); + + it( "should report error", () => { + reportError.should.be.calledOnce.and.calledWith( "initiateCardEvent", error ); + } ); + } ); + } ); + + describe( "with valid parameters", () => { + beforeEach( async () => { + init(); + await action(); + } ); + + it( "should get leankit api", () => { + apiFactory.should.be.calledOnce.and.calledWith( "HOST", "API_TOKEN" ); + } ); + + it( "should initiate event", () => { + initiateCardEvent.should.be.calledOnce.and.calledWith( "CARD_ID", "EVENT_NAME" ); + } ); + } ); +} ); diff --git a/leankit/api.js b/leankit/api.js index fa9b599..c909327 100644 --- a/leankit/api.js +++ b/leankit/api.js @@ -76,6 +76,24 @@ module.exports = ( _baseUrl, apiToken ) => { } ).json(); return id; }, + initiateCardEvent: ( cardId, eventName ) => { + return got( `${ baseUrl }/io/card/${ cardId }/automation/externalEvent`, { + method: "POST", + json: { + eventName + }, + headers: { Authorization } + } ).json(); + }, + initiateBoardEvent: ( boardId, eventName ) => { + return got( `${ baseUrl }/io/board/${ boardId }/automation/externalEvent`, { + method: "POST", + json: { + eventName + }, + headers: { Authorization } + } ).json(); + }, async verifyCardPosition( cardId, laneId ) { const card = await api.getCard( cardId ); return card.lane.id === laneId; diff --git a/leankit/api.spec.js b/leankit/api.spec.js index 911e61e..745dfe3 100644 --- a/leankit/api.spec.js +++ b/leankit/api.spec.js @@ -211,6 +211,48 @@ describe( "leankit/api", () => { } ); } ); + describe( "initiateCardEvent", () => { + beforeEach( async () => { + //got.json.resolves(); + await api.initiateCardEvent( "123", "my-event" ); + } ); + + it( "should post /io/card/{cardId}/automation/externalEvent with expected params", async () => { + got.should.be.calledOnce.and.calledWith( "BASEURL/io/card/123/automation/externalEvent", { + method: "POST", + json: { eventName: "my-event" }, + headers: { + Authorization: "Bearer APITOKEN" + } + }) + } ); + + it( "should use json", () => { + got.json.should.be.calledOnce(); + } ); + } ); + + describe( "initiateBoardEvent", () => { + beforeEach( async () => { + //got.json.resolves(); + await api.initiateBoardEvent( "123", "my-event" ); + } ); + + it( "should post /io/board/{boardId}/automation/externalEvent with expected params", async () => { + got.should.be.calledOnce.and.calledWith( "BASEURL/io/board/123/automation/externalEvent", { + method: "POST", + json: { eventName: "my-event" }, + headers: { + Authorization: "Bearer APITOKEN" + } + }) + } ); + + it( "should use json", () => { + got.json.should.be.calledOnce(); + } ); + } ); + describe( "trailing slash on baseUrl", () => { it( "should remove the trailing slash", async () => { api = factory( "BASEURL/", "APITOKEN" ); diff --git a/moveCard/action.yml b/moveCard/action.yml index b9add13..6e4412a 100644 --- a/moveCard/action.yml +++ b/moveCard/action.yml @@ -2,10 +2,10 @@ name: "Move a card" description: "Move a card" inputs: host: - description: LeanKit Url (https://mycompany.leankit.com) + description: AgilePlace Url (https://mycompany.leankit.com) required: true apiToken: - description: Api token for your LeanKit board + description: Api token for your AgilePlace board required: true cardId: description: Id of the card diff --git a/moveCard/dist/index.js b/moveCard/dist/index.js index 3e1ca78..cb226e3 100644 --- a/moveCard/dist/index.js +++ b/moveCard/dist/index.js @@ -1 +1 @@ -(()=>{var e={2021:(e,t,r)=>{"use strict";const s=r(3061);e.exports=(e,t)=>{const r=`Bearer ${t}`;const n=e.endsWith("/")?e.substr(0,e.lastIndexOf("/")):e;const o={getCard:e=>s(`${n}/io/card/${e}`,{method:"GET",headers:{Authorization:r}}).json(),blockCard:(e,t,o)=>s(`${n}/io/card/${e}`,{method:"PATCH",json:[{op:"replace",path:"/blockReason",value:o},{op:"replace",path:"/isBlocked",value:t}],headers:{Authorization:r}}).json(),moveCard:(e,t,o)=>s(`${n}/io/card/move`,{method:"POST",json:{cardIds:[e],destination:{laneId:t},wipOverrideComment:o},headers:{Authorization:r}}).json(),assignUsers:(e,t,o,i)=>{const a={cardIds:e};if(t&&t.length){a.userIdsToAssign=t}if(o&&o.length){a.userIdsToUnassign=o}if(i){a.wipOverrideComment=i}return s(`${n}/io/card/assign`,{method:"POST",json:a,headers:{Authorization:r}}).json()},addComment:(e,t)=>s(`${n}/io/card/${e}/comment`,{method:"POST",json:{text:t},headers:{Authorization:r}}).json(),createCard:async e=>{const{id:t}=await s(`${n}/io/card`,{method:"POST",json:e,headers:{Authorization:r}}).json();return t},async verifyCardPosition(e,t){const r=await o.getCard(e);return r.lane.id===t}};return o}},2904:(e,t,r)=>{"use strict";const{getInput:s,getBooleanInput:n,setFailed:o,setOutput:i,exportVariable:a}=r(2186);e.exports={setOutput:i,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const o=[];for(const t of e){const e=r.includes(t)?n:s;o.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?n:s;o.push(t(e))}return o},reportError(e,t){const r=`${e}; ${t.message}`;i("error",r);a("LK_ERROR_MESSAGE",r);o(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},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 d=o(r(1017));const h=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}${d.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 h.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.result.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 d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var h;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(h=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=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const y=[d.BadGateway,d.ServiceUnavailable,d.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[h.Accept]=this._getExistingOrDefaultHeader(t,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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===d.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===d.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","Blob","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.blob=e=>isObjectOfType("Blob")(e);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=>{var t,r;return is.iterable(e)&&is.function_((t=e)===null||t===void 0?void 0:t.next)&&is.function_((r=e)===null||r===void 0?void 0:r.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.enumCase=(e,t)=>Object.values(t).includes(e);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;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.nonEmptyString=e=>is.string(e)&&e.length>0;is.nonEmptyStringAndNotWhitespace=e=>is.string(e)&&!is.emptyStringOrWhitespace(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),blob:e=>assertType(is.blob(e),"Blob",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),enumCase:(e,t)=>assertType(is.enumCase(e,t),"EnumCase",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),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>assertType(is.nonEmptyStringAndNotWhitespace(e),"non-empty string and not 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 d=Symbol("cacheableLookupInstance");const h=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[h]=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[h];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[d]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[d]}}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 d=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new d({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let d;if(typeof t==="string"){d=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){d=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";d=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(d)};t.headers=u(t.headers);const h=new s;const p=o(n.format(d),{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){h.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}h.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);h.emit("request",r)}catch(e){h.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;h.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>h.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);h.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}h.emit("error",new CacheableRequest.CacheError(e))}})();return h}}}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 d=r(3021);const h=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 h.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}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)}));d.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 d=r(2286);const h=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 b=r(3021);const w=r(2454);const E=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const C=r(4993);const P=r(9298);const T=r(397);const k=r(1048);const x=r(3462);let A;const q=Symbol("request");const j=Symbol("response");const H=Symbol("responseSize");const U=Symbol("downloadedSize");const M=Symbol("bodySize");const D=Symbol("uploadedSize");const I=Symbol("serverResponsesPiped");const L=Symbol("unproxyEvents");const N=Symbol("isFromCache");const $=Symbol("cancelTimeouts");const B=Symbol("startedReading");const z=Symbol("stopReading");const F=Symbol("triggerRead");const V=Symbol("body");const G=Symbol("jobs");const W=Symbol("originalResponse");const J=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const K=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 Q=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 Y=new Set([300,301,302,303,304,307,308]);const X=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of X){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[j]});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 Z=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[U]=0;this[D]=0;this.requestInitialized=false;this[I]=new Set;this.redirects=[];this[z]=false;this[F]=false;this[G]=[];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[q])===null||e===void 0?void 0:e.destroy();return}for(const e of this[G]){e()}this[G].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([C.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(!Q.has(v)){Q.set(v,new h(((e,t)=>{const r=e[q](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(!A){A=new d.default}r.dnsCache=A}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){T.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){T.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){T.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){T.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){T.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){T.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){T.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){T.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 k.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[V]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[V]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[V]=e.stringifyJson(e.json)}const n=await v.default(this[V],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[M]=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[N]=n.isFromCache;this[H]=Number(e.headers["content-length"])||undefined;this[j]=e;e.once("end",(()=>{this[H]=this[U];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&&Y.has(s)){e.resume();if(this[q]){this[$]();delete this[q];this[L]()}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[V]=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);function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}if(!isUnixSocketURL(r)&&isUnixSocketURL(o)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}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&&!P.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[F]){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[I]){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[$]=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[L]=b.default(e,this,Z);this[q]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[V];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,E.default(e));delete t.url;let n;const o=Q.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"]=K?"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[V]!==o.body){this[V]=o.body}const{agent:c,request:l,timeout:d,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 b=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[q]=_;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=C.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 b(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=d;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 h.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[z]){return}const{options:t}=this;const r=this.retryCount+1;this[z]=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:x.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[J]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[F]=true;const e=this[j];if(e&&!this[z]){if(e.readableLength){this[F]=false}let t;while((t=e.read())!==null){this[U]+=t.length;this[B]=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[G].push(write)}}_writeRequest(e,t,r){if(this[q].destroyed){return}this._progressCallbacks.push((()=>{this[D]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[q].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(!(q in this)){e();return}if(this[q].destroyed){e();return}this[q].end((t=>{if(!t){this[M]=this[D];this.emit("uploadProgress",this.uploadProgress);this[q].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[G].push(endRequest)}}_destroy(e,t){var r;this[z]=true;clearTimeout(this[J]);if(q in this){this[$]();if(!((r=this[j])===null||r===void 0?void 0:r.complete)){this[q].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[z]}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[q])===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[q])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[H]){e=this[U]/this[H]}else if(this[H]===this[U]){e=1}else{e=0}return{percent:e,transferred:this[U],total:this[H]}}get uploadProgress(){let e;if(this[M]){e=this[D]/this[M]}else if(this[M]===this[D]){e=1}else{e=0}return{percent:e,transferred:this[D],total:this[M]}}get timings(){var e;return(e=this[q])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[N]}pipe(e,t){if(this[B]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[I].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[I].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:d}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=d(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 h=["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=d(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=d(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 h){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,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(/\s*,\s*/);for(const e of r){const[r,s]=e.split(/\s*=\s*/,2);t[r]=s===undefined?true:s.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 d=["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 d){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 d=Agent.normalizeOrigin(e,t&&t.servername);if(d===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(d in this.queue[i]){this.queue[i][d].listeners.push(...r);this._tryToCreateNewSession(i,d);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][d]===entry){delete this.queue[i][d];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${d}:${i}`;let n=false;try{const h=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});h[a]=0;h[l]=false;const isFree=()=>h[a]{this.tlsSessionCache.set(s,e)}));h.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));h.setTimeout(this.timeout,(()=>{h.destroy()}));h.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(h),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,d)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of h[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(h)}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}}}};h.on("origin",(()=>{h[u]=h.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],h)}));h.once("remoteSettings",(()=>{h.ref();h.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}h.destroy();return}h[u]=h.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,h,compareSessions),0,h)}else{e[i]=[h]}}this._freeSessionsCount+=1;n=true;this.emit("session",h);processListeners();removeFromQueue();if(h[a]===0&&this._freeSessionsCount>this.maxFreeSessions){h.close()}if(r.length!==0){this.getSession(d,t,r);r.length=0}h.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],h)}))}));h[c]=h.request;h.request=(e,t)=>{if(h[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=h[c](e,t);h.ref();++h[a];if(h[a]===h.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--h[a];if(!h.destroyed&&!h.closed){closeSessionIfCovered(this.sessions[i],h);if(isFree()&&!h.closed){if(!p){this._freeSessionsCount++;p=true}const e=h[a]===0;if(e){h.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||h[l])){h.close()}else{closeCoveredSessions(this.sessions[i],h);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][d]=entry;this._tryToCreateNewSession(i,d)}))}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 d=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(d.has(t)){const e=await d.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);d.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()}}d.delete(t);return a}catch(e){d.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:d,ERR_INVALID_PROTOCOL:h,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:b,HTTP2_METHOD_CONNECT:w}=s.constants;const E=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const C=Symbol("flushedHeaders");const P=Symbol("jobs");const T=/^[\^`\-\w!#$%&*+.|~]+$/;const k=/[^\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 d("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new h(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[E]=Object.create(null);this[P]=[];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[E])){this[E].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[E])){this[E][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[E])){this[E][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[C]=false}get method(){return this[E][_]}set method(e){if(e){this[E][_]=e.toUpperCase()}}get path(){return this[E][b]}set path(e){if(e){this[E][b]=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[P].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[P].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[C]||this.destroyed){return}this[C]=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[P]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[E]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[E]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}return this[E][e.toLowerCase()]}get headersSent(){return this[C]}removeHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[E][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!T.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(k.test(t)){throw new g("header content",e)}this[E][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[P].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",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){const r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};const o=["sqlite","postgres","mysql","mongo","redis","tiered"];class Keyv extends s{constructor(e,{emitErrors:t=true,...r}={}){super();this.opts={namespace:"keyv",serialize:n.stringify,deserialize:n.parse,...typeof e==="string"?{uri:e}:e,...r};if(!this.opts.store){const e={...this.opts};this.opts.store=loadStore(e)}if(this.opts.compression){const e=this.opts.compression;const{serialize:t,deserialize:r}=e.opts;this.opts.serialize=t;this.opts.deserialize=r}if(typeof this.opts.store.on==="function"&&t){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace;const generateIterator=e=>async function*(){for await(const[t,r]of typeof e==="function"?e(this.opts.store.namespace):e){const e=this.opts.deserialize(r);if(this.opts.store.namespace&&!t.includes(this.opts.store.namespace)){continue}if(typeof e.expires==="number"&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}};if(typeof this.opts.store[Symbol.iterator]==="function"&&this.opts.store instanceof Map){this.iterator=generateIterator(this.opts.store)}else if(typeof this.opts.store.iterator==="function"&&this.opts.store.opts&&this._checkIterableAdaptar()){this.iterator=generateIterator(this.opts.store.iterator.bind(this.opts.store))}}_checkIterableAdaptar(){return o.includes(this.opts.store.opts.dialect)||o.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:r}=this.opts;const s=Array.isArray(e);const n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&r.getMany===undefined){const e=[];for(const s of n){e.push(Promise.resolve().then((()=>r.get(s))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((e=>{if(e===undefined||e===null){return undefined}if(typeof e.expires==="number"&&Date.now()>e.expires){return this.delete(s).then((()=>undefined))}return t&&t.raw?e:e.value})))}return Promise.allSettled(e).then((e=>{const t=[];for(const r of e){t.push(r.value)}return t}))}return Promise.resolve().then((()=>s?r.getMany(n):r.get(n))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined||r===null){return undefined}if(s){const s=[];for(let n of r){if(typeof n==="string"){n=this.opts.deserialize(n)}if(n===undefined||n===null){s.push(undefined);continue}if(typeof n.expires==="number"&&Date.now()>n.expires){this.delete(e).then((()=>undefined));s.push(undefined)}else{s.push(t&&t.raw?n:n.value)}}return s}if(typeof r.expires==="number"&&Date.now()>r.expires){return this.delete(e).then((()=>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;if(typeof t==="symbol"){this.emit("error","symbol cannot be serialized")}t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const r=this._getKeyPrefixArray(e);if(t.deleteMany===undefined){const e=[];for(const s of r){e.push(t.delete(s))}return Promise.allSettled(e).then((e=>e.every((e=>e.value===true))))}return Promise.resolve().then((()=>t.deleteMany(r)))}const r=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(r)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((async()=>{if(typeof r.has==="function"){return r.has(t)}const e=await r.get(t);return e!==undefined}))}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect==="function"){return e.disconnect()}}}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}},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 d=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 h=[...d];if(u){h.push("base64")}if(h.length!==0||l&&l!==t){h.unshift(l)}return`data:${h.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},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 d.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 d=_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 d=e.node||o;let h=e.clockseq!==undefined?e.clockseq:i;if(d==null||h==null){const t=e.random||(e.rng||s.default)();if(d==null){d=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(h==null){h=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){h=h+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=h;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++]=h>>>8|128;l[u++]=h&255;for(let e=0;e<6;++e){l[u+e]=d[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=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")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const e=__nccwpck_require__(2021);const{getInputParams:t,reportError:r,validateLeankitUrl:s}=__nccwpck_require__(2904);(async()=>{const[r,n,o,i,a]=t({required:["host","apiToken","cardId","laneId"],optional:["wipOverrideComment"]});s("host",r);const{moveCard:c}=e(r,n);await c(o,i,a)})().catch((e=>{r("moveCard",e.message)}))})();module.exports=r})(); \ No newline at end of file +(()=>{var e={2021:(e,t,r)=>{"use strict";const s=r(3061);e.exports=(e,t)=>{const r=`Bearer ${t}`;const n=e.endsWith("/")?e.substr(0,e.lastIndexOf("/")):e;const o={getCard:e=>s(`${n}/io/card/${e}`,{method:"GET",headers:{Authorization:r}}).json(),blockCard:(e,t,o)=>s(`${n}/io/card/${e}`,{method:"PATCH",json:[{op:"replace",path:"/blockReason",value:o},{op:"replace",path:"/isBlocked",value:t}],headers:{Authorization:r}}).json(),moveCard:(e,t,o)=>s(`${n}/io/card/move`,{method:"POST",json:{cardIds:[e],destination:{laneId:t},wipOverrideComment:o},headers:{Authorization:r}}).json(),assignUsers:(e,t,o,i)=>{const a={cardIds:e};if(t&&t.length){a.userIdsToAssign=t}if(o&&o.length){a.userIdsToUnassign=o}if(i){a.wipOverrideComment=i}return s(`${n}/io/card/assign`,{method:"POST",json:a,headers:{Authorization:r}}).json()},addComment:(e,t)=>s(`${n}/io/card/${e}/comment`,{method:"POST",json:{text:t},headers:{Authorization:r}}).json(),createCard:async e=>{const{id:t}=await s(`${n}/io/card`,{method:"POST",json:e,headers:{Authorization:r}}).json();return t},initiateCardEvent:(e,t)=>s(`${n}/io/card/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),initiateBoardEvent:(e,t)=>s(`${n}/io/board/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),async verifyCardPosition(e,t){const r=await o.getCard(e);return r.lane.id===t}};return o}},2904:(e,t,r)=>{"use strict";const{getInput:s,getBooleanInput:n,setFailed:o,setOutput:i,exportVariable:a}=r(2186);e.exports={setOutput:i,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const o=[];for(const t of e){const e=r.includes(t)?n:s;o.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?n:s;o.push(t(e))}return o},reportError(e,t){const r=`${e}; ${t.message}`;i("error",r);a("LK_ERROR_MESSAGE",r);o(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},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 d=o(r(1017));const h=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}${d.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 h.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.result.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 d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var h;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(h=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=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const y=[d.BadGateway,d.ServiceUnavailable,d.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[h.Accept]=this._getExistingOrDefaultHeader(t,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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===d.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===d.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","Blob","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.blob=e=>isObjectOfType("Blob")(e);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=>{var t,r;return is.iterable(e)&&is.function_((t=e)===null||t===void 0?void 0:t.next)&&is.function_((r=e)===null||r===void 0?void 0:r.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.enumCase=(e,t)=>Object.values(t).includes(e);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;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.nonEmptyString=e=>is.string(e)&&e.length>0;is.nonEmptyStringAndNotWhitespace=e=>is.string(e)&&!is.emptyStringOrWhitespace(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),blob:e=>assertType(is.blob(e),"Blob",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),enumCase:(e,t)=>assertType(is.enumCase(e,t),"EnumCase",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),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>assertType(is.nonEmptyStringAndNotWhitespace(e),"non-empty string and not 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 d=Symbol("cacheableLookupInstance");const h=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[h]=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[h];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[d]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[d]}}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 d=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new d({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let d;if(typeof t==="string"){d=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){d=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";d=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(d)};t.headers=u(t.headers);const h=new s;const p=o(n.format(d),{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){h.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}h.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);h.emit("request",r)}catch(e){h.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;h.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>h.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);h.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}h.emit("error",new CacheableRequest.CacheError(e))}})();return h}}}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 d=r(3021);const h=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 h.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}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)}));d.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 d=r(2286);const h=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 b=r(3021);const w=r(2454);const E=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const C=r(4993);const P=r(9298);const T=r(397);const k=r(1048);const x=r(3462);let A;const q=Symbol("request");const j=Symbol("response");const H=Symbol("responseSize");const U=Symbol("downloadedSize");const M=Symbol("bodySize");const D=Symbol("uploadedSize");const I=Symbol("serverResponsesPiped");const L=Symbol("unproxyEvents");const N=Symbol("isFromCache");const $=Symbol("cancelTimeouts");const B=Symbol("startedReading");const z=Symbol("stopReading");const F=Symbol("triggerRead");const V=Symbol("body");const G=Symbol("jobs");const W=Symbol("originalResponse");const J=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const K=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 Q=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 Y=new Set([300,301,302,303,304,307,308]);const X=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of X){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[j]});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 Z=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[U]=0;this[D]=0;this.requestInitialized=false;this[I]=new Set;this.redirects=[];this[z]=false;this[F]=false;this[G]=[];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[q])===null||e===void 0?void 0:e.destroy();return}for(const e of this[G]){e()}this[G].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([C.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(!Q.has(v)){Q.set(v,new h(((e,t)=>{const r=e[q](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(!A){A=new d.default}r.dnsCache=A}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){T.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){T.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){T.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){T.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){T.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){T.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){T.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){T.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 k.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[V]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[V]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[V]=e.stringifyJson(e.json)}const n=await v.default(this[V],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[M]=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[N]=n.isFromCache;this[H]=Number(e.headers["content-length"])||undefined;this[j]=e;e.once("end",(()=>{this[H]=this[U];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&&Y.has(s)){e.resume();if(this[q]){this[$]();delete this[q];this[L]()}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[V]=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);function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}if(!isUnixSocketURL(r)&&isUnixSocketURL(o)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}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&&!P.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[F]){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[I]){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[$]=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[L]=b.default(e,this,Z);this[q]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[V];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,E.default(e));delete t.url;let n;const o=Q.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"]=K?"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[V]!==o.body){this[V]=o.body}const{agent:c,request:l,timeout:d,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 b=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[q]=_;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=C.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 b(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=d;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 h.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[z]){return}const{options:t}=this;const r=this.retryCount+1;this[z]=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:x.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[J]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[F]=true;const e=this[j];if(e&&!this[z]){if(e.readableLength){this[F]=false}let t;while((t=e.read())!==null){this[U]+=t.length;this[B]=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[G].push(write)}}_writeRequest(e,t,r){if(this[q].destroyed){return}this._progressCallbacks.push((()=>{this[D]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[q].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(!(q in this)){e();return}if(this[q].destroyed){e();return}this[q].end((t=>{if(!t){this[M]=this[D];this.emit("uploadProgress",this.uploadProgress);this[q].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[G].push(endRequest)}}_destroy(e,t){var r;this[z]=true;clearTimeout(this[J]);if(q in this){this[$]();if(!((r=this[j])===null||r===void 0?void 0:r.complete)){this[q].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[z]}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[q])===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[q])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[H]){e=this[U]/this[H]}else if(this[H]===this[U]){e=1}else{e=0}return{percent:e,transferred:this[U],total:this[H]}}get uploadProgress(){let e;if(this[M]){e=this[D]/this[M]}else if(this[M]===this[D]){e=1}else{e=0}return{percent:e,transferred:this[D],total:this[M]}}get timings(){var e;return(e=this[q])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[N]}pipe(e,t){if(this[B]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[I].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[I].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:d}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=d(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 h=["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=d(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=d(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 h){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,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(/\s*,\s*/);for(const e of r){const[r,s]=e.split(/\s*=\s*/,2);t[r]=s===undefined?true:s.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 d=["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 d){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 d=Agent.normalizeOrigin(e,t&&t.servername);if(d===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(d in this.queue[i]){this.queue[i][d].listeners.push(...r);this._tryToCreateNewSession(i,d);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][d]===entry){delete this.queue[i][d];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${d}:${i}`;let n=false;try{const h=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});h[a]=0;h[l]=false;const isFree=()=>h[a]{this.tlsSessionCache.set(s,e)}));h.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));h.setTimeout(this.timeout,(()=>{h.destroy()}));h.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(h),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,d)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of h[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(h)}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}}}};h.on("origin",(()=>{h[u]=h.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],h)}));h.once("remoteSettings",(()=>{h.ref();h.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}h.destroy();return}h[u]=h.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,h,compareSessions),0,h)}else{e[i]=[h]}}this._freeSessionsCount+=1;n=true;this.emit("session",h);processListeners();removeFromQueue();if(h[a]===0&&this._freeSessionsCount>this.maxFreeSessions){h.close()}if(r.length!==0){this.getSession(d,t,r);r.length=0}h.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],h)}))}));h[c]=h.request;h.request=(e,t)=>{if(h[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=h[c](e,t);h.ref();++h[a];if(h[a]===h.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--h[a];if(!h.destroyed&&!h.closed){closeSessionIfCovered(this.sessions[i],h);if(isFree()&&!h.closed){if(!p){this._freeSessionsCount++;p=true}const e=h[a]===0;if(e){h.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||h[l])){h.close()}else{closeCoveredSessions(this.sessions[i],h);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][d]=entry;this._tryToCreateNewSession(i,d)}))}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 d=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(d.has(t)){const e=await d.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);d.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()}}d.delete(t);return a}catch(e){d.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:d,ERR_INVALID_PROTOCOL:h,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:b,HTTP2_METHOD_CONNECT:w}=s.constants;const E=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const C=Symbol("flushedHeaders");const P=Symbol("jobs");const T=/^[\^`\-\w!#$%&*+.|~]+$/;const k=/[^\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 d("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new h(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[E]=Object.create(null);this[P]=[];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[E])){this[E].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[E])){this[E][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[E])){this[E][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[C]=false}get method(){return this[E][_]}set method(e){if(e){this[E][_]=e.toUpperCase()}}get path(){return this[E][b]}set path(e){if(e){this[E][b]=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[P].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[P].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[C]||this.destroyed){return}this[C]=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[P]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[E]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[E]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}return this[E][e.toLowerCase()]}get headersSent(){return this[C]}removeHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[E][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!T.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(k.test(t)){throw new g("header content",e)}this[E][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[P].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",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){const r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};const o=["sqlite","postgres","mysql","mongo","redis","tiered"];class Keyv extends s{constructor(e,{emitErrors:t=true,...r}={}){super();this.opts={namespace:"keyv",serialize:n.stringify,deserialize:n.parse,...typeof e==="string"?{uri:e}:e,...r};if(!this.opts.store){const e={...this.opts};this.opts.store=loadStore(e)}if(this.opts.compression){const e=this.opts.compression;const{serialize:t,deserialize:r}=e.opts;this.opts.serialize=t;this.opts.deserialize=r}if(typeof this.opts.store.on==="function"&&t){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace;const generateIterator=e=>async function*(){for await(const[t,r]of typeof e==="function"?e(this.opts.store.namespace):e){const e=this.opts.deserialize(r);if(this.opts.store.namespace&&!t.includes(this.opts.store.namespace)){continue}if(typeof e.expires==="number"&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}};if(typeof this.opts.store[Symbol.iterator]==="function"&&this.opts.store instanceof Map){this.iterator=generateIterator(this.opts.store)}else if(typeof this.opts.store.iterator==="function"&&this.opts.store.opts&&this._checkIterableAdaptar()){this.iterator=generateIterator(this.opts.store.iterator.bind(this.opts.store))}}_checkIterableAdaptar(){return o.includes(this.opts.store.opts.dialect)||o.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:r}=this.opts;const s=Array.isArray(e);const n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&r.getMany===undefined){const e=[];for(const s of n){e.push(Promise.resolve().then((()=>r.get(s))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((e=>{if(e===undefined||e===null){return undefined}if(typeof e.expires==="number"&&Date.now()>e.expires){return this.delete(s).then((()=>undefined))}return t&&t.raw?e:e.value})))}return Promise.allSettled(e).then((e=>{const t=[];for(const r of e){t.push(r.value)}return t}))}return Promise.resolve().then((()=>s?r.getMany(n):r.get(n))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined||r===null){return undefined}if(s){const s=[];for(let n of r){if(typeof n==="string"){n=this.opts.deserialize(n)}if(n===undefined||n===null){s.push(undefined);continue}if(typeof n.expires==="number"&&Date.now()>n.expires){this.delete(e).then((()=>undefined));s.push(undefined)}else{s.push(t&&t.raw?n:n.value)}}return s}if(typeof r.expires==="number"&&Date.now()>r.expires){return this.delete(e).then((()=>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;if(typeof t==="symbol"){this.emit("error","symbol cannot be serialized")}t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const r=this._getKeyPrefixArray(e);if(t.deleteMany===undefined){const e=[];for(const s of r){e.push(t.delete(s))}return Promise.allSettled(e).then((e=>e.every((e=>e.value===true))))}return Promise.resolve().then((()=>t.deleteMany(r)))}const r=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(r)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((async()=>{if(typeof r.has==="function"){return r.has(t)}const e=await r.get(t);return e!==undefined}))}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect==="function"){return e.disconnect()}}}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}},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 d=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 h=[...d];if(u){h.push("base64")}if(h.length!==0||l&&l!==t){h.unshift(l)}return`data:${h.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},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 d.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 d=_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 d=e.node||o;let h=e.clockseq!==undefined?e.clockseq:i;if(d==null||h==null){const t=e.random||(e.rng||s.default)();if(d==null){d=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(h==null){h=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){h=h+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=h;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++]=h>>>8|128;l[u++]=h&255;for(let e=0;e<6;++e){l[u+e]=d[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=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")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const e=__nccwpck_require__(2021);const{getInputParams:t,reportError:r,validateLeankitUrl:s}=__nccwpck_require__(2904);(async()=>{const[r,n,o,i,a]=t({required:["host","apiToken","cardId","laneId"],optional:["wipOverrideComment"]});s("host",r);const{moveCard:c}=e(r,n);await c(o,i,a)})().catch((e=>{r("moveCard",e)}))})();module.exports=r})(); \ No newline at end of file diff --git a/moveCard/index.js b/moveCard/index.js index 2e38623..f106be5 100644 --- a/moveCard/index.js +++ b/moveCard/index.js @@ -18,5 +18,5 @@ const { getInputParams, reportError, validateLeankitUrl } = require( "../leankit await moveCard( cardId, laneId, wipOverrideComment ); } )().catch( ex => { - reportError( "moveCard", ex.message ); + reportError( "moveCard", ex ); } ); diff --git a/moveCard/index.spec.js b/moveCard/index.spec.js index 37473a1..a5fc1f0 100644 --- a/moveCard/index.spec.js +++ b/moveCard/index.spec.js @@ -39,9 +39,10 @@ describe( "moveCard", () => { describe( "validation", () => { describe( "when validation fails", () => { + const error = new Error( "Input required and not supplied: SOME PARAM" ); beforeEach( async () => { init(); - getInputParams.throws( new Error( "Input required and not supplied: SOME PARAM" ) ); + getInputParams.throws( error ); await action(); } ); @@ -60,15 +61,16 @@ describe( "moveCard", () => { } ); it( "should report error", async () => { - reportError.should.be.calledOnce.and.calledWith( "moveCard", "Input required and not supplied: SOME PARAM" ); + reportError.should.be.calledOnce.and.calledWith( "moveCard", error ); } ); } ); describe( "with invalid host", () => { + const error = new Error( "Expected a leankit url for 'host' action parameter" ); beforeEach( async () => { init(); getInputParams.returns( [ "INVALID_HOST" ] ); - validateLeankitUrl.throws( new Error( "Expected a leankit url for 'host' action parameter" )) + validateLeankitUrl.throws( error ) await action(); } ); @@ -77,7 +79,7 @@ describe( "moveCard", () => { } ); it( "should report error", () => { - reportError.should.be.calledOnce.and.calledWith( "moveCard", "Expected a leankit url for 'host' action parameter" ); + reportError.should.be.calledOnce.and.calledWith( "moveCard", error ); } ); } ); } ); diff --git a/package-lock.json b/package-lock.json index 8f46fe8..327a98e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "github-actions", - "version": "1.1.0", + "version": "1.4.0", "license": "ISC", "dependencies": { "@actions/core": "^1.10.0", diff --git a/package.json b/package.json index d5bd742..b689f3d 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "cover": "nyc -r text-summary -r html -- npm run test:only", "cover:ci": "nyc -r text-summary -r html -- npm run test:ci", "cover:show": "open \"file://$PWD/coverage/index.html\"", - "build": "for i in extractCardId blockCard moveCard createCard addComment validateCustomFields assignUsers; do ncc build ./${i%%} -m -o ./${i%%}/dist; done", + "build": "for i in extractCardId blockCard moveCard createCard addComment validateCustomFields assignUsers initiateBoardEvent initiateCardEvent; do ncc build ./${i%%} -m -o ./${i%%}/dist; done", "preact": "npm run build", "act": "act repository_dispatch -e test_payload.json", "act:watch": "act repository_dispatch -e test_payload.json -w" diff --git a/validateCustomFields/action.yml b/validateCustomFields/action.yml index 6440b74..36e9ec8 100644 --- a/validateCustomFields/action.yml +++ b/validateCustomFields/action.yml @@ -2,10 +2,10 @@ name: "Validate Card Custom Fields" description: "Validate the custom fields on a card" inputs: host: - description: LeanKit Url (https://mycompany.leankit.com) + description: AgilePlace Url (https://mycompany.leankit.com) required: true apiToken: - description: Api token with read access to your LeanKit board + description: Api token with read access to your AgilePlace board required: true cardId: description: Id of the card diff --git a/validateCustomFields/dist/index.js b/validateCustomFields/dist/index.js index 9fe17b2..a1396d5 100644 --- a/validateCustomFields/dist/index.js +++ b/validateCustomFields/dist/index.js @@ -1 +1 @@ -(()=>{var e={2021:(e,t,r)=>{"use strict";const s=r(3061);e.exports=(e,t)=>{const r=`Bearer ${t}`;const n=e.endsWith("/")?e.substr(0,e.lastIndexOf("/")):e;const o={getCard:e=>s(`${n}/io/card/${e}`,{method:"GET",headers:{Authorization:r}}).json(),blockCard:(e,t,o)=>s(`${n}/io/card/${e}`,{method:"PATCH",json:[{op:"replace",path:"/blockReason",value:o},{op:"replace",path:"/isBlocked",value:t}],headers:{Authorization:r}}).json(),moveCard:(e,t,o)=>s(`${n}/io/card/move`,{method:"POST",json:{cardIds:[e],destination:{laneId:t},wipOverrideComment:o},headers:{Authorization:r}}).json(),assignUsers:(e,t,o,i)=>{const a={cardIds:e};if(t&&t.length){a.userIdsToAssign=t}if(o&&o.length){a.userIdsToUnassign=o}if(i){a.wipOverrideComment=i}return s(`${n}/io/card/assign`,{method:"POST",json:a,headers:{Authorization:r}}).json()},addComment:(e,t)=>s(`${n}/io/card/${e}/comment`,{method:"POST",json:{text:t},headers:{Authorization:r}}).json(),createCard:async e=>{const{id:t}=await s(`${n}/io/card`,{method:"POST",json:e,headers:{Authorization:r}}).json();return t},async verifyCardPosition(e,t){const r=await o.getCard(e);return r.lane.id===t}};return o}},2904:(e,t,r)=>{"use strict";const{getInput:s,getBooleanInput:n,setFailed:o,setOutput:i,exportVariable:a}=r(2186);e.exports={setOutput:i,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const o=[];for(const t of e){const e=r.includes(t)?n:s;o.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?n:s;o.push(t(e))}return o},reportError(e,t){const r=`${e}; ${t.message}`;i("error",r);a("LK_ERROR_MESSAGE",r);o(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},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 d=o(r(1017));const h=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}${d.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 h.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.result.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 d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var h;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(h=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=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const y=[d.BadGateway,d.ServiceUnavailable,d.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[h.Accept]=this._getExistingOrDefaultHeader(t,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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===d.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===d.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","Blob","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.blob=e=>isObjectOfType("Blob")(e);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=>{var t,r;return is.iterable(e)&&is.function_((t=e)===null||t===void 0?void 0:t.next)&&is.function_((r=e)===null||r===void 0?void 0:r.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.enumCase=(e,t)=>Object.values(t).includes(e);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;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.nonEmptyString=e=>is.string(e)&&e.length>0;is.nonEmptyStringAndNotWhitespace=e=>is.string(e)&&!is.emptyStringOrWhitespace(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),blob:e=>assertType(is.blob(e),"Blob",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),enumCase:(e,t)=>assertType(is.enumCase(e,t),"EnumCase",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),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>assertType(is.nonEmptyStringAndNotWhitespace(e),"non-empty string and not 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 d=Symbol("cacheableLookupInstance");const h=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[h]=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[h];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[d]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[d]}}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 d=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new d({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let d;if(typeof t==="string"){d=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){d=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";d=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(d)};t.headers=u(t.headers);const h=new s;const p=o(n.format(d),{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){h.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}h.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);h.emit("request",r)}catch(e){h.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;h.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>h.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);h.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}h.emit("error",new CacheableRequest.CacheError(e))}})();return h}}}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 d=r(3021);const h=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 h.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}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)}));d.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 d=r(2286);const h=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 b=r(3021);const w=r(2454);const E=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const C=r(4993);const P=r(9298);const T=r(397);const k=r(1048);const x=r(3462);let A;const q=Symbol("request");const j=Symbol("response");const H=Symbol("responseSize");const U=Symbol("downloadedSize");const M=Symbol("bodySize");const I=Symbol("uploadedSize");const D=Symbol("serverResponsesPiped");const L=Symbol("unproxyEvents");const N=Symbol("isFromCache");const $=Symbol("cancelTimeouts");const B=Symbol("startedReading");const z=Symbol("stopReading");const F=Symbol("triggerRead");const V=Symbol("body");const G=Symbol("jobs");const W=Symbol("originalResponse");const J=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const K=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 Q=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 Y=new Set([300,301,302,303,304,307,308]);const X=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of X){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[j]});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 Z=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[U]=0;this[I]=0;this.requestInitialized=false;this[D]=new Set;this.redirects=[];this[z]=false;this[F]=false;this[G]=[];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[q])===null||e===void 0?void 0:e.destroy();return}for(const e of this[G]){e()}this[G].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([C.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(!Q.has(v)){Q.set(v,new h(((e,t)=>{const r=e[q](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(!A){A=new d.default}r.dnsCache=A}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){T.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){T.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){T.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){T.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){T.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){T.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){T.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){T.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 k.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[V]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[V]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[V]=e.stringifyJson(e.json)}const n=await v.default(this[V],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[M]=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[N]=n.isFromCache;this[H]=Number(e.headers["content-length"])||undefined;this[j]=e;e.once("end",(()=>{this[H]=this[U];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&&Y.has(s)){e.resume();if(this[q]){this[$]();delete this[q];this[L]()}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[V]=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);function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}if(!isUnixSocketURL(r)&&isUnixSocketURL(o)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}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&&!P.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[F]){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[D]){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[$]=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[L]=b.default(e,this,Z);this[q]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[V];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,E.default(e));delete t.url;let n;const o=Q.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"]=K?"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[V]!==o.body){this[V]=o.body}const{agent:c,request:l,timeout:d,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 b=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[q]=_;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=C.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 b(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=d;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 h.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[z]){return}const{options:t}=this;const r=this.retryCount+1;this[z]=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:x.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[J]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[F]=true;const e=this[j];if(e&&!this[z]){if(e.readableLength){this[F]=false}let t;while((t=e.read())!==null){this[U]+=t.length;this[B]=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[G].push(write)}}_writeRequest(e,t,r){if(this[q].destroyed){return}this._progressCallbacks.push((()=>{this[I]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[q].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(!(q in this)){e();return}if(this[q].destroyed){e();return}this[q].end((t=>{if(!t){this[M]=this[I];this.emit("uploadProgress",this.uploadProgress);this[q].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[G].push(endRequest)}}_destroy(e,t){var r;this[z]=true;clearTimeout(this[J]);if(q in this){this[$]();if(!((r=this[j])===null||r===void 0?void 0:r.complete)){this[q].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[z]}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[q])===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[q])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[H]){e=this[U]/this[H]}else if(this[H]===this[U]){e=1}else{e=0}return{percent:e,transferred:this[U],total:this[H]}}get uploadProgress(){let e;if(this[M]){e=this[I]/this[M]}else if(this[M]===this[I]){e=1}else{e=0}return{percent:e,transferred:this[I],total:this[M]}}get timings(){var e;return(e=this[q])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[N]}pipe(e,t){if(this[B]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[D].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[D].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:d}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=d(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 h=["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=d(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=d(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 h){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(1258),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)},1258:(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,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(/\s*,\s*/);for(const e of r){const[r,s]=e.split(/\s*=\s*/,2);t[r]=s===undefined?true:s.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 d=["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 d){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 d=Agent.normalizeOrigin(e,t&&t.servername);if(d===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(d in this.queue[i]){this.queue[i][d].listeners.push(...r);this._tryToCreateNewSession(i,d);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][d]===entry){delete this.queue[i][d];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${d}:${i}`;let n=false;try{const h=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});h[a]=0;h[l]=false;const isFree=()=>h[a]{this.tlsSessionCache.set(s,e)}));h.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));h.setTimeout(this.timeout,(()=>{h.destroy()}));h.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(h),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,d)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of h[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(h)}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}}}};h.on("origin",(()=>{h[u]=h.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],h)}));h.once("remoteSettings",(()=>{h.ref();h.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}h.destroy();return}h[u]=h.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,h,compareSessions),0,h)}else{e[i]=[h]}}this._freeSessionsCount+=1;n=true;this.emit("session",h);processListeners();removeFromQueue();if(h[a]===0&&this._freeSessionsCount>this.maxFreeSessions){h.close()}if(r.length!==0){this.getSession(d,t,r);r.length=0}h.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],h)}))}));h[c]=h.request;h.request=(e,t)=>{if(h[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=h[c](e,t);h.ref();++h[a];if(h[a]===h.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--h[a];if(!h.destroyed&&!h.closed){closeSessionIfCovered(this.sessions[i],h);if(isFree()&&!h.closed){if(!p){this._freeSessionsCount++;p=true}const e=h[a]===0;if(e){h.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||h[l])){h.close()}else{closeCoveredSessions(this.sessions[i],h);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][d]=entry;this._tryToCreateNewSession(i,d)}))}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 d=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(d.has(t)){const e=await d.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);d.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()}}d.delete(t);return a}catch(e){d.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:d,ERR_INVALID_PROTOCOL:h,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:b,HTTP2_METHOD_CONNECT:w}=s.constants;const E=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const C=Symbol("flushedHeaders");const P=Symbol("jobs");const T=/^[\^`\-\w!#$%&*+.|~]+$/;const k=/[^\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 d("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new h(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[E]=Object.create(null);this[P]=[];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[E])){this[E].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[E])){this[E][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[E])){this[E][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[C]=false}get method(){return this[E][_]}set method(e){if(e){this[E][_]=e.toUpperCase()}}get path(){return this[E][b]}set path(e){if(e){this[E][b]=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[P].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[P].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[C]||this.destroyed){return}this[C]=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[P]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[E]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[E]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}return this[E][e.toLowerCase()]}get headersSent(){return this[C]}removeHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[E][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!T.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(k.test(t)){throw new g("header content",e)}this[E][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[P].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",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){const r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};const o=["sqlite","postgres","mysql","mongo","redis","tiered"];class Keyv extends s{constructor(e,{emitErrors:t=true,...r}={}){super();this.opts={namespace:"keyv",serialize:n.stringify,deserialize:n.parse,...typeof e==="string"?{uri:e}:e,...r};if(!this.opts.store){const e={...this.opts};this.opts.store=loadStore(e)}if(this.opts.compression){const e=this.opts.compression;const{serialize:t,deserialize:r}=e.opts;this.opts.serialize=t;this.opts.deserialize=r}if(typeof this.opts.store.on==="function"&&t){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace;const generateIterator=e=>async function*(){for await(const[t,r]of typeof e==="function"?e(this.opts.store.namespace):e){const e=this.opts.deserialize(r);if(this.opts.store.namespace&&!t.includes(this.opts.store.namespace)){continue}if(typeof e.expires==="number"&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}};if(typeof this.opts.store[Symbol.iterator]==="function"&&this.opts.store instanceof Map){this.iterator=generateIterator(this.opts.store)}else if(typeof this.opts.store.iterator==="function"&&this.opts.store.opts&&this._checkIterableAdaptar()){this.iterator=generateIterator(this.opts.store.iterator.bind(this.opts.store))}}_checkIterableAdaptar(){return o.includes(this.opts.store.opts.dialect)||o.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:r}=this.opts;const s=Array.isArray(e);const n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&r.getMany===undefined){const e=[];for(const s of n){e.push(Promise.resolve().then((()=>r.get(s))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((e=>{if(e===undefined||e===null){return undefined}if(typeof e.expires==="number"&&Date.now()>e.expires){return this.delete(s).then((()=>undefined))}return t&&t.raw?e:e.value})))}return Promise.allSettled(e).then((e=>{const t=[];for(const r of e){t.push(r.value)}return t}))}return Promise.resolve().then((()=>s?r.getMany(n):r.get(n))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined||r===null){return undefined}if(s){const s=[];for(let n of r){if(typeof n==="string"){n=this.opts.deserialize(n)}if(n===undefined||n===null){s.push(undefined);continue}if(typeof n.expires==="number"&&Date.now()>n.expires){this.delete(e).then((()=>undefined));s.push(undefined)}else{s.push(t&&t.raw?n:n.value)}}return s}if(typeof r.expires==="number"&&Date.now()>r.expires){return this.delete(e).then((()=>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;if(typeof t==="symbol"){this.emit("error","symbol cannot be serialized")}t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const r=this._getKeyPrefixArray(e);if(t.deleteMany===undefined){const e=[];for(const s of r){e.push(t.delete(s))}return Promise.allSettled(e).then((e=>e.every((e=>e.value===true))))}return Promise.resolve().then((()=>t.deleteMany(r)))}const r=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(r)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((async()=>{if(typeof r.has==="function"){return r.has(t)}const e=await r.get(t);return e!==undefined}))}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect==="function"){return e.disconnect()}}}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}},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 d=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 h=[...d];if(u){h.push("base64")}if(h.length!==0||l&&l!==t){h.unshift(l)}return`data:${h.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},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 d.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 d=_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 d=e.node||o;let h=e.clockseq!==undefined?e.clockseq:i;if(d==null||h==null){const t=e.random||(e.rng||s.default)();if(d==null){d=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(h==null){h=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){h=h+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=h;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++]=h>>>8|128;l[u++]=h&255;for(let e=0;e<6;++e){l[u+e]=d[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=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")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const{setOutput:e}=__nccwpck_require__(2186);const t=__nccwpck_require__(2021);const{getInputParams:r,reportError:s,validateLeankitUrl:n}=__nccwpck_require__(2904);(async()=>{const[s,o,i,a,c]=r({required:["host","apiToken","cardId","requiredCustomFields"],optional:["customFields"]});n("host",s);const{getCard:u}=t(s,o);let l;if(c){l=JSON.parse(c)}else{({customFields:l}=await u(i))}e("customFields",l);const d={};const h={};l.forEach((({fieldId:e,label:t,value:r})=>{if(r!==null&&r!==undefined&&r!==""){d[e]=r;h[t.toLowerCase()]=r}}));e("customFieldsByLabel",h);e("customFieldsById",d);const p=a.split(/\s*,\s*/).map((e=>e.trim()));const m=[];for(const e of p){if(!(e.toLowerCase()in h||e in d)){m.push(e)}}if(m.length){throw new Error(`Card is missing required custom fields: ${m.join(", ")}`)}})().catch((e=>{s("validateCustomFields",e)}))})();module.exports=r})(); \ No newline at end of file +(()=>{var e={2021:(e,t,r)=>{"use strict";const s=r(3061);e.exports=(e,t)=>{const r=`Bearer ${t}`;const n=e.endsWith("/")?e.substr(0,e.lastIndexOf("/")):e;const o={getCard:e=>s(`${n}/io/card/${e}`,{method:"GET",headers:{Authorization:r}}).json(),blockCard:(e,t,o)=>s(`${n}/io/card/${e}`,{method:"PATCH",json:[{op:"replace",path:"/blockReason",value:o},{op:"replace",path:"/isBlocked",value:t}],headers:{Authorization:r}}).json(),moveCard:(e,t,o)=>s(`${n}/io/card/move`,{method:"POST",json:{cardIds:[e],destination:{laneId:t},wipOverrideComment:o},headers:{Authorization:r}}).json(),assignUsers:(e,t,o,i)=>{const a={cardIds:e};if(t&&t.length){a.userIdsToAssign=t}if(o&&o.length){a.userIdsToUnassign=o}if(i){a.wipOverrideComment=i}return s(`${n}/io/card/assign`,{method:"POST",json:a,headers:{Authorization:r}}).json()},addComment:(e,t)=>s(`${n}/io/card/${e}/comment`,{method:"POST",json:{text:t},headers:{Authorization:r}}).json(),createCard:async e=>{const{id:t}=await s(`${n}/io/card`,{method:"POST",json:e,headers:{Authorization:r}}).json();return t},initiateCardEvent:(e,t)=>s(`${n}/io/card/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),initiateBoardEvent:(e,t)=>s(`${n}/io/board/${e}/automation/externalEvent`,{method:"POST",json:{eventName:t},headers:{Authorization:r}}).json(),async verifyCardPosition(e,t){const r=await o.getCard(e);return r.lane.id===t}};return o}},2904:(e,t,r)=>{"use strict";const{getInput:s,getBooleanInput:n,setFailed:o,setOutput:i,exportVariable:a}=r(2186);e.exports={setOutput:i,getInputParams({required:e=[],optional:t=[],asBoolean:r=[]}){const o=[];for(const t of e){const e=r.includes(t)?n:s;o.push(e(t,{required:true}))}for(const e of t){const t=r.includes(e)?n:s;o.push(t(e))}return o},reportError(e,t){const r=`${e}; ${t.message}`;i("error",r);a("LK_ERROR_MESSAGE",r);o(t)},validateLeankitUrl(e,t){const r=/^https:\/\/.+\.(leankit\.com|leankit\.io|localkanban\.com)\/?$/i.test(t);if(!r){throw new Error(`Expected a leankit url for '${e}' action parameter`)}}}},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 d=o(r(1017));const h=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}${d.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 h.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.result.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 d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var h;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(h=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=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const y=[d.BadGateway,d.ServiceUnavailable,d.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[h.Accept]=this._getExistingOrDefaultHeader(t,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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[h.Accept]=this._getExistingOrDefaultHeader(r,h.Accept,p.ApplicationJson);r[h.ContentType]=this._getExistingOrDefaultHeader(r,h.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===d.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===d.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","Blob","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.blob=e=>isObjectOfType("Blob")(e);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=>{var t,r;return is.iterable(e)&&is.function_((t=e)===null||t===void 0?void 0:t.next)&&is.function_((r=e)===null||r===void 0?void 0:r.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.enumCase=(e,t)=>Object.values(t).includes(e);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;const isWhiteSpaceString=e=>is.string(e)&&!/\S/.test(e);is.emptyStringOrWhitespace=e=>is.emptyString(e)||isWhiteSpaceString(e);is.nonEmptyString=e=>is.string(e)&&e.length>0;is.nonEmptyStringAndNotWhitespace=e=>is.string(e)&&!is.emptyStringOrWhitespace(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),blob:e=>assertType(is.blob(e),"Blob",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),enumCase:(e,t)=>assertType(is.enumCase(e,t),"EnumCase",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),emptyStringOrWhitespace:e=>assertType(is.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>assertType(is.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>assertType(is.nonEmptyStringAndNotWhitespace(e),"non-empty string and not 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 d=Symbol("cacheableLookupInstance");const h=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[h]=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[h];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[d]!==this){throw new Error("The agent is not owned by this CacheableLookup instance")}e.createConnection=e[l];delete e[l];delete e[d]}}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 d=r(1531);class CacheableRequest{constructor(e,t){if(typeof e!=="function"){throw new TypeError("Parameter `request` must be a function")}this.cache=new d({uri:typeof t==="string"&&t,store:typeof t!=="string"&&t,namespace:"cacheable-request"});return this.createCacheableRequest(e)}createCacheableRequest(e){return(t,r)=>{let d;if(typeof t==="string"){d=normalizeUrlObject(n.parse(t));t={}}else if(t instanceof n.URL){d=normalizeUrlObject(n.parse(t.toString()));t={}}else{const[e,...r]=(t.path||"").split("?");const s=r.length>0?`?${r.join("?")}`:"";d=normalizeUrlObject({...t,pathname:e,search:s})}t={headers:{},method:"GET",cache:true,strictTtl:false,automaticFailover:false,...t,...urlObjectToRequestOptions(d)};t.headers=u(t.headers);const h=new s;const p=o(n.format(d),{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){h.emit("error",new CacheableRequest.CacheError(e))}})()}else if(t.cache&&y){(async()=>{try{await this.cache.delete(m)}catch(e){h.emit("error",new CacheableRequest.CacheError(e))}})()}h.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);h.emit("request",r)}catch(e){h.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;h.emit("response",n);if(typeof r==="function"){r(n)}}else{y=t;e.headers=s.revalidationHeaders(e);makeRequest(e)}};const errorHandler=e=>h.emit("error",new CacheableRequest.CacheError(e));this.cache.once("error",errorHandler);h.on("response",(()=>this.cache.removeListener("error",errorHandler)));try{await get(t)}catch(e){if(t.automaticFailover&&!g){makeRequest(t)}h.emit("error",new CacheableRequest.CacheError(e))}})();return h}}}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 d=r(3021);const h=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 h.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}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)}));d.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 d=r(2286);const h=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 b=r(3021);const w=r(2454);const E=r(8026);const R=r(9219);const O=r(7288);const S=r(4500);const C=r(4993);const P=r(9298);const T=r(397);const k=r(1048);const x=r(3462);let A;const q=Symbol("request");const j=Symbol("response");const H=Symbol("responseSize");const U=Symbol("downloadedSize");const M=Symbol("bodySize");const I=Symbol("uploadedSize");const D=Symbol("serverResponsesPiped");const L=Symbol("unproxyEvents");const N=Symbol("isFromCache");const $=Symbol("cancelTimeouts");const B=Symbol("startedReading");const z=Symbol("stopReading");const F=Symbol("triggerRead");const V=Symbol("body");const G=Symbol("jobs");const W=Symbol("originalResponse");const J=Symbol("retryTimeout");t.kIsNormalizedAlready=Symbol("isNormalizedAlready");const K=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 Q=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 Y=new Set([300,301,302,303,304,307,308]);const X=["context","body","json","form"];t.setNonEnumerableProperties=(e,t)=>{const r={};for(const t of e){if(!t){continue}for(const e of X){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[j]});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 Z=["socket","connect","continue","information","upgrade","timeout"];class Request extends n.Duplex{constructor(e,r={},s){super({autoDestroy:false,highWaterMark:0});this[U]=0;this[I]=0;this.requestInitialized=false;this[D]=new Set;this.redirects=[];this[z]=false;this[F]=false;this[G]=[];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[q])===null||e===void 0?void 0:e.destroy();return}for(const e of this[G]){e()}this[G].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([C.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(!Q.has(v)){Q.set(v,new h(((e,t)=>{const r=e[q](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(!A){A=new d.default}r.dnsCache=A}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){T.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){T.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"')}if("checkServerIdentity"in r){T.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"')}if("ca"in r){T.default('"options.ca" was never documented, please use "options.https.certificateAuthority"')}if("key"in r){T.default('"options.key" was never documented, please use "options.https.key"')}if("cert"in r){T.default('"options.cert" was never documented, please use "options.https.certificate"')}if("passphrase"in r){T.default('"options.passphrase" was never documented, please use "options.https.passphrase"')}if("pfx"in r){T.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 k.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[V]=e.body}else if(s){if(t){r["content-type"]="application/x-www-form-urlencoded"}this[V]=new i.URLSearchParams(e.form).toString()}else{if(t){r["content-type"]="application/json"}this[V]=e.stringifyJson(e.json)}const n=await v.default(this[V],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[M]=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[N]=n.isFromCache;this[H]=Number(e.headers["content-length"])||undefined;this[j]=e;e.once("end",(()=>{this[H]=this[U];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&&Y.has(s)){e.resume();if(this[q]){this[$]();delete this[q];this[L]()}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[V]=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);function isUnixSocketURL(e){return e.protocol==="unix:"||e.hostname==="unix"}if(!isUnixSocketURL(r)&&isUnixSocketURL(o)){this._beforeError(new RequestError("Cannot redirect to UNIX socket",{},this));return}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&&!P.isResponseOk(n)){this._beforeError(new HTTPError(n));return}e.on("readable",(()=>{if(this[F]){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[D]){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[$]=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[L]=b.default(e,this,Z);this[q]=e;this.emit("uploadProgress",this.uploadProgress);const o=this[V];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,E.default(e));delete t.url;let n;const o=Q.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"]=K?"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[V]!==o.body){this[V]=o.body}const{agent:c,request:l,timeout:d,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 b=o.cache?this._createCacheableRequest:_;if(c&&!o.http2){o.agent=c[y?"https":"http"]}o[q]=_;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=C.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 b(p,w);if(g.default.undefined(e)){e=v(p,w)}o.request=l;o.timeout=d;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 h.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[z]){return}const{options:t}=this;const r=this.retryCount+1;this[z]=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:x.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[J]=setTimeout(retry,o);return}}void this._error(s)})()}_read(){this[F]=true;const e=this[j];if(e&&!this[z]){if(e.readableLength){this[F]=false}let t;while((t=e.read())!==null){this[U]+=t.length;this[B]=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[G].push(write)}}_writeRequest(e,t,r){if(this[q].destroyed){return}this._progressCallbacks.push((()=>{this[I]+=Buffer.byteLength(e,t);const r=this.uploadProgress;if(r.percent<1){this.emit("uploadProgress",r)}}));this[q].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(!(q in this)){e();return}if(this[q].destroyed){e();return}this[q].end((t=>{if(!t){this[M]=this[I];this.emit("uploadProgress",this.uploadProgress);this[q].emit("upload-complete")}e(t)}))};if(this.requestInitialized){endRequest()}else{this[G].push(endRequest)}}_destroy(e,t){var r;this[z]=true;clearTimeout(this[J]);if(q in this){this[$]();if(!((r=this[j])===null||r===void 0?void 0:r.complete)){this[q].destroy()}}if(e!==null&&!g.default.undefined(e)&&!(e instanceof RequestError)){e=new RequestError(e.message,e,this)}t(e)}get _isAboutToError(){return this[z]}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[q])===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[q])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:undefined}get downloadProgress(){let e;if(this[H]){e=this[U]/this[H]}else if(this[H]===this[U]){e=1}else{e=0}return{percent:e,transferred:this[U],total:this[H]}}get uploadProgress(){let e;if(this[M]){e=this[I]/this[M]}else if(this[M]===this[I]){e=1}else{e=0}return{percent:e,transferred:this[I],total:this[M]}}get timings(){var e;return(e=this[q])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[N]}pipe(e,t){if(this[B]){throw new Error("Failed to pipe. The response has been emitted already.")}if(e instanceof c.ServerResponse){this[D].add(e)}return super.pipe(e,t)}unpipe(e){if(e instanceof c.ServerResponse){this[D].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:d}=c.default;const mergeOptions=(...e)=>{let t;for(const r of e){t=d(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 h=["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=d(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=d(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 h){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(1258),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)},1258:(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,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(/\s*,\s*/);for(const e of r){const[r,s]=e.split(/\s*=\s*/,2);t[r]=s===undefined?true:s.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 d=["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 d){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 d=Agent.normalizeOrigin(e,t&&t.servername);if(d===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(d in this.queue[i]){this.queue[i][d].listeners.push(...r);this._tryToCreateNewSession(i,d);return}}else{this.queue[i]={}}const removeFromQueue=()=>{if(i in this.queue&&this.queue[i][d]===entry){delete this.queue[i][d];if(Object.keys(this.queue[i]).length===0){delete this.queue[i]}}};const entry=()=>{const s=`${d}:${i}`;let n=false;try{const h=o.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(s),...t});h[a]=0;h[l]=false;const isFree=()=>h[a]{this.tlsSessionCache.set(s,e)}));h.once("error",(e=>{for(const{reject:t}of r){t(e)}this.tlsSessionCache.delete(s)}));h.setTimeout(this.timeout,(()=>{h.destroy()}));h.once("close",(()=>{if(n){if(p){this._freeSessionsCount--}this._sessionsCount--;const e=this.sessions[i];e.splice(e.indexOf(h),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,d)}));const processListeners=()=>{if(!(i in this.queue)||!isFree()){return}for(const e of h[u]){if(e in this.queue[i]){const{listeners:t}=this.queue[i][e];while(t.length!==0&&isFree()){t.shift().resolve(h)}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}}}};h.on("origin",(()=>{h[u]=h.originSet;if(!isFree()){return}processListeners();closeCoveredSessions(this.sessions[i],h)}));h.once("remoteSettings",(()=>{h.ref();h.unref();this._sessionsCount++;if(entry.destroyed){const e=new Error("Agent has been destroyed");for(const t of r){t.reject(e)}h.destroy();return}h[u]=h.originSet;{const e=this.sessions;if(i in e){const t=e[i];t.splice(getSortedIndex(t,h,compareSessions),0,h)}else{e[i]=[h]}}this._freeSessionsCount+=1;n=true;this.emit("session",h);processListeners();removeFromQueue();if(h[a]===0&&this._freeSessionsCount>this.maxFreeSessions){h.close()}if(r.length!==0){this.getSession(d,t,r);r.length=0}h.on("remoteSettings",(()=>{processListeners();closeCoveredSessions(this.sessions[i],h)}))}));h[c]=h.request;h.request=(e,t)=>{if(h[l]){throw new Error("The session is gracefully closing. No new streams are allowed.")}const r=h[c](e,t);h.ref();++h[a];if(h[a]===h.remoteSettings.maxConcurrentStreams){this._freeSessionsCount--}r.once("close",(()=>{p=isFree();--h[a];if(!h.destroyed&&!h.closed){closeSessionIfCovered(this.sessions[i],h);if(isFree()&&!h.closed){if(!p){this._freeSessionsCount++;p=true}const e=h[a]===0;if(e){h.unref()}if(e&&(this._freeSessionsCount>this.maxFreeSessions||h[l])){h.close()}else{closeCoveredSessions(this.sessions[i],h);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][d]=entry;this._tryToCreateNewSession(i,d)}))}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 d=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(d.has(t)){const e=await d.get(t);return e.alpnProtocol}const{path:r,agent:s}=e;e.path=e.socketPath;const i=o(e);d.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()}}d.delete(t);return a}catch(e){d.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:d,ERR_INVALID_PROTOCOL:h,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:b,HTTP2_METHOD_CONNECT:w}=s.constants;const E=Symbol("headers");const R=Symbol("origin");const O=Symbol("session");const S=Symbol("options");const C=Symbol("flushedHeaders");const P=Symbol("jobs");const T=/^[\^`\-\w!#$%&*+.|~]+$/;const k=/[^\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 d("options.agent",["Agent-like Object","undefined","false"],t.agent)}if(t.protocol&&t.protocol!=="https:"){throw new h(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[E]=Object.create(null);this[P]=[];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[E])){this[E].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[E])){this[E][":authority"]=a}}else{this[R]=`https://${a}:${n}`;if(!(":authority"in this[E])){this[E][":authority"]=`${a}:${n}`}}if(u){this.setTimeout(u)}if(r){this.once("response",r)}this[C]=false}get method(){return this[E][_]}set method(e){if(e){this[E][_]=e.toUpperCase()}}get path(){return this[E][b]}set path(e){if(e){this[E][b]=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[P].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[P].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[C]||this.destroyed){return}this[C]=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[P]){e()}this.emit("socket",this.socket)};if(this[O]){try{onStream(this[O].request(this[E]))}catch(e){this.emit("error",e)}}else{this.reusedSocket=true;try{onStream(await this.agent.request(this[R],this[S],this[E]))}catch(e){this.emit("error",e)}}}getHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}return this[E][e.toLowerCase()]}get headersSent(){return this[C]}removeHeader(e){if(typeof e!=="string"){throw new d("name","string",e)}if(this.headersSent){throw new p("remove")}delete this[E][e.toLowerCase()]}setHeader(e,t){if(this.headersSent){throw new p("set")}if(typeof e!=="string"||!T.test(e)&&!l(e)){throw new m("Header name",e)}if(typeof t==="undefined"){throw new y(t,e)}if(k.test(t)){throw new g("header content",e)}this[E][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const applyTimeout=()=>this._request.setTimeout(e,t);if(this._request){applyTimeout()}else{this[P].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",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri){const r=e.adapter||/^[^:+]*/.exec(e.uri)[0];return new(require(t[r]))(e)}return new Map};const o=["sqlite","postgres","mysql","mongo","redis","tiered"];class Keyv extends s{constructor(e,{emitErrors:t=true,...r}={}){super();this.opts={namespace:"keyv",serialize:n.stringify,deserialize:n.parse,...typeof e==="string"?{uri:e}:e,...r};if(!this.opts.store){const e={...this.opts};this.opts.store=loadStore(e)}if(this.opts.compression){const e=this.opts.compression;const{serialize:t,deserialize:r}=e.opts;this.opts.serialize=t;this.opts.deserialize=r}if(typeof this.opts.store.on==="function"&&t){this.opts.store.on("error",(e=>this.emit("error",e)))}this.opts.store.namespace=this.opts.namespace;const generateIterator=e=>async function*(){for await(const[t,r]of typeof e==="function"?e(this.opts.store.namespace):e){const e=this.opts.deserialize(r);if(this.opts.store.namespace&&!t.includes(this.opts.store.namespace)){continue}if(typeof e.expires==="number"&&Date.now()>e.expires){this.delete(t);continue}yield[this._getKeyUnprefix(t),e.value]}};if(typeof this.opts.store[Symbol.iterator]==="function"&&this.opts.store instanceof Map){this.iterator=generateIterator(this.opts.store)}else if(typeof this.opts.store.iterator==="function"&&this.opts.store.opts&&this._checkIterableAdaptar()){this.iterator=generateIterator(this.opts.store.iterator.bind(this.opts.store))}}_checkIterableAdaptar(){return o.includes(this.opts.store.opts.dialect)||o.findIndex((e=>this.opts.store.opts.url.includes(e)))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map((e=>`${this.opts.namespace}:${e}`))}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:r}=this.opts;const s=Array.isArray(e);const n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&r.getMany===undefined){const e=[];for(const s of n){e.push(Promise.resolve().then((()=>r.get(s))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((e=>{if(e===undefined||e===null){return undefined}if(typeof e.expires==="number"&&Date.now()>e.expires){return this.delete(s).then((()=>undefined))}return t&&t.raw?e:e.value})))}return Promise.allSettled(e).then((e=>{const t=[];for(const r of e){t.push(r.value)}return t}))}return Promise.resolve().then((()=>s?r.getMany(n):r.get(n))).then((e=>typeof e==="string"?this.opts.deserialize(e):e)).then((r=>{if(r===undefined||r===null){return undefined}if(s){const s=[];for(let n of r){if(typeof n==="string"){n=this.opts.deserialize(n)}if(n===undefined||n===null){s.push(undefined);continue}if(typeof n.expires==="number"&&Date.now()>n.expires){this.delete(e).then((()=>undefined));s.push(undefined)}else{s.push(t&&t.raw?n:n.value)}}return s}if(typeof r.expires==="number"&&Date.now()>r.expires){return this.delete(e).then((()=>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;if(typeof t==="symbol"){this.emit("error","symbol cannot be serialized")}t={value:t,expires:e};return this.opts.serialize(t)})).then((e=>n.set(s,e,r))).then((()=>true))}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const r=this._getKeyPrefixArray(e);if(t.deleteMany===undefined){const e=[];for(const s of r){e.push(t.delete(s))}return Promise.allSettled(e).then((e=>e.every((e=>e.value===true))))}return Promise.resolve().then((()=>t.deleteMany(r)))}const r=this._getKeyPrefix(e);return Promise.resolve().then((()=>t.delete(r)))}clear(){const{store:e}=this.opts;return Promise.resolve().then((()=>e.clear()))}has(e){const t=this._getKeyPrefix(e);const{store:r}=this.opts;return Promise.resolve().then((async()=>{if(typeof r.has==="function"){return r.has(t)}const e=await r.get(t);return e!==undefined}))}disconnect(){const{store:e}=this.opts;if(typeof e.disconnect==="function"){return e.disconnect()}}}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}},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 d=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 h=[...d];if(u){h.push("base64")}if(h.length!==0||l&&l!==t){h.unshift(l)}return`data:${h.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},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 d.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 d=_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 d=e.node||o;let h=e.clockseq!==undefined?e.clockseq:i;if(d==null||h==null){const t=e.random||(e.rng||s.default)();if(d==null){d=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(h==null){h=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){h=h+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=h;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++]=h>>>8|128;l[u++]=h&255;for(let e=0;e<6;++e){l[u+e]=d[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=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")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";const{setOutput:e}=__nccwpck_require__(2186);const t=__nccwpck_require__(2021);const{getInputParams:r,reportError:s,validateLeankitUrl:n}=__nccwpck_require__(2904);(async()=>{const[s,o,i,a,c]=r({required:["host","apiToken","cardId","requiredCustomFields"],optional:["customFields"]});n("host",s);const{getCard:u}=t(s,o);let l;if(c){l=JSON.parse(c)}else{({customFields:l}=await u(i))}e("customFields",l);const d={};const h={};l.forEach((({fieldId:e,label:t,value:r})=>{if(r!==null&&r!==undefined&&r!==""){d[e]=r;h[t.toLowerCase()]=r}}));e("customFieldsByLabel",h);e("customFieldsById",d);const p=a.split(/\s*,\s*/).map((e=>e.trim()));const m=[];for(const e of p){if(!(e.toLowerCase()in h||e in d)){m.push(e)}}if(m.length){throw new Error(`Card is missing required custom fields: ${m.join(", ")}`)}})().catch((e=>{s("validateCustomFields",e)}))})();module.exports=r})(); \ No newline at end of file