diff --git a/dist/index.js b/dist/index.js index 8508121..267d745 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -(()=>{var t={7351:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.issue=e.issueCommand=void 0;const o=n(s(2037));const a=s(5278);function issueCommand(t,e,s){const i=new Command(t,e,s);process.stdout.write(i.toString()+o.EOL)}e.issueCommand=issueCommand;function issue(t,e=""){issueCommand(t,{},e)}e.issue=issue;const c="::";class Command{constructor(t,e,s){if(!t){t="missing.command"}this.command=t;this.properties=e;this.message=s}toString(){let t=c+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";let e=true;for(const s in this.properties){if(this.properties.hasOwnProperty(s)){const i=this.properties[s];if(i){if(e){e=false}else{t+=","}t+=`${s}=${escapeProperty(i)}`}}}}t+=`${c}${escapeData(this.message)}`;return t}}function escapeData(t){return a.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(t){return a.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};var o=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.getIDToken=e.getState=e.saveState=e.group=e.endGroup=e.startGroup=e.info=e.notice=e.warning=e.error=e.debug=e.isDebug=e.setFailed=e.setCommandEcho=e.setOutput=e.getBooleanInput=e.getMultilineInput=e.getInput=e.addPath=e.setSecret=e.exportVariable=e.ExitCode=void 0;const a=s(7351);const c=s(717);const l=s(5278);const h=n(s(2037));const u=n(s(1017));const f=s(8041);var d;(function(t){t[t["Success"]=0]="Success";t[t["Failure"]=1]="Failure"})(d=e.ExitCode||(e.ExitCode={}));function exportVariable(t,e){const s=l.toCommandValue(e);process.env[t]=s;const i=process.env["GITHUB_ENV"]||"";if(i){return c.issueFileCommand("ENV",c.prepareKeyValueMessage(t,e))}a.issueCommand("set-env",{name:t},s)}e.exportVariable=exportVariable;function setSecret(t){a.issueCommand("add-mask",{},t)}e.setSecret=setSecret;function addPath(t){const e=process.env["GITHUB_PATH"]||"";if(e){c.issueFileCommand("PATH",t)}else{a.issueCommand("add-path",{},t)}process.env["PATH"]=`${t}${u.delimiter}${process.env["PATH"]}`}e.addPath=addPath;function getInput(t,e){const s=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!s){throw new Error(`Input required and not supplied: ${t}`)}if(e&&e.trimWhitespace===false){return s}return s.trim()}e.getInput=getInput;function getMultilineInput(t,e){const s=getInput(t,e).split("\n").filter((t=>t!==""));if(e&&e.trimWhitespace===false){return s}return s.map((t=>t.trim()))}e.getMultilineInput=getMultilineInput;function getBooleanInput(t,e){const s=["true","True","TRUE"];const i=["false","False","FALSE"];const r=getInput(t,e);if(s.includes(r))return true;if(i.includes(r))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}e.getBooleanInput=getBooleanInput;function setOutput(t,e){const s=process.env["GITHUB_OUTPUT"]||"";if(s){return c.issueFileCommand("OUTPUT",c.prepareKeyValueMessage(t,e))}process.stdout.write(h.EOL);a.issueCommand("set-output",{name:t},l.toCommandValue(e))}e.setOutput=setOutput;function setCommandEcho(t){a.issue("echo",t?"on":"off")}e.setCommandEcho=setCommandEcho;function setFailed(t){process.exitCode=d.Failure;error(t)}e.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}e.isDebug=isDebug;function debug(t){a.issueCommand("debug",{},t)}e.debug=debug;function error(t,e={}){a.issueCommand("error",l.toCommandProperties(e),t instanceof Error?t.toString():t)}e.error=error;function warning(t,e={}){a.issueCommand("warning",l.toCommandProperties(e),t instanceof Error?t.toString():t)}e.warning=warning;function notice(t,e={}){a.issueCommand("notice",l.toCommandProperties(e),t instanceof Error?t.toString():t)}e.notice=notice;function info(t){process.stdout.write(t+h.EOL)}e.info=info;function startGroup(t){a.issue("group",t)}e.startGroup=startGroup;function endGroup(){a.issue("endgroup")}e.endGroup=endGroup;function group(t,e){return o(this,void 0,void 0,(function*(){startGroup(t);let s;try{s=yield e()}finally{endGroup()}return s}))}e.group=group;function saveState(t,e){const s=process.env["GITHUB_STATE"]||"";if(s){return c.issueFileCommand("STATE",c.prepareKeyValueMessage(t,e))}a.issueCommand("save-state",{name:t},l.toCommandValue(e))}e.saveState=saveState;function getState(t){return process.env[`STATE_${t}`]||""}e.getState=getState;function getIDToken(t){return o(this,void 0,void 0,(function*(){return yield f.OidcClient.getIDToken(t)}))}e.getIDToken=getIDToken;var p=s(1327);Object.defineProperty(e,"summary",{enumerable:true,get:function(){return p.summary}});var g=s(1327);Object.defineProperty(e,"markdownSummary",{enumerable:true,get:function(){return g.markdownSummary}});var y=s(2981);Object.defineProperty(e,"toPosixPath",{enumerable:true,get:function(){return y.toPosixPath}});Object.defineProperty(e,"toWin32Path",{enumerable:true,get:function(){return y.toWin32Path}});Object.defineProperty(e,"toPlatformPath",{enumerable:true,get:function(){return y.toPlatformPath}})},717:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.prepareKeyValueMessage=e.issueFileCommand=void 0;const o=n(s(7147));const a=n(s(2037));const c=s(5840);const l=s(5278);function issueFileCommand(t,e){const s=process.env[`GITHUB_${t}`];if(!s){throw new Error(`Unable to find environment variable for file command ${t}`)}if(!o.existsSync(s)){throw new Error(`Missing file at path: ${s}`)}o.appendFileSync(s,`${l.toCommandValue(e)}${a.EOL}`,{encoding:"utf8"})}e.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(t,e){const s=`ghadelimiter_${c.v4()}`;const i=l.toCommandValue(e);if(t.includes(s)){throw new Error(`Unexpected input: name should not contain the delimiter "${s}"`)}if(i.includes(s)){throw new Error(`Unexpected input: value should not contain the delimiter "${s}"`)}return`${t}<<${s}${a.EOL}${i}${a.EOL}${s}`}e.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(t,e,s){"use strict";var i=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.OidcClient=void 0;const r=s(6255);const n=s(5526);const o=s(2186);class OidcClient{static createHttpClient(t=true,e=10){const s={allowRetries:t,maxRetries:e};return new r.HttpClient("actions/oidc-client",[new n.BearerCredentialHandler(OidcClient.getRequestToken())],s)}static getRequestToken(){const t=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!t){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return t}static getIDTokenUrl(){const t=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!t){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return t}static getCall(t){var e;return i(this,void 0,void 0,(function*(){const s=OidcClient.createHttpClient();const i=yield s.getJson(t).catch((t=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${t.statusCode}\n \n Error Message: ${t.result.message}`)}));const r=(e=i.result)===null||e===void 0?void 0:e.value;if(!r){throw new Error("Response json body do not have ID Token field")}return r}))}static getIDToken(t){return i(this,void 0,void 0,(function*(){try{let e=OidcClient.getIDTokenUrl();if(t){const s=encodeURIComponent(t);e=`${e}&audience=${s}`}o.debug(`ID token url is ${e}`);const s=yield OidcClient.getCall(e);o.setSecret(s);return s}catch(t){throw new Error(`Error message: ${t.message}`)}}))}}e.OidcClient=OidcClient},2981:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.toPlatformPath=e.toWin32Path=e.toPosixPath=void 0;const o=n(s(1017));function toPosixPath(t){return t.replace(/[\\]/g,"/")}e.toPosixPath=toPosixPath;function toWin32Path(t){return t.replace(/[/]/g,"\\")}e.toWin32Path=toWin32Path;function toPlatformPath(t){return t.replace(/[/\\]/g,o.sep)}e.toPlatformPath=toPlatformPath},1327:function(t,e,s){"use strict";var i=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.summary=e.markdownSummary=e.SUMMARY_DOCS_URL=e.SUMMARY_ENV_VAR=void 0;const r=s(2037);const n=s(7147);const{access:o,appendFile:a,writeFile:c}=n.promises;e.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";e.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 i(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const t=process.env[e.SUMMARY_ENV_VAR];if(!t){throw new Error(`Unable to find environment variable for $${e.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield o(t,n.constants.R_OK|n.constants.W_OK)}catch(e){throw new Error(`Unable to access summary file: '${t}'. Check if the file has correct read/write permissions.`)}this._filePath=t;return this._filePath}))}wrap(t,e,s={}){const i=Object.entries(s).map((([t,e])=>` ${t}="${e}"`)).join("");if(!e){return`<${t}${i}>`}return`<${t}${i}>${e}`}write(t){return i(this,void 0,void 0,(function*(){const e=!!(t===null||t===void 0?void 0:t.overwrite);const s=yield this.filePath();const i=e?c:a;yield i(s,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return i(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(t,e=false){this._buffer+=t;return e?this.addEOL():this}addEOL(){return this.addRaw(r.EOL)}addCodeBlock(t,e){const s=Object.assign({},e&&{lang:e});const i=this.wrap("pre",this.wrap("code",t),s);return this.addRaw(i).addEOL()}addList(t,e=false){const s=e?"ol":"ul";const i=t.map((t=>this.wrap("li",t))).join("");const r=this.wrap(s,i);return this.addRaw(r).addEOL()}addTable(t){const e=t.map((t=>{const e=t.map((t=>{if(typeof t==="string"){return this.wrap("td",t)}const{header:e,data:s,colspan:i,rowspan:r}=t;const n=e?"th":"td";const o=Object.assign(Object.assign({},i&&{colspan:i}),r&&{rowspan:r});return this.wrap(n,s,o)})).join("");return this.wrap("tr",e)})).join("");const s=this.wrap("table",e);return this.addRaw(s).addEOL()}addDetails(t,e){const s=this.wrap("details",this.wrap("summary",t)+e);return this.addRaw(s).addEOL()}addImage(t,e,s){const{width:i,height:r}=s||{};const n=Object.assign(Object.assign({},i&&{width:i}),r&&{height:r});const o=this.wrap("img",null,Object.assign({src:t,alt:e},n));return this.addRaw(o).addEOL()}addHeading(t,e){const s=`h${e}`;const i=["h1","h2","h3","h4","h5","h6"].includes(s)?s:"h1";const r=this.wrap(i,t);return this.addRaw(r).addEOL()}addSeparator(){const t=this.wrap("hr",null);return this.addRaw(t).addEOL()}addBreak(){const t=this.wrap("br",null);return this.addRaw(t).addEOL()}addQuote(t,e){const s=Object.assign({},e&&{cite:e});const i=this.wrap("blockquote",t,s);return this.addRaw(i).addEOL()}addLink(t,e){const s=this.wrap("a",t,{href:e});return this.addRaw(s).addEOL()}}const l=new Summary;e.markdownSummary=l;e.summary=l},5278:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.toCommandProperties=e.toCommandValue=void 0;function toCommandValue(t){if(t===null||t===undefined){return""}else if(typeof t==="string"||t instanceof String){return t}return JSON.stringify(t)}e.toCommandValue=toCommandValue;function toCommandProperties(t){if(!Object.keys(t).length){return{}}return{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}}e.toCommandProperties=toCommandProperties},5526:function(t,e){"use strict";var s=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.PersonalAccessTokenCredentialHandler=e.BearerCredentialHandler=e.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(t,e){this.username=t;this.password=e}prepareRequest(t){if(!t.headers){throw Error("The request has no headers")}t.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}e.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(t){this.token=t}prepareRequest(t){if(!t.headers){throw Error("The request has no headers")}t.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}e.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(t){this.token=t}prepareRequest(t){if(!t.headers){throw Error("The request has no headers")}t.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}e.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};var o=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.HttpClient=e.isHttps=e.HttpClientResponse=e.HttpClientError=e.getProxyUrl=e.MediaTypes=e.Headers=e.HttpCodes=void 0;const a=n(s(3685));const c=n(s(5687));const l=n(s(9835));const h=n(s(4294));var u;(function(t){t[t["OK"]=200]="OK";t[t["MultipleChoices"]=300]="MultipleChoices";t[t["MovedPermanently"]=301]="MovedPermanently";t[t["ResourceMoved"]=302]="ResourceMoved";t[t["SeeOther"]=303]="SeeOther";t[t["NotModified"]=304]="NotModified";t[t["UseProxy"]=305]="UseProxy";t[t["SwitchProxy"]=306]="SwitchProxy";t[t["TemporaryRedirect"]=307]="TemporaryRedirect";t[t["PermanentRedirect"]=308]="PermanentRedirect";t[t["BadRequest"]=400]="BadRequest";t[t["Unauthorized"]=401]="Unauthorized";t[t["PaymentRequired"]=402]="PaymentRequired";t[t["Forbidden"]=403]="Forbidden";t[t["NotFound"]=404]="NotFound";t[t["MethodNotAllowed"]=405]="MethodNotAllowed";t[t["NotAcceptable"]=406]="NotAcceptable";t[t["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";t[t["RequestTimeout"]=408]="RequestTimeout";t[t["Conflict"]=409]="Conflict";t[t["Gone"]=410]="Gone";t[t["TooManyRequests"]=429]="TooManyRequests";t[t["InternalServerError"]=500]="InternalServerError";t[t["NotImplemented"]=501]="NotImplemented";t[t["BadGateway"]=502]="BadGateway";t[t["ServiceUnavailable"]=503]="ServiceUnavailable";t[t["GatewayTimeout"]=504]="GatewayTimeout"})(u=e.HttpCodes||(e.HttpCodes={}));var f;(function(t){t["Accept"]="accept";t["ContentType"]="content-type"})(f=e.Headers||(e.Headers={}));var d;(function(t){t["ApplicationJson"]="application/json"})(d=e.MediaTypes||(e.MediaTypes={}));function getProxyUrl(t){const e=l.getProxyUrl(new URL(t));return e?e.href:""}e.getProxyUrl=getProxyUrl;const p=[u.MovedPermanently,u.ResourceMoved,u.SeeOther,u.TemporaryRedirect,u.PermanentRedirect];const g=[u.BadGateway,u.ServiceUnavailable,u.GatewayTimeout];const y=["OPTIONS","GET","DELETE","HEAD"];const w=10;const v=5;class HttpClientError extends Error{constructor(t,e){super(t);this.name="HttpClientError";this.statusCode=e;Object.setPrototypeOf(this,HttpClientError.prototype)}}e.HttpClientError=HttpClientError;class HttpClientResponse{constructor(t){this.message=t}readBody(){return o(this,void 0,void 0,(function*(){return new Promise((t=>o(this,void 0,void 0,(function*(){let e=Buffer.alloc(0);this.message.on("data",(t=>{e=Buffer.concat([e,t])}));this.message.on("end",(()=>{t(e.toString())}))}))))}))}}e.HttpClientResponse=HttpClientResponse;function isHttps(t){const e=new URL(t);return e.protocol==="https:"}e.isHttps=isHttps;class HttpClient{constructor(t,e,s){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=t;this.handlers=e||[];this.requestOptions=s;if(s){if(s.ignoreSslError!=null){this._ignoreSslError=s.ignoreSslError}this._socketTimeout=s.socketTimeout;if(s.allowRedirects!=null){this._allowRedirects=s.allowRedirects}if(s.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=s.allowRedirectDowngrade}if(s.maxRedirects!=null){this._maxRedirects=Math.max(s.maxRedirects,0)}if(s.keepAlive!=null){this._keepAlive=s.keepAlive}if(s.allowRetries!=null){this._allowRetries=s.allowRetries}if(s.maxRetries!=null){this._maxRetries=s.maxRetries}}}options(t,e){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",t,null,e||{})}))}get(t,e){return o(this,void 0,void 0,(function*(){return this.request("GET",t,null,e||{})}))}del(t,e){return o(this,void 0,void 0,(function*(){return this.request("DELETE",t,null,e||{})}))}post(t,e,s){return o(this,void 0,void 0,(function*(){return this.request("POST",t,e,s||{})}))}patch(t,e,s){return o(this,void 0,void 0,(function*(){return this.request("PATCH",t,e,s||{})}))}put(t,e,s){return o(this,void 0,void 0,(function*(){return this.request("PUT",t,e,s||{})}))}head(t,e){return o(this,void 0,void 0,(function*(){return this.request("HEAD",t,null,e||{})}))}sendStream(t,e,s,i){return o(this,void 0,void 0,(function*(){return this.request(t,e,s,i)}))}getJson(t,e={}){return o(this,void 0,void 0,(function*(){e[f.Accept]=this._getExistingOrDefaultHeader(e,f.Accept,d.ApplicationJson);const s=yield this.get(t,e);return this._processResponse(s,this.requestOptions)}))}postJson(t,e,s={}){return o(this,void 0,void 0,(function*(){const i=JSON.stringify(e,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,d.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,d.ApplicationJson);const r=yield this.post(t,i,s);return this._processResponse(r,this.requestOptions)}))}putJson(t,e,s={}){return o(this,void 0,void 0,(function*(){const i=JSON.stringify(e,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,d.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,d.ApplicationJson);const r=yield this.put(t,i,s);return this._processResponse(r,this.requestOptions)}))}patchJson(t,e,s={}){return o(this,void 0,void 0,(function*(){const i=JSON.stringify(e,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,d.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,d.ApplicationJson);const r=yield this.patch(t,i,s);return this._processResponse(r,this.requestOptions)}))}request(t,e,s,i){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const r=new URL(e);let n=this._prepareRequest(t,r,i);const o=this._allowRetries&&y.includes(t)?this._maxRetries+1:1;let a=0;let c;do{c=yield this.requestRaw(n,s);if(c&&c.message&&c.message.statusCode===u.Unauthorized){let t;for(const e of this.handlers){if(e.canHandleAuthentication(c)){t=e;break}}if(t){return t.handleAuthentication(this,n,s)}else{return c}}let e=this._maxRedirects;while(c.message.statusCode&&p.includes(c.message.statusCode)&&this._allowRedirects&&e>0){const o=c.message.headers["location"];if(!o){break}const a=new URL(o);if(r.protocol==="https:"&&r.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!==r.hostname){for(const t in i){if(t.toLowerCase()==="authorization"){delete i[t]}}}n=this._prepareRequest(t,a,i);c=yield this.requestRaw(n,s);e--}if(!c.message.statusCode||!g.includes(c.message.statusCode)){return c}a+=1;if(a{function callbackForResult(t,e){if(t){i(t)}else if(!e){i(new Error("Unknown error"))}else{s(e)}}this.requestRawWithCallback(t,e,callbackForResult)}))}))}requestRawWithCallback(t,e,s){if(typeof e==="string"){if(!t.options.headers){t.options.headers={}}t.options.headers["Content-Length"]=Buffer.byteLength(e,"utf8")}let i=false;function handleResult(t,e){if(!i){i=true;s(t,e)}}const r=t.httpModule.request(t.options,(t=>{const e=new HttpClientResponse(t);handleResult(undefined,e)}));let n;r.on("socket",(t=>{n=t}));r.setTimeout(this._socketTimeout||3*6e4,(()=>{if(n){n.end()}handleResult(new Error(`Request timeout: ${t.options.path}`))}));r.on("error",(function(t){handleResult(t)}));if(e&&typeof e==="string"){r.write(e,"utf8")}if(e&&typeof e!=="string"){e.on("close",(function(){r.end()}));e.pipe(r)}else{r.end()}}getAgent(t){const e=new URL(t);return this._getAgent(e)}_prepareRequest(t,e,s){const i={};i.parsedUrl=e;const r=i.parsedUrl.protocol==="https:";i.httpModule=r?c:a;const n=r?443:80;i.options={};i.options.host=i.parsedUrl.hostname;i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):n;i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||"");i.options.method=t;i.options.headers=this._mergeHeaders(s);if(this.userAgent!=null){i.options.headers["user-agent"]=this.userAgent}i.options.agent=this._getAgent(i.parsedUrl);if(this.handlers){for(const t of this.handlers){t.prepareRequest(i.options)}}return i}_mergeHeaders(t){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(t||{}))}return lowercaseKeys(t||{})}_getExistingOrDefaultHeader(t,e,s){let i;if(this.requestOptions&&this.requestOptions.headers){i=lowercaseKeys(this.requestOptions.headers)[e]}return t[e]||i||s}_getAgent(t){let e;const s=l.getProxyUrl(t);const i=s&&s.hostname;if(this._keepAlive&&i){e=this._proxyAgent}if(this._keepAlive&&!i){e=this._agent}if(e){return e}const r=t.protocol==="https:";let n=100;if(this.requestOptions){n=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(s&&s.hostname){const t={maxSockets:n,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(s.username||s.password)&&{proxyAuth:`${s.username}:${s.password}`}),{host:s.hostname,port:s.port})};let i;const o=s.protocol==="https:";if(r){i=o?h.httpsOverHttps:h.httpsOverHttp}else{i=o?h.httpOverHttps:h.httpOverHttp}e=i(t);this._proxyAgent=e}if(this._keepAlive&&!e){const t={keepAlive:this._keepAlive,maxSockets:n};e=r?new c.Agent(t):new a.Agent(t);this._agent=e}if(!e){e=r?c.globalAgent:a.globalAgent}if(r&&this._ignoreSslError){e.options=Object.assign(e.options||{},{rejectUnauthorized:false})}return e}_performExponentialBackoff(t){return o(this,void 0,void 0,(function*(){t=Math.min(w,t);const e=v*Math.pow(2,t);return new Promise((t=>setTimeout((()=>t()),e)))}))}_processResponse(t,e){return o(this,void 0,void 0,(function*(){return new Promise(((s,i)=>o(this,void 0,void 0,(function*(){const r=t.message.statusCode||0;const n={statusCode:r,result:null,headers:{}};if(r===u.NotFound){s(n)}function dateTimeDeserializer(t,e){if(typeof e==="string"){const t=new Date(e);if(!isNaN(t.valueOf())){return t}}return e}let o;let a;try{a=yield t.readBody();if(a&&a.length>0){if(e&&e.deserializeDates){o=JSON.parse(a,dateTimeDeserializer)}else{o=JSON.parse(a)}n.result=o}n.headers=t.message.headers}catch(t){}if(r>299){let t;if(o&&o.message){t=o.message}else if(a&&a.length>0){t=a}else{t=`Failed request: (${r})`}const e=new HttpClientError(t,r);e.result=n.result;i(e)}else{s(n)}}))))}))}}e.HttpClient=HttpClient;const lowercaseKeys=t=>Object.keys(t).reduce(((e,s)=>(e[s.toLowerCase()]=t[s],e)),{})},9835:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.checkBypass=e.getProxyUrl=void 0;function getProxyUrl(t){const e=t.protocol==="https:";if(checkBypass(t)){return undefined}const s=(()=>{if(e){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(s){return new URL(s)}else{return undefined}}e.getProxyUrl=getProxyUrl;function checkBypass(t){if(!t.hostname){return false}const e=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!e){return false}let s;if(t.port){s=Number(t.port)}else if(t.protocol==="http:"){s=80}else if(t.protocol==="https:"){s=443}const i=[t.hostname.toUpperCase()];if(typeof s==="number"){i.push(`${i[0]}:${s}`)}for(const t of e.split(",").map((t=>t.trim().toUpperCase())).filter((t=>t))){if(i.some((e=>e===t))){return true}}return false}e.checkBypass=checkBypass},9417:t=>{"use strict";t.exports=balanced;function balanced(t,e,s){if(t instanceof RegExp)t=maybeMatch(t,s);if(e instanceof RegExp)e=maybeMatch(e,s);var i=range(t,e,s);return i&&{start:i[0],end:i[1],pre:s.slice(0,i[0]),body:s.slice(i[0]+t.length,i[1]),post:s.slice(i[1]+e.length)}}function maybeMatch(t,e){var s=e.match(t);return s?s[0]:null}balanced.range=range;function range(t,e,s){var i,r,n,o,a;var c=s.indexOf(t);var l=s.indexOf(e,c+1);var h=c;if(c>=0&&l>0){i=[];n=s.length;while(h>=0&&!a){if(h==c){i.push(h);c=s.indexOf(t,h+1)}else if(i.length==1){a=[i.pop(),l]}else{r=i.pop();if(r=0?c:l}if(i.length){a=[n,o]}}return a}},3717:(t,e,s)=>{var i=s(6891);var r=s(9417);t.exports=expandTop;var n="\0SLASH"+Math.random()+"\0";var o="\0OPEN"+Math.random()+"\0";var a="\0CLOSE"+Math.random()+"\0";var c="\0COMMA"+Math.random()+"\0";var l="\0PERIOD"+Math.random()+"\0";function numeric(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function escapeBraces(t){return t.split("\\\\").join(n).split("\\{").join(o).split("\\}").join(a).split("\\,").join(c).split("\\.").join(l)}function unescapeBraces(t){return t.split(n).join("\\").split(o).join("{").split(a).join("}").split(c).join(",").split(l).join(".")}function parseCommaParts(t){if(!t)return[""];var e=[];var s=r("{","}",t);if(!s)return t.split(",");var i=s.pre;var n=s.body;var o=s.post;var a=i.split(",");a[a.length-1]+="{"+n+"}";var c=parseCommaParts(o);if(o.length){a[a.length-1]+=c.shift();a.push.apply(a,c)}e.push.apply(e,a);return e}function expandTop(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return expand(escapeBraces(t),true).map(unescapeBraces)}function identity(t){return t}function embrace(t){return"{"+t+"}"}function isPadded(t){return/^-?0\d/.test(t)}function lte(t,e){return t<=e}function gte(t,e){return t>=e}function expand(t,e){var s=[];var n=r("{","}",t);if(!n||/\$$/.test(n.pre))return[t];var o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body);var c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body);var l=o||c;var h=n.body.indexOf(",")>=0;if(!l&&!h){if(n.post.match(/,.*\}/)){t=n.pre+"{"+n.body+a+n.post;return expand(t)}return[t]}var u;if(l){u=n.body.split(/\.\./)}else{u=parseCommaParts(n.body);if(u.length===1){u=expand(u[0],false).map(embrace);if(u.length===1){var f=n.post.length?expand(n.post,false):[""];return f.map((function(t){return n.pre+u[0]+t}))}}}var d=n.pre;var f=n.post.length?expand(n.post,false):[""];var p;if(l){var g=numeric(u[0]);var y=numeric(u[1]);var w=Math.max(u[0].length,u[1].length);var v=u.length==3?Math.abs(numeric(u[2])):1;var b=lte;var S=y0){var P=new Array(R+1).join("0");if(_<0)O="-"+P+O.slice(1);else O=P+O}}}p.push(O)}}else{p=i(u,(function(t){return expand(t,false)}))}for(var T=0;T{t.exports=function(t,s){var i=[];for(var r=0;r{var i=s(9417);t.exports=expandTop;var r="\0SLASH"+Math.random()+"\0";var n="\0OPEN"+Math.random()+"\0";var o="\0CLOSE"+Math.random()+"\0";var a="\0COMMA"+Math.random()+"\0";var c="\0PERIOD"+Math.random()+"\0";function numeric(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function escapeBraces(t){return t.split("\\\\").join(r).split("\\{").join(n).split("\\}").join(o).split("\\,").join(a).split("\\.").join(c)}function unescapeBraces(t){return t.split(r).join("\\").split(n).join("{").split(o).join("}").split(a).join(",").split(c).join(".")}function parseCommaParts(t){if(!t)return[""];var e=[];var s=i("{","}",t);if(!s)return t.split(",");var r=s.pre;var n=s.body;var o=s.post;var a=r.split(",");a[a.length-1]+="{"+n+"}";var c=parseCommaParts(o);if(o.length){a[a.length-1]+=c.shift();a.push.apply(a,c)}e.push.apply(e,a);return e}function expandTop(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return expand(escapeBraces(t),true).map(unescapeBraces)}function embrace(t){return"{"+t+"}"}function isPadded(t){return/^-?0\d/.test(t)}function lte(t,e){return t<=e}function gte(t,e){return t>=e}function expand(t,e){var s=[];var r=i("{","}",t);if(!r)return[t];var n=r.pre;var a=r.post.length?expand(r.post,false):[""];if(/\$$/.test(r.pre)){for(var c=0;c=0;if(!f&&!d){if(r.post.match(/,.*\}/)){t=r.pre+"{"+r.body+o+r.post;return expand(t)}return[t]}var p;if(f){p=r.body.split(/\.\./)}else{p=parseCommaParts(r.body);if(p.length===1){p=expand(p[0],false).map(embrace);if(p.length===1){return a.map((function(t){return r.pre+p[0]+t}))}}}var g;if(f){var y=numeric(p[0]);var w=numeric(p[1]);var v=Math.max(p[0].length,p[1].length);var b=p.length==3?Math.abs(numeric(p[2])):1;var S=lte;var E=w0){var T=new Array(P+1).join("0");if(O<0)R="-"+T+R.slice(1);else R=T+R}}}g.push(R)}}else{g=[];for(var x=0;x{t.exports=minimatch;minimatch.Minimatch=Minimatch;var i=function(){try{return s(1017)}catch(t){}}()||{sep:"/"};minimatch.sep=i.sep;var r=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var n=s(3717);var o={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var a="[^/]";var c=a+"*?";var l="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var h="(?:(?!(?:\\/|^)\\.).)*?";var u=charSet("().*{}+?[]^$\\!");function charSet(t){return t.split("").reduce((function(t,e){t[e]=true;return t}),{})}var f=/\/+/;minimatch.filter=filter;function filter(t,e){e=e||{};return function(s,i,r){return minimatch(s,t,e)}}function ext(t,e){e=e||{};var s={};Object.keys(t).forEach((function(e){s[e]=t[e]}));Object.keys(e).forEach((function(t){s[t]=e[t]}));return s}minimatch.defaults=function(t){if(!t||typeof t!=="object"||!Object.keys(t).length){return minimatch}var e=minimatch;var s=function minimatch(s,i,r){return e(s,i,ext(t,r))};s.Minimatch=function Minimatch(s,i){return new e.Minimatch(s,ext(t,i))};s.Minimatch.defaults=function defaults(s){return e.defaults(ext(t,s)).Minimatch};s.filter=function filter(s,i){return e.filter(s,ext(t,i))};s.defaults=function defaults(s){return e.defaults(ext(t,s))};s.makeRe=function makeRe(s,i){return e.makeRe(s,ext(t,i))};s.braceExpand=function braceExpand(s,i){return e.braceExpand(s,ext(t,i))};s.match=function(s,i,r){return e.match(s,i,ext(t,r))};return s};Minimatch.defaults=function(t){return minimatch.defaults(t).Minimatch};function minimatch(t,e,s){assertValidPattern(e);if(!s)s={};if(!s.nocomment&&e.charAt(0)==="#"){return false}return new Minimatch(e,s).match(t)}function Minimatch(t,e){if(!(this instanceof Minimatch)){return new Minimatch(t,e)}assertValidPattern(t);if(!e)e={};t=t.trim();if(!e.allowWindowsEscape&&i.sep!=="/"){t=t.split(i.sep).join("/")}this.options=e;this.set=[];this.pattern=t;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!e.partial;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){var t=this.pattern;var e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();var s=this.globSet=this.braceExpand();if(e.debug)this.debug=function debug(){console.error.apply(console,arguments)};this.debug(this.pattern,s);s=this.globParts=s.map((function(t){return t.split(f)}));this.debug(this.pattern,s);s=s.map((function(t,e,s){return t.map(this.parse,this)}),this);this.debug(this.pattern,s);s=s.filter((function(t){return t.indexOf(false)===-1}));this.debug(this.pattern,s);this.set=s}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var t=this.pattern;var e=false;var s=this.options;var i=0;if(s.nonegate)return;for(var r=0,n=t.length;rd){throw new TypeError("pattern is too long")}};Minimatch.prototype.parse=parse;var p={};function parse(t,e){assertValidPattern(t);var s=this.options;if(t==="**"){if(!s.noglobstar)return r;else t="*"}if(t==="")return"";var i="";var n=!!s.nocase;var l=false;var h=[];var f=[];var d;var g=false;var y=-1;var w=-1;var v=t.charAt(0)==="."?"":s.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var b=this;function clearStateChar(){if(d){switch(d){case"*":i+=c;n=true;break;case"?":i+=a;n=true;break;default:i+="\\"+d;break}b.debug("clearStateChar %j %j",d,i);d=false}}for(var S=0,E=t.length,_;S-1;A--){var C=f[A];var M=i.slice(0,C.reStart);var N=i.slice(C.reStart,C.reEnd-8);var L=i.slice(C.reEnd-8,C.reEnd);var j=i.slice(C.reEnd);L+=j;var D=M.split("(").length-1;var I=j;for(S=0;S=0;o--){n=t[o];if(n)break}for(o=0;o>> no match, partial?",t,u,e,f);if(u===a)return true}return false}var p;if(typeof l==="string"){p=h===l;this.debug("string match",l,h,p)}else{p=h.match(l);this.debug("pattern match",l,h,p)}if(!p)return false}if(n===a&&o===c){return true}else if(n===a){return s}else if(o===c){return n===a-1&&t[n]===""}throw new Error("wtf?")};function globUnescape(t){return t.replace(/\\(.)/g,"$1")}function regExpEscape(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},6715:(t,e,s)=>{var i=s(7147);var r=s(1017);var n=s(3973);function patternMatcher(t){return function(e,s){var i=new n.Minimatch(t,{matchBase:true});return(!i.negate||s.isFile())&&i.match(e)}}function toMatcherFunction(t){if(typeof t=="function"){return t}else{return patternMatcher(t)}}function readdir(t,e,s){if(typeof e=="function"){s=e;e=[]}if(!s){return new Promise((function(s,i){readdir(t,e||[],(function(t,e){if(t){i(t)}else{s(e)}}))}))}e=e.map(toMatcherFunction);var n=[];i.readdir(t,(function(o,a){if(o){return s(o)}var c=a.length;if(!c){return s(null,n)}a.forEach((function(o){var a=r.join(t,o);i.stat(a,(function(t,i){if(t){return s(t)}if(e.some((function(t){return t(a,i)}))){c-=1;if(!c){return s(null,n)}return null}if(i.isDirectory()){readdir(a,e,(function(t,e){if(t){return s(t)}n=n.concat(e);c-=1;if(!c){return s(null,n)}}))}else{n.push(a);c-=1;if(!c){return s(null,n)}}}))}))}))}t.exports=readdir},1574:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.defaultTmpSync=e.defaultTmp=void 0;const r=s(2037);const n=s(1017);const o=s(1990);const a=i(s(8304));const{stat:c}=o.promises;const isDirSync=t=>{try{return(0,o.statSync)(t).isDirectory()}catch(t){return false}};const isDir=t=>c(t).then((t=>t.isDirectory()),(()=>false));const win32DefaultTmp=async t=>{const{root:e}=(0,n.parse)(t);const s=(0,r.tmpdir)();const{root:i}=(0,n.parse)(s);if(e.toLowerCase()===i.toLowerCase()){return s}const o=(0,n.resolve)(e,"/temp");if(await isDir(o)){return o}return e};const win32DefaultTmpSync=t=>{const{root:e}=(0,n.parse)(t);const s=(0,r.tmpdir)();const{root:i}=(0,n.parse)(s);if(e.toLowerCase()===i.toLowerCase()){return s}const o=(0,n.resolve)(e,"/temp");if(isDirSync(o)){return o}return e};const posixDefaultTmp=async()=>(0,r.tmpdir)();const posixDefaultTmpSync=()=>(0,r.tmpdir)();e.defaultTmp=a.default==="win32"?win32DefaultTmp:posixDefaultTmp;e.defaultTmpSync=a.default==="win32"?win32DefaultTmpSync:posixDefaultTmpSync},8984:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.fixEPERMSync=e.fixEPERM=void 0;const i=s(1990);const{chmod:r}=i.promises;const fixEPERM=t=>async e=>{try{return await t(e)}catch(s){const i=s;if(i?.code==="ENOENT"){return}if(i?.code==="EPERM"){try{await r(e,438)}catch(t){const e=t;if(e?.code==="ENOENT"){return}throw s}return await t(e)}throw s}};e.fixEPERM=fixEPERM;const fixEPERMSync=t=>e=>{try{return t(e)}catch(s){const r=s;if(r?.code==="ENOENT"){return}if(r?.code==="EPERM"){try{(0,i.chmodSync)(e,438)}catch(t){const e=t;if(e?.code==="ENOENT"){return}throw s}return t(e)}throw s}};e.fixEPERMSync=fixEPERMSync},1990:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.promises=e.readdirSync=e.unlinkSync=e.lstatSync=e.statSync=e.rmSync=e.rmdirSync=e.renameSync=e.mkdirSync=e.chmodSync=void 0;const r=i(s(7147));var n=s(7147);Object.defineProperty(e,"chmodSync",{enumerable:true,get:function(){return n.chmodSync}});Object.defineProperty(e,"mkdirSync",{enumerable:true,get:function(){return n.mkdirSync}});Object.defineProperty(e,"renameSync",{enumerable:true,get:function(){return n.renameSync}});Object.defineProperty(e,"rmdirSync",{enumerable:true,get:function(){return n.rmdirSync}});Object.defineProperty(e,"rmSync",{enumerable:true,get:function(){return n.rmSync}});Object.defineProperty(e,"statSync",{enumerable:true,get:function(){return n.statSync}});Object.defineProperty(e,"lstatSync",{enumerable:true,get:function(){return n.lstatSync}});Object.defineProperty(e,"unlinkSync",{enumerable:true,get:function(){return n.unlinkSync}});const o=s(7147);const readdirSync=t=>(0,o.readdirSync)(t,{withFileTypes:true});e.readdirSync=readdirSync;const chmod=(t,e)=>new Promise(((s,i)=>r.default.chmod(t,e,((t,...e)=>t?i(t):s(...e)))));const mkdir=(t,e)=>new Promise(((s,i)=>r.default.mkdir(t,e,((t,e)=>t?i(t):s(e)))));const readdir=t=>new Promise(((e,s)=>r.default.readdir(t,{withFileTypes:true},((t,i)=>t?s(t):e(i)))));const rename=(t,e)=>new Promise(((s,i)=>r.default.rename(t,e,((t,...e)=>t?i(t):s(...e)))));const rm=(t,e)=>new Promise(((s,i)=>r.default.rm(t,e,((t,...e)=>t?i(t):s(...e)))));const rmdir=t=>new Promise(((e,s)=>r.default.rmdir(t,((t,...i)=>t?s(t):e(...i)))));const stat=t=>new Promise(((e,s)=>r.default.stat(t,((t,i)=>t?s(t):e(i)))));const lstat=t=>new Promise(((e,s)=>r.default.lstat(t,((t,i)=>t?s(t):e(i)))));const unlink=t=>new Promise(((e,s)=>r.default.unlink(t,((t,...i)=>t?s(t):e(...i)))));e.promises={chmod:chmod,mkdir:mkdir,readdir:readdir,rename:rename,rm:rm,rmdir:rmdir,stat:stat,lstat:lstat,unlink:unlink}},1562:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ignoreENOENTSync=e.ignoreENOENT=void 0;const ignoreENOENT=async t=>t.catch((t=>{if(t.code!=="ENOENT"){throw t}}));e.ignoreENOENT=ignoreENOENT;const ignoreENOENTSync=t=>{try{return t()}catch(t){if(t?.code!=="ENOENT"){throw t}}};e.ignoreENOENTSync=ignoreENOENTSync},6284:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.rimraf=e.sync=e.rimrafSync=e.moveRemove=e.moveRemoveSync=e.posix=e.posixSync=e.windows=e.windowsSync=e.manual=e.manualSync=e.native=e.nativeSync=e.assertRimrafOptions=e.isRimrafOptions=void 0;const r=s(5565);const n=i(s(7050));const o=s(3277);const typeOrUndef=(t,e)=>typeof t==="undefined"||typeof t===e;const isRimrafOptions=t=>!!t&&typeof t==="object"&&typeOrUndef(t.preserveRoot,"boolean")&&typeOrUndef(t.tmp,"string")&&typeOrUndef(t.maxRetries,"number")&&typeOrUndef(t.retryDelay,"number")&&typeOrUndef(t.backoff,"number")&&typeOrUndef(t.maxBackoff,"number")&&(typeOrUndef(t.glob,"boolean")||t.glob&&typeof t.glob==="object")&&typeOrUndef(t.filter,"function");e.isRimrafOptions=isRimrafOptions;const assertRimrafOptions=t=>{if(!(0,e.isRimrafOptions)(t)){throw new Error("invalid rimraf options")}};e.assertRimrafOptions=assertRimrafOptions;const a=s(5279);const c=s(1689);const l=s(3689);const h=s(3018);const u=s(2510);const f=s(5828);const wrap=t=>async(e,s)=>{const i=(0,r.optArg)(s);if(i.glob){e=await(0,o.glob)(e,i.glob)}if(Array.isArray(e)){return!!(await Promise.all(e.map((e=>t((0,n.default)(e,i),i))))).reduce(((t,e)=>t&&e),true)}else{return!!await t((0,n.default)(e,i),i)}};const wrapSync=t=>(e,s)=>{const i=(0,r.optArgSync)(s);if(i.glob){e=(0,o.globSync)(e,i.glob)}if(Array.isArray(e)){return!!e.map((e=>t((0,n.default)(e,i),i))).reduce(((t,e)=>t&&e),true)}else{return!!t((0,n.default)(e,i),i)}};e.nativeSync=wrapSync(l.rimrafNativeSync);e.native=Object.assign(wrap(l.rimrafNative),{sync:e.nativeSync});e.manualSync=wrapSync(a.rimrafManualSync);e.manual=Object.assign(wrap(a.rimrafManual),{sync:e.manualSync});e.windowsSync=wrapSync(u.rimrafWindowsSync);e.windows=Object.assign(wrap(u.rimrafWindows),{sync:e.windowsSync});e.posixSync=wrapSync(h.rimrafPosixSync);e.posix=Object.assign(wrap(h.rimrafPosix),{sync:e.posixSync});e.moveRemoveSync=wrapSync(c.rimrafMoveRemoveSync);e.moveRemove=Object.assign(wrap(c.rimrafMoveRemove),{sync:e.moveRemoveSync});e.rimrafSync=wrapSync(((t,e)=>(0,f.useNativeSync)(e)?(0,l.rimrafNativeSync)(t,e):(0,a.rimrafManualSync)(t,e)));e.sync=e.rimrafSync;const d=wrap(((t,e)=>(0,f.useNative)(e)?(0,l.rimrafNative)(t,e):(0,a.rimrafManual)(t,e)));e.rimraf=Object.assign(d,{rimraf:d,sync:e.rimrafSync,rimrafSync:e.rimrafSync,manual:e.manual,manualSync:e.manualSync,native:e.native,nativeSync:e.nativeSync,posix:e.posix,posixSync:e.posixSync,windows:e.windows,windowsSync:e.windowsSync,moveRemove:e.moveRemove,moveRemoveSync:e.moveRemoveSync});e.rimraf.rimraf=e.rimraf},5565:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.optArgSync=e.optArg=void 0;const i=s(6284);const optArgT=t=>{(0,i.assertRimrafOptions)(t);const{glob:e,...s}=t;if(!e){return s}const r=e===true?t.signal?{signal:t.signal}:{}:t.signal?{signal:t.signal,...e}:e;return{...s,glob:{...r,absolute:true,withFileTypes:false}}};const optArg=(t={})=>optArgT(t);e.optArg=optArg;const optArgSync=(t={})=>optArgT(t);e.optArgSync=optArgSync},7050:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const r=s(1017);const n=s(3837);const o=i(s(8304));const pathArg=(t,e={})=>{const s=typeof t;if(s!=="string"){const e=t&&s==="object"&&t.constructor;const i=e&&e.name?`an instance of ${e.name}`:s==="object"?(0,n.inspect)(t):`type ${s} ${t}`;const r='The "path" argument must be of type string. '+`Received ${i}`;throw Object.assign(new TypeError(r),{path:t,code:"ERR_INVALID_ARG_TYPE"})}if(/\0/.test(t)){const e="path must be a string without null bytes";throw Object.assign(new TypeError(e),{path:t,code:"ERR_INVALID_ARG_VALUE"})}t=(0,r.resolve)(t);const{root:i}=(0,r.parse)(t);if(t===i&&e.preserveRoot!==false){const e="refusing to remove root directory without preserveRoot:false";throw Object.assign(new Error(e),{path:t,code:"ERR_PRESERVE_ROOT"})}if(o.default==="win32"){const e=/[*|"<>?:]/;const{root:s}=(0,r.parse)(t);if(e.test(t.substring(s.length))){throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}}return t};e["default"]=pathArg},8304:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=process.env.__TESTING_RIMRAF_PLATFORM__||process.platform},9443:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.readdirOrErrorSync=e.readdirOrError=void 0;const i=s(1990);const{readdir:r}=i.promises;const readdirOrError=t=>r(t).catch((t=>t));e.readdirOrError=readdirOrError;const readdirOrErrorSync=t=>{try{return(0,i.readdirSync)(t)}catch(t){return t}};e.readdirOrErrorSync=readdirOrErrorSync},9373:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.retryBusySync=e.retryBusy=e.codes=e.MAXRETRIES=e.RATE=e.MAXBACKOFF=void 0;e.MAXBACKOFF=200;e.RATE=1.2;e.MAXRETRIES=10;e.codes=new Set(["EMFILE","ENFILE","EBUSY"]);const retryBusy=t=>{const method=async(s,i,r=1,n=0)=>{const o=i.maxBackoff||e.MAXBACKOFF;const a=i.backoff||e.RATE;const c=i.maxRetries||e.MAXRETRIES;let l=0;while(true){try{return await t(s)}catch(t){const h=t;if(h?.path===s&&h?.code&&e.codes.has(h.code)){r=Math.ceil(r*a);n=r+n;if(n{setTimeout((()=>{method(s,i,r,n).then(t,e)}),r)}))}if(l{const method=(s,i)=>{const r=i.maxRetries||e.MAXRETRIES;let n=0;while(true){try{return t(s)}catch(t){const i=t;if(i?.path===s&&i?.code&&e.codes.has(i.code)&&n{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.rimrafMoveRemoveSync=e.rimrafMoveRemove=void 0;const i=s(1017);const r=s(1574);const n=s(1562);const o=s(1990);const{lstat:a,rename:c,unlink:l,rmdir:h,chmod:u}=o.promises;const f=s(9443);const uniqueFilename=t=>`.${(0,i.basename)(t)}.${Math.random()}`;const unlinkFixEPERM=async t=>l(t).catch((e=>{if(e.code==="EPERM"){return u(t,438).then((()=>l(t)),(t=>{if(t.code==="ENOENT"){return}throw e}))}else if(e.code==="ENOENT"){return}throw e}));const unlinkFixEPERMSync=t=>{try{(0,o.unlinkSync)(t)}catch(e){if(e?.code==="EPERM"){try{return(0,o.chmodSync)(t,438)}catch(t){if(t?.code==="ENOENT"){return}throw e}}else if(e?.code==="ENOENT"){return}throw e}};const rimrafMoveRemove=async(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}try{return await rimrafMoveRemoveDir(t,e,await a(t))}catch(t){if(t?.code==="ENOENT")return true;throw t}};e.rimrafMoveRemove=rimrafMoveRemove;const rimrafMoveRemoveDir=async(t,e,s)=>{if(e?.signal?.aborted){throw e.signal.reason}if(!e.tmp){return rimrafMoveRemoveDir(t,{...e,tmp:await(0,r.defaultTmp)(t)},s)}if(t===e.tmp&&(0,i.parse)(t).root!==t){throw new Error("cannot delete temp directory used for deletion")}const o=s.isDirectory()?await(0,f.readdirOrError)(t):null;if(!Array.isArray(o)){if(o){if(o.code==="ENOENT"){return true}if(o.code!=="ENOTDIR"){throw o}}if(e.filter&&!await e.filter(t,s)){return false}await(0,n.ignoreENOENT)(tmpUnlink(t,e.tmp,unlinkFixEPERM));return true}const a=(await Promise.all(o.map((s=>rimrafMoveRemoveDir((0,i.resolve)(t,s.name),e,s))))).reduce(((t,e)=>t&&e),true);if(!a){return false}if(e.preserveRoot===false&&t===(0,i.parse)(t).root){return false}if(e.filter&&!await e.filter(t,s)){return false}await(0,n.ignoreENOENT)(tmpUnlink(t,e.tmp,h));return true};const tmpUnlink=async(t,e,s)=>{const r=(0,i.resolve)(e,uniqueFilename(t));await c(t,r);return await s(r)};const rimrafMoveRemoveSync=(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}try{return rimrafMoveRemoveDirSync(t,e,(0,o.lstatSync)(t))}catch(t){if(t?.code==="ENOENT")return true;throw t}};e.rimrafMoveRemoveSync=rimrafMoveRemoveSync;const rimrafMoveRemoveDirSync=(t,e,s)=>{if(e?.signal?.aborted){throw e.signal.reason}if(!e.tmp){return rimrafMoveRemoveDirSync(t,{...e,tmp:(0,r.defaultTmpSync)(t)},s)}const a=e.tmp;if(t===e.tmp&&(0,i.parse)(t).root!==t){throw new Error("cannot delete temp directory used for deletion")}const c=s.isDirectory()?(0,f.readdirOrErrorSync)(t):null;if(!Array.isArray(c)){if(c){if(c.code==="ENOENT"){return true}if(c.code!=="ENOTDIR"){throw c}}if(e.filter&&!e.filter(t,s)){return false}(0,n.ignoreENOENTSync)((()=>tmpUnlinkSync(t,a,unlinkFixEPERMSync)));return true}let l=true;for(const s of c){const r=(0,i.resolve)(t,s.name);l=rimrafMoveRemoveDirSync(r,e,s)&&l}if(!l){return false}if(e.preserveRoot===false&&t===(0,i.parse)(t).root){return false}if(e.filter&&!e.filter(t,s)){return false}(0,n.ignoreENOENTSync)((()=>tmpUnlinkSync(t,a,o.rmdirSync)));return true};const tmpUnlinkSync=(t,e,s)=>{const r=(0,i.resolve)(e,uniqueFilename(t));(0,o.renameSync)(t,r);return s(r)}},3689:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.rimrafNativeSync=e.rimrafNative=void 0;const i=s(1990);const{rm:r}=i.promises;const rimrafNative=async(t,e)=>{await r(t,{...e,force:true,recursive:true});return true};e.rimrafNative=rimrafNative;const rimrafNativeSync=(t,e)=>{(0,i.rmSync)(t,{...e,force:true,recursive:true});return true};e.rimrafNativeSync=rimrafNativeSync},3018:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.rimrafPosixSync=e.rimrafPosix=void 0;const i=s(1990);const{lstat:r,rmdir:n,unlink:o}=i.promises;const a=s(1017);const c=s(9443);const l=s(1562);const rimrafPosix=async(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}try{return await rimrafPosixDir(t,e,await r(t))}catch(t){if(t?.code==="ENOENT")return true;throw t}};e.rimrafPosix=rimrafPosix;const rimrafPosixSync=(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}try{return rimrafPosixDirSync(t,e,(0,i.lstatSync)(t))}catch(t){if(t?.code==="ENOENT")return true;throw t}};e.rimrafPosixSync=rimrafPosixSync;const rimrafPosixDir=async(t,e,s)=>{if(e?.signal?.aborted){throw e.signal.reason}const i=s.isDirectory()?await(0,c.readdirOrError)(t):null;if(!Array.isArray(i)){if(i){if(i.code==="ENOENT"){return true}if(i.code!=="ENOTDIR"){throw i}}if(e.filter&&!await e.filter(t,s)){return false}await(0,l.ignoreENOENT)(o(t));return true}const r=(await Promise.all(i.map((s=>rimrafPosixDir((0,a.resolve)(t,s.name),e,s))))).reduce(((t,e)=>t&&e),true);if(!r){return false}if(e.preserveRoot===false&&t===(0,a.parse)(t).root){return false}if(e.filter&&!await e.filter(t,s)){return false}await(0,l.ignoreENOENT)(n(t));return true};const rimrafPosixDirSync=(t,e,s)=>{if(e?.signal?.aborted){throw e.signal.reason}const r=s.isDirectory()?(0,c.readdirOrErrorSync)(t):null;if(!Array.isArray(r)){if(r){if(r.code==="ENOENT"){return true}if(r.code!=="ENOTDIR"){throw r}}if(e.filter&&!e.filter(t,s)){return false}(0,l.ignoreENOENTSync)((()=>(0,i.unlinkSync)(t)));return true}let n=true;for(const s of r){const i=(0,a.resolve)(t,s.name);n=rimrafPosixDirSync(i,e,s)&&n}if(e.preserveRoot===false&&t===(0,a.parse)(t).root){return false}if(!n){return false}if(e.filter&&!e.filter(t,s)){return false}(0,l.ignoreENOENTSync)((()=>(0,i.rmdirSync)(t)));return true}},2510:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.rimrafWindowsSync=e.rimrafWindows=void 0;const i=s(1017);const r=s(8984);const n=s(1990);const o=s(1562);const a=s(9443);const c=s(9373);const l=s(1689);const{unlink:h,rmdir:u,lstat:f}=n.promises;const d=(0,c.retryBusy)((0,r.fixEPERM)(h));const p=(0,c.retryBusySync)((0,r.fixEPERMSync)(n.unlinkSync));const g=(0,c.retryBusy)((0,r.fixEPERM)(u));const y=(0,c.retryBusySync)((0,r.fixEPERMSync)(n.rmdirSync));const rimrafWindowsDirMoveRemoveFallback=async(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}const{filter:s,...i}=e;try{return await g(t,i)}catch(e){if(e?.code==="ENOTEMPTY"){return await(0,l.rimrafMoveRemove)(t,i)}throw e}};const rimrafWindowsDirMoveRemoveFallbackSync=(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}const{filter:s,...i}=e;try{return y(t,i)}catch(e){const s=e;if(s?.code==="ENOTEMPTY"){return(0,l.rimrafMoveRemoveSync)(t,i)}throw e}};const w=Symbol("start");const v=Symbol("child");const b=Symbol("finish");const rimrafWindows=async(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}try{return await rimrafWindowsDir(t,e,await f(t),w)}catch(t){if(t?.code==="ENOENT")return true;throw t}};e.rimrafWindows=rimrafWindows;const rimrafWindowsSync=(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}try{return rimrafWindowsDirSync(t,e,(0,n.lstatSync)(t),w)}catch(t){if(t?.code==="ENOENT")return true;throw t}};e.rimrafWindowsSync=rimrafWindowsSync;const rimrafWindowsDir=async(t,e,s,r=w)=>{if(e?.signal?.aborted){throw e.signal.reason}const n=s.isDirectory()?await(0,a.readdirOrError)(t):null;if(!Array.isArray(n)){if(n){if(n.code==="ENOENT"){return true}if(n.code!=="ENOTDIR"){throw n}}if(e.filter&&!await e.filter(t,s)){return false}await(0,o.ignoreENOENT)(d(t,e));return true}const c=r===w?v:r;const l=(await Promise.all(n.map((s=>rimrafWindowsDir((0,i.resolve)(t,s.name),e,s,c))))).reduce(((t,e)=>t&&e),true);if(r===w){return rimrafWindowsDir(t,e,s,b)}else if(r===b){if(e.preserveRoot===false&&t===(0,i.parse)(t).root){return false}if(!l){return false}if(e.filter&&!await e.filter(t,s)){return false}await(0,o.ignoreENOENT)(rimrafWindowsDirMoveRemoveFallback(t,e))}return true};const rimrafWindowsDirSync=(t,e,s,r=w)=>{const n=s.isDirectory()?(0,a.readdirOrErrorSync)(t):null;if(!Array.isArray(n)){if(n){if(n.code==="ENOENT"){return true}if(n.code!=="ENOTDIR"){throw n}}if(e.filter&&!e.filter(t,s)){return false}(0,o.ignoreENOENTSync)((()=>p(t,e)));return true}let c=true;for(const s of n){const n=r===w?v:r;const o=(0,i.resolve)(t,s.name);c=rimrafWindowsDirSync(o,e,s,n)&&c}if(r===w){return rimrafWindowsDirSync(t,e,s,b)}else if(r===b){if(e.preserveRoot===false&&t===(0,i.parse)(t).root){return false}if(!c){return false}if(e.filter&&!e.filter(t,s)){return false}(0,o.ignoreENOENTSync)((()=>{rimrafWindowsDirMoveRemoveFallbackSync(t,e)}))}return true}},5828:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.useNativeSync=e.useNative=void 0;const r=process.env.__TESTING_RIMRAF_NODE_VERSION__||process.version;const n=r.replace(/^v/,"").split(".");const o=+n[0]>14||+n[0]===14&&+n[1]>=14;const a=i(s(8304));e.useNative=!o||a.default==="win32"?()=>false:t=>!t?.signal&&!t?.filter;e.useNativeSync=!o||a.default==="win32"?()=>false:t=>!t?.signal&&!t?.filter},4294:(t,e,s)=>{t.exports=s(4219)},4219:(t,e,s)=>{"use strict";var i=s(1808);var r=s(4404);var n=s(3685);var o=s(5687);var a=s(2361);var c=s(9491);var l=s(3837);e.httpOverHttp=httpOverHttp;e.httpsOverHttp=httpsOverHttp;e.httpOverHttps=httpOverHttps;e.httpsOverHttps=httpsOverHttps;function httpOverHttp(t){var e=new TunnelingAgent(t);e.request=n.request;return e}function httpsOverHttp(t){var e=new TunnelingAgent(t);e.request=n.request;e.createSocket=createSecureSocket;e.defaultPort=443;return e}function httpOverHttps(t){var e=new TunnelingAgent(t);e.request=o.request;return e}function httpsOverHttps(t){var e=new TunnelingAgent(t);e.request=o.request;e.createSocket=createSecureSocket;e.defaultPort=443;return e}function TunnelingAgent(t){var e=this;e.options=t||{};e.proxyOptions=e.options.proxy||{};e.maxSockets=e.options.maxSockets||n.Agent.defaultMaxSockets;e.requests=[];e.sockets=[];e.on("free",(function onFree(t,s,i,r){var n=toOptions(s,i,r);for(var o=0,a=e.requests.length;o=this.maxSockets){r.requests.push(n);return}r.createSocket(n,(function(e){e.on("free",onFree);e.on("close",onCloseOrRemove);e.on("agentRemove",onCloseOrRemove);t.onSocket(e);function onFree(){r.emit("free",e,n)}function onCloseOrRemove(t){r.removeSocket(e);e.removeListener("free",onFree);e.removeListener("close",onCloseOrRemove);e.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(t,e){var s=this;var i={};s.sockets.push(i);var r=mergeOptions({},s.proxyOptions,{method:"CONNECT",path:t.host+":"+t.port,agent:false,headers:{host:t.host+":"+t.port}});if(t.localAddress){r.localAddress=t.localAddress}if(r.proxyAuth){r.headers=r.headers||{};r.headers["Proxy-Authorization"]="Basic "+new Buffer(r.proxyAuth).toString("base64")}h("making CONNECT request");var n=s.request(r);n.useChunkedEncodingByDefault=false;n.once("response",onResponse);n.once("upgrade",onUpgrade);n.once("connect",onConnect);n.once("error",onError);n.end();function onResponse(t){t.upgrade=true}function onUpgrade(t,e,s){process.nextTick((function(){onConnect(t,e,s)}))}function onConnect(r,o,a){n.removeAllListeners();o.removeAllListeners();if(r.statusCode!==200){h("tunneling socket could not be established, statusCode=%d",r.statusCode);o.destroy();var c=new Error("tunneling socket could not be established, "+"statusCode="+r.statusCode);c.code="ECONNRESET";t.request.emit("error",c);s.removeSocket(i);return}if(a.length>0){h("got illegal response body from proxy");o.destroy();var c=new Error("got illegal response body from proxy");c.code="ECONNRESET";t.request.emit("error",c);s.removeSocket(i);return}h("tunneling connection has established");s.sockets[s.sockets.indexOf(i)]=o;return e(o)}function onError(e){n.removeAllListeners();h("tunneling socket could not be established, cause=%s\n",e.message,e.stack);var r=new Error("tunneling socket could not be established, "+"cause="+e.message);r.code="ECONNRESET";t.request.emit("error",r);s.removeSocket(i)}};TunnelingAgent.prototype.removeSocket=function removeSocket(t){var e=this.sockets.indexOf(t);if(e===-1){return}this.sockets.splice(e,1);var s=this.requests.shift();if(s){this.createSocket(s,(function(t){s.request.onSocket(t)}))}};function createSecureSocket(t,e){var s=this;TunnelingAgent.prototype.createSocket.call(s,t,(function(i){var n=t.request.getHeader("host");var o=mergeOptions({},s.options,{socket:i,servername:n?n.replace(/:.*$/,""):t.host});var a=r.connect(0,o);s.sockets[s.sockets.indexOf(i)]=a;e(a)}))}function toOptions(t,e,s){if(typeof t==="string"){return{host:t,port:e,localAddress:s}}return t}function mergeOptions(t){for(var e=1,s=arguments.length;e{"use strict";Object.defineProperty(e,"__esModule",{value:true});Object.defineProperty(e,"v1",{enumerable:true,get:function(){return i.default}});Object.defineProperty(e,"v3",{enumerable:true,get:function(){return r.default}});Object.defineProperty(e,"v4",{enumerable:true,get:function(){return n.default}});Object.defineProperty(e,"v5",{enumerable:true,get:function(){return o.default}});Object.defineProperty(e,"NIL",{enumerable:true,get:function(){return a.default}});Object.defineProperty(e,"version",{enumerable:true,get:function(){return c.default}});Object.defineProperty(e,"validate",{enumerable:true,get:function(){return l.default}});Object.defineProperty(e,"stringify",{enumerable:true,get:function(){return h.default}});Object.defineProperty(e,"parse",{enumerable:true,get:function(){return u.default}});var i=_interopRequireDefault(s(8628));var r=_interopRequireDefault(s(6409));var n=_interopRequireDefault(s(5122));var o=_interopRequireDefault(s(9120));var a=_interopRequireDefault(s(5332));var c=_interopRequireDefault(s(1595));var l=_interopRequireDefault(s(6900));var h=_interopRequireDefault(s(8950));var u=_interopRequireDefault(s(2746));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}},4569:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(6113));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function md5(t){if(Array.isArray(t)){t=Buffer.from(t)}else if(typeof t==="string"){t=Buffer.from(t,"utf8")}return i.default.createHash("md5").update(t).digest()}var r=md5;e["default"]=r},5332:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var s="00000000-0000-0000-0000-000000000000";e["default"]=s},2746:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(6900));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function parse(t){if(!(0,i.default)(t)){throw TypeError("Invalid UUID")}let e;const s=new Uint8Array(16);s[0]=(e=parseInt(t.slice(0,8),16))>>>24;s[1]=e>>>16&255;s[2]=e>>>8&255;s[3]=e&255;s[4]=(e=parseInt(t.slice(9,13),16))>>>8;s[5]=e&255;s[6]=(e=parseInt(t.slice(14,18),16))>>>8;s[7]=e&255;s[8]=(e=parseInt(t.slice(19,23),16))>>>8;s[9]=e&255;s[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255;s[11]=e/4294967296&255;s[12]=e>>>24&255;s[13]=e>>>16&255;s[14]=e>>>8&255;s[15]=e&255;return s}var r=parse;e["default"]=r},814:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var s=/^(?:[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;e["default"]=s},807:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=rng;var i=_interopRequireDefault(s(6113));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const r=new Uint8Array(256);let n=r.length;function rng(){if(n>r.length-16){i.default.randomFillSync(r);n=0}return r.slice(n,n+=16)}},5274:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(6113));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function sha1(t){if(Array.isArray(t)){t=Buffer.from(t)}else if(typeof t==="string"){t=Buffer.from(t,"utf8")}return i.default.createHash("sha1").update(t).digest()}var r=sha1;e["default"]=r},8950:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(6900));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const r=[];for(let t=0;t<256;++t){r.push((t+256).toString(16).substr(1))}function stringify(t,e=0){const s=(r[t[e+0]]+r[t[e+1]]+r[t[e+2]]+r[t[e+3]]+"-"+r[t[e+4]]+r[t[e+5]]+"-"+r[t[e+6]]+r[t[e+7]]+"-"+r[t[e+8]]+r[t[e+9]]+"-"+r[t[e+10]]+r[t[e+11]]+r[t[e+12]]+r[t[e+13]]+r[t[e+14]]+r[t[e+15]]).toLowerCase();if(!(0,i.default)(s)){throw TypeError("Stringified UUID is invalid")}return s}var n=stringify;e["default"]=n},8628:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(807));var r=_interopRequireDefault(s(8950));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}let n;let o;let a=0;let c=0;function v1(t,e,s){let l=e&&s||0;const h=e||new Array(16);t=t||{};let u=t.node||n;let f=t.clockseq!==undefined?t.clockseq:o;if(u==null||f==null){const e=t.random||(t.rng||i.default)();if(u==null){u=n=[e[0]|1,e[1],e[2],e[3],e[4],e[5]]}if(f==null){f=o=(e[6]<<8|e[7])&16383}}let d=t.msecs!==undefined?t.msecs:Date.now();let p=t.nsecs!==undefined?t.nsecs:c+1;const g=d-a+(p-c)/1e4;if(g<0&&t.clockseq===undefined){f=f+1&16383}if((g<0||d>a)&&t.nsecs===undefined){p=0}if(p>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}a=d;c=p;o=f;d+=122192928e5;const y=((d&268435455)*1e4+p)%4294967296;h[l++]=y>>>24&255;h[l++]=y>>>16&255;h[l++]=y>>>8&255;h[l++]=y&255;const w=d/4294967296*1e4&268435455;h[l++]=w>>>8&255;h[l++]=w&255;h[l++]=w>>>24&15|16;h[l++]=w>>>16&255;h[l++]=f>>>8|128;h[l++]=f&255;for(let t=0;t<6;++t){h[l+t]=u[t]}return e||(0,r.default)(h)}var l=v1;e["default"]=l},6409:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(5998));var r=_interopRequireDefault(s(4569));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const n=(0,i.default)("v3",48,r.default);var o=n;e["default"]=o},5998:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=_default;e.URL=e.DNS=void 0;var i=_interopRequireDefault(s(8950));var r=_interopRequireDefault(s(2746));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function stringToBytes(t){t=unescape(encodeURIComponent(t));const e=[];for(let s=0;s{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(807));var r=_interopRequireDefault(s(8950));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function v4(t,e,s){t=t||{};const n=t.random||(t.rng||i.default)();n[6]=n[6]&15|64;n[8]=n[8]&63|128;if(e){s=s||0;for(let t=0;t<16;++t){e[s+t]=n[t]}return e}return(0,r.default)(n)}var n=v4;e["default"]=n},9120:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(5998));var r=_interopRequireDefault(s(5274));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const n=(0,i.default)("v5",80,r.default);var o=n;e["default"]=o},6900:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(814));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function validate(t){return typeof t==="string"&&i.default.test(t)}var r=validate;e["default"]=r},1595:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(6900));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function version(t){if(!(0,i.default)(t)){throw TypeError("Invalid UUID")}return parseInt(t.substr(14,1),16)}var r=version;e["default"]=r},1319:(t,e,s)=>{const i=s(7147);const r=s(2186);const n=s(653)();const parseMultilineInput=t=>t.split("\n").map((t=>t.trim()));const o={get COMMIT_MESSAGE(){return r.getInput("COMMIT_MESSAGE",{required:false})||`Update file(s) from "%SRC_REPO%"`},DRY_RUN:["1","true"].includes(r.getInput("DRY_RUN",{required:false}).toLowerCase()),FILE_PATTERNS:parseMultilineInput(r.getInput("FILE_PATTERNS")).map((t=>new RegExp(t))),GITHUB_SERVER:r.getInput("GITHUB_SERVER",{required:false})||"github.com",GITHUB_TOKEN:r.getInput("GITHUB_TOKEN",{required:true}),GIT_EMAIL:r.getInput("GIT_EMAIL")||`${process.env.GITHUB_ACTOR}@users.noreply.github.com`,GIT_USERNAME:r.getInput("GIT_USERNAME",{required:false})||process.env.GITHUB_ACTOR,SKIP_CLEANUP:["1","true"].includes(r.getInput("SKIP_CLEANUP",{required:false}).toLowerCase()),SKIP_DELETE:["1","true"].includes(r.getInput("SKIP_DELETE",{required:false}).toLowerCase()),SKIP_REPLACE:["1","true"].includes(r.getInput("SKIP_REPLACE",{required:false}).toLowerCase()),SRC_REPO:r.getInput("SRC_REPO",{required:false})||process.env.GITHUB_REPOSITORY,SRC_ROOT:r.getInput("SRC_ROOT",{required:false})||"/",TARGET_REPOS:parseMultilineInput(r.getInput("TARGET_REPOS",{required:true})),TARGET_ROOT:r.getInput("TARGET_ROOT",{required:false})||"/",TMPDIR:r.getInput("TEMP_DIR",{required:false})||`tmp-${Date.now().toString()}`};while(i.existsSync(o.TMPDIR)){o.TMPDIR=`tmp-${Date.now().toString()}`;n.info(`TEMP_DIR already exists. Using "${o.TMPDIR}" now.`)}n.info("Context:",{...o,GITHUB_TOKEN:""});t.exports=o},109:(t,e,s)=>{const{exec:i}=s(2081);const{parse:r}=s(9234);const{GITHUB_TOKEN:n,GITHUB_SERVER:o,SRC_REPO:a,COMMIT_MESSAGE:c,GIT_USERNAME:l,GIT_EMAIL:h,DRY_RUN:u}=s(1319);const f=s(1608);const d=s(653);const interpolateCommitMessage=(t,e)=>{let s=t;Object.keys(e).forEach((t=>{if(t==="COMMIT_MESSAGE"){return}s=s.replace(new RegExp(`%${t}%`,"g"),e[t])}));return s};t.exports={init:t=>{const{getRepoPath:e,getRepoSlug:s,getRepoBranch:p}=f.init(t);const g=d(t);function execCmd(t,e){g.info(`EXEC: "${t}" IN "${e||"./"}"`);return new Promise(((s,r)=>{i(t,{cwd:e},(function(t,e){g.info(`OUTPUT: "${t}${e}"`);t?r(t):s(e.trim())}))}))}const clone=async()=>{const t=["GIT_LFS_SKIP_SMUDGE=1","git clone","--depth 1",p()===undefined?false:` -b ${p()}`,`https://${n}@${o}/${s()}.git`,e()];return execCmd(t.filter(Boolean).join(" "))};const hasChanges=async()=>{const t=await execCmd(`git status --porcelain`,e());return r(t).length!==0};const commitAll=async()=>{if(!await hasChanges()){g.info("NO CHANGES DETECTED");return}g.info("CHANGES DETECTED");g.info("COMMIT CHANGES...");const s=interpolateCommitMessage(c,{SRC_REPO:a,TARGET_REPO:t});if(!u){let t="";const i=[`git config --local user.name "${l}"`,`git config --local user.email "${h}"`,`git add -A`,`git status`,`git commit --message "${s}"`,`git push`];try{for(cmd of i){t+=await execCmd(cmd,e())}}catch(t){g.error(t)}finally{if(!t.includes("Update file(s) from")){g.error(t);throw new Error("failed to commit changes")}}}g.info("CHANGES COMMITED")};return{clone:clone,commitAll:commitAll}}}},4351:(t,e,s)=>{const i=s(1017);const{SRC_REPO:r,TARGET_REPOS:n,TMPDIR:o,SKIP_CLEANUP:a}=s(1319);const c=s(109);const{removeDir:l}=s(1608);const h=s(653);const u=h().print;const f=s(1608);const main=async()=>{let t;try{const t=c.init(r);const e=f.init(r);await t.clone();const s=await e.getFiles();const o=s.map((t=>e.getRepoRelativeFilePath(t)));u(r);await new Promise((t=>setTimeout(t,5e3)));await Promise.all(n.map((async t=>{const r=f.init(t);const n=c.init(t);await n.clone();const a=await r.getFiles();const l=a.filter((t=>!o.includes(r.getRepoRelativeFilePath(t))));await Promise.all([r.removeFiles(l),...s.map((async t=>r.copyFile(t,i.join(r.getRepoFilePath(),e.getRepoRelativeFilePath(t)))))]);await n.commitAll();u(t)})))}catch(e){t=e}u();if(!a){await l(o)}if(t){throw t}};t.exports=main},653:(t,e,s)=>{const i=s(2186);const joinAttributes=(...t)=>t.map((t=>Array.isArray(t)||Object.prototype.toString.call(t)==="[object Object]"?JSON.stringify(t,undefined,2):t)).join(" ");const r={};t.exports=t=>{r[t]=[];const debug=(...e)=>{r[t].push(["debug",joinAttributes(...e)]);if(!t){print()}};const error=(...e)=>{r[t].push(["error",joinAttributes(...e)]);i.setFailed(`Action failed with error ${joinAttributes(...e)}`);if(!t){print()}};const info=(...e)=>{r[t].push(["info",joinAttributes(...e)]);if(!t){print()}};const warn=(...e)=>{r[t].push(["warning",joinAttributes(...e)]);if(!t){print()}};const _print=t=>{r[t].forEach((([e,s])=>{i[e](t!=="undefined"?`${t}: ${s}`:s)}));r[t]=[]};const print=(e=t)=>{if(!e){Object.keys(r).forEach((t=>{_print(t)}))}else{_print(e)}};return{debug:debug,error:error,info:info,print:print,warn:warn}}},1608:(t,e,s)=>{const i=s(7147).promises;const r=s(1017);const n=s(6715);const{rimraf:o}=s(6284);const{TMPDIR:a,FILE_PATTERNS:c,DRY_RUN:l,SKIP_DELETE:h,SKIP_REPLACE:u,SRC_REPO:f,SRC_ROOT:d,TARGET_ROOT:p}=s(1319);const g=s(653);const init=t=>{const e=g(t);const getRepoSlug=()=>t.split(":")[0];const getRepoBranch=()=>t.split(":")[1]||undefined;const getRepoPath=()=>r.join(a,`${getRepoSlug()}${getRepoBranch()===undefined?"":`-${getRepoBranch()}`}`);const getRepoRoot=()=>t===f?d:p;const getRepoFilePath=()=>r.join(getRepoPath(),getRepoRoot());const getRepoRelativeFilePath=t=>r.relative(getRepoFilePath(),t);const getPrettyPath=e=>e.replace(/\\/g,"/").replace(/^\//,"").replace(new RegExp(`^${a}/${t}${getRepoRoot()}`),"");const getMatchingFiles=t=>{e.info("FILE_PATTERNS",c.map((t=>t.toString())));return t.filter((t=>{cleanFile=getPrettyPath(t);const e=c.some((t=>t.test(cleanFile)));return e}))};const getFiles=async()=>{const t=await n(getRepoPath(),[".git"]);e.debug("FILES:",JSON.stringify(t.map(getPrettyPath),undefined,2));const s=getMatchingFiles(t);e.info("MATCHING FILES:",JSON.stringify(s.map(getPrettyPath),undefined,2));return s};const copyFile=async(t,s)=>{const n=await i.access(s).then((()=>true)).catch((()=>false));if(u&&n){e.info("skip copying",t.replace(/\\/g,"/").replace(/^\//,""),"to",s.replace(/\\/g,"/").replace(/^\//,""),"because SKIP_REPLACE = true");return}e.info("copy",t.replace(/\\/g,"/").replace(/^\//,""),"to",s.replace(/\\/g,"/").replace(/^\//,""));if(l){return}await i.mkdir(r.dirname(s),{recursive:true});await i.copyFile(t,s)};const removeFiles=async t=>{if(h){e.info("SKIP REMOVING FILES because `SKIP_DELETE` is set to `true`",t.map((t=>`"${t}"`)).join(", "));return}e.info("REMOVE FILES",t);if(l){return}return Promise.all(t.map((t=>i.unlink(t))))};return{copyFile:copyFile,getFiles:getFiles,getRepoBranch:getRepoBranch,getRepoFilePath:getRepoFilePath,getRepoPath:getRepoPath,getRepoRelativeFilePath:getRepoRelativeFilePath,getRepoSlug:getRepoSlug,removeFiles:removeFiles}};const removeDir=async t=>{new Promise(((e,s)=>{o(t,{disableGlob:true},(t=>{if(t){return s(t)}e()}))}))};t.exports={init:init,removeDir:removeDir}},9491:t=>{"use strict";t.exports=require("assert")},2081:t=>{"use strict";t.exports=require("child_process")},6113:t=>{"use strict";t.exports=require("crypto")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},3292:t=>{"use strict";t.exports=require("fs/promises")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},1808:t=>{"use strict";t.exports=require("net")},5673:t=>{"use strict";t.exports=require("node:events")},4492:t=>{"use strict";t.exports=require("node:stream")},6915:t=>{"use strict";t.exports=require("node:string_decoder")},2037:t=>{"use strict";t.exports=require("os")},1017:t=>{"use strict";t.exports=require("path")},4404:t=>{"use strict";t.exports=require("tls")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},9234:(t,e,s)=>{"use strict";const{spawnSync:i}=s(2081);const isString=t=>typeof t==="string";t.exports=(t,e={})=>{if(!isString(t)){e=t||{};t=run()}const{added:s,modified:i,untracked:r,deleted:n,renamed:o,unstaged:a}=e;const c=parse(t);const l=pick(c,{added:s,modified:i,untracked:r,deleted:n,renamed:o,unstaged:a});const h=getNames(l);return h};const getName=({name:t})=>t;t.exports.getNames=getNames;function getNames(t){return t.map(getName)}t.exports.run=run;function run(){const t=i("git",["status","--porcelain"]);return t.stdout.toString()}t.exports.parse=parse;function parse(t){const e=[];const s=t.split("\n").filter(Boolean);for(const t of s){const{name:s,mode:i}=parseLine(t);e.push({name:s,mode:i})}return e}const r="?";const n="R";const o="-> ";const cutRenameTo=t=>{const e=t.indexOf(o);const s=e+o.length;return t.slice(s)};function parseLine(t){const[e]=t;if(e===r)return{name:t.replace("?? ",""),mode:r};if(e===n)return{name:cutRenameTo(t),mode:n};const[s]=t.match(/^[\sA-Z]+\s/,"");const i=t.replace(s,"");return{name:i,mode:s}}const isModified=({mode:t})=>t==="M "||t==="MM ";const isAdded=({mode:t})=>t==="A ";const isRenamed=({mode:t})=>/R/.test(t);const isDeleted=({mode:t})=>/D/.test(t);const isUntracked=({mode:t})=>/\?/.test(t);const isUnstaged=({mode:t})=>t===" M ";const check=({added:t,modified:e,untracked:s,unstaged:i,deleted:r,renamed:n})=>o=>{let a=false;if(t)a=a||isAdded(o);if(e)a=a||isModified(o);if(s)a=a||isUntracked(o);if(i)a=a||isUnstaged(o);if(r)a=a||isDeleted(o);if(n)a=a||isRenamed(o);return a};t.exports.pick=pick;function pick(t,{added:e,modified:s,deleted:i,untracked:r,unstaged:n,renamed:o}){return t.filter(check({added:e,modified:s,untracked:r,unstaged:n,deleted:i,renamed:o}))}},6463:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Glob=void 0;const i=s(266);const r=s(9569);const n=s(7310);const o=s(6722);const a=s(9173);const c=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Glob{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");this.withFileTypes=!!e.withFileTypes;this.signal=e.signal;this.follow=!!e.follow;this.dot=!!e.dot;this.dotRelative=!!e.dotRelative;this.nodir=!!e.nodir;this.mark=!!e.mark;if(!e.cwd){this.cwd=""}else if(e.cwd instanceof URL||e.cwd.startsWith("file://")){e.cwd=(0,n.fileURLToPath)(e.cwd)}this.cwd=e.cwd||"";this.root=e.root;this.magicalBraces=!!e.magicalBraces;this.nobrace=!!e.nobrace;this.noext=!!e.noext;this.realpath=!!e.realpath;this.absolute=e.absolute;this.noglobstar=!!e.noglobstar;this.matchBase=!!e.matchBase;this.maxDepth=typeof e.maxDepth==="number"?e.maxDepth:Infinity;this.stat=!!e.stat;this.ignore=e.ignore;if(this.withFileTypes&&this.absolute!==undefined){throw new Error("cannot set absolute and withFileTypes:true")}if(typeof t==="string"){t=[t]}this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false;if(this.windowsPathsNoEscape){t=t.map((t=>t.replace(/\\/g,"/")))}if(this.matchBase){if(e.noglobstar){throw new TypeError("base matching requires globstar")}t=t.map((t=>t.includes("/")?t:`./**/${t}`))}this.pattern=t;this.platform=e.platform||c;this.opts={...e,platform:this.platform};if(e.scurry){this.scurry=e.scurry;if(e.nocase!==undefined&&e.nocase!==e.scurry.nocase){throw new Error("nocase option contradicts provided scurry option")}}else{const t=e.platform==="win32"?r.PathScurryWin32:e.platform==="darwin"?r.PathScurryDarwin:e.platform?r.PathScurryPosix:r.PathScurry;this.scurry=new t(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;const s=this.platform==="darwin"||this.platform==="win32";const a={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug};const l=this.pattern.map((t=>new i.Minimatch(t,a)));const[h,u]=l.reduce(((t,e)=>{t[0].push(...e.set);t[1].push(...e.globParts);return t}),[[],[]]);this.patterns=h.map(((t,e)=>new o.Pattern(t,u[e],0,this.platform)))}async walk(){return[...await new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}e.Glob=Glob},4131:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.hasMagic=void 0;const i=s(266);const hasMagic=(t,e={})=>{if(!Array.isArray(t)){t=[t]}for(const s of t){if(new i.Minimatch(s,e).hasMagic())return true}return false};e.hasMagic=hasMagic},7639:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Ignore=void 0;const i=s(266);const r=s(6722);const n=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Ignore{relative;relativeChildren;absolute;absoluteChildren;constructor(t,{nobrace:e,nocase:s,noext:o,noglobstar:a,platform:c=n}){this.relative=[];this.absolute=[];this.relativeChildren=[];this.absoluteChildren=[];const l={dot:true,nobrace:e,nocase:s,noext:o,noglobstar:a,optimizationLevel:2,platform:c,nocomment:true,nonegate:true};for(const e of t){const t=new i.Minimatch(e,l);for(let e=0;e{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.glob=e.hasMagic=e.Glob=e.unescape=e.escape=e.sync=e.iterate=e.iterateSync=e.stream=e.streamSync=e.globIterate=e.globIterateSync=e.globSync=e.globStream=e.globStreamSync=void 0;const i=s(266);const r=s(6463);const n=s(4131);function globStreamSync(t,e={}){return new r.Glob(t,e).streamSync()}e.globStreamSync=globStreamSync;function globStream(t,e={}){return new r.Glob(t,e).stream()}e.globStream=globStream;function globSync(t,e={}){return new r.Glob(t,e).walkSync()}e.globSync=globSync;async function glob_(t,e={}){return new r.Glob(t,e).walk()}function globIterateSync(t,e={}){return new r.Glob(t,e).iterateSync()}e.globIterateSync=globIterateSync;function globIterate(t,e={}){return new r.Glob(t,e).iterate()}e.globIterate=globIterate;e.streamSync=globStreamSync;e.stream=Object.assign(globStream,{sync:globStreamSync});e.iterateSync=globIterateSync;e.iterate=Object.assign(globIterate,{sync:globIterateSync});e.sync=Object.assign(globSync,{stream:globStreamSync,iterate:globIterateSync});var o=s(266);Object.defineProperty(e,"escape",{enumerable:true,get:function(){return o.escape}});Object.defineProperty(e,"unescape",{enumerable:true,get:function(){return o.unescape}});var a=s(6463);Object.defineProperty(e,"Glob",{enumerable:true,get:function(){return a.Glob}});var c=s(4131);Object.defineProperty(e,"hasMagic",{enumerable:true,get:function(){return c.hasMagic}});e.glob=Object.assign(glob_,{glob:glob_,globSync:globSync,sync:e.sync,globStream:globStream,stream:e.stream,globStreamSync:globStreamSync,streamSync:e.streamSync,globIterate:globIterate,iterate:e.iterate,globIterateSync:globIterateSync,iterateSync:e.iterateSync,Glob:r.Glob,hasMagic:n.hasMagic,escape:i.escape,unescape:i.unescape});e.glob.glob=e.glob},6722:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Pattern=void 0;const i=s(266);const isPatternList=t=>t.length>=1;const isGlobList=t=>t.length>=1;class Pattern{#t;#e;#s;length;#i;#r;#n;#o;#a;#c;#l=true;constructor(t,e,s,i){if(!isPatternList(t)){throw new TypeError("empty pattern list")}if(!isGlobList(e)){throw new TypeError("empty glob list")}if(e.length!==t.length){throw new TypeError("mismatched pattern list and glob list lengths")}this.length=t.length;if(s<0||s>=this.length){throw new TypeError("index out of range")}this.#t=t;this.#e=e;this.#s=s;this.#i=i;if(this.#s===0){if(this.isUNC()){const[t,e,s,i,...r]=this.#t;const[n,o,a,c,...l]=this.#e;if(r[0]===""){r.shift();l.shift()}const h=[t,e,s,i,""].join("/");const u=[n,o,a,c,""].join("/");this.#t=[h,...r];this.#e=[u,...l];this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){const[t,...e]=this.#t;const[s,...i]=this.#e;if(e[0]===""){e.shift();i.shift()}const r=t+"/";const n=s+"/";this.#t=[r,...e];this.#e=[n,...i];this.length=this.#t.length}}}pattern(){return this.#t[this.#s]}isString(){return typeof this.#t[this.#s]==="string"}isGlobstar(){return this.#t[this.#s]===i.GLOBSTAR}isRegExp(){return this.#t[this.#s]instanceof RegExp}globString(){return this.#n=this.#n||(this.#s===0?this.isAbsolute()?this.#e[0]+this.#e.slice(1).join("/"):this.#e.join("/"):this.#e.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){if(this.#r!==undefined)return this.#r;if(!this.hasMore())return this.#r=null;this.#r=new Pattern(this.#t,this.#e,this.#s+1,this.#i);this.#r.#c=this.#c;this.#r.#a=this.#a;this.#r.#o=this.#o;return this.#r}isUNC(){const t=this.#t;return this.#a!==undefined?this.#a:this.#a=this.#i==="win32"&&this.#s===0&&t[0]===""&&t[1]===""&&typeof t[2]==="string"&&!!t[2]&&typeof t[3]==="string"&&!!t[3]}isDrive(){const t=this.#t;return this.#o!==undefined?this.#o:this.#o=this.#i==="win32"&&this.#s===0&&this.length>1&&typeof t[0]==="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){const t=this.#t;return this.#c!==undefined?this.#c:this.#c=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){const t=this.#t[0];return typeof t==="string"&&this.isAbsolute()&&this.#s===0?t:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){if(this.#s===0||!this.isGlobstar()||!this.#l)return false;this.#l=false;return true}}e.Pattern=Pattern},4601:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;const i=s(266);class HasWalkedCache{store;constructor(t=new Map){this.store=t}copy(){return new HasWalkedCache(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){const s=t.fullpath();const i=this.store.get(s);if(i)i.add(e.globString());else this.store.set(s,new Set([e.globString()]))}}e.HasWalkedCache=HasWalkedCache;class MatchRecord{store=new Map;add(t,e,s){const i=(e?2:0)|(s?1:0);const r=this.store.get(t);this.store.set(t,r===undefined?i:i&r)}entries(){return[...this.store.entries()].map((([t,e])=>[t,!!(e&2),!!(e&1)]))}}e.MatchRecord=MatchRecord;class SubWalks{store=new Map;add(t,e){if(!t.canReaddir()){return}const s=this.store.get(t);if(s){if(!s.find((t=>t.globString()===e.globString()))){s.push(e)}}else this.store.set(t,[e])}get(t){const e=this.store.get(t);if(!e){throw new Error("attempting to walk unknown path")}return e}entries(){return this.keys().map((t=>[t,this.store.get(t)]))}keys(){return[...this.store.keys()].filter((t=>t.canReaddir()))}}e.SubWalks=SubWalks;class Processor{hasWalkedCache;matches=new MatchRecord;subwalks=new SubWalks;patterns;follow;dot;opts;constructor(t,e){this.opts=t;this.follow=!!t.follow;this.dot=!!t.dot;this.hasWalkedCache=e?e.copy():new HasWalkedCache}processPatterns(t,e){this.patterns=e;const s=e.map((e=>[t,e]));for(let[t,e]of s){this.hasWalkedCache.storeWalked(t,e);const s=e.root();const r=e.isAbsolute()&&this.opts.absolute!==false;if(s){t=t.resolve(s==="/"&&this.opts.root!==undefined?this.opts.root:s);const i=e.rest();if(!i){this.matches.add(t,true,false);continue}else{e=i}}if(t.isENOENT())continue;let n;let o;let a=false;while(typeof(n=e.pattern())==="string"&&(o=e.rest())){const s=t.resolve(n);if(s.isUnknown()&&n!=="..")break;t=s;e=o;a=true}n=e.pattern();o=e.rest();if(a){if(this.hasWalkedCache.hasWalked(t,e))continue;this.hasWalkedCache.storeWalked(t,e)}if(typeof n==="string"){if(!o){const e=n===".."||n===""||n===".";this.matches.add(t.resolve(n),r,e)}else{this.subwalks.add(t,e)}continue}else if(n===i.GLOBSTAR){if(!t.isSymbolicLink()||this.follow||e.checkFollowGlobstar()){this.subwalks.add(t,e)}const s=o?.pattern();const i=o?.rest();if(!o||(s===""||s===".")&&!i){this.matches.add(t,r,s===""||s===".")}else{if(s===".."){const e=t.parent||t;if(!i)this.matches.add(e,r,true);else if(!this.hasWalkedCache.hasWalked(e,i)){this.subwalks.add(e,i)}}}}else if(n instanceof RegExp){this.subwalks.add(t,e)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Processor(this.opts,this.hasWalkedCache)}filterEntries(t,e){const s=this.subwalks.get(t);const r=this.child();for(const t of e){for(const e of s){const s=e.isAbsolute();const n=e.pattern();const o=e.rest();if(n===i.GLOBSTAR){r.testGlobstar(t,e,o,s)}else if(n instanceof RegExp){r.testRegExp(t,n,o,s)}else{r.testString(t,n,o,s)}}}return r}testGlobstar(t,e,s,i){if(this.dot||!t.name.startsWith(".")){if(!e.hasMore()){this.matches.add(t,i,false)}if(t.canReaddir()){if(this.follow||!t.isSymbolicLink()){this.subwalks.add(t,e)}else if(t.isSymbolicLink()){if(s&&e.checkFollowGlobstar()){this.subwalks.add(t,s)}else if(e.markFollowGlobstar()){this.subwalks.add(t,e)}}}}if(s){const e=s.pattern();if(typeof e==="string"&&e!==".."&&e!==""&&e!=="."){this.testString(t,e,s.rest(),i)}else if(e===".."){const e=t.parent||t;this.subwalks.add(e,s)}else if(e instanceof RegExp){this.testRegExp(t,e,s.rest(),i)}}}testRegExp(t,e,s,i){if(!e.test(t.name))return;if(!s){this.matches.add(t,i,false)}else{this.subwalks.add(t,s)}}testString(t,e,s,i){if(!t.isNamed(e))return;if(!s){this.matches.add(t,i,false)}else{this.subwalks.add(t,s)}}}e.Processor=Processor},9173:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;const i=s(8865);const r=s(7639);const n=s(4601);const makeIgnore=(t,e)=>typeof t==="string"?new r.Ignore([t],e):Array.isArray(t)?new r.Ignore(t,e):t;class GlobUtil{path;patterns;opts;seen=new Set;paused=false;aborted=false;#h=[];#u;#f;signal;maxDepth;constructor(t,e,s){this.patterns=t;this.path=e;this.opts=s;this.#f=!s.posix&&s.platform==="win32"?"\\":"/";if(s.ignore){this.#u=makeIgnore(s.ignore,s)}this.maxDepth=s.maxDepth||Infinity;if(s.signal){this.signal=s.signal;this.signal.addEventListener("abort",(()=>{this.#h.length=0}))}}#d(t){return this.seen.has(t)||!!this.#u?.ignored?.(t)}#p(t){return!!this.#u?.childrenIgnored?.(t)}pause(){this.paused=true}resume(){if(this.signal?.aborted)return;this.paused=false;let t=undefined;while(!this.paused&&(t=this.#h.shift())){t()}}onResume(t){if(this.signal?.aborted)return;if(!this.paused){t()}else{this.#h.push(t)}}async matchCheck(t,e){if(e&&this.opts.nodir)return undefined;let s;if(this.opts.realpath){s=t.realpathCached()||await t.realpath();if(!s)return undefined;t=s}const i=t.isUnknown()||this.opts.stat;return this.matchCheckTest(i?await t.lstat():t,e)}matchCheckTest(t,e){return t&&(this.maxDepth===Infinity||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&!this.#d(t)?t:undefined}matchCheckSync(t,e){if(e&&this.opts.nodir)return undefined;let s;if(this.opts.realpath){s=t.realpathCached()||t.realpathSync();if(!s)return undefined;t=s}const i=t.isUnknown()||this.opts.stat;return this.matchCheckTest(i?t.lstatSync():t,e)}matchFinish(t,e){if(this.#d(t))return;const s=this.opts.absolute===undefined?e:this.opts.absolute;this.seen.add(t);const i=this.opts.mark&&t.isDirectory()?this.#f:"";if(this.opts.withFileTypes){this.matchEmit(t)}else if(s){const e=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(e+i)}else{const e=this.opts.posix?t.relativePosix():t.relative();const s=this.opts.dotRelative&&!e.startsWith(".."+this.#f)?"."+this.#f:"";this.matchEmit(!e?"."+i:s+e+i)}}async match(t,e,s){const i=await this.matchCheck(t,s);if(i)this.matchFinish(i,e)}matchSync(t,e,s){const i=this.matchCheckSync(t,s);if(i)this.matchFinish(i,e)}walkCB(t,e,s){if(this.signal?.aborted)s();this.walkCB2(t,e,new n.Processor(this.opts),s)}walkCB2(t,e,s,i){if(this.#p(t))return i();if(this.signal?.aborted)i();if(this.paused){this.onResume((()=>this.walkCB2(t,e,s,i)));return}s.processPatterns(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#d(t))continue;r++;this.match(t,e,i).then((()=>next()))}for(const t of s.subwalkTargets()){if(this.maxDepth!==Infinity&&t.depth()>=this.maxDepth){continue}r++;const e=t.readdirCached();if(t.calledReaddir())this.walkCB3(t,e,s,next);else{t.readdirCB(((e,i)=>this.walkCB3(t,i,s,next)),true)}}next()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#d(t))continue;r++;this.match(t,e,i).then((()=>next()))}for(const[t,e]of s.subwalks.entries()){r++;this.walkCB2(t,e,s.child(),next)}next()}walkCBSync(t,e,s){if(this.signal?.aborted)s();this.walkCB2Sync(t,e,new n.Processor(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#p(t))return i();if(this.signal?.aborted)i();if(this.paused){this.onResume((()=>this.walkCB2Sync(t,e,s,i)));return}s.processPatterns(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#d(t))continue;this.matchSync(t,e,i)}for(const t of s.subwalkTargets()){if(this.maxDepth!==Infinity&&t.depth()>=this.maxDepth){continue}r++;const e=t.readdirSync();this.walkCB3Sync(t,e,s,next)}next()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#d(t))continue;this.matchSync(t,e,i)}for(const[t,e]of s.subwalks.entries()){r++;this.walkCB2Sync(t,e,s.child(),next)}next()}}e.GlobUtil=GlobUtil;class GlobWalker extends GlobUtil{matches;constructor(t,e,s){super(t,e,s);this.matches=new Set}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){await this.path.lstat()}await new Promise(((t,e)=>{this.walkCB(this.path,this.patterns,(()=>{if(this.signal?.aborted){e(this.signal.reason)}else{t(this.matches)}}))}));return this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>{if(this.signal?.aborted)throw this.signal.reason}));return this.matches}}e.GlobWalker=GlobWalker;class GlobStream extends GlobUtil{results;constructor(t,e,s){super(t,e,s);this.results=new i.Minipass({signal:this.signal,objectMode:true});this.results.on("drain",(()=>this.resume()));this.results.on("resume",(()=>this.resume()))}matchEmit(t){this.results.write(t);if(!this.results.flowing)this.pause()}stream(){const t=this.path;if(t.isUnknown()){t.lstat().then((()=>{this.walkCB(t,this.patterns,(()=>this.results.end()))}))}else{this.walkCB(t,this.patterns,(()=>this.results.end()))}return this.results}streamSync(){if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>this.results.end()));return this.results}}e.GlobStream=GlobStream},5934:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.assertValidPattern=void 0;const s=1024*64;const assertValidPattern=t=>{if(typeof t!=="string"){throw new TypeError("invalid pattern")}if(t.length>s){throw new TypeError("pattern is too long")}};e.assertValidPattern=assertValidPattern},7642:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AST=void 0;const i=s(314);const r=s(9820);const n=new Set(["!","?","+","*","@"]);const isExtglobType=t=>n.has(t);const o="(?!(?:^|/)\\.\\.?(?:$|/))";const a="(?!\\.)";const c=new Set(["[","."]);const l=new Set(["..","."]);const h=new Set("().*{}+?[]^$\\!");const regExpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const u="[^/]";const f=u+"*?";const d=u+"+?";class AST{type;#m;#g;#y=false;#w=[];#v;#b;#S;#E=false;#_;#O;#R=false;constructor(t,e,s={}){this.type=t;if(t)this.#g=true;this.#v=e;this.#m=this.#v?this.#v.#m:this;this.#_=this.#m===this?s:this.#m.#_;this.#S=this.#m===this?[]:this.#m.#S;if(t==="!"&&!this.#m.#E)this.#S.push(this);this.#b=this.#v?this.#v.#w.length:0}get hasMagic(){if(this.#g!==undefined)return this.#g;for(const t of this.#w){if(typeof t==="string")continue;if(t.type||t.hasMagic)return this.#g=true}return this.#g}toString(){if(this.#O!==undefined)return this.#O;if(!this.type){return this.#O=this.#w.map((t=>String(t))).join("")}else{return this.#O=this.type+"("+this.#w.map((t=>String(t))).join("|")+")"}}#P(){if(this!==this.#m)throw new Error("should only call on root");if(this.#E)return this;this.toString();this.#E=true;let t;while(t=this.#S.pop()){if(t.type!=="!")continue;let e=t;let s=e.#v;while(s){for(let i=e.#b+1;!s.type&&itypeof t==="string"?t:t.toJSON())):[this.type,...this.#w.map((t=>t.toJSON()))];if(this.isStart()&&!this.type)t.unshift([]);if(this.isEnd()&&(this===this.#m||this.#m.#E&&this.#v?.type==="!")){t.push({})}return t}isStart(){if(this.#m===this)return true;if(!this.#v?.isStart())return false;if(this.#b===0)return true;const t=this.#v;for(let e=0;e{const[i,r,n,o]=typeof e==="string"?AST.#x(e,this.#g,s):e.toRegExpSource(t);this.#g=this.#g||n;this.#y=this.#y||o;return i})).join("");let n="";if(this.isStart()){if(typeof this.#w[0]==="string"){const s=this.#w.length===1&&l.has(this.#w[0]);if(!s){const s=c;const r=e&&s.has(i.charAt(0))||i.startsWith("\\.")&&s.has(i.charAt(2))||i.startsWith("\\.\\.")&&s.has(i.charAt(4));const l=!e&&!t&&s.has(i.charAt(0));n=r?o:l?a:""}}}let h="";if(this.isEnd()&&this.#m.#E&&this.#v?.type==="!"){h="(?:$|\\/)"}const u=n+i+h;return[u,(0,r.unescape)(i),this.#g=!!this.#g,this.#y]}const s=this.type==="*"||this.type==="+";const i=this.type==="!"?"(?:(?!(?:":"(?:";let n=this.#k(e);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){const t=this.toString();this.#w=[t];this.type=null;this.#g=undefined;return[t,(0,r.unescape)(this.toString()),false,false]}let h=!s||t||e||!a?"":this.#k(true);if(h===n){h=""}if(h){n=`(?:${n})(?:${h})*?`}let u="";if(this.type==="!"&&this.#R){u=(this.isStart()&&!e?a:"")+d}else{const s=this.type==="!"?"))"+(this.isStart()&&!e&&!t?a:"")+f+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&h?")":this.type==="*"&&h?`)?`:`)${this.type}`;u=i+n+s}return[u,(0,r.unescape)(n),this.#g=!!this.#g,this.#y]}#k(t){return this.#w.map((e=>{if(typeof e==="string"){throw new Error("string type in extglob ast??")}const[s,i,r,n]=e.toRegExpSource(t);this.#y=this.#y||n;return s})).filter((t=>!(this.isStart()&&this.isEnd())||!!t)).join("|")}static#x(t,e,s=false){let n=false;let o="";let a=false;for(let r=0;r{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.parseClass=void 0;const s={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",true],"[:alpha:]":["\\p{L}\\p{Nl}",true],"[:ascii:]":["\\x"+"00-\\x"+"7f",false],"[:blank:]":["\\p{Zs}\\t",true],"[:cntrl:]":["\\p{Cc}",true],"[:digit:]":["\\p{Nd}",true],"[:graph:]":["\\p{Z}\\p{C}",true,true],"[:lower:]":["\\p{Ll}",true],"[:print:]":["\\p{C}",true],"[:punct:]":["\\p{P}",true],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",true],"[:upper:]":["\\p{Lu}",true],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",true],"[:xdigit:]":["A-Fa-f0-9",false]};const braceEscape=t=>t.replace(/[[\]\\-]/g,"\\$&");const regexpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const rangesToString=t=>t.join("");const parseClass=(t,e)=>{const i=e;if(t.charAt(i)!=="["){throw new Error("not in a brace expression")}const r=[];const n=[];let o=i+1;let a=false;let c=false;let l=false;let h=false;let u=i;let f="";t:while(of){r.push(braceEscape(f)+"-"+braceEscape(e))}else if(e===f){r.push(braceEscape(e))}f="";o++;continue}if(t.startsWith("-]",o+1)){r.push(braceEscape(e+"-"));o+=2;continue}if(t.startsWith("-",o+1)){f=e;o+=2;continue}r.push(braceEscape(e));o++}if(u{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.escape=void 0;const escape=(t,{windowsPathsNoEscape:e=false}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");e.escape=escape},266:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;const r=i(s(1046));const n=s(5934);const o=s(7642);const a=s(1477);const c=s(9820);const minimatch=(t,e,s={})=>{(0,n.assertValidPattern)(e);if(!s.nocomment&&e.charAt(0)==="#"){return false}return new Minimatch(e,s).match(t)};e.minimatch=minimatch;const l=/^\*+([^+@!?\*\[\(]*)$/;const starDotExtTest=t=>e=>!e.startsWith(".")&&e.endsWith(t);const starDotExtTestDot=t=>e=>e.endsWith(t);const starDotExtTestNocase=t=>{t=t.toLowerCase();return e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)};const starDotExtTestNocaseDot=t=>{t=t.toLowerCase();return e=>e.toLowerCase().endsWith(t)};const h=/^\*+\.\*+$/;const starDotStarTest=t=>!t.startsWith(".")&&t.includes(".");const starDotStarTestDot=t=>t!=="."&&t!==".."&&t.includes(".");const u=/^\.\*+$/;const dotStarTest=t=>t!=="."&&t!==".."&&t.startsWith(".");const f=/^\*+$/;const starTest=t=>t.length!==0&&!t.startsWith(".");const starTestDot=t=>t.length!==0&&t!=="."&&t!=="..";const d=/^\?+([^+@!?\*\[\(]*)?$/;const qmarksTestNocase=([t,e=""])=>{const s=qmarksTestNoExt([t]);if(!e)return s;e=e.toLowerCase();return t=>s(t)&&t.toLowerCase().endsWith(e)};const qmarksTestNocaseDot=([t,e=""])=>{const s=qmarksTestNoExtDot([t]);if(!e)return s;e=e.toLowerCase();return t=>s(t)&&t.toLowerCase().endsWith(e)};const qmarksTestDot=([t,e=""])=>{const s=qmarksTestNoExtDot([t]);return!e?s:t=>s(t)&&t.endsWith(e)};const qmarksTest=([t,e=""])=>{const s=qmarksTestNoExt([t]);return!e?s:t=>s(t)&&t.endsWith(e)};const qmarksTestNoExt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")};const qmarksTestNoExtDot=([t])=>{const e=t.length;return t=>t.length===e&&t!=="."&&t!==".."};const p=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";const g={win32:{sep:"\\"},posix:{sep:"/"}};e.sep=p==="win32"?g.win32.sep:g.posix.sep;e.minimatch.sep=e.sep;e.GLOBSTAR=Symbol("globstar **");e.minimatch.GLOBSTAR=e.GLOBSTAR;const y="[^/]";const w=y+"*?";const v="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";const b="(?:(?!(?:\\/|^)\\.).)*?";const filter=(t,s={})=>i=>(0,e.minimatch)(i,t,s);e.filter=filter;e.minimatch.filter=e.filter;const ext=(t,e={})=>Object.assign({},t,e);const defaults=t=>{if(!t||typeof t!=="object"||!Object.keys(t).length){return e.minimatch}const s=e.minimatch;const m=(e,i,r={})=>s(e,i,ext(t,r));return Object.assign(m,{Minimatch:class Minimatch extends s.Minimatch{constructor(e,s={}){super(e,ext(t,s))}static defaults(e){return s.defaults(ext(t,e)).Minimatch}},AST:class AST extends s.AST{constructor(e,s,i={}){super(e,s,ext(t,i))}static fromGlob(e,i={}){return s.AST.fromGlob(e,ext(t,i))}},unescape:(e,i={})=>s.unescape(e,ext(t,i)),escape:(e,i={})=>s.escape(e,ext(t,i)),filter:(e,i={})=>s.filter(e,ext(t,i)),defaults:e=>s.defaults(ext(t,e)),makeRe:(e,i={})=>s.makeRe(e,ext(t,i)),braceExpand:(e,i={})=>s.braceExpand(e,ext(t,i)),match:(e,i,r={})=>s.match(e,i,ext(t,r)),sep:s.sep,GLOBSTAR:e.GLOBSTAR})};e.defaults=defaults;e.minimatch.defaults=e.defaults;const braceExpand=(t,e={})=>{(0,n.assertValidPattern)(t);if(e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)){return[t]}return(0,r.default)(t)};e.braceExpand=braceExpand;e.minimatch.braceExpand=e.braceExpand;const makeRe=(t,e={})=>new Minimatch(t,e).makeRe();e.makeRe=makeRe;e.minimatch.makeRe=e.makeRe;const match=(t,e,s={})=>{const i=new Minimatch(e,s);t=t.filter((t=>i.match(t)));if(i.options.nonull&&!t.length){t.push(e)}return t};e.match=match;e.minimatch.match=e.match;const S=/[?*]|[+@!]\(.*?\)|\[|\]/;const regExpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Minimatch{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){(0,n.assertValidPattern)(t);e=e||{};this.options=e;this.pattern=t;this.platform=e.platform||p;this.isWindows=this.platform==="win32";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false;if(this.windowsPathsNoEscape){this.pattern=this.pattern.replace(/\\/g,"/")}this.preserveMultipleSlashes=!!e.preserveMultipleSlashes;this.regexp=null;this.negate=false;this.nonegate=!!e.nonegate;this.comment=false;this.empty=false;this.partial=!!e.partial;this.nocase=!!this.options.nocase;this.windowsNoMagicRoot=e.windowsNoMagicRoot!==undefined?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase);this.globSet=[];this.globParts=[];this.set=[];this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1){return true}for(const t of this.set){for(const e of t){if(typeof e!=="string")return true}}return false}debug(...t){}make(){const t=this.pattern;const e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();this.globSet=[...new Set(this.braceExpand())];if(e.debug){this.debug=(...t)=>console.error(...t)}this.debug(this.pattern,this.globSet);const s=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(s);this.debug(this.pattern,this.globParts);let i=this.globParts.map(((t,e,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=t[0]===""&&t[1]===""&&(t[2]==="?"||!S.test(t[2]))&&!S.test(t[3]);const s=/^[a-z]:/i.test(t[0]);if(e){return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))]}else if(s){return[t[0],...t.slice(1).map((t=>this.parse(t)))]}}return t.map((t=>this.parse(t)))}));this.debug(this.pattern,i);this.set=i.filter((t=>t.indexOf(false)===-1));if(this.isWindows){for(let t=0;t=2){t=this.firstPhasePreProcess(t);t=this.secondPhasePreProcess(t)}else if(e>=1){t=this.levelOneOptimize(t)}else{t=this.adjascentGlobstarOptimize(t)}return t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;while(-1!==(e=t.indexOf("**",e+1))){let s=e;while(t[s+1]==="**"){s++}if(s!==e){t.splice(e,s-e)}}return t}))}levelOneOptimize(t){return t.map((t=>{t=t.reduce(((t,e)=>{const s=t[t.length-1];if(e==="**"&&s==="**"){return t}if(e===".."){if(s&&s!==".."&&s!=="."&&s!=="**"){t.pop();return t}}t.push(e);return t}),[]);return t.length===0?[""]:t}))}levelTwoFileOptimize(t){if(!Array.isArray(t)){t=this.slashSplit(t)}let e=false;do{e=false;if(!this.preserveMultipleSlashes){for(let s=1;si){s.splice(i+1,r-i)}let n=s[i+1];const o=s[i+2];const a=s[i+3];if(n!=="..")continue;if(!o||o==="."||o===".."||!a||a==="."||a===".."){continue}e=true;s.splice(i,1);const c=s.slice(0);c[i]="**";t.push(c);i--}if(!this.preserveMultipleSlashes){for(let t=1;tt.length))}partsMatch(t,e,s=false){let i=0;let r=0;let n=[];let o="";while(io){s=s.slice(a)}else if(o>a){t=t.slice(o)}}}}const{optimizationLevel:n=1}=this.options;if(n>=2){t=this.levelTwoFileOptimize(t)}this.debug("matchOne",this,{file:t,pattern:s});this.debug("matchOne",t.length,s.length);for(var o=0,a=0,c=t.length,l=s.length;o>> no match, partial?",t,f,s,d);if(f===c){return true}}return false}let n;if(typeof h==="string"){n=u===h;this.debug("string match",h,u,n)}else{n=h.test(u);this.debug("pattern match",h,u,n)}if(!n)return false}if(o===c&&a===l){return true}else if(o===c){return i}else if(a===l){return o===c-1&&t[o]===""}else{throw new Error("wtf?")}}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(t){(0,n.assertValidPattern)(t);const s=this.options;if(t==="**")return e.GLOBSTAR;if(t==="")return"";let i;let r=null;if(i=t.match(f)){r=s.dot?starTestDot:starTest}else if(i=t.match(l)){r=(s.nocase?s.dot?starDotExtTestNocaseDot:starDotExtTestNocase:s.dot?starDotExtTestDot:starDotExtTest)(i[1])}else if(i=t.match(d)){r=(s.nocase?s.dot?qmarksTestNocaseDot:qmarksTestNocase:s.dot?qmarksTestDot:qmarksTest)(i)}else if(i=t.match(h)){r=s.dot?starDotStarTestDot:starDotStarTest}else if(i=t.match(u)){r=dotStarTest}const a=o.AST.fromGlob(t,this.options).toMMPattern();return r?Object.assign(a,{test:r}):a}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;const t=this.set;if(!t.length){this.regexp=false;return this.regexp}const s=this.options;const i=s.noglobstar?w:s.dot?v:b;const r=new Set(s.nocase?["i"]:[]);let n=t.map((t=>{const s=t.map((t=>{if(t instanceof RegExp){for(const e of t.flags.split(""))r.add(e)}return typeof t==="string"?regExpEscape(t):t===e.GLOBSTAR?e.GLOBSTAR:t._src}));s.forEach(((t,r)=>{const n=s[r+1];const o=s[r-1];if(t!==e.GLOBSTAR||o===e.GLOBSTAR){return}if(o===undefined){if(n!==undefined&&n!==e.GLOBSTAR){s[r+1]="(?:\\/|"+i+"\\/)?"+n}else{s[r]=i}}else if(n===undefined){s[r-1]=o+"(?:\\/|"+i+")?"}else if(n!==e.GLOBSTAR){s[r-1]=o+"(?:\\/|\\/"+i+"\\/)"+n;s[r+1]=e.GLOBSTAR}}));return s.filter((t=>t!==e.GLOBSTAR)).join("/")})).join("|");const[o,a]=t.length>1?["(?:",")"]:["",""];n="^"+o+n+a+"$";if(this.negate)n="^(?!"+n+").+$";try{this.regexp=new RegExp(n,[...r].join(""))}catch(t){this.regexp=false}return this.regexp}slashSplit(t){if(this.preserveMultipleSlashes){return t.split("/")}else if(this.isWindows&&/^\/\/[^\/]+/.test(t)){return["",...t.split(/\/+/)]}else{return t.split(/\/+/)}}match(t,e=this.partial){this.debug("match",t,this.pattern);if(this.comment){return false}if(this.empty){return t===""}if(t==="/"&&e){return true}const s=this.options;if(this.isWindows){t=t.split("\\").join("/")}const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const r=this.set;this.debug(this.pattern,"set",r);let n=i[i.length-1];if(!n){for(let t=i.length-2;!n&&t>=0;t--){n=i[t]}}for(let t=0;t{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.unescape=void 0;const unescape=(t,{windowsPathsNoEscape:e=false}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");e.unescape=unescape},9802:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.LRUCache=void 0;const s=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;const i=new Set;const r=typeof process==="object"&&!!process?process:{};const emitWarning=(t,e,s,i)=>{typeof r.emitWarning==="function"?r.emitWarning(t,e,s,i):console.error(`[${s}] ${e}: ${t}`)};let n=globalThis.AbortController;let o=globalThis.AbortSignal;if(typeof n==="undefined"){o=class AbortSignal{onabort;_onabort=[];reason;aborted=false;addEventListener(t,e){this._onabort.push(e)}};n=class AbortController{constructor(){warnACPolyfill()}signal=new o;abort(t){if(this.signal.aborted)return;this.signal.reason=t;this.signal.aborted=true;for(const e of this.signal._onabort){e(t)}this.signal.onabort?.(t)}};let t=r.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const warnACPolyfill=()=>{if(!t)return;t=false;emitWarning("AbortController is not defined. If using lru-cache in "+"node 14, load an AbortController polyfill from the "+"`node-abort-controller` package. A minimal polyfill is "+"provided for use by LRUCache.fetch(), but it should not be "+"relied upon in other contexts (eg, passing it to other APIs that "+"use AbortController/AbortSignal might have undesirable effects). "+"You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",warnACPolyfill)}}const shouldWarn=t=>!i.has(t);const a=Symbol("type");const isPosInt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t);const getUintArray=t=>!isPosInt(t)?null:t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(t){super(t);this.fill(0)}}class Stack{heap;length;static#A=false;static create(t){const e=getUintArray(t);if(!e)return[];Stack.#A=true;const s=new Stack(t,e);Stack.#A=false;return s}constructor(t,e){if(!Stack.#A){throw new TypeError("instantiate Stack using Stack.create(n)")}this.heap=new e(t);this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class LRUCache{#C;#M;#N;#L;#j;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#D;#I;#F;#B;#U;#G;#q;#$;#z;#W;#H;#V;#K;#J;#Y;#Z;#X;static unsafeExposeInternals(t){return{starts:t.#K,ttls:t.#J,sizes:t.#V,keyMap:t.#F,keyList:t.#B,valList:t.#U,next:t.#G,prev:t.#q,get head(){return t.#$},get tail(){return t.#z},free:t.#W,isBackgroundFetch:e=>t.#Q(e),backgroundFetch:(e,s,i,r)=>t.#tt(e,s,i,r),moveToTail:e=>t.#et(e),indexes:e=>t.#st(e),rindexes:e=>t.#it(e),isStale:e=>t.#rt(e)}}get max(){return this.#C}get maxSize(){return this.#M}get calculatedSize(){return this.#I}get size(){return this.#D}get fetchMethod(){return this.#j}get dispose(){return this.#N}get disposeAfter(){return this.#L}constructor(t){const{max:e=0,ttl:s,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:l,disposeAfter:h,noDisposeOnSet:u,noUpdateTTL:f,maxSize:d=0,maxEntrySize:p=0,sizeCalculation:g,fetchMethod:y,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:v,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:S,ignoreFetchAbort:E}=t;if(e!==0&&!isPosInt(e)){throw new TypeError("max option must be a nonnegative integer")}const _=e?getUintArray(e):Array;if(!_){throw new Error("invalid max value: "+e)}this.#C=e;this.#M=d;this.maxEntrySize=p||this.#M;this.sizeCalculation=g;if(this.sizeCalculation){if(!this.#M&&!this.maxEntrySize){throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize")}if(typeof this.sizeCalculation!=="function"){throw new TypeError("sizeCalculation set to non-function")}}if(y!==undefined&&typeof y!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.#j=y;this.#Z=!!y;this.#F=new Map;this.#B=new Array(e).fill(undefined);this.#U=new Array(e).fill(undefined);this.#G=new _(e);this.#q=new _(e);this.#$=0;this.#z=0;this.#W=Stack.create(e);this.#D=0;this.#I=0;if(typeof l==="function"){this.#N=l}if(typeof h==="function"){this.#L=h;this.#H=[]}else{this.#L=undefined;this.#H=undefined}this.#Y=!!this.#N;this.#X=!!this.#L;this.noDisposeOnSet=!!u;this.noUpdateTTL=!!f;this.noDeleteOnFetchRejection=!!w;this.allowStaleOnFetchRejection=!!b;this.allowStaleOnFetchAbort=!!S;this.ignoreFetchAbort=!!E;if(this.maxEntrySize!==0){if(this.#M!==0){if(!isPosInt(this.#M)){throw new TypeError("maxSize must be a positive integer if specified")}}if(!isPosInt(this.maxEntrySize)){throw new TypeError("maxEntrySize must be a positive integer if specified")}this.#nt()}this.allowStale=!!c;this.noDeleteOnStaleGet=!!v;this.updateAgeOnGet=!!o;this.updateAgeOnHas=!!a;this.ttlResolution=isPosInt(r)||r===0?r:1;this.ttlAutopurge=!!n;this.ttl=s||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.#ot()}if(this.#C===0&&this.ttl===0&&this.#M===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.#C&&!this.#M){const t="LRU_CACHE_UNBOUNDED";if(shouldWarn(t)){i.add(t);const e="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";emitWarning(e,"UnboundedCacheWarning",t,LRUCache)}}}getRemainingTTL(t){return this.#F.has(t)?Infinity:0}#ot(){const t=new ZeroArray(this.#C);const e=new ZeroArray(this.#C);this.#J=t;this.#K=e;this.#at=(i,r,n=s.now())=>{e[i]=r!==0?n:0;t[i]=r;if(r!==0&&this.ttlAutopurge){const t=setTimeout((()=>{if(this.#rt(i)){this.delete(this.#B[i])}}),r+1);if(t.unref){t.unref()}}};this.#ct=i=>{e[i]=t[i]!==0?s.now():0};this.#lt=(s,r)=>{if(t[r]){const n=t[r];const o=e[r];s.ttl=n;s.start=o;s.now=i||getNow();const a=s.now-o;s.remainingTTL=n-a}};let i=0;const getNow=()=>{const t=s.now();if(this.ttlResolution>0){i=t;const e=setTimeout((()=>i=0),this.ttlResolution);if(e.unref){e.unref()}}return t};this.getRemainingTTL=s=>{const r=this.#F.get(s);if(r===undefined){return 0}const n=t[r];const o=e[r];if(n===0||o===0){return Infinity}const a=(i||getNow())-o;return n-a};this.#rt=s=>t[s]!==0&&e[s]!==0&&(i||getNow())-e[s]>t[s]}#ct=()=>{};#lt=()=>{};#at=()=>{};#rt=()=>false;#nt(){const t=new ZeroArray(this.#C);this.#I=0;this.#V=t;this.#ht=e=>{this.#I-=t[e];t[e]=0};this.#ut=(t,e,s,i)=>{if(this.#Q(e)){return 0}if(!isPosInt(s)){if(i){if(typeof i!=="function"){throw new TypeError("sizeCalculation must be a function")}s=i(e,t);if(!isPosInt(s)){throw new TypeError("sizeCalculation return invalid (expect positive integer)")}}else{throw new TypeError("invalid size value (must be positive integer). "+"When maxSize or maxEntrySize is used, sizeCalculation "+"or size must be set.")}}return s};this.#ft=(e,s,i)=>{t[e]=s;if(this.#M){const s=this.#M-t[e];while(this.#I>s){this.#dt(true)}}this.#I+=t[e];if(i){i.entrySize=s;i.totalCalculatedSize=this.#I}}}#ht=t=>{};#ft=(t,e,s)=>{};#ut=(t,e,s,i)=>{if(s||i){throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}return 0};*#st({allowStale:t=this.allowStale}={}){if(this.#D){for(let e=this.#z;true;){if(!this.#pt(e)){break}if(t||!this.#rt(e)){yield e}if(e===this.#$){break}else{e=this.#q[e]}}}}*#it({allowStale:t=this.allowStale}={}){if(this.#D){for(let e=this.#$;true;){if(!this.#pt(e)){break}if(t||!this.#rt(e)){yield e}if(e===this.#z){break}else{e=this.#G[e]}}}}#pt(t){return t!==undefined&&this.#F.get(this.#B[t])===t}*entries(){for(const t of this.#st()){if(this.#U[t]!==undefined&&this.#B[t]!==undefined&&!this.#Q(this.#U[t])){yield[this.#B[t],this.#U[t]]}}}*rentries(){for(const t of this.#it()){if(this.#U[t]!==undefined&&this.#B[t]!==undefined&&!this.#Q(this.#U[t])){yield[this.#B[t],this.#U[t]]}}}*keys(){for(const t of this.#st()){const e=this.#B[t];if(e!==undefined&&!this.#Q(this.#U[t])){yield e}}}*rkeys(){for(const t of this.#it()){const e=this.#B[t];if(e!==undefined&&!this.#Q(this.#U[t])){yield e}}}*values(){for(const t of this.#st()){const e=this.#U[t];if(e!==undefined&&!this.#Q(this.#U[t])){yield this.#U[t]}}}*rvalues(){for(const t of this.#it()){const e=this.#U[t];if(e!==undefined&&!this.#Q(this.#U[t])){yield this.#U[t]}}}[Symbol.iterator](){return this.entries()}find(t,e={}){for(const s of this.#st()){const i=this.#U[s];const r=this.#Q(i)?i.__staleWhileFetching:i;if(r===undefined)continue;if(t(r,this.#B[s],this)){return this.get(this.#B[s],e)}}}forEach(t,e=this){for(const s of this.#st()){const i=this.#U[s];const r=this.#Q(i)?i.__staleWhileFetching:i;if(r===undefined)continue;t.call(e,r,this.#B[s],this)}}rforEach(t,e=this){for(const s of this.#it()){const i=this.#U[s];const r=this.#Q(i)?i.__staleWhileFetching:i;if(r===undefined)continue;t.call(e,r,this.#B[s],this)}}purgeStale(){let t=false;for(const e of this.#it({allowStale:true})){if(this.#rt(e)){this.delete(this.#B[e]);t=true}}return t}dump(){const t=[];for(const e of this.#st({allowStale:true})){const i=this.#B[e];const r=this.#U[e];const n=this.#Q(r)?r.__staleWhileFetching:r;if(n===undefined||i===undefined)continue;const o={value:n};if(this.#J&&this.#K){o.ttl=this.#J[e];const t=s.now()-this.#K[e];o.start=Math.floor(Date.now()-t)}if(this.#V){o.size=this.#V[e]}t.unshift([i,o])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const t=Date.now()-i.start;i.start=s.now()-t}this.set(e,i.value,i)}}set(t,e,s={}){if(e===undefined){this.delete(t);return this}const{ttl:i=this.ttl,start:r,noDisposeOnSet:n=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=s;let{noUpdateTTL:c=this.noUpdateTTL}=s;const l=this.#ut(t,e,s.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize){if(a){a.set="miss";a.maxEntrySizeExceeded=true}this.delete(t);return this}let h=this.#D===0?undefined:this.#F.get(t);if(h===undefined){h=this.#D===0?this.#z:this.#W.length!==0?this.#W.pop():this.#D===this.#C?this.#dt(false):this.#D;this.#B[h]=t;this.#U[h]=e;this.#F.set(t,h);this.#G[this.#z]=h;this.#q[h]=this.#z;this.#z=h;this.#D++;this.#ft(h,l,a);if(a)a.set="add";c=false}else{this.#et(h);const s=this.#U[h];if(e!==s){if(this.#Z&&this.#Q(s)){s.__abortController.abort(new Error("replaced"))}else if(!n){if(this.#Y){this.#N?.(s,t,"set")}if(this.#X){this.#H?.push([s,t,"set"])}}this.#ht(h);this.#ft(h,l,a);this.#U[h]=e;if(a){a.set="replace";const t=s&&this.#Q(s)?s.__staleWhileFetching:s;if(t!==undefined)a.oldValue=t}}else if(a){a.set="update"}}if(i!==0&&!this.#J){this.#ot()}if(this.#J){if(!c){this.#at(h,i,r)}if(a)this.#lt(a,h)}if(!n&&this.#X&&this.#H){const t=this.#H;let e;while(e=t?.shift()){this.#L?.(...e)}}return this}pop(){try{while(this.#D){const t=this.#U[this.#$];this.#dt(true);if(this.#Q(t)){if(t.__staleWhileFetching){return t.__staleWhileFetching}}else if(t!==undefined){return t}}}finally{if(this.#X&&this.#H){const t=this.#H;let e;while(e=t?.shift()){this.#L?.(...e)}}}}#dt(t){const e=this.#$;const s=this.#B[e];const i=this.#U[e];if(this.#Z&&this.#Q(i)){i.__abortController.abort(new Error("evicted"))}else if(this.#Y||this.#X){if(this.#Y){this.#N?.(i,s,"evict")}if(this.#X){this.#H?.push([i,s,"evict"])}}this.#ht(e);if(t){this.#B[e]=undefined;this.#U[e]=undefined;this.#W.push(e)}if(this.#D===1){this.#$=this.#z=0;this.#W.length=0}else{this.#$=this.#G[e]}this.#F.delete(s);this.#D--;return e}has(t,e={}){const{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e;const r=this.#F.get(t);if(r!==undefined){const t=this.#U[r];if(this.#Q(t)&&t.__staleWhileFetching===undefined){return false}if(!this.#rt(r)){if(s){this.#ct(r)}if(i){i.has="hit";this.#lt(i,r)}return true}else if(i){i.has="stale";this.#lt(i,r)}}else if(i){i.has="miss"}return false}peek(t,e={}){const{allowStale:s=this.allowStale}=e;const i=this.#F.get(t);if(i!==undefined&&(s||!this.#rt(i))){const t=this.#U[i];return this.#Q(t)?t.__staleWhileFetching:t}}#tt(t,e,s,i){const r=e===undefined?undefined:this.#U[e];if(this.#Q(r)){return r}const o=new n;const{signal:a}=s;a?.addEventListener("abort",(()=>o.abort(a.reason)),{signal:o.signal});const c={signal:o.signal,options:s,context:i};const cb=(i,r=false)=>{const{aborted:n}=o.signal;const a=s.ignoreFetchAbort&&i!==undefined;if(s.status){if(n&&!r){s.status.fetchAborted=true;s.status.fetchError=o.signal.reason;if(a)s.status.fetchAbortIgnored=true}else{s.status.fetchResolved=true}}if(n&&!a&&!r){return fetchFail(o.signal.reason)}const h=l;if(this.#U[e]===l){if(i===undefined){if(h.__staleWhileFetching){this.#U[e]=h.__staleWhileFetching}else{this.delete(t)}}else{if(s.status)s.status.fetchUpdated=true;this.set(t,i,c.options)}}return i};const eb=t=>{if(s.status){s.status.fetchRejected=true;s.status.fetchError=t}return fetchFail(t)};const fetchFail=i=>{const{aborted:r}=o.signal;const n=r&&s.allowStaleOnFetchAbort;const a=n||s.allowStaleOnFetchRejection;const c=a||s.noDeleteOnFetchRejection;const h=l;if(this.#U[e]===l){const s=!c||h.__staleWhileFetching===undefined;if(s){this.delete(t)}else if(!n){this.#U[e]=h.__staleWhileFetching}}if(a){if(s.status&&h.__staleWhileFetching!==undefined){s.status.returnedStale=true}return h.__staleWhileFetching}else if(h.__returned===h){throw i}};const pcall=(e,i)=>{const n=this.#j?.(t,r,c);if(n&&n instanceof Promise){n.then((t=>e(t===undefined?undefined:t)),i)}o.signal.addEventListener("abort",(()=>{if(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort){e(undefined);if(s.allowStaleOnFetchAbort){e=t=>cb(t,true)}}}))};if(s.status)s.status.fetchDispatched=true;const l=new Promise(pcall).then(cb,eb);const h=Object.assign(l,{__abortController:o,__staleWhileFetching:r,__returned:undefined});if(e===undefined){this.set(t,h,{...c.options,status:undefined});e=this.#F.get(t)}else{this.#U[e]=h}return h}#Q(t){if(!this.#Z)return false;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof n}async fetch(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:p,forceRefresh:g=false,status:y,signal:w}=e;if(!this.#Z){if(y)y.fetch="get";return this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:y})}const v={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:n,noDisposeOnSet:o,size:a,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:d,ignoreFetchAbort:f,status:y,signal:w};let b=this.#F.get(t);if(b===undefined){if(y)y.fetch="miss";const e=this.#tt(t,b,v,p);return e.__returned=e}else{const e=this.#U[b];if(this.#Q(e)){const t=s&&e.__staleWhileFetching!==undefined;if(y){y.fetch="inflight";if(t)y.returnedStale=true}return t?e.__staleWhileFetching:e.__returned=e}const r=this.#rt(b);if(!g&&!r){if(y)y.fetch="hit";this.#et(b);if(i){this.#ct(b)}if(y)this.#lt(y,b);return e}const n=this.#tt(t,b,v,p);const o=n.__staleWhileFetching!==undefined;const a=o&&s;if(y){y.fetch=r?"stale":"refresh";if(a&&r)y.returnedStale=true}return a?n.__staleWhileFetching:n.__returned=n}}get(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:n}=e;const o=this.#F.get(t);if(o!==undefined){const e=this.#U[o];const a=this.#Q(e);if(n)this.#lt(n,o);if(this.#rt(o)){if(n)n.get="stale";if(!a){if(!r){this.delete(t)}if(n&&s)n.returnedStale=true;return s?e:undefined}else{if(n&&s&&e.__staleWhileFetching!==undefined){n.returnedStale=true}return s?e.__staleWhileFetching:undefined}}else{if(n)n.get="hit";if(a){return e.__staleWhileFetching}this.#et(o);if(i){this.#ct(o)}return e}}else if(n){n.get="miss"}}#mt(t,e){this.#q[e]=t;this.#G[t]=e}#et(t){if(t!==this.#z){if(t===this.#$){this.#$=this.#G[t]}else{this.#mt(this.#q[t],this.#G[t])}this.#mt(this.#z,t);this.#z=t}}delete(t){let e=false;if(this.#D!==0){const s=this.#F.get(t);if(s!==undefined){e=true;if(this.#D===1){this.clear()}else{this.#ht(s);const e=this.#U[s];if(this.#Q(e)){e.__abortController.abort(new Error("deleted"))}else if(this.#Y||this.#X){if(this.#Y){this.#N?.(e,t,"delete")}if(this.#X){this.#H?.push([e,t,"delete"])}}this.#F.delete(t);this.#B[s]=undefined;this.#U[s]=undefined;if(s===this.#z){this.#z=this.#q[s]}else if(s===this.#$){this.#$=this.#G[s]}else{this.#G[this.#q[s]]=this.#G[s];this.#q[this.#G[s]]=this.#q[s]}this.#D--;this.#W.push(s)}}}if(this.#X&&this.#H?.length){const t=this.#H;let e;while(e=t?.shift()){this.#L?.(...e)}}return e}clear(){for(const t of this.#it({allowStale:true})){const e=this.#U[t];if(this.#Q(e)){e.__abortController.abort(new Error("deleted"))}else{const s=this.#B[t];if(this.#Y){this.#N?.(e,s,"delete")}if(this.#X){this.#H?.push([e,s,"delete"])}}}this.#F.clear();this.#U.fill(undefined);this.#B.fill(undefined);if(this.#J&&this.#K){this.#J.fill(0);this.#K.fill(0)}if(this.#V){this.#V.fill(0)}this.#$=0;this.#z=0;this.#W.length=0;this.#I=0;this.#D=0;if(this.#X&&this.#H){const t=this.#H;let e;while(e=t?.shift()){this.#L?.(...e)}}}}e.LRUCache=LRUCache},8865:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;const r=typeof process==="object"&&process?process:{stdout:null,stderr:null};const n=s(5673);const o=i(s(4492));const a=s(6915);const isStream=t=>!!t&&typeof t==="object"&&(t instanceof Minipass||t instanceof o.default||(0,e.isReadable)(t)||(0,e.isWritable)(t));e.isStream=isStream;const isReadable=t=>!!t&&typeof t==="object"&&t instanceof n.EventEmitter&&typeof t.pipe==="function"&&t.pipe!==o.default.Writable.prototype.pipe;e.isReadable=isReadable;const isWritable=t=>!!t&&typeof t==="object"&&t instanceof n.EventEmitter&&typeof t.write==="function"&&typeof t.end==="function";e.isWritable=isWritable;const c=Symbol("EOF");const l=Symbol("maybeEmitEnd");const h=Symbol("emittedEnd");const u=Symbol("emittingEnd");const f=Symbol("emittedError");const d=Symbol("closed");const p=Symbol("read");const g=Symbol("flush");const y=Symbol("flushChunk");const w=Symbol("encoding");const v=Symbol("decoder");const b=Symbol("flowing");const S=Symbol("paused");const E=Symbol("resume");const _=Symbol("buffer");const O=Symbol("pipes");const R=Symbol("bufferLength");const P=Symbol("bufferPush");const T=Symbol("bufferShift");const x=Symbol("objectMode");const k=Symbol("destroyed");const A=Symbol("error");const C=Symbol("emitData");const M=Symbol("emitEnd");const N=Symbol("emitEnd2");const L=Symbol("async");const j=Symbol("abort");const D=Symbol("aborted");const I=Symbol("signal");const F=Symbol("dataListeners");const B=Symbol("discarded");const defer=t=>Promise.resolve().then(t);const nodefer=t=>t();const isEndish=t=>t==="end"||t==="finish"||t==="prefinish";const isArrayBufferLike=t=>t instanceof ArrayBuffer||!!t&&typeof t==="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0;const isArrayBufferView=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t);class Pipe{src;dest;opts;ondrain;constructor(t,e,s){this.src=t;this.dest=e;this.opts=s;this.ondrain=()=>t[E]();this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(t,e,s){super(t,e,s);this.proxyErrors=t=>e.emit("error",t);t.on("error",this.proxyErrors)}}const isObjectModeOptions=t=>!!t.objectMode;const isEncodingOptions=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer";class Minipass extends n.EventEmitter{[b]=false;[S]=false;[O]=[];[_]=[];[x];[w];[L];[v];[c]=false;[h]=false;[u]=false;[d]=false;[f]=null;[R]=0;[k]=false;[I];[D]=false;[F]=0;[B]=false;writable=true;readable=true;constructor(...t){const e=t[0]||{};super();if(e.objectMode&&typeof e.encoding==="string"){throw new TypeError("Encoding and objectMode may not be used together")}if(isObjectModeOptions(e)){this[x]=true;this[w]=null}else if(isEncodingOptions(e)){this[w]=e.encoding;this[x]=false}else{this[x]=false;this[w]=null}this[L]=!!e.async;this[v]=this[w]?new a.StringDecoder(this[w]):null;if(e&&e.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[_]})}if(e&&e.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[O]})}const{signal:s}=e;if(s){this[I]=s;if(s.aborted){this[j]()}else{s.addEventListener("abort",(()=>this[j]()))}}}get bufferLength(){return this[R]}get encoding(){return this[w]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[x]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[L]}set["async"](t){this[L]=this[L]||!!t}[j](){this[D]=true;this.emit("abort",this[I]?.reason);this.destroy(this[I]?.reason)}get aborted(){return this[D]}set aborted(t){}write(t,e,s){if(this[D])return false;if(this[c])throw new Error("write after end");if(this[k]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof e==="function"){s=e;e="utf8"}if(!e)e="utf8";const i=this[L]?defer:nodefer;if(!this[x]&&!Buffer.isBuffer(t)){if(isArrayBufferView(t)){t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)}else if(isArrayBufferLike(t)){t=Buffer.from(t)}else if(typeof t!=="string"){throw new Error("Non-contiguous data written to non-objectMode stream")}}if(this[x]){if(this[b]&&this[R]!==0)this[g](true);if(this[b])this.emit("data",t);else this[P](t);if(this[R]!==0)this.emit("readable");if(s)i(s);return this[b]}if(!t.length){if(this[R]!==0)this.emit("readable");if(s)i(s);return this[b]}if(typeof t==="string"&&!(e===this[w]&&!this[v]?.lastNeed)){t=Buffer.from(t,e)}if(Buffer.isBuffer(t)&&this[w]){t=this[v].write(t)}if(this[b]&&this[R]!==0)this[g](true);if(this[b])this.emit("data",t);else this[P](t);if(this[R]!==0)this.emit("readable");if(s)i(s);return this[b]}read(t){if(this[k])return null;this[B]=false;if(this[R]===0||t===0||t&&t>this[R]){this[l]();return null}if(this[x])t=null;if(this[_].length>1&&!this[x]){this[_]=[this[w]?this[_].join(""):Buffer.concat(this[_],this[R])]}const e=this[p](t||null,this[_][0]);this[l]();return e}[p](t,e){if(this[x])this[T]();else{const s=e;if(t===s.length||t===null)this[T]();else if(typeof s==="string"){this[_][0]=s.slice(t);e=s.slice(0,t);this[R]-=t}else{this[_][0]=s.subarray(t);e=s.subarray(0,t);this[R]-=t}}this.emit("data",e);if(!this[_].length&&!this[c])this.emit("drain");return e}end(t,e,s){if(typeof t==="function"){s=t;t=undefined}if(typeof e==="function"){s=e;e="utf8"}if(t!==undefined)this.write(t,e);if(s)this.once("end",s);this[c]=true;this.writable=false;if(this[b]||!this[S])this[l]();return this}[E](){if(this[k])return;if(!this[F]&&!this[O].length){this[B]=true}this[S]=false;this[b]=true;this.emit("resume");if(this[_].length)this[g]();else if(this[c])this[l]();else this.emit("drain")}resume(){return this[E]()}pause(){this[b]=false;this[S]=true;this[B]=false}get destroyed(){return this[k]}get flowing(){return this[b]}get paused(){return this[S]}[P](t){if(this[x])this[R]+=1;else this[R]+=t.length;this[_].push(t)}[T](){if(this[x])this[R]-=1;else this[R]-=this[_][0].length;return this[_].shift()}[g](t=false){do{}while(this[y](this[T]())&&this[_].length);if(!t&&!this[_].length&&!this[c])this.emit("drain")}[y](t){this.emit("data",t);return this[b]}pipe(t,e){if(this[k])return t;this[B]=false;const s=this[h];e=e||{};if(t===r.stdout||t===r.stderr)e.end=false;else e.end=e.end!==false;e.proxyErrors=!!e.proxyErrors;if(s){if(e.end)t.end()}else{this[O].push(!e.proxyErrors?new Pipe(this,t,e):new PipeProxyErrors(this,t,e));if(this[L])defer((()=>this[E]()));else this[E]()}return t}unpipe(t){const e=this[O].find((e=>e.dest===t));if(e){if(this[O].length===1){if(this[b]&&this[F]===0){this[b]=false}this[O]=[]}else this[O].splice(this[O].indexOf(e),1);e.unpipe()}}addListener(t,e){return this.on(t,e)}on(t,e){const s=super.on(t,e);if(t==="data"){this[B]=false;this[F]++;if(!this[O].length&&!this[b]){this[E]()}}else if(t==="readable"&&this[R]!==0){super.emit("readable")}else if(isEndish(t)&&this[h]){super.emit(t);this.removeAllListeners(t)}else if(t==="error"&&this[f]){const t=e;if(this[L])defer((()=>t.call(this,this[f])));else t.call(this,this[f])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){const s=super.off(t,e);if(t==="data"){this[F]=this.listeners("data").length;if(this[F]===0&&!this[B]&&!this[O].length){this[b]=false}}return s}removeAllListeners(t){const e=super.removeAllListeners(t);if(t==="data"||t===undefined){this[F]=0;if(!this[B]&&!this[O].length){this[b]=false}}return e}get emittedEnd(){return this[h]}[l](){if(!this[u]&&!this[h]&&!this[k]&&this[_].length===0&&this[c]){this[u]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[d])this.emit("close");this[u]=false}}emit(t,...e){const s=e[0];if(t!=="error"&&t!=="close"&&t!==k&&this[k]){return false}else if(t==="data"){return!this[x]&&!s?false:this[L]?(defer((()=>this[C](s))),true):this[C](s)}else if(t==="end"){return this[M]()}else if(t==="close"){this[d]=true;if(!this[h]&&!this[k])return false;const t=super.emit("close");this.removeAllListeners("close");return t}else if(t==="error"){this[f]=s;super.emit(A,s);const t=!this[I]||this.listeners("error").length?super.emit("error",s):false;this[l]();return t}else if(t==="resume"){const t=super.emit("resume");this[l]();return t}else if(t==="finish"||t==="prefinish"){const e=super.emit(t);this.removeAllListeners(t);return e}const i=super.emit(t,...e);this[l]();return i}[C](t){for(const e of this[O]){if(e.dest.write(t)===false)this.pause()}const e=this[B]?false:super.emit("data",t);this[l]();return e}[M](){if(this[h])return false;this[h]=true;this.readable=false;return this[L]?(defer((()=>this[N]())),true):this[N]()}[N](){if(this[v]){const t=this[v].end();if(t){for(const e of this[O]){e.dest.write(t)}if(!this[B])super.emit("data",t)}}for(const t of this[O]){t.end()}const t=super.emit("end");this.removeAllListeners("end");return t}async collect(){const t=Object.assign([],{dataLength:0});if(!this[x])t.dataLength=0;const e=this.promise();this.on("data",(e=>{t.push(e);if(!this[x])t.dataLength+=e.length}));await e;return t}async concat(){if(this[x]){throw new Error("cannot concat in objectMode")}const t=await this.collect();return this[w]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,e)=>{this.on(k,(()=>e(new Error("stream destroyed"))));this.on("error",(t=>e(t)));this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[B]=false;let t=false;const stop=async()=>{this.pause();t=true;return{value:undefined,done:true}};const next=()=>{if(t)return stop();const e=this.read();if(e!==null)return Promise.resolve({done:false,value:e});if(this[c])return stop();let s;let i;const onerr=t=>{this.off("data",ondata);this.off("end",onend);this.off(k,ondestroy);stop();i(t)};const ondata=t=>{this.off("error",onerr);this.off("end",onend);this.off(k,ondestroy);this.pause();s({value:t,done:!!this[c]})};const onend=()=>{this.off("error",onerr);this.off("data",ondata);this.off(k,ondestroy);stop();s({done:true,value:undefined})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((t,e)=>{i=e;s=t;this.once(k,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[B]=false;let t=false;const stop=()=>{this.pause();this.off(A,stop);this.off(k,stop);this.off("end",stop);t=true;return{done:true,value:undefined}};const next=()=>{if(t)return stop();const e=this.read();return e===null?stop():{done:false,value:e}};this.once("end",stop);this.once(A,stop);this.once(k,stop);return{next:next,throw:stop,return:stop,[Symbol.iterator](){return this}}}destroy(t){if(this[k]){if(t)this.emit("error",t);else this.emit(k);return this}this[k]=true;this[B]=true;this[_].length=0;this[R]=0;const e=this;if(typeof e.close==="function"&&!this[d])e.close();if(t)this.emit("error",t);else this.emit(k);return this}static get isStream(){return e.isStream}}e.Minipass=Minipass},9569:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;var r=Object.getOwnPropertyDescriptor(e,s);if(!r||("get"in r?!e.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return e[s]}}}Object.defineProperty(t,i,r)}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;const o=s(9802);const a=s(1017);const c=s(7310);const l=n(s(7147));const h=s(7147);const u=h.realpathSync.native;const f=s(3292);const d=s(8865);const p={lstatSync:h.lstatSync,readdir:h.readdir,readdirSync:h.readdirSync,readlinkSync:h.readlinkSync,realpathSync:u,promises:{lstat:f.lstat,readdir:f.readdir,readlink:f.readlink,realpath:f.realpath}};const fsFromOption=t=>!t||t===p||t===l?p:{...p,...t,promises:{...p.promises,...t.promises||{}}};const g=/^\\\\\?\\([a-z]:)\\?$/i;const uncToDrive=t=>t.replace(/\//g,"\\").replace(g,"$1\\");const y=/[\\\/]/;const w=0;const v=1;const b=2;const S=4;const E=6;const _=8;const O=10;const R=12;const P=15;const T=~P;const x=16;const k=32;const A=64;const C=128;const M=256;const N=512;const L=A|C|N;const j=1023;const entToType=t=>t.isFile()?_:t.isDirectory()?S:t.isSymbolicLink()?O:t.isCharacterDevice()?b:t.isBlockDevice()?E:t.isSocket()?R:t.isFIFO()?v:w;const D=new Map;const normalize=t=>{const e=D.get(t);if(e)return e;const s=t.normalize("NFKD");D.set(t,s);return s};const I=new Map;const normalizeNocase=t=>{const e=I.get(t);if(e)return e;const s=normalize(t.toLowerCase());I.set(t,s);return s};class ResolveCache extends o.LRUCache{constructor(){super({max:256})}}e.ResolveCache=ResolveCache;class ChildrenCache extends o.LRUCache{constructor(t=16*1024){super({maxSize:t,sizeCalculation:t=>t.length+1})}}e.ChildrenCache=ChildrenCache;const F=Symbol("PathScurry setAsCwd");class PathBase{name;root;roots;parent;nocase;#gt;#yt;get dev(){return this.#yt}#wt;get mode(){return this.#wt}#vt;get nlink(){return this.#vt}#bt;get uid(){return this.#bt}#St;get gid(){return this.#St}#Et;get rdev(){return this.#Et}#_t;get blksize(){return this.#_t}#Ot;get ino(){return this.#Ot}#D;get size(){return this.#D}#Rt;get blocks(){return this.#Rt}#Pt;get atimeMs(){return this.#Pt}#Tt;get mtimeMs(){return this.#Tt}#xt;get ctimeMs(){return this.#xt}#kt;get birthtimeMs(){return this.#kt}#At;get atime(){return this.#At}#Ct;get mtime(){return this.#Ct}#Mt;get ctime(){return this.#Mt}#Nt;get birthtime(){return this.#Nt}#Lt;#jt;#Dt;#It;#Ft;#Bt;#Ut;#Gt;#qt;#$t;get path(){return(this.parent||this).fullpath()}constructor(t,e=w,s,i,r,n,o){this.name=t;this.#Lt=r?normalizeNocase(t):normalize(t);this.#Ut=e&j;this.nocase=r;this.roots=i;this.root=s||this;this.#Gt=n;this.#Dt=o.fullpath;this.#Ft=o.relative;this.#Bt=o.relativePosix;this.parent=o.parent;if(this.parent){this.#gt=this.parent.#gt}else{this.#gt=fsFromOption(o.fs)}}depth(){if(this.#jt!==undefined)return this.#jt;if(!this.parent)return this.#jt=0;return this.#jt=this.parent.depth()+1}childrenCache(){return this.#Gt}resolve(t){if(!t){return this}const e=this.getRootString(t);const s=t.substring(e.length);const i=s.split(this.splitSep);const r=e?this.getRoot(e).#zt(i):this.#zt(i);return r}#zt(t){let e=this;for(const s of t){e=e.child(s)}return e}children(){const t=this.#Gt.get(this);if(t){return t}const e=Object.assign([],{provisional:0});this.#Gt.set(this,e);this.#Ut&=~x;return e}child(t,e){if(t===""||t==="."){return this}if(t===".."){return this.parent||this}const s=this.children();const i=this.nocase?normalizeNocase(t):normalize(t);for(const t of s){if(t.#Lt===i){return t}}const r=this.parent?this.sep:"";const n=this.#Dt?this.#Dt+r+t:undefined;const o=this.newChild(t,w,{...e,parent:this,fullpath:n});if(!this.canReaddir()){o.#Ut|=C}s.push(o);return o}relative(){if(this.#Ft!==undefined){return this.#Ft}const t=this.name;const e=this.parent;if(!e){return this.#Ft=this.name}const s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.#Bt!==undefined)return this.#Bt;const t=this.name;const e=this.parent;if(!e){return this.#Bt=this.fullpathPosix()}const s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#Dt!==undefined){return this.#Dt}const t=this.name;const e=this.parent;if(!e){return this.#Dt=this.name}const s=e.fullpath();const i=s+(!e.parent?"":this.sep)+t;return this.#Dt=i}fullpathPosix(){if(this.#It!==undefined)return this.#It;if(this.sep==="/")return this.#It=this.fullpath();if(!this.parent){const t=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(t)){return this.#It=`//?/${t}`}else{return this.#It=t}}const t=this.parent;const e=t.fullpathPosix();const s=e+(!e||!t.parent?"":"/")+this.name;return this.#It=s}isUnknown(){return(this.#Ut&P)===w}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#Ut&P)===_}isDirectory(){return(this.#Ut&P)===S}isCharacterDevice(){return(this.#Ut&P)===b}isBlockDevice(){return(this.#Ut&P)===E}isFIFO(){return(this.#Ut&P)===v}isSocket(){return(this.#Ut&P)===R}isSymbolicLink(){return(this.#Ut&O)===O}lstatCached(){return this.#Ut&k?this:undefined}readlinkCached(){return this.#qt}realpathCached(){return this.#$t}readdirCached(){const t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#qt)return true;if(!this.parent)return false;const t=this.#Ut&P;return!(t!==w&&t!==O||this.#Ut&M||this.#Ut&C)}calledReaddir(){return!!(this.#Ut&x)}isENOENT(){return!!(this.#Ut&C)}isNamed(t){return!this.nocase?this.#Lt===normalize(t):this.#Lt===normalizeNocase(t)}async readlink(){const t=this.#qt;if(t){return t}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const t=await this.#gt.promises.readlink(this.fullpath());const e=this.parent.resolve(t);if(e){return this.#qt=e}}catch(t){this.#Wt(t.code);return undefined}}readlinkSync(){const t=this.#qt;if(t){return t}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const t=this.#gt.readlinkSync(this.fullpath());const e=this.parent.resolve(t);if(e){return this.#qt=e}}catch(t){this.#Wt(t.code);return undefined}}#Ht(t){this.#Ut|=x;for(let e=t.provisional;ee(null,t)))}readdirCB(t,e=false){if(!this.canReaddir()){if(e)t(null,[]);else queueMicrotask((()=>t(null,[])));return}const s=this.children();if(this.calledReaddir()){const i=s.slice(0,s.provisional);if(e)t(null,i);else queueMicrotask((()=>t(null,i)));return}this.#re.push(t);if(this.#ne){return}this.#ne=true;const i=this.fullpath();this.#gt.readdir(i,{withFileTypes:true},((t,e)=>{if(t){this.#Zt(t.code);s.provisional=0}else{for(const t of e){this.#Qt(t,s)}this.#Ht(s)}this.#oe(s.slice(0,s.provisional));return}))}#ae;async readdir(){if(!this.canReaddir()){return[]}const t=this.children();if(this.calledReaddir()){return t.slice(0,t.provisional)}const e=this.fullpath();if(this.#ae){await this.#ae}else{let resolve=()=>{};this.#ae=new Promise((t=>resolve=t));try{for(const s of await this.#gt.promises.readdir(e,{withFileTypes:true})){this.#Qt(s,t)}this.#Ht(t)}catch(e){this.#Zt(e.code);t.provisional=0}this.#ae=undefined;resolve()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir()){return[]}const t=this.children();if(this.calledReaddir()){return t.slice(0,t.provisional)}const e=this.fullpath();try{for(const s of this.#gt.readdirSync(e,{withFileTypes:true})){this.#Qt(s,t)}this.#Ht(t)}catch(e){this.#Zt(e.code);t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#Ut&L)return false;const t=P&this.#Ut;if(!(t===w||t===S||t===O)){return false}return true}shouldWalk(t,e){return(this.#Ut&S)===S&&!(this.#Ut&L)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#$t)return this.#$t;if((N|M|C)&this.#Ut)return undefined;try{const t=await this.#gt.promises.realpath(this.fullpath());return this.#$t=this.resolve(t)}catch(t){this.#Jt()}}realpathSync(){if(this.#$t)return this.#$t;if((N|M|C)&this.#Ut)return undefined;try{const t=this.#gt.realpathSync(this.fullpath());return this.#$t=this.resolve(t)}catch(t){this.#Jt()}}[F](t){if(t===this)return;const e=new Set([]);let s=[];let i=this;while(i&&i.parent){e.add(i);i.#Ft=s.join(this.sep);i.#Bt=s.join("/");i=i.parent;s.push("..")}i=t;while(i&&i.parent&&!e.has(i)){i.#Ft=undefined;i.#Bt=undefined;i=i.parent}}}e.PathBase=PathBase;class PathWin32 extends PathBase{sep="\\";splitSep=y;constructor(t,e=w,s,i,r,n,o){super(t,e,s,i,r,n,o)}newChild(t,e=w,s={}){return new PathWin32(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return a.win32.parse(t).root}getRoot(t){t=uncToDrive(t.toUpperCase());if(t===this.root.name){return this.root}for(const[e,s]of Object.entries(this.roots)){if(this.sameRoot(t,e)){return this.roots[t]=s}}return this.roots[t]=new PathScurryWin32(t,this).root}sameRoot(t,e=this.root.name){t=t.toUpperCase().replace(/\//g,"\\").replace(g,"$1\\");return t===e}}e.PathWin32=PathWin32;class PathPosix extends PathBase{splitSep="/";sep="/";constructor(t,e=w,s,i,r,n,o){super(t,e,s,i,r,n,o)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=w,s={}){return new PathPosix(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}}e.PathPosix=PathPosix;class PathScurryBase{root;rootPath;roots;cwd;#ce;#le;#Gt;nocase;#gt;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:n=p}={}){this.#gt=fsFromOption(n);if(t instanceof URL||t.startsWith("file://")){t=(0,c.fileURLToPath)(t)}const o=e.resolve(t);this.roots=Object.create(null);this.rootPath=this.parseRootPath(o);this.#ce=new ResolveCache;this.#le=new ResolveCache;this.#Gt=new ChildrenCache(r);const a=o.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]){a.pop()}if(i===undefined){throw new TypeError("must provide nocase setting to PathScurryBase ctor")}this.nocase=i;this.root=this.newRoot(this.#gt);this.roots[this.rootPath]=this.root;let l=this.root;let h=a.length-1;const u=e.sep;let f=this.rootPath;let d=false;for(const t of a){const e=h--;l=l.child(t,{relative:new Array(e).fill("..").join(u),relativePosix:new Array(e).fill("..").join("/"),fullpath:f+=(d?"":u)+t});d=true}this.cwd=l}depth(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.depth()}childrenCache(){return this.#Gt}resolve(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(!i||i===".")continue;e=e?`${i}/${e}`:i;if(this.isAbsolute(i)){break}}const s=this.#ce.get(e);if(s!==undefined){return s}const i=this.cwd.resolve(e).fullpath();this.#ce.set(e,i);return i}resolvePosix(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(!i||i===".")continue;e=e?`${i}/${e}`:i;if(this.isAbsolute(i)){break}}const s=this.#le.get(e);if(s!==undefined){return s}const i=this.cwd.resolve(e).fullpathPosix();this.#le.set(e,i);return i}relative(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.relative()}relativePosix(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.relativePosix()}basename(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.name}dirname(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:true}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s}=e;if(!t.canReaddir()){return[]}else{const e=await t.readdir();return s?e:e.map((t=>t.name))}}readdirSync(t=this.cwd,e={withFileTypes:true}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true}=e;if(!t.canReaddir()){return[]}else if(s){return t.readdirSync()}else{return t.readdirSync().map((t=>t.name))}}async lstat(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.lstat()}lstatSync(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=[];if(!r||r(t)){o.push(s?t:t.fullpath())}const a=new Set;const walk=(t,e)=>{a.add(t);t.readdirCB(((t,c)=>{if(t){return e(t)}let l=c.length;if(!l)return e();const next=()=>{if(--l===0){e()}};for(const t of c){if(!r||r(t)){o.push(s?t:t.fullpath())}if(i&&t.isSymbolicLink()){t.realpath().then((t=>t?.isUnknown()?t.lstat():t)).then((t=>t?.shouldWalk(a,n)?walk(t,next):next()))}else{if(t.shouldWalk(a,n)){walk(t,next)}else{next()}}}}),true)};const c=t;return new Promise(((t,e)=>{walk(c,(s=>{if(s)return e(s);t(o)}))}))}walkSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=[];if(!r||r(t)){o.push(s?t:t.fullpath())}const a=new Set([t]);for(const t of a){const e=t.readdirSync();for(const t of e){if(!r||r(t)){o.push(s?t:t.fullpath())}let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(a,n)){a.add(e)}}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}return this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;if(!r||r(t)){yield s?t:t.fullpath()}const o=new Set([t]);for(const t of o){const e=t.readdirSync();for(const t of e){if(!r||r(t)){yield s?t:t.fullpath()}let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(o,n)){o.add(e)}}}}stream(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=new d.Minipass({objectMode:true});if(!r||r(t)){o.write(s?t:t.fullpath())}const a=new Set;const c=[t];let l=0;const process=()=>{let t=false;while(!t){const e=c.shift();if(!e){if(l===0)o.end();return}l++;a.add(e);const onReaddir=(e,u,f=false)=>{if(e)return o.emit("error",e);if(i&&!f){const t=[];for(const e of u){if(e.isSymbolicLink()){t.push(e.realpath().then((t=>t?.isUnknown()?t.lstat():t)))}}if(t.length){Promise.all(t).then((()=>onReaddir(null,u,true)));return}}for(const e of u){if(e&&(!r||r(e))){if(!o.write(s?e:e.fullpath())){t=true}}}l--;for(const t of u){const e=t.realpathCached()||t;if(e.shouldWalk(a,n)){c.push(e)}}if(t&&!o.flowing){o.once("drain",process)}else if(!h){process()}};let h=true;e.readdirCB(onReaddir,true);h=false}};process();return o}streamSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=new d.Minipass({objectMode:true});const a=new Set;if(!r||r(t)){o.write(s?t:t.fullpath())}const c=[t];let l=0;const process=()=>{let t=false;while(!t){const e=c.shift();if(!e){if(l===0)o.end();return}l++;a.add(e);const h=e.readdirSync();for(const e of h){if(!r||r(e)){if(!o.write(s?e:e.fullpath())){t=true}}}l--;for(const t of h){let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(a,n)){c.push(e)}}}if(t&&!o.flowing)o.once("drain",process)};process();return o}chdir(t=this.cwd){const e=this.cwd;this.cwd=typeof t==="string"?this.cwd.resolve(t):t;this.cwd[F](e)}}e.PathScurryBase=PathScurryBase;class PathScurryWin32 extends PathScurryBase{sep="\\";constructor(t=process.cwd(),e={}){const{nocase:s=true}=e;super(t,a.win32,"\\",{...e,nocase:s});this.nocase=s;for(let t=this.cwd;t;t=t.parent){t.nocase=this.nocase}}parseRootPath(t){return a.win32.parse(t).root.toUpperCase()}newRoot(t){return new PathWin32(this.rootPath,S,undefined,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}}e.PathScurryWin32=PathScurryWin32;class PathScurryPosix extends PathScurryBase{sep="/";constructor(t=process.cwd(),e={}){const{nocase:s=false}=e;super(t,a.posix,"/",{...e,nocase:s});this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new PathPosix(this.rootPath,S,undefined,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}}e.PathScurryPosix=PathScurryPosix;class PathScurryDarwin extends PathScurryPosix{constructor(t=process.cwd(),e={}){const{nocase:s=true}=e;super(t,{...e,nocase:s})}}e.PathScurryDarwin=PathScurryDarwin;e.Path=process.platform==="win32"?PathWin32:PathPosix;e.PathScurry=process.platform==="win32"?PathScurryWin32:process.platform==="darwin"?PathScurryDarwin:PathScurryPosix}};var e={};function __nccwpck_require__(s){var i=e[s];if(i!==undefined){return i.exports}var r=e[s]={exports:{}};var n=true;try{t[s].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete e[s]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var s={};(()=>{const t=__nccwpck_require__(2186);try{__nccwpck_require__(4351)()}catch(e){t.setFailed(`Action failed with error ${e}`)}})();module.exports=s})(); \ No newline at end of file +(()=>{var t={7351:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.issue=e.issueCommand=void 0;const o=n(s(2037));const a=s(5278);function issueCommand(t,e,s){const i=new Command(t,e,s);process.stdout.write(i.toString()+o.EOL)}e.issueCommand=issueCommand;function issue(t,e=""){issueCommand(t,{},e)}e.issue=issue;const c="::";class Command{constructor(t,e,s){if(!t){t="missing.command"}this.command=t;this.properties=e;this.message=s}toString(){let t=c+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";let e=true;for(const s in this.properties){if(this.properties.hasOwnProperty(s)){const i=this.properties[s];if(i){if(e){e=false}else{t+=","}t+=`${s}=${escapeProperty(i)}`}}}}t+=`${c}${escapeData(this.message)}`;return t}}function escapeData(t){return a.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(t){return a.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};var o=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.getIDToken=e.getState=e.saveState=e.group=e.endGroup=e.startGroup=e.info=e.notice=e.warning=e.error=e.debug=e.isDebug=e.setFailed=e.setCommandEcho=e.setOutput=e.getBooleanInput=e.getMultilineInput=e.getInput=e.addPath=e.setSecret=e.exportVariable=e.ExitCode=void 0;const a=s(7351);const c=s(717);const l=s(5278);const h=n(s(2037));const u=n(s(1017));const f=s(8041);var d;(function(t){t[t["Success"]=0]="Success";t[t["Failure"]=1]="Failure"})(d=e.ExitCode||(e.ExitCode={}));function exportVariable(t,e){const s=l.toCommandValue(e);process.env[t]=s;const i=process.env["GITHUB_ENV"]||"";if(i){return c.issueFileCommand("ENV",c.prepareKeyValueMessage(t,e))}a.issueCommand("set-env",{name:t},s)}e.exportVariable=exportVariable;function setSecret(t){a.issueCommand("add-mask",{},t)}e.setSecret=setSecret;function addPath(t){const e=process.env["GITHUB_PATH"]||"";if(e){c.issueFileCommand("PATH",t)}else{a.issueCommand("add-path",{},t)}process.env["PATH"]=`${t}${u.delimiter}${process.env["PATH"]}`}e.addPath=addPath;function getInput(t,e){const s=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!s){throw new Error(`Input required and not supplied: ${t}`)}if(e&&e.trimWhitespace===false){return s}return s.trim()}e.getInput=getInput;function getMultilineInput(t,e){const s=getInput(t,e).split("\n").filter((t=>t!==""));if(e&&e.trimWhitespace===false){return s}return s.map((t=>t.trim()))}e.getMultilineInput=getMultilineInput;function getBooleanInput(t,e){const s=["true","True","TRUE"];const i=["false","False","FALSE"];const r=getInput(t,e);if(s.includes(r))return true;if(i.includes(r))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}e.getBooleanInput=getBooleanInput;function setOutput(t,e){const s=process.env["GITHUB_OUTPUT"]||"";if(s){return c.issueFileCommand("OUTPUT",c.prepareKeyValueMessage(t,e))}process.stdout.write(h.EOL);a.issueCommand("set-output",{name:t},l.toCommandValue(e))}e.setOutput=setOutput;function setCommandEcho(t){a.issue("echo",t?"on":"off")}e.setCommandEcho=setCommandEcho;function setFailed(t){process.exitCode=d.Failure;error(t)}e.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}e.isDebug=isDebug;function debug(t){a.issueCommand("debug",{},t)}e.debug=debug;function error(t,e={}){a.issueCommand("error",l.toCommandProperties(e),t instanceof Error?t.toString():t)}e.error=error;function warning(t,e={}){a.issueCommand("warning",l.toCommandProperties(e),t instanceof Error?t.toString():t)}e.warning=warning;function notice(t,e={}){a.issueCommand("notice",l.toCommandProperties(e),t instanceof Error?t.toString():t)}e.notice=notice;function info(t){process.stdout.write(t+h.EOL)}e.info=info;function startGroup(t){a.issue("group",t)}e.startGroup=startGroup;function endGroup(){a.issue("endgroup")}e.endGroup=endGroup;function group(t,e){return o(this,void 0,void 0,(function*(){startGroup(t);let s;try{s=yield e()}finally{endGroup()}return s}))}e.group=group;function saveState(t,e){const s=process.env["GITHUB_STATE"]||"";if(s){return c.issueFileCommand("STATE",c.prepareKeyValueMessage(t,e))}a.issueCommand("save-state",{name:t},l.toCommandValue(e))}e.saveState=saveState;function getState(t){return process.env[`STATE_${t}`]||""}e.getState=getState;function getIDToken(t){return o(this,void 0,void 0,(function*(){return yield f.OidcClient.getIDToken(t)}))}e.getIDToken=getIDToken;var p=s(1327);Object.defineProperty(e,"summary",{enumerable:true,get:function(){return p.summary}});var g=s(1327);Object.defineProperty(e,"markdownSummary",{enumerable:true,get:function(){return g.markdownSummary}});var y=s(2981);Object.defineProperty(e,"toPosixPath",{enumerable:true,get:function(){return y.toPosixPath}});Object.defineProperty(e,"toWin32Path",{enumerable:true,get:function(){return y.toWin32Path}});Object.defineProperty(e,"toPlatformPath",{enumerable:true,get:function(){return y.toPlatformPath}})},717:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.prepareKeyValueMessage=e.issueFileCommand=void 0;const o=n(s(7147));const a=n(s(2037));const c=s(5840);const l=s(5278);function issueFileCommand(t,e){const s=process.env[`GITHUB_${t}`];if(!s){throw new Error(`Unable to find environment variable for file command ${t}`)}if(!o.existsSync(s)){throw new Error(`Missing file at path: ${s}`)}o.appendFileSync(s,`${l.toCommandValue(e)}${a.EOL}`,{encoding:"utf8"})}e.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(t,e){const s=`ghadelimiter_${c.v4()}`;const i=l.toCommandValue(e);if(t.includes(s)){throw new Error(`Unexpected input: name should not contain the delimiter "${s}"`)}if(i.includes(s)){throw new Error(`Unexpected input: value should not contain the delimiter "${s}"`)}return`${t}<<${s}${a.EOL}${i}${a.EOL}${s}`}e.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(t,e,s){"use strict";var i=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.OidcClient=void 0;const r=s(6255);const n=s(5526);const o=s(2186);class OidcClient{static createHttpClient(t=true,e=10){const s={allowRetries:t,maxRetries:e};return new r.HttpClient("actions/oidc-client",[new n.BearerCredentialHandler(OidcClient.getRequestToken())],s)}static getRequestToken(){const t=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!t){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return t}static getIDTokenUrl(){const t=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!t){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return t}static getCall(t){var e;return i(this,void 0,void 0,(function*(){const s=OidcClient.createHttpClient();const i=yield s.getJson(t).catch((t=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${t.statusCode}\n \n Error Message: ${t.result.message}`)}));const r=(e=i.result)===null||e===void 0?void 0:e.value;if(!r){throw new Error("Response json body do not have ID Token field")}return r}))}static getIDToken(t){return i(this,void 0,void 0,(function*(){try{let e=OidcClient.getIDTokenUrl();if(t){const s=encodeURIComponent(t);e=`${e}&audience=${s}`}o.debug(`ID token url is ${e}`);const s=yield OidcClient.getCall(e);o.setSecret(s);return s}catch(t){throw new Error(`Error message: ${t.message}`)}}))}}e.OidcClient=OidcClient},2981:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.toPlatformPath=e.toWin32Path=e.toPosixPath=void 0;const o=n(s(1017));function toPosixPath(t){return t.replace(/[\\]/g,"/")}e.toPosixPath=toPosixPath;function toWin32Path(t){return t.replace(/[/]/g,"\\")}e.toWin32Path=toWin32Path;function toPlatformPath(t){return t.replace(/[/\\]/g,o.sep)}e.toPlatformPath=toPlatformPath},1327:function(t,e,s){"use strict";var i=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.summary=e.markdownSummary=e.SUMMARY_DOCS_URL=e.SUMMARY_ENV_VAR=void 0;const r=s(2037);const n=s(7147);const{access:o,appendFile:a,writeFile:c}=n.promises;e.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";e.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 i(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const t=process.env[e.SUMMARY_ENV_VAR];if(!t){throw new Error(`Unable to find environment variable for $${e.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield o(t,n.constants.R_OK|n.constants.W_OK)}catch(e){throw new Error(`Unable to access summary file: '${t}'. Check if the file has correct read/write permissions.`)}this._filePath=t;return this._filePath}))}wrap(t,e,s={}){const i=Object.entries(s).map((([t,e])=>` ${t}="${e}"`)).join("");if(!e){return`<${t}${i}>`}return`<${t}${i}>${e}`}write(t){return i(this,void 0,void 0,(function*(){const e=!!(t===null||t===void 0?void 0:t.overwrite);const s=yield this.filePath();const i=e?c:a;yield i(s,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return i(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(t,e=false){this._buffer+=t;return e?this.addEOL():this}addEOL(){return this.addRaw(r.EOL)}addCodeBlock(t,e){const s=Object.assign({},e&&{lang:e});const i=this.wrap("pre",this.wrap("code",t),s);return this.addRaw(i).addEOL()}addList(t,e=false){const s=e?"ol":"ul";const i=t.map((t=>this.wrap("li",t))).join("");const r=this.wrap(s,i);return this.addRaw(r).addEOL()}addTable(t){const e=t.map((t=>{const e=t.map((t=>{if(typeof t==="string"){return this.wrap("td",t)}const{header:e,data:s,colspan:i,rowspan:r}=t;const n=e?"th":"td";const o=Object.assign(Object.assign({},i&&{colspan:i}),r&&{rowspan:r});return this.wrap(n,s,o)})).join("");return this.wrap("tr",e)})).join("");const s=this.wrap("table",e);return this.addRaw(s).addEOL()}addDetails(t,e){const s=this.wrap("details",this.wrap("summary",t)+e);return this.addRaw(s).addEOL()}addImage(t,e,s){const{width:i,height:r}=s||{};const n=Object.assign(Object.assign({},i&&{width:i}),r&&{height:r});const o=this.wrap("img",null,Object.assign({src:t,alt:e},n));return this.addRaw(o).addEOL()}addHeading(t,e){const s=`h${e}`;const i=["h1","h2","h3","h4","h5","h6"].includes(s)?s:"h1";const r=this.wrap(i,t);return this.addRaw(r).addEOL()}addSeparator(){const t=this.wrap("hr",null);return this.addRaw(t).addEOL()}addBreak(){const t=this.wrap("br",null);return this.addRaw(t).addEOL()}addQuote(t,e){const s=Object.assign({},e&&{cite:e});const i=this.wrap("blockquote",t,s);return this.addRaw(i).addEOL()}addLink(t,e){const s=this.wrap("a",t,{href:e});return this.addRaw(s).addEOL()}}const l=new Summary;e.markdownSummary=l;e.summary=l},5278:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.toCommandProperties=e.toCommandValue=void 0;function toCommandValue(t){if(t===null||t===undefined){return""}else if(typeof t==="string"||t instanceof String){return t}return JSON.stringify(t)}e.toCommandValue=toCommandValue;function toCommandProperties(t){if(!Object.keys(t).length){return{}}return{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}}e.toCommandProperties=toCommandProperties},5526:function(t,e){"use strict";var s=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.PersonalAccessTokenCredentialHandler=e.BearerCredentialHandler=e.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(t,e){this.username=t;this.password=e}prepareRequest(t){if(!t.headers){throw Error("The request has no headers")}t.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}e.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(t){this.token=t}prepareRequest(t){if(!t.headers){throw Error("The request has no headers")}t.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}e.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(t){this.token=t}prepareRequest(t){if(!t.headers){throw Error("The request has no headers")}t.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}e.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};var o=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.HttpClient=e.isHttps=e.HttpClientResponse=e.HttpClientError=e.getProxyUrl=e.MediaTypes=e.Headers=e.HttpCodes=void 0;const a=n(s(3685));const c=n(s(5687));const l=n(s(9835));const h=n(s(4294));var u;(function(t){t[t["OK"]=200]="OK";t[t["MultipleChoices"]=300]="MultipleChoices";t[t["MovedPermanently"]=301]="MovedPermanently";t[t["ResourceMoved"]=302]="ResourceMoved";t[t["SeeOther"]=303]="SeeOther";t[t["NotModified"]=304]="NotModified";t[t["UseProxy"]=305]="UseProxy";t[t["SwitchProxy"]=306]="SwitchProxy";t[t["TemporaryRedirect"]=307]="TemporaryRedirect";t[t["PermanentRedirect"]=308]="PermanentRedirect";t[t["BadRequest"]=400]="BadRequest";t[t["Unauthorized"]=401]="Unauthorized";t[t["PaymentRequired"]=402]="PaymentRequired";t[t["Forbidden"]=403]="Forbidden";t[t["NotFound"]=404]="NotFound";t[t["MethodNotAllowed"]=405]="MethodNotAllowed";t[t["NotAcceptable"]=406]="NotAcceptable";t[t["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";t[t["RequestTimeout"]=408]="RequestTimeout";t[t["Conflict"]=409]="Conflict";t[t["Gone"]=410]="Gone";t[t["TooManyRequests"]=429]="TooManyRequests";t[t["InternalServerError"]=500]="InternalServerError";t[t["NotImplemented"]=501]="NotImplemented";t[t["BadGateway"]=502]="BadGateway";t[t["ServiceUnavailable"]=503]="ServiceUnavailable";t[t["GatewayTimeout"]=504]="GatewayTimeout"})(u=e.HttpCodes||(e.HttpCodes={}));var f;(function(t){t["Accept"]="accept";t["ContentType"]="content-type"})(f=e.Headers||(e.Headers={}));var d;(function(t){t["ApplicationJson"]="application/json"})(d=e.MediaTypes||(e.MediaTypes={}));function getProxyUrl(t){const e=l.getProxyUrl(new URL(t));return e?e.href:""}e.getProxyUrl=getProxyUrl;const p=[u.MovedPermanently,u.ResourceMoved,u.SeeOther,u.TemporaryRedirect,u.PermanentRedirect];const g=[u.BadGateway,u.ServiceUnavailable,u.GatewayTimeout];const y=["OPTIONS","GET","DELETE","HEAD"];const w=10;const v=5;class HttpClientError extends Error{constructor(t,e){super(t);this.name="HttpClientError";this.statusCode=e;Object.setPrototypeOf(this,HttpClientError.prototype)}}e.HttpClientError=HttpClientError;class HttpClientResponse{constructor(t){this.message=t}readBody(){return o(this,void 0,void 0,(function*(){return new Promise((t=>o(this,void 0,void 0,(function*(){let e=Buffer.alloc(0);this.message.on("data",(t=>{e=Buffer.concat([e,t])}));this.message.on("end",(()=>{t(e.toString())}))}))))}))}}e.HttpClientResponse=HttpClientResponse;function isHttps(t){const e=new URL(t);return e.protocol==="https:"}e.isHttps=isHttps;class HttpClient{constructor(t,e,s){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=t;this.handlers=e||[];this.requestOptions=s;if(s){if(s.ignoreSslError!=null){this._ignoreSslError=s.ignoreSslError}this._socketTimeout=s.socketTimeout;if(s.allowRedirects!=null){this._allowRedirects=s.allowRedirects}if(s.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=s.allowRedirectDowngrade}if(s.maxRedirects!=null){this._maxRedirects=Math.max(s.maxRedirects,0)}if(s.keepAlive!=null){this._keepAlive=s.keepAlive}if(s.allowRetries!=null){this._allowRetries=s.allowRetries}if(s.maxRetries!=null){this._maxRetries=s.maxRetries}}}options(t,e){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",t,null,e||{})}))}get(t,e){return o(this,void 0,void 0,(function*(){return this.request("GET",t,null,e||{})}))}del(t,e){return o(this,void 0,void 0,(function*(){return this.request("DELETE",t,null,e||{})}))}post(t,e,s){return o(this,void 0,void 0,(function*(){return this.request("POST",t,e,s||{})}))}patch(t,e,s){return o(this,void 0,void 0,(function*(){return this.request("PATCH",t,e,s||{})}))}put(t,e,s){return o(this,void 0,void 0,(function*(){return this.request("PUT",t,e,s||{})}))}head(t,e){return o(this,void 0,void 0,(function*(){return this.request("HEAD",t,null,e||{})}))}sendStream(t,e,s,i){return o(this,void 0,void 0,(function*(){return this.request(t,e,s,i)}))}getJson(t,e={}){return o(this,void 0,void 0,(function*(){e[f.Accept]=this._getExistingOrDefaultHeader(e,f.Accept,d.ApplicationJson);const s=yield this.get(t,e);return this._processResponse(s,this.requestOptions)}))}postJson(t,e,s={}){return o(this,void 0,void 0,(function*(){const i=JSON.stringify(e,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,d.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,d.ApplicationJson);const r=yield this.post(t,i,s);return this._processResponse(r,this.requestOptions)}))}putJson(t,e,s={}){return o(this,void 0,void 0,(function*(){const i=JSON.stringify(e,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,d.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,d.ApplicationJson);const r=yield this.put(t,i,s);return this._processResponse(r,this.requestOptions)}))}patchJson(t,e,s={}){return o(this,void 0,void 0,(function*(){const i=JSON.stringify(e,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,d.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,d.ApplicationJson);const r=yield this.patch(t,i,s);return this._processResponse(r,this.requestOptions)}))}request(t,e,s,i){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const r=new URL(e);let n=this._prepareRequest(t,r,i);const o=this._allowRetries&&y.includes(t)?this._maxRetries+1:1;let a=0;let c;do{c=yield this.requestRaw(n,s);if(c&&c.message&&c.message.statusCode===u.Unauthorized){let t;for(const e of this.handlers){if(e.canHandleAuthentication(c)){t=e;break}}if(t){return t.handleAuthentication(this,n,s)}else{return c}}let e=this._maxRedirects;while(c.message.statusCode&&p.includes(c.message.statusCode)&&this._allowRedirects&&e>0){const o=c.message.headers["location"];if(!o){break}const a=new URL(o);if(r.protocol==="https:"&&r.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!==r.hostname){for(const t in i){if(t.toLowerCase()==="authorization"){delete i[t]}}}n=this._prepareRequest(t,a,i);c=yield this.requestRaw(n,s);e--}if(!c.message.statusCode||!g.includes(c.message.statusCode)){return c}a+=1;if(a{function callbackForResult(t,e){if(t){i(t)}else if(!e){i(new Error("Unknown error"))}else{s(e)}}this.requestRawWithCallback(t,e,callbackForResult)}))}))}requestRawWithCallback(t,e,s){if(typeof e==="string"){if(!t.options.headers){t.options.headers={}}t.options.headers["Content-Length"]=Buffer.byteLength(e,"utf8")}let i=false;function handleResult(t,e){if(!i){i=true;s(t,e)}}const r=t.httpModule.request(t.options,(t=>{const e=new HttpClientResponse(t);handleResult(undefined,e)}));let n;r.on("socket",(t=>{n=t}));r.setTimeout(this._socketTimeout||3*6e4,(()=>{if(n){n.end()}handleResult(new Error(`Request timeout: ${t.options.path}`))}));r.on("error",(function(t){handleResult(t)}));if(e&&typeof e==="string"){r.write(e,"utf8")}if(e&&typeof e!=="string"){e.on("close",(function(){r.end()}));e.pipe(r)}else{r.end()}}getAgent(t){const e=new URL(t);return this._getAgent(e)}_prepareRequest(t,e,s){const i={};i.parsedUrl=e;const r=i.parsedUrl.protocol==="https:";i.httpModule=r?c:a;const n=r?443:80;i.options={};i.options.host=i.parsedUrl.hostname;i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):n;i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||"");i.options.method=t;i.options.headers=this._mergeHeaders(s);if(this.userAgent!=null){i.options.headers["user-agent"]=this.userAgent}i.options.agent=this._getAgent(i.parsedUrl);if(this.handlers){for(const t of this.handlers){t.prepareRequest(i.options)}}return i}_mergeHeaders(t){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(t||{}))}return lowercaseKeys(t||{})}_getExistingOrDefaultHeader(t,e,s){let i;if(this.requestOptions&&this.requestOptions.headers){i=lowercaseKeys(this.requestOptions.headers)[e]}return t[e]||i||s}_getAgent(t){let e;const s=l.getProxyUrl(t);const i=s&&s.hostname;if(this._keepAlive&&i){e=this._proxyAgent}if(this._keepAlive&&!i){e=this._agent}if(e){return e}const r=t.protocol==="https:";let n=100;if(this.requestOptions){n=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(s&&s.hostname){const t={maxSockets:n,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(s.username||s.password)&&{proxyAuth:`${s.username}:${s.password}`}),{host:s.hostname,port:s.port})};let i;const o=s.protocol==="https:";if(r){i=o?h.httpsOverHttps:h.httpsOverHttp}else{i=o?h.httpOverHttps:h.httpOverHttp}e=i(t);this._proxyAgent=e}if(this._keepAlive&&!e){const t={keepAlive:this._keepAlive,maxSockets:n};e=r?new c.Agent(t):new a.Agent(t);this._agent=e}if(!e){e=r?c.globalAgent:a.globalAgent}if(r&&this._ignoreSslError){e.options=Object.assign(e.options||{},{rejectUnauthorized:false})}return e}_performExponentialBackoff(t){return o(this,void 0,void 0,(function*(){t=Math.min(w,t);const e=v*Math.pow(2,t);return new Promise((t=>setTimeout((()=>t()),e)))}))}_processResponse(t,e){return o(this,void 0,void 0,(function*(){return new Promise(((s,i)=>o(this,void 0,void 0,(function*(){const r=t.message.statusCode||0;const n={statusCode:r,result:null,headers:{}};if(r===u.NotFound){s(n)}function dateTimeDeserializer(t,e){if(typeof e==="string"){const t=new Date(e);if(!isNaN(t.valueOf())){return t}}return e}let o;let a;try{a=yield t.readBody();if(a&&a.length>0){if(e&&e.deserializeDates){o=JSON.parse(a,dateTimeDeserializer)}else{o=JSON.parse(a)}n.result=o}n.headers=t.message.headers}catch(t){}if(r>299){let t;if(o&&o.message){t=o.message}else if(a&&a.length>0){t=a}else{t=`Failed request: (${r})`}const e=new HttpClientError(t,r);e.result=n.result;i(e)}else{s(n)}}))))}))}}e.HttpClient=HttpClient;const lowercaseKeys=t=>Object.keys(t).reduce(((e,s)=>(e[s.toLowerCase()]=t[s],e)),{})},9835:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.checkBypass=e.getProxyUrl=void 0;function getProxyUrl(t){const e=t.protocol==="https:";if(checkBypass(t)){return undefined}const s=(()=>{if(e){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(s){return new URL(s)}else{return undefined}}e.getProxyUrl=getProxyUrl;function checkBypass(t){if(!t.hostname){return false}const e=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!e){return false}let s;if(t.port){s=Number(t.port)}else if(t.protocol==="http:"){s=80}else if(t.protocol==="https:"){s=443}const i=[t.hostname.toUpperCase()];if(typeof s==="number"){i.push(`${i[0]}:${s}`)}for(const t of e.split(",").map((t=>t.trim().toUpperCase())).filter((t=>t))){if(i.some((e=>e===t))){return true}}return false}e.checkBypass=checkBypass},9417:t=>{"use strict";t.exports=balanced;function balanced(t,e,s){if(t instanceof RegExp)t=maybeMatch(t,s);if(e instanceof RegExp)e=maybeMatch(e,s);var i=range(t,e,s);return i&&{start:i[0],end:i[1],pre:s.slice(0,i[0]),body:s.slice(i[0]+t.length,i[1]),post:s.slice(i[1]+e.length)}}function maybeMatch(t,e){var s=e.match(t);return s?s[0]:null}balanced.range=range;function range(t,e,s){var i,r,n,o,a;var c=s.indexOf(t);var l=s.indexOf(e,c+1);var h=c;if(c>=0&&l>0){i=[];n=s.length;while(h>=0&&!a){if(h==c){i.push(h);c=s.indexOf(t,h+1)}else if(i.length==1){a=[i.pop(),l]}else{r=i.pop();if(r=0?c:l}if(i.length){a=[n,o]}}return a}},3717:(t,e,s)=>{var i=s(6891);var r=s(9417);t.exports=expandTop;var n="\0SLASH"+Math.random()+"\0";var o="\0OPEN"+Math.random()+"\0";var a="\0CLOSE"+Math.random()+"\0";var c="\0COMMA"+Math.random()+"\0";var l="\0PERIOD"+Math.random()+"\0";function numeric(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function escapeBraces(t){return t.split("\\\\").join(n).split("\\{").join(o).split("\\}").join(a).split("\\,").join(c).split("\\.").join(l)}function unescapeBraces(t){return t.split(n).join("\\").split(o).join("{").split(a).join("}").split(c).join(",").split(l).join(".")}function parseCommaParts(t){if(!t)return[""];var e=[];var s=r("{","}",t);if(!s)return t.split(",");var i=s.pre;var n=s.body;var o=s.post;var a=i.split(",");a[a.length-1]+="{"+n+"}";var c=parseCommaParts(o);if(o.length){a[a.length-1]+=c.shift();a.push.apply(a,c)}e.push.apply(e,a);return e}function expandTop(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return expand(escapeBraces(t),true).map(unescapeBraces)}function identity(t){return t}function embrace(t){return"{"+t+"}"}function isPadded(t){return/^-?0\d/.test(t)}function lte(t,e){return t<=e}function gte(t,e){return t>=e}function expand(t,e){var s=[];var n=r("{","}",t);if(!n||/\$$/.test(n.pre))return[t];var o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body);var c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body);var l=o||c;var h=n.body.indexOf(",")>=0;if(!l&&!h){if(n.post.match(/,.*\}/)){t=n.pre+"{"+n.body+a+n.post;return expand(t)}return[t]}var u;if(l){u=n.body.split(/\.\./)}else{u=parseCommaParts(n.body);if(u.length===1){u=expand(u[0],false).map(embrace);if(u.length===1){var f=n.post.length?expand(n.post,false):[""];return f.map((function(t){return n.pre+u[0]+t}))}}}var d=n.pre;var f=n.post.length?expand(n.post,false):[""];var p;if(l){var g=numeric(u[0]);var y=numeric(u[1]);var w=Math.max(u[0].length,u[1].length);var v=u.length==3?Math.abs(numeric(u[2])):1;var b=lte;var S=y0){var P=new Array(R+1).join("0");if(_<0)O="-"+P+O.slice(1);else O=P+O}}}p.push(O)}}else{p=i(u,(function(t){return expand(t,false)}))}for(var T=0;T{t.exports=function(t,s){var i=[];for(var r=0;r{var i=s(9417);t.exports=expandTop;var r="\0SLASH"+Math.random()+"\0";var n="\0OPEN"+Math.random()+"\0";var o="\0CLOSE"+Math.random()+"\0";var a="\0COMMA"+Math.random()+"\0";var c="\0PERIOD"+Math.random()+"\0";function numeric(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function escapeBraces(t){return t.split("\\\\").join(r).split("\\{").join(n).split("\\}").join(o).split("\\,").join(a).split("\\.").join(c)}function unescapeBraces(t){return t.split(r).join("\\").split(n).join("{").split(o).join("}").split(a).join(",").split(c).join(".")}function parseCommaParts(t){if(!t)return[""];var e=[];var s=i("{","}",t);if(!s)return t.split(",");var r=s.pre;var n=s.body;var o=s.post;var a=r.split(",");a[a.length-1]+="{"+n+"}";var c=parseCommaParts(o);if(o.length){a[a.length-1]+=c.shift();a.push.apply(a,c)}e.push.apply(e,a);return e}function expandTop(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return expand(escapeBraces(t),true).map(unescapeBraces)}function embrace(t){return"{"+t+"}"}function isPadded(t){return/^-?0\d/.test(t)}function lte(t,e){return t<=e}function gte(t,e){return t>=e}function expand(t,e){var s=[];var r=i("{","}",t);if(!r)return[t];var n=r.pre;var a=r.post.length?expand(r.post,false):[""];if(/\$$/.test(r.pre)){for(var c=0;c=0;if(!f&&!d){if(r.post.match(/,.*\}/)){t=r.pre+"{"+r.body+o+r.post;return expand(t)}return[t]}var p;if(f){p=r.body.split(/\.\./)}else{p=parseCommaParts(r.body);if(p.length===1){p=expand(p[0],false).map(embrace);if(p.length===1){return a.map((function(t){return r.pre+p[0]+t}))}}}var g;if(f){var y=numeric(p[0]);var w=numeric(p[1]);var v=Math.max(p[0].length,p[1].length);var b=p.length==3?Math.abs(numeric(p[2])):1;var S=lte;var E=w0){var T=new Array(P+1).join("0");if(O<0)R="-"+T+R.slice(1);else R=T+R}}}g.push(R)}}else{g=[];for(var x=0;x{t.exports=minimatch;minimatch.Minimatch=Minimatch;var i=function(){try{return s(1017)}catch(t){}}()||{sep:"/"};minimatch.sep=i.sep;var r=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var n=s(3717);var o={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var a="[^/]";var c=a+"*?";var l="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var h="(?:(?!(?:\\/|^)\\.).)*?";var u=charSet("().*{}+?[]^$\\!");function charSet(t){return t.split("").reduce((function(t,e){t[e]=true;return t}),{})}var f=/\/+/;minimatch.filter=filter;function filter(t,e){e=e||{};return function(s,i,r){return minimatch(s,t,e)}}function ext(t,e){e=e||{};var s={};Object.keys(t).forEach((function(e){s[e]=t[e]}));Object.keys(e).forEach((function(t){s[t]=e[t]}));return s}minimatch.defaults=function(t){if(!t||typeof t!=="object"||!Object.keys(t).length){return minimatch}var e=minimatch;var s=function minimatch(s,i,r){return e(s,i,ext(t,r))};s.Minimatch=function Minimatch(s,i){return new e.Minimatch(s,ext(t,i))};s.Minimatch.defaults=function defaults(s){return e.defaults(ext(t,s)).Minimatch};s.filter=function filter(s,i){return e.filter(s,ext(t,i))};s.defaults=function defaults(s){return e.defaults(ext(t,s))};s.makeRe=function makeRe(s,i){return e.makeRe(s,ext(t,i))};s.braceExpand=function braceExpand(s,i){return e.braceExpand(s,ext(t,i))};s.match=function(s,i,r){return e.match(s,i,ext(t,r))};return s};Minimatch.defaults=function(t){return minimatch.defaults(t).Minimatch};function minimatch(t,e,s){assertValidPattern(e);if(!s)s={};if(!s.nocomment&&e.charAt(0)==="#"){return false}return new Minimatch(e,s).match(t)}function Minimatch(t,e){if(!(this instanceof Minimatch)){return new Minimatch(t,e)}assertValidPattern(t);if(!e)e={};t=t.trim();if(!e.allowWindowsEscape&&i.sep!=="/"){t=t.split(i.sep).join("/")}this.options=e;this.set=[];this.pattern=t;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!e.partial;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){var t=this.pattern;var e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();var s=this.globSet=this.braceExpand();if(e.debug)this.debug=function debug(){console.error.apply(console,arguments)};this.debug(this.pattern,s);s=this.globParts=s.map((function(t){return t.split(f)}));this.debug(this.pattern,s);s=s.map((function(t,e,s){return t.map(this.parse,this)}),this);this.debug(this.pattern,s);s=s.filter((function(t){return t.indexOf(false)===-1}));this.debug(this.pattern,s);this.set=s}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var t=this.pattern;var e=false;var s=this.options;var i=0;if(s.nonegate)return;for(var r=0,n=t.length;rd){throw new TypeError("pattern is too long")}};Minimatch.prototype.parse=parse;var p={};function parse(t,e){assertValidPattern(t);var s=this.options;if(t==="**"){if(!s.noglobstar)return r;else t="*"}if(t==="")return"";var i="";var n=!!s.nocase;var l=false;var h=[];var f=[];var d;var g=false;var y=-1;var w=-1;var v=t.charAt(0)==="."?"":s.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var b=this;function clearStateChar(){if(d){switch(d){case"*":i+=c;n=true;break;case"?":i+=a;n=true;break;default:i+="\\"+d;break}b.debug("clearStateChar %j %j",d,i);d=false}}for(var S=0,E=t.length,_;S-1;A--){var C=f[A];var M=i.slice(0,C.reStart);var N=i.slice(C.reStart,C.reEnd-8);var L=i.slice(C.reEnd-8,C.reEnd);var j=i.slice(C.reEnd);L+=j;var D=M.split("(").length-1;var I=j;for(S=0;S=0;o--){n=t[o];if(n)break}for(o=0;o>> no match, partial?",t,u,e,f);if(u===a)return true}return false}var p;if(typeof l==="string"){p=h===l;this.debug("string match",l,h,p)}else{p=h.match(l);this.debug("pattern match",l,h,p)}if(!p)return false}if(n===a&&o===c){return true}else if(n===a){return s}else if(o===c){return n===a-1&&t[n]===""}throw new Error("wtf?")};function globUnescape(t){return t.replace(/\\(.)/g,"$1")}function regExpEscape(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},6715:(t,e,s)=>{var i=s(7147);var r=s(1017);var n=s(3973);function patternMatcher(t){return function(e,s){var i=new n.Minimatch(t,{matchBase:true});return(!i.negate||s.isFile())&&i.match(e)}}function toMatcherFunction(t){if(typeof t=="function"){return t}else{return patternMatcher(t)}}function readdir(t,e,s){if(typeof e=="function"){s=e;e=[]}if(!s){return new Promise((function(s,i){readdir(t,e||[],(function(t,e){if(t){i(t)}else{s(e)}}))}))}e=e.map(toMatcherFunction);var n=[];i.readdir(t,(function(o,a){if(o){return s(o)}var c=a.length;if(!c){return s(null,n)}a.forEach((function(o){var a=r.join(t,o);i.stat(a,(function(t,i){if(t){return s(t)}if(e.some((function(t){return t(a,i)}))){c-=1;if(!c){return s(null,n)}return null}if(i.isDirectory()){readdir(a,e,(function(t,e){if(t){return s(t)}n=n.concat(e);c-=1;if(!c){return s(null,n)}}))}else{n.push(a);c-=1;if(!c){return s(null,n)}}}))}))}))}t.exports=readdir},1574:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.defaultTmpSync=e.defaultTmp=void 0;const r=s(2037);const n=s(1017);const o=s(1990);const a=i(s(8304));const{stat:c}=o.promises;const isDirSync=t=>{try{return(0,o.statSync)(t).isDirectory()}catch(t){return false}};const isDir=t=>c(t).then((t=>t.isDirectory()),(()=>false));const win32DefaultTmp=async t=>{const{root:e}=(0,n.parse)(t);const s=(0,r.tmpdir)();const{root:i}=(0,n.parse)(s);if(e.toLowerCase()===i.toLowerCase()){return s}const o=(0,n.resolve)(e,"/temp");if(await isDir(o)){return o}return e};const win32DefaultTmpSync=t=>{const{root:e}=(0,n.parse)(t);const s=(0,r.tmpdir)();const{root:i}=(0,n.parse)(s);if(e.toLowerCase()===i.toLowerCase()){return s}const o=(0,n.resolve)(e,"/temp");if(isDirSync(o)){return o}return e};const posixDefaultTmp=async()=>(0,r.tmpdir)();const posixDefaultTmpSync=()=>(0,r.tmpdir)();e.defaultTmp=a.default==="win32"?win32DefaultTmp:posixDefaultTmp;e.defaultTmpSync=a.default==="win32"?win32DefaultTmpSync:posixDefaultTmpSync},8984:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.fixEPERMSync=e.fixEPERM=void 0;const i=s(1990);const{chmod:r}=i.promises;const fixEPERM=t=>async e=>{try{return await t(e)}catch(s){const i=s;if(i?.code==="ENOENT"){return}if(i?.code==="EPERM"){try{await r(e,438)}catch(t){const e=t;if(e?.code==="ENOENT"){return}throw s}return await t(e)}throw s}};e.fixEPERM=fixEPERM;const fixEPERMSync=t=>e=>{try{return t(e)}catch(s){const r=s;if(r?.code==="ENOENT"){return}if(r?.code==="EPERM"){try{(0,i.chmodSync)(e,438)}catch(t){const e=t;if(e?.code==="ENOENT"){return}throw s}return t(e)}throw s}};e.fixEPERMSync=fixEPERMSync},1990:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.promises=e.readdirSync=e.unlinkSync=e.lstatSync=e.statSync=e.rmSync=e.rmdirSync=e.renameSync=e.mkdirSync=e.chmodSync=void 0;const r=i(s(7147));var n=s(7147);Object.defineProperty(e,"chmodSync",{enumerable:true,get:function(){return n.chmodSync}});Object.defineProperty(e,"mkdirSync",{enumerable:true,get:function(){return n.mkdirSync}});Object.defineProperty(e,"renameSync",{enumerable:true,get:function(){return n.renameSync}});Object.defineProperty(e,"rmdirSync",{enumerable:true,get:function(){return n.rmdirSync}});Object.defineProperty(e,"rmSync",{enumerable:true,get:function(){return n.rmSync}});Object.defineProperty(e,"statSync",{enumerable:true,get:function(){return n.statSync}});Object.defineProperty(e,"lstatSync",{enumerable:true,get:function(){return n.lstatSync}});Object.defineProperty(e,"unlinkSync",{enumerable:true,get:function(){return n.unlinkSync}});const o=s(7147);const readdirSync=t=>(0,o.readdirSync)(t,{withFileTypes:true});e.readdirSync=readdirSync;const chmod=(t,e)=>new Promise(((s,i)=>r.default.chmod(t,e,((t,...e)=>t?i(t):s(...e)))));const mkdir=(t,e)=>new Promise(((s,i)=>r.default.mkdir(t,e,((t,e)=>t?i(t):s(e)))));const readdir=t=>new Promise(((e,s)=>r.default.readdir(t,{withFileTypes:true},((t,i)=>t?s(t):e(i)))));const rename=(t,e)=>new Promise(((s,i)=>r.default.rename(t,e,((t,...e)=>t?i(t):s(...e)))));const rm=(t,e)=>new Promise(((s,i)=>r.default.rm(t,e,((t,...e)=>t?i(t):s(...e)))));const rmdir=t=>new Promise(((e,s)=>r.default.rmdir(t,((t,...i)=>t?s(t):e(...i)))));const stat=t=>new Promise(((e,s)=>r.default.stat(t,((t,i)=>t?s(t):e(i)))));const lstat=t=>new Promise(((e,s)=>r.default.lstat(t,((t,i)=>t?s(t):e(i)))));const unlink=t=>new Promise(((e,s)=>r.default.unlink(t,((t,...i)=>t?s(t):e(...i)))));e.promises={chmod:chmod,mkdir:mkdir,readdir:readdir,rename:rename,rm:rm,rmdir:rmdir,stat:stat,lstat:lstat,unlink:unlink}},1562:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.ignoreENOENTSync=e.ignoreENOENT=void 0;const ignoreENOENT=async t=>t.catch((t=>{if(t.code!=="ENOENT"){throw t}}));e.ignoreENOENT=ignoreENOENT;const ignoreENOENTSync=t=>{try{return t()}catch(t){if(t?.code!=="ENOENT"){throw t}}};e.ignoreENOENTSync=ignoreENOENTSync},6284:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.rimraf=e.sync=e.rimrafSync=e.moveRemove=e.moveRemoveSync=e.posix=e.posixSync=e.windows=e.windowsSync=e.manual=e.manualSync=e.native=e.nativeSync=e.assertRimrafOptions=e.isRimrafOptions=void 0;const r=s(5565);const n=i(s(7050));const o=s(3277);const typeOrUndef=(t,e)=>typeof t==="undefined"||typeof t===e;const isRimrafOptions=t=>!!t&&typeof t==="object"&&typeOrUndef(t.preserveRoot,"boolean")&&typeOrUndef(t.tmp,"string")&&typeOrUndef(t.maxRetries,"number")&&typeOrUndef(t.retryDelay,"number")&&typeOrUndef(t.backoff,"number")&&typeOrUndef(t.maxBackoff,"number")&&(typeOrUndef(t.glob,"boolean")||t.glob&&typeof t.glob==="object")&&typeOrUndef(t.filter,"function");e.isRimrafOptions=isRimrafOptions;const assertRimrafOptions=t=>{if(!(0,e.isRimrafOptions)(t)){throw new Error("invalid rimraf options")}};e.assertRimrafOptions=assertRimrafOptions;const a=s(5279);const c=s(1689);const l=s(3689);const h=s(3018);const u=s(2510);const f=s(5828);const wrap=t=>async(e,s)=>{const i=(0,r.optArg)(s);if(i.glob){e=await(0,o.glob)(e,i.glob)}if(Array.isArray(e)){return!!(await Promise.all(e.map((e=>t((0,n.default)(e,i),i))))).reduce(((t,e)=>t&&e),true)}else{return!!await t((0,n.default)(e,i),i)}};const wrapSync=t=>(e,s)=>{const i=(0,r.optArgSync)(s);if(i.glob){e=(0,o.globSync)(e,i.glob)}if(Array.isArray(e)){return!!e.map((e=>t((0,n.default)(e,i),i))).reduce(((t,e)=>t&&e),true)}else{return!!t((0,n.default)(e,i),i)}};e.nativeSync=wrapSync(l.rimrafNativeSync);e.native=Object.assign(wrap(l.rimrafNative),{sync:e.nativeSync});e.manualSync=wrapSync(a.rimrafManualSync);e.manual=Object.assign(wrap(a.rimrafManual),{sync:e.manualSync});e.windowsSync=wrapSync(u.rimrafWindowsSync);e.windows=Object.assign(wrap(u.rimrafWindows),{sync:e.windowsSync});e.posixSync=wrapSync(h.rimrafPosixSync);e.posix=Object.assign(wrap(h.rimrafPosix),{sync:e.posixSync});e.moveRemoveSync=wrapSync(c.rimrafMoveRemoveSync);e.moveRemove=Object.assign(wrap(c.rimrafMoveRemove),{sync:e.moveRemoveSync});e.rimrafSync=wrapSync(((t,e)=>(0,f.useNativeSync)(e)?(0,l.rimrafNativeSync)(t,e):(0,a.rimrafManualSync)(t,e)));e.sync=e.rimrafSync;const d=wrap(((t,e)=>(0,f.useNative)(e)?(0,l.rimrafNative)(t,e):(0,a.rimrafManual)(t,e)));e.rimraf=Object.assign(d,{rimraf:d,sync:e.rimrafSync,rimrafSync:e.rimrafSync,manual:e.manual,manualSync:e.manualSync,native:e.native,nativeSync:e.nativeSync,posix:e.posix,posixSync:e.posixSync,windows:e.windows,windowsSync:e.windowsSync,moveRemove:e.moveRemove,moveRemoveSync:e.moveRemoveSync});e.rimraf.rimraf=e.rimraf},5565:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.optArgSync=e.optArg=void 0;const i=s(6284);const optArgT=t=>{(0,i.assertRimrafOptions)(t);const{glob:e,...s}=t;if(!e){return s}const r=e===true?t.signal?{signal:t.signal}:{}:t.signal?{signal:t.signal,...e}:e;return{...s,glob:{...r,absolute:true,withFileTypes:false}}};const optArg=(t={})=>optArgT(t);e.optArg=optArg;const optArgSync=(t={})=>optArgT(t);e.optArgSync=optArgSync},7050:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});const r=s(1017);const n=s(3837);const o=i(s(8304));const pathArg=(t,e={})=>{const s=typeof t;if(s!=="string"){const e=t&&s==="object"&&t.constructor;const i=e&&e.name?`an instance of ${e.name}`:s==="object"?(0,n.inspect)(t):`type ${s} ${t}`;const r='The "path" argument must be of type string. '+`Received ${i}`;throw Object.assign(new TypeError(r),{path:t,code:"ERR_INVALID_ARG_TYPE"})}if(/\0/.test(t)){const e="path must be a string without null bytes";throw Object.assign(new TypeError(e),{path:t,code:"ERR_INVALID_ARG_VALUE"})}t=(0,r.resolve)(t);const{root:i}=(0,r.parse)(t);if(t===i&&e.preserveRoot!==false){const e="refusing to remove root directory without preserveRoot:false";throw Object.assign(new Error(e),{path:t,code:"ERR_PRESERVE_ROOT"})}if(o.default==="win32"){const e=/[*|"<>?:]/;const{root:s}=(0,r.parse)(t);if(e.test(t.substring(s.length))){throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}}return t};e["default"]=pathArg},8304:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=process.env.__TESTING_RIMRAF_PLATFORM__||process.platform},9443:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.readdirOrErrorSync=e.readdirOrError=void 0;const i=s(1990);const{readdir:r}=i.promises;const readdirOrError=t=>r(t).catch((t=>t));e.readdirOrError=readdirOrError;const readdirOrErrorSync=t=>{try{return(0,i.readdirSync)(t)}catch(t){return t}};e.readdirOrErrorSync=readdirOrErrorSync},9373:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.retryBusySync=e.retryBusy=e.codes=e.MAXRETRIES=e.RATE=e.MAXBACKOFF=void 0;e.MAXBACKOFF=200;e.RATE=1.2;e.MAXRETRIES=10;e.codes=new Set(["EMFILE","ENFILE","EBUSY"]);const retryBusy=t=>{const method=async(s,i,r=1,n=0)=>{const o=i.maxBackoff||e.MAXBACKOFF;const a=i.backoff||e.RATE;const c=i.maxRetries||e.MAXRETRIES;let l=0;while(true){try{return await t(s)}catch(t){const h=t;if(h?.path===s&&h?.code&&e.codes.has(h.code)){r=Math.ceil(r*a);n=r+n;if(n{setTimeout((()=>{method(s,i,r,n).then(t,e)}),r)}))}if(l{const method=(s,i)=>{const r=i.maxRetries||e.MAXRETRIES;let n=0;while(true){try{return t(s)}catch(t){const i=t;if(i?.path===s&&i?.code&&e.codes.has(i.code)&&n{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.rimrafMoveRemoveSync=e.rimrafMoveRemove=void 0;const i=s(1017);const r=s(1574);const n=s(1562);const o=s(1990);const{lstat:a,rename:c,unlink:l,rmdir:h,chmod:u}=o.promises;const f=s(9443);const uniqueFilename=t=>`.${(0,i.basename)(t)}.${Math.random()}`;const unlinkFixEPERM=async t=>l(t).catch((e=>{if(e.code==="EPERM"){return u(t,438).then((()=>l(t)),(t=>{if(t.code==="ENOENT"){return}throw e}))}else if(e.code==="ENOENT"){return}throw e}));const unlinkFixEPERMSync=t=>{try{(0,o.unlinkSync)(t)}catch(e){if(e?.code==="EPERM"){try{return(0,o.chmodSync)(t,438)}catch(t){if(t?.code==="ENOENT"){return}throw e}}else if(e?.code==="ENOENT"){return}throw e}};const rimrafMoveRemove=async(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}try{return await rimrafMoveRemoveDir(t,e,await a(t))}catch(t){if(t?.code==="ENOENT")return true;throw t}};e.rimrafMoveRemove=rimrafMoveRemove;const rimrafMoveRemoveDir=async(t,e,s)=>{if(e?.signal?.aborted){throw e.signal.reason}if(!e.tmp){return rimrafMoveRemoveDir(t,{...e,tmp:await(0,r.defaultTmp)(t)},s)}if(t===e.tmp&&(0,i.parse)(t).root!==t){throw new Error("cannot delete temp directory used for deletion")}const o=s.isDirectory()?await(0,f.readdirOrError)(t):null;if(!Array.isArray(o)){if(o){if(o.code==="ENOENT"){return true}if(o.code!=="ENOTDIR"){throw o}}if(e.filter&&!await e.filter(t,s)){return false}await(0,n.ignoreENOENT)(tmpUnlink(t,e.tmp,unlinkFixEPERM));return true}const a=(await Promise.all(o.map((s=>rimrafMoveRemoveDir((0,i.resolve)(t,s.name),e,s))))).reduce(((t,e)=>t&&e),true);if(!a){return false}if(e.preserveRoot===false&&t===(0,i.parse)(t).root){return false}if(e.filter&&!await e.filter(t,s)){return false}await(0,n.ignoreENOENT)(tmpUnlink(t,e.tmp,h));return true};const tmpUnlink=async(t,e,s)=>{const r=(0,i.resolve)(e,uniqueFilename(t));await c(t,r);return await s(r)};const rimrafMoveRemoveSync=(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}try{return rimrafMoveRemoveDirSync(t,e,(0,o.lstatSync)(t))}catch(t){if(t?.code==="ENOENT")return true;throw t}};e.rimrafMoveRemoveSync=rimrafMoveRemoveSync;const rimrafMoveRemoveDirSync=(t,e,s)=>{if(e?.signal?.aborted){throw e.signal.reason}if(!e.tmp){return rimrafMoveRemoveDirSync(t,{...e,tmp:(0,r.defaultTmpSync)(t)},s)}const a=e.tmp;if(t===e.tmp&&(0,i.parse)(t).root!==t){throw new Error("cannot delete temp directory used for deletion")}const c=s.isDirectory()?(0,f.readdirOrErrorSync)(t):null;if(!Array.isArray(c)){if(c){if(c.code==="ENOENT"){return true}if(c.code!=="ENOTDIR"){throw c}}if(e.filter&&!e.filter(t,s)){return false}(0,n.ignoreENOENTSync)((()=>tmpUnlinkSync(t,a,unlinkFixEPERMSync)));return true}let l=true;for(const s of c){const r=(0,i.resolve)(t,s.name);l=rimrafMoveRemoveDirSync(r,e,s)&&l}if(!l){return false}if(e.preserveRoot===false&&t===(0,i.parse)(t).root){return false}if(e.filter&&!e.filter(t,s)){return false}(0,n.ignoreENOENTSync)((()=>tmpUnlinkSync(t,a,o.rmdirSync)));return true};const tmpUnlinkSync=(t,e,s)=>{const r=(0,i.resolve)(e,uniqueFilename(t));(0,o.renameSync)(t,r);return s(r)}},3689:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.rimrafNativeSync=e.rimrafNative=void 0;const i=s(1990);const{rm:r}=i.promises;const rimrafNative=async(t,e)=>{await r(t,{...e,force:true,recursive:true});return true};e.rimrafNative=rimrafNative;const rimrafNativeSync=(t,e)=>{(0,i.rmSync)(t,{...e,force:true,recursive:true});return true};e.rimrafNativeSync=rimrafNativeSync},3018:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.rimrafPosixSync=e.rimrafPosix=void 0;const i=s(1990);const{lstat:r,rmdir:n,unlink:o}=i.promises;const a=s(1017);const c=s(9443);const l=s(1562);const rimrafPosix=async(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}try{return await rimrafPosixDir(t,e,await r(t))}catch(t){if(t?.code==="ENOENT")return true;throw t}};e.rimrafPosix=rimrafPosix;const rimrafPosixSync=(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}try{return rimrafPosixDirSync(t,e,(0,i.lstatSync)(t))}catch(t){if(t?.code==="ENOENT")return true;throw t}};e.rimrafPosixSync=rimrafPosixSync;const rimrafPosixDir=async(t,e,s)=>{if(e?.signal?.aborted){throw e.signal.reason}const i=s.isDirectory()?await(0,c.readdirOrError)(t):null;if(!Array.isArray(i)){if(i){if(i.code==="ENOENT"){return true}if(i.code!=="ENOTDIR"){throw i}}if(e.filter&&!await e.filter(t,s)){return false}await(0,l.ignoreENOENT)(o(t));return true}const r=(await Promise.all(i.map((s=>rimrafPosixDir((0,a.resolve)(t,s.name),e,s))))).reduce(((t,e)=>t&&e),true);if(!r){return false}if(e.preserveRoot===false&&t===(0,a.parse)(t).root){return false}if(e.filter&&!await e.filter(t,s)){return false}await(0,l.ignoreENOENT)(n(t));return true};const rimrafPosixDirSync=(t,e,s)=>{if(e?.signal?.aborted){throw e.signal.reason}const r=s.isDirectory()?(0,c.readdirOrErrorSync)(t):null;if(!Array.isArray(r)){if(r){if(r.code==="ENOENT"){return true}if(r.code!=="ENOTDIR"){throw r}}if(e.filter&&!e.filter(t,s)){return false}(0,l.ignoreENOENTSync)((()=>(0,i.unlinkSync)(t)));return true}let n=true;for(const s of r){const i=(0,a.resolve)(t,s.name);n=rimrafPosixDirSync(i,e,s)&&n}if(e.preserveRoot===false&&t===(0,a.parse)(t).root){return false}if(!n){return false}if(e.filter&&!e.filter(t,s)){return false}(0,l.ignoreENOENTSync)((()=>(0,i.rmdirSync)(t)));return true}},2510:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.rimrafWindowsSync=e.rimrafWindows=void 0;const i=s(1017);const r=s(8984);const n=s(1990);const o=s(1562);const a=s(9443);const c=s(9373);const l=s(1689);const{unlink:h,rmdir:u,lstat:f}=n.promises;const d=(0,c.retryBusy)((0,r.fixEPERM)(h));const p=(0,c.retryBusySync)((0,r.fixEPERMSync)(n.unlinkSync));const g=(0,c.retryBusy)((0,r.fixEPERM)(u));const y=(0,c.retryBusySync)((0,r.fixEPERMSync)(n.rmdirSync));const rimrafWindowsDirMoveRemoveFallback=async(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}const{filter:s,...i}=e;try{return await g(t,i)}catch(e){if(e?.code==="ENOTEMPTY"){return await(0,l.rimrafMoveRemove)(t,i)}throw e}};const rimrafWindowsDirMoveRemoveFallbackSync=(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}const{filter:s,...i}=e;try{return y(t,i)}catch(e){const s=e;if(s?.code==="ENOTEMPTY"){return(0,l.rimrafMoveRemoveSync)(t,i)}throw e}};const w=Symbol("start");const v=Symbol("child");const b=Symbol("finish");const rimrafWindows=async(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}try{return await rimrafWindowsDir(t,e,await f(t),w)}catch(t){if(t?.code==="ENOENT")return true;throw t}};e.rimrafWindows=rimrafWindows;const rimrafWindowsSync=(t,e)=>{if(e?.signal?.aborted){throw e.signal.reason}try{return rimrafWindowsDirSync(t,e,(0,n.lstatSync)(t),w)}catch(t){if(t?.code==="ENOENT")return true;throw t}};e.rimrafWindowsSync=rimrafWindowsSync;const rimrafWindowsDir=async(t,e,s,r=w)=>{if(e?.signal?.aborted){throw e.signal.reason}const n=s.isDirectory()?await(0,a.readdirOrError)(t):null;if(!Array.isArray(n)){if(n){if(n.code==="ENOENT"){return true}if(n.code!=="ENOTDIR"){throw n}}if(e.filter&&!await e.filter(t,s)){return false}await(0,o.ignoreENOENT)(d(t,e));return true}const c=r===w?v:r;const l=(await Promise.all(n.map((s=>rimrafWindowsDir((0,i.resolve)(t,s.name),e,s,c))))).reduce(((t,e)=>t&&e),true);if(r===w){return rimrafWindowsDir(t,e,s,b)}else if(r===b){if(e.preserveRoot===false&&t===(0,i.parse)(t).root){return false}if(!l){return false}if(e.filter&&!await e.filter(t,s)){return false}await(0,o.ignoreENOENT)(rimrafWindowsDirMoveRemoveFallback(t,e))}return true};const rimrafWindowsDirSync=(t,e,s,r=w)=>{const n=s.isDirectory()?(0,a.readdirOrErrorSync)(t):null;if(!Array.isArray(n)){if(n){if(n.code==="ENOENT"){return true}if(n.code!=="ENOTDIR"){throw n}}if(e.filter&&!e.filter(t,s)){return false}(0,o.ignoreENOENTSync)((()=>p(t,e)));return true}let c=true;for(const s of n){const n=r===w?v:r;const o=(0,i.resolve)(t,s.name);c=rimrafWindowsDirSync(o,e,s,n)&&c}if(r===w){return rimrafWindowsDirSync(t,e,s,b)}else if(r===b){if(e.preserveRoot===false&&t===(0,i.parse)(t).root){return false}if(!c){return false}if(e.filter&&!e.filter(t,s)){return false}(0,o.ignoreENOENTSync)((()=>{rimrafWindowsDirMoveRemoveFallbackSync(t,e)}))}return true}},5828:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.useNativeSync=e.useNative=void 0;const r=process.env.__TESTING_RIMRAF_NODE_VERSION__||process.version;const n=r.replace(/^v/,"").split(".");const o=+n[0]>14||+n[0]===14&&+n[1]>=14;const a=i(s(8304));e.useNative=!o||a.default==="win32"?()=>false:t=>!t?.signal&&!t?.filter;e.useNativeSync=!o||a.default==="win32"?()=>false:t=>!t?.signal&&!t?.filter},4294:(t,e,s)=>{t.exports=s(4219)},4219:(t,e,s)=>{"use strict";var i=s(1808);var r=s(4404);var n=s(3685);var o=s(5687);var a=s(2361);var c=s(9491);var l=s(3837);e.httpOverHttp=httpOverHttp;e.httpsOverHttp=httpsOverHttp;e.httpOverHttps=httpOverHttps;e.httpsOverHttps=httpsOverHttps;function httpOverHttp(t){var e=new TunnelingAgent(t);e.request=n.request;return e}function httpsOverHttp(t){var e=new TunnelingAgent(t);e.request=n.request;e.createSocket=createSecureSocket;e.defaultPort=443;return e}function httpOverHttps(t){var e=new TunnelingAgent(t);e.request=o.request;return e}function httpsOverHttps(t){var e=new TunnelingAgent(t);e.request=o.request;e.createSocket=createSecureSocket;e.defaultPort=443;return e}function TunnelingAgent(t){var e=this;e.options=t||{};e.proxyOptions=e.options.proxy||{};e.maxSockets=e.options.maxSockets||n.Agent.defaultMaxSockets;e.requests=[];e.sockets=[];e.on("free",(function onFree(t,s,i,r){var n=toOptions(s,i,r);for(var o=0,a=e.requests.length;o=this.maxSockets){r.requests.push(n);return}r.createSocket(n,(function(e){e.on("free",onFree);e.on("close",onCloseOrRemove);e.on("agentRemove",onCloseOrRemove);t.onSocket(e);function onFree(){r.emit("free",e,n)}function onCloseOrRemove(t){r.removeSocket(e);e.removeListener("free",onFree);e.removeListener("close",onCloseOrRemove);e.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(t,e){var s=this;var i={};s.sockets.push(i);var r=mergeOptions({},s.proxyOptions,{method:"CONNECT",path:t.host+":"+t.port,agent:false,headers:{host:t.host+":"+t.port}});if(t.localAddress){r.localAddress=t.localAddress}if(r.proxyAuth){r.headers=r.headers||{};r.headers["Proxy-Authorization"]="Basic "+new Buffer(r.proxyAuth).toString("base64")}h("making CONNECT request");var n=s.request(r);n.useChunkedEncodingByDefault=false;n.once("response",onResponse);n.once("upgrade",onUpgrade);n.once("connect",onConnect);n.once("error",onError);n.end();function onResponse(t){t.upgrade=true}function onUpgrade(t,e,s){process.nextTick((function(){onConnect(t,e,s)}))}function onConnect(r,o,a){n.removeAllListeners();o.removeAllListeners();if(r.statusCode!==200){h("tunneling socket could not be established, statusCode=%d",r.statusCode);o.destroy();var c=new Error("tunneling socket could not be established, "+"statusCode="+r.statusCode);c.code="ECONNRESET";t.request.emit("error",c);s.removeSocket(i);return}if(a.length>0){h("got illegal response body from proxy");o.destroy();var c=new Error("got illegal response body from proxy");c.code="ECONNRESET";t.request.emit("error",c);s.removeSocket(i);return}h("tunneling connection has established");s.sockets[s.sockets.indexOf(i)]=o;return e(o)}function onError(e){n.removeAllListeners();h("tunneling socket could not be established, cause=%s\n",e.message,e.stack);var r=new Error("tunneling socket could not be established, "+"cause="+e.message);r.code="ECONNRESET";t.request.emit("error",r);s.removeSocket(i)}};TunnelingAgent.prototype.removeSocket=function removeSocket(t){var e=this.sockets.indexOf(t);if(e===-1){return}this.sockets.splice(e,1);var s=this.requests.shift();if(s){this.createSocket(s,(function(t){s.request.onSocket(t)}))}};function createSecureSocket(t,e){var s=this;TunnelingAgent.prototype.createSocket.call(s,t,(function(i){var n=t.request.getHeader("host");var o=mergeOptions({},s.options,{socket:i,servername:n?n.replace(/:.*$/,""):t.host});var a=r.connect(0,o);s.sockets[s.sockets.indexOf(i)]=a;e(a)}))}function toOptions(t,e,s){if(typeof t==="string"){return{host:t,port:e,localAddress:s}}return t}function mergeOptions(t){for(var e=1,s=arguments.length;e{"use strict";Object.defineProperty(e,"__esModule",{value:true});Object.defineProperty(e,"v1",{enumerable:true,get:function(){return i.default}});Object.defineProperty(e,"v3",{enumerable:true,get:function(){return r.default}});Object.defineProperty(e,"v4",{enumerable:true,get:function(){return n.default}});Object.defineProperty(e,"v5",{enumerable:true,get:function(){return o.default}});Object.defineProperty(e,"NIL",{enumerable:true,get:function(){return a.default}});Object.defineProperty(e,"version",{enumerable:true,get:function(){return c.default}});Object.defineProperty(e,"validate",{enumerable:true,get:function(){return l.default}});Object.defineProperty(e,"stringify",{enumerable:true,get:function(){return h.default}});Object.defineProperty(e,"parse",{enumerable:true,get:function(){return u.default}});var i=_interopRequireDefault(s(8628));var r=_interopRequireDefault(s(6409));var n=_interopRequireDefault(s(5122));var o=_interopRequireDefault(s(9120));var a=_interopRequireDefault(s(5332));var c=_interopRequireDefault(s(1595));var l=_interopRequireDefault(s(6900));var h=_interopRequireDefault(s(8950));var u=_interopRequireDefault(s(2746));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}},4569:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(6113));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function md5(t){if(Array.isArray(t)){t=Buffer.from(t)}else if(typeof t==="string"){t=Buffer.from(t,"utf8")}return i.default.createHash("md5").update(t).digest()}var r=md5;e["default"]=r},5332:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var s="00000000-0000-0000-0000-000000000000";e["default"]=s},2746:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(6900));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function parse(t){if(!(0,i.default)(t)){throw TypeError("Invalid UUID")}let e;const s=new Uint8Array(16);s[0]=(e=parseInt(t.slice(0,8),16))>>>24;s[1]=e>>>16&255;s[2]=e>>>8&255;s[3]=e&255;s[4]=(e=parseInt(t.slice(9,13),16))>>>8;s[5]=e&255;s[6]=(e=parseInt(t.slice(14,18),16))>>>8;s[7]=e&255;s[8]=(e=parseInt(t.slice(19,23),16))>>>8;s[9]=e&255;s[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255;s[11]=e/4294967296&255;s[12]=e>>>24&255;s[13]=e>>>16&255;s[14]=e>>>8&255;s[15]=e&255;return s}var r=parse;e["default"]=r},814:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var s=/^(?:[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;e["default"]=s},807:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=rng;var i=_interopRequireDefault(s(6113));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const r=new Uint8Array(256);let n=r.length;function rng(){if(n>r.length-16){i.default.randomFillSync(r);n=0}return r.slice(n,n+=16)}},5274:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(6113));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function sha1(t){if(Array.isArray(t)){t=Buffer.from(t)}else if(typeof t==="string"){t=Buffer.from(t,"utf8")}return i.default.createHash("sha1").update(t).digest()}var r=sha1;e["default"]=r},8950:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(6900));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const r=[];for(let t=0;t<256;++t){r.push((t+256).toString(16).substr(1))}function stringify(t,e=0){const s=(r[t[e+0]]+r[t[e+1]]+r[t[e+2]]+r[t[e+3]]+"-"+r[t[e+4]]+r[t[e+5]]+"-"+r[t[e+6]]+r[t[e+7]]+"-"+r[t[e+8]]+r[t[e+9]]+"-"+r[t[e+10]]+r[t[e+11]]+r[t[e+12]]+r[t[e+13]]+r[t[e+14]]+r[t[e+15]]).toLowerCase();if(!(0,i.default)(s)){throw TypeError("Stringified UUID is invalid")}return s}var n=stringify;e["default"]=n},8628:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(807));var r=_interopRequireDefault(s(8950));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}let n;let o;let a=0;let c=0;function v1(t,e,s){let l=e&&s||0;const h=e||new Array(16);t=t||{};let u=t.node||n;let f=t.clockseq!==undefined?t.clockseq:o;if(u==null||f==null){const e=t.random||(t.rng||i.default)();if(u==null){u=n=[e[0]|1,e[1],e[2],e[3],e[4],e[5]]}if(f==null){f=o=(e[6]<<8|e[7])&16383}}let d=t.msecs!==undefined?t.msecs:Date.now();let p=t.nsecs!==undefined?t.nsecs:c+1;const g=d-a+(p-c)/1e4;if(g<0&&t.clockseq===undefined){f=f+1&16383}if((g<0||d>a)&&t.nsecs===undefined){p=0}if(p>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}a=d;c=p;o=f;d+=122192928e5;const y=((d&268435455)*1e4+p)%4294967296;h[l++]=y>>>24&255;h[l++]=y>>>16&255;h[l++]=y>>>8&255;h[l++]=y&255;const w=d/4294967296*1e4&268435455;h[l++]=w>>>8&255;h[l++]=w&255;h[l++]=w>>>24&15|16;h[l++]=w>>>16&255;h[l++]=f>>>8|128;h[l++]=f&255;for(let t=0;t<6;++t){h[l+t]=u[t]}return e||(0,r.default)(h)}var l=v1;e["default"]=l},6409:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(5998));var r=_interopRequireDefault(s(4569));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const n=(0,i.default)("v3",48,r.default);var o=n;e["default"]=o},5998:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=_default;e.URL=e.DNS=void 0;var i=_interopRequireDefault(s(8950));var r=_interopRequireDefault(s(2746));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function stringToBytes(t){t=unescape(encodeURIComponent(t));const e=[];for(let s=0;s{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(807));var r=_interopRequireDefault(s(8950));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function v4(t,e,s){t=t||{};const n=t.random||(t.rng||i.default)();n[6]=n[6]&15|64;n[8]=n[8]&63|128;if(e){s=s||0;for(let t=0;t<16;++t){e[s+t]=n[t]}return e}return(0,r.default)(n)}var n=v4;e["default"]=n},9120:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(5998));var r=_interopRequireDefault(s(5274));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const n=(0,i.default)("v5",80,r.default);var o=n;e["default"]=o},6900:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(814));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function validate(t){return typeof t==="string"&&i.default.test(t)}var r=validate;e["default"]=r},1595:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(6900));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function version(t){if(!(0,i.default)(t)){throw TypeError("Invalid UUID")}return parseInt(t.substr(14,1),16)}var r=version;e["default"]=r},1319:(t,e,s)=>{const i=s(7147);const r=s(2186);const n=s(653);const parseMultilineInput=t=>t.split("\n").map((t=>t.trim()));const o={get COMMIT_MESSAGE(){return r.getInput("COMMIT_MESSAGE",{required:false})||`Update file(s) from "%SRC_REPO%"`},DRY_RUN:["1","true"].includes(r.getInput("DRY_RUN",{required:false}).toLowerCase()),FILE_PATTERNS:parseMultilineInput(r.getInput("FILE_PATTERNS")).map((t=>new RegExp(t))),GITHUB_SERVER:r.getInput("GITHUB_SERVER",{required:false})||"github.com",GITHUB_TOKEN:r.getInput("GITHUB_TOKEN",{required:true}),GIT_EMAIL:r.getInput("GIT_EMAIL")||`${process.env.GITHUB_ACTOR}@users.noreply.github.com`,GIT_USERNAME:r.getInput("GIT_USERNAME",{required:false})||process.env.GITHUB_ACTOR,SKIP_CLEANUP:["1","true"].includes(r.getInput("SKIP_CLEANUP",{required:false}).toLowerCase()),SKIP_DELETE:["1","true"].includes(r.getInput("SKIP_DELETE",{required:false}).toLowerCase()),SKIP_REPLACE:["1","true"].includes(r.getInput("SKIP_REPLACE",{required:false}).toLowerCase()),SRC_REPO:r.getInput("SRC_REPO",{required:false})||process.env.GITHUB_REPOSITORY,SRC_ROOT:r.getInput("SRC_ROOT",{required:false})||"/",TARGET_REPOS:parseMultilineInput(r.getInput("TARGET_REPOS",{required:true})),TARGET_ROOT:r.getInput("TARGET_ROOT",{required:false})||"/",TMPDIR:r.getInput("TEMP_DIR",{required:false})||`tmp-${Date.now().toString()}`};while(i.existsSync(o.TMPDIR)){o.TMPDIR=`tmp-${Date.now().toString()}`;n.info(`TEMP_DIR already exists. Using "${o.TMPDIR}" now.`)}n.info("Context:",{...o,GITHUB_TOKEN:""});t.exports=o},109:(t,e,s)=>{const{exec:i}=s(2081);const{parse:r}=s(9234);const{GITHUB_TOKEN:n,GITHUB_SERVER:o,SRC_REPO:a,COMMIT_MESSAGE:c,GIT_USERNAME:l,GIT_EMAIL:h,DRY_RUN:u}=s(1319);const f=s(1608);const d=s(653);const interpolateCommitMessage=(t,e)=>{let s=t;Object.keys(e).forEach((t=>{if(t==="COMMIT_MESSAGE"){return}s=s.replace(new RegExp(`%${t}%`,"g"),e[t])}));return s};t.exports={init:t=>{const{getRepoPath:e,getRepoSlug:s,getRepoBranch:p}=f.init(t);function execCmd(t,e){d.info(`EXEC: "${t}" IN "${e||"./"}"`);return new Promise(((s,r)=>{i(t,{cwd:e},(function(t,e){d.info(`OUTPUT ERROR: ${t?`"${t}"`:""}`);d.info(`OUTPUT STDOUT: ${e?`"${e}"`:""}}`);t?r(t):s(e.trim())}))}))}const clone=async()=>{const t=["GIT_LFS_SKIP_SMUDGE=1","git clone","--depth 1",p()===undefined?false:` -b ${p()}`,`https://${n}@${o}/${s()}.git`,e()];return execCmd(t.filter(Boolean).join(" "))};const hasChanges=async()=>{const t=await execCmd(`git status --porcelain`,e());return r(t).length!==0};const commitAll=async()=>{if(!await hasChanges()){d.info("NO CHANGES DETECTED");return}d.info("CHANGES DETECTED");d.info("COMMIT CHANGES...");const s=interpolateCommitMessage(c,{SRC_REPO:a,TARGET_REPO:t});if(!u){let t="";const i=[`git config --local user.name "${l}"`,`git config --local user.email "${h}"`,`git add --all`,`git status`,`git commit --message "${s}"`,`git push`];try{for(cmd of i){t+=await execCmd(cmd,e())}}catch(t){d.error(t)}finally{if(!t.includes("Update file(s) from")){d.error(t);throw new Error("failed to commit changes")}}}d.info("CHANGES COMMITED")};return{clone:clone,commitAll:commitAll}}}},4351:(t,e,s)=>{const i=s(1017);const{SRC_REPO:r,TARGET_REPOS:n,TMPDIR:o,SKIP_CLEANUP:a}=s(1319);const c=s(109);const{removeDir:l}=s(1608);const h=s(1608);const main=async()=>{let t;try{const t=c.init(r);const e=h.init(r);await t.clone();const s=await e.getFiles();const o=s.map((t=>e.getRepoRelativeFilePath(t)));for(const t of n){const r=h.init(t);const n=c.init(t);await n.clone();const a=await r.getFiles();const l=a.filter((t=>!o.includes(r.getRepoRelativeFilePath(t))));await Promise.all([r.removeFiles(l),...s.map((async t=>r.copyFile(t,i.join(r.getRepoFilePath(),e.getRepoRelativeFilePath(t)))))]);await n.commitAll()}}catch(e){t=e}if(!a){await l(o)}if(t){throw t}};t.exports=main},653:(t,e,s)=>{const i=s(2186);const joinAttributes=(...t)=>t.map((t=>Array.isArray(t)||Object.prototype.toString.call(t)==="[object Object]"?JSON.stringify(t,undefined,2):t)).join(" ");const debug=(...t)=>{i.debug(joinAttributes(...t))};const error=(...t)=>{i.error(joinAttributes(...t))};const info=(...t)=>{i.info(joinAttributes(...t))};const warn=(...t)=>{i.warning(joinAttributes(...t))};t.exports={debug:debug,error:error,info:info,warn:warn}},1608:(t,e,s)=>{const i=s(7147).promises;const r=s(1017);const n=s(6715);const{rimraf:o}=s(6284);const{TMPDIR:a,FILE_PATTERNS:c,DRY_RUN:l,SKIP_DELETE:h,SKIP_REPLACE:u,SRC_REPO:f,SRC_ROOT:d,TARGET_ROOT:p}=s(1319);const g=s(653);const init=t=>{const getRepoSlug=()=>t.split(":")[0];const getRepoBranch=()=>t.split(":")[1]||undefined;const getRepoPath=()=>r.join(a,`${getRepoSlug()}${getRepoBranch()===undefined?"":`-${getRepoBranch()}`}`);const getRepoRoot=()=>t===f?d:p;const getRepoFilePath=()=>r.join(getRepoPath(),getRepoRoot());const getRepoRelativeFilePath=t=>r.relative(getRepoFilePath(),t);const getPrettyPath=e=>e.replace(/\\/g,"/").replace(/^\//,"").replace(new RegExp(`^${a}/${t}${getRepoRoot()}`),"");const getMatchingFiles=t=>{g.info("FILE_PATTERNS",c.map((t=>t.toString())));return t.filter((t=>{cleanFile=getPrettyPath(t);const e=c.some((t=>t.test(cleanFile)));return e}))};const getFiles=async()=>{const t=await n(getRepoPath(),[".git"]);g.debug("FILES:",JSON.stringify(t.map(getPrettyPath),undefined,2));const e=getMatchingFiles(t);g.info("MATCHING FILES:",JSON.stringify(e.map(getPrettyPath),undefined,2));return e};const copyFile=async(t,e)=>{const s=await i.access(e).then((()=>true)).catch((()=>false));if(u&&s){g.info("skip copying",t.replace(/\\/g,"/").replace(/^\//,""),"to",e.replace(/\\/g,"/").replace(/^\//,""),"because SKIP_REPLACE = true");return}g.info("copy",t.replace(/\\/g,"/").replace(/^\//,""),"to",e.replace(/\\/g,"/").replace(/^\//,""));if(l){return}await i.mkdir(r.dirname(e),{recursive:true});await i.copyFile(t,e)};const removeFiles=async t=>{if(h){g.info("SKIP REMOVING FILES because `SKIP_DELETE` is set to `true`",t.map((t=>`"${t}"`)).join(", "));return}g.info("REMOVE FILES",t);if(l){return}return Promise.all(t.map((t=>i.unlink(t))))};return{copyFile:copyFile,getFiles:getFiles,getRepoBranch:getRepoBranch,getRepoFilePath:getRepoFilePath,getRepoPath:getRepoPath,getRepoRelativeFilePath:getRepoRelativeFilePath,getRepoSlug:getRepoSlug,removeFiles:removeFiles}};const removeDir=async t=>{new Promise(((e,s)=>{o(t,{disableGlob:true},(t=>{if(t){return s(t)}e()}))}))};t.exports={init:init,removeDir:removeDir}},9491:t=>{"use strict";t.exports=require("assert")},2081:t=>{"use strict";t.exports=require("child_process")},6113:t=>{"use strict";t.exports=require("crypto")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},3292:t=>{"use strict";t.exports=require("fs/promises")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},1808:t=>{"use strict";t.exports=require("net")},5673:t=>{"use strict";t.exports=require("node:events")},4492:t=>{"use strict";t.exports=require("node:stream")},6915:t=>{"use strict";t.exports=require("node:string_decoder")},2037:t=>{"use strict";t.exports=require("os")},1017:t=>{"use strict";t.exports=require("path")},4404:t=>{"use strict";t.exports=require("tls")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},9234:(t,e,s)=>{"use strict";const{spawnSync:i}=s(2081);const isString=t=>typeof t==="string";t.exports=(t,e={})=>{if(!isString(t)){e=t||{};t=run()}const{added:s,modified:i,untracked:r,deleted:n,renamed:o,unstaged:a}=e;const c=parse(t);const l=pick(c,{added:s,modified:i,untracked:r,deleted:n,renamed:o,unstaged:a});const h=getNames(l);return h};const getName=({name:t})=>t;t.exports.getNames=getNames;function getNames(t){return t.map(getName)}t.exports.run=run;function run(){const t=i("git",["status","--porcelain"]);return t.stdout.toString()}t.exports.parse=parse;function parse(t){const e=[];const s=t.split("\n").filter(Boolean);for(const t of s){const{name:s,mode:i}=parseLine(t);e.push({name:s,mode:i})}return e}const r="?";const n="R";const o="-> ";const cutRenameTo=t=>{const e=t.indexOf(o);const s=e+o.length;return t.slice(s)};function parseLine(t){const[e]=t;if(e===r)return{name:t.replace("?? ",""),mode:r};if(e===n)return{name:cutRenameTo(t),mode:n};const[s]=t.match(/^[\sA-Z]+\s/,"");const i=t.replace(s,"");return{name:i,mode:s}}const isModified=({mode:t})=>t==="M "||t==="MM ";const isAdded=({mode:t})=>t==="A ";const isRenamed=({mode:t})=>/R/.test(t);const isDeleted=({mode:t})=>/D/.test(t);const isUntracked=({mode:t})=>/\?/.test(t);const isUnstaged=({mode:t})=>t===" M ";const check=({added:t,modified:e,untracked:s,unstaged:i,deleted:r,renamed:n})=>o=>{let a=false;if(t)a=a||isAdded(o);if(e)a=a||isModified(o);if(s)a=a||isUntracked(o);if(i)a=a||isUnstaged(o);if(r)a=a||isDeleted(o);if(n)a=a||isRenamed(o);return a};t.exports.pick=pick;function pick(t,{added:e,modified:s,deleted:i,untracked:r,unstaged:n,renamed:o}){return t.filter(check({added:e,modified:s,untracked:r,unstaged:n,deleted:i,renamed:o}))}},6463:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Glob=void 0;const i=s(266);const r=s(9569);const n=s(7310);const o=s(6722);const a=s(9173);const c=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Glob{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");this.withFileTypes=!!e.withFileTypes;this.signal=e.signal;this.follow=!!e.follow;this.dot=!!e.dot;this.dotRelative=!!e.dotRelative;this.nodir=!!e.nodir;this.mark=!!e.mark;if(!e.cwd){this.cwd=""}else if(e.cwd instanceof URL||e.cwd.startsWith("file://")){e.cwd=(0,n.fileURLToPath)(e.cwd)}this.cwd=e.cwd||"";this.root=e.root;this.magicalBraces=!!e.magicalBraces;this.nobrace=!!e.nobrace;this.noext=!!e.noext;this.realpath=!!e.realpath;this.absolute=e.absolute;this.noglobstar=!!e.noglobstar;this.matchBase=!!e.matchBase;this.maxDepth=typeof e.maxDepth==="number"?e.maxDepth:Infinity;this.stat=!!e.stat;this.ignore=e.ignore;if(this.withFileTypes&&this.absolute!==undefined){throw new Error("cannot set absolute and withFileTypes:true")}if(typeof t==="string"){t=[t]}this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false;if(this.windowsPathsNoEscape){t=t.map((t=>t.replace(/\\/g,"/")))}if(this.matchBase){if(e.noglobstar){throw new TypeError("base matching requires globstar")}t=t.map((t=>t.includes("/")?t:`./**/${t}`))}this.pattern=t;this.platform=e.platform||c;this.opts={...e,platform:this.platform};if(e.scurry){this.scurry=e.scurry;if(e.nocase!==undefined&&e.nocase!==e.scurry.nocase){throw new Error("nocase option contradicts provided scurry option")}}else{const t=e.platform==="win32"?r.PathScurryWin32:e.platform==="darwin"?r.PathScurryDarwin:e.platform?r.PathScurryPosix:r.PathScurry;this.scurry=new t(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;const s=this.platform==="darwin"||this.platform==="win32";const a={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug};const l=this.pattern.map((t=>new i.Minimatch(t,a)));const[h,u]=l.reduce(((t,e)=>{t[0].push(...e.set);t[1].push(...e.globParts);return t}),[[],[]]);this.patterns=h.map(((t,e)=>new o.Pattern(t,u[e],0,this.platform)))}async walk(){return[...await new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}e.Glob=Glob},4131:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.hasMagic=void 0;const i=s(266);const hasMagic=(t,e={})=>{if(!Array.isArray(t)){t=[t]}for(const s of t){if(new i.Minimatch(s,e).hasMagic())return true}return false};e.hasMagic=hasMagic},7639:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Ignore=void 0;const i=s(266);const r=s(6722);const n=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Ignore{relative;relativeChildren;absolute;absoluteChildren;constructor(t,{nobrace:e,nocase:s,noext:o,noglobstar:a,platform:c=n}){this.relative=[];this.absolute=[];this.relativeChildren=[];this.absoluteChildren=[];const l={dot:true,nobrace:e,nocase:s,noext:o,noglobstar:a,optimizationLevel:2,platform:c,nocomment:true,nonegate:true};for(const e of t){const t=new i.Minimatch(e,l);for(let e=0;e{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.glob=e.hasMagic=e.Glob=e.unescape=e.escape=e.sync=e.iterate=e.iterateSync=e.stream=e.streamSync=e.globIterate=e.globIterateSync=e.globSync=e.globStream=e.globStreamSync=void 0;const i=s(266);const r=s(6463);const n=s(4131);function globStreamSync(t,e={}){return new r.Glob(t,e).streamSync()}e.globStreamSync=globStreamSync;function globStream(t,e={}){return new r.Glob(t,e).stream()}e.globStream=globStream;function globSync(t,e={}){return new r.Glob(t,e).walkSync()}e.globSync=globSync;async function glob_(t,e={}){return new r.Glob(t,e).walk()}function globIterateSync(t,e={}){return new r.Glob(t,e).iterateSync()}e.globIterateSync=globIterateSync;function globIterate(t,e={}){return new r.Glob(t,e).iterate()}e.globIterate=globIterate;e.streamSync=globStreamSync;e.stream=Object.assign(globStream,{sync:globStreamSync});e.iterateSync=globIterateSync;e.iterate=Object.assign(globIterate,{sync:globIterateSync});e.sync=Object.assign(globSync,{stream:globStreamSync,iterate:globIterateSync});var o=s(266);Object.defineProperty(e,"escape",{enumerable:true,get:function(){return o.escape}});Object.defineProperty(e,"unescape",{enumerable:true,get:function(){return o.unescape}});var a=s(6463);Object.defineProperty(e,"Glob",{enumerable:true,get:function(){return a.Glob}});var c=s(4131);Object.defineProperty(e,"hasMagic",{enumerable:true,get:function(){return c.hasMagic}});e.glob=Object.assign(glob_,{glob:glob_,globSync:globSync,sync:e.sync,globStream:globStream,stream:e.stream,globStreamSync:globStreamSync,streamSync:e.streamSync,globIterate:globIterate,iterate:e.iterate,globIterateSync:globIterateSync,iterateSync:e.iterateSync,Glob:r.Glob,hasMagic:n.hasMagic,escape:i.escape,unescape:i.unescape});e.glob.glob=e.glob},6722:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Pattern=void 0;const i=s(266);const isPatternList=t=>t.length>=1;const isGlobList=t=>t.length>=1;class Pattern{#t;#e;#s;length;#i;#r;#n;#o;#a;#c;#l=true;constructor(t,e,s,i){if(!isPatternList(t)){throw new TypeError("empty pattern list")}if(!isGlobList(e)){throw new TypeError("empty glob list")}if(e.length!==t.length){throw new TypeError("mismatched pattern list and glob list lengths")}this.length=t.length;if(s<0||s>=this.length){throw new TypeError("index out of range")}this.#t=t;this.#e=e;this.#s=s;this.#i=i;if(this.#s===0){if(this.isUNC()){const[t,e,s,i,...r]=this.#t;const[n,o,a,c,...l]=this.#e;if(r[0]===""){r.shift();l.shift()}const h=[t,e,s,i,""].join("/");const u=[n,o,a,c,""].join("/");this.#t=[h,...r];this.#e=[u,...l];this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){const[t,...e]=this.#t;const[s,...i]=this.#e;if(e[0]===""){e.shift();i.shift()}const r=t+"/";const n=s+"/";this.#t=[r,...e];this.#e=[n,...i];this.length=this.#t.length}}}pattern(){return this.#t[this.#s]}isString(){return typeof this.#t[this.#s]==="string"}isGlobstar(){return this.#t[this.#s]===i.GLOBSTAR}isRegExp(){return this.#t[this.#s]instanceof RegExp}globString(){return this.#n=this.#n||(this.#s===0?this.isAbsolute()?this.#e[0]+this.#e.slice(1).join("/"):this.#e.join("/"):this.#e.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){if(this.#r!==undefined)return this.#r;if(!this.hasMore())return this.#r=null;this.#r=new Pattern(this.#t,this.#e,this.#s+1,this.#i);this.#r.#c=this.#c;this.#r.#a=this.#a;this.#r.#o=this.#o;return this.#r}isUNC(){const t=this.#t;return this.#a!==undefined?this.#a:this.#a=this.#i==="win32"&&this.#s===0&&t[0]===""&&t[1]===""&&typeof t[2]==="string"&&!!t[2]&&typeof t[3]==="string"&&!!t[3]}isDrive(){const t=this.#t;return this.#o!==undefined?this.#o:this.#o=this.#i==="win32"&&this.#s===0&&this.length>1&&typeof t[0]==="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){const t=this.#t;return this.#c!==undefined?this.#c:this.#c=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){const t=this.#t[0];return typeof t==="string"&&this.isAbsolute()&&this.#s===0?t:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){if(this.#s===0||!this.isGlobstar()||!this.#l)return false;this.#l=false;return true}}e.Pattern=Pattern},4601:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;const i=s(266);class HasWalkedCache{store;constructor(t=new Map){this.store=t}copy(){return new HasWalkedCache(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){const s=t.fullpath();const i=this.store.get(s);if(i)i.add(e.globString());else this.store.set(s,new Set([e.globString()]))}}e.HasWalkedCache=HasWalkedCache;class MatchRecord{store=new Map;add(t,e,s){const i=(e?2:0)|(s?1:0);const r=this.store.get(t);this.store.set(t,r===undefined?i:i&r)}entries(){return[...this.store.entries()].map((([t,e])=>[t,!!(e&2),!!(e&1)]))}}e.MatchRecord=MatchRecord;class SubWalks{store=new Map;add(t,e){if(!t.canReaddir()){return}const s=this.store.get(t);if(s){if(!s.find((t=>t.globString()===e.globString()))){s.push(e)}}else this.store.set(t,[e])}get(t){const e=this.store.get(t);if(!e){throw new Error("attempting to walk unknown path")}return e}entries(){return this.keys().map((t=>[t,this.store.get(t)]))}keys(){return[...this.store.keys()].filter((t=>t.canReaddir()))}}e.SubWalks=SubWalks;class Processor{hasWalkedCache;matches=new MatchRecord;subwalks=new SubWalks;patterns;follow;dot;opts;constructor(t,e){this.opts=t;this.follow=!!t.follow;this.dot=!!t.dot;this.hasWalkedCache=e?e.copy():new HasWalkedCache}processPatterns(t,e){this.patterns=e;const s=e.map((e=>[t,e]));for(let[t,e]of s){this.hasWalkedCache.storeWalked(t,e);const s=e.root();const r=e.isAbsolute()&&this.opts.absolute!==false;if(s){t=t.resolve(s==="/"&&this.opts.root!==undefined?this.opts.root:s);const i=e.rest();if(!i){this.matches.add(t,true,false);continue}else{e=i}}if(t.isENOENT())continue;let n;let o;let a=false;while(typeof(n=e.pattern())==="string"&&(o=e.rest())){const s=t.resolve(n);if(s.isUnknown()&&n!=="..")break;t=s;e=o;a=true}n=e.pattern();o=e.rest();if(a){if(this.hasWalkedCache.hasWalked(t,e))continue;this.hasWalkedCache.storeWalked(t,e)}if(typeof n==="string"){if(!o){const e=n===".."||n===""||n===".";this.matches.add(t.resolve(n),r,e)}else{this.subwalks.add(t,e)}continue}else if(n===i.GLOBSTAR){if(!t.isSymbolicLink()||this.follow||e.checkFollowGlobstar()){this.subwalks.add(t,e)}const s=o?.pattern();const i=o?.rest();if(!o||(s===""||s===".")&&!i){this.matches.add(t,r,s===""||s===".")}else{if(s===".."){const e=t.parent||t;if(!i)this.matches.add(e,r,true);else if(!this.hasWalkedCache.hasWalked(e,i)){this.subwalks.add(e,i)}}}}else if(n instanceof RegExp){this.subwalks.add(t,e)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Processor(this.opts,this.hasWalkedCache)}filterEntries(t,e){const s=this.subwalks.get(t);const r=this.child();for(const t of e){for(const e of s){const s=e.isAbsolute();const n=e.pattern();const o=e.rest();if(n===i.GLOBSTAR){r.testGlobstar(t,e,o,s)}else if(n instanceof RegExp){r.testRegExp(t,n,o,s)}else{r.testString(t,n,o,s)}}}return r}testGlobstar(t,e,s,i){if(this.dot||!t.name.startsWith(".")){if(!e.hasMore()){this.matches.add(t,i,false)}if(t.canReaddir()){if(this.follow||!t.isSymbolicLink()){this.subwalks.add(t,e)}else if(t.isSymbolicLink()){if(s&&e.checkFollowGlobstar()){this.subwalks.add(t,s)}else if(e.markFollowGlobstar()){this.subwalks.add(t,e)}}}}if(s){const e=s.pattern();if(typeof e==="string"&&e!==".."&&e!==""&&e!=="."){this.testString(t,e,s.rest(),i)}else if(e===".."){const e=t.parent||t;this.subwalks.add(e,s)}else if(e instanceof RegExp){this.testRegExp(t,e,s.rest(),i)}}}testRegExp(t,e,s,i){if(!e.test(t.name))return;if(!s){this.matches.add(t,i,false)}else{this.subwalks.add(t,s)}}testString(t,e,s,i){if(!t.isNamed(e))return;if(!s){this.matches.add(t,i,false)}else{this.subwalks.add(t,s)}}}e.Processor=Processor},9173:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;const i=s(8865);const r=s(7639);const n=s(4601);const makeIgnore=(t,e)=>typeof t==="string"?new r.Ignore([t],e):Array.isArray(t)?new r.Ignore(t,e):t;class GlobUtil{path;patterns;opts;seen=new Set;paused=false;aborted=false;#h=[];#u;#f;signal;maxDepth;constructor(t,e,s){this.patterns=t;this.path=e;this.opts=s;this.#f=!s.posix&&s.platform==="win32"?"\\":"/";if(s.ignore){this.#u=makeIgnore(s.ignore,s)}this.maxDepth=s.maxDepth||Infinity;if(s.signal){this.signal=s.signal;this.signal.addEventListener("abort",(()=>{this.#h.length=0}))}}#d(t){return this.seen.has(t)||!!this.#u?.ignored?.(t)}#p(t){return!!this.#u?.childrenIgnored?.(t)}pause(){this.paused=true}resume(){if(this.signal?.aborted)return;this.paused=false;let t=undefined;while(!this.paused&&(t=this.#h.shift())){t()}}onResume(t){if(this.signal?.aborted)return;if(!this.paused){t()}else{this.#h.push(t)}}async matchCheck(t,e){if(e&&this.opts.nodir)return undefined;let s;if(this.opts.realpath){s=t.realpathCached()||await t.realpath();if(!s)return undefined;t=s}const i=t.isUnknown()||this.opts.stat;return this.matchCheckTest(i?await t.lstat():t,e)}matchCheckTest(t,e){return t&&(this.maxDepth===Infinity||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&!this.#d(t)?t:undefined}matchCheckSync(t,e){if(e&&this.opts.nodir)return undefined;let s;if(this.opts.realpath){s=t.realpathCached()||t.realpathSync();if(!s)return undefined;t=s}const i=t.isUnknown()||this.opts.stat;return this.matchCheckTest(i?t.lstatSync():t,e)}matchFinish(t,e){if(this.#d(t))return;const s=this.opts.absolute===undefined?e:this.opts.absolute;this.seen.add(t);const i=this.opts.mark&&t.isDirectory()?this.#f:"";if(this.opts.withFileTypes){this.matchEmit(t)}else if(s){const e=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(e+i)}else{const e=this.opts.posix?t.relativePosix():t.relative();const s=this.opts.dotRelative&&!e.startsWith(".."+this.#f)?"."+this.#f:"";this.matchEmit(!e?"."+i:s+e+i)}}async match(t,e,s){const i=await this.matchCheck(t,s);if(i)this.matchFinish(i,e)}matchSync(t,e,s){const i=this.matchCheckSync(t,s);if(i)this.matchFinish(i,e)}walkCB(t,e,s){if(this.signal?.aborted)s();this.walkCB2(t,e,new n.Processor(this.opts),s)}walkCB2(t,e,s,i){if(this.#p(t))return i();if(this.signal?.aborted)i();if(this.paused){this.onResume((()=>this.walkCB2(t,e,s,i)));return}s.processPatterns(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#d(t))continue;r++;this.match(t,e,i).then((()=>next()))}for(const t of s.subwalkTargets()){if(this.maxDepth!==Infinity&&t.depth()>=this.maxDepth){continue}r++;const e=t.readdirCached();if(t.calledReaddir())this.walkCB3(t,e,s,next);else{t.readdirCB(((e,i)=>this.walkCB3(t,i,s,next)),true)}}next()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#d(t))continue;r++;this.match(t,e,i).then((()=>next()))}for(const[t,e]of s.subwalks.entries()){r++;this.walkCB2(t,e,s.child(),next)}next()}walkCBSync(t,e,s){if(this.signal?.aborted)s();this.walkCB2Sync(t,e,new n.Processor(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#p(t))return i();if(this.signal?.aborted)i();if(this.paused){this.onResume((()=>this.walkCB2Sync(t,e,s,i)));return}s.processPatterns(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#d(t))continue;this.matchSync(t,e,i)}for(const t of s.subwalkTargets()){if(this.maxDepth!==Infinity&&t.depth()>=this.maxDepth){continue}r++;const e=t.readdirSync();this.walkCB3Sync(t,e,s,next)}next()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#d(t))continue;this.matchSync(t,e,i)}for(const[t,e]of s.subwalks.entries()){r++;this.walkCB2Sync(t,e,s.child(),next)}next()}}e.GlobUtil=GlobUtil;class GlobWalker extends GlobUtil{matches;constructor(t,e,s){super(t,e,s);this.matches=new Set}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){await this.path.lstat()}await new Promise(((t,e)=>{this.walkCB(this.path,this.patterns,(()=>{if(this.signal?.aborted){e(this.signal.reason)}else{t(this.matches)}}))}));return this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>{if(this.signal?.aborted)throw this.signal.reason}));return this.matches}}e.GlobWalker=GlobWalker;class GlobStream extends GlobUtil{results;constructor(t,e,s){super(t,e,s);this.results=new i.Minipass({signal:this.signal,objectMode:true});this.results.on("drain",(()=>this.resume()));this.results.on("resume",(()=>this.resume()))}matchEmit(t){this.results.write(t);if(!this.results.flowing)this.pause()}stream(){const t=this.path;if(t.isUnknown()){t.lstat().then((()=>{this.walkCB(t,this.patterns,(()=>this.results.end()))}))}else{this.walkCB(t,this.patterns,(()=>this.results.end()))}return this.results}streamSync(){if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>this.results.end()));return this.results}}e.GlobStream=GlobStream},5934:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.assertValidPattern=void 0;const s=1024*64;const assertValidPattern=t=>{if(typeof t!=="string"){throw new TypeError("invalid pattern")}if(t.length>s){throw new TypeError("pattern is too long")}};e.assertValidPattern=assertValidPattern},7642:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AST=void 0;const i=s(314);const r=s(9820);const n=new Set(["!","?","+","*","@"]);const isExtglobType=t=>n.has(t);const o="(?!(?:^|/)\\.\\.?(?:$|/))";const a="(?!\\.)";const c=new Set(["[","."]);const l=new Set(["..","."]);const h=new Set("().*{}+?[]^$\\!");const regExpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const u="[^/]";const f=u+"*?";const d=u+"+?";class AST{type;#m;#g;#y=false;#w=[];#v;#b;#S;#E=false;#_;#O;#R=false;constructor(t,e,s={}){this.type=t;if(t)this.#g=true;this.#v=e;this.#m=this.#v?this.#v.#m:this;this.#_=this.#m===this?s:this.#m.#_;this.#S=this.#m===this?[]:this.#m.#S;if(t==="!"&&!this.#m.#E)this.#S.push(this);this.#b=this.#v?this.#v.#w.length:0}get hasMagic(){if(this.#g!==undefined)return this.#g;for(const t of this.#w){if(typeof t==="string")continue;if(t.type||t.hasMagic)return this.#g=true}return this.#g}toString(){if(this.#O!==undefined)return this.#O;if(!this.type){return this.#O=this.#w.map((t=>String(t))).join("")}else{return this.#O=this.type+"("+this.#w.map((t=>String(t))).join("|")+")"}}#P(){if(this!==this.#m)throw new Error("should only call on root");if(this.#E)return this;this.toString();this.#E=true;let t;while(t=this.#S.pop()){if(t.type!=="!")continue;let e=t;let s=e.#v;while(s){for(let i=e.#b+1;!s.type&&itypeof t==="string"?t:t.toJSON())):[this.type,...this.#w.map((t=>t.toJSON()))];if(this.isStart()&&!this.type)t.unshift([]);if(this.isEnd()&&(this===this.#m||this.#m.#E&&this.#v?.type==="!")){t.push({})}return t}isStart(){if(this.#m===this)return true;if(!this.#v?.isStart())return false;if(this.#b===0)return true;const t=this.#v;for(let e=0;e{const[i,r,n,o]=typeof e==="string"?AST.#x(e,this.#g,s):e.toRegExpSource(t);this.#g=this.#g||n;this.#y=this.#y||o;return i})).join("");let n="";if(this.isStart()){if(typeof this.#w[0]==="string"){const s=this.#w.length===1&&l.has(this.#w[0]);if(!s){const s=c;const r=e&&s.has(i.charAt(0))||i.startsWith("\\.")&&s.has(i.charAt(2))||i.startsWith("\\.\\.")&&s.has(i.charAt(4));const l=!e&&!t&&s.has(i.charAt(0));n=r?o:l?a:""}}}let h="";if(this.isEnd()&&this.#m.#E&&this.#v?.type==="!"){h="(?:$|\\/)"}const u=n+i+h;return[u,(0,r.unescape)(i),this.#g=!!this.#g,this.#y]}const s=this.type==="*"||this.type==="+";const i=this.type==="!"?"(?:(?!(?:":"(?:";let n=this.#k(e);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){const t=this.toString();this.#w=[t];this.type=null;this.#g=undefined;return[t,(0,r.unescape)(this.toString()),false,false]}let h=!s||t||e||!a?"":this.#k(true);if(h===n){h=""}if(h){n=`(?:${n})(?:${h})*?`}let u="";if(this.type==="!"&&this.#R){u=(this.isStart()&&!e?a:"")+d}else{const s=this.type==="!"?"))"+(this.isStart()&&!e&&!t?a:"")+f+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&h?")":this.type==="*"&&h?`)?`:`)${this.type}`;u=i+n+s}return[u,(0,r.unescape)(n),this.#g=!!this.#g,this.#y]}#k(t){return this.#w.map((e=>{if(typeof e==="string"){throw new Error("string type in extglob ast??")}const[s,i,r,n]=e.toRegExpSource(t);this.#y=this.#y||n;return s})).filter((t=>!(this.isStart()&&this.isEnd())||!!t)).join("|")}static#x(t,e,s=false){let n=false;let o="";let a=false;for(let r=0;r{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.parseClass=void 0;const s={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",true],"[:alpha:]":["\\p{L}\\p{Nl}",true],"[:ascii:]":["\\x"+"00-\\x"+"7f",false],"[:blank:]":["\\p{Zs}\\t",true],"[:cntrl:]":["\\p{Cc}",true],"[:digit:]":["\\p{Nd}",true],"[:graph:]":["\\p{Z}\\p{C}",true,true],"[:lower:]":["\\p{Ll}",true],"[:print:]":["\\p{C}",true],"[:punct:]":["\\p{P}",true],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",true],"[:upper:]":["\\p{Lu}",true],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",true],"[:xdigit:]":["A-Fa-f0-9",false]};const braceEscape=t=>t.replace(/[[\]\\-]/g,"\\$&");const regexpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const rangesToString=t=>t.join("");const parseClass=(t,e)=>{const i=e;if(t.charAt(i)!=="["){throw new Error("not in a brace expression")}const r=[];const n=[];let o=i+1;let a=false;let c=false;let l=false;let h=false;let u=i;let f="";t:while(of){r.push(braceEscape(f)+"-"+braceEscape(e))}else if(e===f){r.push(braceEscape(e))}f="";o++;continue}if(t.startsWith("-]",o+1)){r.push(braceEscape(e+"-"));o+=2;continue}if(t.startsWith("-",o+1)){f=e;o+=2;continue}r.push(braceEscape(e));o++}if(u{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.escape=void 0;const escape=(t,{windowsPathsNoEscape:e=false}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");e.escape=escape},266:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;const r=i(s(1046));const n=s(5934);const o=s(7642);const a=s(1477);const c=s(9820);const minimatch=(t,e,s={})=>{(0,n.assertValidPattern)(e);if(!s.nocomment&&e.charAt(0)==="#"){return false}return new Minimatch(e,s).match(t)};e.minimatch=minimatch;const l=/^\*+([^+@!?\*\[\(]*)$/;const starDotExtTest=t=>e=>!e.startsWith(".")&&e.endsWith(t);const starDotExtTestDot=t=>e=>e.endsWith(t);const starDotExtTestNocase=t=>{t=t.toLowerCase();return e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)};const starDotExtTestNocaseDot=t=>{t=t.toLowerCase();return e=>e.toLowerCase().endsWith(t)};const h=/^\*+\.\*+$/;const starDotStarTest=t=>!t.startsWith(".")&&t.includes(".");const starDotStarTestDot=t=>t!=="."&&t!==".."&&t.includes(".");const u=/^\.\*+$/;const dotStarTest=t=>t!=="."&&t!==".."&&t.startsWith(".");const f=/^\*+$/;const starTest=t=>t.length!==0&&!t.startsWith(".");const starTestDot=t=>t.length!==0&&t!=="."&&t!=="..";const d=/^\?+([^+@!?\*\[\(]*)?$/;const qmarksTestNocase=([t,e=""])=>{const s=qmarksTestNoExt([t]);if(!e)return s;e=e.toLowerCase();return t=>s(t)&&t.toLowerCase().endsWith(e)};const qmarksTestNocaseDot=([t,e=""])=>{const s=qmarksTestNoExtDot([t]);if(!e)return s;e=e.toLowerCase();return t=>s(t)&&t.toLowerCase().endsWith(e)};const qmarksTestDot=([t,e=""])=>{const s=qmarksTestNoExtDot([t]);return!e?s:t=>s(t)&&t.endsWith(e)};const qmarksTest=([t,e=""])=>{const s=qmarksTestNoExt([t]);return!e?s:t=>s(t)&&t.endsWith(e)};const qmarksTestNoExt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")};const qmarksTestNoExtDot=([t])=>{const e=t.length;return t=>t.length===e&&t!=="."&&t!==".."};const p=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";const g={win32:{sep:"\\"},posix:{sep:"/"}};e.sep=p==="win32"?g.win32.sep:g.posix.sep;e.minimatch.sep=e.sep;e.GLOBSTAR=Symbol("globstar **");e.minimatch.GLOBSTAR=e.GLOBSTAR;const y="[^/]";const w=y+"*?";const v="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";const b="(?:(?!(?:\\/|^)\\.).)*?";const filter=(t,s={})=>i=>(0,e.minimatch)(i,t,s);e.filter=filter;e.minimatch.filter=e.filter;const ext=(t,e={})=>Object.assign({},t,e);const defaults=t=>{if(!t||typeof t!=="object"||!Object.keys(t).length){return e.minimatch}const s=e.minimatch;const m=(e,i,r={})=>s(e,i,ext(t,r));return Object.assign(m,{Minimatch:class Minimatch extends s.Minimatch{constructor(e,s={}){super(e,ext(t,s))}static defaults(e){return s.defaults(ext(t,e)).Minimatch}},AST:class AST extends s.AST{constructor(e,s,i={}){super(e,s,ext(t,i))}static fromGlob(e,i={}){return s.AST.fromGlob(e,ext(t,i))}},unescape:(e,i={})=>s.unescape(e,ext(t,i)),escape:(e,i={})=>s.escape(e,ext(t,i)),filter:(e,i={})=>s.filter(e,ext(t,i)),defaults:e=>s.defaults(ext(t,e)),makeRe:(e,i={})=>s.makeRe(e,ext(t,i)),braceExpand:(e,i={})=>s.braceExpand(e,ext(t,i)),match:(e,i,r={})=>s.match(e,i,ext(t,r)),sep:s.sep,GLOBSTAR:e.GLOBSTAR})};e.defaults=defaults;e.minimatch.defaults=e.defaults;const braceExpand=(t,e={})=>{(0,n.assertValidPattern)(t);if(e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)){return[t]}return(0,r.default)(t)};e.braceExpand=braceExpand;e.minimatch.braceExpand=e.braceExpand;const makeRe=(t,e={})=>new Minimatch(t,e).makeRe();e.makeRe=makeRe;e.minimatch.makeRe=e.makeRe;const match=(t,e,s={})=>{const i=new Minimatch(e,s);t=t.filter((t=>i.match(t)));if(i.options.nonull&&!t.length){t.push(e)}return t};e.match=match;e.minimatch.match=e.match;const S=/[?*]|[+@!]\(.*?\)|\[|\]/;const regExpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Minimatch{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){(0,n.assertValidPattern)(t);e=e||{};this.options=e;this.pattern=t;this.platform=e.platform||p;this.isWindows=this.platform==="win32";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false;if(this.windowsPathsNoEscape){this.pattern=this.pattern.replace(/\\/g,"/")}this.preserveMultipleSlashes=!!e.preserveMultipleSlashes;this.regexp=null;this.negate=false;this.nonegate=!!e.nonegate;this.comment=false;this.empty=false;this.partial=!!e.partial;this.nocase=!!this.options.nocase;this.windowsNoMagicRoot=e.windowsNoMagicRoot!==undefined?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase);this.globSet=[];this.globParts=[];this.set=[];this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1){return true}for(const t of this.set){for(const e of t){if(typeof e!=="string")return true}}return false}debug(...t){}make(){const t=this.pattern;const e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();this.globSet=[...new Set(this.braceExpand())];if(e.debug){this.debug=(...t)=>console.error(...t)}this.debug(this.pattern,this.globSet);const s=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(s);this.debug(this.pattern,this.globParts);let i=this.globParts.map(((t,e,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=t[0]===""&&t[1]===""&&(t[2]==="?"||!S.test(t[2]))&&!S.test(t[3]);const s=/^[a-z]:/i.test(t[0]);if(e){return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))]}else if(s){return[t[0],...t.slice(1).map((t=>this.parse(t)))]}}return t.map((t=>this.parse(t)))}));this.debug(this.pattern,i);this.set=i.filter((t=>t.indexOf(false)===-1));if(this.isWindows){for(let t=0;t=2){t=this.firstPhasePreProcess(t);t=this.secondPhasePreProcess(t)}else if(e>=1){t=this.levelOneOptimize(t)}else{t=this.adjascentGlobstarOptimize(t)}return t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;while(-1!==(e=t.indexOf("**",e+1))){let s=e;while(t[s+1]==="**"){s++}if(s!==e){t.splice(e,s-e)}}return t}))}levelOneOptimize(t){return t.map((t=>{t=t.reduce(((t,e)=>{const s=t[t.length-1];if(e==="**"&&s==="**"){return t}if(e===".."){if(s&&s!==".."&&s!=="."&&s!=="**"){t.pop();return t}}t.push(e);return t}),[]);return t.length===0?[""]:t}))}levelTwoFileOptimize(t){if(!Array.isArray(t)){t=this.slashSplit(t)}let e=false;do{e=false;if(!this.preserveMultipleSlashes){for(let s=1;si){s.splice(i+1,r-i)}let n=s[i+1];const o=s[i+2];const a=s[i+3];if(n!=="..")continue;if(!o||o==="."||o===".."||!a||a==="."||a===".."){continue}e=true;s.splice(i,1);const c=s.slice(0);c[i]="**";t.push(c);i--}if(!this.preserveMultipleSlashes){for(let t=1;tt.length))}partsMatch(t,e,s=false){let i=0;let r=0;let n=[];let o="";while(io){s=s.slice(a)}else if(o>a){t=t.slice(o)}}}}const{optimizationLevel:n=1}=this.options;if(n>=2){t=this.levelTwoFileOptimize(t)}this.debug("matchOne",this,{file:t,pattern:s});this.debug("matchOne",t.length,s.length);for(var o=0,a=0,c=t.length,l=s.length;o>> no match, partial?",t,f,s,d);if(f===c){return true}}return false}let n;if(typeof h==="string"){n=u===h;this.debug("string match",h,u,n)}else{n=h.test(u);this.debug("pattern match",h,u,n)}if(!n)return false}if(o===c&&a===l){return true}else if(o===c){return i}else if(a===l){return o===c-1&&t[o]===""}else{throw new Error("wtf?")}}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(t){(0,n.assertValidPattern)(t);const s=this.options;if(t==="**")return e.GLOBSTAR;if(t==="")return"";let i;let r=null;if(i=t.match(f)){r=s.dot?starTestDot:starTest}else if(i=t.match(l)){r=(s.nocase?s.dot?starDotExtTestNocaseDot:starDotExtTestNocase:s.dot?starDotExtTestDot:starDotExtTest)(i[1])}else if(i=t.match(d)){r=(s.nocase?s.dot?qmarksTestNocaseDot:qmarksTestNocase:s.dot?qmarksTestDot:qmarksTest)(i)}else if(i=t.match(h)){r=s.dot?starDotStarTestDot:starDotStarTest}else if(i=t.match(u)){r=dotStarTest}const a=o.AST.fromGlob(t,this.options).toMMPattern();return r?Object.assign(a,{test:r}):a}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;const t=this.set;if(!t.length){this.regexp=false;return this.regexp}const s=this.options;const i=s.noglobstar?w:s.dot?v:b;const r=new Set(s.nocase?["i"]:[]);let n=t.map((t=>{const s=t.map((t=>{if(t instanceof RegExp){for(const e of t.flags.split(""))r.add(e)}return typeof t==="string"?regExpEscape(t):t===e.GLOBSTAR?e.GLOBSTAR:t._src}));s.forEach(((t,r)=>{const n=s[r+1];const o=s[r-1];if(t!==e.GLOBSTAR||o===e.GLOBSTAR){return}if(o===undefined){if(n!==undefined&&n!==e.GLOBSTAR){s[r+1]="(?:\\/|"+i+"\\/)?"+n}else{s[r]=i}}else if(n===undefined){s[r-1]=o+"(?:\\/|"+i+")?"}else if(n!==e.GLOBSTAR){s[r-1]=o+"(?:\\/|\\/"+i+"\\/)"+n;s[r+1]=e.GLOBSTAR}}));return s.filter((t=>t!==e.GLOBSTAR)).join("/")})).join("|");const[o,a]=t.length>1?["(?:",")"]:["",""];n="^"+o+n+a+"$";if(this.negate)n="^(?!"+n+").+$";try{this.regexp=new RegExp(n,[...r].join(""))}catch(t){this.regexp=false}return this.regexp}slashSplit(t){if(this.preserveMultipleSlashes){return t.split("/")}else if(this.isWindows&&/^\/\/[^\/]+/.test(t)){return["",...t.split(/\/+/)]}else{return t.split(/\/+/)}}match(t,e=this.partial){this.debug("match",t,this.pattern);if(this.comment){return false}if(this.empty){return t===""}if(t==="/"&&e){return true}const s=this.options;if(this.isWindows){t=t.split("\\").join("/")}const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const r=this.set;this.debug(this.pattern,"set",r);let n=i[i.length-1];if(!n){for(let t=i.length-2;!n&&t>=0;t--){n=i[t]}}for(let t=0;t{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.unescape=void 0;const unescape=(t,{windowsPathsNoEscape:e=false}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");e.unescape=unescape},9802:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.LRUCache=void 0;const s=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;const i=new Set;const r=typeof process==="object"&&!!process?process:{};const emitWarning=(t,e,s,i)=>{typeof r.emitWarning==="function"?r.emitWarning(t,e,s,i):console.error(`[${s}] ${e}: ${t}`)};let n=globalThis.AbortController;let o=globalThis.AbortSignal;if(typeof n==="undefined"){o=class AbortSignal{onabort;_onabort=[];reason;aborted=false;addEventListener(t,e){this._onabort.push(e)}};n=class AbortController{constructor(){warnACPolyfill()}signal=new o;abort(t){if(this.signal.aborted)return;this.signal.reason=t;this.signal.aborted=true;for(const e of this.signal._onabort){e(t)}this.signal.onabort?.(t)}};let t=r.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const warnACPolyfill=()=>{if(!t)return;t=false;emitWarning("AbortController is not defined. If using lru-cache in "+"node 14, load an AbortController polyfill from the "+"`node-abort-controller` package. A minimal polyfill is "+"provided for use by LRUCache.fetch(), but it should not be "+"relied upon in other contexts (eg, passing it to other APIs that "+"use AbortController/AbortSignal might have undesirable effects). "+"You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",warnACPolyfill)}}const shouldWarn=t=>!i.has(t);const a=Symbol("type");const isPosInt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t);const getUintArray=t=>!isPosInt(t)?null:t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(t){super(t);this.fill(0)}}class Stack{heap;length;static#A=false;static create(t){const e=getUintArray(t);if(!e)return[];Stack.#A=true;const s=new Stack(t,e);Stack.#A=false;return s}constructor(t,e){if(!Stack.#A){throw new TypeError("instantiate Stack using Stack.create(n)")}this.heap=new e(t);this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class LRUCache{#C;#M;#N;#L;#j;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#D;#I;#F;#B;#U;#G;#q;#z;#$;#W;#H;#V;#K;#J;#Y;#Z;#X;static unsafeExposeInternals(t){return{starts:t.#K,ttls:t.#J,sizes:t.#V,keyMap:t.#F,keyList:t.#B,valList:t.#U,next:t.#G,prev:t.#q,get head(){return t.#z},get tail(){return t.#$},free:t.#W,isBackgroundFetch:e=>t.#Q(e),backgroundFetch:(e,s,i,r)=>t.#tt(e,s,i,r),moveToTail:e=>t.#et(e),indexes:e=>t.#st(e),rindexes:e=>t.#it(e),isStale:e=>t.#rt(e)}}get max(){return this.#C}get maxSize(){return this.#M}get calculatedSize(){return this.#I}get size(){return this.#D}get fetchMethod(){return this.#j}get dispose(){return this.#N}get disposeAfter(){return this.#L}constructor(t){const{max:e=0,ttl:s,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:l,disposeAfter:h,noDisposeOnSet:u,noUpdateTTL:f,maxSize:d=0,maxEntrySize:p=0,sizeCalculation:g,fetchMethod:y,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:v,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:S,ignoreFetchAbort:E}=t;if(e!==0&&!isPosInt(e)){throw new TypeError("max option must be a nonnegative integer")}const _=e?getUintArray(e):Array;if(!_){throw new Error("invalid max value: "+e)}this.#C=e;this.#M=d;this.maxEntrySize=p||this.#M;this.sizeCalculation=g;if(this.sizeCalculation){if(!this.#M&&!this.maxEntrySize){throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize")}if(typeof this.sizeCalculation!=="function"){throw new TypeError("sizeCalculation set to non-function")}}if(y!==undefined&&typeof y!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.#j=y;this.#Z=!!y;this.#F=new Map;this.#B=new Array(e).fill(undefined);this.#U=new Array(e).fill(undefined);this.#G=new _(e);this.#q=new _(e);this.#z=0;this.#$=0;this.#W=Stack.create(e);this.#D=0;this.#I=0;if(typeof l==="function"){this.#N=l}if(typeof h==="function"){this.#L=h;this.#H=[]}else{this.#L=undefined;this.#H=undefined}this.#Y=!!this.#N;this.#X=!!this.#L;this.noDisposeOnSet=!!u;this.noUpdateTTL=!!f;this.noDeleteOnFetchRejection=!!w;this.allowStaleOnFetchRejection=!!b;this.allowStaleOnFetchAbort=!!S;this.ignoreFetchAbort=!!E;if(this.maxEntrySize!==0){if(this.#M!==0){if(!isPosInt(this.#M)){throw new TypeError("maxSize must be a positive integer if specified")}}if(!isPosInt(this.maxEntrySize)){throw new TypeError("maxEntrySize must be a positive integer if specified")}this.#nt()}this.allowStale=!!c;this.noDeleteOnStaleGet=!!v;this.updateAgeOnGet=!!o;this.updateAgeOnHas=!!a;this.ttlResolution=isPosInt(r)||r===0?r:1;this.ttlAutopurge=!!n;this.ttl=s||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.#ot()}if(this.#C===0&&this.ttl===0&&this.#M===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.#C&&!this.#M){const t="LRU_CACHE_UNBOUNDED";if(shouldWarn(t)){i.add(t);const e="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";emitWarning(e,"UnboundedCacheWarning",t,LRUCache)}}}getRemainingTTL(t){return this.#F.has(t)?Infinity:0}#ot(){const t=new ZeroArray(this.#C);const e=new ZeroArray(this.#C);this.#J=t;this.#K=e;this.#at=(i,r,n=s.now())=>{e[i]=r!==0?n:0;t[i]=r;if(r!==0&&this.ttlAutopurge){const t=setTimeout((()=>{if(this.#rt(i)){this.delete(this.#B[i])}}),r+1);if(t.unref){t.unref()}}};this.#ct=i=>{e[i]=t[i]!==0?s.now():0};this.#lt=(s,r)=>{if(t[r]){const n=t[r];const o=e[r];s.ttl=n;s.start=o;s.now=i||getNow();const a=s.now-o;s.remainingTTL=n-a}};let i=0;const getNow=()=>{const t=s.now();if(this.ttlResolution>0){i=t;const e=setTimeout((()=>i=0),this.ttlResolution);if(e.unref){e.unref()}}return t};this.getRemainingTTL=s=>{const r=this.#F.get(s);if(r===undefined){return 0}const n=t[r];const o=e[r];if(n===0||o===0){return Infinity}const a=(i||getNow())-o;return n-a};this.#rt=s=>t[s]!==0&&e[s]!==0&&(i||getNow())-e[s]>t[s]}#ct=()=>{};#lt=()=>{};#at=()=>{};#rt=()=>false;#nt(){const t=new ZeroArray(this.#C);this.#I=0;this.#V=t;this.#ht=e=>{this.#I-=t[e];t[e]=0};this.#ut=(t,e,s,i)=>{if(this.#Q(e)){return 0}if(!isPosInt(s)){if(i){if(typeof i!=="function"){throw new TypeError("sizeCalculation must be a function")}s=i(e,t);if(!isPosInt(s)){throw new TypeError("sizeCalculation return invalid (expect positive integer)")}}else{throw new TypeError("invalid size value (must be positive integer). "+"When maxSize or maxEntrySize is used, sizeCalculation "+"or size must be set.")}}return s};this.#ft=(e,s,i)=>{t[e]=s;if(this.#M){const s=this.#M-t[e];while(this.#I>s){this.#dt(true)}}this.#I+=t[e];if(i){i.entrySize=s;i.totalCalculatedSize=this.#I}}}#ht=t=>{};#ft=(t,e,s)=>{};#ut=(t,e,s,i)=>{if(s||i){throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}return 0};*#st({allowStale:t=this.allowStale}={}){if(this.#D){for(let e=this.#$;true;){if(!this.#pt(e)){break}if(t||!this.#rt(e)){yield e}if(e===this.#z){break}else{e=this.#q[e]}}}}*#it({allowStale:t=this.allowStale}={}){if(this.#D){for(let e=this.#z;true;){if(!this.#pt(e)){break}if(t||!this.#rt(e)){yield e}if(e===this.#$){break}else{e=this.#G[e]}}}}#pt(t){return t!==undefined&&this.#F.get(this.#B[t])===t}*entries(){for(const t of this.#st()){if(this.#U[t]!==undefined&&this.#B[t]!==undefined&&!this.#Q(this.#U[t])){yield[this.#B[t],this.#U[t]]}}}*rentries(){for(const t of this.#it()){if(this.#U[t]!==undefined&&this.#B[t]!==undefined&&!this.#Q(this.#U[t])){yield[this.#B[t],this.#U[t]]}}}*keys(){for(const t of this.#st()){const e=this.#B[t];if(e!==undefined&&!this.#Q(this.#U[t])){yield e}}}*rkeys(){for(const t of this.#it()){const e=this.#B[t];if(e!==undefined&&!this.#Q(this.#U[t])){yield e}}}*values(){for(const t of this.#st()){const e=this.#U[t];if(e!==undefined&&!this.#Q(this.#U[t])){yield this.#U[t]}}}*rvalues(){for(const t of this.#it()){const e=this.#U[t];if(e!==undefined&&!this.#Q(this.#U[t])){yield this.#U[t]}}}[Symbol.iterator](){return this.entries()}find(t,e={}){for(const s of this.#st()){const i=this.#U[s];const r=this.#Q(i)?i.__staleWhileFetching:i;if(r===undefined)continue;if(t(r,this.#B[s],this)){return this.get(this.#B[s],e)}}}forEach(t,e=this){for(const s of this.#st()){const i=this.#U[s];const r=this.#Q(i)?i.__staleWhileFetching:i;if(r===undefined)continue;t.call(e,r,this.#B[s],this)}}rforEach(t,e=this){for(const s of this.#it()){const i=this.#U[s];const r=this.#Q(i)?i.__staleWhileFetching:i;if(r===undefined)continue;t.call(e,r,this.#B[s],this)}}purgeStale(){let t=false;for(const e of this.#it({allowStale:true})){if(this.#rt(e)){this.delete(this.#B[e]);t=true}}return t}dump(){const t=[];for(const e of this.#st({allowStale:true})){const i=this.#B[e];const r=this.#U[e];const n=this.#Q(r)?r.__staleWhileFetching:r;if(n===undefined||i===undefined)continue;const o={value:n};if(this.#J&&this.#K){o.ttl=this.#J[e];const t=s.now()-this.#K[e];o.start=Math.floor(Date.now()-t)}if(this.#V){o.size=this.#V[e]}t.unshift([i,o])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const t=Date.now()-i.start;i.start=s.now()-t}this.set(e,i.value,i)}}set(t,e,s={}){if(e===undefined){this.delete(t);return this}const{ttl:i=this.ttl,start:r,noDisposeOnSet:n=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=s;let{noUpdateTTL:c=this.noUpdateTTL}=s;const l=this.#ut(t,e,s.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize){if(a){a.set="miss";a.maxEntrySizeExceeded=true}this.delete(t);return this}let h=this.#D===0?undefined:this.#F.get(t);if(h===undefined){h=this.#D===0?this.#$:this.#W.length!==0?this.#W.pop():this.#D===this.#C?this.#dt(false):this.#D;this.#B[h]=t;this.#U[h]=e;this.#F.set(t,h);this.#G[this.#$]=h;this.#q[h]=this.#$;this.#$=h;this.#D++;this.#ft(h,l,a);if(a)a.set="add";c=false}else{this.#et(h);const s=this.#U[h];if(e!==s){if(this.#Z&&this.#Q(s)){s.__abortController.abort(new Error("replaced"))}else if(!n){if(this.#Y){this.#N?.(s,t,"set")}if(this.#X){this.#H?.push([s,t,"set"])}}this.#ht(h);this.#ft(h,l,a);this.#U[h]=e;if(a){a.set="replace";const t=s&&this.#Q(s)?s.__staleWhileFetching:s;if(t!==undefined)a.oldValue=t}}else if(a){a.set="update"}}if(i!==0&&!this.#J){this.#ot()}if(this.#J){if(!c){this.#at(h,i,r)}if(a)this.#lt(a,h)}if(!n&&this.#X&&this.#H){const t=this.#H;let e;while(e=t?.shift()){this.#L?.(...e)}}return this}pop(){try{while(this.#D){const t=this.#U[this.#z];this.#dt(true);if(this.#Q(t)){if(t.__staleWhileFetching){return t.__staleWhileFetching}}else if(t!==undefined){return t}}}finally{if(this.#X&&this.#H){const t=this.#H;let e;while(e=t?.shift()){this.#L?.(...e)}}}}#dt(t){const e=this.#z;const s=this.#B[e];const i=this.#U[e];if(this.#Z&&this.#Q(i)){i.__abortController.abort(new Error("evicted"))}else if(this.#Y||this.#X){if(this.#Y){this.#N?.(i,s,"evict")}if(this.#X){this.#H?.push([i,s,"evict"])}}this.#ht(e);if(t){this.#B[e]=undefined;this.#U[e]=undefined;this.#W.push(e)}if(this.#D===1){this.#z=this.#$=0;this.#W.length=0}else{this.#z=this.#G[e]}this.#F.delete(s);this.#D--;return e}has(t,e={}){const{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e;const r=this.#F.get(t);if(r!==undefined){const t=this.#U[r];if(this.#Q(t)&&t.__staleWhileFetching===undefined){return false}if(!this.#rt(r)){if(s){this.#ct(r)}if(i){i.has="hit";this.#lt(i,r)}return true}else if(i){i.has="stale";this.#lt(i,r)}}else if(i){i.has="miss"}return false}peek(t,e={}){const{allowStale:s=this.allowStale}=e;const i=this.#F.get(t);if(i!==undefined&&(s||!this.#rt(i))){const t=this.#U[i];return this.#Q(t)?t.__staleWhileFetching:t}}#tt(t,e,s,i){const r=e===undefined?undefined:this.#U[e];if(this.#Q(r)){return r}const o=new n;const{signal:a}=s;a?.addEventListener("abort",(()=>o.abort(a.reason)),{signal:o.signal});const c={signal:o.signal,options:s,context:i};const cb=(i,r=false)=>{const{aborted:n}=o.signal;const a=s.ignoreFetchAbort&&i!==undefined;if(s.status){if(n&&!r){s.status.fetchAborted=true;s.status.fetchError=o.signal.reason;if(a)s.status.fetchAbortIgnored=true}else{s.status.fetchResolved=true}}if(n&&!a&&!r){return fetchFail(o.signal.reason)}const h=l;if(this.#U[e]===l){if(i===undefined){if(h.__staleWhileFetching){this.#U[e]=h.__staleWhileFetching}else{this.delete(t)}}else{if(s.status)s.status.fetchUpdated=true;this.set(t,i,c.options)}}return i};const eb=t=>{if(s.status){s.status.fetchRejected=true;s.status.fetchError=t}return fetchFail(t)};const fetchFail=i=>{const{aborted:r}=o.signal;const n=r&&s.allowStaleOnFetchAbort;const a=n||s.allowStaleOnFetchRejection;const c=a||s.noDeleteOnFetchRejection;const h=l;if(this.#U[e]===l){const s=!c||h.__staleWhileFetching===undefined;if(s){this.delete(t)}else if(!n){this.#U[e]=h.__staleWhileFetching}}if(a){if(s.status&&h.__staleWhileFetching!==undefined){s.status.returnedStale=true}return h.__staleWhileFetching}else if(h.__returned===h){throw i}};const pcall=(e,i)=>{const n=this.#j?.(t,r,c);if(n&&n instanceof Promise){n.then((t=>e(t===undefined?undefined:t)),i)}o.signal.addEventListener("abort",(()=>{if(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort){e(undefined);if(s.allowStaleOnFetchAbort){e=t=>cb(t,true)}}}))};if(s.status)s.status.fetchDispatched=true;const l=new Promise(pcall).then(cb,eb);const h=Object.assign(l,{__abortController:o,__staleWhileFetching:r,__returned:undefined});if(e===undefined){this.set(t,h,{...c.options,status:undefined});e=this.#F.get(t)}else{this.#U[e]=h}return h}#Q(t){if(!this.#Z)return false;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof n}async fetch(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:p,forceRefresh:g=false,status:y,signal:w}=e;if(!this.#Z){if(y)y.fetch="get";return this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:y})}const v={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:n,noDisposeOnSet:o,size:a,sizeCalculation:c,noUpdateTTL:l,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:d,ignoreFetchAbort:f,status:y,signal:w};let b=this.#F.get(t);if(b===undefined){if(y)y.fetch="miss";const e=this.#tt(t,b,v,p);return e.__returned=e}else{const e=this.#U[b];if(this.#Q(e)){const t=s&&e.__staleWhileFetching!==undefined;if(y){y.fetch="inflight";if(t)y.returnedStale=true}return t?e.__staleWhileFetching:e.__returned=e}const r=this.#rt(b);if(!g&&!r){if(y)y.fetch="hit";this.#et(b);if(i){this.#ct(b)}if(y)this.#lt(y,b);return e}const n=this.#tt(t,b,v,p);const o=n.__staleWhileFetching!==undefined;const a=o&&s;if(y){y.fetch=r?"stale":"refresh";if(a&&r)y.returnedStale=true}return a?n.__staleWhileFetching:n.__returned=n}}get(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:n}=e;const o=this.#F.get(t);if(o!==undefined){const e=this.#U[o];const a=this.#Q(e);if(n)this.#lt(n,o);if(this.#rt(o)){if(n)n.get="stale";if(!a){if(!r){this.delete(t)}if(n&&s)n.returnedStale=true;return s?e:undefined}else{if(n&&s&&e.__staleWhileFetching!==undefined){n.returnedStale=true}return s?e.__staleWhileFetching:undefined}}else{if(n)n.get="hit";if(a){return e.__staleWhileFetching}this.#et(o);if(i){this.#ct(o)}return e}}else if(n){n.get="miss"}}#mt(t,e){this.#q[e]=t;this.#G[t]=e}#et(t){if(t!==this.#$){if(t===this.#z){this.#z=this.#G[t]}else{this.#mt(this.#q[t],this.#G[t])}this.#mt(this.#$,t);this.#$=t}}delete(t){let e=false;if(this.#D!==0){const s=this.#F.get(t);if(s!==undefined){e=true;if(this.#D===1){this.clear()}else{this.#ht(s);const e=this.#U[s];if(this.#Q(e)){e.__abortController.abort(new Error("deleted"))}else if(this.#Y||this.#X){if(this.#Y){this.#N?.(e,t,"delete")}if(this.#X){this.#H?.push([e,t,"delete"])}}this.#F.delete(t);this.#B[s]=undefined;this.#U[s]=undefined;if(s===this.#$){this.#$=this.#q[s]}else if(s===this.#z){this.#z=this.#G[s]}else{this.#G[this.#q[s]]=this.#G[s];this.#q[this.#G[s]]=this.#q[s]}this.#D--;this.#W.push(s)}}}if(this.#X&&this.#H?.length){const t=this.#H;let e;while(e=t?.shift()){this.#L?.(...e)}}return e}clear(){for(const t of this.#it({allowStale:true})){const e=this.#U[t];if(this.#Q(e)){e.__abortController.abort(new Error("deleted"))}else{const s=this.#B[t];if(this.#Y){this.#N?.(e,s,"delete")}if(this.#X){this.#H?.push([e,s,"delete"])}}}this.#F.clear();this.#U.fill(undefined);this.#B.fill(undefined);if(this.#J&&this.#K){this.#J.fill(0);this.#K.fill(0)}if(this.#V){this.#V.fill(0)}this.#z=0;this.#$=0;this.#W.length=0;this.#I=0;this.#D=0;if(this.#X&&this.#H){const t=this.#H;let e;while(e=t?.shift()){this.#L?.(...e)}}}}e.LRUCache=LRUCache},8865:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;const r=typeof process==="object"&&process?process:{stdout:null,stderr:null};const n=s(5673);const o=i(s(4492));const a=s(6915);const isStream=t=>!!t&&typeof t==="object"&&(t instanceof Minipass||t instanceof o.default||(0,e.isReadable)(t)||(0,e.isWritable)(t));e.isStream=isStream;const isReadable=t=>!!t&&typeof t==="object"&&t instanceof n.EventEmitter&&typeof t.pipe==="function"&&t.pipe!==o.default.Writable.prototype.pipe;e.isReadable=isReadable;const isWritable=t=>!!t&&typeof t==="object"&&t instanceof n.EventEmitter&&typeof t.write==="function"&&typeof t.end==="function";e.isWritable=isWritable;const c=Symbol("EOF");const l=Symbol("maybeEmitEnd");const h=Symbol("emittedEnd");const u=Symbol("emittingEnd");const f=Symbol("emittedError");const d=Symbol("closed");const p=Symbol("read");const g=Symbol("flush");const y=Symbol("flushChunk");const w=Symbol("encoding");const v=Symbol("decoder");const b=Symbol("flowing");const S=Symbol("paused");const E=Symbol("resume");const _=Symbol("buffer");const O=Symbol("pipes");const R=Symbol("bufferLength");const P=Symbol("bufferPush");const T=Symbol("bufferShift");const x=Symbol("objectMode");const k=Symbol("destroyed");const A=Symbol("error");const C=Symbol("emitData");const M=Symbol("emitEnd");const N=Symbol("emitEnd2");const L=Symbol("async");const j=Symbol("abort");const D=Symbol("aborted");const I=Symbol("signal");const F=Symbol("dataListeners");const B=Symbol("discarded");const defer=t=>Promise.resolve().then(t);const nodefer=t=>t();const isEndish=t=>t==="end"||t==="finish"||t==="prefinish";const isArrayBufferLike=t=>t instanceof ArrayBuffer||!!t&&typeof t==="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0;const isArrayBufferView=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t);class Pipe{src;dest;opts;ondrain;constructor(t,e,s){this.src=t;this.dest=e;this.opts=s;this.ondrain=()=>t[E]();this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(t,e,s){super(t,e,s);this.proxyErrors=t=>e.emit("error",t);t.on("error",this.proxyErrors)}}const isObjectModeOptions=t=>!!t.objectMode;const isEncodingOptions=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer";class Minipass extends n.EventEmitter{[b]=false;[S]=false;[O]=[];[_]=[];[x];[w];[L];[v];[c]=false;[h]=false;[u]=false;[d]=false;[f]=null;[R]=0;[k]=false;[I];[D]=false;[F]=0;[B]=false;writable=true;readable=true;constructor(...t){const e=t[0]||{};super();if(e.objectMode&&typeof e.encoding==="string"){throw new TypeError("Encoding and objectMode may not be used together")}if(isObjectModeOptions(e)){this[x]=true;this[w]=null}else if(isEncodingOptions(e)){this[w]=e.encoding;this[x]=false}else{this[x]=false;this[w]=null}this[L]=!!e.async;this[v]=this[w]?new a.StringDecoder(this[w]):null;if(e&&e.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[_]})}if(e&&e.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[O]})}const{signal:s}=e;if(s){this[I]=s;if(s.aborted){this[j]()}else{s.addEventListener("abort",(()=>this[j]()))}}}get bufferLength(){return this[R]}get encoding(){return this[w]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[x]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[L]}set["async"](t){this[L]=this[L]||!!t}[j](){this[D]=true;this.emit("abort",this[I]?.reason);this.destroy(this[I]?.reason)}get aborted(){return this[D]}set aborted(t){}write(t,e,s){if(this[D])return false;if(this[c])throw new Error("write after end");if(this[k]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof e==="function"){s=e;e="utf8"}if(!e)e="utf8";const i=this[L]?defer:nodefer;if(!this[x]&&!Buffer.isBuffer(t)){if(isArrayBufferView(t)){t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)}else if(isArrayBufferLike(t)){t=Buffer.from(t)}else if(typeof t!=="string"){throw new Error("Non-contiguous data written to non-objectMode stream")}}if(this[x]){if(this[b]&&this[R]!==0)this[g](true);if(this[b])this.emit("data",t);else this[P](t);if(this[R]!==0)this.emit("readable");if(s)i(s);return this[b]}if(!t.length){if(this[R]!==0)this.emit("readable");if(s)i(s);return this[b]}if(typeof t==="string"&&!(e===this[w]&&!this[v]?.lastNeed)){t=Buffer.from(t,e)}if(Buffer.isBuffer(t)&&this[w]){t=this[v].write(t)}if(this[b]&&this[R]!==0)this[g](true);if(this[b])this.emit("data",t);else this[P](t);if(this[R]!==0)this.emit("readable");if(s)i(s);return this[b]}read(t){if(this[k])return null;this[B]=false;if(this[R]===0||t===0||t&&t>this[R]){this[l]();return null}if(this[x])t=null;if(this[_].length>1&&!this[x]){this[_]=[this[w]?this[_].join(""):Buffer.concat(this[_],this[R])]}const e=this[p](t||null,this[_][0]);this[l]();return e}[p](t,e){if(this[x])this[T]();else{const s=e;if(t===s.length||t===null)this[T]();else if(typeof s==="string"){this[_][0]=s.slice(t);e=s.slice(0,t);this[R]-=t}else{this[_][0]=s.subarray(t);e=s.subarray(0,t);this[R]-=t}}this.emit("data",e);if(!this[_].length&&!this[c])this.emit("drain");return e}end(t,e,s){if(typeof t==="function"){s=t;t=undefined}if(typeof e==="function"){s=e;e="utf8"}if(t!==undefined)this.write(t,e);if(s)this.once("end",s);this[c]=true;this.writable=false;if(this[b]||!this[S])this[l]();return this}[E](){if(this[k])return;if(!this[F]&&!this[O].length){this[B]=true}this[S]=false;this[b]=true;this.emit("resume");if(this[_].length)this[g]();else if(this[c])this[l]();else this.emit("drain")}resume(){return this[E]()}pause(){this[b]=false;this[S]=true;this[B]=false}get destroyed(){return this[k]}get flowing(){return this[b]}get paused(){return this[S]}[P](t){if(this[x])this[R]+=1;else this[R]+=t.length;this[_].push(t)}[T](){if(this[x])this[R]-=1;else this[R]-=this[_][0].length;return this[_].shift()}[g](t=false){do{}while(this[y](this[T]())&&this[_].length);if(!t&&!this[_].length&&!this[c])this.emit("drain")}[y](t){this.emit("data",t);return this[b]}pipe(t,e){if(this[k])return t;this[B]=false;const s=this[h];e=e||{};if(t===r.stdout||t===r.stderr)e.end=false;else e.end=e.end!==false;e.proxyErrors=!!e.proxyErrors;if(s){if(e.end)t.end()}else{this[O].push(!e.proxyErrors?new Pipe(this,t,e):new PipeProxyErrors(this,t,e));if(this[L])defer((()=>this[E]()));else this[E]()}return t}unpipe(t){const e=this[O].find((e=>e.dest===t));if(e){if(this[O].length===1){if(this[b]&&this[F]===0){this[b]=false}this[O]=[]}else this[O].splice(this[O].indexOf(e),1);e.unpipe()}}addListener(t,e){return this.on(t,e)}on(t,e){const s=super.on(t,e);if(t==="data"){this[B]=false;this[F]++;if(!this[O].length&&!this[b]){this[E]()}}else if(t==="readable"&&this[R]!==0){super.emit("readable")}else if(isEndish(t)&&this[h]){super.emit(t);this.removeAllListeners(t)}else if(t==="error"&&this[f]){const t=e;if(this[L])defer((()=>t.call(this,this[f])));else t.call(this,this[f])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){const s=super.off(t,e);if(t==="data"){this[F]=this.listeners("data").length;if(this[F]===0&&!this[B]&&!this[O].length){this[b]=false}}return s}removeAllListeners(t){const e=super.removeAllListeners(t);if(t==="data"||t===undefined){this[F]=0;if(!this[B]&&!this[O].length){this[b]=false}}return e}get emittedEnd(){return this[h]}[l](){if(!this[u]&&!this[h]&&!this[k]&&this[_].length===0&&this[c]){this[u]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[d])this.emit("close");this[u]=false}}emit(t,...e){const s=e[0];if(t!=="error"&&t!=="close"&&t!==k&&this[k]){return false}else if(t==="data"){return!this[x]&&!s?false:this[L]?(defer((()=>this[C](s))),true):this[C](s)}else if(t==="end"){return this[M]()}else if(t==="close"){this[d]=true;if(!this[h]&&!this[k])return false;const t=super.emit("close");this.removeAllListeners("close");return t}else if(t==="error"){this[f]=s;super.emit(A,s);const t=!this[I]||this.listeners("error").length?super.emit("error",s):false;this[l]();return t}else if(t==="resume"){const t=super.emit("resume");this[l]();return t}else if(t==="finish"||t==="prefinish"){const e=super.emit(t);this.removeAllListeners(t);return e}const i=super.emit(t,...e);this[l]();return i}[C](t){for(const e of this[O]){if(e.dest.write(t)===false)this.pause()}const e=this[B]?false:super.emit("data",t);this[l]();return e}[M](){if(this[h])return false;this[h]=true;this.readable=false;return this[L]?(defer((()=>this[N]())),true):this[N]()}[N](){if(this[v]){const t=this[v].end();if(t){for(const e of this[O]){e.dest.write(t)}if(!this[B])super.emit("data",t)}}for(const t of this[O]){t.end()}const t=super.emit("end");this.removeAllListeners("end");return t}async collect(){const t=Object.assign([],{dataLength:0});if(!this[x])t.dataLength=0;const e=this.promise();this.on("data",(e=>{t.push(e);if(!this[x])t.dataLength+=e.length}));await e;return t}async concat(){if(this[x]){throw new Error("cannot concat in objectMode")}const t=await this.collect();return this[w]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,e)=>{this.on(k,(()=>e(new Error("stream destroyed"))));this.on("error",(t=>e(t)));this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[B]=false;let t=false;const stop=async()=>{this.pause();t=true;return{value:undefined,done:true}};const next=()=>{if(t)return stop();const e=this.read();if(e!==null)return Promise.resolve({done:false,value:e});if(this[c])return stop();let s;let i;const onerr=t=>{this.off("data",ondata);this.off("end",onend);this.off(k,ondestroy);stop();i(t)};const ondata=t=>{this.off("error",onerr);this.off("end",onend);this.off(k,ondestroy);this.pause();s({value:t,done:!!this[c]})};const onend=()=>{this.off("error",onerr);this.off("data",ondata);this.off(k,ondestroy);stop();s({done:true,value:undefined})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((t,e)=>{i=e;s=t;this.once(k,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[B]=false;let t=false;const stop=()=>{this.pause();this.off(A,stop);this.off(k,stop);this.off("end",stop);t=true;return{done:true,value:undefined}};const next=()=>{if(t)return stop();const e=this.read();return e===null?stop():{done:false,value:e}};this.once("end",stop);this.once(A,stop);this.once(k,stop);return{next:next,throw:stop,return:stop,[Symbol.iterator](){return this}}}destroy(t){if(this[k]){if(t)this.emit("error",t);else this.emit(k);return this}this[k]=true;this[B]=true;this[_].length=0;this[R]=0;const e=this;if(typeof e.close==="function"&&!this[d])e.close();if(t)this.emit("error",t);else this.emit(k);return this}static get isStream(){return e.isStream}}e.Minipass=Minipass},9569:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;var r=Object.getOwnPropertyDescriptor(e,s);if(!r||("get"in r?!e.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return e[s]}}}Object.defineProperty(t,i,r)}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;const o=s(9802);const a=s(1017);const c=s(7310);const l=n(s(7147));const h=s(7147);const u=h.realpathSync.native;const f=s(3292);const d=s(8865);const p={lstatSync:h.lstatSync,readdir:h.readdir,readdirSync:h.readdirSync,readlinkSync:h.readlinkSync,realpathSync:u,promises:{lstat:f.lstat,readdir:f.readdir,readlink:f.readlink,realpath:f.realpath}};const fsFromOption=t=>!t||t===p||t===l?p:{...p,...t,promises:{...p.promises,...t.promises||{}}};const g=/^\\\\\?\\([a-z]:)\\?$/i;const uncToDrive=t=>t.replace(/\//g,"\\").replace(g,"$1\\");const y=/[\\\/]/;const w=0;const v=1;const b=2;const S=4;const E=6;const _=8;const O=10;const R=12;const P=15;const T=~P;const x=16;const k=32;const A=64;const C=128;const M=256;const N=512;const L=A|C|N;const j=1023;const entToType=t=>t.isFile()?_:t.isDirectory()?S:t.isSymbolicLink()?O:t.isCharacterDevice()?b:t.isBlockDevice()?E:t.isSocket()?R:t.isFIFO()?v:w;const D=new Map;const normalize=t=>{const e=D.get(t);if(e)return e;const s=t.normalize("NFKD");D.set(t,s);return s};const I=new Map;const normalizeNocase=t=>{const e=I.get(t);if(e)return e;const s=normalize(t.toLowerCase());I.set(t,s);return s};class ResolveCache extends o.LRUCache{constructor(){super({max:256})}}e.ResolveCache=ResolveCache;class ChildrenCache extends o.LRUCache{constructor(t=16*1024){super({maxSize:t,sizeCalculation:t=>t.length+1})}}e.ChildrenCache=ChildrenCache;const F=Symbol("PathScurry setAsCwd");class PathBase{name;root;roots;parent;nocase;#gt;#yt;get dev(){return this.#yt}#wt;get mode(){return this.#wt}#vt;get nlink(){return this.#vt}#bt;get uid(){return this.#bt}#St;get gid(){return this.#St}#Et;get rdev(){return this.#Et}#_t;get blksize(){return this.#_t}#Ot;get ino(){return this.#Ot}#D;get size(){return this.#D}#Rt;get blocks(){return this.#Rt}#Pt;get atimeMs(){return this.#Pt}#Tt;get mtimeMs(){return this.#Tt}#xt;get ctimeMs(){return this.#xt}#kt;get birthtimeMs(){return this.#kt}#At;get atime(){return this.#At}#Ct;get mtime(){return this.#Ct}#Mt;get ctime(){return this.#Mt}#Nt;get birthtime(){return this.#Nt}#Lt;#jt;#Dt;#It;#Ft;#Bt;#Ut;#Gt;#qt;#zt;get path(){return(this.parent||this).fullpath()}constructor(t,e=w,s,i,r,n,o){this.name=t;this.#Lt=r?normalizeNocase(t):normalize(t);this.#Ut=e&j;this.nocase=r;this.roots=i;this.root=s||this;this.#Gt=n;this.#Dt=o.fullpath;this.#Ft=o.relative;this.#Bt=o.relativePosix;this.parent=o.parent;if(this.parent){this.#gt=this.parent.#gt}else{this.#gt=fsFromOption(o.fs)}}depth(){if(this.#jt!==undefined)return this.#jt;if(!this.parent)return this.#jt=0;return this.#jt=this.parent.depth()+1}childrenCache(){return this.#Gt}resolve(t){if(!t){return this}const e=this.getRootString(t);const s=t.substring(e.length);const i=s.split(this.splitSep);const r=e?this.getRoot(e).#$t(i):this.#$t(i);return r}#$t(t){let e=this;for(const s of t){e=e.child(s)}return e}children(){const t=this.#Gt.get(this);if(t){return t}const e=Object.assign([],{provisional:0});this.#Gt.set(this,e);this.#Ut&=~x;return e}child(t,e){if(t===""||t==="."){return this}if(t===".."){return this.parent||this}const s=this.children();const i=this.nocase?normalizeNocase(t):normalize(t);for(const t of s){if(t.#Lt===i){return t}}const r=this.parent?this.sep:"";const n=this.#Dt?this.#Dt+r+t:undefined;const o=this.newChild(t,w,{...e,parent:this,fullpath:n});if(!this.canReaddir()){o.#Ut|=C}s.push(o);return o}relative(){if(this.#Ft!==undefined){return this.#Ft}const t=this.name;const e=this.parent;if(!e){return this.#Ft=this.name}const s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.#Bt!==undefined)return this.#Bt;const t=this.name;const e=this.parent;if(!e){return this.#Bt=this.fullpathPosix()}const s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#Dt!==undefined){return this.#Dt}const t=this.name;const e=this.parent;if(!e){return this.#Dt=this.name}const s=e.fullpath();const i=s+(!e.parent?"":this.sep)+t;return this.#Dt=i}fullpathPosix(){if(this.#It!==undefined)return this.#It;if(this.sep==="/")return this.#It=this.fullpath();if(!this.parent){const t=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(t)){return this.#It=`//?/${t}`}else{return this.#It=t}}const t=this.parent;const e=t.fullpathPosix();const s=e+(!e||!t.parent?"":"/")+this.name;return this.#It=s}isUnknown(){return(this.#Ut&P)===w}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#Ut&P)===_}isDirectory(){return(this.#Ut&P)===S}isCharacterDevice(){return(this.#Ut&P)===b}isBlockDevice(){return(this.#Ut&P)===E}isFIFO(){return(this.#Ut&P)===v}isSocket(){return(this.#Ut&P)===R}isSymbolicLink(){return(this.#Ut&O)===O}lstatCached(){return this.#Ut&k?this:undefined}readlinkCached(){return this.#qt}realpathCached(){return this.#zt}readdirCached(){const t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#qt)return true;if(!this.parent)return false;const t=this.#Ut&P;return!(t!==w&&t!==O||this.#Ut&M||this.#Ut&C)}calledReaddir(){return!!(this.#Ut&x)}isENOENT(){return!!(this.#Ut&C)}isNamed(t){return!this.nocase?this.#Lt===normalize(t):this.#Lt===normalizeNocase(t)}async readlink(){const t=this.#qt;if(t){return t}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const t=await this.#gt.promises.readlink(this.fullpath());const e=this.parent.resolve(t);if(e){return this.#qt=e}}catch(t){this.#Wt(t.code);return undefined}}readlinkSync(){const t=this.#qt;if(t){return t}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const t=this.#gt.readlinkSync(this.fullpath());const e=this.parent.resolve(t);if(e){return this.#qt=e}}catch(t){this.#Wt(t.code);return undefined}}#Ht(t){this.#Ut|=x;for(let e=t.provisional;ee(null,t)))}readdirCB(t,e=false){if(!this.canReaddir()){if(e)t(null,[]);else queueMicrotask((()=>t(null,[])));return}const s=this.children();if(this.calledReaddir()){const i=s.slice(0,s.provisional);if(e)t(null,i);else queueMicrotask((()=>t(null,i)));return}this.#re.push(t);if(this.#ne){return}this.#ne=true;const i=this.fullpath();this.#gt.readdir(i,{withFileTypes:true},((t,e)=>{if(t){this.#Zt(t.code);s.provisional=0}else{for(const t of e){this.#Qt(t,s)}this.#Ht(s)}this.#oe(s.slice(0,s.provisional));return}))}#ae;async readdir(){if(!this.canReaddir()){return[]}const t=this.children();if(this.calledReaddir()){return t.slice(0,t.provisional)}const e=this.fullpath();if(this.#ae){await this.#ae}else{let resolve=()=>{};this.#ae=new Promise((t=>resolve=t));try{for(const s of await this.#gt.promises.readdir(e,{withFileTypes:true})){this.#Qt(s,t)}this.#Ht(t)}catch(e){this.#Zt(e.code);t.provisional=0}this.#ae=undefined;resolve()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir()){return[]}const t=this.children();if(this.calledReaddir()){return t.slice(0,t.provisional)}const e=this.fullpath();try{for(const s of this.#gt.readdirSync(e,{withFileTypes:true})){this.#Qt(s,t)}this.#Ht(t)}catch(e){this.#Zt(e.code);t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#Ut&L)return false;const t=P&this.#Ut;if(!(t===w||t===S||t===O)){return false}return true}shouldWalk(t,e){return(this.#Ut&S)===S&&!(this.#Ut&L)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#zt)return this.#zt;if((N|M|C)&this.#Ut)return undefined;try{const t=await this.#gt.promises.realpath(this.fullpath());return this.#zt=this.resolve(t)}catch(t){this.#Jt()}}realpathSync(){if(this.#zt)return this.#zt;if((N|M|C)&this.#Ut)return undefined;try{const t=this.#gt.realpathSync(this.fullpath());return this.#zt=this.resolve(t)}catch(t){this.#Jt()}}[F](t){if(t===this)return;const e=new Set([]);let s=[];let i=this;while(i&&i.parent){e.add(i);i.#Ft=s.join(this.sep);i.#Bt=s.join("/");i=i.parent;s.push("..")}i=t;while(i&&i.parent&&!e.has(i)){i.#Ft=undefined;i.#Bt=undefined;i=i.parent}}}e.PathBase=PathBase;class PathWin32 extends PathBase{sep="\\";splitSep=y;constructor(t,e=w,s,i,r,n,o){super(t,e,s,i,r,n,o)}newChild(t,e=w,s={}){return new PathWin32(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return a.win32.parse(t).root}getRoot(t){t=uncToDrive(t.toUpperCase());if(t===this.root.name){return this.root}for(const[e,s]of Object.entries(this.roots)){if(this.sameRoot(t,e)){return this.roots[t]=s}}return this.roots[t]=new PathScurryWin32(t,this).root}sameRoot(t,e=this.root.name){t=t.toUpperCase().replace(/\//g,"\\").replace(g,"$1\\");return t===e}}e.PathWin32=PathWin32;class PathPosix extends PathBase{splitSep="/";sep="/";constructor(t,e=w,s,i,r,n,o){super(t,e,s,i,r,n,o)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=w,s={}){return new PathPosix(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}}e.PathPosix=PathPosix;class PathScurryBase{root;rootPath;roots;cwd;#ce;#le;#Gt;nocase;#gt;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:n=p}={}){this.#gt=fsFromOption(n);if(t instanceof URL||t.startsWith("file://")){t=(0,c.fileURLToPath)(t)}const o=e.resolve(t);this.roots=Object.create(null);this.rootPath=this.parseRootPath(o);this.#ce=new ResolveCache;this.#le=new ResolveCache;this.#Gt=new ChildrenCache(r);const a=o.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]){a.pop()}if(i===undefined){throw new TypeError("must provide nocase setting to PathScurryBase ctor")}this.nocase=i;this.root=this.newRoot(this.#gt);this.roots[this.rootPath]=this.root;let l=this.root;let h=a.length-1;const u=e.sep;let f=this.rootPath;let d=false;for(const t of a){const e=h--;l=l.child(t,{relative:new Array(e).fill("..").join(u),relativePosix:new Array(e).fill("..").join("/"),fullpath:f+=(d?"":u)+t});d=true}this.cwd=l}depth(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.depth()}childrenCache(){return this.#Gt}resolve(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(!i||i===".")continue;e=e?`${i}/${e}`:i;if(this.isAbsolute(i)){break}}const s=this.#ce.get(e);if(s!==undefined){return s}const i=this.cwd.resolve(e).fullpath();this.#ce.set(e,i);return i}resolvePosix(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(!i||i===".")continue;e=e?`${i}/${e}`:i;if(this.isAbsolute(i)){break}}const s=this.#le.get(e);if(s!==undefined){return s}const i=this.cwd.resolve(e).fullpathPosix();this.#le.set(e,i);return i}relative(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.relative()}relativePosix(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.relativePosix()}basename(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.name}dirname(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:true}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s}=e;if(!t.canReaddir()){return[]}else{const e=await t.readdir();return s?e:e.map((t=>t.name))}}readdirSync(t=this.cwd,e={withFileTypes:true}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true}=e;if(!t.canReaddir()){return[]}else if(s){return t.readdirSync()}else{return t.readdirSync().map((t=>t.name))}}async lstat(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.lstat()}lstatSync(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=[];if(!r||r(t)){o.push(s?t:t.fullpath())}const a=new Set;const walk=(t,e)=>{a.add(t);t.readdirCB(((t,c)=>{if(t){return e(t)}let l=c.length;if(!l)return e();const next=()=>{if(--l===0){e()}};for(const t of c){if(!r||r(t)){o.push(s?t:t.fullpath())}if(i&&t.isSymbolicLink()){t.realpath().then((t=>t?.isUnknown()?t.lstat():t)).then((t=>t?.shouldWalk(a,n)?walk(t,next):next()))}else{if(t.shouldWalk(a,n)){walk(t,next)}else{next()}}}}),true)};const c=t;return new Promise(((t,e)=>{walk(c,(s=>{if(s)return e(s);t(o)}))}))}walkSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=[];if(!r||r(t)){o.push(s?t:t.fullpath())}const a=new Set([t]);for(const t of a){const e=t.readdirSync();for(const t of e){if(!r||r(t)){o.push(s?t:t.fullpath())}let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(a,n)){a.add(e)}}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}return this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;if(!r||r(t)){yield s?t:t.fullpath()}const o=new Set([t]);for(const t of o){const e=t.readdirSync();for(const t of e){if(!r||r(t)){yield s?t:t.fullpath()}let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(o,n)){o.add(e)}}}}stream(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=new d.Minipass({objectMode:true});if(!r||r(t)){o.write(s?t:t.fullpath())}const a=new Set;const c=[t];let l=0;const process=()=>{let t=false;while(!t){const e=c.shift();if(!e){if(l===0)o.end();return}l++;a.add(e);const onReaddir=(e,u,f=false)=>{if(e)return o.emit("error",e);if(i&&!f){const t=[];for(const e of u){if(e.isSymbolicLink()){t.push(e.realpath().then((t=>t?.isUnknown()?t.lstat():t)))}}if(t.length){Promise.all(t).then((()=>onReaddir(null,u,true)));return}}for(const e of u){if(e&&(!r||r(e))){if(!o.write(s?e:e.fullpath())){t=true}}}l--;for(const t of u){const e=t.realpathCached()||t;if(e.shouldWalk(a,n)){c.push(e)}}if(t&&!o.flowing){o.once("drain",process)}else if(!h){process()}};let h=true;e.readdirCB(onReaddir,true);h=false}};process();return o}streamSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=new d.Minipass({objectMode:true});const a=new Set;if(!r||r(t)){o.write(s?t:t.fullpath())}const c=[t];let l=0;const process=()=>{let t=false;while(!t){const e=c.shift();if(!e){if(l===0)o.end();return}l++;a.add(e);const h=e.readdirSync();for(const e of h){if(!r||r(e)){if(!o.write(s?e:e.fullpath())){t=true}}}l--;for(const t of h){let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(a,n)){c.push(e)}}}if(t&&!o.flowing)o.once("drain",process)};process();return o}chdir(t=this.cwd){const e=this.cwd;this.cwd=typeof t==="string"?this.cwd.resolve(t):t;this.cwd[F](e)}}e.PathScurryBase=PathScurryBase;class PathScurryWin32 extends PathScurryBase{sep="\\";constructor(t=process.cwd(),e={}){const{nocase:s=true}=e;super(t,a.win32,"\\",{...e,nocase:s});this.nocase=s;for(let t=this.cwd;t;t=t.parent){t.nocase=this.nocase}}parseRootPath(t){return a.win32.parse(t).root.toUpperCase()}newRoot(t){return new PathWin32(this.rootPath,S,undefined,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}}e.PathScurryWin32=PathScurryWin32;class PathScurryPosix extends PathScurryBase{sep="/";constructor(t=process.cwd(),e={}){const{nocase:s=false}=e;super(t,a.posix,"/",{...e,nocase:s});this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new PathPosix(this.rootPath,S,undefined,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}}e.PathScurryPosix=PathScurryPosix;class PathScurryDarwin extends PathScurryPosix{constructor(t=process.cwd(),e={}){const{nocase:s=true}=e;super(t,{...e,nocase:s})}}e.PathScurryDarwin=PathScurryDarwin;e.Path=process.platform==="win32"?PathWin32:PathPosix;e.PathScurry=process.platform==="win32"?PathScurryWin32:process.platform==="darwin"?PathScurryDarwin:PathScurryPosix}};var e={};function __nccwpck_require__(s){var i=e[s];if(i!==undefined){return i.exports}var r=e[s]={exports:{}};var n=true;try{t[s].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete e[s]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var s={};(()=>{const t=__nccwpck_require__(2186);try{__nccwpck_require__(4351)()}catch(e){t.setFailed(`Action failed with error ${e}`)}})();module.exports=s})(); \ No newline at end of file diff --git a/src/context.js b/src/context.js index 08c8e74..df54271 100644 --- a/src/context.js +++ b/src/context.js @@ -2,7 +2,7 @@ const fs = require("fs"); const core = require("@actions/core"); -const logger = require("./log")(); +const log = require("./log"); const parseMultilineInput = (multilineInput) => { return multilineInput.split("\n").map((e) => e.trim()); @@ -54,10 +54,10 @@ const context = { while (fs.existsSync(context.TMPDIR)) { context.TMPDIR = `tmp-${Date.now().toString()}`; - logger.info(`TEMP_DIR already exists. Using "${context.TMPDIR}" now.`); + log.info(`TEMP_DIR already exists. Using "${context.TMPDIR}" now.`); } -logger.info("Context:", { +log.info("Context:", { ...context, GITHUB_TOKEN: "", }); diff --git a/src/git.js b/src/git.js index 4def9a8..335968f 100644 --- a/src/git.js +++ b/src/git.js @@ -12,7 +12,7 @@ const { } = require("./context"); const utils = require("./utils"); -const getLogger = require("./log"); +const log = require("./log"); const interpolateCommitMessage = (message, data) => { let newMessage = message; @@ -30,10 +30,8 @@ module.exports = { const { getRepoPath, getRepoSlug, getRepoBranch } = utils.init(repoSlugAndBranch); - const logger = getLogger(repoSlugAndBranch); - function execCmd(command, workingDir) { - logger.info(`EXEC: "${command}" IN "${workingDir || "./"}"`); + log.info(`EXEC: "${command}" IN "${workingDir || "./"}"`); return new Promise((resolve, reject) => { exec( command, @@ -41,7 +39,8 @@ module.exports = { cwd: workingDir, }, function (error, stdout) { - logger.info(`OUTPUT: "${error}${stdout}"`); + log.info(`OUTPUT ERROR: ${error ? `"${error}"` : ""}`); + log.info(`OUTPUT STDOUT: ${stdout ? `"${stdout}"` : ""}}`); error ? reject(error) : resolve(stdout.trim()); } ); @@ -70,11 +69,11 @@ module.exports = { const commitAll = async () => { if (!(await hasChanges())) { - logger.info("NO CHANGES DETECTED"); + log.info("NO CHANGES DETECTED"); return; } - logger.info("CHANGES DETECTED"); - logger.info("COMMIT CHANGES..."); + log.info("CHANGES DETECTED"); + log.info("COMMIT CHANGES..."); const commitMessage = interpolateCommitMessage(COMMIT_MESSAGE, { SRC_REPO: SRC_REPO, TARGET_REPO: repoSlugAndBranch, @@ -84,8 +83,7 @@ module.exports = { const commands = [ `git config --local user.name "${GIT_USERNAME}"`, `git config --local user.email "${GIT_EMAIL}"`, - // `git update-index --really-refresh`, - `git add -A`, + `git add --all`, `git status`, `git commit --message "${commitMessage}"`, `git push`, @@ -95,15 +93,15 @@ module.exports = { output += await execCmd(cmd, getRepoPath()); } } catch (error) { - logger.error(error); + log.error(error); } finally { if (!output.includes("Update file(s) from")) { - logger.error(output); + log.error(output); throw new Error("failed to commit changes"); } } } - logger.info("CHANGES COMMITED"); + log.info("CHANGES COMMITED"); }; return { diff --git a/src/index.js b/src/index.js index 110abe5..755e212 100644 --- a/src/index.js +++ b/src/index.js @@ -4,8 +4,6 @@ const { SRC_REPO, TARGET_REPOS, TMPDIR, SKIP_CLEANUP } = require("./context"); const git = require("./git"); const { removeDir } = require("./utils"); -const getLogger = require("./log"); -const showLogs = getLogger().print; const utils = require("./utils"); const main = async () => { @@ -20,51 +18,41 @@ const main = async () => { const relativeSrcFiles = srcFiles.map((file) => utilsSrc.getRepoRelativeFilePath(file) ); - showLogs(SRC_REPO); - - await new Promise((resolve) => setTimeout(resolve, 5000)); // EXEC IN TARGET REPOS - await Promise.all( - TARGET_REPOS.map(async (repo) => { - const utilsRepo = utils.init(repo); - const gitRepo = git.init(repo); + for (const repo of TARGET_REPOS) { + const utilsRepo = utils.init(repo); + const gitRepo = git.init(repo); - // PREPARE TARGET - await gitRepo.clone(); - const targetFiles = await utilsRepo.getFiles(); - const removedFiles = targetFiles.filter( - (file) => - !relativeSrcFiles.includes(utilsRepo.getRepoRelativeFilePath(file)) - ); + // PREPARE TARGET + await gitRepo.clone(); + const targetFiles = await utilsRepo.getFiles(); + const removedFiles = targetFiles.filter( + (file) => + !relativeSrcFiles.includes(utilsRepo.getRepoRelativeFilePath(file)) + ); - // UPDATE FILES - await Promise.all([ - utilsRepo.removeFiles(removedFiles), - ...srcFiles.map(async (srcFile) => - utilsRepo.copyFile( - srcFile, - path.join( - utilsRepo.getRepoFilePath(), - utilsSrc.getRepoRelativeFilePath(srcFile) - ) + // UPDATE FILES + await Promise.all([ + utilsRepo.removeFiles(removedFiles), + ...srcFiles.map(async (srcFile) => + utilsRepo.copyFile( + srcFile, + path.join( + utilsRepo.getRepoFilePath(), + utilsSrc.getRepoRelativeFilePath(srcFile) ) - ), - ]); - - // COMMIT UPDATES - await gitRepo.commitAll(); + ) + ), + ]); - showLogs(repo); - }) - ); + // COMMIT UPDATES + await gitRepo.commitAll(); + } } catch (err) { error = err; } - // Output all Logs - showLogs(); - if (!SKIP_CLEANUP) { await removeDir(TMPDIR); } diff --git a/src/log.js b/src/log.js index d855ebb..247ff0f 100644 --- a/src/log.js +++ b/src/log.js @@ -10,62 +10,24 @@ const joinAttributes = (...attrs) => ) .join(" "); -const logs = {}; - -module.exports = (id) => { - logs[id] = []; - - const debug = (...attrs) => { - logs[id].push(["debug", joinAttributes(...attrs)]); - if (!id) { - print(); - } - }; - - const error = (...attrs) => { - logs[id].push(["error", joinAttributes(...attrs)]); - core.setFailed(`Action failed with error ${joinAttributes(...attrs)}`); - if (!id) { - print(); - } - }; - - const info = (...attrs) => { - logs[id].push(["info", joinAttributes(...attrs)]); - if (!id) { - print(); - } - }; - - const warn = (...attrs) => { - logs[id].push(["warning", joinAttributes(...attrs)]); - if (!id) { - print(); - } - }; +const debug = (...attrs) => { + core.debug(joinAttributes(...attrs)); +}; - const _print = (id) => { - logs[id].forEach(([type, content]) => { - core[type](id !== "undefined" ? `${id}: ${content}` : content); - }); - logs[id] = []; - }; +const error = (...attrs) => { + core.error(joinAttributes(...attrs)); +}; - const print = (_id = id) => { - if (!_id) { - Object.keys(logs).forEach((key) => { - _print(key); - }); - } else { - _print(_id); - } - }; +const info = (...attrs) => { + core.info(joinAttributes(...attrs)); +}; - return { - debug, - error, - info, - print, - warn, - }; +const warn = (...attrs) => { + core.warning(joinAttributes(...attrs)); +}; +module.exports = { + debug, + error, + info, + warn, }; diff --git a/src/utils.js b/src/utils.js index 1b77cd7..0e03828 100644 --- a/src/utils.js +++ b/src/utils.js @@ -13,11 +13,9 @@ const { SRC_ROOT, TARGET_ROOT, } = require("./context"); -const getLogger = require("./log"); +const log = require("./log"); const init = (repoFullname) => { - const logger = getLogger(repoFullname); - const getRepoSlug = () => { return repoFullname.split(":")[0]; }; @@ -51,7 +49,7 @@ const init = (repoFullname) => { .replace(new RegExp(`^${TMPDIR}/${repoFullname}${getRepoRoot()}`), ""); const getMatchingFiles = (files) => { - logger.info( + log.info( "FILE_PATTERNS", FILE_PATTERNS.map((a) => a.toString()) ); @@ -64,12 +62,9 @@ const init = (repoFullname) => { const getFiles = async () => { const files = await listDir(getRepoPath(), [".git"]); - logger.debug( - "FILES:", - JSON.stringify(files.map(getPrettyPath), undefined, 2) - ); + log.debug("FILES:", JSON.stringify(files.map(getPrettyPath), undefined, 2)); const matchingFiles = getMatchingFiles(files); - logger.info( + log.info( "MATCHING FILES:", JSON.stringify(matchingFiles.map(getPrettyPath), undefined, 2) ); @@ -82,7 +77,7 @@ const init = (repoFullname) => { .then(() => true) .catch(() => false); if (SKIP_REPLACE && targetExists) { - logger.info( + log.info( "skip copying", from.replace(/\\/g, "/").replace(/^\//, ""), "to", @@ -91,7 +86,7 @@ const init = (repoFullname) => { ); return; } - logger.info( + log.info( "copy", from.replace(/\\/g, "/").replace(/^\//, ""), "to", @@ -106,13 +101,13 @@ const init = (repoFullname) => { const removeFiles = async (filePaths) => { if (SKIP_DELETE) { - logger.info( + log.info( "SKIP REMOVING FILES because `SKIP_DELETE` is set to `true`", filePaths.map((f) => `"${f}"`).join(", ") ); return; } - logger.info("REMOVE FILES", filePaths); + log.info("REMOVE FILES", filePaths); if (DRY_RUN) { return; }